diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java index 257a259..70968c2 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java @@ -826,6 +826,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName()); request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName())); request.setWeight(String.valueOf(weight)); + request.setVehicle_code(String.valueOf(barcode)); ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class); message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求LMS..."; lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request))); @@ -848,7 +849,8 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic /** - * 申请取走满料盅托盘 + * 入库 + * * * @param */ @@ -904,8 +906,8 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic dto.setLogType(LogTypeEnum.DEVICE_LOG.getDesc()); dto.setRemark(JSON.toJSONString(request)); lucene.deviceExecuteLog(dto); -// lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request))); -// log.info("{}",JSON.toJSONString(dto)); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request))); + log.info("{}",JSON.toJSONString(dto)); // log.info("{}",JSON.toJSONString(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)))); if (resp.getCode() == 200) { @@ -928,7 +930,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic } /** - * 申请强制取走满料盅托盘 + * 强制入库 * * @param */ 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 23c9266..47dc3fb 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 @@ -10,7 +10,6 @@ import lombok.extern.slf4j.Slf4j; import org.nl.acs.agv.AgvUtil; import org.nl.acs.config.AcsConfig; import org.nl.acs.device.service.DeviceService; -import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine.ItemProtocol; import org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine.LnshLaminatingMachineDeviceDriver; @@ -30,7 +29,6 @@ import org.nl.acs.device_driver.lnsh.lnsh_rgv.LnshRGVDeviceDriver; import org.nl.acs.device_driver.lnsh.lnsh_split_manipulator.LnshSplitManipulatorDeviceDriver; 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; @@ -45,7 +43,6 @@ import org.nl.acs.instruction.service.dto.Instruction; import org.nl.acs.opc.Device; import org.nl.acs.opc.DeviceAppService; import org.nl.acs.order.service.ProduceshiftorderService; -import org.nl.acs.order.service.dto.ProduceshiftorderDto; import org.nl.acs.route.service.RouteLineService; import org.nl.acs.route.service.dto.RouteLineDto; import org.nl.acs.task.service.TaskService; @@ -82,10 +79,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { private String log_type = "WMS下发ACS"; @Override - public JSONObject createFromWms(JSONObject req) { + public JSONObject + createFromWms(JSONObject req) { try { MDC.put(log_file_type, log_type); CreateTaskRequest tasks = JSON.toJavaObject(req, CreateTaskRequest.class); + log.info("LMS下发参数{}",tasks); JSONObject resultJson = new JSONObject(); CreateTaskResponse resp = new CreateTaskResponse(); log.info("createFromWms - 请求参数 {}", JSON.toJSON(resp)); @@ -116,6 +115,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { String next_parent_code = ""; //困料区需要方向 String direction=task.getDirection(); + String put_device_code=task.getPut_device_code(); JSONObject start_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + start_point_code + "'").uniqueResult(0); if (!ObjectUtil.isEmpty(start_device_json)) { @@ -229,6 +229,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("params", params); jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type)); jo.put("direction",direction); + jo.put("put_device_code",put_device_code); // 如果是无光电的设备 指令完成变更起点、终点状态 JSONObject startjo = new JSONObject(); startjo.put("device_code", start_device_code); diff --git a/acs/nladmin-system/src/main/resources/log/LnshRGVDeviceDriver.xml b/acs/nladmin-system/src/main/resources/log/LnshRGVDeviceDriver.xml index 76e6024..6920f4f 100644 --- a/acs/nladmin-system/src/main/resources/log/LnshRGVDeviceDriver.xml +++ b/acs/nladmin-system/src/main/resources/log/LnshRGVDeviceDriver.xml @@ -1,14 +1,33 @@ + + + + + + + + ${LOG_HOME}/RGV日志/%d{yyyy-MM-dd}.%i.log + + 15 + + 200MB + + 2GB + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + ${log.charset} + - - - - - + - + - + + + + +