#
Junjie
2025-03-29 e04f0981da6554606359e6de4e91b752a64aae6c
src/main/java/com/zy/common/service/CommonService.java
@@ -94,6 +94,8 @@
            wrkMast.setWrkSts(WrkStsType.COMPLETE_MOVE.sts);
        } else if (wrkMast.getIoType() == WrkIoType.SHUTTLE_CHARGE.id) {
            wrkMast.setWrkSts(WrkStsType.COMPLETE_CHARGE.sts);
        } else if (wrkMast.getIoType() == WrkIoType.LOC_MOVE.id) {
            wrkMast.setWrkSts(WrkStsType.COMPLETE_LOC_MOVE.sts);
        }
        wrkMast.setModiTime(new Date());
@@ -108,21 +110,31 @@
            throw new CoolException("任务不存在");
        }
        wrkMastLogService.save(wrkNo);
        wrkMastService.deleteById(wrkNo);
        wrkMast.setMk("taskCancel");
        wrkMast.setModiTime(new Date());
        wrkMastService.updateById(wrkMast);
        return true;
    }
    //移库任务
    public boolean createLocMoveTask(CreateLocMoveTaskParam param) {
        Date now = new Date();
        LocMast locMast = locMastService.queryByLoc(param.getSourceLocNo());
        if (null == locMast) {
        LocMast sourceLocMast = locMastService.queryByLoc(param.getSourceLocNo());
        if (null == sourceLocMast) {
            throw new CoolException("源库位不存在");
        }
        if (!locMast.getLocSts().equals("F")) {
        if (!sourceLocMast.getLocSts().equals("F")) {
            throw new CoolException("源库位不处于在库状态");
        }
        LocMast locMast = locMastService.queryByLoc(param.getLocNo());
        if (null == locMast) {
            throw new CoolException("目标库位不存在");
        }
        if (!locMast.getLocSts().equals("O")) {
            throw new CoolException("目标库位不处于空库状态");
        }
        // 获取工作号
@@ -144,6 +156,14 @@
            News.error("移库任务 --- 保存工作档失败!");
            throw new CoolException("保存工作档失败");
        }
        sourceLocMast.setLocSts("R");
        sourceLocMast.setModiTime(new Date());
        locMastService.updateById(sourceLocMast);
        locMast.setLocSts("S");
        locMast.setModiTime(new Date());
        locMastService.updateById(locMast);
        return true;
    }
@@ -181,6 +201,10 @@
            throw new CoolException("保存工作档失败");
        }
        locMast.setLocSts("S");
        locMast.setModiTime(new Date());
        locMastService.updateById(locMast);
        return true;
    }
@@ -216,6 +240,10 @@
            throw new CoolException("保存工作档失败");
        }
        locMast.setLocSts("R");
        locMast.setModiTime(new Date());
        locMastService.updateById(locMast);
        return true;
    }