From 7e8c8abedab8d33ea5faff80545e566aa71306d6 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期二, 21 五月 2024 14:48:11 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/web/WcsController.java | 44 +++++++++++++++++++++++++------------------- 1 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/zy/common/web/WcsController.java b/src/main/java/com/zy/common/web/WcsController.java index 29030c7..e820586 100644 --- a/src/main/java/com/zy/common/web/WcsController.java +++ b/src/main/java/com/zy/common/web/WcsController.java @@ -21,7 +21,6 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; -import java.io.IOException; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; @@ -591,14 +590,12 @@ if(Cools.isEmpty(agvBasDevp) || !"O".equals(agvBasDevp.getLocSts())){ throw new CoolException("褰撳墠绔欑偣涓嶅瓨鍦ㄦ垨鑰呯珯鐐逛笉涓虹┖"); } - - AgvWaitPakin agvWaitPakin = agvWaitPakinService.selectByContainerCode(containerCode); AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", containerCode)); //鎷f枡銆佺洏鐐瑰畬鎴愪换鍔� if(!Cools.isEmpty(agvWrkMast) && (agvWrkMast.getIoType() == 103 || agvWrkMast.getIoType() == 107) && agvWrkMast.getWrkSts() == 205){ //缁戝畾绔欑偣 - agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"F",containerCode); + agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"F",containerCode,agvWrkMast.getWhsType().shortValue()); //鐢熸垚鎷f枡銆佺洏鐐瑰啀鍏ュ簱浠诲姟 List<AgvWrkMast> agvWrkMastList = new ArrayList<>(); @@ -613,7 +610,7 @@ //鍏ュ簱浠诲姟 if (!Cools.isEmpty(agvWaitPakinService.selectByContainerCode(containerCode))){ //缁戝畾绔欑偣 - agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"F",containerCode); + agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"F",containerCode,agvWrkMast.getWhsType().shortValue()); //鐢熸垚宸ヤ綔妗� List<AgvBasDevp> agvBasDevpList = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>().eq("dev_no", param.getDevNo())); agvWorkService.createWaitPainWrkMastStart(agvBasDevpList, null, true); @@ -633,7 +630,8 @@ currentContainerMap = new HashMap<>(); } - String containerCode = param.getContainerCode(); + String containerCode = param.getContainerCode().split(";")[0]; + if(Cools.isEmpty(containerCode)){ throw new CoolException("鏂欑鐮佷负绌�"); } @@ -651,19 +649,22 @@ //鏌ヨ鏃у鍣ㄧ殑宸ヤ綔妗� AgvWrkMast agvWrkMast = agvWrkMastService.selectByContainerCode(currentContainerCode); if(!Cools.isEmpty(agvWrkMast) && agvWrkMast.getIoType() == 101){ - //鍙戦�佸鍣ㄧ珛鍦鸿姹傦紝瀹屾垚宸ヤ綔妗� - List<AgvWrkMast> agvWrkMastList = new ArrayList<>(); - agvWrkMastList.add(agvWrkMast); - try { - int code = agvWrkMastService.containerMoveOut(agvWrkMastList); - if(code == 0){ - //灏嗗伐浣滃厷鐘舵�佹敼涓哄鍣ㄧ鍦� - agvWrkMast.setWrkSts(206L); - agvWrkMastService.updateById(agvWrkMast); - } - } catch (IOException e) { - log.error(e.getMessage()); - } + //灏嗗伐浣滃厷鐘舵�佹敼涓哄鍣ㄧ鍦� + agvWrkMast.setWrkSts(206L); + agvWrkMastService.updateById(agvWrkMast); +// //鍙戦�佸鍣ㄧ珛鍦鸿姹傦紝瀹屾垚宸ヤ綔妗� +// List<AgvWrkMast> agvWrkMastList = new ArrayList<>(); +// agvWrkMastList.add(agvWrkMast); +// try { +// int code = agvWrkMastService.containerMoveOut(agvWrkMastList); +// if(code == 0){ +// //灏嗗伐浣滃厷鐘舵�佹敼涓哄鍣ㄧ鍦� +// agvWrkMast.setWrkSts(206L); +// agvWrkMastService.updateById(agvWrkMast); +// } +// } catch (IOException e) { +// log.error(e.getMessage()); +// } } } @@ -717,6 +718,11 @@ agvBasDevpDto.setAgvWaitPakins(agvWaitPakinList); } + System.out.println("currentContainerMap: " + currentContainerMap); + + + System.out.println("agvBasDevpDto: " + agvBasDevpDto); + return R.ok(agvBasDevpDto); } -- Gitblit v1.9.1