From ef1a6adb261a5c30fed6361676dcd54cbbda02e4 Mon Sep 17 00:00:00 2001 From: tzsk <Administrator@qq.com> Date: 星期二, 20 二月 2024 22:16:29 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/web/WcsController.java | 72 +++++++++++++++++++++-------------- 1 files changed, 43 insertions(+), 29 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..76c58fc 100644 --- a/src/main/java/com/zy/common/web/WcsController.java +++ b/src/main/java/com/zy/common/web/WcsController.java @@ -28,6 +28,8 @@ import java.util.List; import java.util.stream.Collectors; +import static jdk.nashorn.internal.runtime.regexp.joni.Config.log; + /** * Created by vincent on 2020/10/30 */ @@ -495,21 +497,21 @@ throw new CoolException(dto.getLocNo() + "鐩爣搴撲綅宸茶鍗犵敤"); } - Date now = new Date(); - for (LocDetl locDetl : locDetls) { - locDetl.setLocNo(dto.getLocNo());//淇敼鐩爣搴撲綅 - locDetl.setAppeTime(now); - locDetl.setModiTime(now); - if (!locDetlService.insert(locDetl)) { - throw new CoolException("搴撳瓨鏄庣粏鏇存柊澶辫触"); - } - } +// Date now = new Date(); +// for (LocDetl locDetl : locDetls) { +// locDetl.setLocNo(dto.getLocNo());//淇敼鐩爣搴撲綅 +// locDetl.setAppeTime(now); +// locDetl.setModiTime(now); +// if (!locDetlService.insert(locDetl)) { +// throw new CoolException("搴撳瓨鏄庣粏鏇存柊澶辫触"); +// } +// } - //妫�鏌ョ洰鏍囧簱浣嶏紝搴撳瓨鏄庣粏鏄惁娣诲姞鎴愬姛 - List<LocDetl> checkLocDetls = locDetlService.selectByLocNo(dto.getLocNo()); - if (checkLocDetls.isEmpty()) { - throw new CoolException("搴撳瓨鏄庣粏杩佺Щ澶辫触"); - } +// //妫�鏌ョ洰鏍囧簱浣嶏紝搴撳瓨鏄庣粏鏄惁娣诲姞鎴愬姛 +// List<LocDetl> checkLocDetls = locDetlService.selectByLocNo(dto.getLocNo()); +// if (checkLocDetls.isEmpty()) { +// throw new CoolException("搴撳瓨鏄庣粏杩佺Щ澶辫触"); +// } // //娓呯┖婧愬簱浣嶆暟鎹� LocMast locMast1 = locMastService.selectByLoc(wrkMast.getSourceLocNo()); @@ -576,7 +578,7 @@ @PostMapping("/start") @ResponseBody public R start(@RequestBody ReplenishmentParam param){ - + log.info("start param: " + param.toString()); String containerCode = param.getContainerCode(); if(Cools.isEmpty(containerCode)){ throw new CoolException("鏂欑鐮佷负绌�"); @@ -633,7 +635,8 @@ currentContainerMap = new HashMap<>(); } - String containerCode = param.getContainerCode(); + String containerCode = param.getContainerCode().split(";")[0]; + if(Cools.isEmpty(containerCode)){ throw new CoolException("鏂欑鐮佷负绌�"); } @@ -651,19 +654,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()); +// } } } @@ -680,6 +686,9 @@ public R containerMove(@RequestBody ReplenishmentParam param){ String devNo = param.getDevNo(); + if(Cools.isEmpty(currentContainerMap)){ + currentContainerMap = new HashMap<>(); + } String containerCode = currentContainerMap.get(devNo); AgvBasDevpDto agvBasDevpDto = new AgvBasDevpDto(); @@ -717,6 +726,11 @@ agvBasDevpDto.setAgvWaitPakins(agvWaitPakinList); } + //System.out.println("currentContainerMap: " + currentContainerMap); + + + //System.out.println("agvBasDevpDto: " + agvBasDevpDto); + return R.ok(agvBasDevpDto); } -- Gitblit v1.9.1