#
zjj
2023-12-04 82e14834b38c398f6bc75e8b7454a0b223be2a66
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -96,13 +96,18 @@
        toWmsDTO.setApplyType("TUNNEL");
        toWmsDTO.setWharfSource(null);
        toWmsDTO.setCanInboundTunnels(list);
        String response = new HttpHandler.Builder()
                .setHeaders(map)
                .setUri(wmsUrl)
                .setPath("wcsManager/wcsInterface/inboundTaskApply")
                .setJson(JSON.toJSONString(toWmsDTO))
                .build()
                .doPost();
        String response = null;
        try {
            response = new HttpHandler.Builder()
                    .setHeaders(map)
                    .setUri(wmsUrl)
                    .setPath("wcsManager/wcsInterface/inboundTaskApply")
                    .setJson(JSON.toJSONString(toWmsDTO))
                    .build()
                    .doPost();
        }catch (Exception e){
            return R.error("wms连接失败"+e.getMessage());
        }
        JSONObject jsonObject = JSON.parseObject(response);
        if (jsonObject.getInteger("code").equals(200)) {
@@ -128,7 +133,7 @@
        map.put("J-1107",114);map.put("J-1108",113);
        map.put("J-1109",118);map.put("J-1110",117);
        map.put("J-1111",122);map.put("J-1112",121);
        map.put("H-1101",305);map.put("H-1102",300);
        // 根据输送线plc遍历
        for (DevpSlave devp : slaveProperties.getDevp()) {
            // 获取入库站信息
@@ -150,7 +155,7 @@
                    }else {
                        if (staProtocol.isLoading() && !staProtocol.isCar() && workNo == 0){
                            //AGV入库完成以后
                            staProtocol.setWorkNo((short) 9998);
                            staProtocol.setWorkNo((short) 9999);
                            staProtocol.setStaNo(inSta.getStaNo().shortValue());
                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                            if (result) {
@@ -179,7 +184,7 @@
        map.put(115,4);
        map.put(119,5);
        map.put(123,6);
        map.put(300,7);
        //map.put(301,7);
        // 根据输送线plc遍历
        for (DevpSlave devp : slaveProperties.getDevp()) {
            // 遍历入库口
@@ -194,6 +199,9 @@
                }
                Short workNo = staProtocol.getWorkNo();
                if (workNo == 0 && !staProtocol.isLoading()){
                    if (Cools.isEmpty(map.get(inSta.getStaNo()))){
                        continue;
                    }
                    list.add(map.get(inSta.getStaNo()));
                }
            }