From 97b772d3dd379fdd29865ce1b139bd1e71238ee7 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 3 Apr 2024 09:44:28 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E6=95=B0=E9=87=8F=E7=9B=98=E7=82=B9?= =?UTF-8?q?=E5=85=A5=E5=BA=93-=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/store/warehousing/putInStore.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sgzb-ui/src/views/store/warehousing/putInStore.vue b/sgzb-ui/src/views/store/warehousing/putInStore.vue index 03a3bcb5..31696384 100644 --- a/sgzb-ui/src/views/store/warehousing/putInStore.vue +++ b/sgzb-ui/src/views/store/warehousing/putInStore.vue @@ -187,7 +187,7 @@ placeholder="请选择物品类型" :options="deviceTypeTree" :props="deviceTypeTreeProps" - v-model="deviceType" + v-model="codeForm.typeId" @change="deviceTypeChange" ref="deviceTypeCascader" style="width: 400px;" @@ -668,7 +668,6 @@ export default { }, // 取消编码盘点按钮 cancelCode() { - this.codeOpen = false; this.cascaderDisabled = false this.resetCodeForm(); this.deviceType = {} @@ -677,6 +676,7 @@ export default { this.numTableList = [] this.$refs['codeForm'].clearValidate() this.isNumCheck = false; + this.codeOpen = false; }, // 表单重置 reset() { From 2412194ab74b3f1b6a8f613696d5eadb016717dd Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 3 Apr 2024 10:21:28 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E6=95=B0=E9=87=8F=E7=9B=98=E7=82=B9?= =?UTF-8?q?=E5=85=A5=E5=BA=93-=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/store/warehousing/putInStore.vue | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sgzb-ui/src/views/store/warehousing/putInStore.vue b/sgzb-ui/src/views/store/warehousing/putInStore.vue index 31696384..75da538d 100644 --- a/sgzb-ui/src/views/store/warehousing/putInStore.vue +++ b/sgzb-ui/src/views/store/warehousing/putInStore.vue @@ -693,9 +693,9 @@ export default { resetCodeForm() { this.codeForm = { checkMan: undefined, - putInType: undefined, + putInType: null, remarks: undefined, - typeId: undefined, + typeId: null, num: undefined, codePrefix: undefined, codeSuffixStart: undefined, @@ -792,6 +792,7 @@ export default { this.reset(); this.codeOpen = true; this.title = "数量盘点入库"; + this.$refs['codeForm'].clearValidate() }, /** 新增编号盘点按钮操作 */ handleCodeAdd() { @@ -799,6 +800,7 @@ export default { this.reset(); this.codeOpen = true; this.title = "编码盘点入库"; + this.$refs['codeForm'].clearValidate() }, // 多选框选中数据 handleSelectionChange(selection) { @@ -836,12 +838,11 @@ export default { // 发送请求 inputByCode(SavePutInfoDto).then(response => { this.$message.success('入库成功') - this.codeOpen = false - this.getList() this.resetCodeForm() - this.reset() this.numTableList = [] - this.deviceType = {} + this.codeOpen = false + this.reset() + this.getList() }) } else { // 提交数据 @@ -864,12 +865,11 @@ export default { // 发送请求 inputByCode(SavePutInfoDto).then(response => { this.$message.success('入库成功') - this.codeOpen = false - this.getList() this.resetCodeForm() - this.reset() this.codeTableList = [] - this.deviceType = {} + this.codeOpen = false + this.reset() + this.getList() }) } } From a73dbcf24ca66c5dfc902690c8d48b5fab92243b Mon Sep 17 00:00:00 2001 From: mashuai Date: Wed, 3 Apr 2024 10:28:37 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E7=9B=98=E7=82=B9=E5=85=A5=E5=BA=93youhu?= =?UTF-8?q?a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InventoryAndWarehousingServiceImpl.java | 62 ++++++++----------- 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java index 2283b043..6f177e79 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java @@ -60,13 +60,11 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi } } } - int res = 0; + int res; try { //1. 判断是数量还是编号入库,保存到不同表 //1.1 如果是编号入库 if (dto.getIsCode()) { - /*插入ma_machine、ma_machine_label和ma_label_bind以及 - ma_type_put_in_storage_info表和ma_type_put_in_storage_details表*/ res = insertMaMachineInfo(dto, codeList); if (res == 0) { log.error("insertMaMachineInfo方法插入异常"); @@ -87,11 +85,9 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi } } } catch (Exception e) { - log.error(e.getMessage()); + log.error("保存入库盘点异常:{}",e.getMessage()); // 添加事务回滚逻辑 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); - } - if (res == 0) { return AjaxResult.error(ExceptionEnum.SAVE_TO_DATABASE.getCode(), ExceptionEnum.SAVE_TO_DATABASE.getMsg()); } return AjaxResult.success(res); @@ -113,7 +109,7 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi * @return */ private int insertMaMachineInfo(SavePutInfoDto dto, List codeList) { - int num = 0; + int res = 0; for (int i = 0; i < dto.getMachIneDtoList().size(); i++) { MachIneDto machIneDto = dto.getMachIneDtoList().get(i); String code = codeList.get(i); @@ -125,21 +121,22 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi machIneDto.setPutInType(dto.getPutInType()); machIneDto.setNum(dto.getNum()); machIneDto.setCheckMan(dto.getCheckMan()); - num = inventoryAndWarehousingMapper.insertMachine(machIneDto); - if (num == 0) { - throw new RuntimeException("新增到ma_machine表失败"); - } - num = inventoryAndWarehousingMapper.insertMachineLabel(machIneDto); - if (num == 0) { - throw new RuntimeException("新增到ma_machine_label表失败"); - } - num = inventoryAndWarehousingMapper.insertLabelBind(machIneDto); - if (num == 0) { - throw new RuntimeException("新增到ma_label_bind表失败"); - } - num = getAnInt(machIneDto); + res += insertMachineInfo(machIneDto); } - return num; + return res; + } + + /** + * 方法抽取,保持到ma_machine、ma_machine_label和ma_label_bind + * @param machIneDto + * @return + */ + private int insertMachineInfo(MachIneDto machIneDto) { + int res = inventoryAndWarehousingMapper.insertMachine(machIneDto); + res += inventoryAndWarehousingMapper.insertMachineLabel(machIneDto); + res += inventoryAndWarehousingMapper.insertLabelBind(machIneDto); + res += insertTypePutInStorageInfo(machIneDto); + return res; } /** @@ -147,19 +144,12 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi * @param machIneDto * @return */ - private int getAnInt(MachIneDto machIneDto) { - int num; + private int insertTypePutInStorageInfo(MachIneDto machIneDto) { //插入ma_type_put_in_storage_info表,返回主键id - num = inventoryAndWarehousingMapper.saveInfo(machIneDto); - if (num == 0) { - throw new RuntimeException("新增到ma_type_put_in_storage_info表失败"); - } + int res = inventoryAndWarehousingMapper.saveInfo(machIneDto); //ma_type_put_in_storage_details表 - num = inventoryAndWarehousingMapper.saveDetails(machIneDto); - if (num == 0) { - throw new RuntimeException("新增到ma_type_put_in_storage_details表失败"); - } - return num; + res += inventoryAndWarehousingMapper.saveDetails(machIneDto); + return res; } @@ -180,16 +170,16 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi * @return */ private int insertPutInfo(SavePutInfoDto dto) { - int num = 0; + int res = 0; for (int i = 0; i < dto.getMachIneDtoList().size(); i++) { MachIneDto machIneDto = dto.getMachIneDtoList().get(i); machIneDto.setCreator(dto.getCreator()); machIneDto.setPutInType(dto.getPutInType()); machIneDto.setRemarks(dto.getRemarks()); - getAnInt(machIneDto); + res += insertTypePutInStorageInfo(machIneDto); //根据类型追加ma_type表里面的num - num = updateMaTypeInfo(machIneDto.getTypeId(), machIneDto.getPutInStoreNum()); + res += updateMaTypeInfo(machIneDto.getTypeId(), machIneDto.getPutInStoreNum()); } - return num; + return res; } } From d141256dd7b3b8ee9757d21342f05e0c351cea73 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 3 Apr 2024 10:53:52 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E6=95=B0=E9=87=8F=E7=9B=98=E7=82=B9?= =?UTF-8?q?=E5=85=A5=E5=BA=93-=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/store/warehousing/putInStore.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sgzb-ui/src/views/store/warehousing/putInStore.vue b/sgzb-ui/src/views/store/warehousing/putInStore.vue index 75da538d..d564a797 100644 --- a/sgzb-ui/src/views/store/warehousing/putInStore.vue +++ b/sgzb-ui/src/views/store/warehousing/putInStore.vue @@ -675,7 +675,6 @@ export default { this.codeTableList = [] this.numTableList = [] this.$refs['codeForm'].clearValidate() - this.isNumCheck = false; this.codeOpen = false; }, // 表单重置 @@ -792,7 +791,7 @@ export default { this.reset(); this.codeOpen = true; this.title = "数量盘点入库"; - this.$refs['codeForm'].clearValidate() + this.resetCodeForm() }, /** 新增编号盘点按钮操作 */ handleCodeAdd() { @@ -800,7 +799,7 @@ export default { this.reset(); this.codeOpen = true; this.title = "编码盘点入库"; - this.$refs['codeForm'].clearValidate() + this.resetCodeForm() }, // 多选框选中数据 handleSelectionChange(selection) { From dba22d147765a1c75adcbd95011b3145fc834c1e Mon Sep 17 00:00:00 2001 From: hayu <1604366271@qq.com> Date: Wed, 3 Apr 2024 14:07:26 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E5=8E=82=E5=AE=B6=E8=A7=84=E6=A0=BC?= =?UTF-8?q?=E5=9E=8B=E5=8F=B7=E6=B7=BB=E5=8A=A0=E5=8F=8A=E6=9C=BA=E5=85=B7?= =?UTF-8?q?=E4=BB=93=E5=82=A8=E7=8A=B6=E6=80=81=E6=9F=A5=E8=AF=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonus/sgzb/base/api/domain/MaType.java | 14 ++++++++++++++ .../resources/mapper/base/MaMachineTypeMapper.xml | 11 +++++++---- .../mapper/material/StorageStatusMapper.xml | 1 + 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java index 39f5dcc3..4d1755c9 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java @@ -203,6 +203,12 @@ public class MaType extends BaseEntity { @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children = new ArrayList<>(); + /** + * 厂家规格型号 + */ + @ApiModelProperty(value = "厂家规格型号") + private String facModel; + public Long getTypeId() { @@ -550,4 +556,12 @@ public class MaType extends BaseEntity { public void setFinalPrice(String finalPrice) { this.finalPrice = finalPrice; } + + public String getFacModel() { + return facModel; + } + + public void setFacModel(String facModel) { + this.facModel = facModel; + } } diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml index dae1bac1..786ad5ff 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml @@ -69,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" is_plan, is_ancuo, remark, + fac_model, #{typeName}, @@ -98,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{isPlan}, #{isAncuo}, #{remark}, + #{facModel}, @@ -154,6 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" is_ancuo = #{isAncuo}, remark = #{remark}, company_id = #{companyId}, + fac_model = #{facModel}, where type_id = #{typeId} @@ -273,13 +276,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"