فهرست منبع

1型 电池仓门检查 去掉。

tom 2 ماه پیش
والد
کامیت
1d48dfba7e

+ 6 - 7
ruoyi-sim/src/main/java/com/ruoyi/sim/constant/FaultConst.java

@@ -9,10 +9,13 @@ public class FaultConst {
      */
     public static HashSet<String> FAULT_SET_CHECK_PASS = new HashSet<>();
 
+    /**
+     * 判分 暂时没有使用
+     */
     public static HashSet<String> FAULT_SET_JUDGE_RIGHT_FROM_WRONG_SP2 = new HashSet<>();
 
     /**
-     * 是否是 2型,3型 的 维护
+     * 是否是 2型,3型 的 检测干燥
      */
     public static HashSet<String> FAULT_SET_WHG = new HashSet<>();
 
@@ -26,10 +29,8 @@ public class FaultConst {
             FAULT_SET_CHECK_PASS.add("0002GZBW0001");
             FAULT_SET_CHECK_PASS.add("0002GZBW0003");
             FAULT_SET_CHECK_PASS.add("0002GZBW0005");
-            FAULT_SET_CHECK_PASS.add("0002GZBW0009");
             // 3型
             FAULT_SET_CHECK_PASS.add("0003GZBW0006");
-            FAULT_SET_CHECK_PASS.add("0003GZBW0007");
         }
         {
             // 1型
@@ -47,11 +48,9 @@ public class FaultConst {
         }
         {
             // 2型
-            // FAULT_SET_WHG.add("0002GZBW0009");
-            FAULT_SET_WHG.add("0002GZBW0010");
+            FAULT_SET_WHG.add("0002GZBW0009");
             // 3型
-            // FAULT_SET_WHG.add("0003GZBW0007");
-            FAULT_SET_WHG.add("0003GZBW0008");
+            FAULT_SET_WHG.add("0003GZBW0007");
         }
     }
 }

+ 11 - 9
ruoyi-sim/src/main/java/com/ruoyi/sim/service/impl/CommReceiveService.java

