|
@@ -117,13 +117,13 @@ public class ProcessEventListener implements ActivitiEventListener, Serializable
|
|
// Map<String, Object> map = (Map) taskService.getVariable(task.getId(), SystemConstant.APPROVE_MAP_VAR);
|
|
// Map<String, Object> map = (Map) taskService.getVariable(task.getId(), SystemConstant.APPROVE_MAP_VAR);
|
|
|
|
|
|
//此处统一流程节点保存延期预警任务
|
|
//此处统一流程节点保存延期预警任务
|
|
- if ((tfCustomFlow.getType() != TFCustomTypeEnum.OFFICE_SOP_FLOW && tfCustomFlow.getType() != TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW)
|
|
|
|
|
|
+ if ((tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW || tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW)
|
|
&& tfFlowLog.getApproveOperation() != FlowApproveOperationEnum.DRAFT
|
|
&& tfFlowLog.getApproveOperation() != FlowApproveOperationEnum.DRAFT
|
|
&& tfFlowLog.getApproveOperation() != FlowApproveOperationEnum.END
|
|
&& tfFlowLog.getApproveOperation() != FlowApproveOperationEnum.END
|
|
&& tfFlowLog.getApproveOperation() != FlowApproveOperationEnum.FINISH) {
|
|
&& tfFlowLog.getApproveOperation() != FlowApproveOperationEnum.FINISH) {
|
|
List<TSJobRemind> tsJobRemindArrayList = new ArrayList<>();
|
|
List<TSJobRemind> tsJobRemindArrayList = new ArrayList<>();
|
|
if (Objects.nonNull(task.getAssignee())) {
|
|
if (Objects.nonNull(task.getAssignee())) {
|
|
- tsJobRemindArrayList.add(new TSJobRemind(JobQuartzTypeEnum.FLOW, tfCustomFlowEntity.getCode(), Long.parseLong(task.getId()), tfCustomFlow.getType().getTitle() + ";" + task.getName(), JobTypeEnum.AFTER, Long.parseLong(task.getAssignee()), tfFlowLog.getApproveOperation(), sysUser.getId()));
|
|
|
|
|
|
+ tsJobRemindArrayList.add(new TSJobRemind(JobQuartzTypeEnum.FLOW, tfCustomFlowEntity.getCode(), Long.parseLong(task.getId()), tfCustomFlow.getType().getTitle() + ";" + task.getName(), JobTypeEnum.AFTER, Long.parseLong(task.getAssignee()), tfFlowLog.getApproveOperation(), sysUser.getId(), tfCustomFlowEntity.getCrmNo()));
|
|
// if (CollectionUtils.isEmpty(map)) {//系统自动提交的不发待办短信
|
|
// if (CollectionUtils.isEmpty(map)) {//系统自动提交的不发待办短信
|
|
this.sendSopFlowDoneSms(tfCustomFlow.getType(), tfCustomFlowEntity, task.getName(), Long.parseLong(task.getAssignee()));
|
|
this.sendSopFlowDoneSms(tfCustomFlow.getType(), tfCustomFlowEntity, task.getName(), Long.parseLong(task.getAssignee()));
|
|
// jobRemindService.saveJobRemind(tsJobRemindArrayList);
|
|
// jobRemindService.saveJobRemind(tsJobRemindArrayList);
|
|
@@ -132,7 +132,7 @@ public class ProcessEventListener implements ActivitiEventListener, Serializable
|
|
List<IdentityLink> identityLinkList = taskService.getIdentityLinksForTask(task.getId());
|
|
List<IdentityLink> identityLinkList = taskService.getIdentityLinksForTask(task.getId());
|
|
if (!CollectionUtils.isEmpty(identityLinkList)) {
|
|
if (!CollectionUtils.isEmpty(identityLinkList)) {
|
|
for (IdentityLink i : identityLinkList) {
|
|
for (IdentityLink i : identityLinkList) {
|
|
- tsJobRemindArrayList.add(new TSJobRemind(JobQuartzTypeEnum.FLOW, tfCustomFlowEntity.getCode(), Long.parseLong(i.getTaskId()), tfCustomFlow.getType().getTitle() + ";" + task.getName(), JobTypeEnum.AFTER, Long.parseLong(i.getUserId()), tfFlowLog.getApproveOperation(), sysUser.getId()));
|
|
|
|
|
|
+ tsJobRemindArrayList.add(new TSJobRemind(JobQuartzTypeEnum.FLOW, tfCustomFlowEntity.getCode(), Long.parseLong(i.getTaskId()), tfCustomFlow.getType().getTitle() + ";" + task.getName(), JobTypeEnum.AFTER, Long.parseLong(i.getUserId()), tfFlowLog.getApproveOperation(), sysUser.getId(), tfCustomFlowEntity.getCrmNo()));
|
|
// if (CollectionUtils.isEmpty(map)) {//系统自动提交的不发待办短信
|
|
// if (CollectionUtils.isEmpty(map)) {//系统自动提交的不发待办短信
|
|
this.sendSopFlowDoneSms(tfCustomFlow.getType(), tfCustomFlowEntity, task.getName(), Long.parseLong(i.getUserId()));
|
|
this.sendSopFlowDoneSms(tfCustomFlow.getType(), tfCustomFlowEntity, task.getName(), Long.parseLong(i.getUserId()));
|
|
// jobRemindService.saveJobRemind(tsJobRemindArrayList);
|
|
// jobRemindService.saveJobRemind(tsJobRemindArrayList);
|
|
@@ -160,7 +160,7 @@ public class ProcessEventListener implements ActivitiEventListener, Serializable
|
|
TFFlowLog tfFlowLog = (TFFlowLog) taskService.getVariable(task.getId(), SystemConstant.FLOW_APPROVE_LOG);
|
|
TFFlowLog tfFlowLog = (TFFlowLog) taskService.getVariable(task.getId(), SystemConstant.FLOW_APPROVE_LOG);
|
|
Optional.ofNullable(tfFlowLog).orElseThrow(() -> ExceptionResultEnum.FLOW_APPROVE_LOG_NO_DATA.exception());
|
|
Optional.ofNullable(tfFlowLog).orElseThrow(() -> ExceptionResultEnum.FLOW_APPROVE_LOG_NO_DATA.exception());
|
|
|
|
|
|
- if ((tfCustomFlow.getType() != TFCustomTypeEnum.OFFICE_SOP_FLOW && tfCustomFlow.getType() != TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW)
|
|
|
|
|
|
+ if ((tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW || tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW)
|
|
&& tfFlowLog.getApproveSetup().intValue() > 1) {//流程提交不需要提醒
|
|
&& tfFlowLog.getApproveSetup().intValue() > 1) {//流程提交不需要提醒
|
|
//任务完成后统一设置延期预警任务enable为false
|
|
//任务完成后统一设置延期预警任务enable为false
|
|
jobRemindService.updateJobRemind(Long.parseLong(task.getId()));
|
|
jobRemindService.updateJobRemind(Long.parseLong(task.getId()));
|