瀏覽代碼

待建产品

yzc 1 年之前
父節點
當前提交
c9480313dc
共有 18 個文件被更改,包括 332 次插入13 次删除
  1. 5 0
      hx-item/src/main/java/com/fjhx/item/entity/product/dto/ProductInfoDto.java
  2. 18 5
      hx-item/src/main/java/com/fjhx/item/service/product/impl/ProductInfoServiceImpl.java
  3. 8 0
      hx-sale/src/main/java/com/fjhx/sale/controller/ext/ExtQuotationController.java
  4. 33 0
      hx-sale/src/main/java/com/fjhx/sale/controller/ext/ExtQuotationProductController.java
  5. 4 0
      hx-sale/src/main/java/com/fjhx/sale/entity/ext/po/ExtQuotation.java
  6. 5 0
      hx-sale/src/main/java/com/fjhx/sale/entity/ext/po/ExtQuotationProduct.java
  7. 34 0
      hx-sale/src/main/java/com/fjhx/sale/entity/ext/vo/ExtQuotationProductVo.java
  8. 5 0
      hx-sale/src/main/java/com/fjhx/sale/entity/quotation/po/QuotationEstimate.java
  9. 6 0
      hx-sale/src/main/java/com/fjhx/sale/entity/quotation/po/QuotationProduct.java
  10. 5 0
      hx-sale/src/main/java/com/fjhx/sale/mapper/ext/ExtQuotationProductMapper.java
  11. 15 0
      hx-sale/src/main/java/com/fjhx/sale/service/ext/ExtQuotationProductService.java
  12. 5 0
      hx-sale/src/main/java/com/fjhx/sale/service/ext/ExtQuotationService.java
  13. 155 0
      hx-sale/src/main/java/com/fjhx/sale/service/ext/impl/ExtQuotationProductServiceImpl.java
  14. 22 0
      hx-sale/src/main/java/com/fjhx/sale/service/ext/impl/ExtQuotationServiceImpl.java
  15. 2 4
      hx-sale/src/main/java/com/fjhx/sale/service/quotation/impl/QuotationEstimateServiceImpl.java
  16. 2 3
      hx-sale/src/main/java/com/fjhx/sale/service/sale/impl/SaleQuotationServiceImpl.java
  17. 2 1
      hx-sale/src/main/resources/mapper/ext/ExtQuotationMapper.xml
  18. 6 0
      hx-sale/src/main/resources/mapper/ext/ExtQuotationProductMapper.xml

+ 5 - 0
hx-item/src/main/java/com/fjhx/item/entity/product/dto/ProductInfoDto.java

@@ -79,4 +79,9 @@ public class ProductInfoDto extends ProductInfo {
      * 产品定制信息列表
      */
     private List<ProductCustomInfoDto> productCustomInfoList;
+
+    /**
+     * 对外报价单产品id
+     */
+    private Long extQuotationProductId;
 }

+ 18 - 5
hx-item/src/main/java/com/fjhx/item/service/product/impl/ProductInfoServiceImpl.java

@@ -17,6 +17,7 @@ import com.fjhx.common.constant.SourceConstant;
 import com.fjhx.common.entity.AvailableStockBo;
 import com.fjhx.common.service.file.FtpFileService;
 import com.fjhx.common.service.file.impl.FtpFileServiceImpl;
+import com.fjhx.common.utils.Assert;
 import com.fjhx.file.entity.FileInfoVo;
 import com.fjhx.file.utils.ObsFileUtil;
 import com.fjhx.item.entity.product.ProcessesBo;
