diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java index 33790a6..6db8222 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java @@ -302,7 +302,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class); if (resp.getCode() == 200) { - this.writing(200); + this.writing(101); this.setRequireSucess(true); } else { this.writing(400); @@ -328,13 +328,13 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class); if (resp.getCode() == 200) { - this.writing(200); + this.writing(102); this.setRequireSucess(true); } else { this.writing(400); message = RequestMethodEnum.getName("order_finish") + "order_finish 接口请求失败" + resp.getMessage();; } - lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message)); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(resp))); } return true; } @@ -343,7 +343,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De * 压机叫料 * @return */ - public synchronized boolean press_request_material(){ + public synchronized boolean pressRequestMaterial(){ ApplyTaskRequest request = new ApplyTaskRequest(); request.setDevice_code(this.getDevice_code()); request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName()); @@ -351,7 +351,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De request.setOrder_code(String.valueOf(order_No)); ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)), ApplyTaskResponse.class); message = RequestMethodEnum.getName("pressRequestMaterial") + "pressRequestMaterial 接口请求LMS..."; - lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request))); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "请求参数:" + JSON.toJSONString(request))); if (resp.getCode() == 200) { this.writing(200); @@ -359,8 +359,9 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De } else { this.writing(400); message = RequestMethodEnum.getName("pressRequestMaterial") + "pressRequestMaterial 接口请求失败" + resp.getMessage(); - this.setRequireSucess(true); } + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(resp))); + return true; } /** @@ -384,8 +385,8 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De } else { this.writing(400); message = RequestMethodEnum.getName("apply_feedback_weight") + "apply_feedback_weight 接口请求失败" + resp.getMessage(); - ; } + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(resp))); return true; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java index bc231c5..d04e211 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java @@ -497,6 +497,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements jo.put("isOnline", isonline); jo.put("hasGoods", hasGoods); jo.put("message", message); + jo.put("hasGoods",hasGoods); return jo; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/WmstoAcsData/createOrder/OrderDto.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/WmstoAcsData/createOrder/OrderDto.java index d8177ba..144c1c4 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/WmstoAcsData/createOrder/OrderDto.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/WmstoAcsData/createOrder/OrderDto.java @@ -8,9 +8,9 @@ public class OrderDto { private String workorder_code; // 工单编码 private String device_code; // 设备编码 private String material_code; // 半成品物料编码 - 工单物料编码 - private String product_code; // 产品代号 - 成品 - private String formula; // 配方-泥料 - private String brick_code; // 砖型编码 + private String product_code; // 产品代号 - 数字 + private String formula; // 配方-型号 + private String brick_code; // 砖型编码- 物料规格 private String plan_qty; // 计划数量 private String a; // a边 private String b; // diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index 65e7904..4331c5e 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -338,7 +338,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { Boolean is_flag = false; OrderDto orderDto = orders.getList().get(i); - String produce_code = orderDto.getProduct_code(); + String order_code = orderDto.getWorkorder_code(); String device_code = orderDto.getDevice_code(); String material_code = orderDto.getMaterial_code(); String qty = orderDto.getPlan_qty(); @@ -360,9 +360,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { String detection_error = orderDto.getDetection_error(); - if (StrUtil.isEmpty(produce_code)) { + if (StrUtil.isEmpty(order_code)) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","工单编码不能为空"); errArr.add(json); @@ -372,7 +372,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { Device device = DeviceAppService.findDeviceByCode(device_code); if (ObjectUtil.isEmpty(device)) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","未找到对应设备"); errArr.add(json); @@ -387,7 +387,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { lnshMixingMillDeviceDriver = (LnshMixingMillDeviceDriver) device.getDeviceDriver(); if (lnshMixingMillDeviceDriver.getMode() == 0) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","设备未联机"); errArr.add(json); @@ -395,7 +395,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { } if (StrUtil.isEmpty(qty)) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","重量不能为空"); errArr.add(json); @@ -403,13 +403,13 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { } if (StrUtil.isEmpty(material_code)) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","物料编号不能为空"); errArr.add(json); continue; } - lnshMixingMillDeviceDriver.writing("to_order_No", produce_code); + lnshMixingMillDeviceDriver.writing("to_order_No", order_code); lnshMixingMillDeviceDriver.writing("to_weight", qty); lnshMixingMillDeviceDriver.writing("to_material_code", material_code); lnshMixingMillDeviceDriver.writing(100); @@ -419,7 +419,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { lnshPressDeviceDriver = (LnshPressDeviceDriver) device.getDeviceDriver(); if (lnshPressDeviceDriver.getMode() == 0) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","设备未联机"); errArr.add(json); @@ -427,7 +427,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { } if (StrUtil.isEmpty(qty)) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","重量不能为空"); errArr.add(json); @@ -435,13 +435,13 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { } if (StrUtil.isEmpty(material_code)) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","物料编号不能为空"); errArr.add(json); continue; } - lnshPressDeviceDriver.writing("to_order_No", produce_code); + lnshPressDeviceDriver.writing("to_order_No", order_code); lnshPressDeviceDriver.writing("to_qty", qty); lnshPressDeviceDriver.writing("to_material_code", material_code); lnshPressDeviceDriver.writing("to_product_code", product_code); @@ -467,7 +467,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { lnshPackagePalletManipulatorDeviceDriver = (LnshPackagePalletManipulatorDeviceDriver) device.getDeviceDriver(); if (lnshPackagePalletManipulatorDeviceDriver.getMode() == 0) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","设备未联机"); errArr.add(json); @@ -475,7 +475,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { } if (StrUtil.isEmpty(qty)) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","重量不能为空"); errArr.add(json); @@ -483,13 +483,13 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { } if (StrUtil.isEmpty(material_code)) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","物料编号不能为空"); errArr.add(json); continue; } - lnshPackagePalletManipulatorDeviceDriver.writing("to_order_No", produce_code); + lnshPackagePalletManipulatorDeviceDriver.writing("to_order_No", order_code); lnshPackagePalletManipulatorDeviceDriver.writing("to_material", material_code); lnshPackagePalletManipulatorDeviceDriver.writing("to_product_code", product_code); lnshPackagePalletManipulatorDeviceDriver.writing("to_AlongSide", AlongSide); @@ -503,7 +503,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { lnshSplitManipulatorDeviceDriver = (LnshSplitManipulatorDeviceDriver) device.getDeviceDriver(); if (lnshSplitManipulatorDeviceDriver.getMode() == 0) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","设备未联机"); errArr.add(json); @@ -511,7 +511,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { } if (StrUtil.isEmpty(qty)) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","重量不能为空"); errArr.add(json); @@ -519,13 +519,13 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { } if (StrUtil.isEmpty(material_code)) { JSONObject json = new JSONObject(); - json.put("produce_code", produce_code); + json.put("order_code", order_code); json.put("devicie_code", device_code); json.put("message","物料编号不能为空"); errArr.add(json); continue; } - lnshSplitManipulatorDeviceDriver.writing("to_order_No", produce_code); + lnshSplitManipulatorDeviceDriver.writing("to_order_No", order_code); lnshSplitManipulatorDeviceDriver.writing("to_material_qty", qty); lnshSplitManipulatorDeviceDriver.writing("to_material_code", material_code); lnshSplitManipulatorDeviceDriver.writing("to_product_code", product_code);