#
gtsxc
2024-11-18 8f1d32397b1b30f51d641513898d3f36cb0e515d
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java
@@ -225,7 +225,7 @@
                            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")
@@ -255,7 +255,32 @@
                                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) {
@@ -485,6 +510,14 @@
                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())) {
                //分配小车
@@ -897,7 +930,8 @@
                    .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;
            }