Explorar o código

sop人员修改

wangliang hai 9 meses
pai
achega
ba472d991c

+ 12 - 6
sop-business/src/main/java/com/qmth/sop/business/activiti/service/impl/ActivitiServiceImpl.java

@@ -273,12 +273,15 @@ public class ActivitiServiceImpl implements ActivitiService {
                     .singleResult();
             Optional.ofNullable(task).orElseThrow(() -> ExceptionResultEnum.TASK_NO_DATA.exception());
 
-            TBCrmDetail tbCrmDetail = (TBCrmDetail) flowApproveParam.getVar().get(SystemConstant.CRM_DETAIL);
-            taskService.setVariable(task.getId(), SystemConstant.CRM_DETAIL, tbCrmDetail);
             activitiService.sendSopFlowDoneSms(maxTfCustomFlow.getType(), tfCustomFlowEntity, task.getName(),
                     Long.parseLong(approveUserIds.get(0)));
-            activitiService.sendSopFlowDoneMsg(maxTfCustomFlow.getType(), tfCustomFlowEntity, tfFlowApprove,
-                    Long.parseLong(task.getId()), task.getName(), tbCrmDetail.getId());
+            if (tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW
+                    || tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {
+                TBCrmDetail tbCrmDetail = (TBCrmDetail) flowApproveParam.getVar().get(SystemConstant.CRM_DETAIL);
+                taskService.setVariable(task.getId(), SystemConstant.CRM_DETAIL, tbCrmDetail);
+                activitiService.sendSopFlowDoneMsg(maxTfCustomFlow.getType(), tfCustomFlowEntity, tfFlowApprove,
+                        Long.parseLong(task.getId()), task.getName(), tbCrmDetail.getId());
+            }
         } else if (Objects.nonNull(flowApproveParam.getTaskId())) {
             taskTemp = taskService.createTaskQuery().taskId(String.valueOf(flowApproveParam.getTaskId()))
                     .singleResult();
@@ -452,8 +455,11 @@ public class ActivitiServiceImpl implements ActivitiService {
                                         new ArrayList<>(approveIdSet));
                             }
                         }
-                        TBCrmDetail tbCrmDetail = tbCrmDetailService.findBySopNo(tfCustomFlowEntity.getCode());
-                        taskService.setVariable(task.getId(), SystemConstant.CRM_DETAIL, tbCrmDetail);
+                        if (tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW
+                                || tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {
+                            TBCrmDetail tbCrmDetail = tbCrmDetailService.findBySopNo(tfCustomFlowEntity.getCode());
+                            taskService.setVariable(task.getId(), SystemConstant.CRM_DETAIL, tbCrmDetail);
+                        }
                         taskService.setVariable(task.getId(), SystemConstant.FLOW_CUSTOM, tfCustomFlow);
                         taskService.setVariable(task.getId(), SystemConstant.FLOW_APPROVE, tfFlowApprove);
                         taskService.setVariable(task.getId(), SystemConstant.FLOW_ENTITY, tfCustomFlowEntity);

+ 2 - 2
sop-task/src/main/java/com/qmth/sop/task/job/service/impl/JobServiceImpl.java

@@ -97,7 +97,7 @@ public class JobServiceImpl implements JobService {
                                     .orElseThrow(() -> ExceptionResultEnum.ERROR.exception("流程提前提醒任务时间未设置"));
                             Long execTime = SystemConstant.processMiniuteMinus(t.getCreateTime(),
                                     Duration.ofMinutes(Long.parseLong(sysConfigBefore.getConfigValue())));
-                            if (Objects.nonNull(execTime) && execTime.longValue() > System.currentTimeMillis()) {
+                            if (Objects.nonNull(execTime) && execTime.longValue() >= System.currentTimeMillis()) {
                                 t.setExecTime(execTime);
                                 this.setJobTime(execTime, t.getId().toString(), t, RemindTaskJob.class,
                                         JobEnum.REMIND_QUARTZ_JOB_GROUP);
@@ -113,7 +113,7 @@ public class JobServiceImpl implements JobService {
                                     .orElseThrow(() -> ExceptionResultEnum.ERROR.exception("流程超时提醒任务时间未设置"));
                             execTime = SystemConstant.processMiniutePlus(t.getCreateTime(),
                                     Duration.ofMinutes(Long.parseLong(sysConfigAfter.getConfigValue())));
-                            if (Objects.nonNull(execTime) && execTime.longValue() > System.currentTimeMillis()) {
+                            if (Objects.nonNull(execTime) && execTime.longValue() >= System.currentTimeMillis()) {
                                 t.setExecTime(execTime);
                                 this.setJobTime(execTime, t.getId().toString(), t, RemindTaskJob.class,
                                         JobEnum.REMIND_QUARTZ_JOB_GROUP);