From 8d6e78cdcc5d299babd799b2e98aafaf83ea7d79 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 27 九月 2022 15:02:15 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 31 +++++++++++++++++--------------
src/main/java/com/zy/asrs/mapper/WrkMastMapper.java | 2 +-
src/main/resources/mapper/WrkMastMapper.xml | 2 +-
3 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java b/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java
index a6a6c5e..f105ded 100644
--- a/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java
+++ b/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java
@@ -39,7 +39,7 @@
// 鎷f枡鍐嶅叆搴撴椂锛岀珯鐐规湁鐗╀笖闇�姹傛椂鏌ヨ
// @Select("select top 1 * from asr_wrk_mast where wrk_no=#{workNo} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)")
- WrkMast selectPickStep(@Param("barcode")String barcode);
+ WrkMast selectPickStep(@Param("wrkNo")Short wrkNo);
// 鍑哄簱绗竴姝ワ紝浠庡簱浣嶅埌鍫嗗灈鏈哄嚭搴撶珯
// @Select("select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc")
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 c19564c..c40662a 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -235,21 +235,21 @@
if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk()){
// 鑾峰彇鏉$爜鎵弿浠俊鎭�
- BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode());
- if (barcodeThread == null) {
- continue;
- }
- String barcode = barcodeThread.getBarcode();
- if(!Cools.isEmpty(barcode)) {
- log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", pickSta.getBarcode(), barcode);
- if("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
- continue;
- }
- } else {
- continue;
- }
+// BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode());
+// if (barcodeThread == null) {
+// continue;
+// }
+// String barcode = barcodeThread.getBarcode();
+// if(!Cools.isEmpty(barcode)) {
+// log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", pickSta.getBarcode(), barcode);
+// if("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
+// continue;
+// }
+// } else {
+// continue;
+// }
- WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode);
+ WrkMast wrkMast = wrkMastMapper.selectPickStep(staProtocol.getWorkNo());
if (wrkMast == null) {
// 鏃犳嫞鏂欐暟鎹�
continue;
@@ -293,6 +293,9 @@
if (wrkMastMapper.updateById(wrkMast) == 0) {
throw new CoolException("鏇存柊宸ヤ綔妗f暟鎹姸鎬佸け璐�");
}
+ if (wrkMastMapper.setSteEmpty(wrkMast.getWrkNo()) == 0) {
+// throw new CoolException("鏇存柊宸ヤ綔妗f暟鎹姸鎬佸け璐�");
+ }
// 淇敼搴撲綅鐘舵�� Q.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴�
LocMast locMast = locMastService.selectById(wrkMast.getLocNo());
locMast.setLocSts("Q");
diff --git a/src/main/resources/mapper/WrkMastMapper.xml b/src/main/resources/mapper/WrkMastMapper.xml
index 903c633..a1e3548 100644
--- a/src/main/resources/mapper/WrkMastMapper.xml
+++ b/src/main/resources/mapper/WrkMastMapper.xml
@@ -106,7 +106,7 @@
</select>
<select id="selectPickStep" resultMap="BaseResultMap">
- select top 1 * from asr_wrk_mast where barcode=#{barcode} and wrk_sts=17 and (io_type=103 or io_type=107 or io_type=104)
+ select top 1 * from asr_wrk_mast where wrk_no=#{wrkNo} and wrk_sts=17 and (io_type=103 or io_type=107 or io_type=104)
</select>
<select id="selectPakOutStep111215" resultMap="BaseResultMap">
--
Gitblit v1.9.1