更新
This commit is contained in:
@@ -161,45 +161,53 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
||||
//共挤线三工位
|
||||
if (addressdevice.getDeviceDriver() instanceof HailiangSmartplcTestDeviceDriver) {
|
||||
hailiangSmartplcTestDeviceDriver = (HailiangSmartplcTestDeviceDriver) addressdevice.getDeviceDriver();
|
||||
if ((hailiangSmartplcTestDeviceDriver.getAction() == 1 || hailiangSmartplcTestDeviceDriver.getAction() == 3) && hailiangSmartplcTestDeviceDriver.getMove() == 1) {
|
||||
inst.setExecute_status("1");
|
||||
is_feedback = true;
|
||||
}
|
||||
// if ((hailiangSmartplcTestDeviceDriver.getAction() == 1 || hailiangSmartplcTestDeviceDriver.getAction() == 3) && hailiangSmartplcTestDeviceDriver.getMove() == 1) {
|
||||
// inst.setExecute_status("1");
|
||||
// is_feedback = true;
|
||||
// }
|
||||
is_feedback = true;
|
||||
|
||||
}
|
||||
//叠盘位
|
||||
if (addressdevice.getDeviceDriver() instanceof EmptyVehicleStackingPositionDeviceDriver) {
|
||||
emptyVehicleStackingPositionDeviceDriver = (EmptyVehicleStackingPositionDeviceDriver) addressdevice.getDeviceDriver();
|
||||
int number = emptyVehicleStackingPositionDeviceDriver.getNumber();
|
||||
if (number < Integer.valueOf(str)) {
|
||||
log.info("叠盘位:" + jobno + "当前层高为:" + number + ",不存在第" + str + "的托盘!");
|
||||
return null;
|
||||
}
|
||||
inst.setExecute_status("1");
|
||||
// int number = emptyVehicleStackingPositionDeviceDriver.getNumber();
|
||||
// if (number < Integer.valueOf(str)) {
|
||||
// log.info("叠盘位:" + jobno + "当前层高为:" + number + ",不存在第" + str + "的托盘!");
|
||||
// return null;
|
||||
// }
|
||||
// inst.setExecute_status("1");
|
||||
is_feedback = true;
|
||||
}
|
||||
//货梯对接线
|
||||
if (addressdevice.getDeviceDriver() instanceof CargoLiftConveyorDeviceDriver) {
|
||||
cargoLiftConveyorDeviceDriver = (CargoLiftConveyorDeviceDriver) addressdevice.getDeviceDriver();
|
||||
if ((cargoLiftConveyorDeviceDriver.getAction() == 1 || cargoLiftConveyorDeviceDriver.getAction() == 3) && cargoLiftConveyorDeviceDriver.getMove() == 1) {
|
||||
inst.setExecute_status("1");
|
||||
is_feedback = true;
|
||||
}
|
||||
// if ((cargoLiftConveyorDeviceDriver.getAction() == 1 || cargoLiftConveyorDeviceDriver.getAction() == 3) && cargoLiftConveyorDeviceDriver.getMove() == 1) {
|
||||
// inst.setExecute_status("1");
|
||||
// is_feedback = true;
|
||||
// }
|
||||
is_feedback = true;
|
||||
|
||||
}
|
||||
//豪凯自动线对接位
|
||||
if (addressdevice.getDeviceDriver() instanceof HaoKaiAutoConveyorDeviceDriver) {
|
||||
haoKaiAutoConveyorDeviceDriver = (HaoKaiAutoConveyorDeviceDriver) addressdevice.getDeviceDriver();
|
||||
if ((haoKaiAutoConveyorDeviceDriver.getAction() == 1 || haoKaiAutoConveyorDeviceDriver.getAction() == 3) && haoKaiAutoConveyorDeviceDriver.getMove() == 1) {
|
||||
inst.setExecute_status("1");
|
||||
is_feedback = true;
|
||||
}
|
||||
// if ((haoKaiAutoConveyorDeviceDriver.getAction() == 1 || haoKaiAutoConveyorDeviceDriver.getAction() == 3) && haoKaiAutoConveyorDeviceDriver.getMove() == 1) {
|
||||
// inst.setExecute_status("1");
|
||||
// is_feedback = true;
|
||||
// }
|
||||
is_feedback = true;
|
||||
|
||||
}
|
||||
//油漆线
|
||||
if (addressdevice.getDeviceDriver() instanceof PaintConveyorDeviceDriver) {
|
||||
paintConveyorDeviceDriver = (PaintConveyorDeviceDriver) addressdevice.getDeviceDriver();
|
||||
if ((paintConveyorDeviceDriver.getAction() == 1 || paintConveyorDeviceDriver.getAction() == 3) && paintConveyorDeviceDriver.getMove() == 1) {
|
||||
inst.setExecute_status("1");
|
||||
is_feedback = true;
|
||||
}
|
||||
// if ((paintConveyorDeviceDriver.getAction() == 1 || paintConveyorDeviceDriver.getAction() == 3) && paintConveyorDeviceDriver.getMove() == 1) {
|
||||
// inst.setExecute_status("1");
|
||||
// is_feedback = true;
|
||||
// }
|
||||
is_feedback = true;
|
||||
|
||||
}
|
||||
}
|
||||
if ("PauseOnStation".equals(type)) {
|
||||
@@ -247,22 +255,6 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
||||
jo.put("task_code", inst.getInstruction_code());
|
||||
JSONArray destinations = new JSONArray();
|
||||
String inst_type = inst.getInstruction_type();
|
||||
//如果任务类型为1,在点位进行等待,则查询当前叠盘位的数量,取当前数量的层数进行追加任务
|
||||
// if ("1".equals(inst_type)) {
|
||||
// emptyVehicleStackingPositionDeviceDriver = (EmptyVehicleStackingPositionDeviceDriver) addressdevice.getDeviceDriver();
|
||||
// int current_num = emptyVehicleStackingPositionDeviceDriver.getNumber();
|
||||
// if (current_num > 12) {
|
||||
// log.info("当前叠盘架:" + jobno + "已放满!");
|
||||
// return null;
|
||||
// }
|
||||
// String start_point_code = inst.getStart_point_code();
|
||||
// String next_point_code = inst.getNext_point_code();
|
||||
// start_point_code = start_point_code + "." + (current_num + 1);
|
||||
// destinations.add(destination(start_point_code, "Load", "1", "1"));
|
||||
// destinations.add(destination(next_point_code, "Unload", "1", "1"));
|
||||
//
|
||||
// }
|
||||
|
||||
String resp = acsToWmsService.requestTaskAgain(address,task.getExt_task_id(),inst.getVehicle_code());
|
||||
JSONObject respjson = JSONObject.parseObject(resp);
|
||||
|
||||
@@ -312,10 +304,12 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
||||
if ("EntryRequired".equals(type)) {
|
||||
if (addressdevice.getDeviceDriver() instanceof HailiangSmartplcTestDeviceDriver) {
|
||||
hailiangSmartplcTestDeviceDriver = (HailiangSmartplcTestDeviceDriver) addressdevice.getDeviceDriver();
|
||||
if ((hailiangSmartplcTestDeviceDriver.getAction() == 2 || hailiangSmartplcTestDeviceDriver.getAction() == 3) && hailiangSmartplcTestDeviceDriver.getMove() == 0) {
|
||||
inst.setExecute_status("3");
|
||||
is_feedback = true;
|
||||
}
|
||||
// if ((hailiangSmartplcTestDeviceDriver.getAction() == 2 || hailiangSmartplcTestDeviceDriver.getAction() == 3) && hailiangSmartplcTestDeviceDriver.getMove() == 0) {
|
||||
// inst.setExecute_status("3");
|
||||
// is_feedback = true;
|
||||
// }
|
||||
is_feedback = true;
|
||||
|
||||
}
|
||||
|
||||
if (addressdevice.getDeviceDriver() instanceof EmptyVehicleStackingPositionDeviceDriver) {
|
||||
@@ -331,26 +325,32 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
||||
|
||||
if (addressdevice.getDeviceDriver() instanceof CargoLiftConveyorDeviceDriver) {
|
||||
cargoLiftConveyorDeviceDriver = (CargoLiftConveyorDeviceDriver) addressdevice.getDeviceDriver();
|
||||
if ((cargoLiftConveyorDeviceDriver.getAction() == 2 || cargoLiftConveyorDeviceDriver.getAction() == 3) && cargoLiftConveyorDeviceDriver.getMove() == 0) {
|
||||
inst.setExecute_status("3");
|
||||
is_feedback = true;
|
||||
}
|
||||
// if ((cargoLiftConveyorDeviceDriver.getAction() == 2 || cargoLiftConveyorDeviceDriver.getAction() == 3) && cargoLiftConveyorDeviceDriver.getMove() == 0) {
|
||||
// inst.setExecute_status("3");
|
||||
// is_feedback = true;
|
||||
// }
|
||||
is_feedback = true;
|
||||
|
||||
}
|
||||
|
||||
if (addressdevice.getDeviceDriver() instanceof HaoKaiAutoConveyorDeviceDriver) {
|
||||
haoKaiAutoConveyorDeviceDriver = (HaoKaiAutoConveyorDeviceDriver) addressdevice.getDeviceDriver();
|
||||
if ((haoKaiAutoConveyorDeviceDriver.getAction() == 2 || haoKaiAutoConveyorDeviceDriver.getAction() == 3) && haoKaiAutoConveyorDeviceDriver.getMove() == 0) {
|
||||
inst.setExecute_status("3");
|
||||
is_feedback = true;
|
||||
}
|
||||
// if ((haoKaiAutoConveyorDeviceDriver.getAction() == 2 || haoKaiAutoConveyorDeviceDriver.getAction() == 3) && haoKaiAutoConveyorDeviceDriver.getMove() == 0) {
|
||||
// inst.setExecute_status("3");
|
||||
// is_feedback = true;
|
||||
// }
|
||||
is_feedback = true;
|
||||
|
||||
}
|
||||
|
||||
if (addressdevice.getDeviceDriver() instanceof PaintConveyorDeviceDriver) {
|
||||
paintConveyorDeviceDriver = (PaintConveyorDeviceDriver) addressdevice.getDeviceDriver();
|
||||
if ((paintConveyorDeviceDriver.getAction() == 2 || paintConveyorDeviceDriver.getAction() == 3) && paintConveyorDeviceDriver.getMove() == 0) {
|
||||
inst.setExecute_status("3");
|
||||
is_feedback = true;
|
||||
}
|
||||
// if ((paintConveyorDeviceDriver.getAction() == 2 || paintConveyorDeviceDriver.getAction() == 3) && paintConveyorDeviceDriver.getMove() == 0) {
|
||||
// inst.setExecute_status("3");
|
||||
// is_feedback = true;
|
||||
// }
|
||||
is_feedback = true;
|
||||
|
||||
}
|
||||
}
|
||||
if ("PauseOnStation".equals(type)) {
|
||||
@@ -470,7 +470,7 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
||||
JSONArray properties = new JSONArray();
|
||||
JSONObject pro1 = new JSONObject();
|
||||
pro1.put("key", "EntryRequired");
|
||||
pro1.put("value", "True");
|
||||
pro1.put("value", "true");
|
||||
properties.add(pro1);
|
||||
JSONObject pro2 = new JSONObject();
|
||||
pro2.put("key", "PauseOnStation");
|
||||
|
||||
@@ -140,7 +140,11 @@ https://juejin.cn/post/6844903775631572999
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
<appender-ref ref="lokiAppender" />
|
||||
</root>
|
||||
<logger name="org.nl.acs.log.service.impl.DeviceExecuteLogServiceImpl" level="info" additivity="false">
|
||||
<logger name="org.nl.acs.log.LokiLogAspect" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
<appender-ref ref="lokiAppender" />
|
||||
</logger>
|
||||
<logger name="org.nl.acs.log.service.impl.DeviceExecuteLogServiceImpl" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
<appender-ref ref="lokiAppender" />
|
||||
</logger>
|
||||
|
||||
Reference in New Issue
Block a user