fix: 禁止出入库任务、暂停任务
This commit is contained in:
@@ -281,6 +281,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
*/
|
*/
|
||||||
Boolean requireSucess = false;
|
Boolean requireSucess = false;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前指令
|
* 当前指令
|
||||||
*/
|
*/
|
||||||
@@ -809,11 +810,17 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
this.instruction_require_time = date;
|
this.instruction_require_time = date;
|
||||||
|
//暂停任务
|
||||||
|
if (!stopReceiveTask){
|
||||||
|
this.notCreateInstMessage = "任务暂停";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
//输入:指令类型多种\ 指令状态多种\
|
//输入:指令类型多种\ 指令状态多种\
|
||||||
Instruction instruction1 = new Instruction();
|
Instruction instruction1 = new Instruction();
|
||||||
instruction1.setInstruction_status("0");
|
instruction1.setInstruction_status("0");
|
||||||
List<Instruction> instructions = instructionService.findByDeviceCodes(instruction1, false);
|
List<Instruction> instructions = instructionService.findByDeviceCodes(instruction1, false);
|
||||||
if (CollUtil.isEmpty(instructions) || instructions.size() < 1) {
|
if (CollUtil.isEmpty(instructions) || instructions.size() < 1) {
|
||||||
|
this.notCreateInstMessage = "未找到任务";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
List<Instruction> instructionList = new ArrayList<>();
|
List<Instruction> instructionList = new ArrayList<>();
|
||||||
@@ -863,7 +870,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
|
|
||||||
pakageCommand(list,"1", inst.getInstruction_code());
|
pakageCommand(list,"1", inst.getInstruction_code());
|
||||||
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) {
|
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name()) && !prohibitInWarehouse) {
|
||||||
if (ObjectUtil.isNotEmpty(startDevice.getExtraValue().get("z"))) {
|
if (ObjectUtil.isNotEmpty(startDevice.getExtraValue().get("z"))) {
|
||||||
HashMap map4 = new HashMap();
|
HashMap map4 = new HashMap();
|
||||||
map4.put("code", "to_x");
|
map4.put("code", "to_x");
|
||||||
@@ -883,7 +890,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
list.add(map6);
|
list.add(map6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.storage.name())) {
|
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.storage.name()) && !prohibitOutWarehouse) {
|
||||||
pakagePlc(inst, list);
|
pakagePlc(inst, list);
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(list)) {
|
if (ObjectUtil.isNotEmpty(list)) {
|
||||||
@@ -1107,9 +1114,12 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
//监控大屏下发作业命令清警-5、召回-7、急停-8
|
//监控大屏下发作业命令清警-5、召回-7、急停-8
|
||||||
Integer toCommand = data.getInteger("toCommand");
|
Integer toCommand = data.getInteger("toCommand");
|
||||||
if (toCommand != null) {
|
if (toCommand != null) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
HashMap map1 = new HashMap();
|
||||||
map.put("to_command", toCommand);
|
List<Object> list = new ArrayList<>();
|
||||||
this.writing(map);
|
map1.put("code", "to_command");
|
||||||
|
map1.put("value", toCommand);
|
||||||
|
list.add(map1);
|
||||||
|
this.writing(map1);
|
||||||
}
|
}
|
||||||
//ACS监控大屏设置禁止入库、禁止出库、停止接收任务
|
//ACS监控大屏设置禁止入库、禁止出库、停止接收任务
|
||||||
Boolean prohibitInWarehouse = data.getBoolean("prohibitInWarehouse");
|
Boolean prohibitInWarehouse = data.getBoolean("prohibitInWarehouse");
|
||||||
|
|||||||
Reference in New Issue
Block a user