diff --git a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/bo/product/info/QueryProductBo.java b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/bo/product/info/QueryProductBo.java index c755cfe..9e9d70a 100644 --- a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/bo/product/info/QueryProductBo.java +++ b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/bo/product/info/QueryProductBo.java @@ -1,5 +1,6 @@ package com.lframework.xingyun.basedata.bo.product.info; +import cn.hutool.core.util.ObjectUtil; import com.fasterxml.jackson.annotation.JsonFormat; import com.lframework.starter.common.constants.StringPool; import com.lframework.starter.web.annotations.convert.EnumConvert; @@ -8,9 +9,14 @@ import com.lframework.starter.web.common.utils.ApplicationUtil; import com.lframework.xingyun.basedata.entity.Product; import com.lframework.xingyun.basedata.entity.ProductBrand; import com.lframework.xingyun.basedata.entity.ProductCategory; +import com.lframework.xingyun.basedata.entity.ProductSale; import com.lframework.xingyun.basedata.service.product.ProductBrandService; import com.lframework.xingyun.basedata.service.product.ProductCategoryService; +import com.lframework.xingyun.basedata.service.product.ProductSaleService; +import com.lframework.xingyun.basedata.service.product.ProductService; import io.swagger.annotations.ApiModelProperty; + +import java.math.BigDecimal; import java.time.LocalDateTime; import lombok.Data; @@ -86,6 +92,19 @@ public class QueryProductBo extends BaseBo { @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN) private LocalDateTime updateTime; + + /** + * 销售价 + */ + @ApiModelProperty("销售价") + private BigDecimal salePrice; + + /** + * 库存 + */ + @ApiModelProperty("库存") + private Integer stock; + public QueryProductBo() { } @@ -105,5 +124,12 @@ public class QueryProductBo extends BaseBo { ProductBrandService productBrandService = ApplicationUtil.getBean(ProductBrandService.class); ProductBrand brand = productBrandService.findById(dto.getBrandId()); this.brandName = brand.getName(); + + ProductSaleService productSaleService = ApplicationUtil.getBean(ProductSaleService.class); + ProductSale productSale = productSaleService.getById(dto.getId()); + this.salePrice = productSale.getPrice(); + + ProductService productService = ApplicationUtil.getBean(ProductService.class); + this.stock = productService.getStock(dto.getId()); } } diff --git a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/excel/customer/CustomerImportListener.java b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/excel/customer/CustomerImportListener.java index 3a74ced..2820a25 100644 --- a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/excel/customer/CustomerImportListener.java +++ b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/excel/customer/CustomerImportListener.java @@ -54,10 +54,10 @@ public class CustomerImportListener extends ExcelImportListener * Mapper 接口 @@ -103,4 +104,12 @@ public interface ProductMapper extends BaseMapper { */ List getByBrandIds(@Param("brandIds") List brandIds, @Param("productType") Integer productType); + + /** + * 查询库存 + * + * @param productId + * @return + */ + Integer getStock(@Param("productId") String productId); } diff --git a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/service/product/ProductService.java b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/service/product/ProductService.java index 4c9d4d3..e08986b 100644 --- a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/service/product/ProductService.java +++ b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/service/product/ProductService.java @@ -110,4 +110,12 @@ public interface ProductService extends BaseMpService { * @return */ List getByBrandIds(List brandIds, Integer productType); + + /** + * 根据ID查询库存 + * + * @param id + * @return + */ + Integer getStock(String id); } diff --git a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/customer/CreateCustomerVo.java b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/customer/CreateCustomerVo.java index a4646d1..f4d9e14 100644 --- a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/customer/CreateCustomerVo.java +++ b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/customer/CreateCustomerVo.java @@ -34,8 +34,8 @@ public class CreateCustomerVo implements BaseVo, Serializable { /** * 助记码 */ - @ApiModelProperty(value = "助记码", required = true) - @NotBlank(message = "请输入助记码!") +// @ApiModelProperty(value = "助记码", required = true) +// @NotBlank(message = "请输入助记码!") private String mnemonicCode; /** diff --git a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/customer/UpdateCustomerVo.java b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/customer/UpdateCustomerVo.java index fe42f59..e9eb90d 100644 --- a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/customer/UpdateCustomerVo.java +++ b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/customer/UpdateCustomerVo.java @@ -39,8 +39,8 @@ public class UpdateCustomerVo implements BaseVo, Serializable { /** * 助记码 */ - @ApiModelProperty(value = "助记码", required = true) - @NotBlank(message = "请输入助记码!") +// @ApiModelProperty(value = "助记码", required = true) +// @NotBlank(message = "请输入助记码!") private String mnemonicCode; /** diff --git a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/supplier/CreateSupplierVo.java b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/supplier/CreateSupplierVo.java index 86874d9..4bf3278 100644 --- a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/supplier/CreateSupplierVo.java +++ b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/supplier/CreateSupplierVo.java @@ -36,8 +36,8 @@ public class CreateSupplierVo implements BaseVo, Serializable { /** * 助记码 */ - @ApiModelProperty(value = "助记码", required = true) - @NotBlank(message = "请输入助记码!") +// @ApiModelProperty(value = "助记码", required = true) +// @NotBlank(message = "请输入助记码!") private String mnemonicCode; /** diff --git a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/supplier/UpdateSupplierVo.java b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/supplier/UpdateSupplierVo.java index f5f2b4f..446da59 100644 --- a/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/supplier/UpdateSupplierVo.java +++ b/xingyun-basedata/src/main/java/com/lframework/xingyun/basedata/vo/supplier/UpdateSupplierVo.java @@ -40,8 +40,8 @@ public class UpdateSupplierVo implements BaseVo, Serializable { /** * 助记码 */ - @ApiModelProperty(value = "助记码", required = true) - @NotBlank(message = "请输入助记码!") +// @ApiModelProperty(value = "助记码", required = true) +// @NotBlank(message = "请输入助记码!") private String mnemonicCode; /** diff --git a/xingyun-basedata/src/main/resources/mappers/product/ProductMapper.xml b/xingyun-basedata/src/main/resources/mappers/product/ProductMapper.xml index 6a225f5..a72166b 100644 --- a/xingyun-basedata/src/main/resources/mappers/product/ProductMapper.xml +++ b/xingyun-basedata/src/main/resources/mappers/product/ProductMapper.xml @@ -163,4 +163,8 @@ ORDER BY g.code + + diff --git a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/enums/SaleOrderStatus.java b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/enums/SaleOrderStatus.java index 0a776ed..a5273a5 100644 --- a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/enums/SaleOrderStatus.java +++ b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/enums/SaleOrderStatus.java @@ -15,20 +15,17 @@ public enum SaleOrderStatus implements BaseEnum { private String desc; SaleOrderStatus(Integer code, String desc) { - this.code = code; this.desc = desc; } @Override public Integer getCode() { - return this.code; } @Override public String getDesc() { - return this.desc; } } diff --git a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/enums/YdoolPersonIds.java b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/enums/YdoolPersonIds.java new file mode 100644 index 0000000..dae6b3c --- /dev/null +++ b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/enums/YdoolPersonIds.java @@ -0,0 +1,25 @@ +package com.lframework.xingyun.sc.enums; + +import com.baomidou.mybatisplus.annotation.EnumValue; + +public enum YdoolPersonIds { + SALE_ORDER_AUDIT_PERSON_IDS("9,262", "销售订单审批人"), + SALE_ORDER_PUSH_PERSON_IDS("9,262", "销售订单抄送人"), + ; + @EnumValue + private final String ids; + + private final String desc; + + + YdoolPersonIds(String ids, String desc) { + this.ids = ids; + this.desc = desc; + } + public String getIds() { + return ids; + } + public String getDesc() { + return desc; + } +} diff --git a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/purchase/PurchaseOrderServiceImpl.java b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/purchase/PurchaseOrderServiceImpl.java index feb6e78..2b4528f 100644 --- a/xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/purchase/PurchaseOrderServiceImpl.java +++ b/xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/purchase/PurchaseOrderServiceImpl.java @@ -673,8 +673,8 @@ public class PurchaseOrderServiceImpl extends BaseMpServiceImpl