Browse Source

更新

master
张江玮 2 years ago
parent
commit
512b728579
  1. 5
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  2. 12
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java
  3. 88
      acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  4. 2
      acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java

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

@ -343,15 +343,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
if (StrUtil.equals(inst.getNext_device_code(), device_code)) {
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
// standardOrdinarySiteDeviceDriver.setAgvphase(phase);
// standardOrdinarySiteDeviceDriver.setIndex(index);
// standardOrdinarySiteDeviceDriver.setInst(inst);
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
}
if (device.getDeviceDriver() instanceof StandardStorageDeviceDriver) {
standardStorageDeviceDriver = (StandardStorageDeviceDriver) device.getDeviceDriver();
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
}

12
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

@ -65,11 +65,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
// JSONArray datas = JSONArray.parseArray(param);
CancelTaskResponse response = new CancelTaskResponse();
CancelTaskRequest request = JsonUtl.format(param, CancelTaskRequest.class);
JSONObject request = JSONObject.parseObject(param);
// String task_uuid = request.getExt_task_id();
String task_code = request.getTASKCODE();
String vehicle_code = request.getVehicle_code();
String task_code = request.getString("TASKCODE");
// if (StrUtil.isEmpty(task_uuid)) {
// throw new WDKException("任务标识不能为空");
@ -461,10 +460,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
// String put_device_code = request.getPut_device_code();
String priority = "1";
String vehicle_code = request.getString("PODCODE");
String vehicle_type = "1";
String route_plan_code = "1";
String vehicle_type = "";
String route_plan_code = "normal";
String task_type = request.getString("TASKTYPE");
String storage_task_type = "1";
String storage_task_type = "";
String agv_system_type = "1";
String remark = "";
double oven_time = 0.00d;
@ -610,6 +609,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("next_parent_code", next_point_code);
jo.put("start_device_code", start_device_code);
jo.put("next_device_code", next_device_code);
jo.put("route_plan_code", route_plan_code);
// jo.put("start_device_code2", start_device_code2);
// jo.put("next_device_code2", next_device_code2);
// jo.put("put_device_code", put_device_code);

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

@ -825,9 +825,6 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
feed_jo.put("task_status", entity.getTask_status());
JSONArray ja = new JSONArray();
ja.add(feed_jo);
String message = null;
HttpResponse body = null;
boolean flag = false;
try {
JSONObject request = new JSONObject();
request.put("REQCODE", entity.getExt_task_id());
@ -838,78 +835,8 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
request.put("REQTIME", DateUtil.now());
new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
} catch (Exception e) {
flag = true;
message = e.getMessage();
e.printStackTrace();
} finally {
}
if (flag) {
if (ObjectUtil.isEmpty(feefbackdto)) {
feefbackdto = new TaskFeedbackDto();
feefbackdto.setTask_id(entity.getTask_id());
feefbackdto.setTask_code(entity.getTask_code());
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setVehicle_type(entity.getVehicle_type());
feefbackdto.setVehicle_code(entity.getVehicle_code());
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getStart_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
feefbackdto.setError_code("400");
feefbackdto.setIs_finished("0");
feefbackdto.setRemark(message);
taskFeedbackService.create(feefbackdto);
} else {
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getStart_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
feefbackdto.setError_code("400");
feefbackdto.setRemark(message);
taskFeedbackService.update(feefbackdto);
}
} else {
int status = body.getStatus();
JSONObject jo = JSONObject.parseObject(body.body());
if (ObjectUtil.isEmpty(feefbackdto)) {
feefbackdto = new TaskFeedbackDto();
feefbackdto.setTask_id(entity.getTask_id());
feefbackdto.setTask_code(entity.getTask_code());
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setVehicle_type(entity.getVehicle_type());
feefbackdto.setVehicle_code(entity.getVehicle_code());
feefbackdto.setError_code(String.valueOf(body.getStatus()));
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getNext_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
if (status == 200) {
if (StrUtil.equals(entity.getTask_status(), "2")) {
feefbackdto.setIs_finished("1");
} else {
feefbackdto.setIs_finished("0");
}
} else {
feefbackdto.setIs_finished("0");
feefbackdto.setRemark(jo.getString("message"));
}
taskFeedbackService.create(feefbackdto);
} else {
feefbackdto.setTask_status(entity.getTask_status());
if (status == 200) {
if (StrUtil.equals(entity.getTask_status(), "2")) {
feefbackdto.setIs_finished("1");
} else {
feefbackdto.setIs_finished("0");
}
} else {
feefbackdto.setIs_finished("0");
feefbackdto.setRemark(jo.getString("message"));
}
taskFeedbackService.update(feefbackdto);
}
throw new BadRequestException(e.getMessage());
}
}
// 如果属于先知AGV,关闭运单序列
@ -954,19 +881,6 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
// }}
removeByCodeFromCache(entity.getTask_code());
// 判断是否为WMS下发的任务,如果是反馈任务状态给WMS
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue();
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
JSONObject feed_jo = new JSONObject();
feed_jo.put("task_id", entity.getTask_id());
feed_jo.put("task_code", entity.getTask_code());
feed_jo.put("task_status", entity.getTask_status());
JSONArray ja = new JSONArray();
ja.add(feed_jo);
HttpResponse response = acstowmsService.feedbackTaskStatusToWms(ja);
response.close();
}
List<RouteLineDto> shortPathsList =
routeLineService.getShortPathLines(
entity.getStart_device_code(),

2
acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java

@ -44,7 +44,7 @@ public class AutoCreateInst {
}
String taskid = acsTask.getTask_id();
String taskcode = acsTask.getTask_code();
String task_type = acsTask.getTask_type();
String task_type = "1";
String vehiclecode = acsTask.getVehicle_code();
String storage_task_type = acsTask.getStorage_task_type();
String priority = acsTask.getPriority();

Loading…
Cancel
Save