From 2d80a26c484d77da4c6801768998f6df3826a741 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Thu, 7 Nov 2024 14:36:23 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=96=B0=E8=B4=AD=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/purchase/domain/PurchaseCheckInfo.java | 10 ++++++++++ .../service/impl/PurchaseCheckInfoServiceImpl.java | 4 +++- .../material/purchase/PurchaseCheckInfoMapper.xml | 10 ++++++++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckInfo.java index 76f72edf..03c11e76 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckInfo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckInfo.java @@ -57,6 +57,16 @@ public class PurchaseCheckInfo extends BaseEntity { @ApiModelProperty(value = "采购员") private Long purchaser; + /** 物资厂家id */ + @Excel(name = "物资厂家id") + @ApiModelProperty(value = "物资厂家id") + private Long supplierId; + + /** 物资厂家名称 */ + @Excel(name = "物资厂家名称") + @ApiModelProperty(value = "物资厂家名称") + private Long supplierName; + /** 数据所属组织 */ @Excel(name = "数据所属组织") @ApiModelProperty(value = "数据所属组织") diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/service/impl/PurchaseCheckInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/service/impl/PurchaseCheckInfoServiceImpl.java index 4e9c7c34..64848926 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/service/impl/PurchaseCheckInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/service/impl/PurchaseCheckInfoServiceImpl.java @@ -167,7 +167,9 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService { public AjaxResult insertPurchaseCheckInfo(PurchaseCheckDto purchaseCheckInfo) { // 赋值创建时间 purchaseCheckInfo.getPurchaseCheckInfo().setCreateTime(DateUtils.getNowDate()); - purchaseCheckInfo.getPurchaseCheckInfo().setCreateBy(SecurityUtils.getLoginUser().getUsername()); + purchaseCheckInfo.getPurchaseCheckInfo().setUpdateTime(DateUtils.getNowDate()); + purchaseCheckInfo.getPurchaseCheckInfo().setCreateBy(SecurityUtils.getUsername()); + purchaseCheckInfo.getPurchaseCheckInfo().setUpdateBy(SecurityUtils.getUsername()); try { // 查询新购任务当月最大单号 Integer thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), Long.valueOf(PurchaseTaskEnum.PURCHASE_TASK_STATUS_WAIT_NOTICE.getTaskTypeId())); diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml index 98771f7f..2965a1bb 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml @@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select - id, task_id, purchase_time, arrival_time, purchaser, tax_rate, create_by, + id, task_id, purchase_time, arrival_time, purchaser, supplier_id, tax_rate, create_by, create_time, update_by, update_time, remark, company_id from purchase_check_info @@ -37,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select - pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.tax_rate, pci.create_by, + pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.supplier_id, pci.tax_rate, pci.create_by, pci.create_time, pci.update_by, pci.update_time, pci.remark, pci.company_id, t.task_status, t.task_type, t.code, su.user_name as create_user_name from @@ -53,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and purchase_time = #{purchaseTime} and arrival_time = #{arrivalTime} and purchaser = #{purchaser} + and supplier_id = #{supplierId} and tax_rate = #{taxRate} and company_id = #{companyId} @@ -70,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" purchase_time, arrival_time, purchaser, + supplier_id, tax_rate, create_by, create_time, @@ -83,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{purchaseTime}, #{arrivalTime}, #{purchaser}, + #{supplierId}, #{taxRate}, #{createBy}, #{createTime}, @@ -100,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" purchase_time = #{purchaseTime}, arrival_time = #{arrivalTime}, purchaser = #{purchaser}, + supplier_id = #{supplierId}, tax_rate = #{taxRate}, create_by = #{createBy}, create_time = #{createTime}, @@ -129,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and pci.purchase_time = #{purchaseTime} and pci.arrival_time = #{arrivalTime} and pci.purchaser = #{purchaser} + and pci.supplier_id = #{supplierId} and pci.tax_rate = #{taxRate} From 75f8e59e86a3f9f9b3a7be201bd441e19e51395a Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Thu, 7 Nov 2024 14:55:11 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E6=96=B0=E8=B4=AD=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonus/material/purchase/domain/PurchaseCheckInfo.java | 2 +- .../mapper/material/purchase/PurchaseCheckInfoMapper.xml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckInfo.java index 03c11e76..9bd53852 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckInfo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/purchase/domain/PurchaseCheckInfo.java @@ -65,7 +65,7 @@ public class PurchaseCheckInfo extends BaseEntity { /** 物资厂家名称 */ @Excel(name = "物资厂家名称") @ApiModelProperty(value = "物资厂家名称") - private Long supplierName; + private String supplier; /** 数据所属组织 */ @Excel(name = "数据所属组织") diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml index 2965a1bb..0559b875 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml @@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -40,11 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.supplier_id, pci.tax_rate, pci.create_by, pci.create_time, pci.update_by, pci.update_time, pci.remark, pci.company_id, - t.task_status, t.task_type, t.code, su.user_name as create_user_name + t.task_status, t.task_type, t.code, su.user_name as create_user_name, msi.supplier from purchase_check_info pci left join tm_task t on t.task_id = pci.task_id left join sys_user su ON pci.create_by = su.user_id + left join ma_supplier_info msi on pci.supplier_id = msi.supplier_id - select type_id as typeId, parent_id as parentId, type_name as typeName, level as level from ma_type - where type_name = #{typeName} and del_flag = '0' + where type_name = #{typeName} and parent_id = #{parentId} and del_flag = '0' - SELECT DISTINCT m.pa_id AS id, m.pa_name AS paName, + m1.pa_name AS partName, + m2.pa_name As partType, m.parent_id as parentId, m.LEVEL as level, m.remark as remark From 24ebbabf86497a28fba376d1ca4ef026c1dd3446 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Thu, 7 Nov 2024 18:32:23 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E9=85=8D=E4=BB=B6=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/material/ma/PartTypeMapper.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/PartTypeMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/PartTypeMapper.xml index 7d5d46aa..c68f5f4f 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/PartTypeMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/PartTypeMapper.xml @@ -179,6 +179,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" m1.pa_name AS partName, m2.pa_name As partType, m.parent_id as parentId, + m.unit_name as unitName, + m.storage_num as storageNum, + m.buy_price as buyPrice, m.LEVEL as level, m.remark as remark FROM