@@ -160,14 +160,16 @@ public class CommReceiveService {
         }
         // 1型 外壳及零件,特殊处理
         if (StringUtils.equals(s.getSimType(), Sim.TYPE_0001)) {
-            if (StringUtils.equals(f.getFaultId(), "0001GZBW0009") &&
-                    StringUtils.equals(checkValue, "00000002")) {
-                String eMsg = "[" + f.getReplaceName() + "]可换件异常;电池仓门被关闭,请确保电池舱门打开!<br>";
-                l.info(eMsg);
-                vo.setErrorMsg(eMsg);
-                vo.setCheckOk(false);
-                return AjaxResult.success(vo);
-            }
+            // 1型 电池仓门检查 去掉。
+
+//            if (StringUtils.equals(f.getFaultId(), "0001GZBW0009") &&
+//                    StringUtils.equals(checkValue, "00000002")) {
+//                String eMsg = "[" + f.getReplaceName() + "]可换件异常;电池仓门被关闭,请确保电池舱门打开!<br>";
+//                l.info(eMsg);
+//                vo.setErrorMsg(eMsg);
+//                vo.setCheckOk(false);
+//                return AjaxResult.success(vo);
+//            }
         }
         if (StringUtils.equals(s.getSimType(), Sim.TYPE_0002)) {
 
@@ -182,7 +184,7 @@ public class CommReceiveService {
             vo.setCheckOk(true);
             return AjaxResult.success(vo);
         }
-        // 是否是 2型的维护管 或 3型的维护
+        // 是否是 2型的 检测干燥管 或 3型的 检测干燥
         if (FaultConst.FAULT_SET_WHG.contains(f.getFaultId())) {
             // 判断必须存在
             String WHG_EXIST_MSG = checkValue.substring(4, 6);

+ 32 - 21
ruoyi-sim/src/main/java/com/ruoyi/sim/service/impl/CommSendService.java

@@ -763,7 +763,8 @@ public class CommSendService {
         // 未正确安装可换件故障List
         // NG not good
         List<FaultCheckVo> listNGVo = new ArrayList<>();
-        Map<String, FaultCheckVo> map = new HashMap<>();
+//        Map<String, FaultCheckVo> mapVo = new HashMap<>();
+        Set<String> setNG = new HashSet<>();
         // 单一检查
         {
             for (Fault oneF : listF) {
@@ -774,17 +775,26 @@ public class CommSendService {
                 AjaxResult ar = readOneSimOneFaultCheck(voOne);
                 FaultCheckVo voReturn = (FaultCheckVo) ar.get(AjaxResult.DATA_TAG);
                 if (!voReturn.isCheckOk()) {
-                    listNGVo.add(voReturn);
                     l.info("log 故障部位[" + oneF.getBindHardwareMsg() + "][" + oneF.getReplaceName() + "]未正确安装;");
+                    listNGVo.add(voReturn);
+                    // add map.
+                    // mapVo.put(buildKey(voReturn.getSim().getSimType(), voReturn.getFault().getBindHardwareMsg()), voReturn);
+                    setNG.add(oneF.getFaultId());
                 } else {
                     l.info("log 故障部位[" + oneF.getBindHardwareMsg() + "][" + oneF.getReplaceName() + "]安装ok;");
-                    // add map.
-                    map.put(buildKey(voReturn.getSim().getSimType(), voReturn.getFault().getBindHardwareMsg()), voReturn);
                 }
                 if (ar.isError()) {
                     return ar;
                 }
             }
+            // 复核条件检查
+            {
+                AjaxResult ar = checkStep2(sim, setNG);
+                if (ar.isError()) {
+                    return ar;
+                }
+            }
+            //
             if (!listNGVo.isEmpty()) {
                 StringBuilder sb = new StringBuilder();
                 for (FaultCheckVo oneVo : listNGVo) {
@@ -794,13 +804,6 @@ public class CommSendService {
                 return AjaxResult.error(sb.toString());
             }
         }
-        // 复核条件检查
-        {
-            AjaxResult ar = checkStep2(sim, map);
-            if (ar.isError()) {
-                return ar;
-            }
-        }
         return AjaxResult.success("所有故障部位检查没有问题。");
     }
 
@@ -815,17 +818,25 @@ public class CommSendService {
         return simType + "@" + bindHardwareMsg;
     }
 
-    private AjaxResult checkStep2(Sim sim, Map<String, FaultCheckVo> map) {
+    private AjaxResult checkStep2(Sim sim, Set<String> setNG) {
         if (StringUtils.equals(sim.getSimType(), Sim.TYPE_0003)) {
-            if (map.containsKey(buildKeyType0003("01"))) {
-                SimMsg smR = map.get(buildKeyType0003("01")).getSimMsgReceive();
-                String smRS = CommParseUtils.subContentData(smR);
-                // 没有连接FFC排线
-                if (StringUtils.endsWith(smRS, "02")) {
-                    return AjaxResult.error("请检查FFC排线连接!");
-                } else if (StringUtils.endsWith(smRS, "01")) {
-
-                }
+//            if (map.containsKey(buildKeyType0003("01"))) {
+//                SimMsg smR = map.get(buildKeyType0003("01")).getSimMsgReceive();
+//                String smRS = CommParseUtils.subContentData(smR);
+//                // 没有连接FFC排线
+//                if (StringUtils.endsWith(smRS, "02")) {
+//                    return AjaxResult.error("请检查FFC排线连接!");
+//                } else if (StringUtils.endsWith(smRS, "01")) {
+//
+//                }
+//            }
+            if (setNG != null &&
+                    setNG.contains("0003GZBW0003") &&
+                    setNG.contains("0003GZBW0004") &&
+                    setNG.contains("0003GZBW000B") &&
+                    setNG.contains("0003GZBW000E")
+            ) {
+                return AjaxResult.error("请检查 显控报警板与主板连接线 连接情况!");
             }
         }
         return AjaxResult.success("");