Merge remote-tracking branch 'origin/master'

This commit is contained in:
2024-05-17 11:04:13 +08:00
3 changed files with 26 additions and 17 deletions

View File

@@ -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);
@@ -530,7 +528,19 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
Map map12 = new HashMap(); Map map12 = new HashMap();
map12.put("code", "to_labeling_template"); map12.put("code", "to_labeling_template");
map12.put("value", labelingTemplate); map12.put("value", labelingTemplate);
list.add(map12);
Map map13 = new HashMap();
map13.put("code", "to_leight");
map13.put("value", length);
list.add(map13);
Map map14 = new HashMap();
map14.put("code", "to_wedth");
map14.put("value", width);
list.add(map14);
Map map15 = new HashMap();
map15.put("code", "to_height");
map15.put("value", height);
list.add(map15);
} }
if(mode == 17){ if(mode == 17){

View File

@@ -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);

View File

@@ -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());