From 616068b49ed7ca709877a30d8abc56ecb6454218 Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期六, 14 九月 2024 21:00:30 +0800
Subject: [PATCH] 230优化

---
 jcdm-ui/src/views/main/kb/stationTerminal/index.vue                                                |   14 +++++++++-----
 jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java |    9 ++++++++-
 jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java                         |    2 ++
 3 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
index 8b0121b..4dfcc1e 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -10,6 +10,8 @@
 import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.jcdm.main.constant.Constants;
+import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo;
+import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService;
 import com.kangaroohy.milo.model.ReadWriteEntity;
 import com.kangaroohy.milo.service.MiloService;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -43,6 +45,9 @@
 {
     @Autowired
     private IBsFormulaChildInfoService bsFormulaChildInfoService;
+
+    @Autowired
+    private IOmProductionOrdeInfoService omProductionOrdeInfoService;
 
     @Autowired
     private MiloService miloService;
@@ -113,11 +118,13 @@
             String str = thoroughfare+"."+bsFormulaChildInfo.getProcessesCode()+".MESScrew";
             miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(stepNumber).build());//鎷х揣姝ラ
             if("OP230".equals(bsFormulaChildInfo.getProcessesCode())){
+                List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.list(new LambdaQueryWrapper<OmProductionOrdeInfo>().like(OmProductionOrdeInfo::getProductNum, bsFormulaChildInfo.getSfcBarcode()));
+                String sfcCode = list.get(0).getProductNum();
                 //鎵�鏈夎繘绔欏皢杩涚珯鏃堕棿鍐欑粰PLC
                 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                 String currentDate = dateFormat.format(new Date());
                 miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".StartTime").value(currentDate).build());
-                miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".SNCode").value(bsFormulaChildInfo.getSfcBarcode()).build());
+                miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".SNCode").value(sfcCode).build());
                 miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".RecordDataDone").value(11).build());
             }else if("OP220".equals(bsFormulaChildInfo.getProcessesCode())){
                 miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".RecordDataDone").value(11).build());
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 d151a22..298a5a5 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
@@ -185,10 +185,12 @@
                                             }
                                         }
                                         if(Constants.OP230.equals(device)){
+                                            WebSocketUsers.sendMessageToUserByText(map.get(device), "twoHundredAndThirtyEND");
                                             CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                                                 updateOrderStatus(snCode, "5","");//OP230宸ヤ綅鏇存柊宸ュ崟鐘舵�佷负宸插畬鎴�
                                                 reportFactoryMes(snCode, "OP240", format.format(new Date()));//宸ュ巶MES鎶ュ伐   //鏆傛椂 OP240宸ヤ綅杩樻病鏈夊ソ锛屽湪230鎶�240鐨勫伐
                                             });
+                                            miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".SNCode").value("").build());
                                         }
                                         if(result == 21){
                                             result = savePassingStation(thoroughfare, device, snCode, orderNumber, stationStatus);//淇濆瓨杩囩珯
diff --git a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
index 25cf3f2..a2a4073 100644
--- a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
+++ b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -125,7 +125,7 @@
                      <span>鏈�楂樿浆閫燂細</span><span>12000rpm</span><br>
                    </div>
                    <div style="margin-top: 4px">
-                     <span>闃叉姢绛夌骇锛�</span><span>IP68</span><br>
+                     <span>闃叉姢绛夌骇锛�</span><span>IP67</span><br>
                    </div>
                    <div style="margin-top: 4px">
                      <span>宄板�煎伐浣滅數娴侊細</span><span>230A</span><br>
@@ -153,15 +153,15 @@
 
                  </div>
                  <div style="margin-top: 4px">
-                   <span style="font-size: 22px">993083</span><br>
+                   <span style="font-size: 22px">993983</span><br>
 
                  </div>
                  <div style="margin-top: 4px">
-                   <span style="font-size: 22px">9900166410</span><br>
+                   <span style="font-size: 22px">9900200461</span><br>
 
                  </div>
                  <div style="margin-top: 4px">
-                   <span style="font-size: 22px">2407190000002</span>
+                   <span style="font-size: 22px">{{headContent.sfcCode}}</span>
 
                  </div>
                </div>
@@ -526,7 +526,9 @@
             this.headContent.processesCode === 'OP190'||
             this.headContent.processesCode === 'OP200'||
             this.headContent.processesCode === 'OP210'||
-            this.headContent.processesCode === 'OP220'){
+            this.headContent.processesCode === 'OP220'||
+            this.headContent.processesCode === 'OP230'
+          ){
             this.headContent.sfcCode = rowsData.productNum
           }
           this.workpieceInformation.workOrderNo = rowsData.workOrderNo;
@@ -650,6 +652,8 @@
           unfinishedProcess({processesCode: self.headContent.processesCode,recordDataDone: 21}).then(response => {});
         }else if (event.data === "IN") {
           self.cakeLamp.InPlace = 1;
+        }else if(event.data === "twoHundredAndThirtyEND"){
+          self.endClear()
         } else if (event.data === "OUT") {
           self.cakeLamp.release = 1;
         } else if (event.data === "END") {

--
Gitblit v1.9.3