From b5fcd8d51443fda9e7506f31d157e6faa7e1d56c Mon Sep 17 00:00:00 2001
From: 懒羊羊 <15939171744@163.com>
Date: 星期一, 08 四月 2024 16:55:37 +0800
Subject: [PATCH] -

---
 jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java                                  |   27 ++++++++-----
 jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java |    8 ++-
 jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java                                     |   22 ++++++-----
 jcdm-ui/src/views/main/kb/stationTerminal/index.vue                                                   |    4 +-
 jcdm-admin/src/main/resources/application-druid.yml                                                   |    6 ++-
 jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java                            |    2 
 6 files changed, 41 insertions(+), 28 deletions(-)

diff --git a/jcdm-admin/src/main/resources/application-druid.yml b/jcdm-admin/src/main/resources/application-druid.yml
index f169701..a820d91 100644
--- a/jcdm-admin/src/main/resources/application-druid.yml
+++ b/jcdm-admin/src/main/resources/application-druid.yml
@@ -17,9 +17,11 @@
             # 涓诲簱鏁版嵁婧�
             master:
 #                url: jdbc:sqlserver://192.168.0.189:1433;DataBaseName=Jcdm042-Mes
-                url: jdbc:sqlserver://183.134.244.158:1433;DataBaseName=Jcdm042-Mes
+#                url: jdbc:sqlserver://183.134.244.158:1433;DataBaseName=Jcdm042-Mes
+                url: jdbc:sqlserver://127.0.0.1:1433;DataBaseName=Jcdm042-Mes
                 username: sa
-                password: JCDM@2023
+#                password: JCDM@2023
+                password: admin@123
             # 浠庡簱鏁版嵁婧�
             slave:
                 # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴
diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
index c9cde25..1023a88 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
@@ -147,8 +147,9 @@
         BsFormulaChildInfo checkInfo = new BsFormulaChildInfo();
         checkInfo.setProcessesCode(bsFormulaChildInfo.getLocationCode());
         checkInfo.setProductCode(bsFormulaChildInfo.getProductCode());
-        bsFormulaChildInfo.setMaterialCode(bsFormulaChildInfo.getScanBarcode().substring(1,2));
-        List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(bsFormulaChildInfo);
+        checkInfo.setMaterialCode(bsFormulaChildInfo.getScanBarcode().substring(1,2));
+//        bsFormulaChildInfo.setMaterialCode(bsFormulaChildInfo.getScanBarcode().substring(1,2));
+        List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(checkInfo);
         if(bsFormulaChildInfos.size()>0){
             bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getScanBarcode());
             bsFormulaChildInfos.get(0).setResults("OK");
@@ -185,6 +186,7 @@
     public AjaxResult updateTighteningFormula(BsFormulaChildInfo bsFormulaChildInfo) {
         BsFormulaChildInfo listQuery = new BsFormulaChildInfo();
         listQuery.setParamCode(bsFormulaChildInfo.getParamCode());
+        listQuery.setOperationType("1");
         String paramCode = bsFormulaChildInfo.getTightenTheArray();
         if(paramCode.contains("N")){
             List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery);
@@ -208,7 +210,7 @@
 //                        List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection);
 //                        daPassingStationCollections.get(0).setOutboundTime(new Date());
 //                        daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0));
-                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("OP."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build());
+                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build());
                         WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "OUT");
                     } catch (Exception e) {
                         throw new RuntimeException(e);
diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
index 0013221..22104fd 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -52,16 +52,18 @@
      */
     public List<String> getSubList(){
         List<String> lists = new ArrayList<>();
-        lists.add(OPCElement.OP_OP010_RecordSN);//璇锋眰涓嬪彂SN鍙�
-        lists.add(OPCElement.OP_OP230_RecordData);//璇锋眰璁板綍鏁版嵁
-        lists.add(OPCElement.OP_OP240_RecordData);//璇锋眰璁板綍鏁版嵁
-        lists.add(OPCElement.OP_OP240_AngleResult);//璇锋眰璁板綍鏁版嵁
-        lists.add(OPCElement.OP_OP250_RecordData);//璇锋眰璁板綍鏁版嵁
-        lists.add(OPCElement.OP_OP250_AngleResult);//璇锋眰璁板綍鏁版嵁
-        lists.add(OPCElement.OP_OP380_RecordData);//璇锋眰璁板綍鏁版嵁
-        lists.add(OPCElement.OP_OP380_AngleResult);//璇锋眰璁板綍鏁版嵁
-        lists.add(OPCElement.OP_OP300_RecordData);//璇锋眰璁板綍鏁版嵁
-        lists.add(OPCElement.OP_OP300_AngleResult);//璇锋眰璁板綍鏁版嵁
+        lists.add(OPCElement.PACK_OP010_RecordSN);//璇锋眰涓嬪彂SN鍙�
+        lists.add(OPCElement.PACK_OP230_RecordData);//璇锋眰璁板綍鏁版嵁
+        lists.add(OPCElement.PACK_OP240_RecordData);//璇锋眰璁板綍鏁版嵁
+        lists.add(OPCElement.PACK_OP240_AngleResult);//璇锋眰璁板綍鏁版嵁
+        lists.add(OPCElement.PACK_OP250_RecordData);//璇锋眰璁板綍鏁版嵁
+        lists.add(OPCElement.PACK_OP250_AngleResult);//璇锋眰璁板綍鏁版嵁
+        lists.add(OPCElement.PACK_OP380_RecordData);//璇锋眰璁板綍鏁版嵁
+        lists.add(OPCElement.PACK_OP380_AngleResult);//璇锋眰璁板綍鏁版嵁
+        lists.add(OPCElement.PACK_OP300_RecordData);//璇锋眰璁板綍鏁版嵁
+        lists.add(OPCElement.PACK_OP300_AngleResult);//璇锋眰璁板綍鏁版嵁
+        lists.add(OPCElement.PACK_OP270_RecordData);//璇锋眰璁板綍鏁版嵁
+        lists.add(OPCElement.PACK_OP270_AngleResult);//璇锋眰璁板綍鏁版嵁
         return lists;
     }
 }
diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java
index 552b735..2b7fbf9 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java
@@ -10,36 +10,43 @@
     /**
      * OP230
      */
-    public static final String OP_OP010_RecordSN = "TestOP.OP1010.RecordSN";//璇锋眰涓嬪彂SN鍙�
-    public static final String OP_OP230_RecordData = "OP.OP230.RecordData";//璇锋眰璁板綍鏁版嵁
+    public static final String PACK_OP010_RecordSN = "PACK.OP1010.RecordSN";//璇锋眰涓嬪彂SN鍙�
+    public static final String PACK_OP230_RecordData = "PACK.OP230.RecordData";//璇锋眰璁板綍鏁版嵁
 
     /**
      * OP240
      */
-    public static final String OP_OP240_RecordData = "OP.OP240.RecordData";//璇锋眰璁板綍鏁版嵁
+    public static final String PACK_OP240_RecordData = "PACK.OP240.RecordData";//璇锋眰璁板綍鏁版嵁
 
-    public static final String OP_OP240_AngleResult = "OP.OP240.AngleResult";//璇锋眰鎷х揣鏁版嵁
+    public static final String PACK_OP240_AngleResult = "PACK.OP240.AngleResult";//璇锋眰鎷х揣鏁版嵁
 
     /**
      * OP250
      */
-    public static final String OP_OP250_RecordData = "OP.OP250.RecordData";//璇锋眰璁板綍鏁版嵁
+    public static final String PACK_OP250_RecordData = "PACK.OP250.RecordData";//璇锋眰璁板綍鏁版嵁
 
-    public static final String OP_OP250_AngleResult = "OP.OP250.AngleResult";//璇锋眰鎷х揣鏁版嵁
+    public static final String PACK_OP250_AngleResult = "PACK.OP250.AngleResult";//璇锋眰鎷х揣鏁版嵁
 
     /**
      * OP380
      */
-    public static final String OP_OP380_RecordData = "OP.OP380.RecordData";//璇锋眰璁板綍鏁版嵁
+    public static final String PACK_OP380_RecordData = "PACK.OP380.RecordData";//璇锋眰璁板綍鏁版嵁
 
-    public static final String OP_OP380_AngleResult = "OP.OP380.AngleResult";//璇锋眰鎷х揣鏁版嵁
+    public static final String PACK_OP380_AngleResult = "PACK.OP380.AngleResult";//璇锋眰鎷х揣鏁版嵁
 
     /**
      * OP300
      */
-    public static final String OP_OP300_RecordData = "OP.OP300.RecordData";//璇锋眰璁板綍鏁版嵁
+    public static final String PACK_OP300_RecordData = "PACK.OP300.RecordData";//璇锋眰璁板綍鏁版嵁
 
-    public static final String OP_OP300_AngleResult = "OP.OP300.AngleResult";//璇锋眰鎷х揣鏁版嵁
+    public static final String PACK_OP300_AngleResult = "PACK.OP300.AngleResult";//璇锋眰鎷х揣鏁版嵁
+    /**
+     * OP270
+     */
+    public static final String PACK_OP270_RecordData = "PACK.OP270.RecordData";//璇锋眰璁板綍鏁版嵁
+
+    public static final String PACK_OP270_AngleResult = "PACK.OP270.AngleResult";//璇锋眰鎷х揣鏁版嵁
+
 
 
 
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 7be7645..7570daa 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
@@ -117,7 +117,7 @@
                 }
                 //淇濆瓨鎷х揣鏁版嵁
                 else if (("AngleResult").equals(tab)) {
-                    if("OK".equals(tabVlaue)||"NG".equals(tabVlaue)){
+                    if("1".equals(tabVlaue)||"2".equals(tabVlaue)){
                         List<String> list = new ArrayList<>();
                         String[] suffixes = {"Torque", "Angle", "TorqueResult", "AngleResult"};
 
diff --git a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
index b3cd5fa..3d695cd 100644
--- a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
+++ b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -361,7 +361,7 @@
       },
       content: '',
       activeName: 'first',
-      url: "ws://192.168.10.40:8080/websocket/message/",
+      url: "ws://192.168.1.102:8080/websocket/message/",
       message: "",
       text_content: "",
       ws: null,
@@ -371,7 +371,7 @@
       input: "",
       keepReading: true,
       form1: {
-        baudRate: "9600",
+        baudRate: "115200",
         dataBits: "8",
         stopBits: "1",
         parity: "none",

--
Gitblit v1.9.3