From 9ec865af4254180c6f47c85a2ef04dd46f4ca1c4 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期日, 18 八月 2024 16:57:25 +0800
Subject: [PATCH] 一楼贴标机获取数据

---
 src/main/java/com/zy/asrs/task/handler/GhjtHandler.java |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/handler/GhjtHandler.java b/src/main/java/com/zy/asrs/task/handler/GhjtHandler.java
index 5fa560d..215b615 100644
--- a/src/main/java/com/zy/asrs/task/handler/GhjtHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/GhjtHandler.java
@@ -19,6 +19,7 @@
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -58,9 +59,9 @@
         // 鏋勯�犺姹備綋
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("workNo", wrkMast.getWrkNo());
-        jsonObject.put("staNo", wrkMast.getStaNo());
+        jsonObject.put("staNo", wrkMast.getIoType() == 3 ? 3013 :wrkMast.getStaNo());
         jsonObject.put("barcode", wrkMast.getBarcode());
-        jsonObject.put("sourceStaNo", wrkMast.getSourceStaNo());
+        jsonObject.put("sourceStaNo", wrkMast.getIoType() == 3 ? wrkMast.getStaNo() : wrkMast.getSourceStaNo());
         jsonObject.put("descFlag", descFlag); // 101鍑哄簱鏃剁敤锛�0鍙湁涓�鏉¤矾寰勶紝1鐞嗚揣璐存爣璺緞锛�2璐存爣鎵撳甫璺緞
         String body = jsonObject.toJSONString();
 
@@ -78,6 +79,10 @@
                 wrkMast.setWrkSts(2L); // 鏇存柊涓鸿澶囦笂璧�
                 if (wrkMast.getIoType() == 110) { // 绌烘墭鐩樺嚭搴撶洿鎺ュ畬鎴愪换鍔�
                     wrkMast.setWrkSts(14L);
+                } else if (wrkMast.getIoType() == 3) {
+                    // 淇敼宸ヤ綔涓绘。鐘舵��
+                    wrkMast.setWrkSts(15L);
+                    wrkMast.setModiTime(new Date());
                 }
                 wrkMastMapper.updateById(wrkMast);
                 success = true;

--
Gitblit v1.9.1