| | |
| | | WrkStsType.NEW_OUTBOUND.sts, |
| | | WrkStsType.NEW_LOC_MOVE.sts)); |
| | | taskQueue.sort(Comparator.comparingInt((WrkMast wrkMast) -> resolveTaskTypeRank(wrkMast, lastIo)) |
| | | .thenComparingInt(this::resolveBatchOutboundRank) |
| | | .thenComparingInt(this::resolveBatchSeqOrder) |
| | | .thenComparingDouble(this::resolveTaskIoPri) |
| | | .thenComparingLong(this::resolveTaskQueueTime) |
| | | .thenComparingInt(this::resolveBatchOutboundRank) |
| | | .thenComparingInt(this::resolveBatchSeqOrder) |
| | | .thenComparingInt(this::resolveTaskQueueNo)); |
| | | |
| | | for (WrkMast wrkMast : taskQueue) { |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (isOutboundStationTaskLimitReached()) { |
| | | if (isConveyorStationTaskLimitReached()) { |
| | | return false; |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | private boolean isOutboundStationTaskLimitReached() { |
| | | int stationMaxTaskCount = getSystemConfigInt("stationMaxTaskCountLimit", 30); |
| | | if (stationMaxTaskCount <= 0) { |
| | | private boolean isConveyorStationTaskLimitReached() { |
| | | int conveyorStationTaskLimit = getSystemConfigInt("conveyorStationTaskLimit", 30); |
| | | if (conveyorStationTaskLimit <= 0) { |
| | | return false; |
| | | } |
| | | |
| | | int currentStationTaskCount = stationOperateProcessUtils.getCurrentStationTaskCount(); |
| | | if (currentStationTaskCount >= stationMaxTaskCount) { |
| | | News.warn("输送站点任务数量达到上限,已停止任务下发。当前任务数={},上限={}", currentStationTaskCount, stationMaxTaskCount); |
| | | if (currentStationTaskCount >= conveyorStationTaskLimit) { |
| | | News.warn("输送站点任务数量达到上限,已停止任务下发。当前任务数={},上限={}", |
| | | currentStationTaskCount, |
| | | conveyorStationTaskLimit); |
| | | return true; |
| | | } |
| | | return false; |