wangliang 1 سال پیش
والد
کامیت
c81b8c7862

+ 9 - 9
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBQualityProblemApplyServiceImpl.java

@@ -257,7 +257,7 @@ public class TBQualityProblemApplyServiceImpl extends ServiceImpl<TBQualityProbl
     public List<String> getApproveUserIds(FlowTaskResult flowTaskResult, Integer setup, List<String> approveUserIds) {
         List<FlowFormWidgetResult> formProperty = flowTaskResult.getFormProperty();
         for (FlowFormWidgetResult f : formProperty) {
-            if (setup.intValue() == 2 && f.getFormId().contains(SystemConstant.APPROVE_CHECK_USERS) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {//获取甲方复核人员
+            if (setup.intValue() == 2 && f.getFormId().contains(SystemConstant.APPROVE_CHECK_USERS) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {//获取甲方复核人员
 //                String string = f.getValue().replaceAll("\\[", "").replaceAll("\\]", "");
 //                approveUserIds = Arrays.asList(StringUtils.split(string, ","));
                 JSONObject jsonObject = JSONObject.parseObject(f.getValue());
@@ -267,7 +267,7 @@ public class TBQualityProblemApplyServiceImpl extends ServiceImpl<TBQualityProbl
                     approveUserIds.add(jsonArray.getString(i));
                 }
                 break;
-            } else if (setup.intValue() == 3 && f.getFormId().contains(SystemConstant.APPROVE_CHECK_THIRD_USERS) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {//获取已方复核人员
+            } else if (setup.intValue() == 3 && f.getFormId().contains(SystemConstant.APPROVE_CHECK_THIRD_USERS) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {//获取已方复核人员
 //                String string = f.getValue().replaceAll("\\[", "").replaceAll("\\]", "");
 //                approveUserIds = Arrays.asList(StringUtils.split(string, ","));
                 JSONObject jsonObject = JSONObject.parseObject(f.getValue());
@@ -298,17 +298,17 @@ public class TBQualityProblemApplyServiceImpl extends ServiceImpl<TBQualityProbl
         List<FlowFormWidgetResult> formWidgetResultList = currFlowTaskResult.getFormProperty();
         if (!CollectionUtils.isEmpty(formWidgetResultList)) {//更新字段
             for (FlowFormWidgetResult f : formWidgetResultList) {
-                if (f.getFormId().contains(SystemConstant.PROBLEM_POINT) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {//问题简要
+                if (f.getFormId().contains(SystemConstant.PROBLEM_POINT) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {//问题简要
                     JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                     String value = jsonObject.getString(SystemConstant.VALUE);
                     tbQualityProblemApply.setSummary(value);
                 }
-                if (f.getFormId().contains(SystemConstant.PROBLEM_REMARK) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {//问题情况说明
+                if (f.getFormId().contains(SystemConstant.PROBLEM_REMARK) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {//问题情况说明
                     JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                     String value = jsonObject.getString(SystemConstant.VALUE);
                     tbQualityProblemApply.setRemark(value);
                 }
-                if (f.getFormId().contains(SystemConstant.ATTACHMENT_INFO) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {//附件id数组
+                if (f.getFormId().contains(SystemConstant.ATTACHMENT_INFO) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {//附件id数组
                     JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                     JSONArray jsonArray = jsonObject.getJSONArray(SystemConstant.VALUE);
                     StringJoiner stringJoiner = new StringJoiner(",");
@@ -317,22 +317,22 @@ public class TBQualityProblemApplyServiceImpl extends ServiceImpl<TBQualityProbl
                     }
                     tbQualityProblemApply.setAttachmentIds(stringJoiner.toString());
                 }
-                if (f.getFormId().contains(SystemConstant.PROBLEM_TYPE) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {//质量问题类型
+                if (f.getFormId().contains(SystemConstant.PROBLEM_TYPE) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {//质量问题类型
                     JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                     String value = jsonObject.getString(SystemConstant.VALUE);
                     tbQualityProblemApply.setType(QualityProblemTypeEnum.valueOf(value));
                 }
-                if (f.getFormId().contains(SystemConstant.PROBLEM_REASON_RADIO) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {//问题归因
+                if (f.getFormId().contains(SystemConstant.PROBLEM_REASON_RADIO) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {//问题归因
                     JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                     String value = jsonObject.getString(SystemConstant.VALUE);
                     tbQualityProblemApply.setReason(QualityProblemReasonEnum.valueOf(value));
                 }
-                if (f.getFormId().contains(SystemConstant.PROBLEM_DEGREE_RADIO) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {//问题影响度
+                if (f.getFormId().contains(SystemConstant.PROBLEM_DEGREE_RADIO) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {//问题影响度
                     JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                     String value = jsonObject.getString(SystemConstant.VALUE);
                     tbQualityProblemApply.setInfluenceDegree(InfluenceDegreeEnum.valueOf(value));
                 }
-                if (f.getFormId().contains(SystemConstant.PROBLEM_USERS) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {//责任人
+                if (f.getFormId().contains(SystemConstant.PROBLEM_USERS) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {//责任人
                     JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                     JSONArray jsonArray = jsonObject.getJSONArray(SystemConstant.VALUE);
                     StringJoiner stringJoiner = new StringJoiner(",");

+ 12 - 13
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -140,13 +140,13 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                     && f.getCode() != WidgetCodeEnum.LABEL && f.getCode() != WidgetCodeEnum.SIGN
                     && f.getCode() != WidgetCodeEnum.OTHER) {
                 if (f.getInputType() != WidgetInputTypeEnum.ARRAY) {
-                    if (Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {
+                    if (Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {
                         JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                         String value = jsonObject.getString(SystemConstant.VALUE);
                         formFieldMap.put(f.getFormId(), value);
                     }
                 } else {
-                    if (Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {
+                    if (Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {
                         JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                         JSONArray jsonArray = jsonObject.getJSONArray(SystemConstant.VALUE);
                         StringJoiner stringJoiner = new StringJoiner(",");
@@ -759,13 +759,12 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
         String assistantEngineerUserIds = null;
         List<FlowFormWidgetResult> formProperty = flowTaskResult.getFormProperty();
         for (FlowFormWidgetResult f : formProperty) {
-            if (f.getFormId().contains(SystemConstant.REGION_USER_ID) && Objects.nonNull(f.getValue()) && !f.getValue()
-                    .contains("null")) {
+            if (f.getFormId().contains(SystemConstant.REGION_USER_ID) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {
                 JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                 String value = jsonObject.getString(SystemConstant.VALUE);
                 regionUserId = Long.parseLong(value);
             } else if (f.getFormId().contains(SystemConstant.ASSISTANT_ENGINEER_USER_ID) && Objects.nonNull(
-                    f.getValue()) && !f.getValue().contains("null")) {
+                    f.getValue()) && !Objects.equals(f.getValue(), "null")) {
                 JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                 JSONArray jsonArray = jsonObject.getJSONArray(SystemConstant.VALUE);
                 StringJoiner stringJoiner = new StringJoiner(",");
@@ -774,7 +773,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                 }
                 assistantEngineerUserIds = stringJoiner.toString();
             } else if ((f.getFormId().contains(SystemConstant.ENGINEER_USER_ID) && Objects.nonNull(f.getValue()))
-                    && !f.getValue().contains("null")) {
+                    && !Objects.equals(f.getValue(), "null")) {
                 JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                 String value = jsonObject.getString(SystemConstant.VALUE);
                 engineerUserId = Long.parseLong(value);
@@ -955,7 +954,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                         Long engineerUserId = null;
                         for (FlowFormWidgetResult f : formProperty) {
                             if (f.getFormId().contains(SystemConstant.THIRD_SERVICE_REGION_CB) && Objects.nonNull(
-                                    f.getValue()) && !f.getValue().contains("null")) {
+                                    f.getValue()) && !Objects.equals(f.getValue(), "null")) {
                                 JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                                 String value = jsonObject.getString(SystemConstant.VALUE);
                                 if (Objects.nonNull(value) && Objects.nonNull(sopId) && value.equals("SCAN")) {
@@ -1254,7 +1253,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
         flowResult.setSetupMap(setupMap);
         tfCustomFlowEntity.updateInfo(sysUser.getId());
         tfCustomFlowEntity.setFlowProcessVar(JacksonUtil.parseJson(flowResult));
-//        if (tfFlowApprove.getStatus() != FlowStatusEnum.FINISH && tfFlowApprove.getStatus() != FlowStatusEnum.END) {
+        //        if (tfFlowApprove.getStatus() != FlowStatusEnum.FINISH && tfFlowApprove.getStatus() != FlowStatusEnum.END) {
         if (tfFlowApprove.getStatus() != FlowStatusEnum.END) {
             Map<String, Object> map = new HashMap<>();
             CrmProjectResult crmProjectResult = tbCrmService.findCrmProjectBySopNoOrCrmNo(tfCustomFlowEntity.getCode(),
@@ -1275,11 +1274,11 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
             map.put(SystemConstant.SOURCE, "save");
             tbSopInfoService.saveJobRemind(map);
 
-            if (tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW
-                    && (tfFlowApprove.getSetup().intValue() >= 4 || tfFlowApprove.getSetup().intValue() == 0)) {
+            if (tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW && (tfFlowApprove.getSetup().intValue() >= 4
+                    || tfFlowApprove.getSetup().intValue() == 0)) {
                 tbSopInfoService.sopDeviceInOutSave(map, 4);
-            } else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW
-                    && (tfFlowApprove.getSetup().intValue() >= 4 || tfFlowApprove.getSetup().intValue() == 0)) {
+            } else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW && (
+                    tfFlowApprove.getSetup().intValue() >= 4 || tfFlowApprove.getSetup().intValue() == 0)) {
                 tbSopInfoService.sopDeviceInOutSave(map, 4);
                 if (tfFlowApprove.getSetup().intValue() > 5 || tfFlowApprove.getSetup().intValue() == 0) {
                     FlowTaskResult flowTaskResultDeviceOut = this.getFormProperties(tfCustomFlowEntity, 4);
@@ -1343,7 +1342,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
         Long processLimitedTime = null;
         List<FlowFormWidgetResult> formProperty = flowTaskResult.getFormProperty();
         for (FlowFormWidgetResult f : formProperty) {
-            if (f.getFormId().contains(fieldId) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {
+            if (f.getFormId().contains(fieldId) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {
                 JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                 String value = jsonObject.getString(SystemConstant.VALUE);
                 processLimitedTime = Long.parseLong(value);