add:盘点任务类型下发
This commit is contained in:
@@ -537,11 +537,13 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
String interactionJson = handCodeTaskDto.getInteraction_json();
|
||||
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
|
||||
String containerType = "0";
|
||||
String type = "0";
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO)) {
|
||||
containerType = interactionJsonDTO.getContainerType();
|
||||
type = interactionJsonDTO.getType();
|
||||
}
|
||||
List<String> keys = new ArrayList<>(Arrays.asList(ItemProtocol.TO_TARGET.getKey(), ItemProtocol.TO_TASK.getKey(), ItemProtocol.TO_CONTAINER_TYPE.getKey(), ItemProtocol.TO_COMMAND.getKey()));
|
||||
List<Object> values = new ArrayList<>(Arrays.asList(getTargetAddress(nextDevice), Integer.parseInt(instDto.getInstruction_code()), Integer.parseInt(containerType), ToCommandEnum.COMMAND_ONE.getSignalNum()));
|
||||
List<String> keys = new ArrayList<>(Arrays.asList(ItemProtocol.TO_BACK_UP_1.getKey(),ItemProtocol.TO_TARGET.getKey(), ItemProtocol.TO_TASK.getKey(), ItemProtocol.TO_CONTAINER_TYPE.getKey(), ItemProtocol.TO_COMMAND.getKey()));
|
||||
List<Object> values = new ArrayList<>(Arrays.asList(type,getTargetAddress(nextDevice), Integer.parseInt(instDto.getInstruction_code()), Integer.parseInt(containerType), ToCommandEnum.COMMAND_ONE.getSignalNum()));
|
||||
this.writing(keys, values);
|
||||
this.requireSuccess = true;
|
||||
return;
|
||||
@@ -591,11 +593,13 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
String interactionJson = taskDto.getInteraction_json();
|
||||
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
|
||||
String containerType = "0";
|
||||
String type = "0";
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO)) {
|
||||
containerType = interactionJsonDTO.getContainerType();
|
||||
type = interactionJsonDTO.getType();
|
||||
}
|
||||
List<String> keys = new ArrayList<>(Arrays.asList(ItemProtocol.TO_TARGET.getKey(), ItemProtocol.TO_TASK.getKey(), ItemProtocol.TO_CONTAINER_TYPE.getKey(), ItemProtocol.TO_COMMAND.getKey()));
|
||||
List<Object> values = new ArrayList<>(Arrays.asList(getTargetAddress(nextDevice), Integer.parseInt(instDto.getInstruction_code()), Integer.parseInt(containerType), ToCommandEnum.COMMAND_ONE.getSignalNum()));
|
||||
List<String> keys = new ArrayList<>(Arrays.asList(ItemProtocol.TO_BACK_UP_1.getKey(),ItemProtocol.TO_TARGET.getKey(), ItemProtocol.TO_TASK.getKey(), ItemProtocol.TO_CONTAINER_TYPE.getKey(), ItemProtocol.TO_COMMAND.getKey()));
|
||||
List<Object> values = new ArrayList<>(Arrays.asList(type,getTargetAddress(nextDevice), Integer.parseInt(instDto.getInstruction_code()), Integer.parseInt(containerType), ToCommandEnum.COMMAND_ONE.getSignalNum()));
|
||||
this.writing(keys, values);
|
||||
this.requireSuccess = true;
|
||||
}
|
||||
|
||||
@@ -41,4 +41,6 @@ public class InteractionJsonDTO {
|
||||
* 高度等级
|
||||
*/
|
||||
private String heightLevel;
|
||||
|
||||
private String type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user