@@ -470,12 +471,24 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
      * 保存修改产品原材料
      */
     private void saveOrEditRawMaterial(ProductInfoDto productInfoDto) {
+        Long rawMaterialId = productInfoDto.getRawMaterialId();
+        Assert.notEmpty(rawMaterialId, "原材料Id不能为空");
+
         List<ProductBomDetail> productBomDetailList = productInfoDto.getProductBomDetailList();
-        List<ProductBomDetail> rawMaterialList = productBomDetailList.stream()
-                .filter(item -> ObjectUtil.equals(item.getType(), 1)).collect(Collectors.toList());
-        if (ObjectUtil.isNotEmpty(rawMaterialList)) {
-            ProductBomDetail productBomDetail = rawMaterialList.get(0);
-            productInfoDto.setRawMaterialId(productBomDetail.getMaterialId());
+        if (ObjectUtil.isNotEmpty(productBomDetailList)) {
+            List<ProductBomDetail> rawMaterialList = productBomDetailList.stream()
+                    .filter(item -> ObjectUtil.equals(item.getType(), 1)).collect(Collectors.toList());
+
+            if (ObjectUtil.isEmpty(rawMaterialList)) {
+                ProductBomDetail productBomDetail = new ProductBomDetail();
+                productBomDetail.setMaterialId(rawMaterialId);
+                productBomDetail.setType(1);
+                productBomDetail.setQuantity(BigDecimal.ONE);
+                productBomDetailList.add(productBomDetail);
+            } else {
+                ProductBomDetail productBomDetail = rawMaterialList.get(0);
+                productBomDetail.setMaterialId(rawMaterialId);
+            }
         }
     }
 

+ 8 - 0
hx-sale/src/main/java/com/fjhx/sale/controller/ext/ExtQuotationController.java

@@ -94,5 +94,13 @@ public class ExtQuotationController {
         return extQuotationService.getVersionList(dto.getId());
     }
 
+    /**
+     * 生成待创建产品数据
+     */
+    @PostMapping("/waitProduct")
+    void waitProduct(@RequestBody ExtQuotationSelectDto dto) {
+        extQuotationService.waitProduct(dto.getId());
+    }
+
 
 }

+ 33 - 0
hx-sale/src/main/java/com/fjhx/sale/controller/ext/ExtQuotationProductController.java

@@ -1,5 +1,13 @@
 package com.fjhx.sale.controller.ext;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.item.entity.product.dto.ProductInfoDto;
+import com.fjhx.sale.entity.ext.dto.ExtQuotationProductSelectDto;
+import com.fjhx.sale.entity.ext.vo.ExtQuotationProductVo;
+import com.fjhx.sale.service.ext.ExtQuotationProductService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -16,5 +24,30 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/extQuotationProduct")
 public class ExtQuotationProductController {
 
+    private final ExtQuotationProductService extQuotationProductService;
+
+    @Autowired
+    public ExtQuotationProductController(ExtQuotationProductService extQuotationProductService) {
+        this.extQuotationProductService = extQuotationProductService;
+    }
+
+    /**
+     * 待创建产品分页
+     *
+     * @return
+     */
+    @PostMapping("/waitCreateProductPage")
+    public Page<ExtQuotationProductVo> waitCreateProductPage(@RequestBody ExtQuotationProductSelectDto dto) {
+        return extQuotationProductService.waitCreateProductPage(dto);
+    }
+
+    /**
+     * 创建产品
+     */
+    @PostMapping("/createProduct")
+    public void createProduct(@RequestBody ProductInfoDto dto) {
+        extQuotationProductService.createProduct(dto);
+    }
+
 
 }

+ 4 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/ext/po/ExtQuotation.java

@@ -126,4 +126,8 @@ public class ExtQuotation extends BasePo {
      */
     private Long ofCompanyId;
 
+    /**
+     * 创建产品状态 0待创建 1创建中 2已创建
+     */
+    private Integer createProductStatus;
 }

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

@@ -133,4 +133,9 @@ public class ExtQuotationProduct extends BasePo {
      */
     private Long rawMaterialId;
 
+    /**
+     * 工艺id
+     */
+    private Long technologyId;
+
 }

+ 34 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/ext/vo/ExtQuotationProductVo.java

@@ -33,4 +33,38 @@ public class ExtQuotationProductVo extends ExtQuotationProduct {
 
     List<ExtQuotationProductCustomInfoVo> quotationProductCustomInfoList;
 
+    /**
+     * 原材料名称
+     */
+    private String rawMaterialName;
+    /**
+     * 原材料编号
+     */
+    private String rawMaterialCode;
+    /**
+     * 原材料颜色
+     */
+    private String rawMaterialColor;
+    /**
+     * 原材料色卡号
+     */
+    private String rawMaterialColorCardCode;
+    /**
+     * 原材料长
+     */
+    private BigDecimal rawMaterialLength;
+    /**
+     * 原材料宽
+     */
+    private BigDecimal rawMaterialWidth;
+    /**
+     * 原材料高
+     */
+    private BigDecimal rawMaterialHeight;
+
+    /**
+     * 原材料净重
+     */
+    private String rawMaterialNetWeight;
+
 }

