| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.rmi.CORBA.Util; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 调度车辆 |
| | | */ |
| | | public boolean searchDispatchShuttleNoLift(Integer wrkNo, String sourceLocNo, String locNo, String flag) { |
| | | public synchronized boolean searchDispatchShuttleNoLift(Integer wrkNo, String sourceLocNo, String locNo, String flag) { |
| | | ArrayList<ShuttleThread> diffLev = new ArrayList<>();//不同楼层的穿梭车 |
| | | int lev1 = 0; |
| | | boolean tongLev = false; |
| | |
| | | if (basShuttle.getStatus() == 0) { |
| | | continue;//小车被禁用 |
| | | } |
| | | } |
| | | WrkMast wrkMast = wrkMastService.selectByShuttleNo(basShuttle.getShuttleNo()); |
| | | if(wrkMast!=null){ |
| | | continue; |
| | | } |
| | | diffLev.add(shuttleThread); |
| | | if (lev1 != 0) { |
| | |
| | | |
| | | |
| | | //检测目标楼层车数量是否小于允许的最大数量 |
| | | boolean checkDispatchMaxNum = checkDispatchMaxNum(lev); |
| | | if (!checkDispatchMaxNum) { |
| | | News.info("{}任务,{}层,已经达到当前楼层调度车辆最大值", wrkMast1.getWrkNo(), lev); |
| | | return false; |
| | | } |
| | | // boolean checkDispatchMaxNum = checkDispatchMaxNum(lev); |
| | | // if (!checkDispatchMaxNum) { |
| | | // News.info("{}任务,{}层,已经达到当前楼层调度车辆最大值", wrkMast1.getWrkNo(), lev); |
| | | // return false; |
| | | // } |
| | | |
| | | for (ShuttleThread shuttleThread : diffLev) { |
| | | ShuttleProtocol shuttleProtocol = shuttleThread.getStatus(); |