| | |
| | | } |
| | | String sourceLocNo = "1200305"; |
| | | String locNo = "1100105"; |
| | | if (i == 0) { |
| | | if (wrkMast.getShuttleNo() == 1) { |
| | | if (wrkMast.getStaNo() == 1013) { |
| | | sourceLocNo = "1200301"; |
| | | locNo = "1100101"; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (loc.contains(locNo)) { |
| | | locNo = "0900105"; |
| | | } |
| | | |
| | | boolean dispatchShuttle = shuttleDispatchUtils.shuttleMoveGenerate(wrkMast.getWrkNo(), sourceLocNo, locNo, wrkMast.getShuttleNo(), null, false); |
| | | if (!dispatchShuttle) { |
| | |
| | | if (basShuttleCharge == null) { |
| | | return false; |
| | | } |
| | | try { |
| | | ShuttleThread shuttleThread2 = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, wrkMast.getShuttleNo() == 1 ? 2 : 1); |
| | | if (shuttleThread2 == null) { |
| | | return false; |
| | | } |
| | | ShuttleProtocol shuttleProtocol2 = shuttleThread2.getStatus(); |
| | | if (shuttleProtocol2 == null) { |
| | | return false; |
| | | } |
| | | if (shuttleProtocol2.getCurrentLocNo().equals(basShuttleCharge.getWaitLocNo())) { |
| | | String locNo = Utils.getLocNo(Utils.getRow(basShuttleCharge.getWaitLocNo()) + 1, Utils.getBay(basShuttleCharge.getWaitLocNo()), Utils.getLev(basShuttleCharge.getWaitLocNo())); |
| | | basShuttleCharge.setWaitLocNo(locNo); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("寻找新的待机位,{}", e); |
| | | } |
| | | |
| | | //调度小车去待机位 |
| | | boolean dispatched = shuttleDispatchUtils.dispatchShuttle(wrkMast.getWrkNo(), basShuttleCharge.getWaitLocNo(), wrkMast.getShuttleNo()); |