| | |
| | | // 退回 |
| | | if (back) { |
| | | log.warn("扫码入库失败,{}入库站因{}异常,托盘已被退回", inSta.getStaNo(), errMsg); |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | if(!Cools.isEmpty(barcode)) { |
| | | // log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); |
| | | if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) { |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | continue; |
| | | } |
| | | } else { |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | } |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response); |
| | | } else if (code == 700) { |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | // 退回 |
| | | if (back) { |
| | | log.warn("扫码入库失败,{}入库站因{}异常,托盘已被退回", inSta.getStaNo(), errMsg); |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | // if(!Cools.isEmpty(barcode)) { |
| | | // log.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode); |
| | | // if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) { |
| | | // staProtocol.setWorkNo((short) 9995); |
| | | // staProtocol.setWorkNo((short) 32002); |
| | | // staProtocol.setStaNo(pickSta.getBackSta().shortValue()); |
| | | // devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | // MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | // continue; |
| | | // } |
| | | // } else { |
| | | // staProtocol.setWorkNo((short) 9995); |
| | | // staProtocol.setWorkNo((short) 32002); |
| | | // staProtocol.setStaNo(pickSta.getBackSta().shortValue()); |
| | | // devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | // MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | } |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response); |
| | | } else { |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(pickSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | // log.error("{}站点查询无待入库数据 工作号={}", crnStn.getStaNo(), staProtocol.getWorkNo()); |
| | | continue; |
| | | } |
| | | |
| | | // 同库位组进行校验 |
| | | List<String> groupLocNo = Utils.getGroupLocNo(wrkMast.getLocNo()); |
| | | if (!Cools.isEmpty(groupLocNo)) { |
| | | if (null != wrkMastMapper.selectPakoutWorkingByGroupLoc(groupLocNo)) { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (wrkMast.getWrkSts() < 3) { |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0 && staProtocol.isInEnable() |
| | | && staDetl.getCanining()!=null && staDetl.getCanining().equals("Y")) { |
| | |
| | | if (!sourceSta.getLocSts().equals("R") &&!sourceSta.getLocSts().equals("P")) { |
| | | log.error("出库操作库位状态不符合--状态, 库位号={},库位状态={}", wrkMast.getLocNo(), sourceSta.getLocSts()); |
| | | continue; |
| | | } |
| | | |
| | | // 同库位组进行校验 |
| | | List<String> groupLocNo = Utils.getGroupLocNo(wrkMast.getSourceLocNo()); |
| | | if (!Cools.isEmpty(groupLocNo)) { |
| | | if (null != wrkMastMapper.selectPakinWorkingByGroupLoc(groupLocNo)) { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | // 判断是否有同库位组的出库任务,如果有,则暂停 |
| | |
| | | } while (false); |
| | | |
| | | if (steCharge == null) { |
| | | log.warn("{}号小车【电量:{}】充电失败,原因:没有空闲充电桩。", ste.getId(), steProtocol.getCharge()); |
| | | // log.warn("{}号小车【电量:{}】充电失败,原因:没有空闲充电桩。", ste.getId(), steProtocol.getCharge()); |
| | | continue; |
| | | } |
| | | String chargeLocNo = steCharge.locNo; |