自动化立体仓库 - WMS系统
zjj
2025-01-07 e5cf12d2e3441b83cc3aeafd4f7f23d4075ab5fc
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -376,7 +376,7 @@
                inventoryCheckOrderDetl.setMaktx(detlDto.getLocDetl().getMaktx());
                inventoryCheckOrderDetl.setBatch(detlDto.getLocDetl().getBatch());
                inventoryCheckOrderDetl.setLocNo(detlDto.getLocDetl().getLocNo());
                inventoryCheckOrderDetl.setArea(wrkMast.getCrnNo$());
                inventoryCheckOrderDetl.setArea(detlDto.getLocDetl().getOrigin());
                inventoryCheckOrderDetl.setAnfme(detlDto.getLocDetl().getAnfme());
                inventoryCheckOrderDetl.setIoTime(now);
                inventoryCheckOrderDetl.setStatus("1");
@@ -976,7 +976,7 @@
                locMastService.updateById(locMast);
            }
        // 出库取消(修改源库位)
        } else if (wrkMast.getIoType() >=100) {
        } else if (wrkMast.getIoType() >=100 && wrkMast.getIoType()<=200) {
            locNo = wrkMast.getSourceLocNo();
            // 出库 ===>> F.在库
            if (wrkMast.getIoType() > 100 && wrkMast.getIoType() != 110) {
@@ -997,6 +997,8 @@
                locMast.setModiUser(userId);
                locMastService.updateById(locMast);
            }
        } else if (wrkMast.getIoType() >=300) {
        } else {
            throw new CoolException("当前工作状态无法取消");
        }
@@ -1018,7 +1020,7 @@
        }
        //取消出库工作档时,查询单据管理表,回滚作业中数量
        if(wrkMast.getIoType() == 101 || wrkMast.getIoType() == 103) {
        if(wrkMast.getIoType() == 101 || wrkMast.getIoType() == 103 || wrkMast.getIoType() == 300) {
            List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo());
            for (WrkDetl wrkDetl : wrkDetls) {
                if (!Cools.isEmpty(wrkDetl.getOrderNo())) {
@@ -1085,18 +1087,25 @@
            boolean wrkDetlRes = wrkDetlService.delete(new EntityWrapper<WrkDetl>().eq("wrk_no", workNo));
        }
        // 修改库位状态
        LocMast locMast = locMastService.selectById(locNo);
        if (Cools.isEmpty(locMast)) {
            throw new CoolException("取消工作档失败,库位不存在:"+ locNo);
        if (wrkMast.getIoType() != 300){
            // 修改库位状态
            LocMast locMast = locMastService.selectById(locNo);
            if (Cools.isEmpty(locMast)) {
                throw new CoolException("取消工作档失败,库位不存在:"+ locNo);
            }
            locMast.setLocSts(locSts);
            locMast.setModiTime(now);
            locMast.setModiUser(userId);
            boolean locMastRes = locMastService.updateById(locMast);
            if (!wrkMastRes || !locMastRes) {
                throw new CoolException("保存数据失败");
            }
        }else {
            if (!wrkMastRes) {
                throw new CoolException("保存数据失败");
            }
        }
        locMast.setLocSts(locSts);
        locMast.setModiTime(now);
        locMast.setModiUser(userId);
        boolean locMastRes = locMastService.updateById(locMast);
        if (!wrkMastRes || !locMastRes) {
            throw new CoolException("保存数据失败");
        }
    }
    @Override