#
vincentlu
2025-12-26 787e2917c8113a56ee58fc3a6ae11b0cd5f8e133
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -177,29 +177,15 @@
                        throw new BusinessException("oriLoc:" + task.getOriLoc$() + " failed to update");
                    }
                    // reserver station inbound, qty: 1
                    destSta = staService.getById(task.getDestSta());
                    if (null == staReserveService.reserveStaIn(destSta, task, 1)) {
                        throw new BusinessException("destSta:" + task.getDestSta$() + " failed to reserve");
                    }
//                    if (!destSta.getStaSts().equals(StaStsType.IDLE.val())) {
//                        throw new BusinessException("destSta:" + task.getDestSta$() + " is not in IDLE status");
//                    }
//                    destSta.setStaSts(StaStsType.READY_RELEASE.val());
//                    destSta.setUpdateTime(now);
//                    if (!staService.updateById(destSta)) {
//                        throw new BusinessException("destSta:" + task.getDestSta$() + " failed to update");
//                    }
                    break;
                case STA_TO_LOC:
                    oriSta = staService.getById(task.getOriSta());
                    if (!oriSta.getStaSts().equals(StaStsType.STOCK.val())) {
                        throw new BusinessException("oriSta:" + task.getOriSta$() + " is not in STOCK status");
                    }
                    oriSta.setStaSts(StaStsType.READY_TAKE.val());
                    oriSta.setUpdateTime(now);
                    if (!staService.updateById(oriSta)) {
                        throw new BusinessException("oriSta:" + task.getOriSta$() + " failed to update");
                    if (null == staReserveService.reserveStaOut(oriSta, task, 1)) {
                        throw new BusinessException("oriSta:" + task.getOriSta$() + " failed to reserve");
                    }
                    destLoc = locService.getById(task.getDestLoc());
@@ -214,23 +200,13 @@
                    break;
                case STA_TO_STA:
                    oriSta = staService.getById(task.getOriSta());
                    if (!oriSta.getStaSts().equals(StaStsType.STOCK.val())) {
                        throw new BusinessException("oriSta:" + task.getOriSta$() + " is not in STOCK status");
                    }
                    oriSta.setStaSts(StaStsType.READY_TAKE.val());
                    oriSta.setUpdateTime(now);
                    if (!staService.updateById(oriSta)) {
                        throw new BusinessException("oriSta:" + task.getOriSta$() + " failed to update");
                    if (null == staReserveService.reserveStaOut(oriSta, task, 1)) {
                        throw new BusinessException("oriSta:" + task.getOriSta$() + " failed to reserve");
                    }
                    destSta = staService.getById(task.getDestSta());
                    if (!destSta.getStaSts().equals(StaStsType.IDLE.val())) {
                        throw new BusinessException("destSta:" + task.getDestSta$() + " is not in IDLE status");
                    }
                    destSta.setStaSts(StaStsType.READY_RELEASE.val());
                    destSta.setUpdateTime(now);
                    if (!staService.updateById(destSta)) {
                        throw new BusinessException("destSta:" + task.getDestSta$() + " failed to update");
                    if (null == staReserveService.reserveStaIn(destSta, task, 1)) {
                        throw new BusinessException("destSta:" + task.getDestSta$() + " failed to reserve");
                    }
                    break;
                default: