|
|
@ -31,6 +31,9 @@ import org.nl.acs.device_driver.lnsh.lnsh_split_manipulator.LnshSplitManipulator |
|
|
|
import org.nl.acs.device_driver.lnsh.lnsh_station.LnshStationDeviceDriver; |
|
|
|
import org.nl.acs.device_driver.standard_autodoor.StandardAutodoorDeviceDriver; |
|
|
|
import org.nl.acs.ext.wms.data.AcsToWmsData.grab_place_station.GrabPlaceStationResponse; |
|
|
|
import org.nl.acs.ext.wms.data.WmstoAcsData.createOrder.CreateOrderRequest; |
|
|
|
import org.nl.acs.ext.wms.data.WmstoAcsData.createOrder.CreateOrderResponse; |
|
|
|
import org.nl.acs.ext.wms.data.WmstoAcsData.createOrder.OrderDto; |
|
|
|
import org.nl.acs.ext.wms.data.WmstoAcsData.createTask.CreateTaskRequest; |
|
|
|
import org.nl.acs.ext.wms.data.WmstoAcsData.createTask.CreateTaskResponse; |
|
|
|
import org.nl.acs.ext.wms.data.WmstoAcsData.putAction.PutActionRequest; |
|
|
@ -191,12 +194,17 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
// if (!StrUtil.isEmpty(vehicle_code) && !"0000".equals(vehicle_code)) {
|
|
|
|
// TaskDto vehicle_dto = TaskService.findByContainer(vehicle_code);
|
|
|
|
// if (vehicle_dto != null) {
|
|
|
|
// throw new WDKException("已存在该载具号的任务!");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
if (!StrUtil.isEmpty(vehicle_code)) { |
|
|
|
TaskDto vehicle_dto = TaskService.findByContainer(vehicle_code); |
|
|
|
if (vehicle_dto != null) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("task_code", task_code); |
|
|
|
json.put("ext_task_id", ext_task_uuid); |
|
|
|
json.put("message", "已存在该载具号的任务"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
jo.put("task_code", task_code); |
|
|
|
jo.put("ext_task_uuid", ext_task_uuid); |
|
|
@ -316,150 +324,218 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Map<String, Object> createOrder(String param) throws Exception { |
|
|
|
JSONArray orders = JSONArray.parseArray(param); |
|
|
|
log.info("createOrder - 请求参数 {}", orders.toString()); |
|
|
|
|
|
|
|
for (int i = 0; i < orders.size(); i++) { |
|
|
|
Boolean is_flag = false; |
|
|
|
|
|
|
|
JSONObject json = orders.getJSONObject(i); |
|
|
|
String producetask_code = json.getString("workorder_code"); |
|
|
|
String device_code = json.getString("device_code"); |
|
|
|
String material_code = json.getString("material_code"); |
|
|
|
String qty = json.getString("plan_qty"); |
|
|
|
String product_code = json.getString("product_code"); |
|
|
|
String AlongSide = json.getString("a"); |
|
|
|
String BshortSide = json.getString("b"); |
|
|
|
String Htrapezoidal = json.getString("h"); |
|
|
|
String Wthickness = json.getString("w"); |
|
|
|
|
|
|
|
if (StrUtil.isEmpty(producetask_code)) { |
|
|
|
throw new BadRequestException("工单编码不能为空!"); |
|
|
|
} |
|
|
|
|
|
|
|
Device device = DeviceAppService.findDeviceByCode(device_code); |
|
|
|
if (ObjectUtil.isEmpty(device)) { |
|
|
|
throw new Exception("未找到对应设备:" + device_code); |
|
|
|
} |
|
|
|
|
|
|
|
LnshMixingMillDeviceDriver lnshMixingMillDeviceDriver; |
|
|
|
LnshPressDeviceDriver lnshPressDeviceDriver; |
|
|
|
LnshPackagePalletManipulatorDeviceDriver lnshPackagePalletManipulatorDeviceDriver; |
|
|
|
LnshSplitManipulatorDeviceDriver lnshSplitManipulatorDeviceDriver; |
|
|
|
if (device.getDeviceDriver() instanceof LnshMixingMillDeviceDriver) { |
|
|
|
lnshMixingMillDeviceDriver = (LnshMixingMillDeviceDriver) device.getDeviceDriver(); |
|
|
|
if (lnshMixingMillDeviceDriver.getMode() == 0) { |
|
|
|
throw new BadRequestException("设备未联机,下发失败!"); |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(qty)) { |
|
|
|
throw new BadRequestException("重量不能为空!"); |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(material_code)) { |
|
|
|
throw new BadRequestException("物料编码不能为空!"); |
|
|
|
} |
|
|
|
lnshMixingMillDeviceDriver.writing("to_order_No", producetask_code); |
|
|
|
lnshMixingMillDeviceDriver.writing("to_weight", qty); |
|
|
|
lnshMixingMillDeviceDriver.writing("to_material_code", material_code); |
|
|
|
lnshMixingMillDeviceDriver.writing("to_order_No", producetask_code); |
|
|
|
lnshMixingMillDeviceDriver.writing("to_weight", qty); |
|
|
|
lnshMixingMillDeviceDriver.writing("to_material_code", material_code); |
|
|
|
lnshMixingMillDeviceDriver.writing(100); |
|
|
|
lnshMixingMillDeviceDriver.writing(100); |
|
|
|
is_flag = true; |
|
|
|
} |
|
|
|
if (device.getDeviceDriver() instanceof LnshPressDeviceDriver) { |
|
|
|
lnshPressDeviceDriver = (LnshPressDeviceDriver) device.getDeviceDriver(); |
|
|
|
if (lnshPressDeviceDriver.getMode() == 0) { |
|
|
|
throw new BadRequestException("设备未联机,下发失败!"); |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(qty)) { |
|
|
|
throw new BadRequestException("数量不能为空!"); |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(material_code)) { |
|
|
|
throw new BadRequestException("物料编码不能为空!"); |
|
|
|
} |
|
|
|
lnshPressDeviceDriver.writing("to_order_No", producetask_code); |
|
|
|
lnshPressDeviceDriver.writing("to_qty", qty); |
|
|
|
lnshPressDeviceDriver.writing("to_material_code", material_code); |
|
|
|
lnshPressDeviceDriver.writing("to_product_code", product_code); |
|
|
|
lnshPressDeviceDriver.writing("to_AlongSide", AlongSide); |
|
|
|
lnshPressDeviceDriver.writing("to_BshortSide", BshortSide); |
|
|
|
lnshPressDeviceDriver.writing("to_Htrapezoidal", Htrapezoidal); |
|
|
|
lnshPressDeviceDriver.writing("to_Wthickness", Wthickness); |
|
|
|
lnshPressDeviceDriver.writing("to_order_No", producetask_code); |
|
|
|
lnshPressDeviceDriver.writing("to_qty", qty); |
|
|
|
lnshPressDeviceDriver.writing("to_material_code", material_code); |
|
|
|
lnshPressDeviceDriver.writing("to_product_code", product_code); |
|
|
|
lnshPressDeviceDriver.writing("to_AlongSide", AlongSide); |
|
|
|
lnshPressDeviceDriver.writing("to_BshortSide", BshortSide); |
|
|
|
lnshPressDeviceDriver.writing("to_Htrapezoidal", Htrapezoidal); |
|
|
|
lnshPressDeviceDriver.writing("to_Wthickness", Wthickness); |
|
|
|
lnshPressDeviceDriver.writing(100); |
|
|
|
lnshPressDeviceDriver.writing(100); |
|
|
|
is_flag = true; |
|
|
|
} |
|
|
|
if (device.getDeviceDriver() instanceof LnshPackagePalletManipulatorDeviceDriver) { |
|
|
|
lnshPackagePalletManipulatorDeviceDriver = (LnshPackagePalletManipulatorDeviceDriver) device.getDeviceDriver(); |
|
|
|
if (lnshPackagePalletManipulatorDeviceDriver.getMode() == 0) { |
|
|
|
throw new BadRequestException("设备未联机,下发失败!"); |
|
|
|
public JSONObject createOrder(JSONObject param) throws Exception { |
|
|
|
try{ |
|
|
|
MDC.put(log_file_type, log_type); |
|
|
|
CreateOrderRequest orders = JSON.toJavaObject(param, CreateOrderRequest.class); |
|
|
|
CreateOrderResponse resp = new CreateOrderResponse(); |
|
|
|
String request_no = orders.getRequestNo(); |
|
|
|
JSONArray errArr = new JSONArray(); |
|
|
|
log.info("CreateOrderRequest - 请求参数 {}", orders.toString()); |
|
|
|
|
|
|
|
for (int i = 0; i < orders.getList().size(); i++) { |
|
|
|
Boolean is_flag = false; |
|
|
|
|
|
|
|
OrderDto orderDto = orders.getList().get(i); |
|
|
|
String produce_code = orderDto.getProduct_code(); |
|
|
|
String device_code = orderDto.getDevice_code(); |
|
|
|
String material_code = orderDto.getMaterial_code(); |
|
|
|
String qty = orderDto.getPlan_qty(); |
|
|
|
String product_code = orderDto.getProduct_code(); |
|
|
|
String AlongSide = orderDto.getA(); |
|
|
|
String BshortSide = orderDto.getB(); |
|
|
|
String Htrapezoidal = orderDto.getH(); |
|
|
|
String Wthickness = orderDto.getW(); |
|
|
|
String formula = orderDto.getFormula(); |
|
|
|
String brick_code = orderDto.getBrick_code(); |
|
|
|
String size_error = orderDto.getSize_error(); |
|
|
|
String single_weight = orderDto.getSingle_weight(); |
|
|
|
String drawing_address = orderDto.getDrawing_address(); |
|
|
|
String standard_size_height1 = orderDto.getStandard_size_height1(); |
|
|
|
String standard_size_height2 = orderDto.getStandard_size_height2(); |
|
|
|
String standard_size_height3 = orderDto.getStandard_size_height3(); |
|
|
|
String standard_size_height4 = orderDto.getStandard_size_height4(); |
|
|
|
String standard_weight = orderDto.getStandard_weight(); |
|
|
|
String detection_error = orderDto.getDetection_error(); |
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isEmpty(produce_code)) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","工单编码不能为空"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(qty)) { |
|
|
|
throw new BadRequestException("数量不能为空"); |
|
|
|
|
|
|
|
Device device = DeviceAppService.findDeviceByCode(device_code); |
|
|
|
if (ObjectUtil.isEmpty(device)) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","未找到对应设备"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(material_code)) { |
|
|
|
throw new BadRequestException("物料编号不能为空!"); |
|
|
|
|
|
|
|
LnshMixingMillDeviceDriver lnshMixingMillDeviceDriver; |
|
|
|
LnshPressDeviceDriver lnshPressDeviceDriver; |
|
|
|
LnshPackagePalletManipulatorDeviceDriver lnshPackagePalletManipulatorDeviceDriver; |
|
|
|
LnshSplitManipulatorDeviceDriver lnshSplitManipulatorDeviceDriver; |
|
|
|
if (device.getDeviceDriver() instanceof LnshMixingMillDeviceDriver) { |
|
|
|
lnshMixingMillDeviceDriver = (LnshMixingMillDeviceDriver) device.getDeviceDriver(); |
|
|
|
if (lnshMixingMillDeviceDriver.getMode() == 0) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","设备未联机"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(qty)) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","重量不能为空"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(material_code)) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","物料编号不能为空"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
lnshMixingMillDeviceDriver.writing("to_order_No", produce_code); |
|
|
|
lnshMixingMillDeviceDriver.writing("to_weight", qty); |
|
|
|
lnshMixingMillDeviceDriver.writing("to_material_code", material_code); |
|
|
|
lnshMixingMillDeviceDriver.writing(100); |
|
|
|
is_flag = true; |
|
|
|
} |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_order_No", producetask_code); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_material", material_code); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_product_code", product_code); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_AlongSide", AlongSide); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_BshortSide", BshortSide); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_Htrapezoidal", Htrapezoidal); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_Wthickness", Wthickness); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_order_No", producetask_code); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_material", material_code); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_product_code", product_code); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_AlongSide", AlongSide); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_BshortSide", BshortSide); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_Htrapezoidal", Htrapezoidal); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_Wthickness", Wthickness); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing(100); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing(100); |
|
|
|
is_flag = true; |
|
|
|
} |
|
|
|
if (device.getDeviceDriver() instanceof LnshSplitManipulatorDeviceDriver) { |
|
|
|
lnshSplitManipulatorDeviceDriver = (LnshSplitManipulatorDeviceDriver) device.getDeviceDriver(); |
|
|
|
if (lnshSplitManipulatorDeviceDriver.getMode() == 0) { |
|
|
|
throw new BadRequestException("设备未联机,下发失败!"); |
|
|
|
if (device.getDeviceDriver() instanceof LnshPressDeviceDriver) { |
|
|
|
lnshPressDeviceDriver = (LnshPressDeviceDriver) device.getDeviceDriver(); |
|
|
|
if (lnshPressDeviceDriver.getMode() == 0) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","设备未联机"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(qty)) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","重量不能为空"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(material_code)) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","物料编号不能为空"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
lnshPressDeviceDriver.writing("to_order_No", produce_code); |
|
|
|
lnshPressDeviceDriver.writing("to_qty", qty); |
|
|
|
lnshPressDeviceDriver.writing("to_material_code", material_code); |
|
|
|
lnshPressDeviceDriver.writing("to_product_code", product_code); |
|
|
|
lnshPressDeviceDriver.writing("to_AlongSide", AlongSide); |
|
|
|
lnshPressDeviceDriver.writing("to_BshortSide", BshortSide); |
|
|
|
lnshPressDeviceDriver.writing("to_Htrapezoidal", Htrapezoidal); |
|
|
|
lnshPressDeviceDriver.writing("to_Wthickness", Wthickness); |
|
|
|
lnshPressDeviceDriver.writing("to_brick_code", brick_code); |
|
|
|
lnshPressDeviceDriver.writing("to_formula", formula); |
|
|
|
lnshPressDeviceDriver.writing("to_size_error", size_error); |
|
|
|
lnshPressDeviceDriver.writing("to_single_weight", single_weight); |
|
|
|
lnshPressDeviceDriver.writing("to_drawing_address", drawing_address); |
|
|
|
lnshPressDeviceDriver.writing("to_standard_weight", standard_weight); |
|
|
|
lnshPressDeviceDriver.writing("to_detection_error", detection_error); |
|
|
|
lnshPressDeviceDriver.writing("to_standard_size_height1", standard_size_height1); |
|
|
|
lnshPressDeviceDriver.writing("to_standard_size_height2", standard_size_height2); |
|
|
|
lnshPressDeviceDriver.writing("to_standard_size_height3", standard_size_height3); |
|
|
|
lnshPressDeviceDriver.writing("to_standard_size_height4", standard_size_height4); |
|
|
|
lnshPressDeviceDriver.writing(100); |
|
|
|
is_flag = true; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(qty)) { |
|
|
|
throw new BadRequestException("数量不能为空"); |
|
|
|
if (device.getDeviceDriver() instanceof LnshPackagePalletManipulatorDeviceDriver) { |
|
|
|
lnshPackagePalletManipulatorDeviceDriver = (LnshPackagePalletManipulatorDeviceDriver) device.getDeviceDriver(); |
|
|
|
if (lnshPackagePalletManipulatorDeviceDriver.getMode() == 0) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","设备未联机"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(qty)) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","重量不能为空"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(material_code)) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","物料编号不能为空"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_order_No", produce_code); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_material", material_code); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_product_code", product_code); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_AlongSide", AlongSide); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_BshortSide", BshortSide); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_Htrapezoidal", Htrapezoidal); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing("to_Wthickness", Wthickness); |
|
|
|
lnshPackagePalletManipulatorDeviceDriver.writing(100); |
|
|
|
is_flag = true; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(material_code)) { |
|
|
|
throw new BadRequestException("物料编号不能为空!"); |
|
|
|
if (device.getDeviceDriver() instanceof LnshSplitManipulatorDeviceDriver) { |
|
|
|
lnshSplitManipulatorDeviceDriver = (LnshSplitManipulatorDeviceDriver) device.getDeviceDriver(); |
|
|
|
if (lnshSplitManipulatorDeviceDriver.getMode() == 0) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","设备未联机"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(qty)) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","重量不能为空"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (StrUtil.isEmpty(material_code)) { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("produce_code", produce_code); |
|
|
|
json.put("devicie_code", device_code); |
|
|
|
json.put("message","物料编号不能为空"); |
|
|
|
errArr.add(json); |
|
|
|
continue; |
|
|
|
} |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_order_No", produce_code); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_material_qty", qty); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_material_code", material_code); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_product_code", product_code); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_AlongSide", AlongSide); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_BshortSide", BshortSide); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_Htrapezoidal", Htrapezoidal); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_Wthickness", Wthickness); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing(100); |
|
|
|
is_flag = true; |
|
|
|
} |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_order_No", producetask_code); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_material_qty", qty); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_material_code", material_code); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_product_code", product_code); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_AlongSide", AlongSide); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_BshortSide", BshortSide); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_Htrapezoidal", Htrapezoidal); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_Wthickness", Wthickness); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_order_No", producetask_code); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_material_qty", qty); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_material_code", material_code); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_product_code", product_code); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_AlongSide", AlongSide); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_BshortSide", BshortSide); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_Htrapezoidal", Htrapezoidal); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing("to_Wthickness", Wthickness); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing(100); |
|
|
|
lnshSplitManipulatorDeviceDriver.writing(100); |
|
|
|
is_flag = true; |
|
|
|
} |
|
|
|
//下发成功后,写入工单信息表记录
|
|
|
|
//下发成功后,写入工单信息表记录
|
|
|
|
|
|
|
|
// ProduceshiftorderDto dto = new ProduceshiftorderDto();
|
|
|
|
// dto.setDevice_code(device_code);
|
|
|
@ -476,14 +552,23 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { |
|
|
|
// dto.setProduct_code(product_code);
|
|
|
|
// produceshiftorderService.create(dto);
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
JSONObject resultJson = new JSONObject(); |
|
|
|
resultJson.put("status", HttpStatus.OK.value()); |
|
|
|
resultJson.put("message", "操作成功"); |
|
|
|
resultJson.put("data", new JSONObject()); |
|
|
|
log.info("createOrder - 返回参数 {}", resultJson.toString()); |
|
|
|
return resultJson; |
|
|
|
if(errArr.size()>0){ |
|
|
|
resp.setErrArr(errArr); |
|
|
|
resp.setCode(HttpStatus.BAD_REQUEST.value()); |
|
|
|
} else { |
|
|
|
resp.setCode(HttpStatus.OK.value()); |
|
|
|
} |
|
|
|
resp.setRequestNo(request_no); |
|
|
|
resp.setResponseDate(AgvUtil.getDate()); |
|
|
|
resp.setMessage("请求成功"); |
|
|
|
log.info("createOrder - 返回参数 {}", JSON.toJSON(resp)); |
|
|
|
return (JSONObject) JSON.toJSON(resp); |
|
|
|
|
|
|
|
} finally { |
|
|
|
MDC.remove(log_file_type); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|