Browse Source

报价单产品添加字段

yzc 9 months ago
parent
commit
d030d34b13

+ 5 - 0
hx-item/src/main/java/com/fjhx/item/entity/product/po/ProductInfo.java

@@ -236,4 +236,9 @@ public class ProductInfo extends BasePo {
      * 业务员id
      */
     private Long saleUserId;
+
+    /**
+     * logo工艺包装要求
+     */
+    private String logoPackRemark;
 }

+ 2 - 1
hx-item/src/main/resources/mapper/product/ProductInfoMapper.xml

@@ -51,7 +51,8 @@
                pi.is_fold,
                pi.pack_ask,
                pi.is_customized,
-               pi.sale_user_id
+               pi.sale_user_id,
+               pi.logo_pack_remark
         FROM product_info pi
                  LEFT JOIN (SELECT IF(SUM(IF(type = 1, 1, 0)) > 0, 1, 0) AS isRawMaterial,
                                    pbd.product_id

+ 17 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/ext/po/ExtQuotationProduct.java

@@ -138,4 +138,21 @@ public class ExtQuotationProduct extends BasePo {
      */
     private Long technologyId;
 
+    /**
+     * 产品分类id
+     */
+    private Long productClassifyId;
+    /**
+     * 正面纹路
+     */
+    private String frontalTexture;
+    /**
+     * 反面纹路
+     */
+    private String reverseTexture;
+    /**
+     * logo工艺包装要求
+     */
+    private String logoPackRemark;
+
 }

+ 17 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/quotation/po/QuotationProduct.java

@@ -159,4 +159,21 @@ public class QuotationProduct extends BasePo {
 
     private BigDecimal maxPrice;
 
+    /**
+     * 产品分类id
+     */
+    private Long productClassifyId;
+    /**
+     * 正面纹路
+     */
+    private String frontalTexture;
+    /**
+     * 反面纹路
+     */
+    private String reverseTexture;
+    /**
+     * logo工艺包装要求
+     */
+    private String logoPackRemark;
+
 }

+ 2 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/quotation/vo/QuotationProductVo.java

@@ -32,4 +32,6 @@ public class QuotationProductVo extends QuotationProduct {
 
     List<QuotationProductCustomInfoVo> quotationProductCustomInfoList;
 
+    private String productClassifyName;
+
 }

+ 7 - 9
hx-sale/src/main/java/com/fjhx/sale/service/sale/impl/SaleQuotationServiceImpl.java

@@ -28,6 +28,7 @@ import com.fjhx.customer.entity.customer.vo.CustomerVo;
 import com.fjhx.customer.service.customer.CustomerService;
 import com.fjhx.file.entity.FileInfoVo;
 import com.fjhx.file.utils.ObsFileUtil;
+import com.fjhx.item.service.product.ProductClassifyService;
 import com.fjhx.item.service.product.ProductInfoService;
 import com.fjhx.sale.entity.contract.vo.ContractVo;
 import com.fjhx.sale.entity.quotation.dto.QuotationProductBomDto;
@@ -55,7 +56,6 @@ import com.fjhx.sale.util.code.CodeEnum;
 import com.fjhx.socket.core.PushTypeEnum;
 import com.fjhx.socket.core.WebSocketPush;
 import com.fjhx.tenant.entity.dict.vo.DictTenantDataVo;
-import com.fjhx.tenant.service.dict.DictTenantDataService;
 import com.fjhx.tenant.utils.DeptUtils;
 import com.fjhx.tenant.utils.DictUtils;
 import com.ruoyi.common.core.domain.BasePo;
@@ -87,22 +87,14 @@ import java.util.stream.Collectors;
 public class SaleQuotationServiceImpl extends ServiceImpl<SaleQuotationMapper, SaleQuotation> implements SaleQuotationService {
     @Autowired
     private QuotationProductService quotationProductService;
-
     @Autowired
     private QuotationPayService quotationPayService;
-
     @Autowired
     private ContractService contractService;
-
     @Autowired
     private CustomerService customerService;
-
-    @Autowired
-    private DictTenantDataService dictTenantDataService;
-
     @Autowired
     private CodingRuleService codingRuleService;
-
     @Autowired
     private CorporationService corporationService;
     @Autowired
@@ -115,6 +107,8 @@ public class SaleQuotationServiceImpl extends ServiceImpl<SaleQuotationMapper, S
     private ISysUserService sysUserService;
     @Autowired
     private QuotationProductCustomInfoService quotationProductCustomInfoService;
+    @Autowired
+    private ProductClassifyService productClassifyService;
 
     /**
      * 报价表分页
@@ -429,6 +423,10 @@ public class SaleQuotationServiceImpl extends ServiceImpl<SaleQuotationMapper, S
             item.setProductWidth(productInfo.getWidth());
             item.setProductHeight(productInfo.getHeight());
         });
+        //赋值分类信息
+        productClassifyService.attributeAssign(quotationProductVos, QuotationProductVo::getProductClassifyId, (item, pClass) -> {
+            item.setProductClassifyName(pClass.getName());
+        });
         //获取配件列表
         List<Long> qpIds = productList.stream().map(QuotationProduct::getId).collect(Collectors.toList());
         Map<Long, List<QuotationProductBomVo>> qpbMap = new HashMap<>();

+ 17 - 14
hx-sale/src/main/resources/mapper/quotation/QuotationProductMapper.xml

@@ -2,20 +2,23 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fjhx.sale.mapper.quotation.QuotationProductMapper">
     <select id="getPage" resultType="com.fjhx.sale.entity.quotation.vo.QuotationProductVo">
-        select
-            qp.id,
-            qp.sale_quotation_id,
-            qp.product_id,
-            qp.product_name,
-            qp.product_model,
-            qp.quantity,
-            qp.price,
-            qp.amount,
-            qp.remark,
-            qp.create_user,
-            qp.create_time,
-            qp.update_user,
-            qp.update_time
+        select qp.id,
+               qp.sale_quotation_id,
+               qp.product_id,
+               qp.product_name,
+               qp.product_model,
+               qp.quantity,
+               qp.price,
+               qp.amount,
+               qp.remark,
+               qp.create_user,
+               qp.create_time,
+               qp.update_user,
+               qp.update_time,
+               qp.product_classify_id,
+               qp.frontal_texture,
+               qp.reverse_texture,
+               qp.logo_pack_remark
         from quotation_product qp
             ${ew.customSqlSegment}
     </select>