From e74403cc7340bf0e2721573cf907a16f27ea957b Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期日, 23 六月 2024 10:11:27 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/task/handler/AutoMoveHandler.java | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/handler/AutoMoveHandler.java b/src/main/java/com/zy/asrs/task/handler/AutoMoveHandler.java index 1d2ebdc..e5b8b03 100644 --- a/src/main/java/com/zy/asrs/task/handler/AutoMoveHandler.java +++ b/src/main/java/com/zy/asrs/task/handler/AutoMoveHandler.java @@ -55,6 +55,12 @@ doHandMove2(agvWrkMast); return SUCCESS; } + + public ReturnT<String> start4(AgvWrkMast agvWrkMast) { + // locType 1. 鑷姩锛� 2. 鎵嬪姩 + doAutoMove3(agvWrkMast); + return SUCCESS; + } //鏍规嵁搴撲綅鐨刲octype鍊煎彂閫佷换鍔�--寮冪敤 private ReturnT<String> doAutoMove(AgvLocMast agvLocMast) { Date now = new Date(); @@ -191,12 +197,37 @@ agvWrkMastService.updateById(agvWrkMast); //鏇存柊鐩爣搴撲綅鐘舵�� updateAgvLocMast(locMast,"S"); + log.info("鑷姩鍥炴祦浠诲姟 ==> 婧愬簱浣嶏細{}锛岀洰鏍囧簱浣嶏細{}",agvWrkMast.getSourceLocNo(),agvWrkMast.getLocNo()); return SUCCESS; } + + private ReturnT<String> doAutoMove3(AgvWrkMast agvWrkMast) { + Date now = new Date(); + //妫�绱㈠簱浣嶏紝閫夋嫨鍚堥�傜殑搴撲綅 + AgvLocMast locMast = agvCommonService.getLocNo(3,agvWrkMast.getCrnNo(),false,false); + if (Cools.isEmpty(locMast)) { + throw new CoolException("鏆傛棤搴撲綅"); + } + agvWrkMast.setWrkSts(201L); + agvWrkMast.setLocNo(locMast.getLocNo()); + agvWrkMastService.updateById(agvWrkMast); + //鏇存柊鐩爣搴撲綅鐘舵�� + updateAgvLocMast(locMast,"S"); + + return SUCCESS; + } + private ReturnT<String> doHandMove2(AgvWrkMast agvWrkMast) { Date now = new Date(); - AgvBasDevp devpNo = agvCommonService.getDevpNo(3, 1, "Y", "Y"); + String lev1 = agvWrkMast.getSourceLocNo().substring(agvWrkMast.getSourceLocNo().length() - 4).substring(0, 2); + AgvBasDevp devpNo = new AgvBasDevp(); + if ("01".equals(lev1)) { + devpNo = agvCommonService.getDevpNo(3, 1, "Y", "Y"); + } else { + devpNo = agvCommonService.getDevpNo(3, 4, "Y", "Y"); + } + if (Cools.isEmpty(devpNo)) { throw new CoolException("鏆傛棤绌洪棽鎺ラ┏浣�"); } -- Gitblit v1.9.1