wangliang 1 年之前
父節點
當前提交
c1fb32ea7c

+ 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()) && !Objects.equals(f.getValue(), "null")) {//获取甲方复核人员
+            if (setup.intValue() == 2 && f.getFormId().contains(SystemConstant.APPROVE_CHECK_USERS) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":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()) && !Objects.equals(f.getValue(), "null")) {//获取已方复核人员
+            } else if (setup.intValue() == 3 && f.getFormId().contains(SystemConstant.APPROVE_CHECK_THIRD_USERS) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":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()) && !Objects.equals(f.getValue(), "null")) {//问题简要
+                if (f.getFormId().contains(SystemConstant.PROBLEM_POINT) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":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()) && !Objects.equals(f.getValue(), "null")) {//问题情况说明
+                if (f.getFormId().contains(SystemConstant.PROBLEM_REMARK) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":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()) && !Objects.equals(f.getValue(), "null")) {//附件id数组
+                if (f.getFormId().contains(SystemConstant.ATTACHMENT_INFO) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":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()) && !Objects.equals(f.getValue(), "null")) {//质量问题类型
+                if (f.getFormId().contains(SystemConstant.PROBLEM_TYPE) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":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()) && !Objects.equals(f.getValue(), "null")) {//问题归因
+                if (f.getFormId().contains(SystemConstant.PROBLEM_REASON_RADIO) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":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()) && !Objects.equals(f.getValue(), "null")) {//问题影响度
+                if (f.getFormId().contains(SystemConstant.PROBLEM_DEGREE_RADIO) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":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()) && !Objects.equals(f.getValue(), "null")) {//责任人
+                if (f.getFormId().contains(SystemConstant.PROBLEM_USERS) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":null}")) {//责任人
                     JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                     JSONArray jsonArray = jsonObject.getJSONArray(SystemConstant.VALUE);
                     StringJoiner stringJoiner = new StringJoiner(",");

+ 9 - 9
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()) && !Objects.equals(f.getValue(), "null")) {
+                    if (Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":null}")) {
                         JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                         String value = jsonObject.getString(SystemConstant.VALUE);
                         formFieldMap.put(f.getFormId(), value);
                     }
                 } else {
-                    if (Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "null")) {
+                    if (Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":null}")) {
                         JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                         JSONArray jsonArray = jsonObject.getJSONArray(SystemConstant.VALUE);
                         StringJoiner stringJoiner = new StringJoiner(",");
@@ -759,12 +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()) && !Objects.equals(f.getValue(), "null")) {
+            if (f.getFormId().contains(SystemConstant.REGION_USER_ID) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":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()) && !Objects.equals(f.getValue(), "null")) {
+                    f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":null}")) {
                 JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                 JSONArray jsonArray = jsonObject.getJSONArray(SystemConstant.VALUE);
                 StringJoiner stringJoiner = new StringJoiner(",");
@@ -773,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()))
-                    && !Objects.equals(f.getValue(), "null")) {
+                    && !Objects.equals(f.getValue(), "{\"value\":null}")) {
                 JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                 String value = jsonObject.getString(SystemConstant.VALUE);
                 engineerUserId = Long.parseLong(value);
@@ -954,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()) && !Objects.equals(f.getValue(), "null")) {
+                                    f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":null}")) {
                                 JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                                 String value = jsonObject.getString(SystemConstant.VALUE);
                                 if (Objects.nonNull(value) && Objects.nonNull(sopId) && value.equals("SCAN")) {
@@ -1129,7 +1129,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
             for (FlowFormWidgetResult f : flowFormWidgetResultList) {
                 if ((f.getFormId().contains(SystemConstant.DEVICE_OUT_TIME) || f.getFormId()
                         .contains(SystemConstant.DEVICE_IN_TIME)) && Objects.nonNull(f.getValue()) && !Objects.equals(
-                        f.getValue(), "null")) {
+                        f.getValue(), "{\"value\":null}")) {
                     JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                     String value = jsonObject.getString(SystemConstant.VALUE);
                     deviceInOutTime = Long.parseLong(value);
@@ -1138,7 +1138,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                             InOutTypeEnum.IN;
                 } else if ((f.getFormId().contains(SystemConstant.DEVICE_OUT_TABLE) || f.getFormId()
                         .contains(SystemConstant.DEVICE_IN_TABLE)) && Objects.nonNull(f.getValue()) && !Objects.equals(
-                        f.getValue(), "null")) {
+                        f.getValue(), "{\"value\":null}")) {
                     if (Objects.isNull(type)) {
                         type = f.getFormId().contains(SystemConstant.DEVICE_OUT_TABLE) ?
                                 InOutTypeEnum.OUT :
@@ -1342,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()) && !Objects.equals(f.getValue(), "null")) {
+            if (f.getFormId().contains(fieldId) && Objects.nonNull(f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":null}")) {
                 JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                 String value = jsonObject.getString(SystemConstant.VALUE);
                 processLimitedTime = Long.parseLong(value);