+ 5 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/quotation/po/QuotationEstimate.java

@@ -104,4 +104,9 @@ public class QuotationEstimate extends BasePo {
      */
     private BigDecimal moldHeight;
 
+    /**
+     * 一出几
+     */
+    private Integer cavityNum;
+
 }

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

@@ -141,4 +141,10 @@ public class QuotationProduct extends BasePo {
      * 原材料id
      */
     private Long rawMaterialId;
+
+    /**
+     * 工艺id
+     */
+    private Long technologyId;
+
 }

+ 5 - 0
hx-sale/src/main/java/com/fjhx/sale/mapper/ext/ExtQuotationProductMapper.java

@@ -1,7 +1,11 @@
 package com.fjhx.sale.mapper.ext;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.fjhx.sale.entity.ext.po.ExtQuotationProduct;
+import com.fjhx.sale.entity.ext.vo.ExtQuotationProductVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
 
 
 /**
@@ -14,4 +18,5 @@ import com.fjhx.sale.entity.ext.po.ExtQuotationProduct;
  */
 public interface ExtQuotationProductMapper extends BaseMapper<ExtQuotationProduct> {
 
+    Page<ExtQuotationProductVo> waitCreateProductPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<ExtQuotationProduct> wrapper);
 }

+ 15 - 0
hx-sale/src/main/java/com/fjhx/sale/service/ext/ExtQuotationProductService.java

@@ -1,6 +1,10 @@
 package com.fjhx.sale.service.ext;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.item.entity.product.dto.ProductInfoDto;
+import com.fjhx.sale.entity.ext.dto.ExtQuotationProductSelectDto;
 import com.fjhx.sale.entity.ext.po.ExtQuotationProduct;
+import com.fjhx.sale.entity.ext.vo.ExtQuotationProductVo;
 import com.ruoyi.common.core.service.BaseService;
 
 
@@ -14,4 +18,15 @@ import com.ruoyi.common.core.service.BaseService;
  */
 public interface ExtQuotationProductService extends BaseService<ExtQuotationProduct> {
 
+    /**
+     * 待创建产品分页
+     *
+     * @return
+     */
+    Page<ExtQuotationProductVo> waitCreateProductPage(ExtQuotationProductSelectDto dto);
+
+    /**
+     * 创建产品
+     */
+    void createProduct(ProductInfoDto productInfoDto);
 }

+ 5 - 0
hx-sale/src/main/java/com/fjhx/sale/service/ext/ExtQuotationService.java

@@ -53,4 +53,9 @@ public interface ExtQuotationService extends BaseService<ExtQuotation> {
      * 获取报价单历史版本
      */
     List<ExtQuotationVo> getVersionList(Long extQuotationId);
+
+    /**
+     * 生成待创建产品数据
+     */
+    void waitProduct(Long id);
 }

+ 155 - 0
hx-sale/src/main/java/com/fjhx/sale/service/ext/impl/ExtQuotationProductServiceImpl.java

@@ -1,11 +1,43 @@
 package com.fjhx.sale.service.ext.impl;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.dynamic.datasource.annotation.DSTransactional;
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.common.utils.Assert;
+import com.fjhx.file.entity.FileInfoVo;
+import com.fjhx.file.entity.ObsFile;
+import com.fjhx.file.utils.ObsFileUtil;
+import com.fjhx.item.entity.product.dto.ProductCustomInfoDto;
+import com.fjhx.item.entity.product.dto.ProductInfoDto;
+import com.fjhx.item.entity.product.po.ProductBomDetail;
+import com.fjhx.item.service.product.ProductInfoService;
+import com.fjhx.sale.entity.ext.dto.ExtQuotationProductSelectDto;
+import com.fjhx.sale.entity.ext.po.ExtQuotation;
 import com.fjhx.sale.entity.ext.po.ExtQuotationProduct;
+import com.fjhx.sale.entity.ext.po.ExtQuotationProductBom;
+import com.fjhx.sale.entity.ext.po.ExtQuotationProductCustomInfo;
+import com.fjhx.sale.entity.ext.vo.ExtQuotationProductBomVo;
+import com.fjhx.sale.entity.ext.vo.ExtQuotationProductCustomInfoVo;
+import com.fjhx.sale.entity.ext.vo.ExtQuotationProductVo;
 import com.fjhx.sale.mapper.ext.ExtQuotationProductMapper;
