opt: 优化堆垛机,贴标位驱动
This commit is contained in:
@@ -321,16 +321,14 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
this.require_apply_strangulation_time = date;
|
this.require_apply_strangulation_time = date;
|
||||||
// String vehicle_code = "";
|
Instruction inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||||
//
|
if (StrUtil.isEmpty(inst.getVehicle_code())) {
|
||||||
// Instruction inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
message = LangProcess.msg("one_message8") + ": " + task + LangProcess.msg("one_message11");
|
||||||
// if (StrUtil.isEmpty(inst.getVehicle_code())) {
|
return;
|
||||||
// message = LangProcess.msg("one_message8") + ": " + task + LangProcess.msg("one_message11");
|
}
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("device_code", device_code);
|
param.put("device_code", device_code);
|
||||||
// param.put("vehicle_code", inst.getVehicle_code());
|
param.put("vehicle_code", inst.getVehicle_code());
|
||||||
param.put("type", AcsToLmsApplyTaskTypeEnum.LABEL_BIND.getType());
|
param.put("type", AcsToLmsApplyTaskTypeEnum.LABEL_BIND.getType());
|
||||||
String response = acsToWmsService.deviceApplyTwo(param);
|
String response = acsToWmsService.deviceApplyTwo(param);
|
||||||
JSONObject jo = JSON.parseObject(response);
|
JSONObject jo = JSON.parseObject(response);
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
this.setIsonline(false);
|
this.setIsonline(false);
|
||||||
message = "有报警";
|
message = "有报警";
|
||||||
//无报警
|
//无报警
|
||||||
} else if (error != 0) {
|
} else if (error != 0 && error1 != 1) {
|
||||||
this.setIserror(true);
|
this.setIserror(true);
|
||||||
message = "有报警";
|
message = "有报警";
|
||||||
//无报警
|
//无报警
|
||||||
@@ -406,7 +406,6 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
map.put("device_name", this.getDevice().getDevice_name());
|
map.put("device_name", this.getDevice().getDevice_name());
|
||||||
map.put("finish", finish);
|
map.put("finish", finish);
|
||||||
map.put("isOnline", this.getIsonline());
|
map.put("isOnline", this.getIsonline());
|
||||||
|
|
||||||
map.put("isError", this.getIserror());
|
map.put("isError", this.getIserror());
|
||||||
map.put("door", door);
|
map.put("door", door);
|
||||||
map.put("mode", mode);
|
map.put("mode", mode);
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ public class CreateDDJInst {
|
|||||||
if (CollUtil.isNotEmpty(taskDtoList)) {
|
if (CollUtil.isNotEmpty(taskDtoList)) {
|
||||||
taskDtoList = sortInst(taskDtoList);
|
taskDtoList = sortInst(taskDtoList);
|
||||||
for (TaskDto taskDto : taskDtoList) {
|
for (TaskDto taskDto : taskDtoList) {
|
||||||
String next_device_code = "";
|
|
||||||
Device nextDevice = null;
|
Device nextDevice = null;
|
||||||
List<String> pathlist;
|
List<String> pathlist;
|
||||||
Device deviceByCode = null;
|
Device deviceByCode = null;
|
||||||
@@ -85,7 +84,8 @@ public class CreateDDJInst {
|
|||||||
|
|
||||||
String put_device_code = taskDto.getPut_device_code();
|
String put_device_code = taskDto.getPut_device_code();
|
||||||
String put_point_code = taskDto.getPut_point_code();
|
String put_point_code = taskDto.getPut_point_code();
|
||||||
|
String next_device_code = taskDto.getNext_device_code();
|
||||||
|
nextDevice = appService.findDeviceByCode(next_device_code);
|
||||||
String next_point_code = taskDto.getNext_point_code();
|
String next_point_code = taskDto.getNext_point_code();
|
||||||
|
|
||||||
String start_point_code2 = taskDto.getStart_point_code2();
|
String start_point_code2 = taskDto.getStart_point_code2();
|
||||||
@@ -244,12 +244,12 @@ public class CreateDDJInst {
|
|||||||
instdto.setAgv_system_type(agv_system_type);
|
instdto.setAgv_system_type(agv_system_type);
|
||||||
instdto.setStart_height(start_height);
|
instdto.setStart_height(start_height);
|
||||||
instdto.setNext_height(next_height);
|
instdto.setNext_height(next_height);
|
||||||
if (startDevice.getDevice_type().equals(DeviceType.storage.name())) {
|
if (ObjectUtil.isNotNull(startDevice) && startDevice.getDevice_type().equals(DeviceType.storage.name())) {
|
||||||
instdto.setFrom_x(taskDto.getFrom_x());
|
instdto.setFrom_x(taskDto.getFrom_x());
|
||||||
instdto.setFrom_z(taskDto.getFrom_z());
|
instdto.setFrom_z(taskDto.getFrom_z());
|
||||||
instdto.setFrom_y(taskDto.getFrom_y());
|
instdto.setFrom_y(taskDto.getFrom_y());
|
||||||
}
|
}
|
||||||
if (nextDevice.getDevice_type().equals(DeviceType.storage.name())) {
|
if (ObjectUtil.isNotNull(nextDevice) && nextDevice.getDevice_type().equals(DeviceType.storage.name())) {
|
||||||
instdto.setTo_x(taskDto.getTo_x());
|
instdto.setTo_x(taskDto.getTo_x());
|
||||||
instdto.setTo_z(taskDto.getTo_z());
|
instdto.setTo_z(taskDto.getTo_z());
|
||||||
instdto.setTo_y(taskDto.getTo_y());
|
instdto.setTo_y(taskDto.getTo_y());
|
||||||
@@ -365,12 +365,12 @@ public class CreateDDJInst {
|
|||||||
instdto.setAgv_system_type(agv_system_type);
|
instdto.setAgv_system_type(agv_system_type);
|
||||||
instdto.setStart_height(start_height);
|
instdto.setStart_height(start_height);
|
||||||
instdto.setNext_height(next_height);
|
instdto.setNext_height(next_height);
|
||||||
if (startDevice.getDevice_type().equals(DeviceType.storage.name())) {
|
if (ObjectUtil.isNotNull(startDevice) && startDevice.getDevice_type().equals(DeviceType.storage.name())) {
|
||||||
instdto.setFrom_x(taskDto.getFrom_x());
|
instdto.setFrom_x(taskDto.getFrom_x());
|
||||||
instdto.setFrom_z(taskDto.getFrom_z());
|
instdto.setFrom_z(taskDto.getFrom_z());
|
||||||
instdto.setFrom_y(taskDto.getFrom_y());
|
instdto.setFrom_y(taskDto.getFrom_y());
|
||||||
}
|
}
|
||||||
if (nextDevice.getDevice_type().equals(DeviceType.storage.name())) {
|
if (ObjectUtil.isNotNull(nextDevice) && nextDevice.getDevice_type().equals(DeviceType.storage.name())) {
|
||||||
instdto.setTo_x(taskDto.getTo_x());
|
instdto.setTo_x(taskDto.getTo_x());
|
||||||
instdto.setTo_z(taskDto.getTo_z());
|
instdto.setTo_z(taskDto.getTo_z());
|
||||||
instdto.setTo_y(taskDto.getTo_y());
|
instdto.setTo_y(taskDto.getTo_y());
|
||||||
|
|||||||
Reference in New Issue
Block a user