Jelajahi Sumber

细节修改

wangliang 1 tahun lalu
induk
melakukan
9a029cebec

+ 3 - 2
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBCrmDetailServiceImpl.java

@@ -86,6 +86,9 @@ public class TBCrmDetailServiceImpl extends ServiceImpl<TBCrmDetailMapper, TBCrm
         TBService tbService = tbServiceService.getById(tbCrm.getServiceId());
         Objects.requireNonNull(tbService, "未找到服务单元");
 
+        if (tbService.getType() == ProductTypeEnum.CLOUD_MARK) {
+            throw ExceptionResultEnum.ERROR.exception(tbService.getType().getTitle() + "暂不支持创建sop");
+        }
         if (Objects.isNull(crmProjectResult.getProcessVar())) {
             if (tbService.getType() == ProductTypeEnum.OFFICE) {
                 List<FlowFormWidgetResult> flowFormWidgetResultList = tdFormWidgetService.flowWidgetQuery(
@@ -94,8 +97,6 @@ public class TBCrmDetailServiceImpl extends ServiceImpl<TBCrmDetailMapper, TBCrm
                     throw ExceptionResultEnum.ERROR.exception("教务处sop公用控件未设置");
                 }
                 crmProjectResult.setProcessVar(JacksonUtil.parseJson(flowFormWidgetResultList));
-            } else {
-                throw ExceptionResultEnum.ERROR.exception(tbService.getType().getTitle() + "暂不支持创建sop");
             }
         }
         return crmProjectResult;

+ 1 - 3
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -1123,6 +1123,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
         tfCustomFlowEntity.setFlowProcessVar(JacksonUtil.parseJson(flowResult));
 
         TBCrmDetail tbCrmDetail = tbCrmDetailService.findBySopNo(tfCustomFlowEntity.getCode());
+        FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
         if (tfFlowApprove.getStatus() != FlowStatusEnum.FINISH && tfFlowApprove.getStatus() != FlowStatusEnum.END) {
             Map<String, Object> map = new HashMap<>();
             CrmProjectResult crmProjectResult = tbCrmService.findCrmProjectInfo(tfCustomFlowEntity.getCode(),
@@ -1142,8 +1143,6 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
             map.put(SystemConstant.SOP_ID, tbSopInfo.getId());
             map.put(SystemConstant.SOURCE, "save");
             tbSopInfoService.saveJobRemind(map);
-
-            FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
             tbSopInfoService.saveSopPlanDate(flowTaskResult, tbSopInfo.getId(), tfCustomFlowEntity.getFlowId(),
                     sysUser.getId(), tfCustomFlow.getType());
 
@@ -1157,7 +1156,6 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
 
             tbDingService.resetDingExceptionBySopNo(tbSopInfo.getSopNo());
         }
-        FlowTaskResult flowTaskResult = tbSopInfoService.getFormProperties(tfCustomFlowEntity, 1);
         List<FlowFormWidgetResult> flowFormWidgetResultList = flowTaskResult.getFormProperty();
         for (FlowFormWidgetResult f : flowFormWidgetResultList) {
             if (f.getFormId().contains(ProcessLimitedEnum.SCAN_START_TIME.getKey()) && Objects.nonNull(f.getValue())