From 04ef1a453d35fab8742f185a33d2659f623b038c Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <xltys1995>
Date: 星期二, 22 二月 2022 16:32:12 +0800
Subject: [PATCH] Merge branch 'xgmwcs' of http://47.97.1.152:5880/r/zy-wcs into xgmwcs
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 20 +++++++++++++++++---
src/main/java/com/zy/asrs/mapper/WrkMastMapper.java | 2 +-
src/main/resources/mapper/WrkMastMapper.xml | 2 +-
src/main/resources/application.yml | 5 +++--
4 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java b/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java
index d767828..604c778 100644
--- a/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java
+++ b/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java
@@ -35,7 +35,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("workNo")Integer workNo);
+ WrkMast selectPickStep(@Param("barcode")String barcode);
// 鍑哄簱绗竴姝ワ紝浠庡簱浣嶅埌鍫嗗灈鏈哄嚭搴撶珯
// @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 80947ba..a0c3c1e 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -303,6 +303,21 @@
for (DevpSlave devp : slaveProperties.getDevp()) {
// 閬嶅巻鎷f枡鍏ュ簱鍙�
for (DevpSlave.Sta pickSta : devp.getPickSta()) {
+ // 鑾峰彇鏉$爜鎵弿浠俊鎭�
+ 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;
+ }
+
// 鑾峰彇鎷f枡鍏ュ簱绔欎俊鎭�
DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
StaProtocol staProtocol = devpThread.getStation().get(pickSta.getStaNo());
@@ -311,9 +326,8 @@
} else {
staProtocol = staProtocol.clone();
}
- if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable()
- && staProtocol.getWorkNo() > 0 && staProtocol.isPakMk()){
- WrkMast wrkMast = wrkMastMapper.selectPickStep(staProtocol.getWorkNo().intValue());
+ if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk()){
+ WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode);
if (wrkMast == null) {
// 鏃犳嫞鏂欐暟鎹�
continue;
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 65187d2..3c687bd 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -180,7 +180,8 @@
staNo: 182
# 鎷f枡鍏ュ簱鍙�
pickSta[0]:
- staNo: 172
+ staNo: 173
+ barcode: ${wcs-slave.barcode[0].id}
# 鏉$爜鎵弿浠�
barcode[0]:
id: 1
@@ -199,4 +200,4 @@
ip: 10.10.10.61
port: 5005
devpPlcId: ${wcs-slave.devp[0].id}
- staArr: 182
\ No newline at end of file
+ staArr: 182
diff --git a/src/main/resources/mapper/WrkMastMapper.xml b/src/main/resources/mapper/WrkMastMapper.xml
index 80f8e83..ee26d24 100644
--- a/src/main/resources/mapper/WrkMastMapper.xml
+++ b/src/main/resources/mapper/WrkMastMapper.xml
@@ -96,7 +96,7 @@
</select>
<select id="selectPickStep" resultMap="BaseResultMap">
- 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)
+ select top 1 * from asr_wrk_mast where barcode=#{barcode} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)
</select>
<select id="selectPakOutStep1" resultMap="BaseResultMap">
--
Gitblit v1.9.1