From 1eedcd50ad7aa66dc4595fde6807a2d1816586c4 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Mon, 26 Dec 2022 21:35:18 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SiemensConveyorDeviceDriver.java | 10 ++++++++-- .../SlitTwoManipulatorDeviceDriver.java | 19 ++++++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java index b8bff8054..ecd089c8a 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java @@ -219,7 +219,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme } - public boolean exe_error() { if (this.error == 0) { return true; @@ -242,6 +241,14 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme protected void thingToNothing() throws Exception { this.setRequireSucess(false); this.setApplySucess(false); + this.writing("to_command", "0"); + this.writing("to_target", "0"); + this.writing("to_container_type", "0"); + this.writing("to_task", "0"); + this.writing("to_strap_times", "0"); + this.writing("to_length", "0"); + this.writing("to_weight", "0"); + this.writing("to_height", "0"); } @@ -332,7 +339,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme /** * 请求指令 - * */ public synchronized boolean instruction_require() throws Exception { Date date = new Date(); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java index 56b756faa..156526af2 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java @@ -292,6 +292,10 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl start_device_code = inst1.getStart_device_code2(); } Device startDevice = deviceAppservice.findDeviceByCode(start_device_code); + if (ObjectUtil.isEmpty(startDevice)) { + feedMessage = "后工位取货位:" + start_device_code + "为空!"; + return; + } SiemensConveyorDeviceDriver siemensConveyorDeviceDriver; if (startDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) { siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) startDevice.getDeviceDriver(); @@ -419,14 +423,23 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl //单任务/双任务 前工位放货时判断放货位光电信号 if (mode == 3 && action1 == 3 && move1 == 1 && task1 > 0) { Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task1)); - String next_device_code = inst1.getNext_device_code(); + String next_device_code = ""; + if (type == 1) { + next_device_code = inst1.getNext_device_code(); + } else if (type == 3) { + next_device_code = inst1.getNext_device_code2(); + } Device nextDevice = deviceAppservice.findDeviceByCode(next_device_code); + if (ObjectUtil.isEmpty(nextDevice)) { + feedMessage = "前工位放货位:" + next_device_code + "为空!"; + return; + } SiemensConveyorDeviceDriver siemensConveyorDeviceDriver; if (nextDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) { siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) nextDevice.getDeviceDriver(); int move = siemensConveyorDeviceDriver.getMove(); int mode = siemensConveyorDeviceDriver.getMode(); - if (move == 0 && mode == 2) { + if (move == 1 && mode == 2) { this.writing("to_command1", "4"); if (type == 1) { this.setNow_steps_type1(5); @@ -436,7 +449,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } else { log.warn("后工位放货位有货,放货位:{},mode:{},move:{}", next_device_code, mode, move); if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) { - feedMessage = "请检查输送线:move == 0 && mode == 2"; + feedMessage = "请检查输送线:move == 1 && mode == 2"; } } } From c8d63ffc685f21c02f34846a9bdaec8e1ea7ab4b Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Tue, 27 Dec 2022 10:45:25 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SlitTwoManipulatorDeviceDriver.java | 55 ++++++++++++------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java index 156526af2..dcd858f01 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java @@ -284,13 +284,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl //双任务/单任务 后工位取空时判断动作信号,并反馈 if (mode == 3 && action2 == 1 && move2 == 0 && task2 > 0) { Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task2)); - String start_device_code = ""; - if (type == 2) { - start_device_code = inst1.getStart_device_code(); - } - if (type == 3) { - start_device_code = inst1.getStart_device_code2(); - } + String start_device_code = inst1.getStart_device_code(); Device startDevice = deviceAppservice.findDeviceByCode(start_device_code); if (ObjectUtil.isEmpty(startDevice)) { feedMessage = "后工位取货位:" + start_device_code + "为空!"; @@ -311,13 +305,14 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } else { log.warn("前工位取货位无货,取货位:{},mode:{},move:{}", start_device_code, mode, move); if (this.getNow_steps_type2() == 2 || this.getNow_steps_type3() == 2) { - feedMessage = "请检查输送线:mode == 2 && move == 1"; + feedMessage = "请检查输送线:mode == 2 && move == 1,此时读取到mode = " + mode + "move = " + move; } } } } else { if (this.getNow_steps_type2() == 2 || this.getNow_steps_type3() == 2) { - feedMessage = "请检查:mode == 3 && action2 == 1 && move2 == 0 && task2 > 0"; + feedMessage = "请检查:mode == 3 && action2 == 1 && move2 == 0 && task2 > 0,此时读取到mode = " + mode + + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2; } } @@ -332,7 +327,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type2() == 3 || this.getNow_steps_type3() == 3) { - feedMessage = "请检查:mode == 3 && action2 == 2 && move2 == 1 && task2 > 0"; + feedMessage = "请检查:mode == 3 && action2 == 2 && move2 == 1 && task2 > 0,此时读取到mode = " + mode + + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2; } } @@ -346,7 +342,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type1() == 2 || this.getNow_steps_type3() == 4) { - feedMessage = "请检查mode == 3 && action1 == 1 && move1 == 0 && task1 > 0"; + feedMessage = "请检查mode == 3 && action1 == 1 && move1 == 0 && task1 > 0,此时读取到mode = " + mode + + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1; } } @@ -361,7 +358,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type1() == 3 || this.getNow_steps_type3() == 5) { - feedMessage = "请检查:mode == 3 && action1 == 2 && move1 == 1 && task1 > 0"; + feedMessage = "请检查:mode == 3 && action1 == 2 && move1 == 1 && task1 > 0,此时读取到mode = " + mode + + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1; } } @@ -376,7 +374,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type2() == 4 || this.getNow_steps_type3() == 6) { - feedMessage = "请检查:mode == 3 && action2 == 3 && move2 == 1 && task2 > 0"; + feedMessage = "请检查:mode == 3 && action2 == 3 && move2 == 1 && task2 > 0,此时读取到mode = " + mode + + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2; } } @@ -406,7 +405,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type2() == 5) { - feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task2 > 0 && type == 2"; + feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task2 > 0 && type == 2,此时读取到 " + + "mode =" + mode + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2 + "type = " + type; } } @@ -416,7 +416,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl this.setNow_steps_type3(8); } else { if (this.getNow_steps_type3() == 7) { - feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task1 > 0 && task2 > 0 && type == 3"; + feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task1 > 0 && task2 > 0 && type == 3,此时读取到mode = " + mode + + "action2 = " + action2 + "move2 = " + move2 + "task1 = " + task1 + "task2 = " + task2 + "type = " + type; } } @@ -449,13 +450,14 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } else { log.warn("后工位放货位有货,放货位:{},mode:{},move:{}", next_device_code, mode, move); if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) { - feedMessage = "请检查输送线:move == 1 && mode == 2"; + feedMessage = "请检查输送线:move == 1 && mode == 2,此时读取到mode = " + mode + "move = " + move; } } } } else { if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) { - feedMessage = "请检查:mode == 3 && action1 == 3 && move1 == 1 && task1 > 0"; + feedMessage = "请检查:mode == 3 && action1 == 3 && move1 == 1 && task1 > 0,此时读取到mode = " + mode + "action1 = " + + action1 + "move1 = " + move1 + "task1 = " + task1; } } @@ -486,7 +488,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type1() == 5) { - feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && type == 1"; + feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && type == 1,此时读取到 mode = " + + mode + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1 + "type = " + type; } } @@ -517,7 +520,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type3() == 9) { - feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && task2 > 0 && type == 3"; + feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && task2 > 0 && type == 3,此时读取到mode = " + mode + + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1 + "task2 = " + task2 + "type = " + type; } } @@ -858,9 +862,14 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl Device nextDevice = deviceAppservice.findDeviceByCode(next_device_code); Device startDevice2 = deviceAppservice.findDeviceByCode(start_device_code2); Device nextDevice2 = deviceAppservice.findDeviceByCode(next_device_code2); + logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" + + "执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2 + ",任务信息为:" + taskDto.toString()); //如果指令表中的取货点1和取货点2 都不为空 则说明时下双工位任务 if (StrUtil.isNotEmpty(start_device_code2) && StrUtil.isNotEmpty(start_device_code)) { type = "3"; + logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" + + "执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2 + + "type值为:" + type + ",任务信息为:" + taskDto.toString()); //判断四个点位是否都设置电气值 this.isSetAddress(startDevice); this.isSetAddress(nextDevice); @@ -875,6 +884,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } else if (backGetIndex != -1) { type = "2"; //后工位 } + logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" + + "执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2 + + "type值为:" + type + ",任务信息为:" + taskDto.toString()); //判断单任务下的两个点位是否都设置电气值 this.isSetAddress(startDevice); this.isSetAddress(nextDevice); @@ -918,6 +930,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl instdto.setNext_point_code2(next_point_code2); try { + logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" + + "执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2 + + "type值为:" + type + ",创建指令信息为:" + instdto.toString()); instructionService.create(instdto); flag = true; } catch (Exception e) { @@ -940,6 +955,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl //下发电气信号 public synchronized void sendSignalType(Instruction dto, String type) { + logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "开始下发电气信号,即下发电气指令信息为:" + + dto.toString() + ",type = " + type); String start_device_code = dto.getStart_device_code(); String next_device_code = dto.getNext_device_code(); Device startDevice = deviceAppservice.findDeviceByCode(start_device_code); From 269558eb03e0f3734bfa8ac32f45b62b0d8fde33 Mon Sep 17 00:00:00 2001 From: liuxy Date: Tue, 27 Dec 2022 11:12:27 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../st/outbill/service/impl/CheckOutBillServiceImpl.java | 3 +++ .../org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql | 6 ++++++ lms/nladmin-ui/src/views/wms/st/outbill/StructIvt.vue | 8 ++++---- lms/nladmin-ui/src/views/wms/st/outbill/index.vue | 9 +++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java index 248cbae3a..05255ca70 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java @@ -89,6 +89,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { if (StrUtil.isNotEmpty(map.get("sap_pcsn"))) { map.put("sap_pcsn", "%" + map.get("sap_pcsn") + "%"); } + if (StrUtil.isNotEmpty(map.get("cust_code"))) { + map.put("cust_code", "%" + map.get("cust_code") + "%"); + } //获取人员对应的仓库 UserStorServiceImpl userStorService = new UserStorServiceImpl(); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql index 56a4315d0..d233913b1 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql @@ -47,6 +47,7 @@ 输入.box_no TYPEAS s_string 输入.canuse_qty TYPEAS s_string 输入.sap_pcsn TYPEAS s_string + 输入.cust_code TYPEAS s_string 输入.in_stor_id TYPEAS f_string [临时表] --这边列出来的临时表就会在运行期动态创建 @@ -97,6 +98,11 @@ sub.sap_pcsn like 输入.sap_pcsn ENDOPTION + OPTION 输入.cust_code <> "" + (cu.cust_code like 输入.cust_code or + cu.cust_simple_name like 输入.cust_code) + ENDOPTION + OPTION 输入.pcsn <> "" dis.pcsn like 输入.pcsn ENDOPTION diff --git a/lms/nladmin-ui/src/views/wms/st/outbill/StructIvt.vue b/lms/nladmin-ui/src/views/wms/st/outbill/StructIvt.vue index 33b18401f..76c15a9de 100644 --- a/lms/nladmin-ui/src/views/wms/st/outbill/StructIvt.vue +++ b/lms/nladmin-ui/src/views/wms/st/outbill/StructIvt.vue @@ -100,10 +100,10 @@ - + - - + + @@ -111,7 +111,7 @@ - +