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 55b9d09..4c10308 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
@@ -236,9 +236,9 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
//上报异常信息
//(不需要WCS反馈)
if (phase == 0x70 || phase == 0x71 || phase == 0x72 || phase == 0x73 || phase == 0x74) {
- device = deviceAppService.findDeviceByCode(Integer.toString(agvaddr));
+ device = deviceAppService.findDeviceByCode("agv"+ Integer.toString(agvaddr));
} else {
- device = deviceAppService.findDeviceByCode(Integer.toString(arr[20]));
+ device = deviceAppService.findDeviceByCode("agv"+ Integer.toString(arr[20]));
}
if (ObjectUtil.isNotEmpty(device)) {
if (device.getDeviceDriver() instanceof AgvNdcOneDeviceDriver) {
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 afd27cc..9527a12 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
@@ -154,7 +154,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
return;
}
device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
- if (agvaddr != 0) {
+ /*if (agvaddr != 0) {
old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
if (StrUtil.contains(old_device_code, "-")) {
String[] point = old_device_code.split("-");
@@ -166,6 +166,11 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} else {
device_code = old_device_code;
}
+ }*/
+
+ if (agvaddr != 0) {
+ old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
+ device_code = old_device_code;
}
device = deviceAppService.findDeviceByCode(device_code);
@@ -188,13 +193,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
if ("1".equals(plc_to_agv)) {
plcToAgvDeviceDriver.writing("AGVSetOutReqUpper", "1");
if (plcToAgvDeviceDriver.getAGVSetOutUpperAllowed() == 1) {
- data = feedBackStatus(data, index, 1, inst, task);
+ data = feedBackStatus(data, index, 1, inst, task,2,false);
plcToAgvDeviceDriver.writing("AGVInOP", "1");
}
} else if ("2".equals(plc_to_agv)) {
plcToAgvDeviceDriver.writing("AGVSetOutReqLower", "1");
if (plcToAgvDeviceDriver.getAGVSetOutLowerAllowed() == 1) {
- data = feedBackStatus(data, index, 1, inst, task);
+ data = feedBackStatus(data, index, 1, inst, task,2,false);
plcToAgvDeviceDriver.writing("AGVInOP", "1");
}
}
@@ -206,7 +211,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
}
} else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
try {
- data = feedBackStatus(data, index, 1, inst, task);
+ data = feedBackStatus(data, index, 1, inst, task,1,false);
} catch (Exception e) {
log.info("到达取货点反馈AGV状态失败:{}", e.getMessage());
}
@@ -229,16 +234,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
}
if (agvaddr != 0) {
old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
- if (StrUtil.contains(old_device_code, "-")) {
- String[] point = old_device_code.split("-");
- device_code = point[0];
- } else if (StrUtil.contains(old_device_code, ".")) {
- String[] point = old_device_code.split("\\.");
- device_code = point[0];
- emptyNum = point[1];
- } else {
- device_code = old_device_code;
- }
+ device_code = old_device_code;
}
device = deviceAppService.findDeviceByCode(device_code);
@@ -260,10 +256,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} catch (Exception e) {
log.info("下发AGVInOP信号:{}失败", "0");
}
- data = feedBackStatus(data, index, 2, inst, task);
+ data = feedBackStatus(data, index, 2, inst, task,2,false);
} else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
try {
- data = feedBackStatus(data, index, 2, inst, task);
+ data = feedBackStatus(data, index, 2, inst, task,1,false);
} catch (Exception e) {
log.info("取货完成反馈AGV状态失败:{}", e.getMessage());
}
@@ -284,18 +280,22 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
logServer.deviceExecuteLog(this.device_code, "", "", "agv地址参数有误,phase:" + phase);
return;
}
- if (agvaddr != 0) {
+ /*if (agvaddr != 0) {
old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
if (StrUtil.contains(old_device_code, "-")) {
String[] point = old_device_code.split("-");
+ emptyNum = point[1];
device_code = point[0];
} else if (StrUtil.contains(old_device_code, ".")) {
String[] point = old_device_code.split("\\.");
device_code = point[0];
- emptyNum = point[1];
} else {
device_code = old_device_code;
}
+ }*/
+ if (agvaddr != 0) {
+ old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
+ device_code = old_device_code;
}
device = deviceAppService.findDeviceByCode(device_code);
if (ObjectUtil.isEmpty(device_code)) {
@@ -315,13 +315,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
if ("1".equals(plc_to_agv)) {
plcToAgvDeviceDriver.writing("AGVSetInReqUpper", "1");
if (plcToAgvDeviceDriver.getAGVSetInUpperAllowed() == 1) {
- data = feedBackStatus(data, index, 3, inst, task);
+ data = feedBackStatus(data, index, 3, inst, task,2,false);
plcToAgvDeviceDriver.writing("AGVInOP", "1");
}
} else if ("2".equals(plc_to_agv)) {
plcToAgvDeviceDriver.writing("AGVSetInReqLower", "1");
if (plcToAgvDeviceDriver.getAGVSetInLowerAllowed() == 1) {
- data = feedBackStatus(data, index, 3, inst, task);
+ data = feedBackStatus(data, index, 3, inst, task,2,false);
plcToAgvDeviceDriver.writing("AGVInOP", "1");
}
}
@@ -333,7 +333,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
}
} else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
try {
- data = feedBackStatus(data, index, 3, inst, task);
+ data = feedBackStatus(data, index, 2, inst, task,1,false);
} catch (Exception e) {
log.info("到达放货点反馈AGV状态失败:{}", e.getMessage());
}
@@ -351,7 +351,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
logServer.deviceExecuteLog(this.device_code, "", "", "agv地址参数有误,phase:" + phase);
return;
}
- if (agvaddr != 0) {
+ /*if (agvaddr != 0) {
old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
if (StrUtil.contains(old_device_code, "-")) {
String[] point = old_device_code.split("-");
@@ -363,6 +363,11 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} else {
device_code = old_device_code;
}
+ }*/
+
+ if (agvaddr != 0) {
+ old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
+ device_code = old_device_code;
}
device = deviceAppService.findDeviceByCode(device_code);
@@ -387,10 +392,12 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} catch (Exception e) {
log.info("下发AGVInOP信号:{}失败", "0");
}
- data = feedBackStatus(data, index, 4, inst, task);
+ data = feedBackStatus(data, index, 4, inst, task,2,false);
} else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
try {
- data = feedBackStatus(data, index, 4, inst, task);
+ StandardOrdinarySiteDeviceDriver standar = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
+ boolean is_empty = (boolean)standar.getDevice().getExtraValue().get("is_empty");
+ data = feedBackStatus(data, index, 2, inst, task,1,false);
} catch (Exception e) {
log.info("放货完成反馈AGV状态失败:{},", e.getMessage());
}
@@ -458,16 +465,19 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
return data;
}
- private byte[] feedBackStatus(byte[] data, int index, int agvStatus, Instruction inst, TaskDto task) {
+ private byte[] feedBackStatus(byte[] data, int index, int agvStatus, Instruction inst, TaskDto task,int connector_and_sorting,boolean is_empty) {
String hasWms = paramService.findByCode("hasWms").getValue();
if (StrUtil.isNotEmpty(hasWms) && "1".equals(hasWms)) {
log.info("存在LMS系统,需要反馈,指令号:{}",inst.getInstruction_code());
JSONArray ja = new JSONArray();
JSONObject jo = new JSONObject();
+ jo.put("is_connector", connector_and_sorting == 1? 1:2);
+ jo.put("task_type",task.getTask_type());
jo.put("vehicle_code", inst.getVehicle_code());
jo.put("status", agvStatus);
jo.put("device_code", this.device_code);
jo.put("task_code", inst.getTask_code());
+ jo.put("is_empty", is_empty);
ja.add(jo);
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(ja);
log.info("指令号:{},phase:{},acs反馈wms结果:{}", inst.getInstruction_code(), phase, httpResponse);
diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java
index 5d85266..615322b 100644
--- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java
+++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java
@@ -150,6 +150,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
JSONObject jo = new JSONObject();
jo.put("task_id", task_id);
+ jo.put("vehicle_code", vehicle_code);
+ jo.put("device_code",address);
String result2 = null;
AddressDto addressDto = addressService.findByCode("requestTaskAgain");
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 04a1da0..0d4311e 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,13 +18,12 @@ https://juejin.cn/post/6844903775631572999
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/acs/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue b/acs/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue
index 0cd0926..7af3bdb 100644
--- a/acs/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue
+++ b/acs/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue
@@ -74,8 +74,8 @@
-
-
+
+
@@ -179,7 +179,8 @@ export default {
station_manager: true,
auto_clean_task: true,
input_material: true,
- reqWms: true
+ reqWms: true,
+ is_empty: true
},
rules: {}
}
diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/enums/GoodsEnum.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/enums/GoodsEnum.java
index 987c4a8..c394622 100644
--- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/enums/GoodsEnum.java
+++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/enums/GoodsEnum.java
@@ -13,10 +13,10 @@ public enum GoodsEnum {
OUT_OF_STOCK("无货","0"),
- IN_STOCK("有货","1"),
-
EMPTY_PALLETS("空料容","1"),
+ IN_STOCK("有货","2"),
+
PICK_UP("取货","1"),
DELIVER_GOODS("送货","2");
diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/controller/AcsToWmsController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/controller/AcsToWmsController.java
index 0e42154..aeba769 100644
--- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/controller/AcsToWmsController.java
+++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/controller/AcsToWmsController.java
@@ -91,11 +91,20 @@ public class AcsToWmsController {
@PostMapping("/feedAgvTaskStatus")
- @Log("acs通知wms")
- @ApiOperation("acs通知wms")
+ @Log("agv取放货反馈")
+ @ApiOperation("agv取放货反馈")
@SaIgnore
@Deprecated
public ResponseEntity