| | |
| | | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | @Value("${wms.urlWMS}") |
| | | private String urlWMS; |
| | | @Value("${inventory.number}") |
| | | private Integer inventoryNumber; |
| | | |
| | |
| | | && staProtocol.isLoading() |
| | | && staProtocol.isInEnable() |
| | | && !staProtocol.isEmptyMk() |
| | | && staProtocol.getWorkNo() == 0 |
| | | && staProtocol.getWorkNo() == 9999 |
| | | && staProtocol.isPakMk()) {// && !Cools.isEmpty(barcode)) { |
| | | |
| | | // if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode)) { |
| | |
| | | applyParam.setStatus(1); // 1:满板 |
| | | |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setUri(urlWMS) |
| | | .setPath("/inboundTaskApply") |
| | | .setJson(JSON.toJSONString(applyParam)) |
| | | .build() |
| | |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject != null && jsonObject.getInteger("code") != null && jsonObject.getInteger("code") == 200) { |
| | | log.info("入库任务申请成功,等待WMS下发任务。条码:{},站点:{}", barcode, inSta.getStaNo()); |
| | | staProtocol.setWorkNo(9998);//设置为9998等待上位机下发任务/9997是空板入库判断,待下发时也写入9998 |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (!result) { |
| | | LedErrorThreadUtil.ledErrorThread("更新plc站点信息失败!站点号:"+inSta.getStaNo(),inSta.getLed(), LedErrorAreaType.ONE_OTHER.getDesc()); |
| | | throw new CoolException("更新plc站点信息失败"); |
| | | } |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false,9998); |
| | | |
| | | |
| | | } else { |
| | | // // 获取工作号 |
| | | int workNo = commonService.getWorkNo(3); |
| | |
| | | // // 入出库模式判断 |
| | | // if (devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; } |
| | | |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk()) { |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk() ) { |
| | | // WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode); |
| | | WrkMast wrkMast = wrkMastMapper.selectPakInStep5(staProtocol.getSiteId(),"7"); |
| | | if (wrkMast == null) { |