| | |
| | | return false;//站点必须自动、空闲、没有托盘 |
| | | } |
| | | |
| | | if (wrkMast.getStaNo() == 300) { |
| | | //出300站,检测300站任务数量 |
| | | List<WrkMast> wrkMasts = wrkMastMapper.select300Wrk(); |
| | | if (wrkMasts.size() >= 4) { |
| | | News.info("{}任务,输送线任务过载{}", wrkMast.getWrkNo(), wrkMasts.size()); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | if (wrkMast.getShuttleNo() == null) {//没有绑定小车,进行调度 |
| | | //强制预留一台小车给入库任务 |
| | | int lev = Utils.getLev(wrkMast.getSourceLocNo()); |
| | |
| | | if (detl.getSuppCode() != null) { |
| | | suppCode = detl.getSuppCode(); |
| | | } |
| | | if (isJson(orderNo)) { |
| | | try { |
| | | JSONArray orders = JSON.parseArray(orderNo); |
| | | for (Object order : orders) { |
| | | JSONObject order1 = (JSONObject) order; |
| | | ledCommand.getMatDtos().add(new MatDto(detl.getMatnr(), detl.getMaktx(), (Double) order1.get("anfme"), (locDetl.getAnfme() - detl.getAnfme()), detl.getSpecs(), suppCode, (String) order1.get("orderNo"))); |
| | | ledCommand.getMatDtos().add(new MatDto(detl.getMatnr(), detl.getMaktx(), (Double) order1.get("anfme"), (locDetl.getAnfme() - detl.getAnfme()), detl.getSpecs(), suppCode,(String) order1.get("orderNo"))); |
| | | } |
| | | } else { |
| | | ledCommand.getMatDtos().add(new MatDto(detl.getMatnr(), detl.getMaktx(), detl.getAnfme(), (locDetl.getAnfme() - detl.getAnfme()), detl.getSpecs(), suppCode, detl.getOrderNo())); |
| | | } catch (Exception e) { |
| | | ledCommand.getMatDtos().add(new MatDto(detl.getMatnr(), detl.getMaktx(), detl.getAnfme(), (locDetl.getAnfme() - detl.getAnfme()), detl.getSpecs(), suppCode,detl.getOrderNo())); |
| | | } |
| | | |
| | | |
| | | } |
| | | }); |
| | | |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (shuttleProtocol.getSuspendState() == 1) { |
| | | continue;//管制中 |
| | | } |
| | | |
| | | if (!shuttleProtocol.getCurrentLocNo().equals(wrkCharge.getLocNo())) { |
| | | //小车不在充电桩位置 |
| | | shuttleDispatchUtils.dispatchShuttle(wrkCharge.getWrkNo(), wrkCharge.getLocNo(), shuttle.getId());//调度小车去充电桩 |