#
tqs
2022-11-24 4dde09370c33cf49f8629d9bc66fce8ae3e374e1
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1256,12 +1256,6 @@
                    staProtocol = staProtocol.clone();
                }
//                // 入出库模式判断
//                if ( emptyInSta.getStaNo()==203 && devpThread.ioModeOf2F != IoModeType.PAKIN_MODE) { continue; }
                if (emptyInSta.getStaNo() == 203 && devpThread.ioModeOf2F == IoModeType.PAKOUT_MODE) {
                    continue;
                }
                // 站点条件判断
                if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable()
                        && staProtocol.isEmptyMk() && (staProtocol.getWorkNo() > 9990 && staProtocol.getWorkNo() <= 9999) && staProtocol.isPakMk()) {
@@ -1989,7 +1983,23 @@
            if (null != pakoutEmpty) {
                return;
            }
            //未开WMS分支,请求WMS生成空板出库未写
            try {
                String response = new HttpHandler.Builder()
                        .setUri(wmsUrl)
                        .setPath("/rpc/auto/emptyOut/v1")
                        .build()
                        .doPost();
                JSONObject jsonObject = JSON.parseObject(response);
                if (jsonObject.getInteger("code").equals(200)) {
                    JSONObject data = (JSONObject) jsonObject.get("data");
                    log.info((String) data.get("msg"));
                } else {
                    log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/auto/emptyOut/v1","", response);
                }
            } catch (Exception e) {
                e.printStackTrace();
                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
            }
        }
    }
@@ -2008,7 +2018,26 @@
                && (staProtocol.getWorkNo() == 0 || staProtocol.getWorkNo() > 9990) //工作号为0或者工作号是9991~9999(输送机留用)
        ) {
            //未开WMS分支,请求WMS生成空板入库未写
            try {
                LocTypeDto locTypeDto = new LocTypeDto((short) 1, (short) 1, (short) 1);
                String response = new HttpHandler.Builder()
                        .setUri(wmsUrl)
                        .setPath("/rpc/auto/emptyIn/v1")
                        .setJson(JSON.toJSONString(locTypeDto))
                        .build()
                        .doPost();
                JSONObject jsonObject = JSON.parseObject(response);
                if (jsonObject.getInteger("code").equals(200)) {
                    log.info((String) jsonObject.get("msg"));
                } else {
                    log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/auto/emptyIn/v1", JSON.toJSONString(locTypeDto), response);
                }
            } catch (Exception e) {
                e.printStackTrace();
                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
            }
        }
    }
}