自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-15 4cef4cd611b226e2d62de9859049b180b1a23f58
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -220,4 +220,51 @@
        }
    }
    @Override
    @Transactional
    public void completeWrkMast(String workNo) {
        WrkMast wrkMast = wrkMastService.selectById(workNo);
        if (Cools.isEmpty(wrkMast)){
            throw new CoolException(workNo+"工作档不存在");
        }
        // 入库 + 库位转移
        if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType()==11)) {
            wrkMast.setWrkSts(4L);
        // 出库
        } else if (wrkMast.getWrkSts() > 10) {
            wrkMast.setWrkSts(14L);
        }
        if (!wrkMastService.updateById(wrkMast)) {
            throw new CoolException("修改工作档失败");
        }
    }
    @Override
    @Transactional
    public void cancelWrkMast(String workNo) {
        WrkMast wrkMast = wrkMastService.selectById(workNo);
        if (Cools.isEmpty(wrkMast)){
            throw new CoolException(workNo+"工作档不存在");
        }
        // 入库
        if (wrkMast.getWrkSts() < 4) {
            if (wrkMast.getIoType() != 11) {
            } else {
                // 库位转移
            }
        // 出库
        } else if (wrkMast.getWrkSts() > 10) {
        }
        // 删除工作档
        wrkMastService.deleteById(wrkMast);
        // 删除工作档明细
        wrkDetlService.delete(new EntityWrapper<WrkDetl>().eq("wrk_no", workNo));
        // 修改库位状态
//        locMastService.updateById()
    }
}