+import com.fjhx.sale.service.ext.ExtQuotationProductBomService;
+import com.fjhx.sale.service.ext.ExtQuotationProductCustomInfoService;
 import com.fjhx.sale.service.ext.ExtQuotationProductService;
+import com.fjhx.sale.service.ext.ExtQuotationService;
+import com.ruoyi.common.core.domain.BasePo;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
 
 /**
  * <p>
@@ -18,4 +50,127 @@ import org.springframework.stereotype.Service;
 @Service
 public class ExtQuotationProductServiceImpl extends ServiceImpl<ExtQuotationProductMapper, ExtQuotationProduct> implements ExtQuotationProductService {
 
+    @Autowired
+    private ProductInfoService productInfoService;
+    @Autowired
+    private ExtQuotationProductBomService extQuotationProductBomService;
+    @Autowired
+    private ExtQuotationProductCustomInfoService extQuotationProductCustomInfoService;
+    @Autowired
+    private ExtQuotationProductService extQuotationProductService;
+    @Autowired
+    private ExtQuotationService extQuotationService;
+
+    @Override
+    public Page<ExtQuotationProductVo> waitCreateProductPage(ExtQuotationProductSelectDto dto) {
+        IWrapper<ExtQuotationProduct> wrapper = getWrapper();
+        //过滤待创建产品数据
+        wrapper.eq("eq.create_product_status", 1);
+        wrapper.isNull("eqp.product_id");
+        Page<ExtQuotationProductVo> page = baseMapper.waitCreateProductPage(dto.getPage(), wrapper);
+        List<ExtQuotationProductVo> records = page.getRecords();
+        if (ObjectUtil.isEmpty(records)) {
+            return page;
+        }
+        List<Long> pIds = records.stream().map(ExtQuotationProduct::getId).collect(Collectors.toList());
+
+        //获取BOM信息
+        List<ExtQuotationProductBom> bomList = extQuotationProductBomService.list(q -> q.in(ExtQuotationProductBom::getQuotationProductId, pIds));
+        List<ExtQuotationProductBomVo> extQuotationProductBomVos = BeanUtil.copyToList(bomList, ExtQuotationProductBomVo.class);
+        productInfoService.attributeAssign(extQuotationProductBomVos, ExtQuotationProductBom::getMaterialId, (item, product) -> {
+            item.setProductCode(product.getCustomCode());
+            item.setProductName(product.getName());
+            item.setProductLength(product.getLength());
+            item.setProductWidth(product.getWidth());
+            item.setProductHeight(product.getHeight());
+            item.setProductColor(product.getColor());
+        });
+        Map<Long, List<ExtQuotationProductBomVo>> eqpbMap = extQuotationProductBomVos.stream().collect(Collectors.groupingBy(ExtQuotationProductBom::getQuotationProductId));
+
+        //获取定制信息
+        List<ExtQuotationProductCustomInfo> eqpciList = extQuotationProductCustomInfoService.list(q -> q.in(ExtQuotationProductCustomInfo::getExtQuotationProductId, pIds));
+        List<ExtQuotationProductCustomInfoVo> eqpcivList = BeanUtil.copyToList(eqpciList, ExtQuotationProductCustomInfoVo.class);
+        List<Long> eqpciIds = eqpcivList.stream().map(ExtQuotationProductCustomInfo::getId).collect(Collectors.toList());
+        Map<Long, List<FileInfoVo>> fileMap = ObsFileUtil.getFileMap(eqpciIds);
+        for (ExtQuotationProductCustomInfoVo extQuotationProductCustomInfoVo : eqpcivList) {
+            extQuotationProductCustomInfoVo.setFileList(fileMap.get(extQuotationProductCustomInfoVo.getId()));
+        }
+        Map<Long, List<ExtQuotationProductCustomInfoVo>> eqpciMap = eqpcivList.stream().collect(Collectors.groupingBy(ExtQuotationProductCustomInfo::getExtQuotationProductId));
+
+        //赋值原材料名称
+        productInfoService.attributeAssign(records, ExtQuotationProduct::getRawMaterialId, (item, product) -> {
+            item.setRawMaterialName(product.getName());
+            item.setRawMaterialCode(product.getCode());
+            item.setRawMaterialColor(product.getColor());
+            item.setRawMaterialColorCardCode(product.getColorCardCode());
+            item.setRawMaterialLength(product.getLength());
+            item.setRawMaterialWidth(product.getWidth());
+            item.setRawMaterialHeight(product.getHeight());
+            item.setNetWeight(product.getNetWeight());
+        });
+
+        //赋值信息
+        for (ExtQuotationProductVo record : records) {
+            //赋值BOM信息
+            record.setQuotationProductBomList(eqpbMap.get(record.getId()));
+            //赋值定制信息
+            record.setQuotationProductCustomInfoList(eqpciMap.get(record.getId()));
+        }
+        return page;
+    }
+
+    @DSTransactional
+    @Override
+    public void createProduct(ProductInfoDto productInfoDto) {
+        productInfoDto.setId(IdWorker.getId());
+        List<ProductBomDetail> productBomDetailList = productInfoDto.getProductBomDetailList();
+        productBomDetailList.forEach(item -> item.setId(IdWorker.getId()));
+        List<ProductCustomInfoDto> productCustomInfoList = productInfoDto.getProductCustomInfoList();
+        for (ProductCustomInfoDto productCustomInfoDto : productCustomInfoList) {
+            productCustomInfoDto.setId(IdWorker.getId());
+            List<ObsFile> fileList = productCustomInfoDto.getFileList();
+            ObsFileUtil.copyFileAndSave(fileList, productCustomInfoDto.getId());
+        }
+        productInfoService.add(productInfoDto);
+
+        Long extQuotationProductId = productInfoDto.getExtQuotationProductId();
+
+        ExtQuotationProduct extQuotationProduct = this.getById(extQuotationProductId);
+        Assert.notEmpty(extQuotationProduct, "查询不到对外报价单产品信息");
+
+        this.update(q -> q
+                .eq(ExtQuotationProduct::getQuotationProductId, extQuotationProductId)
+                .set(ExtQuotationProduct::getProductId, productInfoDto.getId())
+                .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
+                .set(BasePo::getUpdateTime, new Date())
+        );
+
+        extQuotationProductBomService.update(q -> q
+                .eq(ExtQuotationProductBom::getQuotationProductId, extQuotationProductId)
+                .set(ExtQuotationProductBom::getProductId, productInfoDto.getId())
+                .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
+                .set(BasePo::getUpdateTime, new Date())
+        );
+
+        extQuotationProductCustomInfoService.update(q -> q
+                .eq(ExtQuotationProductCustomInfo::getExtQuotationProductId, extQuotationProductId)
+                .set(ExtQuotationProductCustomInfo::getProductId, productInfoDto.getId())
+                .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
+                .set(BasePo::getUpdateTime, new Date())
+        );
+
+        //更新状态
+        List<ExtQuotationProduct> list = extQuotationProductService.list(q -> q
+                .eq(ExtQuotationProduct::getSaleQuotationId, extQuotationProduct.getSaleQuotationId())
+                .isNull(ExtQuotationProduct::getProductId)
+        );
+        if (ObjectUtil.isEmpty(list)) {
+            extQuotationService.update(q -> q
+                    .eq(ExtQuotation::getId, extQuotationProduct.getSaleQuotationId())
+                    .set(ExtQuotation::getCreateProductStatus, 2)
+                    .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
+                    .set(BasePo::getUpdateTime, new Date())
+            );
+        }
+    }
 }

+ 22 - 0
hx-sale/src/main/java/com/fjhx/sale/service/ext/impl/ExtQuotationServiceImpl.java

@@ -225,6 +225,15 @@ public class ExtQuotationServiceImpl extends ServiceImpl<ExtQuotationMapper, Ext
                 .eq(SaleQuotation::getId, saleQuotationId)
                 .set(SaleQuotation::getExtQuotationId, saleQuotationDto.getId())
         );
+
+        //判断是否需要生成产品
+        saleQuotationDto.setCreateProductStatus(2);
+        List<ExtQuotationProductDto> quotationProductList = saleQuotationDto.getQuotationProductList();
+        List<ExtQuotationProductDto> waitList = quotationProductList
+                .stream().filter(item -> ObjectUtil.isEmpty(item.getProductId())).collect(Collectors.toList());
+        if (waitList.size() > 0) {
+            saleQuotationDto.setCreateProductStatus(0);
+        }
     }
 
     @Override
@@ -472,4 +481,17 @@ public class ExtQuotationServiceImpl extends ServiceImpl<ExtQuotationMapper, Ext
 
     }
 
+    /**
+     * 生成待创建产品数据
+     */
+    @Override
+    public void waitProduct(Long id) {
+        this.update(q -> q
+                .eq(ExtQuotation::getId, id)
+                .set(ExtQuotation::getCreateProductStatus, 1)
+                .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
+                .set(BasePo::getUpdateTime, new Date())
+        );
+    }
+
 }

