自动化立体仓库 - WMS系统
#
tqs
2023-04-14 96fc6c344e23e0180881b87aa2291a2fc19e4ab8
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 + "不为拣料/盘点出库");
        }
        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 + "不为拣料出库");
        }
        if(Cools.isEmpty(wrkMast)){
            throw new CoolException("工作档不能为空");
        }
        if (wrkMast.getIoType() != 103 && wrkMast.getIoType() != 107){
            throw new CoolException(barcode + "不为拣料/盘点出库");
        }
        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("补货成功");
    }
}