diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java
index 1c6c92b..2af0ee4 100644
--- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java
+++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java
@@ -14,6 +14,7 @@ import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.impl.InstructionServiceImpl;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.opc.DeviceAppService;
+import org.nl.acs.task.service.TaskService;
import org.nl.system.service.lucene.LuceneExecuteLogService;
import org.nl.system.service.param.ISysParamService;
import org.nl.config.SpringContextHolder;
@@ -79,6 +80,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class);
DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class);
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
+ TaskService taskService=SpringContextHolder.getBean(TaskService.class);
ip = paramService.findByCode(AcsConfig.AGVURL).getValue();
port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT).getValue());
@@ -183,6 +185,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
if (!ObjectUtil.isEmpty(inst)) {
if (!ObjectUtil.isEmpty(inst)) {
instructionService.cancelNOSendAgv(inst.getInstruction_id());
+ taskService.cancel(inst.getTask_id());
}
}
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
index 0346679..aff279b 100644
--- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
+++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
@@ -115,7 +115,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
if (arr[18] * 256 + arr[19] == 0) {
}
- data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0);
+ data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
}
//普通站点
@@ -125,11 +125,11 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
- TaskDto task =taskService.findById(inst.getTask_id());
- int start_height= ObjectUtil.isNotEmpty(task.getStart_height())?Integer.parseInt(task.getStart_height()):0;
- int next_height= ObjectUtil.isNotEmpty(task.getNext_height())?Integer.parseInt(task.getNext_height()):0;
- String start_point=task.getStart_point_code();
- String next_point=task.getNext_point_code();
+ TaskDto task = taskService.findById(inst.getTask_id());
+ int start_height = ObjectUtil.isNotEmpty(task.getStart_height()) ? Integer.parseInt(task.getStart_height()) : 0;
+ int next_height = ObjectUtil.isNotEmpty(task.getNext_height()) ? Integer.parseInt(task.getNext_height()) : 0;
+ String start_point = task.getStart_point_code();
+ String next_point = task.getNext_point_code();
//分配 车id
//(不需要WCS反馈)
@@ -220,7 +220,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
data = getData(data, index, inst, task);
//到达放货等待点
//(需要WCS反馈)
- } else if (phase == 0x06) {
+ } else if (phase == 0x06) {
+ data = getData(data, index, inst, task);
//到达放货点
//(需要WCS反馈)
} else if (phase == 0x07) {
@@ -290,7 +291,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
log.info("未找到编号{}对应的指令", ikey);
return;
}
- data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0);
+ data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
}
//到达位置点
//(需要WCS反馈)
@@ -298,13 +299,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//1、根据货位id找到对应三工位设备,赋给agv属性地址对应的满料位设备
agvaddr = arr[18] * 256 + arr[19];
agvaddr_copy = agvaddr;
- data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0);
+ data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
} else if (phase == 0x50) {//进入交通灯区域
- data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0);
+ data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
} else if (phase == 0x51) {//离开交通灯区域
- data = NDCAgvService.sendAgvOneModeInst(phase, index, 0,0,0,0,0);
+ data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
}
if (!ObjectUtil.isEmpty(data)) {
@@ -318,24 +319,24 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
String start_point;
int next_height;
int start_height;
- if(!"2".equals(task.getTask_type())) {
+ if (!"2".equals(task.getTask_type())) {
BaseRequest request = new BaseRequest();
request.setRequestNo(IdUtil.simpleUUID());
request.setTaskId(task.getExt_task_id());
JSONObject resp = JSONObject.parseObject(acsToWmsService.feedbackState(request));
- if("200".equals(resp.getString("code"))){
- start_height=resp.getJSONObject("parameters").getInteger("start_height");
- next_height=resp.getJSONObject("parameters").getInteger("next_height");
- start_point=resp.getJSONObject("parameters").getString("start_point");
- next_point=resp.getJSONObject("parameters").getString("next_point");
+ if ("200".equals(resp.getString("code"))) {
+ start_height = resp.getJSONObject("parameters").getInteger("start_height");
+ next_height = resp.getJSONObject("parameters").getInteger("next_height");
+ start_point = resp.getJSONObject("parameters").getString("start_point");
+ next_point = resp.getJSONObject("parameters").getString("next_point");
task.setStart_height(String.valueOf(start_height));
task.setNext_height(String.valueOf(next_height));
task.setStart_point_code(start_point);
task.setStart_device_code(start_point);
task.setNext_point_code(next_point);
task.setNext_device_code(next_point);
- int start_address=deviceService.queryAddressBydeviceCode(start_point);
- int next_address=deviceService.queryAddressBydeviceCode(next_point);
+ int start_address = deviceService.queryAddressBydeviceCode(start_point);
+ int next_address = deviceService.queryAddressBydeviceCode(next_point);
taskService.update(task);
inst.setStart_point_code(start_point);
inst.setStart_device_code(start_point);
@@ -343,11 +344,11 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
inst.setNext_device_code(next_point);
instructionService.update(inst);
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, start_address, next_address, start_height, next_height);
- log.info("指令号:{},phase:{},acs请求wms申请成功", inst.getInstruction_code(),phase);
- }else{
- log.info("指令号:{},phase:{},acs请求wms申请失败", inst.getInstruction_code(),phase);
+ log.info("指令号:{},phase:{},acs请求wms申请成功", inst.getInstruction_code(), phase);
+ } else {
+ log.info("指令号:{},phase:{},acs请求wms申请失败", inst.getInstruction_code(), phase);
}
- }else {
+ } else {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
}
return data;
diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/AgvNdcOneDeviceDriver.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/AgvNdcOneDeviceDriver.xml
new file mode 100644
index 0000000..f4629cd
--- /dev/null
+++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/AgvNdcOneDeviceDriver.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+ ${LOG_HOME}/AGV驱动与NDC交互/%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}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/AutoCreateInst.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/AutoCreateInst.xml
new file mode 100644
index 0000000..1ac8de4
--- /dev/null
+++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/AutoCreateInst.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+ ${LOG_HOME}/自动创建指令/%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}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/LnshRGVDeviceDriver.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/LnshRGVDeviceDriver.xml
new file mode 100644
index 0000000..6920f4f
--- /dev/null
+++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/LnshRGVDeviceDriver.xml
@@ -0,0 +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}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/Lucene.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/Lucene.xml
new file mode 100644
index 0000000..f00bdbd
--- /dev/null
+++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/Lucene.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+ ${LOG_HOME}/lucene/${DEVICECODE}/%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}
+
+
+
+
+
+
+
+
+ 512
+
+
+
+
+
+
+
+
+
diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/NDCAgvServiceImpl.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/NDCAgvServiceImpl.xml
new file mode 100644
index 0000000..a10d776
--- /dev/null
+++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/NDCAgvServiceImpl.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+ ${LOG_HOME}/NDCAGV服务/%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}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/OneNDCSocketConnectionAutoRun.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/OneNDCSocketConnectionAutoRun.xml
new file mode 100644
index 0000000..0ee581e
--- /dev/null
+++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/OneNDCSocketConnectionAutoRun.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+ ${LOG_HOME}/NDC交互日志/%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}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/WmsToAcs.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/WmsToAcs.xml
new file mode 100644
index 0000000..e5d9847
--- /dev/null
+++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/WmsToAcs.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+ ${LOG_HOME}/WMS请求ACS/%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}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml b/acs/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml
index 7f6c752..d5826a1 100644
--- a/acs/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml
+++ b/acs/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml
@@ -18,7 +18,14 @@ https://juejin.cn/post/6844903775631572999
-
+
+
+
+
+
+
+
+
true
diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/controller/AcsToWmsController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/controller/AcsToWmsController.java
index 3e04561..0300796 100644
--- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/controller/AcsToWmsController.java
+++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/controller/AcsToWmsController.java
@@ -48,8 +48,8 @@ public class AcsToWmsController {
}
@PostMapping("/status")
- @Log("设备状态同步")
- @ApiOperation("设备状态同步")
+ @Log("任务状态同步")
+ @ApiOperation("任务状态同步")
//@SaCheckPermission("@el.check('schBaseTask:add')")
@SaIgnore
public ResponseEntity