From f8e573162e9ae0d6718ff9c1b955c50520611aca Mon Sep 17 00:00:00 2001 From: lijiaqi Date: Fri, 22 Nov 2024 16:02:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(retail):=20=E4=BA=A7=E5=93=81=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=20BO=20=E5=92=8C=20DTO=20=E5=A2=9E=E5=8A=A0=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在多个 BO 和 DTO 类中添加供应商 ID 和名称字段- 更新 RetailOutSheetMapper.xml以包含供应商信息查询 -此修改涉及零售出库、退货和产品信息等相关功能 --- .../xingyun/sc/bo/retail/RetailProductBo.java | 12 ++++++++++++ .../sc/bo/retail/out/GetRetailOutSheetBo.java | 14 ++++++++++++++ .../bo/retail/out/RetailOutSheetWithReturnBo.java | 14 ++++++++++++++ .../sc/bo/retail/returned/GetRetailReturnBo.java | 14 ++++++++++++++ .../xingyun/sc/dto/retail/RetailProductDto.java | 10 ++++++++++ .../mappers/retail/RetailOutSheetMapper.xml | 7 ++++++- 6 files changed, 70 insertions(+), 1 deletion(-) diff --git a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/RetailProductBo.java b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/RetailProductBo.java index 52b29ca..6bed907 100644 --- a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/RetailProductBo.java +++ b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/RetailProductBo.java @@ -98,6 +98,18 @@ public class RetailProductBo extends BaseBo { @JsonIgnore private String scId; + /** + * 供应商Id + */ + @ApiModelProperty(value = "供应商Id") + private String supplierId; + + /** + * 供应商名称 + */ + @ApiModelProperty(value = "供应商名称") + private String supplierName; + public RetailProductBo(String scId, RetailProductDto dto) { this.scId = scId; diff --git a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/out/GetRetailOutSheetBo.java b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/out/GetRetailOutSheetBo.java index b4d5a4d..4a7bd14 100644 --- a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/out/GetRetailOutSheetBo.java +++ b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/out/GetRetailOutSheetBo.java @@ -370,6 +370,18 @@ public class GetRetailOutSheetBo extends BaseBo { @JsonIgnore private String scId; + /** + * 供应商Id + */ + @ApiModelProperty(value = "供应商Id") + private String supplierId; + + /** + * 供应商名称 + */ + @ApiModelProperty(value = "供应商名称") + private String supplierName; + public OrderDetailBo(String scId, RetailOutSheetFullDto.SheetDetailDto dto) { this.scId = scId; @@ -402,6 +414,8 @@ public class GetRetailOutSheetBo extends BaseBo { this.spec = product.getSpec(); this.categoryName = product.getCategoryName(); this.brandName = product.getBrandName(); + this.supplierId = product.getSupplierId(); + this.supplierName = product.getSupplierName(); ProductStockService productStockService = ApplicationUtil.getBean( ProductStockService.class); diff --git a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/out/RetailOutSheetWithReturnBo.java b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/out/RetailOutSheetWithReturnBo.java index 2fab05a..e570a8f 100644 --- a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/out/RetailOutSheetWithReturnBo.java +++ b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/retail/out/RetailOutSheetWithReturnBo.java @@ -242,6 +242,18 @@ public class RetailOutSheetWithReturnBo extends BaseBo { @JsonIgnore private String scId; + /** + * 供应商Id + */ + @ApiModelProperty(value = "供应商Id") + private String supplierId; + + /** + * 供应商名称 + */ + @ApiModelProperty(value = "供应商名称") + private String supplierName; + public ReturnDetailBo(String scId, RetailReturnFullDto.ReturnDetailDto dto) { this.scId = scId; @@ -397,6 +409,8 @@ public class GetRetailReturnBo extends BaseBo { this.spec = product.getSpec(); this.categoryName = product.getCategoryName(); this.brandName = product.getBrandName(); + this.supplierId = product.getSupplierId(); + this.supplierName = product.getSupplierName(); if (!StringUtil.isBlank(dto.getOutSheetDetailId())) { RetailOutSheetDetailLotService receiveSheetDetailService = ApplicationUtil.getBean( diff --git a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/dto/retail/RetailProductDto.java b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/dto/retail/RetailProductDto.java index f46b615..cded945 100644 --- a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/dto/retail/RetailProductDto.java +++ b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/dto/retail/RetailProductDto.java @@ -79,4 +79,14 @@ public class RetailProductDto implements BaseDto, Serializable { * 状态 */ private Boolean available; + + /** + * 供应商Id + */ + private String supplierId; + + /** + * 供应商名称 + */ + private String supplierName; } diff --git a/xingyun-sc/src/main/resources/mappers/retail/RetailOutSheetMapper.xml b/xingyun-sc/src/main/resources/mappers/retail/RetailOutSheetMapper.xml index 3660fde..5d08bc3 100644 --- a/xingyun-sc/src/main/resources/mappers/retail/RetailOutSheetMapper.xml +++ b/xingyun-sc/src/main/resources/mappers/retail/RetailOutSheetMapper.xml @@ -93,6 +93,8 @@ + + @@ -170,12 +172,15 @@ g.unit, retail.price AS retail_price, g.sale_tax_rate, - g.available + g.available, + g.supplier_id, + s.name AS supplier_name FROM base_data_product AS g INNER JOIN base_data_product_retail AS retail ON retail.id = g.id LEFT JOIN base_data_product_category AS c ON c.id = g.category_id LEFT JOIN base_data_product_brand AS b ON b.id = g.brand_id LEFT JOIN recursion_mapping AS rm ON rm.node_id = c.id and rm.node_type = 2 + LEFT JOIN base_data_supplier AS s ON s.id = g.supplier_id