diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java index 7887b995a..b487bf3ae 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java @@ -108,6 +108,8 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i int qty = 0; int last_qty = 0; + int out_finish = 0; + //下发命令 int to_command = 0; @@ -241,7 +243,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i case 3: log.info("运行中"); break; - case 4: + case 5: if (move == 1 && !requireSucess && task > 0 && task1 > 0) { //申请套管校验 // apply_for_casing_inspection(material1, material2); @@ -400,7 +402,36 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i @Override public JSONObject getDeviceStatusName() throws Exception { - return null; + JSONObject jo = new JSONObject(); + String mode = ""; + String move = ""; + + if (this.getMode() == 0) { + mode = "未联机"; + } else if (this.getMode() == 1) { + mode = "单机"; + } else if (this.getMode() == 2) { + mode = "联机"; + } else if (this.getMode() == 3) { + mode = "运行中"; + } else if (this.getMode() == 4) { + mode = "套管完成"; + } + if(this.getMove() ==0){ + move = "无货"; + }else if(this.getMove() == 1){ + move = "有托盘"; + } + jo.put("device_name", this.getDevice().getDevice_name()); + jo.put("mode", mode); + jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError()))); + jo.put("move", move); + jo.put("inventory_qty", qty); + jo.put("out_finish", out_finish); + jo.put("material", material1); + jo.put("isOnline", this.getIsonline()); + + return jo; } @Override diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/ItemProtocol.java index be18b5821..143c66e17 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/ItemProtocol.java @@ -117,11 +117,11 @@ public class ItemProtocol { list.add(new ItemDto(item_move, "光电信号", "DB101.W4")); list.add(new ItemDto(item_carrier_direction, "托盘方向", "DB101.W6")); list.add(new ItemDto(item_error, "报警", "DB101.W8")); - list.add(new ItemDto(item_task, "任务号1", "DB101.DW116")); - list.add(new ItemDto(item_task1, "任务号2", "DB101.DW118")); list.add(new ItemDto(item_material1, "物料1", "DB101.STRING10.50")); list.add(new ItemDto(item_material2, "物料2", "DB101.STRING62.50")); list.add(new ItemDto(item_qty, "数量", "DB101.W114")); + list.add(new ItemDto(item_task, "纸管库任务号", "DB101.D116")); + list.add(new ItemDto(item_task1, "行架任务号", "DB101.D120")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java index 6b9c6bae0..c56ffb902 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java @@ -27,6 +27,7 @@ import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl; import org.nl.acs.instruction.service.InstructionService; import org.nl.acs.instruction.service.dto.Instruction; import org.nl.acs.log.service.DeviceExecuteLogService; +import org.nl.acs.monitor.DeviceStageMonitor; import org.nl.acs.opc.Device; import org.nl.acs.opc.DeviceAppService; import org.nl.acs.opc.DeviceAppServiceImpl; @@ -49,7 +50,7 @@ import java.util.*; @Slf4j @Data @RequiredArgsConstructor -public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver { +public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor { protected org.nl.acs.device_driver.basedriver.indoor_manipulator.ItemProtocol itemProtocol = new ItemProtocol(this); @Autowired InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl"); @@ -647,6 +648,76 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple return taskDtos; } + @Override + public JSONObject getDeviceStatusName() { + JSONObject jo = new JSONObject(); + String mode = ""; + String move = ""; + String action = ""; + if (this.getMode() == 0) { + mode = "脱机"; + } else if (this.getMode() == 1) { + mode = "单机"; + } else if (this.getMode() == 2) { + mode = "待机"; + } else if (this.getMode() == 3) { + mode = "运行中"; + } + + if (this.getMove() == 0) { + move = "无货"; + } else if (this.getMove() == 1) { + move = "有货"; + } + + String requireSucess = "0"; + if (this.requireSucess) { + requireSucess = "1"; + } + jo.put("requireSucess", requireSucess); + if (this.getAction() == 2) { + action = "反馈气胀轴尺寸"; + } else if (this.getAction() == 3) { + action = "申请放货点"; + } else if (this.getAction() == 4) { + action = "申请新取货点"; + } else if (this.getAction() == 5) { + action = "申请二次放货点"; + } else if (this.getAction() == 6) { + action = "缓存库取货完成"; + } else if (this.getAction() == 7) { + action = "缓存线放货完成"; + } else if (this.getAction() == 8) { + action = "任务完成"; + } + + jo.put("device_name", this.getDevice().getDevice_name()); + jo.put("mode", mode); + jo.put("move", move); + jo.put("action", action); + jo.put("task", task); + jo.put("walk_y", String.valueOf(this.walk_y)); + jo.put("isOnline", this.getIsonline()); + jo.put("error", this.getError()); + jo.put("isError", this.getIserror()); + jo.put("message", this.getMessage()); + jo.put("is_click", true); + jo.put("x", x_position); + jo.put("y", y_position); + jo.put("inflatable_shaft_size", this.inflatable_shaft_size); + return jo; + } + + @Override + public void setDeviceStatus(JSONObject data) { + String requestSucess = data.getString("requireSucess"); + if (StrUtil.equals(requestSucess, "0")) { + this.requireSucess = false; + } else if (StrUtil.equals(requestSucess, "1")) { + this.requireSucess = true; + } + } + public void writing(String param, String value) { String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/PaperTubeConveyor2DeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/PaperTubeConveyor2DeviceDriver.java index 034fafd91..8ffae261d 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/PaperTubeConveyor2DeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/PaperTubeConveyor2DeviceDriver.java @@ -688,6 +688,7 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl public JSONObject getDeviceStatusName() { JSONObject jo = new JSONObject(); String mode = ""; + String move = ""; if (this.getMode() == 0) { mode = "未联机"; @@ -696,16 +697,22 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl } else if (this.getMode() == 2) { mode = "联机"; } else if (this.getMode() == 3) { - mode = "入库中"; + mode = "运行中"; } else if (this.getMode() == 4) { - mode = "出库中"; + mode = "申请出纸管"; + } + if(this.getMove() == 0){ + move = "无货"; + }else if(this.getMove() == 1){ + move = "有托盘"; } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError()))); - jo.put("inventory_qty", inventory_qty); + jo.put("inventory_qty", item_qty1); + jo.put("move", move); jo.put("out_finish", out_finish); - jo.put("material", material); + jo.put("material", item_material1); jo.put("isOnline", this.getIsonline()); return jo; diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java index 7427772ce..255072c29 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java @@ -308,7 +308,6 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv public JSONObject getDeviceStatusName() { JSONObject jo = new JSONObject(); String mode = ""; - String action = ""; String move = ""; if (this.getMode() == 0) { mode = "未联机"; @@ -318,6 +317,8 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv mode = "联机"; } else if (this.getMode() == 3) { mode = "运行中"; + } else if (this.getMode() == 4) { + mode = "套轴申请"; } if (this.getMove() == 0) { @@ -335,6 +336,7 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv jo.put("move", move); jo.put("isOnline", this.getIsonline()); jo.put("isError", this.getIserror()); + jo.put("message", this.getMessage()); return jo; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/rgv/RgvDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/rgv/RgvDeviceDriver.java index 61c5667b4..77239aa69 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/rgv/RgvDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/rgv/RgvDeviceDriver.java @@ -96,6 +96,7 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr return this.device; } + @Override public void execute() { String message = null; try { @@ -108,6 +109,7 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr qty2 = this.itemProtocol.getQty2(); task = this.itemProtocol.getTask(); + if (mode != last_mode) { this.requireSucess = false; logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记"); @@ -259,6 +261,8 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr mode = "联机"; } else if (this.getMode() == 3) { mode = "运行中"; + } else if (this.getMode() == 4) { + mode = "反馈重量"; } if (this.getMove1() == 0 && this.getMove2() == 0) { @@ -274,6 +278,9 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr jo.put("move2", move2); jo.put("isOnline", this.getIsonline()); jo.put("isError", this.getIserror()); + jo.put("qty1", this.getQty1()); + jo.put("qty2", this.getQty2()); + jo.put("message", this.getMessage()); return jo; } diff --git a/acs/nladmin-ui/src/views/acs/task/index.vue b/acs/nladmin-ui/src/views/acs/task/index.vue index c7759456e..1f0c69f75 100644 --- a/acs/nladmin-ui/src/views/acs/task/index.vue +++ b/acs/nladmin-ui/src/views/acs/task/index.vue @@ -80,15 +80,15 @@ - - + + - + @@ -282,7 +282,7 @@ @@ -295,17 +295,113 @@ - + - + - + - + + + + + + + + + + + + + + + + 添加新行 + + + + + + + + + + + + + + + + + + + + + + + @@ -479,6 +575,7 @@ export default { edit: ['admin', 'task:edit'], del: ['admin', 'task:del'] }, + showAddRowButton: true, form: { task_id: null, vehicle_code: null, @@ -505,7 +602,22 @@ export default { to_z: null, agv_system_type: '', next_height: '0', - start_height: '0' + start_height: '0', + truss_type: null, + version: null, + bushing_num: null, + is_bushing: null, + paperArray: [{ + device_code: '', + material_code: '', + qty: '' + }/* , + { + device_code: '', + material_code: '', + qty: '' + } */ + ] }, rules: { start_height: [ @@ -558,10 +670,24 @@ export default { } }) }, + addNewRow() { + this.form.paperArray.push({ + device_code: '', + material_code: '', + qty: '' + }) + }, // 钩子:在获取表格数据之前执行,false 则代表不获取数据 [CRUD.HOOK.beforeRefresh]() { return true }, + deleteField(index) { // 添加字段的时候删除一条数据 + console.log(index) + if (this.form.paperArray.length > 1) { + this.form.paperArray.splice(index, 1) + } + console.log(this.form.paperArray) + }, finish(index, row) { crudTask.finish(row.task_id).then(res => { this.crud.toQuery() diff --git a/acs/nladmin-ui/src/views/system/monitor/device/index.vue b/acs/nladmin-ui/src/views/system/monitor/device/index.vue index 87abda158..d731d4a42 100644 --- a/acs/nladmin-ui/src/views/system/monitor/device/index.vue +++ b/acs/nladmin-ui/src/views/system/monitor/device/index.vue @@ -634,6 +634,15 @@ export default { } else if (val === 'task_id') { const obj = { name: '任务号', value: data[val] } this.arr.push(obj) + } else if (val === 'inflatable_shaft_size') { + const obj = { name: '任务号', value: data[val] } + this.arr.push(obj) + } else if (val === 'qty1') { + const obj = { name: '任务号', value: data[val] } + this.arr.push(obj) + } else if (val === 'qty2') { + const obj = { name: '任务号', value: data[val] } + this.arr.push(obj) } } }