| | |
| | | // devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | // MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | |
| | | // led 异常显示 |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); |
| | | if (ledThread != null) { |
| | | String errorMsg = "扫码失败,请重试"; |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errorMsg)); |
| | | } |
| | | // // led 异常显示 |
| | | // LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); |
| | | // if (ledThread != null) { |
| | | // String errorMsg = "扫码失败,请重试"; |
| | | // MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errorMsg)); |
| | | // } |
| | | continue; |
| | | } |
| | | |
| | |
| | | String errorMsg = jsonObject.getString("msg"); |
| | | if (!Cools.isEmpty(errorMsg)) { |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errorMsg)); |
| | | ledThread.setLedMk(false); |
| | | } |
| | | } |
| | | News.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response); |
| | |
| | | if (ledThread != null) { |
| | | String errorMsg = barcode + "托盘识别异常,请先进行组托!"; |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errorMsg)); |
| | | ledThread.setLedMk(false); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | return false;//存在入库任务,禁止出库 |
| | | } |
| | | |
| | | //同库位组校验 |
| | | List<String> outerLoc = Utils.getGroupOuterLoc(wrkMast.getSourceLocNo()); |
| | | List<LocMast> outerLocMasts = locMastService.selectNotEmptyLocNos(outerLoc); |
| | | if (!outerLocMasts.isEmpty()) { |
| | | News.info("{}任务,浅库位存在货物,系统等待中", wrkMast.getWrkNo()); |
| | | return false;//浅库位存在未执行任务 |
| | | } |
| | | |
| | | //获取源站 |
| | | LiftStaProtocol liftStaProtocol = NyLiftUtils.getLiftStaByLev(basDevp.getLiftNo(), Utils.getLev(wrkMast.getSourceLocNo())); |
| | | if (liftStaProtocol == null) { |
| | |
| | | //搜索是否有其他任务占用了提升机,如果占用提升机的任务和当前任务相同,则运行执行 |
| | | WrkMast wrkMast1 = wrkMastMapper.selectLiftWrkMast(liftProtocol.getLiftNo().intValue()); |
| | | if (wrkMast1 != null && wrkMast1.getWrkNo().intValue() != wrkMast.getWrkNo().intValue()) { |
| | | News.info("{0}号提升机,被其他任务{1}占用且和当前任务{2}不相同,禁止派发", liftSlave.getId(), wrkMast1.getWrkNo(), wrkMast.getWrkNo()); |
| | | News.info("{}号提升机,被其他任务{}占用且和当前任务{}不相同,禁止派发", liftSlave.getId(), wrkMast1.getWrkNo(), wrkMast.getWrkNo()); |
| | | continue; |
| | | } |
| | | |
| | |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | log.info("悬挂线,wms返回结果:" + jsonObject); |
| | | Integer code = jsonObject.getInteger("code"); |
| | | if (code.equals(200)) {//呼叫AGV |
| | | return true; |
| | |
| | | Utils.wapperSetCondition(wrapper,"batch",locDetl.getBatch()); |
| | | Utils.wapperSetCondition(wrapper,"three_code",locDetl.getThreeCode()); |
| | | Utils.wapperSetCondition(wrapper,"dead_time",locDetl.getDeadTime()); |
| | | Utils.wapperSetCondition(wrapper,"supp_code",locDetl.getSuppCode());//料箱码 |
| | | WrkDetl detl = wrkDetlService.selectOne(wrapper); |
| | | if (Cools.isEmpty(detl)) { |
| | | String suppCode = ""; |
| | |
| | | for (Integer staNo : led.getStaArr()) { |
| | | // 获取叉车站点 |
| | | StaProtocol staProtocol = devpThread.getStation().get(staNo); |
| | | if (staProtocol == null) { continue; } |
| | | if (staProtocol.getWorkNo() != 0) { |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } |
| | | if (staProtocol.isLoading()) { |
| | | reset = false; |
| | | break; |
| | | } |
| | |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getId()); |
| | | // led显示默认内容 |
| | | if (reset && !ledThread.isLedMk()) { |
| | | ledThread.setLedMk(false); |
| | | ledThread.setLedMk(true); |
| | | if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(2, new ArrayList<>()))) { |
| | | News.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | }else { |
| | | // News.error("{}号LED命令下发成功!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | MessageQueue.offer(SlaveType.Led, led.getId(), new Task(4, new ArrayList<>())); |
| | | ledThread.setLedMk(false); |
| | | log.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | } |
| | | } |
| | | } |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (shuttleProtocol.getVoltage() < 5630) { |
| | | continue;//电压不够继续充电 |
| | | } |
| | | |
| | | //小车满电,结束充电任务 |
| | | NyShuttleHttpCommand chargeCommand = NyHttpUtils.getChargeCommand(shuttle.getId(), wrkCharge.getWrkNo(), false); |
| | | ArrayList<NyShuttleHttpCommand> commands = new ArrayList<>(); |