diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java index 7528cd9..c1816f6 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java @@ -521,4 +521,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { return result; } + + public static void main(String[] args) { + String str = "10001"; + System.out.println(StrUtil.startWith(str, "-") ); + } } diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/ext/xr_lk/service/impl/AcsToXRlkServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/ext/xr_lk/service/impl/AcsToXRlkServiceImpl.java index 1f7bdcc..0a3482f 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/ext/xr_lk/service/impl/AcsToXRlkServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/ext/xr_lk/service/impl/AcsToXRlkServiceImpl.java @@ -30,6 +30,7 @@ public class AcsToXRlkServiceImpl implements AcsToXrlkService { @Autowired AddressService addressService; + @Autowired private final LogServer logServer; @Override @@ -61,14 +62,14 @@ public class AcsToXRlkServiceImpl implements AcsToXrlkService { AddressDto addressDto = addressService.findByCode("isPutPermission"); String url = wcsurl + addressDto.getMethods_url() + device_code; HttpResponse result = null; - log.info("isPutPermission-----请求url{}",url); + log.info("isPutPermission-----请求url"+url); try { //{"status":400,"timestamp":"2021-10-22 16:32:22","message":"业务类型不正确!"} result = HttpRequest.get(url) .execute(); - log.info("isPutPermission-----反馈{}", result); + log.info("isPutPermission-----反馈"+ result); System.out.println(result); } catch (Exception e) { String msg = e.getMessage(); @@ -109,19 +110,21 @@ public class AcsToXRlkServiceImpl implements AcsToXrlkService { JSONObject jo = new JSONObject(); jo.put("station",device_code); jo.put("type",type); - log.info("AGVWorkStatus-----请求参数{}", jo.toString()); + log.info("AGVWorkStatus-----请求参数"+ jo.toString()); try { //{"status":400,"timestamp":"2021-10-22 16:32:22","message":"业务类型不正确!"} result = HttpRequest.post(url).body(String.valueOf(jo)) .execute(); System.out.println(result); - log.info("AGVWorkStatus-----反馈{}", result); + log.info("AGVWorkStatus-----反馈"+ result); } catch (Exception e) { String msg = e.getMessage(); //网络不通 System.out.println(msg); + log.info("AGVWorkStatus-----反馈"+ msg); + } return result; } diff --git a/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java b/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java index d6836ea..44d0ff8 100644 --- a/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java +++ b/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java @@ -127,11 +127,11 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { bs.append(temp < 16 ? bs1.append(Integer.toHexString(temp)) : Integer.toHexString(temp)); } - System.out.println("收到请求参数:" + bs); +// System.out.println("收到请求参数:" + bs); boolean flag = false; if (arr[8] * 256 + arr[9] == 0x73) { byte[] data = null; - System.out.println("接收agv上报信息:" + bs); +// System.out.println("接收agv上报信息:" + bs); //执行阶段 int phase = arr[16] * 256 + arr[17]; // agv任务号 @@ -830,7 +830,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { case 1: TaskDto taskDto = taskService.findByCode(inst.getTask_code()); boolean tag = false; - if (!StrUtil.startWith(inst.getTask_code(), "-") || StrUtil.equals(taskDto.getTask_type(),"3")) { + if (StrUtil.startWith(inst.getTask_code(), "-") || StrUtil.equals(taskDto.getTask_type(),"3")) { tag = true; } @@ -889,13 +889,16 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { HttpResponse response = acsToXrlkService.isTakePermission(device.getDevice_code()); if (response.getStatus() == 200) { JSONObject jo = JSONObject.fromObject(response.body()); + log.info("AGV请求取货设备:" + jo.toString()); if (StrUtil.equals(jo.get("result").toString(), "1")) { data = AgvService.sendAgvOneModeInst(phase, index, 0); } else { log.info("AGV请求取货设备{},立库WMS不允许取货", device_code); + log.info("AGV请求取货设备立库WMS不允许取货"); } } else { log.info("AGV请求取货设备{},接口请求立库WMS失败", device_code); + log.info("AGV请求取货设备立库WMS失败"); } } else { data = AgvService.sendAgvOneModeInst(phase, index, 0); @@ -964,10 +967,12 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { HttpResponse response = acsToXrlkService.AGVWorkStatus(device.getDevice_code(), "2"); if (response.getStatus() == 200) { JSONObject jo = JSONObject.fromObject(response.body()); + log.info("AGV取货完成请求请求立库" + jo.toString()); if (StrUtil.equals(jo.get("result").toString(), "1")) { - log.info("AGV取货完成请求请求立库:{}", jo.toString()); + log.info("AGV取货完成请求请求立库成功"); data = AgvService.sendAgvOneModeInst(phase, index, 0); } else { + log.info("AGV取货完成请求请求立库失败"); log.info("AGV取货完成反馈设备{},{}", device_code, jo.getString("message")); } } else { @@ -975,6 +980,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { } } else { data = AgvService.sendAgvOneModeInst(phase, index, 0); + log.info("AGV取货完成不需要反馈立库"); } } if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { @@ -3770,7 +3776,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { e.printStackTrace(); } } else { - System.out.println("agv上报不是0073类型动作,不处理"); +// System.out.println("agv上报不是0073类型动作,不处理"); } } @@ -3799,7 +3805,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { public static void write(byte[] b) { try { log.info("下发agv数据:" + Bytes2HexString(b)); - System.out.println("下发agv数据:" + Bytes2HexString(b)); +// System.out.println("下发agv数据:" + Bytes2HexString(b)); dos.write(b); dos.flush(); } catch (IOException e) { diff --git a/hd/nladmin-system/src/main/resources/log/AcsToErp.xml b/hd/nladmin-system/src/main/resources/log/AcsToErp.xml deleted file mode 100644 index e4b257c..0000000 --- a/hd/nladmin-system/src/main/resources/log/AcsToErp.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - ${LOG_HOME}/ACS请求ERP/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - - - - - - - - - - -