From 2dac51421b0a90277a05188234f6ea954a4e204b Mon Sep 17 00:00:00 2001
From: dubin <bindu_bean@163.com>
Date: 星期四, 13 十一月 2025 17:34:52 +0800
Subject: [PATCH] 出库调整
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
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 3d31bb4..23ee297 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -24,6 +24,7 @@
import com.zy.common.utils.News;
import com.zy.core.CrnThread;
import com.zy.core.DevpThread;
+import com.zy.core.ThreadHandler;
import com.zy.core.cache.MessageQueue;
import com.zy.core.cache.SlaveConnection;
import com.zy.core.enums.*;
@@ -836,6 +837,9 @@
public synchronized void crnIoExecute(Integer mark) {
for (CrnSlave crn : slaveProperties.getCrn()) {
+ //鑾峰彇鍫嗗灈鏈哄嚭搴撶珯鐨勪笅涓�绔欎俊鎭�
+ SiemensDevpThread devpThread =(SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, crn.getId());
+ StaProtocol staProtocol = devpThread.getStation().get(1002);
// 鑾峰彇鍫嗗灈鏈轰俊鎭�
CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId());
CrnProtocol crnProtocol = crnThread.getCrnProtocol();
@@ -905,7 +909,7 @@
if (wrkMast.getIoType() >= 100) {
WrkMast wrkMast1 = wrkMastMapper.selectPakOutStep1(crn.getId(), wrkMast.getSourceStaNo());
if (wrkMast1 != null) {
- if (Integer.parseInt(wrkMast1.getSourceLocNo().substring(2,5)) == 1){
+ if (Integer.parseInt(wrkMast1.getSourceLocNo().substring(2,5)) == 1 || (staProtocol.isAutoing()&&staProtocol.isLoading())){
this.outPut(crn, crnProtocol, mark);
continue;
}
@@ -934,7 +938,7 @@
if (wrkMast.getIoType() >= 100) {
WrkMast wrkMast1 = wrkMastMapper.selectPakOutStep1(crn.getId(), wrkMast.getSourceStaNo());
if (wrkMast1 != null) {
- if (Integer.parseInt(wrkMast1.getSourceLocNo().substring(2,5)) == 29){
+ if (Integer.parseInt(wrkMast1.getSourceLocNo().substring(2,5)) == 29 || (staProtocol.isAutoing()&&staProtocol.isLoading())){
this.outPut(crn, crnProtocol, mark);
continue;
}
@@ -1200,6 +1204,8 @@
// 鑾峰彇鍫嗗灈鏈哄嚭搴撶珯淇℃伅
SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId());
StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo());
+ //鍫嗗灈鏈哄嚭搴撶珯鐐圭殑涓嬩竴绔�
+ StaProtocol staProtocol1 = devpThread.getStation().get(1002);
if (staProtocol == null) {
News.infoNoLog("" + mark + " - 2" + " - 3" + " - 鍫嗗灈鏈哄嚭搴撶珯淇℃伅(staProtocol!=null缁х画鎵ц,鍚﹀垯寰幆缁堟)锛歴taProtocol=" + staProtocol);
break;
@@ -1215,7 +1221,7 @@
break;
}
// 鍒ゆ柇鍫嗗灈鏈哄嚭搴撶珯鐘舵��
- if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) {
+ if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()&&staProtocol1.isAutoing()&&!staProtocol1.isLoading()) {
// 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
// 鍫嗗灈鏈烘帶鍒惰繃婊�
--
Gitblit v1.9.1