From 8b43954926db6b4df6a61ab6e04d6cb11189069d Mon Sep 17 00:00:00 2001
From: 吴健 <14790700720@163.com>
Date: 星期二, 15 四月 2025 08:54:08 +0800
Subject: [PATCH] add-415

---
 jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java         |   10 ++-
 jcdm-ui/src/views/main/om/productionOrde/index.vue                                                           |    8 ++
 jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/controller/DaTileMatchCollectionController.java |   88 +++++++++++++++-------------
 jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java       |    2 
 jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java                                   |   27 ++++++++-
 jcdm-ui/src/views/main/pr/productResultReport/index.vue                                                      |    4 
 6 files changed, 90 insertions(+), 49 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
index 3723ce2..1c686c0 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
@@ -344,7 +344,7 @@
         if (StringUtils.isEmpty(engineNo)){
             return R.fail(500,"绠变綋鐮佷笉鑳戒负绌猴紝璇烽噸璇�");
         }
-        if (!engineNo.contains(",")){
+        if (!engineNo.contains(",") && !engineNo.contains("/") ){
             return R.fail(500,"绠变綋鐮佹牸寮忔湁璇紝璇烽噸璇�");
         }
         ProductNewPassStation checkStation = new ProductNewPassStation();
@@ -428,7 +428,7 @@
 
                 if (StrUtil.isNotBlank(OrderScheduling.getEngineNo())){
                     String snCode = OrderScheduling.getEngineNo();
-                    if (snCode.startsWith("280") || snCode.startsWith("380")){
+                    if (snCode.startsWith("280") || snCode.startsWith("380") || snCode.startsWith("196") || snCode.startsWith("296")){
                         ProductNewPassStation productNewPassStation = new ProductNewPassStation();
                         UUID uuid = UUID.randomUUID();
                         productNewPassStation.setId(uuid.getMostSignificantBits());
@@ -438,8 +438,12 @@
                         productNewPassStation.setBoxCode(engineNo);
                         if (snCode.startsWith("280")){
                             productNewPassStation.setProductType("280");
-                        } else {
+                        } else if (snCode.startsWith("380")){
                             productNewPassStation.setProductType("380");
+                        } else if (snCode.startsWith("196")){
+                            productNewPassStation.setProductType("196");
+                        } else if (snCode.startsWith("296")){
+                            productNewPassStation.setProductType("296");
                         }
                         productNewPassStationService.insertPassStation(productNewPassStation);
                     }
diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/controller/DaTileMatchCollectionController.java b/jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/controller/DaTileMatchCollectionController.java
index 4a2b1c1..2eafc9f 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/controller/DaTileMatchCollectionController.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/controller/DaTileMatchCollectionController.java
@@ -146,53 +146,59 @@
         }
         String balanceSplit = "";
         String boxCodeSplit = "";
-//        ArrayList<String> xtList = ListUtil.toList(boxCode.split(";"));
-        ArrayList<String> xtList = ListUtil.toList(boxCode.split(","));
-        ArrayList<String> czList = ListUtil.toList(balanceCode.split(";"));
-        if (CollUtil.isNotEmpty(xtList) && xtList.size()>1 &&
-                CollUtil.isNotEmpty(czList) && czList.size()>3){
-            boxCodeSplit = xtList.get(1);
-            balanceSplit = czList.get(2);
-        }
-        DaTileMatchRules daTileMatchRules = new DaTileMatchRules();
-        daTileMatchRules.setScanObject1("绠变綋");
-        daTileMatchRules.setScanObject2("骞宠 杞�");
-        daTileMatchRules.setProductSeries(productType);
-        List<DaTileMatchRules> allMatchRuleList = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules);
-        if (CollUtil.isNotEmpty(allMatchRuleList)){
-            char[] boxCodeCharArray = boxCodeSplit.toCharArray();
-            char[] balanceCodeCharArray = balanceSplit.toCharArray();
-            if (boxCodeCharArray.length>6 && balanceCodeCharArray.length>2){
-                if ("380".equals(productType)){
-                    for (int i = 1; i < 3; i++) {
-                        int finalI = i;
-                        List<DaTileMatchRules> collect = allMatchRuleList.stream().filter(x -> x.getAxisParameterNoPosition().equals(finalI + 5) &&
-                                        x.getNeckParameterPosition().equals(finalI + 1) &&
-                                        x.getAxisValue().equals(String.valueOf(boxCodeCharArray[finalI + 4])) &&
-                                        x.getNeckValue().equals(String.valueOf(balanceCodeCharArray[finalI])))
-                                .collect(Collectors.toList());
-                        if (CollUtil.isNotEmpty(collect)){
-                            DaTileMatchRules rules = collect.get(0);
-                            resultList.add(rules);
+        if ("380".equals(productType)){
+            //        ArrayList<String> xtList = ListUtil.toList(boxCode.split(";"));
+            ArrayList<String> xtList = ListUtil.toList(boxCode.split(","));
+            ArrayList<String> czList = ListUtil.toList(balanceCode.split(";"));
+            if (CollUtil.isNotEmpty(xtList) && xtList.size()>1 &&
+                    CollUtil.isNotEmpty(czList) && czList.size()>3){
+                boxCodeSplit = xtList.get(1);
+                balanceSplit = czList.get(2);
+            }
+            DaTileMatchRules daTileMatchRules = new DaTileMatchRules();
+            daTileMatchRules.setScanObject1("绠变綋");
+            daTileMatchRules.setScanObject2("骞宠 杞�");
+            daTileMatchRules.setProductSeries(productType);
+            List<DaTileMatchRules> allMatchRuleList = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules);
+            if (CollUtil.isNotEmpty(allMatchRuleList)){
+                char[] boxCodeCharArray = boxCodeSplit.toCharArray();
+                char[] balanceCodeCharArray = balanceSplit.toCharArray();
+                if (boxCodeCharArray.length>6 && balanceCodeCharArray.length>2){
+                    if ("380".equals(productType)){
+                        for (int i = 1; i < 3; i++) {
+                            int finalI = i;
+                            List<DaTileMatchRules> collect = allMatchRuleList.stream().filter(x -> x.getAxisParameterNoPosition().equals(finalI + 5) &&
+                                            x.getNeckParameterPosition().equals(finalI + 1) &&
+                                            x.getAxisValue().equals(String.valueOf(boxCodeCharArray[finalI + 4])) &&
+                                            x.getNeckValue().equals(String.valueOf(balanceCodeCharArray[finalI])))
+                                    .collect(Collectors.toList());
+                            if (CollUtil.isNotEmpty(collect)){
+                                DaTileMatchRules rules = collect.get(0);
+                                resultList.add(rules);
+                            }
                         }
                     }
                 }
             }
-        }
-        if (CollUtil.isEmpty(resultList)){
-            return R.fail("鏈尮閰嶅埌骞宠 杞寸摝");
-        } else {
-            ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP040.CodeComplete", 1);
-            miloService.writeToOpcByte(entity6);
-            ProductNewPassStation passStation = new ProductNewPassStation();
-            passStation.setProductType(productType);
-            passStation.setBoxCode(boxCode);
-            List<ProductNewPassStation> productPassStationList = productNewPassStationService.getProductPassStationList(passStation);
-            if (CollUtil.isNotEmpty(productPassStationList)){
-                ProductNewPassStation newPassStation = productPassStationList.get(0);
-                productNewPassStationMapper.updatePassStationBalanceCode(newPassStation.getSfcCode(),balanceCode);
+            if (CollUtil.isEmpty(resultList)){
+                return R.fail("鏈尮閰嶅埌骞宠 杞寸摝");
+            } else {
+                ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP040.CodeComplete", 1);
+                miloService.writeToOpcByte(entity6);
+                ProductNewPassStation passStation = new ProductNewPassStation();
+                passStation.setProductType(productType);
+                passStation.setBoxCode(boxCode);
+                List<ProductNewPassStation> productPassStationList = productNewPassStationService.getProductPassStationList(passStation);
+                if (CollUtil.isNotEmpty(productPassStationList)){
+                    ProductNewPassStation newPassStation = productPassStationList.get(0);
+                    productNewPassStationMapper.updatePassStationBalanceCode(newPassStation.getSfcCode(),balanceCode);
+                }
             }
+        } else if ("196".equals(productType)) {
+//            ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP040.CodeComplete", 1);
+//            miloService.writeToOpcByte(entity6);
         }
+
         return R.ok(resultList);
     }
 
diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
index 8de6c6f..5be6644 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -17,6 +17,7 @@
 import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo;
 import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService;
 import com.jcdm.main.webservice.service.ReceivingServices;
+import com.kangaroohy.milo.model.ReadWriteEntity;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -25,6 +26,7 @@
 import javax.servlet.http.HttpServletResponse;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
 import java.util.stream.Collectors;
diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
index 3b3b98f..2cb2892 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -127,6 +127,9 @@
                                         passingStationCollectionServiceImpl.sendMessage(type+"*"+boxCode,"OP030");
                                     }
 
+                                } else if ("196".equals(type) || "296".equals(type)){
+                                    ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP030.CodeComplete", 1);
+                                    miloService.writeToOpcByte(entity6);
                                 }
                             }
 
@@ -266,7 +269,7 @@
                     //濡傛灉鏄�佽溅鍨嬶紝鍒ゆ柇鏄惁閲嶅鎵爜
                     if (OPCElement.OP050_CODE_CHECK.equals(Node)){
                         String type = productNewFlag(SNCode);
-                        if (!"280".equals(type) && !"380".equals(type)){
+                        if (!"280".equals(type) && !"380".equals(type) && !"196".equals(type) && !"296".equals(type) ){
                             DaPassingStationCollection passCheck = new DaPassingStationCollection();
                             passCheck.setSfcCode(SNCode);
                             passCheck.setLocationCode("OP060");
@@ -571,7 +574,7 @@
             //60鍙噰闆嗚�佽溅鍨�
             if (OPCElement.OP060_SAVE_REQUEST.equals(Node) || OPCElement.OP060_SAVE_REQUEST_LAST.equals(Node)){
                 String s = productNewFlag(SNCode);
-                if ("280".equals(s) || "380".equals(s)){
+                if ("280".equals(s) || "380".equals(s) || "196".equals(s) || "296".equals(s)){
                     list = new ArrayList<>();
                 }
             }
@@ -582,7 +585,7 @@
                     || OPCElement.OP100_SAVE_REQUEST_LAST.equals(Node)){
                 String s = productNewFlag(SNCode);
                 if (StrUtil.isNotEmpty(s)){
-                    if (!"280".equals(s) && !"380".equals(s)){
+                    if (!"280".equals(s) && !"380".equals(s) && !"196".equals(s)){
                         list = new ArrayList<>();
                     }
                 }
@@ -710,6 +713,10 @@
             type = "280";
         } else if (SNCode.startsWith("380")){
             type = "380";
+        } else if (SNCode.startsWith("196")){
+            type = "196";
+        } else if (SNCode.startsWith("296")){
+            type = "296";
         }else {
             type = "oldType";
         }
@@ -736,6 +743,20 @@
                 }
             } else if ("280".equals(productNewFlag)){
 
+            } else if ("196".equals(productNewFlag)){
+                ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP040.CodeComplete", 1);
+                miloService.writeToOpcByte(entity6);
+//                ProductNewPassStation passStation = new ProductNewPassStation();
+//                passStation.setSfcCode(SNCode);
+//                List<ProductNewPassStation> productPassStationList = productNewPassStationService.getProductPassStationList(passStation);
+//                if (CollUtil.isNotEmpty(productPassStationList)){
+//                    ProductNewPassStation productNewPassStation = productPassStationList.get(0);
+//                    String boxCode = productNewPassStation.getBoxCode();
+//                    String productType = productNewPassStation.getProductType();
+//                    log.info("鍙戦�佸埌OP040鐨勯〉闈㈡暟鎹畃roductType,{}",productType);
+//                    log.info("鍙戦�佸埌OP040鐨勯〉闈㈡暟鎹産oxCode,{}",boxCode);
+//                    passingStationCollectionServiceImpl.sendMessage(productType+"*"+boxCode, "OP040");
+//                }
             }
         }
     }
diff --git a/jcdm-ui/src/views/main/om/productionOrde/index.vue b/jcdm-ui/src/views/main/om/productionOrde/index.vue
index ce44092..b03d33e 100644
--- a/jcdm-ui/src/views/main/om/productionOrde/index.vue
+++ b/jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -310,6 +310,14 @@
         {
           label:"280",
           value:"280"
+        },
+        {
+          label:"196",
+          value:"196"
+        },
+        {
+          label:"296",
+          value:"296"
         }
       ],
       typeZDateRules: '',
diff --git a/jcdm-ui/src/views/main/pr/productResultReport/index.vue b/jcdm-ui/src/views/main/pr/productResultReport/index.vue
index f12c7e7..c51130f 100644
--- a/jcdm-ui/src/views/main/pr/productResultReport/index.vue
+++ b/jcdm-ui/src/views/main/pr/productResultReport/index.vue
@@ -111,7 +111,7 @@
         state: null,
         paramName: null,
         unit: null,
-        type: '宸ヤ綅浜у搧缁撴灉',
+        type: '',
         startDate: null,
         endDate: null,
         dateConditions: [],
@@ -175,7 +175,7 @@
         state: null,
         paramName: null,
         unit: null,
-        type: '宸ヤ綅浜у搧缁撴灉',
+        type: '',
       };
       this.resetForm("form");
     },

--
Gitblit v1.9.3