wangliang 9 months ago
parent
commit
50e68316a2

+ 1 - 2
sop-business/src/main/java/com/qmth/sop/business/activiti/service/impl/ActivitiServiceImpl.java

@@ -1078,8 +1078,7 @@ public class ActivitiServiceImpl implements ActivitiService {
                                 sopRoleTypeCompositeEnum = SopRoleTypeCompositeEnum.REGION_MANAGER;
                                 TFFlowLog tfFlowLog = tfFlowLogService.findByLastFlowLog(flowId,
                                         FlowApproveOperationEnum.APPROVE);
-                                if (tfFlowLog.getApproveId().longValue() == sysUser.getId().longValue()
-                                        && tfFlowLog.getApproveSetup().intValue() == 3 && Objects.nonNull(
+                                if (tfFlowLog.getApproveSetup().intValue() == 3 && Objects.nonNull(
                                         tfFlowLog.getApproveRemark())) {
                                     sopRoleTypeCompositeEnum = SopRoleTypeCompositeEnum.PROJECT_MANAGER;
                                 }

+ 64 - 34
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -1364,45 +1364,75 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                 && tfFlowApprove.getStatus() != FlowStatusEnum.END)) {
             Long processLimitedTime = null;
             String execField = null;
-            if (tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW
-                    || tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {//教务处sop
-                FlowTaskResult flowTaskResult = null;
-                if (tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW) {
-                    flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
-                } else {
-                    flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
+            if (tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW) {//教务处sop
+                for (Task task : taskList) {
+                    tsJobRemindService.updateJobRemind(Long.parseLong(task.getId()));
+                }
+                FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
+                if (tfFlowApprove.getSetup().intValue() == 2) {//扫描准备流程
+                    processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
+                            ProcessLimitedEnum.SCAN_START_TIME.getKey());
+                    execField = ProcessLimitedEnum.SCAN_START_TIME.getKey();
+                    createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow,
+                            tfFlowLog, sysUser.getId(), "扫描准备");
+                }
+                if (tfFlowApprove.getSetup().intValue() >= 2 && tfFlowApprove.getSetup().intValue() <= 3) {//扫描收尾检查
+                    processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
+                            ProcessLimitedEnum.SCAN_END_TIME.getKey());
+                    execField = ProcessLimitedEnum.SCAN_END_TIME.getKey();
+                    createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow,
+                            tfFlowLog, sysUser.getId(), "扫描收尾");
+                }
+                if (tfFlowApprove.getSetup().intValue() >= 2 && tfFlowApprove.getSetup().intValue() <= 4) {//阅卷参数检查
+                    processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
+                            ProcessLimitedEnum.MARK_START_TIME.getKey());
+                    execField = ProcessLimitedEnum.MARK_START_TIME.getKey();
+                    createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow,
+                            tfFlowLog, sysUser.getId(), "阅卷参数检查");
                 }
+                if (tfFlowApprove.getSetup().intValue() >= 2 && tfFlowApprove.getSetup().intValue() <= 5) {//阅卷收尾检查
+                    processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
+                            ProcessLimitedEnum.MARK_END_TIME.getKey());
+                    execField = ProcessLimitedEnum.MARK_END_TIME.getKey();
+                    createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow,
+                            tfFlowLog, sysUser.getId(), "阅卷收尾检查");
+                }
+            } else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {//研究生sop
                 for (Task task : taskList) {
                     tsJobRemindService.updateJobRemind(Long.parseLong(task.getId()));
                 }
-                processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
-                        ProcessLimitedEnum.SCAN_START_TIME.getKey());
-                execField = ProcessLimitedEnum.SCAN_START_TIME.getKey();
-                createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow, tfFlowLog,
-                        sysUser.getId(), "扫描准备");
-
-                processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
-                        ProcessLimitedEnum.SCAN_END_TIME.getKey());
-                execField = ProcessLimitedEnum.SCAN_END_TIME.getKey();
-                createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow, tfFlowLog,
-                        sysUser.getId(), tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW ? "扫描收尾" : "校验收尾");
-
-                processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
-                        ProcessLimitedEnum.MARK_START_TIME.getKey());
-                execField = ProcessLimitedEnum.MARK_START_TIME.getKey();
-                createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow, tfFlowLog,
-                        sysUser.getId(),
-                        tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW ? "阅卷参数检查" : "评卷准备");
-
-                processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
-                        ProcessLimitedEnum.MARK_END_TIME.getKey());
-                execField = ProcessLimitedEnum.MARK_END_TIME.getKey();
-                createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow, tfFlowLog,
-                        sysUser.getId(),
-                        tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW ? "阅卷收尾检查" : "评卷收尾");
-                tbSopInfoService.saveSopPlanDate(this.getFormProperties(tfCustomFlowEntity, 1), sopId,
-                        tfCustomFlowEntity.getFlowId(), sysUser.getId(), tfCustomFlow.getType());
+                FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
+                if (tfFlowApprove.getSetup().intValue() == 5) {//扫描准备流程
+                    processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
+                            ProcessLimitedEnum.SCAN_START_TIME.getKey());
+                    execField = ProcessLimitedEnum.SCAN_START_TIME.getKey();
+                    createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow,
+                            tfFlowLog, sysUser.getId(), "扫描准备");
+                }
+                if (tfFlowApprove.getSetup().intValue() >= 5 && tfFlowApprove.getSetup().intValue() <= 6) {//扫描收尾检查
+                    processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
+                            ProcessLimitedEnum.SCAN_END_TIME.getKey());
+                    execField = ProcessLimitedEnum.SCAN_END_TIME.getKey();
+                    createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow,
+                            tfFlowLog, sysUser.getId(), "校验收尾");
+                }
+                if (tfFlowApprove.getSetup().intValue() >= 5 && tfFlowApprove.getSetup().intValue() <= 7) {//阅卷参数检查
+                    processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
+                            ProcessLimitedEnum.MARK_START_TIME.getKey());
+                    execField = ProcessLimitedEnum.MARK_START_TIME.getKey();
+                    createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow,
+                            tfFlowLog, sysUser.getId(), "评卷准备");
+                }
+                if (tfFlowApprove.getSetup().intValue() >= 5 && tfFlowApprove.getSetup().intValue() <= 9) {//阅卷收尾检查
+                    processLimitedTime = this.getProcessLimitedTime(flowTaskResult,
+                            ProcessLimitedEnum.MARK_END_TIME.getKey());
+                    execField = ProcessLimitedEnum.MARK_END_TIME.getKey();
+                    createJobRemind(execField, processLimitedTime, taskList, tfCustomFlowEntity, tfCustomFlow,
+                            tfFlowLog, sysUser.getId(), "评卷收尾");
+                }
             }
+            tbSopInfoService.saveSopPlanDate(this.getFormProperties(tfCustomFlowEntity, 1), sopId,
+                    tfCustomFlowEntity.getFlowId(), sysUser.getId(), tfCustomFlow.getType());
         }
     }