自动化立体仓库 - WMS系统
#
LSH
2023-02-13 8c890f686ae2060c4c2e6afebce6c69c493c2e04
src/main/java/com/zy/common/web/WcsController.java
@@ -47,6 +47,7 @@
    @PostMapping("/pakin/loc/v1")
    @ResponseBody
    public synchronized R getLocNo(@RequestBody SearchLocParam param) {
        log.info("收到WCS入库接口请求====>>入参:{}", param);
        if (Cools.isEmpty(param.getIoType())) {
            return R.error("入出库类型不能为空");
        }
@@ -66,10 +67,12 @@
                }
                return R.parse(CodeRes.NO_COMB_700);
            }
            int countWait = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet",param.getBarcode())
            .eq("io_status", "Y"));
            int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode()));
            int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode()));
            if (countLoc > 0 || countWrk > 0) {
                return R.error("工作档/库存条码数据已存在");
            if (countLoc > 0 || countWrk > 0 || countWait > 0) {
                return R.error(CodeRes.EXIST_500);
            }
        }
        if (Cools.isEmpty(param.getLocType1())){
@@ -78,7 +81,8 @@
        // 源站点状态检测
        BasDevp sourceStaNo = basDevpService.checkSiteStatus(param.getSourceStaNo(), true);
        sourceStaNo.setLocType1(param.getLocType1());
//        sourceStaNo.setLocType1(param.getLocType1());
        sourceStaNo.setLocType1((short)1);
        LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo);
        StartupDto dto = null;
@@ -93,10 +97,9 @@
            default:
                break;
        }
        log.info("/pakin/loc/v1:"+dto + "======托盘码:"+param.getBarcode());
        log.info("WCS入库接口返参:{},pack码:{}", dto, param.getBarcode());
        return R.ok().add(dto);
    }
    /**
     * 全板入库
@@ -143,6 +146,7 @@
            wrkDetl.setIoTime(wrkMast.getIoTime());
            wrkDetl.setAppeTime(now);
            wrkDetl.setModiTime(now);
            wrkDetl.setDeadWarn(waitPakin.getDeadWarn());
            if (!wrkDetlService.insert(wrkDetl)) {
                throw new CoolException("保存工作明细失败");
            }
@@ -151,6 +155,7 @@
        Wrapper<WaitPakin> wrapper = new EntityWrapper<WaitPakin>()
                .eq("zpallet", barcode);
        WaitPakin setParam = new WaitPakin();
        setParam.setLocNo(dto.getLocNo());
        setParam.setIoStatus("Y");
        setParam.setModiTime(now);
        if (!waitPakinService.update(setParam, wrapper)) {