feat(retail): 产品相关 BO 和 DTO 增加供应商信息

- 在多个 BO 和 DTO 类中添加供应商 ID 和名称字段- 更新 RetailOutSheetMapper.xml以包含供应商信息查询
-此修改涉及零售出库、退货和产品信息等相关功能
This commit is contained in:
lijiaqi 2024-11-22 16:02:25 +08:00
parent a973b5d8a8
commit f8e573162e
6 changed files with 70 additions and 1 deletions

View File

@ -98,6 +98,18 @@ public class RetailProductBo extends BaseBo<RetailProductDto> {
@JsonIgnore @JsonIgnore
private String scId; private String scId;
/**
* 供应商Id
*/
@ApiModelProperty(value = "供应商Id")
private String supplierId;
/**
* 供应商名称
*/
@ApiModelProperty(value = "供应商名称")
private String supplierName;
public RetailProductBo(String scId, RetailProductDto dto) { public RetailProductBo(String scId, RetailProductDto dto) {
this.scId = scId; this.scId = scId;

View File

@ -370,6 +370,18 @@ public class GetRetailOutSheetBo extends BaseBo<RetailOutSheetFullDto> {
@JsonIgnore @JsonIgnore
private String scId; private String scId;
/**
* 供应商Id
*/
@ApiModelProperty(value = "供应商Id")
private String supplierId;
/**
* 供应商名称
*/
@ApiModelProperty(value = "供应商名称")
private String supplierName;
public OrderDetailBo(String scId, RetailOutSheetFullDto.SheetDetailDto dto) { public OrderDetailBo(String scId, RetailOutSheetFullDto.SheetDetailDto dto) {
this.scId = scId; this.scId = scId;
@ -402,6 +414,8 @@ public class GetRetailOutSheetBo extends BaseBo<RetailOutSheetFullDto> {
this.spec = product.getSpec(); this.spec = product.getSpec();
this.categoryName = product.getCategoryName(); this.categoryName = product.getCategoryName();
this.brandName = product.getBrandName(); this.brandName = product.getBrandName();
this.supplierId = product.getSupplierId();
this.supplierName = product.getSupplierName();
ProductStockService productStockService = ApplicationUtil.getBean( ProductStockService productStockService = ApplicationUtil.getBean(
ProductStockService.class); ProductStockService.class);

View File

@ -242,6 +242,18 @@ public class RetailOutSheetWithReturnBo extends BaseBo<RetailOutSheetWithReturnD
@JsonIgnore @JsonIgnore
private String scId; private String scId;
/**
* 供应商Id
*/
@ApiModelProperty(value = "供应商Id")
private String supplierId;
/**
* 供应商名称
*/
@ApiModelProperty(value = "供应商名称")
private String supplierName;
public DetailBo(String scId, RetailOutSheetWithReturnDto.SheetDetailDto dto) { public DetailBo(String scId, RetailOutSheetWithReturnDto.SheetDetailDto dto) {
this.scId = scId; this.scId = scId;
@ -280,6 +292,8 @@ public class RetailOutSheetWithReturnBo extends BaseBo<RetailOutSheetWithReturnD
this.spec = product.getSpec(); this.spec = product.getSpec();
this.categoryName = product.getCategoryName(); this.categoryName = product.getCategoryName();
this.brandName = product.getBrandName(); this.brandName = product.getBrandName();
this.supplierId = product.getSupplierId();
this.supplierName = product.getSupplierName();
this.outNum = dto.getOrderNum(); this.outNum = dto.getOrderNum();
this.retailPrice = dto.getOriPrice(); this.retailPrice = dto.getOriPrice();

View File

@ -364,6 +364,18 @@ public class GetRetailReturnBo extends BaseBo<RetailReturnFullDto> {
@JsonIgnore @JsonIgnore
private String scId; private String scId;
/**
* 供应商Id
*/
@ApiModelProperty(value = "供应商Id")
private String supplierId;
/**
* 供应商名称
*/
@ApiModelProperty(value = "供应商名称")
private String supplierName;
public ReturnDetailBo(String scId, RetailReturnFullDto.ReturnDetailDto dto) { public ReturnDetailBo(String scId, RetailReturnFullDto.ReturnDetailDto dto) {
this.scId = scId; this.scId = scId;
@ -397,6 +409,8 @@ public class GetRetailReturnBo extends BaseBo<RetailReturnFullDto> {
this.spec = product.getSpec(); this.spec = product.getSpec();
this.categoryName = product.getCategoryName(); this.categoryName = product.getCategoryName();
this.brandName = product.getBrandName(); this.brandName = product.getBrandName();
this.supplierId = product.getSupplierId();
this.supplierName = product.getSupplierName();
if (!StringUtil.isBlank(dto.getOutSheetDetailId())) { if (!StringUtil.isBlank(dto.getOutSheetDetailId())) {
RetailOutSheetDetailLotService receiveSheetDetailService = ApplicationUtil.getBean( RetailOutSheetDetailLotService receiveSheetDetailService = ApplicationUtil.getBean(

View File

@ -79,4 +79,14 @@ public class RetailProductDto implements BaseDto, Serializable {
* 状态 * 状态
*/ */
private Boolean available; private Boolean available;
/**
* 供应商Id
*/
private String supplierId;
/**
* 供应商名称
*/
private String supplierName;
} }

View File

@ -93,6 +93,8 @@
<result column="retail_price" property="retailPrice"/> <result column="retail_price" property="retailPrice"/>
<result column="sale_tax_rate" property="taxRate"/> <result column="sale_tax_rate" property="taxRate"/>
<result column="available" property="available"/> <result column="available" property="available"/>
<result column="supplier_id" property="supplierId"/>
<result column="supplier_name" property="supplierName"/>
</resultMap> </resultMap>
<sql id="RetailOutSheetDto_sql"> <sql id="RetailOutSheetDto_sql">
@ -170,12 +172,15 @@
g.unit, g.unit,
retail.price AS retail_price, retail.price AS retail_price,
g.sale_tax_rate, g.sale_tax_rate,
g.available g.available,
g.supplier_id,
s.name AS supplier_name
FROM base_data_product AS g FROM base_data_product AS g
INNER JOIN base_data_product_retail AS retail ON retail.id = g.id 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_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 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 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
</sql> </sql>
<select id="query" resultMap="RetailOutSheet"> <select id="query" resultMap="RetailOutSheet">