From 33ac8957fb2bfffa364fbb54351e971a8442c433 Mon Sep 17 00:00:00 2001 From: liuxy Date: Sat, 28 Jan 2023 16:30:08 +0800 Subject: [PATCH 1/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/service/impl/PdaCheckServiceImpl.java | 4 +++ .../java/org/nl/wms/pda/st/wql/PDA_CHECK.wql | 25 +++++++++++++++++-- .../instor/service/impl/CheckServiceImpl.java | 6 +++++ .../nl/wms/st/instor/wql/QST_IVT_CHECK.wql | 2 +- .../views/wms/st/inStor/check/CheckDialog.vue | 1 + 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/PdaCheckServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/PdaCheckServiceImpl.java index c17caa8bf..a89fedd10 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/PdaCheckServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/PdaCheckServiceImpl.java @@ -55,9 +55,13 @@ public class PdaCheckServiceImpl implements PdaCheckService { @Override public JSONObject checkQueryDtl(JSONObject whereJson) { + String box_no = whereJson.getString("box_no"); + JSONObject map = new JSONObject(); map.put("flag", "2"); map.put("check_code", whereJson.getString("check_code")); + if (ObjectUtil.isNotEmpty(box_no)) map.put("storagevehicle_code","%"+box_no+"%"); + JSONArray resultJSONArray = WQL.getWO("PDA_CHECK").addParamMap(map).process().getResultJSONArray(0); JSONObject jo = new JSONObject(); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/wql/PDA_CHECK.wql b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/wql/PDA_CHECK.wql index f3e33c2fe..e90986cc5 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/wql/PDA_CHECK.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/wql/PDA_CHECK.wql @@ -116,8 +116,8 @@ dtl.storagevehicle_code, mater.material_code, mater.material_name, - ROUND(dtl.base_qty) AS base_qty, - ROUND(dtl.fac_qty) AS fac_qty, + ROUND(dtl.base_qty,3) AS net_qty, + ROUND(dtl.fac_qty,3) AS fac_qty, dtl.qty_unit_name, ( CASE @@ -142,6 +142,10 @@ dtl.check_code = 输入.check_code ENDOPTION + OPTION 输入.storagevehicle_code <> "" + dtl.storagevehicle_code like 输入.storagevehicle_code + ENDOPTION + ENDSELECT ENDQUERY ENDIF @@ -186,3 +190,20 @@ ENDSELECT ENDQUERY ENDIF + + IF 输入.flag = "4" + QUERY + SELECT + SUM(net_weight) AS net_weight + FROM + pdm_bi_subpackagerelation + WHERE + 1=1 + + OPTION 输入.storagevehicle_code <> "" + package_box_sn = 输入.storagevehicle_code + ENDOPTION + + ENDSELECT + ENDQUERY + ENDIF diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/CheckServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/CheckServiceImpl.java index ef7ec4c14..231b3f948 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/CheckServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/CheckServiceImpl.java @@ -187,6 +187,9 @@ public class CheckServiceImpl implements CheckService { jsonDtl.put("qty_unit_id", json.getLongValue("measure_unit_id")); jsonDtl.put("qty_unit_name", json.getString("qty_unit_name")); jsonDtl.put("status", "1"); + + JSONObject jsonSub = WQL.getWO("PDA_CHECK").addParam("flag", "4").addParam("storagevehicle_code", json.getString("storagevehicle_code")).process().uniqueResult(0); + jsonDtl.put("base_qty", jsonSub.getDoubleValue("net_weight")); dtlTab.insert(jsonDtl); } } @@ -286,6 +289,9 @@ public class CheckServiceImpl implements CheckService { jsonDtl.put("qty_unit_name", json.getString("qty_unit_name")); jsonDtl.put("status", "1"); jsonDtl.put("fac_qty", json.getDoubleValue("fac_qty")); + + JSONObject jsonSub = WQL.getWO("PDA_CHECK").addParam("flag", "4").addParam("storagevehicle_code", json.getString("storagevehicle_code")).process().uniqueResult(0); + jsonDtl.put("base_qty", jsonSub.getDoubleValue("net_weight")); dtlTab.insert(jsonDtl); } } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/wql/QST_IVT_CHECK.wql b/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/wql/QST_IVT_CHECK.wql index 55b0f1299..350ae9f07 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/wql/QST_IVT_CHECK.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/wql/QST_IVT_CHECK.wql @@ -341,7 +341,7 @@ CheckDtl.storagevehicle_id, CheckDtl.storagevehicle_code, CheckDtl.material_id, - CheckDtl.base_qty, + ROUND(CheckDtl.base_qty,3) AS base_qty, CheckDtl.qty_unit_id, CheckDtl.qty_unit_name, CheckDtl.STATUS, diff --git a/lms/nladmin-ui/src/views/wms/st/inStor/check/CheckDialog.vue b/lms/nladmin-ui/src/views/wms/st/inStor/check/CheckDialog.vue index 2e5855b06..5432c2387 100644 --- a/lms/nladmin-ui/src/views/wms/st/inStor/check/CheckDialog.vue +++ b/lms/nladmin-ui/src/views/wms/st/inStor/check/CheckDialog.vue @@ -108,6 +108,7 @@ + @@ -125,10 +127,11 @@ import { get } from '@/api/system/dictDetail' import { selectOpcList } from '@/api/acs/device/opc' import { download } from '@/api/data' import { downloadFile } from '@/utils' +import pagination from '@crud/Pagination' export default { name: 'Protocol', - components: { crudOperation, rrOperation }, + components: { crudOperation, rrOperation, pagination }, mixins: [presenter(), header(), crud()], cruds() { return CRUD({ diff --git a/acs/nladmin-ui/src/views/acs/instruction/index.vue b/acs/nladmin-ui/src/views/acs/instruction/index.vue index 7d5c0ed88..2b2ef30b4 100644 --- a/acs/nladmin-ui/src/views/acs/instruction/index.vue +++ b/acs/nladmin-ui/src/views/acs/instruction/index.vue @@ -110,7 +110,7 @@ - + @@ -133,13 +133,13 @@ - - - - - - - + + + + + + + @@ -169,6 +169,7 @@ + @@ -178,6 +179,7 @@ import crudInstruction from '@/api/acs/instruction/instruction' import CRUD, { presenter, header, form, crud } from '@crud/crud' import crudOperation from '@crud/CRUD.operation' import { getDicts } from '@/api/system/dict' +import pagination from '@crud/Pagination' const defaultForm = { instruction_id: null, @@ -218,7 +220,7 @@ const defaultForm = { export default { dicts: ['task_status'], name: 'Instruction', - components: { crudOperation }, + components: { crudOperation, pagination }, mixins: [presenter(), header(), form(defaultForm), crud()], cruds() { return CRUD({ From 8d5faa265196e9699c9cb3a59fc9eec18eb7e9a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B1=9F=E7=8E=AE?= Date: Sat, 28 Jan 2023 19:53:26 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/nl/acs/task/service/wql/QTASK_QUERY.wql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/wql/QTASK_QUERY.wql b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/wql/QTASK_QUERY.wql index dbd0efdcc..fac35ef90 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/wql/QTASK_QUERY.wql +++ b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/wql/QTASK_QUERY.wql @@ -95,16 +95,16 @@ IF 输入.flag = "2" task.task_status = 输入.status ENDOPTION OPTION 输入.vehicle_code <> "" - task.vehicle_code = 输入.vehicle_code + task.vehicle_code LIKE CONCAT ( '%', 输入.vehicle_code, '%' ) ENDOPTION OPTION 输入.material_type <> "" task.material = 输入.material_type ENDOPTION OPTION 输入.point_code <> "" ( - task.start_point_code = 输入.point_code + task.start_point_code LIKE CONCAT ( '%', 输入.point_code, '%' ) OR - task.next_point_code = 输入.point_code + task.next_point_code LIKE CONCAT ( '%', 输入.point_code, '%') ) ENDOPTION OPTION 输入.create_time <> "" From 6c7a900c64a5cce865d9c3cc0b63122b05ef7acb Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Sat, 28 Jan 2023 22:01:39 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OvenGantryManipulatorDeviceDriver.java | 109 +++++++++++++++--- 1 file changed, 96 insertions(+), 13 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java index 9bff92190..b30a9fbff 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/oven_manipulator/OvenGantryManipulatorDeviceDriver.java @@ -185,12 +185,28 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) { hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver(); //hongXiangConveyorDeviceDriver.writing("to_open_door", "1"); - if (hongXiangConveyorDeviceDriver.getMode() == 1 && hongXiangConveyorDeviceDriver.getDoor() == 1 && hongXiangConveyorDeviceDriver.getAction() == 1 && hongXiangConveyorDeviceDriver.getError1() == 0) { + int mode = hongXiangConveyorDeviceDriver.getMode(); + int door = hongXiangConveyorDeviceDriver.getDoor(); + int action = hongXiangConveyorDeviceDriver.getAction(); + int error1 = hongXiangConveyorDeviceDriver.getError1(); + if (mode == 1 && door == 1 && action == 1 && error1 == 0) { this.writing("to_command", "2"); this.setNow_steps_type(3); } else { if (this.getNow_steps_type() == 2) { - feedMessage = "请检查烘箱:door=1&&action==1&&error1=0"; + feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code(); + if (mode != 1) { + feedMessage = feedMessage + "mode未联机,"; + } + if (door != 1) { + feedMessage = feedMessage + "door未开门,"; + } + if (action != 1) { + feedMessage = feedMessage + "action未允许取放,"; + } + if (error1 != 0) { + feedMessage = feedMessage + "error1出现故障。"; + } } } } else { @@ -200,7 +216,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } } else { if (this.getNow_steps_type() == 2) { - feedMessage = "请检查:mode == 3 && action == 1 && move == 0 && task > 0"; + feedMessage = "行架机械手:"; + if (mode != 3) { + feedMessage = feedMessage + "mode不为运行中状态,"; + } + if (action != 1) { + feedMessage = feedMessage + "action不为取货中状态,"; + } + if (move != 0) { + feedMessage = feedMessage + "move不为无货状态,"; + } + if (task == 0) { + feedMessage = feedMessage + "task为0。"; + } } } @@ -220,7 +248,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } } else { if (this.getNow_steps_type() == 3) { - feedMessage = "请检查:mode == 3 && action == 2 && move == 1 && task > 0"; + feedMessage = "行架机械手:"; + if (mode != 3) { + feedMessage = feedMessage + "mode不为运行中状态,"; + } + if (action != 2) { + feedMessage = feedMessage + "action不为取货完成状态,"; + } + if (move != 1) { + feedMessage = feedMessage + "move不为有货状态,"; + } + if (task == 0) { + feedMessage = feedMessage + "task为0。"; + } } } @@ -233,11 +273,27 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) { hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver(); //hongXiangConveyorDeviceDriver.writing("to_open_door", "1"); - if (hongXiangConveyorDeviceDriver.getMode() == 1 && hongXiangConveyorDeviceDriver.getDoor() == 1 && hongXiangConveyorDeviceDriver.getAction() == 1 && hongXiangConveyorDeviceDriver.getError1() == 0) { + int mode = hongXiangConveyorDeviceDriver.getMode(); + int door = hongXiangConveyorDeviceDriver.getDoor(); + int action = hongXiangConveyorDeviceDriver.getAction(); + int error1 = hongXiangConveyorDeviceDriver.getError1(); + if (mode == 1 && door == 1 && action == 1 && error1 == 0) { this.writing("to_command", "4"); this.setNow_steps_type(5); } else { - feedMessage = "请检查烘箱:door=1&&action==1&&error1=0"; + feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code(); + if (mode != 1) { + feedMessage = feedMessage + "mode未联机,"; + } + if (door != 1) { + feedMessage = feedMessage + "door未开门,"; + } + if (action != 1) { + feedMessage = feedMessage + "action未允许取放,"; + } + if (error1 != 0) { + feedMessage = feedMessage + "error1出现故障。"; + } } } else { this.writing("to_command", "4"); @@ -245,7 +301,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } } else { if (this.getNow_steps_type() == 4) { - feedMessage = "请检查:mode == 3 && action == 3 && move == 1 && task > 0"; + feedMessage = "行架机械手:"; + if (mode != 3) { + feedMessage = feedMessage + "mode不为运行中状态,"; + } + if (action != 3) { + feedMessage = feedMessage + "action不为放货中状态,"; + } + if (move != 1) { + feedMessage = feedMessage + "move不为有货状态,"; + } + if (task == 0) { + feedMessage = feedMessage + "task为0。"; + } } } @@ -293,7 +361,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } } else { if (this.getNow_steps_type() == 5) { - feedMessage = "请检查:mode == 3 && action == 4 && move == 0 && task > 0"; + feedMessage = "行架机械手:"; + if (mode != 3) { + feedMessage = feedMessage + "mode不为运行中状态,"; + } + if (action != 4) { + feedMessage = feedMessage + "action不为放货完成状态,"; + } + if (move != 0) { + feedMessage = feedMessage + "move不为无货状态,"; + } + if (task == 0) { + feedMessage = feedMessage + "task为0。"; + } } } @@ -334,15 +414,18 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } else { if (mode == 2) { //if (!requireSucess) { - String remark = ""; + String remark = "未查找任务原因为:"; if (mode != 2) { - remark = remark + "mode不为2,"; + remark = remark + "mode不是待机状态,"; } if (move != 0) { - remark = remark + "move不为0,"; + remark = remark + "move为有货状态,"; } if (task != 0) { - remark = remark + "task不为0,"; + remark = remark + "task任务号不为0,"; + } + if (requireSucess) { + remark = remark + "请求标记requireSucess为true。"; } this.setNotCreateTaskMessage(remark); //} @@ -505,7 +588,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i hongXiangConveyorDeviceDriver.writing("to_open_door", "1"); hongXiangConveyorDeviceDriver.writing("to_open_door", "1"); } - if (startDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver){ + if (startDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) { hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startDevice.getDeviceDriver(); hongXiangConveyorDeviceDriver.writing("to_open_door", "1"); hongXiangConveyorDeviceDriver.writing("to_open_door", "1"); From 78873e720599434f4dd347939a0f7184228fee2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B1=9F=E7=8E=AE?= Date: Sat, 28 Jan 2023 23:19:11 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E7=9B=91=E6=8E=A7=E6=8F=90=E7=A4=BA?= =?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 | 276 +++++++++++++----- 1 file changed, 207 insertions(+), 69 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 bed1501d9..6f170f7fe 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 @@ -306,16 +306,32 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl this.setNow_steps_type3(3); } } else { - log.warn("前工位取货位无货,取货位:{},mode:{},move:{}", start_device_code, mode, move); + 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,此时读取到mode = " + mode + "move = " + move; + feedMessage = "后工位未取货原因-->"; + if (mode != 2) { + feedMessage += "后工位取货位工作模式不为待机(mode != 2),"; + } else if (move != 1) { + feedMessage += "后工位取货位无货(move != 1)"; + } } } } } else { if (this.getNow_steps_type2() == 2 || this.getNow_steps_type3() == 2) { - feedMessage = "请检查:mode == 3 && action2 == 1 && move2 == 0 && task2 > 0,此时读取到mode = " + mode - + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2; + feedMessage = "后工位未取货原因-->"; + if (mode != 3) { + feedMessage += "行架工作模式不为运行中(mode != 3),"; + } + if (action2 != 1) { + feedMessage += "后工位动作信号不为取货中(action2 != 1),"; + } + if (move2 != 0) { + feedMessage += "后工位光电信号不为空(move2 != 0),"; + } + if (task2 == 0) { + feedMessage += "后工位没有任务(task2 == 0)"; + } } } @@ -330,8 +346,19 @@ 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,此时读取到mode = " + mode - + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2; + feedMessage = "后工位取货完成后未反馈原因-->"; + if (mode != 3) { + feedMessage += "行架工作模式不为运行中(mode != 3),"; + } + if (action2 != 2) { + feedMessage += "后工位未取货完成(action2 != 2),"; + } + if (move2 == 0) { + feedMessage += "后工位光电信号为空(move2 == 0),"; + } + if (task2 == 0) { + feedMessage += "后工位没有任务(task2 == 0)"; + } } } @@ -345,8 +372,19 @@ 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,此时读取到mode = " + mode - + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1; + feedMessage = "前工位未取货原因"; + if (mode != 3) { + feedMessage += "行架工作模式不为运行中(mode != 3),"; + } + if (action1 != 1) { + feedMessage += "前工位动作信号不为取货中(action2 != 1),"; + } + if (move1 != 0) { + feedMessage += "前工位光电信号不为空(move2 != 0),"; + } + if (task1 == 0) { + feedMessage += "前工位没有任务(task2 == 0)"; + } } } @@ -361,8 +399,19 @@ 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,此时读取到mode = " + mode - + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1; + feedMessage = "前工位取货完成后未反馈原因"; + if (mode != 3) { + feedMessage += "行架工作模式不为运行中(mode != 3),"; + } + if (action1 != 2) { + feedMessage += "前工位未取货完成(action2 != 2),"; + } + if (move1 == 0) { + feedMessage += "前工位光电信号为空(move2 == 0),"; + } + if (task1 == 0) { + feedMessage += "前工位没有任务(task2 == 0)"; + } } } @@ -377,8 +426,19 @@ 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,此时读取到mode = " + mode - + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2; + feedMessage = "后工位未放货原因-->"; + if (mode != 3) { + feedMessage += "行架工作模式不为运行中(mode != 3),"; + } + if (action2 != 3) { + feedMessage += "后工位动作信号不为放货中(action2 != 3),"; + } + if (move2 == 0) { + feedMessage += "后工位光电信号为空(move2 == 0),"; + } + if (task2 == 0) { + feedMessage += "后工位没有任务(task2 == 0)"; + } } } @@ -408,8 +468,22 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type2() == 5) { - feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task2 > 0 && type == 2,此时读取到 " + - "mode =" + mode + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2 + "type = " + type; + feedMessage = "单任务后工位放货完成后未反馈原因-->"; + if (mode != 3) { + feedMessage += "行架工作模式不为运行中(mode != 3),"; + } + if (action2 != 4) { + feedMessage += "后工位未放货完成(action2 != 4),"; + } + if (move2 != 0) { + feedMessage += "后工位光电信号为有货(move2 != 0),"; + } + if (task2 == 0) { + feedMessage += "后工位没有任务(task2 == 0),"; + } + if (type != 2) { + feedMessage += "不是后工位单任务(type != 2)"; + } } } @@ -419,8 +493,25 @@ 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,此时读取到mode = " + mode - + "action2 = " + action2 + "move2 = " + move2 + "task1 = " + task1 + "task2 = " + task2 + "type = " + type; + feedMessage = "双任务后工位放货完成后未反馈原因-->"; + if (mode != 3) { + feedMessage += "行架工作模式不为运行中(mode != 3),"; + } + if (action2 != 4) { + feedMessage += "后工位未放货完成(action2 != 4),"; + } + if (move2 != 0) { + feedMessage += "后工位光电信号为有货(move2 != 0),"; + } + if (task1 == 0) { + feedMessage += "前工位没有任务(task1 == 0),"; + } + if (task2 == 0) { + feedMessage += "后工位没有任务(task2 == 0),"; + } + if (type != 3) { + feedMessage += "不是双任务(type != 3)"; + } } } @@ -453,14 +544,30 @@ 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,此时读取到mode = " + mode + "move = " + move; + feedMessage = "前工位未放货原因-->"; + if (mode != 2) { + feedMessage += "前工位放货位工作模式不为待机(mode != 2),"; + } else if (move == 0) { + feedMessage += "前工位放货位无货(move == 0)"; + } } } } } else { if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) { - feedMessage = "请检查:mode == 3 && action1 == 3 && move1 == 1 && task1 > 0,此时读取到mode = " + mode + "action1 = " - + action1 + "move1 = " + move1 + "task1 = " + task1; + feedMessage = "前工位未放货原因-->"; + if (mode != 3) { + feedMessage += "行架工作模式不为运行中(mode != 3),"; + } + if (action1 != 3) { + feedMessage += "前工位动作信号不为放货中(action1 != 3),"; + } + if (move1 == 0) { + feedMessage += "前工位光电信号为空(move1 == 0),"; + } + if (task1 == 0) { + feedMessage += "前工位没有任务(task1 == 0),"; + } } } @@ -491,8 +598,22 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type1() == 5) { - feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && type == 1,此时读取到 mode = " + - mode + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1 + "type = " + type; + feedMessage = "单任务前工位放货完成后未反馈原因-->"; + if (mode != 3) { + feedMessage += "行架工作模式不为运行中(mode != 3),"; + } + if (action1 != 4) { + feedMessage += "前工位未放货完成(action1 != 4),"; + } + if (move1 != 0) { + feedMessage += "前工位光电信号为有货(move1 != 0),"; + } + if (task1 == 0) { + feedMessage += "前工位没有任务(task1 == 0),"; + } + if (type != 1) { + feedMessage += "不为前工位单任务(type != 1)"; + } } } @@ -523,8 +644,25 @@ 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,此时读取到mode = " + mode - + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1 + "task2 = " + task2 + "type = " + type; + feedMessage = "双任务前工位放货完成后未反馈原因-->"; + if (mode != 3) { + feedMessage += "行架工作模式不为运行中(mode != 3),"; + } + if (action1 != 4) { + feedMessage += "前工位未放货完成(action1 != 4),"; + } + if (move1 != 0) { + feedMessage += "前工位光电信号为有货(move1 != 0),"; + } + if (task1 == 0) { + feedMessage += "前工位没有任务(task1 == 0),"; + } + if (task2 == 0) { + feedMessage += "后工位没有任务(task2 == 0),"; + } + if (type != 3) { + feedMessage += "不是双任务(type != 3)"; + } } } @@ -592,25 +730,25 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl if (!requireSucess) { String remark = ""; if (mode != 2) { - remark = remark + "mode不为2,"; + remark = remark + "行架工作模式不为待机(mode != 2),"; } if (move1 != 0) { - remark = remark + "move1不为0,"; + remark = remark + "前工位有货(move1 != 0),"; } if (move2 != 0) { - remark = remark + "move2不为0,"; + remark = remark + "后工位有货(move2 != 0),"; } if (action1 != 0) { - remark = remark + "action1不为0,"; + remark = remark + "前工位动作信号不为0(action1 != 0),"; } if (action2 != 0) { - remark = remark + "action2不为0,"; + remark = remark + "后工位动作信号不为0(action2 != 0),"; } if (task1 != 0) { - remark = remark + "task1不为0,"; + remark = remark + "前工位存在任务(task1 != 0),"; } if (task2 != 0) { - remark = remark + "task2不为0,"; + remark = remark + "后工位存在任务(task2 != 0),"; } this.setNotCreateTaskMessage(remark); } @@ -973,24 +1111,24 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl List list = new ArrayList(); if (StrUtil.equals(type, "1")) { Map map1 = new HashMap(); - map1.put("code","to_onset1"); - map1.put("value",start_addr); + map1.put("code", "to_onset1"); + map1.put("value", start_addr); list.add(map1); Map map2 = new HashMap(); - map2.put("code","to_target1"); - map2.put("value",next_addr); + map2.put("code", "to_target1"); + map2.put("value", next_addr); list.add(map2); Map map3 = new HashMap(); - map3.put("code","to_task1"); - map3.put("value",dto.getInstruction_code()); + map3.put("code", "to_task1"); + map3.put("value", dto.getInstruction_code()); list.add(map3); Map map4 = new HashMap(); - map4.put("code","to_type"); - map4.put("value","1"); + map4.put("code", "to_type"); + map4.put("value", "1"); list.add(map4); Map map5 = new HashMap(); - map5.put("code","to_command1"); - map5.put("value","1"); + map5.put("code", "to_command1"); + map5.put("value", "1"); list.add(map5); this.writing(list); logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发前工位任务"); @@ -1003,24 +1141,24 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl this.setNow_steps_type1(2); } else if (StrUtil.equals(type, "2")) { Map map1 = new HashMap(); - map1.put("code","to_onset2"); - map1.put("value",start_addr); + map1.put("code", "to_onset2"); + map1.put("value", start_addr); list.add(map1); Map map2 = new HashMap(); - map2.put("code","to_target2"); - map2.put("value",next_addr); + map2.put("code", "to_target2"); + map2.put("value", next_addr); list.add(map2); Map map3 = new HashMap(); - map3.put("code","to_task2"); - map3.put("value",dto.getInstruction_code()); + map3.put("code", "to_task2"); + map3.put("value", dto.getInstruction_code()); list.add(map3); Map map4 = new HashMap(); - map4.put("code","to_type"); - map4.put("value","2"); + map4.put("code", "to_type"); + map4.put("value", "2"); list.add(map4); Map map5 = new HashMap(); - map5.put("code","to_command2"); - map5.put("value","1"); + map5.put("code", "to_command2"); + map5.put("value", "1"); list.add(map5); this.writing(list); logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发后工位任务"); @@ -1041,40 +1179,40 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl Map map1 = new HashMap(); - map1.put("code","to_onset1"); - map1.put("value",start_addr2); + map1.put("code", "to_onset1"); + map1.put("value", start_addr2); list.add(map1); Map map2 = new HashMap(); - map2.put("code","to_target1"); - map2.put("value",next_addr2); + map2.put("code", "to_target1"); + map2.put("value", next_addr2); list.add(map2); Map map3 = new HashMap(); - map3.put("code","to_task1"); - map3.put("value",dto.getInstruction_code()); + map3.put("code", "to_task1"); + map3.put("value", dto.getInstruction_code()); list.add(map3); Map map4 = new HashMap(); - map4.put("code","to_onset2"); - map4.put("value",start_addr); + map4.put("code", "to_onset2"); + map4.put("value", start_addr); list.add(map4); Map map5 = new HashMap(); - map5.put("code","to_target2"); - map5.put("value",next_addr); + map5.put("code", "to_target2"); + map5.put("value", next_addr); list.add(map5); Map map6 = new HashMap(); - map6.put("code","to_task2"); - map6.put("value",dto.getInstruction_code()); + map6.put("code", "to_task2"); + map6.put("value", dto.getInstruction_code()); list.add(map6); Map map7 = new HashMap(); - map7.put("code","to_type"); - map7.put("value","3"); + map7.put("code", "to_type"); + map7.put("value", "3"); list.add(map7); Map map8 = new HashMap(); - map8.put("code","to_command1"); - map8.put("value","1"); + map8.put("code", "to_command1"); + map8.put("value", "1"); list.add(map8); Map map9 = new HashMap(); - map9.put("code","to_command2"); - map9.put("value","1"); + map9.put("code", "to_command2"); + map9.put("value", "1"); list.add(map9); this.writing(list); logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发双工位任务"); @@ -1092,7 +1230,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl this.setNow_steps_type3(2); } - if(task1 != Integer.parseInt(dto.getInstruction_code()) || task2 != Integer.parseInt(dto.getInstruction_code()) ){ + if (task1 != Integer.parseInt(dto.getInstruction_code()) || task2 != Integer.parseInt(dto.getInstruction_code())) { this.writing(list); logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "再次下发电气信号"); }