add 审批后填充审批意见
This commit is contained in:
+10
-6
@@ -59,7 +59,7 @@ public class MyGlobalEventListener implements ActivitiEventListener {
|
|||||||
this.activityComplete(event);
|
this.activityComplete(event);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//log.info("Event received: " + event.getType());
|
log.info("Event received: " + event.getType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,6 +102,8 @@ public class MyGlobalEventListener implements ActivitiEventListener {
|
|||||||
log.info("===================任务创建事件===================");
|
log.info("===================任务创建事件===================");
|
||||||
ActivitiEntityEventImpl activitiEntityEvent = (ActivitiEntityEventImpl) event;
|
ActivitiEntityEventImpl activitiEntityEvent = (ActivitiEntityEventImpl) event;
|
||||||
TaskEntity delegateTask = (TaskEntity) activitiEntityEvent.getEntity();
|
TaskEntity delegateTask = (TaskEntity) activitiEntityEvent.getEntity();
|
||||||
|
//任务创建时,清除pass
|
||||||
|
delegateTask.removeVariable("pass");
|
||||||
//流程审批信息
|
//流程审批信息
|
||||||
ProcessApprovalRecordService recordService = SpringContextUtil.getBean(ProcessApprovalRecordService.class);
|
ProcessApprovalRecordService recordService = SpringContextUtil.getBean(ProcessApprovalRecordService.class);
|
||||||
|
|
||||||
@@ -146,7 +148,6 @@ public class MyGlobalEventListener implements ActivitiEventListener {
|
|||||||
ExecutionEntity execution = delegateTask.getExecution();
|
ExecutionEntity execution = delegateTask.getExecution();
|
||||||
//流程审批信息转办
|
//流程审批信息转办
|
||||||
ProcessApprovalRecordService recordService = SpringContextUtil.getBean(ProcessApprovalRecordService.class);
|
ProcessApprovalRecordService recordService = SpringContextUtil.getBean(ProcessApprovalRecordService.class);
|
||||||
|
|
||||||
String taskId = delegateTask.getId();
|
String taskId = delegateTask.getId();
|
||||||
String assignee = delegateTask.getAssignee();
|
String assignee = delegateTask.getAssignee();
|
||||||
|
|
||||||
@@ -163,10 +164,13 @@ public class MyGlobalEventListener implements ActivitiEventListener {
|
|||||||
approvalRecord.setOverTime(between.toString());
|
approvalRecord.setOverTime(between.toString());
|
||||||
|
|
||||||
Map<String, Object> variables = delegateTask.getVariables();
|
Map<String, Object> variables = delegateTask.getVariables();
|
||||||
if (variables.containsKey("pass") && variables.get("pass").equals("false")){
|
if (variables.containsKey("pass")){
|
||||||
approvalRecord.setCommitFlag(CommitFlagEnum.REJECT.getValue());
|
if ((Boolean)variables.get("pass")){
|
||||||
}else {
|
approvalRecord.setCommitFlag(CommitFlagEnum.PASS.getValue());
|
||||||
approvalRecord.setCommitFlag(CommitFlagEnum.PASS.getValue());
|
}else {
|
||||||
|
approvalRecord.setCommitFlag(CommitFlagEnum.REJECT.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
recordService.updateById(approvalRecord);
|
recordService.updateById(approvalRecord);
|
||||||
|
|||||||
Reference in New Issue
Block a user