| | |
| | | param.setBarcode(barcode); |
| | | param.setIoType(1); |
| | | param.setSourceStaNo(inSta.getStaNo()); |
| | | param.setLocType1((short) 1); |
| | | param.setLocType1(staProtocol.getLocType1().shortValue()); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/rpc/pakin/loc/v1") |
| | |
| | | |
| | | R result = openUtils.createInTask(createInTaskParam); |
| | | News.info("创建入库任务,任务数据={},WMS响应={},请求响应={}", JSON.toJSON(param), JSON.toJSON(jsonObject), JSON.toJSON(result)); |
| | | try{ |
| | | String msg = ""; |
| | | HashMap<String, String> hashMap = new HashMap<>(); |
| | | hashMap.put("msg", msg); |
| | | hashMap.put("sta", "31001"); |
| | | new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/rpc/led/getError") |
| | | .setJson(JSON.toJSONString(hashMap)) |
| | | .build() |
| | | .doPost(); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | | }else { |
| | | String msg = jsonObject.getString("msg"); |
| | | HashMap<String, String> hashMap = new HashMap<>(); |
| | | hashMap.put("msg", msg); |
| | | hashMap.put("sta", "31001"); |
| | | new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/rpc/led/getError") |
| | | .setJson(JSON.toJSONString(hashMap)) |
| | | .build() |
| | | .doPost(); |
| | | News.error("入库申请失败,任务数据={},请求响应={}", JSON.toJSON(param), JSON.toJSON(jsonObject)); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | continue; |
| | | } |
| | | |
| | | //解析前判断内部目标值是否有物 有工作号 |
| | | StaProtocol staProtocolInside = devpThread.getStation().get(Utils.getStaByLev(Utils.getLev(task.getDestLoc()))); |
| | | if (staProtocolInside == null) { |
| | | continue; |
| | | } |
| | | if (staProtocolInside.isLoading() || staProtocolInside.getWorkNo() !=0) { |
| | | continue; |
| | | } |
| | | |
| | | if (Cools.isEmpty(task.getShuttleNo())) { |
| | | //分配小车 |
| | |
| | | .eq(BasLed::getDeviceId, ledDevice.getId())); |
| | | List<Integer> staArr = JSON.parseArray(led.getSta(), Integer.class); |
| | | |
| | | BasConveyor basConveyor = basConveyorService.getById(led.getConveyorId().intValue()); |
| | | BasConveyor basConveyor = basConveyorService.getById(new LambdaQueryWrapper<BasConveyor>() |
| | | .eq(BasConveyor::getDeviceId, led.getConveyorId().intValue())); |
| | | if (basConveyor == null) { |
| | | continue; |
| | | } |