fix: 烘箱行架联调问题解决
This commit is contained in:
@@ -43,7 +43,7 @@ public class HongXiangConveyorDefination implements OpcDeviceDriverDefination {
|
|||||||
@Override
|
@Override
|
||||||
public List<DeviceType> getFitDeviceTypes() {
|
public List<DeviceType> getFitDeviceTypes() {
|
||||||
List<DeviceType> types = new LinkedList();
|
List<DeviceType> types = new LinkedList();
|
||||||
types.add(DeviceType.station);
|
types.add(DeviceType.conveyor);
|
||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -406,15 +406,22 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
List list = new ArrayList<>();
|
List list = new ArrayList<>();
|
||||||
Map map = new HashMap();
|
Map map = new HashMap();
|
||||||
map.put("to_onset", start_addr);
|
map.put("code", "to_onset");
|
||||||
map.put("to_target", next_addr);
|
map.put("value", StrUtil.isNotBlank(start_addr) ? start_addr : "0");
|
||||||
map.put("to_task", instruction.getInstruction_code());
|
Map map1 = new HashMap();
|
||||||
map.put("to_command", "1");
|
map1.put("code", "to_target");
|
||||||
try {
|
map1.put("value", StrUtil.isNotBlank(next_addr) ? next_addr : "0");
|
||||||
this.writing(map);
|
Map map2 = new HashMap();
|
||||||
} catch (Exception e) {
|
map2.put("code", "to_task");
|
||||||
e.printStackTrace();
|
map2.put("value", instruction.getInstruction_code());
|
||||||
}
|
Map map3 = new HashMap();
|
||||||
|
map3.put("code", "to_command");
|
||||||
|
map3.put("value", "1");
|
||||||
|
list.add(map);
|
||||||
|
list.add(map1);
|
||||||
|
list.add(map2);
|
||||||
|
list.add(map3);
|
||||||
|
this.writing(list);
|
||||||
if (startdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (startdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startdevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startdevice.getDeviceDriver();
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||||
@@ -776,6 +783,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.instruction_update_time = date;
|
this.instruction_update_time = date;
|
||||||
|
ArrayList list = new ArrayList();
|
||||||
Map map = new HashMap();
|
Map map = new HashMap();
|
||||||
//更改任务状态
|
//更改任务状态
|
||||||
if (task > 0) {
|
if (task > 0) {
|
||||||
@@ -806,8 +814,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
int move = hongXiangConveyorDeviceDriver.getMove();
|
int move = hongXiangConveyorDeviceDriver.getMove();
|
||||||
if (mode == 1 && door == 1 && action == 1 && error1 == 0 && move == 1) {
|
if (mode == 1 && door == 1 && action == 1 && error1 == 0 && move == 1) {
|
||||||
if (this.getNow_steps_type() == 2) {
|
if (this.getNow_steps_type() == 2) {
|
||||||
ArrayList list = new ArrayList();
|
map.put("code", "to_command");
|
||||||
map.put("to_command", "2");
|
map.put("value", "2");
|
||||||
list.add(map);
|
list.add(map);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
this.setNow_steps_type(3);
|
this.setNow_steps_type(3);
|
||||||
@@ -834,8 +842,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type() == 2) {
|
if (this.getNow_steps_type() == 2) {
|
||||||
ArrayList list = new ArrayList();
|
map.put("code", "to_command");
|
||||||
map.put("to_command", "2");
|
map.put("value", "2");
|
||||||
list.add(map);
|
list.add(map);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
this.setNow_steps_type(3);
|
this.setNow_steps_type(3);
|
||||||
@@ -873,8 +881,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
hongXiangConveyorDeviceDriver.writing(map);
|
hongXiangConveyorDeviceDriver.writing(map);
|
||||||
}
|
}
|
||||||
if (this.getNow_steps_type() == 3) {
|
if (this.getNow_steps_type() == 3) {
|
||||||
ArrayList list = new ArrayList();
|
map.put("code", "to_command");
|
||||||
map.put("to_command", "3");
|
map.put("value", "3");
|
||||||
list.add(map);
|
list.add(map);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
this.setNow_steps_type(4);
|
this.setNow_steps_type(4);
|
||||||
@@ -914,8 +922,10 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
int move = hongXiangConveyorDeviceDriver.getMove();
|
int move = hongXiangConveyorDeviceDriver.getMove();
|
||||||
if (mode == 1 && door == 1 && action == 1 && error1 == 0 && move == 0) {
|
if (mode == 1 && door == 1 && action == 1 && error1 == 0 && move == 0) {
|
||||||
if (this.getNow_steps_type() == 4) {
|
if (this.getNow_steps_type() == 4) {
|
||||||
map.put("to_command", "4");
|
map.put("code", "to_command");
|
||||||
this.writing(map);
|
map.put("value", "4");
|
||||||
|
list.add(map);
|
||||||
|
this.writing(list);
|
||||||
this.setNow_steps_type(5);
|
this.setNow_steps_type(5);
|
||||||
} else {
|
} else {
|
||||||
feedMessage = "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)";
|
feedMessage = "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)";
|
||||||
@@ -942,8 +952,10 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type() == 4) {
|
if (this.getNow_steps_type() == 4) {
|
||||||
map.put("to_command", "4");
|
map.put("code", "to_command");
|
||||||
this.writing(map);
|
map.put("value", "4");
|
||||||
|
list.add(map);
|
||||||
|
this.writing(list);
|
||||||
this.setNow_steps_type(5);
|
this.setNow_steps_type(5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1012,8 +1024,10 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
map.put("to_command", "5");
|
map.put("code", "to_command");
|
||||||
this.writing(map);
|
map.put("value", "5");
|
||||||
|
list.add(map);
|
||||||
|
this.writing(list);
|
||||||
this.setNow_steps_type(6);
|
this.setNow_steps_type(6);
|
||||||
this.setNow_steps_type(0);
|
this.setNow_steps_type(0);
|
||||||
try {
|
try {
|
||||||
@@ -1151,6 +1165,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
itemMap.put(to_param, json.getString("value"));
|
itemMap.put(to_param, json.getString("value"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发电气信号:" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
try {
|
try {
|
||||||
this.checkcontrol(itemMap);
|
this.checkcontrol(itemMap);
|
||||||
|
|||||||
@@ -360,15 +360,15 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
|
|
||||||
|
|
||||||
String type = "";
|
String type = "";
|
||||||
if (result2.getStatus() == 200) {
|
if (ObjectUtil.isNotEmpty(result2) && result2.getStatus() == 200) {
|
||||||
type = "info";
|
type = "info";
|
||||||
|
JSONObject jo = JSONObject.parseObject(result2.body());
|
||||||
|
log.info("feedbackTaskStatusToWms-----输出参数{}", jo.toString());
|
||||||
|
return result2;
|
||||||
} else {
|
} else {
|
||||||
type = "error";
|
type = "error";
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
JSONObject jo = JSONObject.parseObject(result2.body());
|
|
||||||
log.info("feedbackTaskStatusToWms-----输出参数{}", jo.toString());
|
|
||||||
return result2;
|
|
||||||
} finally {
|
} finally {
|
||||||
MDC.remove(log_file_type);
|
MDC.remove(log_file_type);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user