From 765a856097731e6d01ada01e1083a6c3e7a282cf Mon Sep 17 00:00:00 2001 From: LSH Date: 星期二, 01 十一月 2022 14:09:21 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/bfasrs' into bfasrs --- src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java | 41 ++++++++++++++++++----------------------- 1 files changed, 18 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java index 7684bf2..a13fe0c 100644 --- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java @@ -103,7 +103,6 @@ Double ioPri = wrkMastService.getIoPri(1, dto.getLocNo()); wrkMast.setIoPri(ioPri); // 浼樺厛绾э細13 wrkMast.setOutMost(locMastService.isOutMost(dto.getLocNo(), true) ? 1 : 0); - ; wrkMast.setCrnNo(dto.getCrnNo()); wrkMast.setSourceStaNo(dto.getSourceStaNo()); wrkMast.setStaNo(dto.getStaNo()); @@ -236,7 +235,6 @@ Double ioPri = wrkMastService.getIoPri(ioType, dto.getLocNo()); wrkMast.setIoPri(ioPri); // 浼樺厛绾э細13 wrkMast.setOutMost(locMastService.isOutMost(dto.getLocNo(), false) ? 1 : 0); - ; wrkMast.setCrnNo(locMast.getCrnNo()); wrkMast.setSourceStaNo(staDesc.getCrnStn()); // 婧愮珯 wrkMast.setStaNo(staDesc.getStnNo()); // 鐩爣绔� @@ -316,7 +314,6 @@ Double ioPri = wrkMastService.getIoPri(ioType, taskDto.getLocNo()); wrkMast.setIoPri(ioPri); // 浼樺厛绾э細13 wrkMast.setOutMost(locMastService.isOutMost(taskDto.getLocNo(), false) ? 1 : 0); - ; wrkMast.setCrnNo(locMast.getCrnNo()); wrkMast.setSourceStaNo(staDesc.getCrnStn()); // 婧愮珯 wrkMast.setStaNo(staDesc.getStnNo()); // 鐩爣绔� @@ -460,7 +457,6 @@ Double ioPri = wrkMastService.getIoPri(10, dto.getLocNo()); wrkMast.setIoPri(ioPri); // 浼樺厛绾э細10 wrkMast.setOutMost(locMastService.isOutMost(dto.getLocNo(), true) ? 1 : 0); - ; wrkMast.setCrnNo(dto.getCrnNo()); wrkMast.setSourceStaNo(dto.getSourceStaNo()); wrkMast.setStaNo(dto.getStaNo()); @@ -547,7 +543,6 @@ wrkMast.setSourceStaNo(sourceStaNo); // 婧愮珯 wrkMast.setStaNo(param.getOutSite()); // 鐩爣绔� wrkMast.setOutMost(locMastService.isOutMost(locNo, false) ? 1 : 0); - ; wrkMast.setCrnNo(locMast.getCrnNo()); wrkMast.setSourceLocNo(locNo); // 婧愬簱浣� wrkMast.setFullPlt("N"); // 婊℃澘锛歒 @@ -625,7 +620,6 @@ wrkMast.setIoType(11); // 鍏ュ嚭搴撶姸鎬侊細 11.搴撴牸绉昏浇 wrkMast.setIoPri(10D); wrkMast.setOutMost(locMastService.isOutMost(locNo, false) ? 1 : 0); - ; wrkMast.setCrnNo(sourceLoc.getCrnNo()); wrkMast.setSourceLocNo(sourceLocNo); // 婧愬簱浣� wrkMast.setLocNo(locNo); // 鐩爣搴撲綅 @@ -890,23 +884,25 @@ // 璁㈠崟鍏宠仈 List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); for (WrkDetl wrkDetl : wrkDetls) { - String[] orderNos = GetOrderNo(wrkDetl.getOrderNo()); - String[] anfmes = GetAnfme(wrkDetl.getOrderNo()); - int i = 0; - for (String orderNo : orderNos) { - if (!Cools.isEmpty(orderNo)) { - Double anfme = Integer.parseInt(anfmes[i]) + 0.0; - i++; - if (BaseController.isJSON(wrkDetl.getOrderNo())) { - if (!orderDetlService.decrease(orderNo, wrkDetl.getMatnr(), wrkDetl.getBatch(), anfme)) { - throw new CoolException("璁㈠崟鏁版嵁鍥炴粴澶辫触"); - } - } else { - // 璁㈠崟鍚堝苟鍑哄簱 - List<OrderDto> orderDtoList = JSON.parseArray(wrkDetl.getOrderNo(), OrderDto.class); - for (OrderDto orderDto : orderDtoList) { - if (!orderDetlService.decrease(orderDto.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), orderDto.getAnfme())) { + if (!Cools.isEmpty(wrkDetl.getOrderNo())){ + String[] orderNos = GetOrderNo(wrkDetl.getOrderNo()); + String[] anfmes = GetAnfme(wrkDetl.getOrderNo()); + int i = 0; + for (String orderNo : orderNos) { + if (!Cools.isEmpty(orderNo)) { + Double anfme = Integer.parseInt(anfmes[i]) + 0.0; + i++; + if (BaseController.isJSON(wrkDetl.getOrderNo())) { + if (!orderDetlService.decrease(orderNo, wrkDetl.getMatnr(), wrkDetl.getBatch(), anfme)) { throw new CoolException("璁㈠崟鏁版嵁鍥炴粴澶辫触"); + } + } else { + // 璁㈠崟鍚堝苟鍑哄簱 + List<OrderDto> orderDtoList = JSON.parseArray(wrkDetl.getOrderNo(), OrderDto.class); + for (OrderDto orderDto : orderDtoList) { + if (!orderDetlService.decrease(orderDto.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), orderDto.getAnfme())) { + throw new CoolException("璁㈠崟鏁版嵁鍥炴粴澶辫触"); + } } } } @@ -1088,7 +1084,6 @@ wrkMast.setIoType(11); // 鍏ュ嚭搴撶姸鎬侊細 11.搴撴牸绉昏浇 wrkMast.setIoPri(15D); wrkMast.setOutMost(locMastService.isOutMost(loc.getLocNo(), false) ? 1 : 0); - ; wrkMast.setCrnNo(sourceLoc.getCrnNo()); wrkMast.setSourceLocNo(sourceLocNo); // 婧愬簱浣� wrkMast.setLocNo(loc.getLocNo()); // 鐩爣搴撲綅 -- Gitblit v1.9.1