From fd69e79dd9861681e31893d7941b39571f49dca4 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期五, 15 十二月 2023 16:24:55 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/model/protocol/StaProtocol.java | 11 ++---------
src/main/java/com/zy/asrs/controller/ConsoleController.java | 1 -
src/main/java/com/zy/core/model/DevpSlave.java | 4 ++++
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 28 +++++++++++++---------------
src/main/java/com/zy/asrs/domain/vo/SiteLatestDataVo.java | 3 ---
src/main/java/com/zy/common/model/SearchLocParam.java | 3 ---
src/main/java/com/zy/core/thread/SiemensDevpThread.java | 1 +
src/main/resources/application.yml | 6 ++++++
8 files changed, 26 insertions(+), 31 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/ConsoleController.java b/src/main/java/com/zy/asrs/controller/ConsoleController.java
index d2b5ed7..3fe1169 100644
--- a/src/main/java/com/zy/asrs/controller/ConsoleController.java
+++ b/src/main/java/com/zy/asrs/controller/ConsoleController.java
@@ -108,7 +108,6 @@
vo.setSiteId(String.valueOf(entry.getKey())); // 绔欑偣缂栧彿
vo.setWorkNo(staProtocol.getWorkNo()); // 宸ヤ綔鍙�
vo.setSiteStatus(SiteStatusType.process(staProtocol)); // 鐘舵��
- vo.setNearbySta(staProtocol.getNearbySta());
vos.add(vo);
}
return R.ok().add(vos);
diff --git a/src/main/java/com/zy/asrs/domain/vo/SiteLatestDataVo.java b/src/main/java/com/zy/asrs/domain/vo/SiteLatestDataVo.java
index 2677861..42f6a33 100644
--- a/src/main/java/com/zy/asrs/domain/vo/SiteLatestDataVo.java
+++ b/src/main/java/com/zy/asrs/domain/vo/SiteLatestDataVo.java
@@ -19,9 +19,6 @@
// 绔欑偣鐘舵��
private SiteStatusType siteStatus;
- // 闅斿绔欑偣锛堝彴杞︾壒鎬э級
- private String nearbySta;
-
public String getSiteStatus() {
return siteStatus.toString().toLowerCase().replaceAll("_", "-");
}
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 40ca887..0fb2f7d 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -179,7 +179,6 @@
param.setIoType(1);
param.setSourceStaNo(inSta.getStaNo());
param.setLocType1(locTypeDto.getLocType1());
- param.setFull(staProtocol.isFull());
String response = new HttpHandler.Builder()
.setUri(wmsUrl)
.setPath("/rpc/pakin/loc/v1")
@@ -2215,12 +2214,11 @@
* 鎵弿纰熺洏鏈鸿嚜鍔ㄥ叆搴撶┖鎵樼洏
*/
public synchronized void autoEmptyIn() {
- for (CrnSlave crnSlave : slaveProperties.getCrn()) {
- // 閬嶅巻绌烘澘鍏ュ簱鍙�
- for (CrnSlave.CrnStn emptyInStn : crnSlave.getEmptyCrnInStn()) {
+ for (DevpSlave slave : slaveProperties.getDevp()) {
+ for (DevpSlave.Sta sta : slave.getAutoEmptyIn()) {
// 鑾峰彇绌烘澘鍏ュ簱绔欎俊鎭�
- SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, emptyInStn.getDevpPlcId());
- StaProtocol staProtocol = devpThread.getStation().get(emptyInStn.getStaNo());
+ SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, slave.getId());
+ StaProtocol staProtocol = devpThread.getStation().get(sta.getStaNo());
if (staProtocol == null) {
continue;
} else {
@@ -2236,7 +2234,7 @@
SearchLocParam param = new SearchLocParam();
param.setIoType(10);
- param.setSourceStaNo(emptyInStn.getStaNo());
+ param.setSourceStaNo(sta.getStaNo());
param.setLocType1(locTypeDto.getLocType1());
String response = new HttpHandler.Builder()
.setUri(wmsUrl)
@@ -2263,7 +2261,6 @@
e.printStackTrace();
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
}
-
}
}
}
@@ -2273,10 +2270,10 @@
* 鎵弿鎷嗙洏鏈鸿嚜鍔ㄥ嚭搴撶┖鎵樼洏
*/
public synchronized void autoEmptyOut() {
- for (CrnSlave crnSlave : slaveProperties.getCrn()) {
- for (CrnSlave.CrnStn emptyOutStn : crnSlave.getEmptyCrnOutStn()) {
- DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, emptyOutStn.getDevpPlcId());
- StaProtocol staProtocol = devpThread.getStation().get(emptyOutStn.getStaNo());
+ for (DevpSlave slave : slaveProperties.getDevp()) {
+ for (DevpSlave.Sta sta : slave.getAutoEmptyOut()) {
+ DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, slave.getId());
+ StaProtocol staProtocol = devpThread.getStation().get(sta.getStaNo());
if (staProtocol == null) {
return;
} else {
@@ -2285,16 +2282,16 @@
if (staProtocol.isAutoing() //鑷姩
&& !staProtocol.isLoading() //鏃犵墿
- && staProtocol.isOutEnable() //鍙嚭淇″彿
+ && staProtocol.isEmptyPalletRequire() //绌烘墭鐩橀渶姹備俊鍙�
&& staProtocol.getWorkNo() == 0
) {
- WrkMast pakoutEmpty = wrkMastMapper.selectPakoutEmpty(emptyOutStn.getStaNo());
+ WrkMast pakoutEmpty = wrkMastMapper.selectPakoutEmpty(sta.getStaNo());
if (null != pakoutEmpty) {
return;
}
try {
HashMap<String, Object> map = new HashMap<>();
- map.put("crnNo", crnSlave.getId());
+ map.put("staNo", sta.getStaNo());//鐩爣绔�
String response = new HttpHandler.Builder()
.setUri(wmsUrl)
.setParams(map)
@@ -2314,6 +2311,7 @@
}
}
}
+
}
}
diff --git a/src/main/java/com/zy/common/model/SearchLocParam.java b/src/main/java/com/zy/common/model/SearchLocParam.java
index 022723a..159024e 100644
--- a/src/main/java/com/zy/common/model/SearchLocParam.java
+++ b/src/main/java/com/zy/common/model/SearchLocParam.java
@@ -15,9 +15,6 @@
private String barcode;
- // 鎵樼洏鏄彲鍚︽暣鍨�
- private boolean full;
-
// 搴撲綅瑙勬牸锛� 0:鏈煡, 1:浣庡簱浣�, 2:涓簱浣�, 3:楂樺簱浣� 锛�
private Short locType1;
diff --git a/src/main/java/com/zy/core/model/DevpSlave.java b/src/main/java/com/zy/core/model/DevpSlave.java
index e327301..a13cb76 100644
--- a/src/main/java/com/zy/core/model/DevpSlave.java
+++ b/src/main/java/com/zy/core/model/DevpSlave.java
@@ -27,6 +27,10 @@
private List<Sta> pickSta = new ArrayList<>();
+ private List<Sta> autoEmptyOut = new ArrayList<>();
+
+ private List<Sta> autoEmptyIn = new ArrayList<>();
+
@Data
public static class Sta {
diff --git a/src/main/java/com/zy/core/model/protocol/StaProtocol.java b/src/main/java/com/zy/core/model/protocol/StaProtocol.java
index 0fe3464..77594f4 100644
--- a/src/main/java/com/zy/core/model/protocol/StaProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/StaProtocol.java
@@ -55,14 +55,8 @@
// 閿佸畾鏍囪
private boolean pakMk = true;
- // 鍏ュ簱鏆傚瓨鏁�
- private Short inQty;
-
- // 闅斿绔欑偣锛堝彴杞︿綅缃級
- private String nearbySta;
-
- // 鎵樼洏鏄彲鍚︽暣鍨�
- private boolean full;
+ //绌烘墭鐩橀渶姹備俊鍙�
+ private boolean emptyPalletRequire;
public BasDevp toSqlModel(){
BasDevp basDevp = new BasDevp();
@@ -77,7 +71,6 @@
basDevp.setLocType3((short) 0); // 杞婚噸绫诲瀷{0:鏈煡,1:杞诲簱浣�,2:閲嶅簱浣峿
basDevp.setLocType1(high != low && low ? (short) 1 : (short) 2);
// basDevp.
- basDevp.setInQty(inQty !=null ?(int)inQty : 0);
return basDevp;
}
diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
index 3a5eaa5..98d4c33 100644
--- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -190,6 +190,7 @@
staProtocol.setFullPlt(status[5]); // 婊℃墭鐩�
staProtocol.setHigh(status[6]); // 楂樺簱浣�
staProtocol.setLow(status[7]); // 浣庡簱浣�
+ staProtocol.setEmptyPalletRequire(status[8]); // 绌烘墭鐩橀渶姹備俊鍙�
if (!staProtocol.isPakMk() && !staProtocol.isLoading()) {
staProtocol.setPakMk(true);
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 691b09e..f7fd301 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -178,6 +178,12 @@
barcode: ${wcs-slave.barcode[2].id}
backSta: 3012
led: ${wcs-slave.led[5].id}
+ # 鎷嗙洏鏈哄嚭绌烘墭
+ autoEmptyOut[0]:
+ staNo: 1007
+ # 鎷嗙洏鏈哄叆绌烘墭
+ autoEmptyIn[0]:
+ staNo: 1007
# RGV1
rgv[0]:
--
Gitblit v1.9.1