From a9a7303a6dfc6e707c5e36615b5eee94c57a25a5 Mon Sep 17 00:00:00 2001 From: liuxy Date: Wed, 28 Dec 2022 15:34:39 +0800 Subject: [PATCH 1/7] =?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 --- .../service/impl/CheckOutBillServiceImpl.java | 3 ++ .../st/outbill/wql/QST_IVT_CHECKOUTBILL.wql | 5 +++ .../src/views/wms/st/inAndOutReturn/index.vue | 17 ++++---- .../src/views/wms/st/outbill/index.vue | 39 +++++++++++++++---- 4 files changed, 49 insertions(+), 15 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 2e7c0cf53..f2906203d 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 @@ -75,6 +75,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { if (StrUtil.isNotEmpty(map.get("io_type"))) { map.put("io_type", map.get("io_type")); } + if (StrUtil.isNotEmpty(map.get("is_upload"))) { + map.put("is_upload", map.get("is_upload")); + } if (StrUtil.isNotEmpty(map.get("pcsn"))) { map.put("pcsn", "%" + map.get("pcsn") + "%"); } 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 474abd25d..00d004d59 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 @@ -49,6 +49,7 @@ 输入.sap_pcsn TYPEAS s_string 输入.cust_code TYPEAS s_string 输入.package_box_sn TYPEAS s_string + 输入.is_upload TYPEAS s_string 输入.in_stor_id TYPEAS f_string [临时表] --这边列出来的临时表就会在运行期动态创建 @@ -108,6 +109,10 @@ dis.pcsn like 输入.pcsn ENDOPTION + OPTION 输入.is_upload <> "" + ios.is_upload = 输入.is_upload + ENDOPTION + OPTION 输入.io_type <> "" ios.io_type = 输入.io_type ENDOPTION diff --git a/lms/nladmin-ui/src/views/wms/st/inAndOutReturn/index.vue b/lms/nladmin-ui/src/views/wms/st/inAndOutReturn/index.vue index 3130c4006..83601b058 100644 --- a/lms/nladmin-ui/src/views/wms/st/inAndOutReturn/index.vue +++ b/lms/nladmin-ui/src/views/wms/st/inAndOutReturn/index.vue @@ -220,18 +220,21 @@ @selection-change="crud.selectionChangeHandler" > - - - - + + + + - - + + + + + - - diff --git a/lms/nladmin-ui/src/views/wms/st/outbill/index.vue b/lms/nladmin-ui/src/views/wms/st/outbill/index.vue index 8d10b6df1..424c59bd0 100644 --- a/lms/nladmin-ui/src/views/wms/st/outbill/index.vue +++ b/lms/nladmin-ui/src/views/wms/st/outbill/index.vue @@ -128,6 +128,23 @@ @keyup.enter.native="crud.toQuery" /> + + + + + {{ scope.row.bill_code }} - - + + - - - - + + + + + @@ -290,7 +308,7 @@ export default { }, mixins: [presenter(), header(), crud()], // 数据字典 - dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_OUT_TYPE'], + dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_OUT_TYPE', 'is_upload'], data() { return { height: document.documentElement.clientHeight - 180 + 'px;', @@ -424,6 +442,13 @@ export default { this.openParamMoney = row this.openMoneyDialog = true }, + formatIsUpload(row) { + if (row.is_upload === '0') { + return '否' + } else if (row.is_upload === '1') { + return '是' + } + }, printExcel(jo) { if (jo.shd_dtl_num === '') { return this.crud.notify('客户为空!', CRUD.NOTIFICATION_TYPE.INFO) From 29e460fae8e0755d6edc38289d9444235c6f30a5 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Wed, 28 Dec 2022 16:01:12 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../siemens_conveyor/SiemensConveyorDeviceDriver.java | 2 +- .../SlitTwoManipulatorDeviceDriver.java | 8 ++++---- 2 files changed, 5 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 7131a274d..2285c66d0 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 @@ -286,7 +286,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme Server server = ReadUtil.getServer(opcservcerid); Map itemMap = new HashMap(); - itemMap.put(to_param, value); + itemMap.put(to_param, Integer.parseInt(value)); // itemMap.put(to_param, Integer.parseInt(value)); ReadUtil.write(itemMap, server); logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value); 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 dcd858f01..c26f2a786 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 @@ -140,7 +140,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl @Override - public void execute() throws Exception { + public synchronized void execute() throws Exception { String message = null; try { device_code = this.getDeviceCode(); @@ -157,9 +157,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl task2 = this.itemProtocol.getTask2(); if (mode != last_mode) { - if (mode == 2) { - this.setRequireSucess(false); - } + //if (mode == 2) { + this.setRequireSucess(false); + //} logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode); } From db7317a220d5ad4b22d2ccc580ecd342d76d1c4f Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Wed, 28 Dec 2022 17:55:01 +0800 Subject: [PATCH 3/7] =?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 | 127 +++++++++++++++++- .../SlitTwoManipulatorDeviceDriver.java | 12 +- 2 files changed, 130 insertions(+), 9 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 2285c66d0..22d829982 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 @@ -17,6 +17,7 @@ import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.RouteableDeviceDriver; import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; +import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingRequest; import org.nl.acs.ext.wms.service.AcsToWmsService; import org.nl.acs.instruction.service.InstructionService; import org.nl.acs.instruction.service.dto.Instruction; @@ -30,6 +31,7 @@ import org.nl.acs.route.service.dto.RouteLineDto; import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.dto.TaskDto; import org.nl.modules.system.service.ParamService; +import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; import org.openscada.opc.lib.da.Server; import org.springframework.beans.factory.annotation.Autowired; @@ -89,10 +91,18 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme Integer heartbeat_tag; private Date instruction_require_time = new Date(); + private Date require_apply_labeling_time = new Date(); + private Date require_apply_strangulation_time = new Date(); + private Date require_empty_in_time = new Date(); + private Date require_empty_out_time = new Date(); private int instruction_require_time_out; //行架机械手申请任务成功标识 boolean requireSucess = false; + boolean requireApplyLabelingSuccess = false; + boolean requireApplyLaStrangulationSuccess = false; + boolean requireEmptyInSuccess = false; + boolean requireEmptyOutSuccess = false; private int instruction_finished_time_out; int branchProtocol = 0; @@ -124,7 +134,29 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme task = this.itemProtocol.getTask(); if (mode != last_mode) { if (mode == 2) { - this.setRequireSucess(false); + logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireSucess:" + requireSucess); + requireSucess = false; + logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireSucess:" + requireSucess); + } + if (mode == 4) { + logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireApplyLabelingSuccess:" + requireApplyLabelingSuccess); + requireApplyLabelingSuccess = false; + logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireApplyLabelingSuccess:" + requireApplyLabelingSuccess); + } + if (mode == 5) { + logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireApplyLaStrangulationSuccess:" + requireApplyLaStrangulationSuccess); + requireApplyLaStrangulationSuccess = false; + logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireApplyLaStrangulationSuccess:" + requireApplyLaStrangulationSuccess); + } + if (mode == 6) { + logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireEmptyInSuccess:" + requireEmptyInSuccess); + requireEmptyInSuccess = false; + logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireEmptyInSuccess:" + requireEmptyInSuccess); + } + if (mode == 7) { + logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireEmptyOutSuccess:" + requireEmptyOutSuccess); + requireEmptyOutSuccess = false; + logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireEmptyOutSuccess:" + requireEmptyOutSuccess); } logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode); @@ -233,6 +265,31 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme if (move > 0 && !requireSucess) { instruction_require(); } + break; + case 4: + //申请贴标 + if (move > 0 && !requireApplyLabelingSuccess) { + applyLabeling(); + } + break; + case 5: + //申请困扎 + if (move > 0 && !requireApplyLaStrangulationSuccess) { + applyLaStrangulation(); + } + break; + case 6: + //空托盘满垛入库申请 + if (move > 0 && !requireEmptyInSuccess) { + emptyIn(); + } + break; + case 7: + //空托盘满垛出库申请 + if (move > 0 && !requireEmptyOutSuccess) { + emptyOut(); + } + break; } } @@ -274,7 +331,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme protected void thingToNothing() throws Exception { - this.setRequireSucess(false); + requireSucess = false; } @@ -356,9 +413,9 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme public void setDeviceStatus(JSONObject data) { String requestSucess = data.getString("requireSucess"); if (StrUtil.equals(requestSucess, "0")) { - this.setRequireSucess(false); + this.requireSucess = false; } else { - this.setRequireSucess(true); + this.requireSucess = true; } } @@ -475,4 +532,66 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme } } + public synchronized void applyLabeling() { + Date date = new Date(); + if (date.getTime() - this.require_apply_labeling_time.getTime() < (long) this.instruction_require_time_out) { + log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out); + return; + } else { + this.require_apply_labeling_time = date; + ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest = + new ApplyLabelingAndBindingRequest(); + JSONObject device_json = WQLObject.getWQLObject("acs_storage_cell").query("storage_code ='" + this.device_code + "'").uniqueResult(0); + String start_point_code = null; + if (!ObjectUtil.isEmpty(device_json)) { + start_point_code = (String) device_json.get("parent_storage_code") == null ? this.device_code : (String) device_json.get("parent_storage_code"); + } + applyLabelingAndBindingRequest.setDevice_code(start_point_code); + applyLabelingAndBindingRequest.setType("1"); + acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest); + requireApplyLabelingSuccess = true; + } + } + + public synchronized void applyLaStrangulation() { + Date date = new Date(); + if (date.getTime() - this.require_apply_strangulation_time.getTime() < (long) this.instruction_require_time_out) { + log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out); + return; + } else { + this.require_apply_strangulation_time = date; + ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest = + new ApplyLabelingAndBindingRequest(); + JSONObject device_json = WQLObject.getWQLObject("acs_storage_cell").query("storage_code ='" + this.device_code + "'").uniqueResult(0); + String start_point_code = null; + if (!ObjectUtil.isEmpty(device_json)) { + start_point_code = (String) device_json.get("parent_storage_code") == null ? this.device_code : (String) device_json.get("parent_storage_code"); + } + applyLabelingAndBindingRequest.setDevice_code(start_point_code); + applyLabelingAndBindingRequest.setType("2"); + acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest); + requireApplyLaStrangulationSuccess = true; + } + } + + public synchronized void emptyIn() { + Date date = new Date(); + if (date.getTime() - this.require_empty_in_time.getTime() < (long) this.instruction_require_time_out) { + log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out); + return; + } else { + this.require_empty_in_time = date; + } + } + + public synchronized void emptyOut() { + Date date = new Date(); + if (date.getTime() - this.require_empty_out_time.getTime() < (long) this.instruction_require_time_out) { + log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out); + return; + } else { + this.require_empty_out_time = 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 c26f2a786..a5e36819a 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 @@ -157,9 +157,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl task2 = this.itemProtocol.getTask2(); if (mode != last_mode) { - //if (mode == 2) { - this.setRequireSucess(false); - //} + if (mode == 2) { + logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为:" + requireSucess); + requireSucess = false; + logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为:" + requireSucess); + } logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode); } @@ -840,7 +842,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl this.sendSignalType(instructionDto, type); //请求任务成功 - this.setRequireSucess(true); + requireSucess = true; return flag; } @@ -949,7 +951,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl this.sendSignalType(instdto, type); //请求任务成功 - this.setRequireSucess(true); + requireSucess = true; return flag; } From 398a702ef8251c00b0b2f5d44797b325abac5ac9 Mon Sep 17 00:00:00 2001 From: liuxy Date: Wed, 28 Dec 2022 18:02:09 +0800 Subject: [PATCH 4/7] =?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 --- .../service/impl/CheckOutBillServiceImpl.java | 4 ++++ .../org/nl/wms/st/outbill/wql/ST_OUTIVT01.wql | 5 +++++ .../src/views/wms/st/outbill/DivDialog.vue | 18 +++++++++--------- 3 files changed, 18 insertions(+), 9 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 f2906203d..a6bcc7937 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 @@ -771,6 +771,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { jsonMap.put("material_id", dtl.getString("material_id")); jsonMap.put("sale_order_name", dtl.getString("source_bill_code")); jsonMap.put("sect_id", whereJson.getString("sect_id")); + jsonMap.put("stor_id", whereJson.getString("stor_id")); JSONObject jsonOneIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0); if (ObjectUtil.isEmpty(jsonOneIvt)) throw new BadRequestException("库存不足"); @@ -849,6 +850,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { jsonMap.put("material_id", dtl.getString("material_id")); jsonMap.put("pcsn", dtl.getString("pcsn")); jsonMap.put("sect_id", whereJson.getString("sect_id")); + jsonMap.put("stor_id", whereJson.getString("stor_id")); JSONObject jsonIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0); if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("库存不足"); @@ -988,6 +990,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { jsonMap.put("material_id", dtl.getString("material_id")); jsonMap.put("sale_order_name", dtl.getString("source_bill_code")); jsonMap.put("sect_id", whereJson.getString("sect_id")); + jsonMap.put("stor_id", whereJson.getString("stor_id")); JSONObject jsonOneIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0); if (ObjectUtil.isEmpty(jsonOneIvt)) throw new BadRequestException("库存不足"); @@ -1066,6 +1069,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { jsonMap.put("material_id", dtl.getString("material_id")); jsonMap.put("pcsn", dtl.getString("pcsn")); jsonMap.put("sect_id", whereJson.getString("sect_id")); + jsonMap.put("stor_id", whereJson.getString("stor_id")); JSONObject jsonIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0); if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("库存不足"); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT01.wql b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT01.wql index 272b81076..1fd2d7823 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT01.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT01.wql @@ -23,6 +23,7 @@ 输入.pcsn TYPEAS s_string 输入.iostorinv_id TYPEAS s_string 输入.iostorinvdtl_id TYPEAS s_string + 输入.stor_id TYPEAS s_string [临时表] --这边列出来的临时表就会在运行期动态创建 @@ -84,6 +85,10 @@ ivt.pcsn = 输入.pcsn ENDOPTION + OPTION 输入.stor_id <> "" + attr.stor_id = 输入.stor_id + ENDOPTION + order by ivt.instorage_time ASC ENDSELECT diff --git a/lms/nladmin-ui/src/views/wms/st/outbill/DivDialog.vue b/lms/nladmin-ui/src/views/wms/st/outbill/DivDialog.vue index 04d57efae..8a4615a59 100644 --- a/lms/nladmin-ui/src/views/wms/st/outbill/DivDialog.vue +++ b/lms/nladmin-ui/src/views/wms/st/outbill/DivDialog.vue @@ -304,7 +304,7 @@ export default { rowmst: { handler(newValue, oldValue) { this.mstrow = newValue - this.mstrow.stor_id = '' + // this.mstrow.stor_id = '' } } }, @@ -447,20 +447,20 @@ export default { } }, allDiv() { - if (!this.mstrow.sect_id) { - this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO) - return - } + // if (!this.mstrow.sect_id) { + // this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO) + // return + // } checkoutbill.allDiv(this.mstrow).then(res => { this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.INFO) this.queryTableDtl() }) }, oneDiv() { - if (!this.mstrow.sect_id) { - this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO) - return - } + // if (!this.mstrow.sect_id) { + // this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO) + // return + // } if (this.currentRow.iostorinvdtl_id !== null) { this.mstrow.iostorinvdtl_id = this.currentRow.iostorinvdtl_id checkoutbill.allDivOne(this.mstrow).then(res => { From 674a7cd7fa683bb056933dc7f9ae93b3b7c83646 Mon Sep 17 00:00:00 2001 From: liuxy Date: Wed, 28 Dec 2022 21:45:56 +0800 Subject: [PATCH 5/7] =?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 --- .../service/impl/CheckOutBillServiceImpl.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 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 a6bcc7937..5e762fd0f 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 @@ -1378,6 +1378,11 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { } else { jo_dtl.put("bill_status", "30"); } + + if (jo_dtl.getDoubleValue("unassign_qty") == 0) { + jo_dtl.put("bill_status", "40"); + } + wo_dtl.update(jo_dtl); //更新主表状态 this.updateMststatus(iostorinv_id); @@ -1878,7 +1883,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { assign_qty = NumberUtil.add(assign_qty,canuse_qty); if (unassign_qty >= canuse_qty) { - unassign_qty = unassign_qty - canuse_qty; +// unassign_qty = unassign_qty - canuse_qty; + unassign_qty = NumberUtil.sub(unassign_qty,canuse_qty); ivt.put("change_qty", canuse_qty + ""); } else { ivt.put("change_qty", canuse_qty + ""); @@ -1920,11 +1926,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { break; } } - HashMap map_dtl = new HashMap(); +// HashMap map_dtl = new HashMap(); + JSONObject map_dtl = new JSONObject(); //更新明细 map_dtl.put("unassign_qty", unassign_qty + ""); map_dtl.put("assign_qty", assign_qty + ""); - if (unassign_qty == 0) { + if (map_dtl.getDoubleValue("unassign_qty") <= 0) { map_dtl.put("bill_status", "40"); } else { map_dtl.put("bill_status", "30"); From 27f3285fb15cfa0a85e4ce26d0debe0da280fc75 Mon Sep 17 00:00:00 2001 From: liuxy Date: Thu, 29 Dec 2022 00:14:54 +0800 Subject: [PATCH 6/7] =?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 --- .../src/views/wms/st/outbill/DivDialog.vue | 2 -- .../src/views/wms/st/outbill/StructIvt.vue | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lms/nladmin-ui/src/views/wms/st/outbill/DivDialog.vue b/lms/nladmin-ui/src/views/wms/st/outbill/DivDialog.vue index 8a4615a59..d42a36bc4 100644 --- a/lms/nladmin-ui/src/views/wms/st/outbill/DivDialog.vue +++ b/lms/nladmin-ui/src/views/wms/st/outbill/DivDialog.vue @@ -496,7 +496,6 @@ export default { // 根据此仓位的 ‘相同块、相同排、相同层’ 判断上一个任务是否生成 const tab = this.tabledis for (let i = 0; i < tab.length; i++) { - debugger const item = tab[i] if (this.currentDis.block_num === item.block_num && this.currentDis.row_num === item.row_num && this.currentDis.layer_num === item.layer_num) { const out_order_seq = parseInt(this.currentDis.out_order_seq) - 1 @@ -529,7 +528,6 @@ export default { }) }, cellStyle({ row, column, rowIndex, columnIndex }) { - debugger const assign_qty = parseFloat(row.assign_qty) const plan_qty = parseFloat(row.plan_qty) 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 133f93205..5f12371a7 100644 --- a/lms/nladmin-ui/src/views/wms/st/outbill/StructIvt.vue +++ b/lms/nladmin-ui/src/views/wms/st/outbill/StructIvt.vue @@ -231,11 +231,20 @@ export default { this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.canuse_qty) this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.canuse_qty) } else { - this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty) - if (this.queryrow.unassign_qty > this.goal_unassign_qty){ + this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty) + // 如果待分配重量等于0则 明细重量 - 已分配重量 + if (parseInt(this.queryrow.unassign_qty) === 0) { + this.queryrow.unassign_qty = parseFloat(this.goal_unassign_qty) - parseFloat(this.queryrow.assign_qty) + } else { + this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty) + } + if (this.queryrow.unassign_qty > this.goal_unassign_qty) { this.queryrow.unassign_qty = JSON.parse(JSON.stringify(this.goal_unassign_qty)) } - this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty) + // 如果已分配汇总量 > 明细重量 则待分配重量为0 + if (this.queryrow.assign_qty > this.goal_unassign_qty) { + this.queryrow.unassign_qty = parseFloat('0') + } } this.tableDtl.splice(index, 1, row) // 通过splice 替换数据 触发视图更新 }, From 5b772c0731acb7254926dd353d1bf0904cce3ee7 Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Thu, 29 Dec 2022 10:13:14 +0800 Subject: [PATCH 7/7] 1 --- lms/nladmin-system/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/nladmin-system/pom.xml b/lms/nladmin-system/pom.xml index c056dc10b..c84cc3d54 100644 --- a/lms/nladmin-system/pom.xml +++ b/lms/nladmin-system/pom.xml @@ -44,7 +44,7 @@ hutool-all ${hutool.version} - + org.springframework.boot spring-boot-starter-data-jpa