#
vincentlu
2025-12-26 ccbf73034e8a7c5867d3b58e115013527283ee76
zy-acs-manager/src/main/java/com/zy/acs/manager/core/HandlerController.java
@@ -73,6 +73,8 @@
    private AvoidWaveCalculator avoidWaveCalculator;
    @Autowired
    private PatrolService patrolService;
    @Autowired
    private StaReserveService staReserveService;
    @PreAuthorize("hasAuthority('manager:agv:update')")
    @OperationLog("Locate All Agv")
@@ -262,13 +264,8 @@
                if (null == destSta) {
                    return R.error();
                }
                if (!destSta.getStaSts().equals(StaStsType.IDLE.val())) {
                    throw new BusinessException("destSta:" + destSta.getStaNo() + " 不是无货状态");
                }
                destSta.setStaSts(StaStsType.READY_RELEASE.val());
                destSta.setUpdateTime(now);
                if (!staService.updateById(destSta)) {
                    throw new BusinessException("destSta:" + destSta.getStaNo() + " 修改站点状态失败");
                if (null == staReserveService.reserveStaIn(destSta, task, 1)) {
                    throw new BusinessException("destSta:" + destSta.getStaNo() + " 预约失败");
                }
                // task
@@ -290,13 +287,8 @@
                if (null == oriSta) {
                    return R.error();
                }
                if (!oriSta.getStaSts().equals(StaStsType.STOCK.val())) {
                    throw new BusinessException("oriSta:" + oriSta.getStaNo() + " 不是有货状态");
                }
                oriSta.setStaSts(StaStsType.READY_TAKE.val());
                oriSta.setUpdateTime(now);
                if (!staService.updateById(oriSta)) {
                    throw new BusinessException("oriSta:" + oriSta.getStaNo() + " 修改站点状态失败");
                if (null == staReserveService.reserveStaOut(oriSta, task, 1)) {
                    throw new BusinessException("oriSta:" + oriSta.getStaNo() + " 预约失败");
                }
                // destLoc
@@ -337,13 +329,8 @@
                if (null == oriSta) {
                    return R.error();
                }
                if (!oriSta.getStaSts().equals(StaStsType.STOCK.val())) {
                    throw new BusinessException("oriSta:" + oriSta.getStaNo() + " 不是有货状态");
                }
                oriSta.setStaSts(StaStsType.READY_TAKE.val());
                oriSta.setUpdateTime(now);
                if (!staService.updateById(oriSta)) {
                    throw new BusinessException("oriSta:" + oriSta.getStaNo() + " 修改站点状态失败");
                if (null == staReserveService.reserveStaOut(oriSta, task, 1)) {
                    throw new BusinessException("oriSta:" + oriSta.getStaNo() + " 预约失败");
                }
                // destSta
@@ -356,13 +343,8 @@
                if (null == destSta) {
                    return R.error();
                }
                if (!destSta.getStaSts().equals(StaStsType.IDLE.val())) {
                    throw new BusinessException("destSta:" + destSta.getStaNo() + " 不是无货状态");
                }
                destSta.setStaSts(StaStsType.READY_RELEASE.val());
                destSta.setUpdateTime(now);
                if (!staService.updateById(destSta)) {
                    throw new BusinessException("destSta:" + destSta.getStaNo() + " 修改站点状态失败");
                if (null == staReserveService.reserveStaIn(destSta, task, 1)) {
                    throw new BusinessException("destSta:" + destSta.getStaNo() + " 预约失败");
                }
                // task