From e90544b3ab05170775b132e5c567bb33eb436ab4 Mon Sep 17 00:00:00 2001 From: pang.jiabao <pang_jiabao@163.com> Date: 星期一, 15 七月 2024 08:55:57 +0800 Subject: [PATCH] 深浅库位冲突 --- src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java index 0c3966e..4a231f0 100644 --- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java @@ -96,18 +96,19 @@ taskWrk.setBarcode(param.getBarcode());//鏉$爜 taskWrk.setCrnNo(param.getCrn()); String stats = ""; + String wcsLocNo = ""; if(param.getIoType() == 1){ taskWrk.setWrkSts(1); if (!Cools.isEmpty(param.getTargetPoint())) { taskWrk.setTargetPoint(Utils.getWcsLocNo(param.getTargetPoint()));//缁堢偣 taskWrk.setOriginTargetPoint(param.getTargetPoint()); - stats = "S"; } } else if (param.getIoType() == 2) { taskWrk.setWrkSts(11); if (!Cools.isEmpty(param.getStartPoint())) { taskWrk.setStartPoint(Utils.getWcsLocNo(param.getStartPoint()));//璧风偣 + wcsLocNo = taskWrk.getStartPoint(); taskWrk.setOriginStartPoint(param.getStartPoint()); stats = "R"; } @@ -116,6 +117,7 @@ taskWrk.setWrkSts(11); if (!Cools.isEmpty(param.getStartPoint())) { taskWrk.setStartPoint(Utils.getWcsLocNo(param.getStartPoint()));//璧风偣 + wcsLocNo = taskWrk.getStartPoint(); taskWrk.setOriginStartPoint(param.getStartPoint()); stats = "R"; } @@ -127,11 +129,17 @@ taskWrk.setMemo(param.getMemo());//澶囨敞 } - // 鏇存柊搴撲綅鐘舵�� - String wcsLocNo = Utils.getWcsLocNo(param.getStartPoint()); - LocMast locMast = locMastService.selectByLocNo(wcsLocNo); - locMast.setLocSts(stats); - locMastService.updateById(locMast); + // 鏇存柊搴撲綅鐘舵��,鍏ュ簱杩樻病鍒嗛厤搴撲綅锛屾壂鐮佷箣鍚庢墠鍒嗛厤 + if (param.getIoType() == 2 || param.getIoType() == 3) { + try { + LocMast locMast = locMastService.selectByLocNo(wcsLocNo); + locMast.setLocSts(stats); + log.info("-----鍏ュ簱鏇存柊搴撲綅鐘舵�佷负锛歊鎴愬姛----------"+ locMast.getLocNo()); + locMastService.updateById(locMast); + } catch (Exception e){ + log.error("-----鍑哄簱鏇存柊搴撲綅鐘舵�佷负锛歊寮傚父----------"+ e); + } + } if (!taskWrkService.insert(taskWrk)) { return R.error("鍒涘缓浠诲姟澶辫触"); -- Gitblit v1.9.1