From bf168eeba97e91ee1fe459090e2e8b8f4b9e0e59 Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期五, 28 七月 2023 16:41:17 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/entity/WaitPakin.java             |    5 ++
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   24 +++++++----
 src/main/java/com/zy/core/thread/MelsecCrnThread.java       |    9 ++++
 src/main/webapp/static/js/console.map.js                    |   69 ++++++++++++++++------------------
 4 files changed, 61 insertions(+), 46 deletions(-)

diff --git a/src/main/java/com/zy/asrs/entity/WaitPakin.java b/src/main/java/com/zy/asrs/entity/WaitPakin.java
index a18b5bf..21ad0cc 100644
--- a/src/main/java/com/zy/asrs/entity/WaitPakin.java
+++ b/src/main/java/com/zy/asrs/entity/WaitPakin.java
@@ -91,7 +91,7 @@
 
     @ApiModelProperty(value= "搴撲綅鍙�")
     @TableField("loc_no")
-    private Date locNo;
+    private String locNo;
 
     @ApiModelProperty(value= "鐘舵��")
     private String status;
@@ -134,6 +134,9 @@
     @TableField("appe_user")
     private Long appeUser;
 
+    @ApiModelProperty(value= "鎵瑰彿")
+    private String batch;
+
     public String getModiTime$(){
         if (Cools.isEmpty(this.modiTime)){
             return "";
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index e33f2c0..5bfa856 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -154,12 +154,11 @@
 //                        Thread.sleep(300);
 //                    }catch (Exception e){}
 
-                    String barcode = barcodeThread.getBarcode();
+                    //String barcode = barcodeThread.getBarcode();
+                    String barcode = "20000005";
                     if(!Cools.isEmpty(barcode)) {
                         News.info(""+mark+" - 1"+" - {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
-                        if(staProtocol.getStamp()<2){
-                            continue;
-                        }
+
                         if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) {
                             staProtocol.setWorkNo((short) 9999);
                             staProtocol.setStaNo(inSta.getBackSta().shortValue());
@@ -175,9 +174,6 @@
                             continue;
                         }
                     } else {
-                        if(staProtocol.getStamp()<2){
-                            continue;
-                        }
                         staProtocol.setWorkNo((short) 9999);
                         staProtocol.setStaNo(inSta.getBackSta().shortValue());
                         devpThread.setPakMk(staProtocol.getSiteId(), false);
@@ -454,9 +450,16 @@
                         Integer staNo = staDesc.getCrnStn();
                         // 鏇存柊宸ヤ綔妗f暟鎹姸鎬�
                         wrkMast.setIoTime(now);
-                        wrkMast.setIoType(wrkMast.getIoType() - 50); // 鍏ュ嚭搴撶被鍨�: 103->53,104->54,107->57
+                        //鐩樼偣鍏ュ簱鏃讹紝鏈夌粍鎵樻暟鎹紝鐩樼偣杞苟鏉垮叆搴�
+                        List<WaitPakin> waitPakins=waitPakinMapper.selectList(new EntityWrapper<WaitPakin>()
+                                .eq("barcode",barcode));
+                        if(!Cools.isEmpty(waitPakins)){
+                            wrkMast.setIoType(54);
+                        }else{
+                            wrkMast.setIoType(wrkMast.getIoType() - 50); // 鍏ュ嚭搴撶被鍨�: 103->53,104->54,107->57
+                        }
                         wrkMast.setWrkSts(2L); // 宸ヤ綔鐘舵��: 2.璁惧涓婅蛋
-                        wrkMast.setSourceStaNo(wrkMast.getStaNo()); // 婧愮珯
+                        wrkMast.setSourceStaNo(100); // 婧愮珯
                         wrkMast.setStaNo(staNo); // 鐩爣绔�
                         wrkMast.setLocNo(wrkMast.getSourceLocNo()); // 鐩爣搴撲綅 = 鍑哄簱鏃剁殑婧愬簱浣�
                         wrkMast.setSourceLocNo(""); // 婧愬簱浣嶆竻绌�
@@ -464,6 +467,9 @@
                         if (wrkMastMapper.updateById(wrkMast) == 0) {
                             throw new CoolException("鏇存柊宸ヤ綔妗f暟鎹姸鎬佸け璐�");
                         }
+
+
+
                         // 鏇存柊鏄庣粏妗o_time (鍘嗗彶妗e叧鑱斾娇鐢級
                         wrkDetlService.updateIoTime(wrkMast.getWrkNo(), now);
                         // 淇敼搴撲綅鐘舵�� Q.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴�
diff --git a/src/main/java/com/zy/core/thread/MelsecCrnThread.java b/src/main/java/com/zy/core/thread/MelsecCrnThread.java
index fb24a86..811ec57 100644
--- a/src/main/java/com/zy/core/thread/MelsecCrnThread.java
+++ b/src/main/java/com/zy/core/thread/MelsecCrnThread.java
@@ -473,4 +473,13 @@
 
     }
 
+    @Override
+    public void setCmdFlag(boolean flag) {
+
+    }
+
+    @Override
+    public boolean isCmdFlag() {
+        return false;
+    }
 }
diff --git a/src/main/webapp/static/js/console.map.js b/src/main/webapp/static/js/console.map.js
index 0b49139..a686b78 100644
--- a/src/main/webapp/static/js/console.map.js
+++ b/src/main/webapp/static/js/console.map.js
@@ -78,42 +78,39 @@
             "height": 23
         }
     ],
-    "crns": [
-        {
-            "type": "crane",
-            "id": "crn-2",
-            "text": "2",
-            "top": 336,
-            "left": 606,
-            "width": 93,
-            "height": 22
-        },
-        {
-            "type": "track",
-            "id": "lb_track2",
-            "text": "",
-            "top": 347,
-            "left": 386,
-            "width": 943,
-            "height": 2
-        },
-        {
-            "type": "crane",
-            "id": "crn-1",
-            "text": "1",
-            "top": 199,
-            "left": 606,
-            "width": 93,
-            "height": 22
-        },
-        {
-            "type": "track",
-            "id": "lb_track1",
-            "text": "",
-            "top": 210,
-            "left": 386,
-            "width": 943,
-            "height": 2
+    "crns": [{
+        "type": "crane",
+        "id": "crn-1",
+        "text": "1",
+        "top": 199,
+        "left": 606,
+        "width": 93,
+        "height": 22
+    },
+    {
+        "type": "crane",
+        "id": "crn-2",
+        "text": "2",
+        "top": 336,
+        "left": 606,
+        "width": 93,
+        "height": 22
+    },{
+        "type": "track",
+        "id": "lb_track1",
+        "text": "",
+        "top": 210,
+        "left": 386,
+        "width": 943,
+        "height": 2
+    }, {
+        "type": "track",
+        "id": "lb_track2",
+        "text": "",
+        "top": 347,
+        "left": 386,
+        "width": 943,
+        "height": 2
         }
     ],
     "areas": [

--
Gitblit v1.9.1