From b6b46e1c4d390c80cf9bd7d4daa23202f2d11a22 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期五, 26 五月 2023 13:47:57 +0800 Subject: [PATCH] 站点管理编辑高低库位 --- src/main/java/com/zy/asrs/controller/MobileController.java | 46 +++++++++++++++++++++++++++++++++++++++------- 1 files changed, 39 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/MobileController.java b/src/main/java/com/zy/asrs/controller/MobileController.java index 9466378..ec47bd4 100644 --- a/src/main/java/com/zy/asrs/controller/MobileController.java +++ b/src/main/java/com/zy/asrs/controller/MobileController.java @@ -53,6 +53,12 @@ @ManagerAuth public R pikingAuth(String barcode) { WrkMast wrkMast = wrkMastService.selectByBarcode(barcode); + if (Cools.isEmpty(wrkMast)) { + throw new CoolException(barcode + "鏆傛棤宸ヤ綔妗�"); + } + if (wrkMast.getIoType() != 103 && wrkMast.getIoType() != 107){ + throw new CoolException(barcode + "涓嶄负鎷f枡/鐩樼偣鍑哄簱"); + } List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); return R.ok().add(wrkDetls); } @@ -63,18 +69,18 @@ @Transactional public R pikingToFull(String barcode) { WrkMast wrkMast = wrkMastService.selectByBarcode(barcode); - if (wrkMast.getIoType() != 103){ - throw new CoolException(barcode + "涓嶄负鎷f枡鍑哄簱"); - } if(Cools.isEmpty(wrkMast)){ throw new CoolException("宸ヤ綔妗d笉鑳戒负绌�"); + } + if (wrkMast.getIoType() != 103 && wrkMast.getIoType() != 107){ + throw new CoolException(barcode + "涓嶄负鎷f枡/鐩樼偣鍑哄簱"); } Date now = new Date(); List<LocDetl> locDetls = locDetlService.selectByLocNo(wrkMast.getSourceLocNo()); wrkMast.setIoType(101); - wrkMast.setSourceStaNo(wrkMast.getStaNo()); - wrkMast.setStaNo(200); +// wrkMast.setSourceStaNo(wrkMast.getStaNo()); +// wrkMast.setStaNo(200); wrkMastService.updateById(wrkMast); wrkDetlService.deleteByWrkNo(wrkMast.getWrkNo()); @@ -88,14 +94,14 @@ } LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo()); - if (locMast.getLocSts().equals("S")) { + if (locMast.getLocSts().equals("P")) { locMast.setLocSts("R"); locMast.setModiTime(now); if (!locMastService.updateById(locMast)) { throw new CoolException("鏀瑰彉搴撲綅鐘舵�佸け璐�"); } } - + locMastService.updateById(locMast); return R.ok("杞崲鎴愬姛"); } @@ -338,6 +344,20 @@ return R.ok(); } + @RequestMapping("/checkDetl/auth2") + @ManagerAuth + public R getCheckDetl2(String barcode) { + WrkMast wrkMast = wrkMastService.selectByBarcode(barcode); + if(Cools.isEmpty(wrkMast)){ + throw new CoolException("姝ゆ墭鐩樼爜娌℃湁鐩樼偣浠诲姟"); + } + if (wrkMast.getIoType() != 107){ + throw new CoolException("姝ゆ墭鐩樼爜涓嶄负鐩樼偣鍑哄簱"); + } + List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); + return R.ok().add(wrkDetls); + } + @RequestMapping("/adjust/auth") @ManagerAuth(memo = "鐩樼偣") public R adjust(@RequestBody MobileAdjustParam combParam){ @@ -345,5 +365,17 @@ return R.ok("鐩樼偣鎴愬姛"); } + @RequestMapping("/adjustNew/auth") + @ManagerAuth(memo = "鐩樼偣") + public synchronized R adjustNew(@RequestBody MobileAdjustParam combParam){ + mobileService.adjustNew(combParam, Boolean.FALSE, getUserId()); + return R.ok("鐩樼偣鎴愬姛"); + } + @RequestMapping("/adjustNew/v2/auth") + @ManagerAuth(memo = "琛ヨ揣") + public synchronized R adjustNewV2(@RequestBody MobileAdjustParam combParam){ + mobileService.adjustNew(combParam, Boolean.TRUE, getUserId()); + return R.ok("琛ヨ揣鎴愬姛"); + } } -- Gitblit v1.9.1