zwl
2025-03-06 04a3dc92f15bbcaaadbca0f2e6b8fb1dcd31e338
堆垛机移库任务下发坐标修改
1个文件已修改
18 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/CrnController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/CrnController.java
@@ -429,18 +429,22 @@
        command.setTaskNo((short) 0); // 工作号
        command.setAckFinish((short) 0);  // 任务完成确认位
        command.setTaskMode(CrnTaskModeType.LOC_MOVE); // 任务模式
        command.setSourcePosZ(param.getSourceRow());     // 源库位排
        command.setSourcePosX(param.getSourceBay());     // 源库位列
        command.setSourcePosY(param.getSourceLev());     // 源库位层
        command.setDestinationPosZ(param.getRow());     // 目标库位排
        command.setDestinationPosX(param.getBay());     // 目标库位列
        command.setDestinationPosY(param.getLev());     // 目标库位层
        command.setSourcePosX(param.getSourceRow());     // 源库位排
        command.setSourcePosY(param.getSourceBay());     // 源库位列
        command.setSourcePosZ(param.getSourceLev());     // 源库位层
        command.setDestinationPosX(param.getRow());     // 目标库位排
        command.setDestinationPosY(param.getBay());     // 目标库位列
        command.setDestinationPosZ(param.getLev());     // 目标库位层
        command.setCommand((short)1);
        LocMast sourceLoc = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", command.getSourcePosX())
                .eq("bay1", command.getSourcePosY()).eq("lev1", command.getSourcePosZ()));
        LocMast loc = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", command.getDestinationPosX())
                .eq("bay1", command.getDestinationPosY()).eq("lev1", command.getDestinationPosZ()));
        VersionUtils.locMoveCheckLocType(sourceLoc, loc);
        try {
            VersionUtils.locMoveCheckLocType(sourceLoc, loc);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return crnControl(command)?R.ok():R.error();
    }