From 16b5ee9a6db2f21192d435dbf3dab71b5fad7804 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期日, 14 四月 2024 19:34:48 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java | 53 ++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 42 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
index 6dfd117..03ff560 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
@@ -42,6 +42,8 @@
private AgvLocDetlService agvLocDetlService;
@Autowired
private AgvWrkMastService agvWrkMastService;
+ @Autowired
+ private AgvWorkService agvWorkService;
/*
@@ -53,11 +55,12 @@
if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
throw new CoolException(BaseRes.PARAM);
}
+ param.setContainerType(Short.valueOf(param.getBarcode().substring(0,2)));
- //妫�鏌ユ槸鍚﹀凡瀛樺湪鐩稿悓鐨勬墭鐩樻潯鐮侊紝瀛樺湪鍒欐姏鍑哄紓甯�
- if (agvWaitPakinService.selectCount(new EntityWrapper<AgvWaitPakin>().eq("supp_code", param.getBarcode())) > 0) {
- throw new CoolException(param.getBarcode() + "鏂欐兂鐮佸凡瀛樺湪AGV鍏ュ簱閫氱煡妗d腑");
- }
+// //妫�鏌ユ槸鍚﹀凡瀛樺湪鐩稿悓鐨勬墭鐩樻潯鐮侊紝瀛樺湪鍒欐姏鍑哄紓甯�
+// if (agvWaitPakinService.selectCount(new EntityWrapper<AgvWaitPakin>().eq("supp_code", param.getBarcode())) > 0) {
+// throw new CoolException(param.getBarcode() + "鏂欐兂鐮佸凡瀛樺湪AGV鍏ュ簱閫氱煡妗d腑");
+// }
//妫�鏌ュ簱瀛樻槸鍚︽湁鐩稿悓鏂欑锛屽瓨鍦ㄥ垯鎶涘嚭寮傚父
if(!Cools.isEmpty(agvLocDetlService.selectOne(new EntityWrapper<AgvLocDetl>().eq("supp_code",param.getBarcode())))){
@@ -80,7 +83,7 @@
if(StringUtils.isEmpty(param.getLocno())){
return "缁勬墭鎴愬姛";
}else {
- combBinding(param.getBarcode(),param.getLocno());
+ combBinding(param.getBarcode(),param.getLocno(),param.getContainerType());
return "缁勬墭鎴愬姛锛岀粦瀹氱珯鐐规垚鍔�";
}
@@ -136,10 +139,10 @@
checkOrderQty(order,combMat);
}
- DetlDto detlDto = new DetlDto(combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(), combMat.getIsoseq(),combMat.getContainerCode());
+ DetlDto detlDto = new DetlDto(combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(), combMat.getIsoseq(),combMat.getContainerCode(),param.getLocType());
//鍚屼竴鎵樼洏涓嬬浉鍚岀墿鏂欎俊鎭拰鎵瑰彿杞负涓�涓叆搴撻�氱煡妗�
if (DetlDto.has(detlDtos, detlDto)) {
- DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(), detlDto.getCsocode(), detlDto.getIsoseq(),null);
+ DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(), detlDto.getCsocode(), detlDto.getIsoseq(),detlDto.getContainerCode());
assert one != null;
one.setAnfme(one.getAnfme() + detlDto.getAnfme());
} else {
@@ -191,6 +194,8 @@
//閿�鍞鍗曡鍙�
waitPakin.setDeadTime(detlDto.getIsoseq());
+ waitPakin.setLocType(detlDto.getLocType());
+
waitPakin.setAppeUser(userId);
waitPakin.setAppeTime(now);
@@ -215,28 +220,38 @@
}
@Override
- public void combBinding(String barcode, String stationCode) {
+ public void combBinding(String barcode, String stationCode, Short containerType) {
+
+ AgvBasDevp agvBasDevp = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("dev_no", stationCode));
+
+ if(Cools.eq(agvBasDevp.getBarcode(),barcode)){
+ return;
+ }
if(Cools.isEmpty(agvWaitPakinService.selectByContainerCode(barcode))){
throw new CoolException("璇ユ枡绠辨湭缁勬墭锛屾棤娉曠粦瀹氱珯鐐�");
}
- AgvBasDevp agvBasDevp = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("barcode", barcode));
+ AgvBasDevp agvBasDevp1 = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("barcode", barcode));
- if(!Cools.isEmpty(agvBasDevp)){
+ if(!Cools.isEmpty(agvBasDevp1)){
throw new CoolException(barcode + "宸茬粡缁戝畾鍦�"+ agvBasDevp.getDevNo() +"绔欑偣");
}
- agvBasDevp = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("dev_no",stationCode));
if(agvBasDevp == null){
throw new CoolException(stationCode + "绔欑偣淇℃伅閿欒");
}
if(!"O".equals(agvBasDevp.getLocSts())){
throw new CoolException(stationCode + "璇ョ珯鐐硅揣浣嶇姸鎬侀潪绌�");
}
+ AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("loc_no", agvBasDevp.getDevNo()));
+ if(!Cools.isEmpty(agvWrkMast)){
+ throw new CoolException(stationCode + "璇ョ珯鐐瑰凡琚伐浣滃彿涓�" + agvWrkMast.getWrkNo() + "鍗犵敤锛屾棤娉曠粦瀹�");
+ }
agvBasDevp.setBarcode(barcode);
agvBasDevp.setLocSts("F");
+ agvBasDevp.setLocType2(containerType);
agvBasDevpService.update(agvBasDevp,(new EntityWrapper<AgvBasDevp>().eq("dev_no",stationCode)));
}
@@ -249,4 +264,20 @@
}).collect(Collectors.toList());
}
+ @Override
+ public void pakinEmpty(String devNo, boolean pakin) {
+ //褰撳墠绔欑偣淇℃伅
+ AgvBasDevp agvBasDevp = agvBasDevpService.selectById(devNo);
+ //瀵绘壘鐩稿悓绫诲瀷鐨勫簱浣�
+
+ //鐢熸垚绌虹洏宸ヤ綔妗�
+
+ //鏇存敼搴撲綅鐘舵�佷互鍙婄珯鐐圭姸鎬�
+ }
+
+ @Override
+ public void pakoutEmpty(String devNo) {
+
+ }
+
}
--
Gitblit v1.9.1