| | |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.CollectionUtils; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.utils.News; |
| | | import com.zy.core.CrnThread; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.cache.MessageQueue; |
| | |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() |
| | | && staProtocol.isInEnable() |
| | | && !staProtocol.isEmptyMk() && (staProtocol.getWorkNo() == 0 || staProtocol.getWorkNo() > 9990) |
| | | && staProtocol.isPakMk()) {// && !Cools.isEmpty(barcode)) { |
| | | && staProtocol.isPakMk() && staProtocol.getStamp()>=2) {// && !Cools.isEmpty(barcode)) { |
| | | |
| | | // try { |
| | | // Thread.sleep(300); |
| | | // }catch (Exception e){} |
| | | |
| | | String barcode = barcodeThread.getBarcode(); |
| | | if(!Cools.isEmpty(barcode)) { |
| | | log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); |
| | | News.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); |
| | | if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) { |
| | | staProtocol.setWorkNo((short) 9999); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | |
| | | log.info("扫码失败1 ===>> {}号条码扫描器检测条码信息:{},站点:{}", inSta.getBarcode(), barcode, inSta.getStaNo()); |
| | | News.info("扫码失败1 ===>> {}号条码扫描器检测条码信息:{},站点:{}", inSta.getBarcode(), barcode, inSta.getStaNo()); |
| | | // led 异常显示 |
| | | if (ledThread != null) { |
| | | String errorMsg = "扫码失败,请重试"; |
| | |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | |
| | | log.info("扫码失败2 ===>> {}号条码扫描器检测条码信息:{},站点:{}", inSta.getBarcode(), barcode, inSta.getStaNo()); |
| | | News.info("扫码失败2 ===>> {}号条码扫描器检测条码信息:{},站点:{}", inSta.getBarcode(), barcode, inSta.getStaNo()); |
| | | // led 异常显示 |
| | | if (ledThread != null) { |
| | | String errorMsg = "扫码失败,请重试"; |
| | |
| | | } |
| | | String barcode = barcodeThread.getBarcode(); |
| | | if(!Cools.isEmpty(barcode)) { |
| | | log.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode); |
| | | News.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode); |
| | | if("NG".endsWith(barcode) || "NoRead".equals(barcode)) { |
| | | continue; |
| | | } |
| | |
| | | if (wrkMastMapper.selectDevWorking(crnProtocol.getCrnNo()) == null) { |
| | | return; |
| | | } |
| | | log.info("堆垛机召回原点==>>" + crnProtocol.getCrnNo() + "号堆垛机有入库任务,召回原点"); |
| | | News.info("堆垛机召回原点==>>" + crnProtocol.getCrnNo() + "号堆垛机有入库任务,召回原点"); |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | CrnCommand crnCommand = new CrnCommand(); |
| | | crnCommand.setCrnNo(crnProtocol.getCrnNo()); // 堆垛机编号 |
| | |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | JSONObject data = (JSONObject) jsonObject.get("data"); |
| | | log.info((String) data.get("msg")); |
| | | News.info((String) data.get("msg")); |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/auto/emptyOut/v1","", response); |
| | | } |
| | |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | log.info((String) jsonObject.get("msg")); |
| | | News.info((String) jsonObject.get("msg")); |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/auto/emptyIn/v1", JSON.toJSONString(locTypeDto), response); |
| | | } |