psh 1 year ago
parent
commit
c5ecf71e77
  1. 5
      acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java
  2. 10
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  3. 28
      acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  4. 2
      acs/nladmin-system/src/main/resources/config/application-prod.yml

5
acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java

@ -162,8 +162,6 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "0")) { if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "0")) {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
} else { } else {
Object reqWms = device.getExtraValue().get("reqWms");
if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")) {
JSONArray req = new JSONArray(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("uuid", IdUtil.simpleUUID()); map.put("uuid", IdUtil.simpleUUID());
@ -182,9 +180,6 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
} else { } else {
log.warn("指令号:{},acs请求wms任务执行任务执行失败,连接被拒绝,未反馈agv任务执行", inst.getInstruction_code()); log.warn("指令号:{},acs请求wms任务执行任务执行失败,连接被拒绝,未反馈agv任务执行", inst.getInstruction_code());
} }
} else {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
}
} }
} }
} }

10
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

@ -211,8 +211,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "0")) { if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "0")) {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
} else { } else {
Object reqWms = device.getExtraValue().get("reqWms");
if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")) {
JSONArray req = new JSONArray(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("uuid", IdUtil.simpleUUID()); map.put("uuid", IdUtil.simpleUUID());
@ -232,9 +230,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} else { } else {
log.warn("指令号:{},acs反馈wms取货完成离开失败,连接被拒绝,未反馈agv取货完成离开", inst.getInstruction_code()); log.warn("指令号:{},acs反馈wms取货完成离开失败,连接被拒绝,未反馈agv取货完成离开", inst.getInstruction_code());
} }
} else {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
}
} }
//到达放货点 //到达放货点
//(需要WCS反馈) //(需要WCS反馈)
@ -309,8 +304,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "0")) { if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "0")) {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
} else { } else {
Object reqWms = device.getExtraValue().get("reqWms");
if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")) {
JSONArray req = new JSONArray(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("uuid", IdUtil.simpleUUID()); map.put("uuid", IdUtil.simpleUUID());
@ -330,9 +323,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} else { } else {
log.warn("指令号:{},acs请求wms放货完成离开失败,连接被拒绝,未反馈agv放货完成离开", inst.getInstruction_code()); log.warn("指令号:{},acs请求wms放货完成离开失败,连接被拒绝,未反馈agv放货完成离开", inst.getInstruction_code());
} }
} else {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
}
} }
} }

28
acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java

@ -818,17 +818,17 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code()); TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code());
System.out.println(feefbackdto == null); System.out.println(feefbackdto == null);
JSONObject feed_jo = new JSONObject(); JSONArray req = new JSONArray();
feed_jo.put("task_id", entity.getTask_id()); JSONObject map = new JSONObject();
feed_jo.put("task_code", entity.getTask_code()); map.put("uuid", IdUtil.simpleUUID());
feed_jo.put("task_status", entity.getTask_status()); map.put("taskNo", entity.getTask_id());
JSONArray ja = new JSONArray(); map.put("businessType", "COMPLETE");
ja.add(feed_jo); req.add(map);
String message = null; String message = null;
HttpResponse body = null; HttpResponse body = null;
boolean flag = false; boolean flag = false;
try { try {
body = acstowmsService.feedbackTaskStatusToWms(ja); body = acstowmsService.feedbackTaskStatusToWms(req);
log.info("任务号:{},反馈wms任务状态完成成功,响应信息:{}!", entity.getTask_code(), body.body()); log.info("任务号:{},反馈wms任务状态完成成功,响应信息:{}!", entity.getTask_code(), body.body());
} catch (Exception e) { } catch (Exception e) {
log.error("任务号:{},反馈wms任务状态失败,原因:{}!", entity.getTask_code(), e.getMessage()); log.error("任务号:{},反馈wms任务状态失败,原因:{}!", entity.getTask_code(), e.getMessage());
@ -952,13 +952,13 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
// 判断是否为WMS下发的任务,如果是反馈任务状态给WMS // 判断是否为WMS下发的任务,如果是反馈任务状态给WMS
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue(); String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue();
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
JSONObject feed_jo = new JSONObject(); JSONArray req = new JSONArray();
feed_jo.put("task_id", entity.getTask_id()); JSONObject map = new JSONObject();
feed_jo.put("task_code", entity.getTask_code()); map.put("uuid", IdUtil.simpleUUID());
feed_jo.put("task_status", entity.getTask_status()); map.put("taskNo", entity.getTask_id());
JSONArray ja = new JSONArray(); map.put("businessType", "CANCEL");
ja.add(feed_jo); req.add(map);
acstowmsService.feedbackTaskStatusToWms(ja); acstowmsService.feedbackTaskStatusToWms(req);
} }
List<RouteLineDto> shortPathsList = List<RouteLineDto> shortPathsList =
routeLineService.getShortPathLines( routeLineService.getShortPathLines(

2
acs/nladmin-system/src/main/resources/config/application-prod.yml

@ -1,5 +1,5 @@
server: server:
port: 8010 port: 32203
tomcat: tomcat:
accept-count: 1000 accept-count: 1000
max-connections: 10000 max-connections: 10000

Loading…
Cancel
Save