add : 测试入库
This commit is contained in:
@@ -18,17 +18,17 @@ import java.util.List;
|
|||||||
public class BoxStorageOutConveyorDefination implements OpcDeviceDriverDefination {
|
public class BoxStorageOutConveyorDefination implements OpcDeviceDriverDefination {
|
||||||
@Override
|
@Override
|
||||||
public String getDriverCode() {
|
public String getDriverCode() {
|
||||||
return "box_storage_conveyor";
|
return "box_storage_out_conveyor";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDriverName() {
|
public String getDriverName() {
|
||||||
return "一楼木箱入库站点";
|
return "一楼木箱出入库标准站点";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDriverDescription() {
|
public String getDriverDescription() {
|
||||||
return "一楼木箱入库站点";
|
return "一楼木箱出入库标准站点";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -45,7 +45,7 @@ public class BoxStorageOutConveyorDefination implements OpcDeviceDriverDefinatio
|
|||||||
@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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
log.debug("设备运转模式:等待工作");
|
log.debug("设备运转模式:等待工作");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
//木箱出库申请任务
|
//申请任务
|
||||||
if (move > 0 && !requireSucess) {
|
if (move > 0 && !requireSucess) {
|
||||||
instruction_require();
|
instruction_require();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,64 +187,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
weight = this.itemProtocol.getWeight();
|
weight = this.itemProtocol.getWeight();
|
||||||
barcode = this.itemProtocol.getBarcode();
|
barcode = this.itemProtocol.getBarcode();
|
||||||
|
|
||||||
if (to_container_type != last_to_container_type) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_container_type:" + last_to_container_type + "->" + to_container_type);
|
|
||||||
}
|
|
||||||
if (container_type != last_container_type) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号container_type:" + last_container_type + "->" + container_type);
|
|
||||||
}
|
|
||||||
if (hj_task != last_hj_task) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号hj_task:" + last_hj_task + "->" + hj_task);
|
|
||||||
}
|
|
||||||
if (qty != last_qty) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号qty:" + last_qty + "->" + qty);
|
|
||||||
}
|
|
||||||
if (weight != last_weight) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号weight:" + last_weight + "->" + weight);
|
|
||||||
}
|
|
||||||
if (barcode != last_barcode) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号barcode:" + last_barcode + "->" + barcode);
|
|
||||||
}
|
|
||||||
if (carrier_direction != last_carrier_direction) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号carrier_direction:" + last_carrier_direction + "->" + carrier_direction);
|
|
||||||
}
|
|
||||||
if (to_command != last_to_command) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_command:" + last_to_command + "->" + to_command);
|
|
||||||
}
|
|
||||||
if (to_target != last_to_target) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_target:" + last_to_target + "->" + to_target);
|
|
||||||
}
|
|
||||||
if (to_task != last_to_task) {
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_task:" + last_to_task + "->" + to_task);
|
|
||||||
}
|
|
||||||
if (mode != last_mode) {
|
|
||||||
requireSucess = false;
|
|
||||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
|
||||||
}
|
|
||||||
if (move != last_move) {
|
|
||||||
logServer.deviceItemValue(this.device_code, "move", String.valueOf(move));
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move);
|
|
||||||
}
|
|
||||||
if (action != last_action) {
|
|
||||||
logServer.deviceItemValue(this.device_code, "action", String.valueOf(action));
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + last_action + "->" + action);
|
|
||||||
}
|
|
||||||
if (error != last_error) {
|
|
||||||
|
|
||||||
//存在报警信号,则下发去异常处理位的任务
|
|
||||||
applyErrorTask();
|
|
||||||
|
|
||||||
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error);
|
|
||||||
}
|
|
||||||
if (task != last_task) {
|
|
||||||
logServer.deviceItemValue(this.device_code, "task", String.valueOf(task));
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新指令状态
|
|
||||||
updateInstruct();
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + Arrays.toString(e.getStackTrace()));
|
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + Arrays.toString(e.getStackTrace()));
|
||||||
@@ -258,7 +201,8 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
} else if (error != 0) {
|
} else if (error != 0) {
|
||||||
this.setIserror(true);
|
this.setIserror(true);
|
||||||
message = "有报警";
|
message = "有报警";
|
||||||
//无报警
|
//申请异常位任务
|
||||||
|
applyErrorTask();
|
||||||
} else {
|
} else {
|
||||||
this.setIsonline(true);
|
this.setIsonline(true);
|
||||||
this.setIserror(false);
|
this.setIserror(false);
|
||||||
@@ -271,7 +215,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
}
|
}
|
||||||
|
|
||||||
//申请入库指令、异常位指令
|
//申请入库指令、异常位指令
|
||||||
if (mode == 2 && move == 1 && task > 0 && !requireSucess) {
|
if (mode == 2 && move == 1 && !requireSucess) {
|
||||||
boolean res = instruction_require();
|
boolean res = instruction_require();
|
||||||
if (res) {
|
if (res) {
|
||||||
notCreateInstMessage = "";
|
notCreateInstMessage = "";
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
//找符合条件的任务
|
//找符合条件的任务
|
||||||
BoxSubvolumesConveyorDeviceDriver boxOutSubvolumesConveyorDeviceDriver = new BoxSubvolumesConveyorDeviceDriver();
|
BoxSubvolumesConveyorDeviceDriver boxOutSubvolumesConveyorDeviceDriver = new BoxSubvolumesConveyorDeviceDriver();
|
||||||
String deviceCode = boxOutSubvolumesConveyorDeviceDriver.getDevice_code();
|
String deviceCode = boxOutSubvolumesConveyorDeviceDriver.getDevice_code();
|
||||||
TaskDto taskDto = taskserver.findByEndCodeAndReady(deviceCode, TaskTypeEnum.Truss_Task.getIndex());
|
TaskDto taskDto = taskserver.findByEndCodeAndReady(deviceCode);
|
||||||
if (ObjectUtil.isNotEmpty(taskDto)) {
|
if (ObjectUtil.isNotEmpty(taskDto)) {
|
||||||
|
|
||||||
String interactionJson = taskDto.getInteraction_json();
|
String interactionJson = taskDto.getInteraction_json();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.acs.device_driver.one_manipulator.box_package_manipulator;
|
package org.nl.acs.device_driver.one_manipulator.box_package_manipulator;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|||||||
@@ -154,7 +154,6 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
to_barcode = this.itemProtocol.getTo_barcode();
|
to_barcode = this.itemProtocol.getTo_barcode();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 更新指令状态
|
// 更新指令状态
|
||||||
if (mode == 3 && task > 0) {
|
if (mode == 3 && task > 0) {
|
||||||
updateInstructionStatus();
|
updateInstructionStatus();
|
||||||
@@ -242,10 +241,10 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
|
|
||||||
//放货完成
|
//放货完成
|
||||||
if (mode == 3 && action == 4 && move == 0) {
|
if (action == 4 && move == 0) {
|
||||||
if (inst != null) {
|
if (inst != null) {
|
||||||
try {
|
try {
|
||||||
logServer.deviceExecuteLog(this.device_code,"","","放货完成");
|
logServer.deviceExecuteLog(this.device_code, "", "", "放货完成");
|
||||||
finish_instruction(inst);
|
finish_instruction(inst);
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("to_command", 5);
|
map.put("to_command", 5);
|
||||||
@@ -256,12 +255,12 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
feedMessage = "";
|
feedMessage = "";
|
||||||
}else {
|
} else {
|
||||||
feedMessage = "行架机械手:";
|
feedMessage = "行架机械手:";
|
||||||
if (mode != 3) {
|
if (mode != 3) {
|
||||||
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
||||||
}
|
}
|
||||||
if (action != 8) {
|
if (action != 5) {
|
||||||
feedMessage = feedMessage + "动作信号(action)不为放货完成状态,";
|
feedMessage = feedMessage + "动作信号(action)不为放货完成状态,";
|
||||||
}
|
}
|
||||||
if (move != 0) {
|
if (move != 0) {
|
||||||
@@ -285,12 +284,19 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
this.instruction_require_time = date;
|
this.instruction_require_time = date;
|
||||||
|
//抓取工位
|
||||||
|
if (ObjectUtil.isEmpty(getDeviceCodeList)) {
|
||||||
|
getDeviceCodeList = this.getExtraDeviceCodes("get_device_code");
|
||||||
|
}
|
||||||
|
//放货工位
|
||||||
|
if (ObjectUtil.isEmpty(putDeviceCodeList)) {
|
||||||
|
putDeviceCodeList = this.getExtraDeviceCodes("put_device_code");
|
||||||
|
}
|
||||||
//找终点为入库输送线工位任务类型为行架的任务
|
//找终点为入库输送线工位任务类型为行架的任务
|
||||||
BoxSubvolumesConveyorDeviceDriver boxOutSubvolumesConveyorDeviceDriver = new BoxSubvolumesConveyorDeviceDriver();
|
for (int i = 0; i < getDeviceCodeList.size(); i++) {
|
||||||
String deviceCode = boxOutSubvolumesConveyorDeviceDriver.getDevice_code();
|
String startDeviceCode = getDeviceCodeList.get(i);
|
||||||
TaskDto taskDto = taskserver.findByEndCodeAndReady(deviceCode, TaskTypeEnum.Box_Storage.getIndex());
|
TaskDto taskDto = taskserver.findByStartCodeAndReady(startDeviceCode);
|
||||||
if (ObjectUtil.isNotEmpty(taskDto)) {
|
if (ObjectUtil.isNotEmpty(taskDto)) {
|
||||||
|
|
||||||
String interactionJson = taskDto.getInteraction_json();
|
String interactionJson = taskDto.getInteraction_json();
|
||||||
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
|
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
|
||||||
String start_device_code = taskDto.getStart_device_code();
|
String start_device_code = taskDto.getStart_device_code();
|
||||||
@@ -309,8 +315,6 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
instdto.setRoute_plan_code(route_plan_code);
|
instdto.setRoute_plan_code(route_plan_code);
|
||||||
instdto.setTask_id(taskid);
|
instdto.setTask_id(taskid);
|
||||||
instdto.setTask_code(taskcode);
|
instdto.setTask_code(taskcode);
|
||||||
String now = DateUtil.now();
|
|
||||||
instdto.setCreate_time(now);
|
|
||||||
instdto.setCreate_by("auto");
|
instdto.setCreate_by("auto");
|
||||||
instdto.setStart_device_code(start_device_code);
|
instdto.setStart_device_code(start_device_code);
|
||||||
instdto.setNext_device_code(next_device_code);
|
instdto.setNext_device_code(next_device_code);
|
||||||
@@ -321,6 +325,9 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
instructionService.create(instdto);
|
instructionService.create(instdto);
|
||||||
|
//创建指令后修改任务状态
|
||||||
|
taskDto.setTask_status("1");
|
||||||
|
taskserver.update(taskDto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
notCreateInstMessage = e.getMessage();
|
notCreateInstMessage = e.getMessage();
|
||||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "创建指令时出现异常:" + e.getMessage());
|
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "创建指令时出现异常:" + e.getMessage());
|
||||||
@@ -336,20 +343,20 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
map.put("to_target", next_addr);
|
map.put("to_target", next_addr);
|
||||||
map.put("to_onset", start_addr);
|
map.put("to_onset", start_addr);
|
||||||
map.put("to_task", instdto.getInstruction_code());
|
map.put("to_task", instdto.getInstruction_code());
|
||||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getItem_to_weight())) {
|
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getTo_weight())) {
|
||||||
map.put("to_wedth", interactionJsonDTO.getItem_to_weight());
|
map.put("to_wedth", interactionJsonDTO.getTo_weight());
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getItem_to_length())) {
|
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getTo_length())) {
|
||||||
map.put("to_length", interactionJsonDTO.getItem_to_length());
|
map.put("to_length", interactionJsonDTO.getTo_length());
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getItem_to_height())) {
|
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getTo_height())) {
|
||||||
map.put("to_height", interactionJsonDTO.getItem_to_height());
|
map.put("to_height", interactionJsonDTO.getTo_height());
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getItem_to_barcode())) {
|
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getTo_barcode())) {
|
||||||
map.put("to_barcode", interactionJsonDTO.getItem_to_barcode());
|
map.put("to_barcode", interactionJsonDTO.getTo_barcode());
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getItem_to_layer())) {
|
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getTo_layer())) {
|
||||||
map.put("to_layer", interactionJsonDTO.getItem_to_layer());
|
map.put("to_layer", interactionJsonDTO.getTo_layer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -362,18 +369,15 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
}else{
|
||||||
notCreateInstMessage = "未找到关联设备的任务,指令无法创建";
|
notCreateInstMessage = "未找到关联设备的任务,指令无法创建";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 下发
|
|
||||||
* @param map
|
|
||||||
*/
|
|
||||||
public void writing(Map<String, Object> map) {
|
public void writing(Map<String, Object> map) {
|
||||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||||
Map<String, Object> itemMap = new LinkedHashMap<>();
|
Map<String, Object> itemMap = new LinkedHashMap<>();
|
||||||
@@ -383,15 +387,12 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (ObjectUtil.isNotEmpty(itemMap)) {
|
if (ObjectUtil.isNotEmpty(itemMap)) {
|
||||||
try {
|
this.control(itemMap);
|
||||||
this.checkcontrol(itemMap);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
|
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized boolean finish_instruction(Instruction inst) throws Exception {
|
public synchronized boolean finish_instruction(Instruction inst) throws Exception {
|
||||||
instructionService.finish(inst);
|
instructionService.finish(inst);
|
||||||
return true;
|
return true;
|
||||||
@@ -405,6 +406,7 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
public String getToParam() {
|
public String getToParam() {
|
||||||
return this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + ".";
|
return this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject getDeviceStatusName() {
|
public JSONObject getDeviceStatusName() {
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
|
|||||||
@@ -8,24 +8,24 @@ public class InteractionJsonDTO {
|
|||||||
/**
|
/**
|
||||||
*木箱长度
|
*木箱长度
|
||||||
*/
|
*/
|
||||||
private String item_to_length = "to_length";
|
private String to_length;
|
||||||
/**
|
/**
|
||||||
*木箱宽度
|
*木箱宽度
|
||||||
*/
|
*/
|
||||||
private String item_to_weight = "to_weight";
|
private String to_weight;
|
||||||
/**
|
/**
|
||||||
*木箱高度
|
*木箱高度
|
||||||
*/
|
*/
|
||||||
private String item_to_height = "to_height";
|
private String to_height;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*下发木箱条码
|
*下发木箱条码
|
||||||
*/
|
*/
|
||||||
private String item_to_barcode = "to_barcode";
|
private String to_barcode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*下发木箱层数
|
*下发木箱层数
|
||||||
*/
|
*/
|
||||||
private String item_to_layer = "to_layer";
|
private String to_layer;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,6 +169,8 @@ public class ItemProtocol {
|
|||||||
list.add(new ItemDto(item_error, "报警信号", "DB1.B5"));
|
list.add(new ItemDto(item_error, "报警信号", "DB1.B5"));
|
||||||
list.add(new ItemDto(item_task, "任务号", "DB1.D6"));
|
list.add(new ItemDto(item_task, "任务号", "DB1.D6"));
|
||||||
list.add(new ItemDto(item_walk_y, "行走列", "DB1.B4"));
|
list.add(new ItemDto(item_walk_y, "行走列", "DB1.B4"));
|
||||||
|
list.add(new ItemDto(item_to_barcode, "下发木箱条码", "DB1.B7"));
|
||||||
|
list.add(new ItemDto(item_to_layer, "下发木箱层数", "DB1.B8"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
this.instruction_require_time = date;
|
this.instruction_require_time = date;
|
||||||
BoxStorageOutConveyorDeviceDriver boxStorageConveyorDeviceDriver = new BoxStorageOutConveyorDeviceDriver();
|
BoxStorageOutConveyorDeviceDriver boxStorageConveyorDeviceDriver = new BoxStorageOutConveyorDeviceDriver();
|
||||||
String deviceCode = boxStorageConveyorDeviceDriver.getDevice_code();
|
String deviceCode = boxStorageConveyorDeviceDriver.getDevice_code();
|
||||||
TaskDto taskDto = taskserver.findByEndCodeAndReady(deviceCode, TaskTypeEnum.Return_Good.getIndex());
|
TaskDto taskDto = taskserver.findByEndCodeAndReady(deviceCode);
|
||||||
if (ObjectUtil.isNotEmpty(taskDto)) {
|
if (ObjectUtil.isNotEmpty(taskDto)) {
|
||||||
String start_device_code = taskDto.getStart_device_code();
|
String start_device_code = taskDto.getStart_device_code();
|
||||||
String next_device_code = taskDto.getNext_device_code();
|
String next_device_code = taskDto.getNext_device_code();
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
|||||||
|
|
||||||
BoxManipulatorSiteDeviceDriver boxManipulatorSiteDeviceDriver = new BoxManipulatorSiteDeviceDriver();
|
BoxManipulatorSiteDeviceDriver boxManipulatorSiteDeviceDriver = new BoxManipulatorSiteDeviceDriver();
|
||||||
String deviceCode = boxManipulatorSiteDeviceDriver.getDevice_code();
|
String deviceCode = boxManipulatorSiteDeviceDriver.getDevice_code();
|
||||||
TaskDto taskDto = taskserver.findByEndCodeAndReady(deviceCode, TaskTypeEnum.Truss_Task.getIndex());
|
TaskDto taskDto = taskserver.findByEndCodeAndReady(deviceCode);
|
||||||
String interactionJson = taskDto.getInteraction_json();
|
String interactionJson = taskDto.getInteraction_json();
|
||||||
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
|
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
|
||||||
if (ObjectUtil.isNotEmpty(taskDto)) {
|
if (ObjectUtil.isNotEmpty(taskDto)) {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class RgvDefination 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.conveyor);
|
types.add(DeviceType.rgv);
|
||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -386,10 +386,9 @@ public interface TaskService extends CommonService<Task> {
|
|||||||
* 根据终点设备编号查询当前是否有就绪任务
|
* 根据终点设备编号查询当前是否有就绪任务
|
||||||
*
|
*
|
||||||
* @param device_code
|
* @param device_code
|
||||||
* @param index
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
TaskDto findByEndCodeAndReady(String device_code, String index);
|
TaskDto findByEndCodeAndReady(String device_code);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1000,11 +1000,11 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TaskDto findByEndCodeAndReady(String device_code, String index) {
|
public TaskDto findByEndCodeAndReady(String device_code) {
|
||||||
Optional<TaskDto> optionalTask = tasks.stream()
|
Optional<TaskDto> optionalTask = tasks.stream()
|
||||||
.filter(task -> StrUtil.equals(task.getNext_device_code(), device_code)
|
.filter(task -> StrUtil.equals(task.getNext_device_code(), device_code)
|
||||||
&& StrUtil.equals(task.getTask_status(), TaskStatusEnum.READY.getIndex())
|
&& StrUtil.equals(task.getTask_status(), TaskStatusEnum.READY.getIndex())
|
||||||
&& StrUtil.equals(task.getTask_type(), index))
|
)
|
||||||
.findFirst();
|
.findFirst();
|
||||||
return optionalTask.orElse(null);
|
return optionalTask.orElse(null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!--标准版-输送机-控制点-->
|
<!--一楼木箱入库站点-->
|
||||||
<div>
|
<div>
|
||||||
<el-card class="box-card" shadow="never">
|
<el-card class="box-card" shadow="never">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
|
|||||||
Reference in New Issue
Block a user