+ 2 - 4
hx-sale/src/main/java/com/fjhx/sale/service/quotation/impl/QuotationEstimateServiceImpl.java

@@ -66,9 +66,7 @@ public class QuotationEstimateServiceImpl extends ServiceImpl<QuotationEstimateM
         QuotationProduct quotationProduct = quotationProductService.getById(quotationProductId);
         Assert.notEmpty(quotationProduct, "查询不到报价明细信息!");
 
-        //获取工序
-        ProductInfo productInfo = productInfoService.getById(quotationProduct.getProductId());
-        Assert.notEmpty(productInfo, "查询不到工艺信息!");
+        Long technologyId = quotationProduct.getTechnologyId();
 
         //查询现有报价信息
         List<QuotationEstimate> quotationEstimateList = list(q -> q.eq(QuotationEstimate::getQuotationProductId, quotationProductId));
@@ -105,7 +103,7 @@ public class QuotationEstimateServiceImpl extends ServiceImpl<QuotationEstimateM
             }
 
 
-            List<ProcessesBo> processesList = productInfoService.getProcessesByTechnologyId(productInfo.getTechnologyId());
+            List<ProcessesBo> processesList = productInfoService.getProcessesByTechnologyId(technologyId);
             for (ProcessesBo processesBo : processesList) {
                 QuotationEstimateVo quotationEstimate = new QuotationEstimateVo();
                 quotationEstimate.setProcessesId(processesBo.getId());

+ 2 - 3
hx-sale/src/main/java/com/fjhx/sale/service/sale/impl/SaleQuotationServiceImpl.java

@@ -337,9 +337,8 @@ public class SaleQuotationServiceImpl extends ServiceImpl<SaleQuotationMapper, S
                 List<QuotationProductCustomInfoDto> quotationProductCustomInfoList = quotationProductDto.getQuotationProductCustomInfoList();
                 quotationProductCustomInfoList = ObjectUtil.isEmpty(quotationProductCustomInfoList) ? new ArrayList<>() : quotationProductCustomInfoList;
                 for (QuotationProductCustomInfoDto quotationProductCustomInfo : quotationProductCustomInfoList) {
-                    if (ObjectUtil.isEmpty(quotationProductCustomInfo.getId())) {
-                        quotationProductCustomInfo.setId(IdWorker.getId());
-                    }
+                    quotationProductCustomInfo.setId(IdWorker.getId());
+
                     quotationProductCustomInfo.setProductId(quotationProductDto.getProductId());
                     quotationProductCustomInfo.setQuotationProductId(quotationProductDto.getId());
                     quotationProductCustomInfo.setSaleQuotationId(saleQuotationDto.getId());

+ 2 - 1
hx-sale/src/main/resources/mapper/ext/ExtQuotationMapper.xml

@@ -27,7 +27,8 @@
                      eq.old_quotation_id,
                      eq.sale_quotation_id,
                      eq.last_follow_time,
-                     eq.of_company_id
+                     eq.of_company_id,
+                     eq.create_product_status
               from ext_quotation eq
                   ${ew.customSqlSegment}
        </select>

+ 6 - 0
hx-sale/src/main/resources/mapper/ext/ExtQuotationProductMapper.xml

@@ -1,4 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fjhx.sale.mapper.ext.ExtQuotationProductMapper">
+    <select id="waitCreateProductPage" resultType="com.fjhx.sale.entity.ext.vo.ExtQuotationProductVo">
+        SELECT eqp.*
+        FROM ext_quotation_product eqp
+                 JOIN ext_quotation eq
+            ${ew.customSqlSegment}
+    </select>
 </mapper>