瀏覽代碼

feat:产品要素导入功能开发

chenjianhua 3 周之前
父節點
當前提交
39a2f2976f
共有 18 個文件被更改,包括 737 次插入5 次删除
  1. 9 0
      service-base/src/main/java/com/simuwang/base/common/conts/ExcelConst.java
  2. 20 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/InvestmentManagerData.java
  3. 31 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/ProductContractData.java
  4. 19 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/ProductData.java
  5. 41 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/ProductDerivativeData.java
  6. 43 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/ProductInformationData.java
  7. 10 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/query/FundAliasPageQuery.java
  8. 97 0
      service-base/src/main/java/com/simuwang/base/pojo/dto/query/ProductPageQuery.java
  9. 27 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/ProductExcelFailDataVO.java
  10. 26 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/ProductExcelSuccessDataVO.java
  11. 60 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/ProductInformationVO.java
  12. 38 0
      service-base/src/main/java/com/simuwang/base/pojo/vo/ProductUploadResult.java
  13. 4 1
      service-base/src/main/resources/generatorConfig.xml
  14. 6 0
      service-base/src/main/resources/mapper/daq/FundAliasMapper.xml
  15. 4 4
      service-base/src/main/resources/mapper/daq/HostedEmailInfoMapper.xml
  16. 46 0
      service-manage/src/main/java/com/simuwang/manage/api/product/ProductController.java
  17. 13 0
      service-manage/src/main/java/com/simuwang/manage/service/ProductService.java
  18. 243 0
      service-manage/src/main/java/com/simuwang/manage/service/impl/ProductServiceImpl.java

+ 9 - 0
service-base/src/main/java/com/simuwang/base/common/conts/ExcelConst.java

@@ -22,4 +22,13 @@ public class ExcelConst {
     public static final String ERROR_DATE_FORMAT = "对接日期格式错误,请使用YYYY-MM-dd格式";
     public static final String ERROR_METHOD = "对接状态或者签约方式无法匹配";
     public final static String CHANNEL_ID_ERROR= "渠道ID填写有误";
+
+    //产品要素导入
+    public final static String PRODUCT_SHEET_NAME="产品基本信息";
+    public final static String PRODUCT_CONTRACT_SHEET_NAME="产品合同";
+    public final static String PRODUCT_DETAIL_SHEET_NAME="产品其他信息";
+    public final static String INVESTMENT_MANAGER_SHEET_NAME="投资经理";
+    public final static String DELETION_NAME_REGISTERENUMBER="基金名称和备案编码不能同时为空";
+    public final static String ERROR_INCEPTION_DATE="成立日期不能晚于当前日期";
+    public final static String SUCCESS="数据解析正常";
 }

+ 20 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/InvestmentManagerData.java

@@ -0,0 +1,20 @@
+package com.simuwang.base.pojo.dto;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+import java.util.Date;
+@Data
+public class InvestmentManagerData {
+    private String id;
+
+    private String registerNumber;
+
+    private String startDate;
+
+    private String endDate;
+
+    private String managerName;
+
+
+}

+ 31 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/ProductContractData.java

@@ -0,0 +1,31 @@
+package com.simuwang.base.pojo.dto;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+import java.util.Date;
+@Data
+public class ProductContractData {
+    private String id;
+
+    private String registerNumber;
+
+    private String productName;
+
+    private String productContract;
+
+    private String investmentScope;
+
+    private String investmentLimit;
+
+    private String investmentStrategy;
+
+    private String investmentMethod;
+
+    private String performanceBasic;
+
+    private String accruedMethod;
+
+    private String remark;
+
+}

+ 19 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/ProductData.java

@@ -0,0 +1,19 @@
+package com.simuwang.base.pojo.dto;
+
+import com.simuwang.base.pojo.dos.ProductContractDO;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ProductData {
+
+    private List<ProductInformationData> productInformationDataList;
+
+    private List<InvestmentManagerData> investmentManagerDataList;
+
+    private List<ProductContractData> productContractDataList;
+
+    private List<ProductDerivativeData> productDerivativeDataList;
+
+}

+ 41 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/ProductDerivativeData.java

@@ -0,0 +1,41 @@
+package com.simuwang.base.pojo.dto;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+import java.util.Date;
+@Data
+public class ProductDerivativeData {
+
+    private String id;
+
+    private String registerNumber;
+
+    private String productName;
+
+    private String distributeReport;
+
+    private String cumulativeNav;
+
+    private String productShare;
+
+    private String productAsset;
+
+    private String productValuation;
+
+    private String startDate;
+
+    private String investmentManagerDesc;
+
+    private String productCount;
+
+    private String manageAsset;
+
+    private String feeNote;
+
+    private String managementfeeTrust;
+
+    private String managementfeeBank;
+
+    private String outsourceFee;
+}

+ 43 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/ProductInformationData.java

@@ -0,0 +1,43 @@
+package com.simuwang.base.pojo.dto;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+@Data
+public class ProductInformationData {
+
+    private String id;
+
+    private String registerNumber;
+
+    private String productName;
+
+    private String inceptionDate;
+
+    private String liquidateDate;
+
+    private String msLabel;
+
+    private String isStruct;
+
+    private String firstStrategy;
+
+    private String secondStrategy;
+
+    private String thirdStrategy;
+
+    private String investmentStrategyDesc;
+
+    private String investmentManager;
+
+    private String startDate;
+
+    private String navFrequency;
+
+    private String assetFrequency;
+
+    private String reportFrequency;
+
+    private String remark;
+
+}

+ 10 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/query/FundAliasPageQuery.java

@@ -22,6 +22,8 @@ public class FundAliasPageQuery extends PageQuery {
      */
     private Integer isMapping;
 
+    private Integer reviewStatus;
+
     public String getFundName() {
         return fundName;
     }
@@ -45,4 +47,12 @@ public class FundAliasPageQuery extends PageQuery {
     public void setIsMapping(Integer isMapping) {
         this.isMapping = isMapping;
     }
+
+    public Integer getReviewStatus() {
+        return reviewStatus;
+    }
+
+    public void setReviewStatus(Integer reviewStatus) {
+        this.reviewStatus = reviewStatus;
+    }
 }

+ 97 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/query/ProductPageQuery.java

@@ -0,0 +1,97 @@
+package com.simuwang.base.pojo.dto.query;
+
+
+import com.simuwang.base.common.support.query.PageQuery;
+
+/**
+ * @author wangzaijun
+ * @date 2024/9/13 13:38
+ * @description 角色用户关联的分页接口请求参数
+ */
+public class ProductPageQuery extends PageQuery {
+    /**
+     * 基金名称
+     */
+    private String productName;
+    /**
+     * 成立开始日期
+     */
+    private String startInceptionDate;
+    /**
+     * 成立结束日期
+     */
+    private String endInceptionDate;
+    /**
+     * 母子基金标签
+     */
+    private String msLabel;
+
+    /**
+     * 净值报送频率
+     */
+    private String navFrequency;
+    /**
+     * 规模报送频率
+     */
+    private String assetFrequency;
+    /**
+     * 估值报送频率
+     */
+    private String reportFrequency;
+
+    public String getReportFrequency() {
+        return reportFrequency;
+    }
+
+    public void setReportFrequency(String reportFrequency) {
+        this.reportFrequency = reportFrequency;
+    }
+
+    public String getAssetFrequency() {
+        return assetFrequency;
+    }
+
+    public void setAssetFrequency(String assetFrequency) {
+        this.assetFrequency = assetFrequency;
+    }
+
+    public String getNavFrequency() {
+        return navFrequency;
+    }
+
+    public void setNavFrequency(String navFrequency) {
+        this.navFrequency = navFrequency;
+    }
+
+    public String getMsLabel() {
+        return msLabel;
+    }
+
+    public void setMsLabel(String msLabel) {
+        this.msLabel = msLabel;
+    }
+
+    public String getEndInceptionDate() {
+        return endInceptionDate;
+    }
+
+    public void setEndInceptionDate(String endInceptionDate) {
+        this.endInceptionDate = endInceptionDate;
+    }
+
+    public String getStartInceptionDate() {
+        return startInceptionDate;
+    }
+
+    public void setStartInceptionDate(String startInceptionDate) {
+        this.startInceptionDate = startInceptionDate;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+}

+ 27 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/ProductExcelFailDataVO.java

@@ -0,0 +1,27 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+/**
+ * FileName: ExcelSuccessDataVO
+ * Author:   chenjianhua
+ * Date:     2024/9/16 12:41
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class ProductExcelFailDataVO {
+
+    private String sheet;
+    /**
+     * 行号
+     */
+    private Integer rowNum;
+    /**
+     * 解析结果
+     */
+    private String parseStatus;
+    /**
+     * 失败原因
+     */
+    private String failReason;
+}

+ 26 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/ProductExcelSuccessDataVO.java

@@ -0,0 +1,26 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+/**
+ * FileName: ExcelSuccessDataVO
+ * Author:   chenjianhua
+ * Date:     2024/9/16 12:41
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class ProductExcelSuccessDataVO {
+
+    /**
+     * sheet名称
+     */
+    private String sheet;
+    /**
+     * 行号
+     */
+    private Integer rowNum;
+    /**
+     * 解析状态
+     */
+    private String parseStatus;
+}

+ 60 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/ProductInformationVO.java

@@ -0,0 +1,60 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+import java.util.Date;
+@Data
+public class ProductInformationVO {
+
+    private Integer id;
+
+
+    private String registerNumber;
+
+
+    private String productName;
+
+
+    private String inceptionDate;
+
+
+    private String liquidateDate;
+
+
+    private String msLabel;
+
+
+    private String isStruct;
+
+
+    private String firstStrategy;
+
+    private String secondStrategy;
+
+    private String thirdStrategy;
+
+    private String investmentManager;
+
+    private String startDate;
+
+    private String navFrequency;
+
+    private String assetFrequency;
+
+    private String reportFrequency;
+
+    private Integer isvalid;
+
+    private String createtime;
+
+    private String updatetime;
+
+    private Integer creatorid;
+
+    private Integer updaterid;
+
+    private String investmentStrategyDesc;
+
+    private String remark;
+
+}

+ 38 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/ProductUploadResult.java

@@ -0,0 +1,38 @@
+package com.simuwang.base.pojo.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * FileName: NavAssetUploadResult
+ * Author:   chenjianhua
+ * Date:     2024/9/23 10:36
+ * Description: ${DESCRIPTION}
+ */
+@Data
+public class ProductUploadResult {
+
+    /**
+     * 失败结果集
+     */
+    private List<ProductExcelFailDataVO> fail;
+
+    /**
+     * 成功结果集
+     */
+    private List<ProductExcelSuccessDataVO> success;
+    /**
+     * 成功条数
+     */
+    private Integer successCount;
+    /**
+     * 失败条数
+     */
+    private Integer failCount;
+    /**
+     * 总条数
+     */
+    private Integer total;
+
+}

+ 4 - 1
service-base/src/main/resources/generatorConfig.xml

@@ -50,6 +50,9 @@
             <property name="nullCatalogMeansCurrent" value="true"/>
         </javaClientGenerator>
 
-        <table tableName="user_channel_mapping" domainObjectName="UserChannelMapping"></table>
+        <table tableName="product_information" domainObjectName="productInformation"></table>
+        <table tableName="product_contract" domainObjectName="productContract"></table>
+        <table tableName="product_derivative" domainObjectName="productDerivative"></table>
+        <table tableName="investment_manager" domainObjectName="investmentManager"></table>
     </context>
 </generatorConfiguration>

+ 6 - 0
service-base/src/main/resources/mapper/daq/FundAliasMapper.xml

@@ -132,6 +132,9 @@
         <if test="isMapping != null and isMapping == 0">
             and alias.target_fund_id is null
         </if>
+        <if test="reviewStatus != null">
+            and alias.review_status =#{reviewStatus}
+        </if>
         <if test="isMapping != null and isMapping == 1">
             and alias.target_fund_id is not null
         </if>
@@ -167,6 +170,9 @@
         <if test="isMapping != null and isMapping == 0">
             and alias.target_fund_id is null
         </if>
+        <if test="reviewStatus != null">
+            and alias.review_status =#{reviewStatus}
+        </if>
         <if test="isMapping != null and isMapping == 1">
             and alias.target_fund_id is not null
         </if>

+ 4 - 4
service-base/src/main/resources/mapper/daq/HostedEmailInfoMapper.xml

@@ -56,10 +56,10 @@
                       on ci.company_id = hei.company_id
         where hei.isvalid=1 and ci.isvalid=1
         <if test="companyName != null and companyName != ''">
-            and (ci.company_name like concat(#{companyName},'%') or ci.company_short_name like concat(#{companyName},'%'))
+            and (ci.company_name like concat('%',#{companyName},'%') or ci.company_short_name like concat('%',#{companyName},'%'))
         </if>
         <if test="email != null and email != ''">
-            and hei.email like concat(#{email},'%')
+            and hei.email like concat('%',#{email},'%')
         </if>
         <if test="openStatus != null">
             and hei.open_status =#{openStatus}
@@ -73,10 +73,10 @@
         on ci.company_id = hei.company_id
         where hei.isvalid=1 and ci.isvalid=1
         <if test="companyName != null and companyName != ''">
-            and (ci.company_name like concat(#{companyName},'%') or ci.company_short_name like concat(#{companyName},'%'))
+            and (ci.company_name like concat('%',#{companyName},'%') or ci.company_short_name like concat('%',#{companyName},'%'))
         </if>
         <if test="email != null and email != ''">
-            and hei.email like concat(#{email},'%')
+            and hei.email like concat('%',#{email},'%')
         </if>
         <if test="openStatus != null">
             and hei.open_status =#{openStatus}

+ 46 - 0
service-manage/src/main/java/com/simuwang/manage/api/product/ProductController.java

@@ -0,0 +1,46 @@
+package com.simuwang.manage.api.product;
+
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.pojo.dto.query.ProductPageQuery;
+import com.simuwang.base.pojo.vo.ProductInformationVO;
+import com.simuwang.logging.SystemLog;
+import com.simuwang.manage.service.ProductService;
+import com.simuwang.manage.service.impl.DistributionServiceImpl;
+import com.smppw.common.pojo.ResultVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+@SystemLog(value = "产品要素管理")
+@RestController
+@RequestMapping("/v1/product")
+public class ProductController {
+    @Autowired
+    public ProductService productService;
+
+    /**
+     * 查询基金要素列表
+     * @param prductPageQuery
+     * @return
+     */
+    @SystemLog(value = "查询基金要素列表")
+    @GetMapping("/product-list")
+    public MybatisPage<ProductInformationVO> searchProductList(ProductPageQuery prductPageQuery){
+        MybatisPage<ProductInformationVO> result = productService.searchProductList(prductPageQuery);
+        return result;
+    }
+
+    /**
+     * 上传产品要素
+     *
+     * @param file
+     * @return
+     */
+    @SystemLog(value = "上传产品要素", type = SystemLog.Type.UPLOAD_OR_IMPORT)
+    @PostMapping("upload")
+    public ResultVo uploadProduct(@RequestPart(value = "file") MultipartFile file) {
+        return productService.uploadProduct(file);
+    }
+}

+ 13 - 0
service-manage/src/main/java/com/simuwang/manage/service/ProductService.java

@@ -0,0 +1,13 @@
+package com.simuwang.manage.service;
+
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.pojo.dto.query.ProductPageQuery;
+import com.simuwang.base.pojo.vo.ProductInformationVO;
+import com.smppw.common.pojo.ResultVo;
+import org.springframework.web.multipart.MultipartFile;
+
+public interface ProductService {
+    MybatisPage<ProductInformationVO> searchProductList(ProductPageQuery prductPageQuery);
+
+    ResultVo uploadProduct(MultipartFile file);
+}

+ 243 - 0
service-manage/src/main/java/com/simuwang/manage/service/impl/ProductServiceImpl.java

@@ -0,0 +1,243 @@
+package com.simuwang.manage.service.impl;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.read.listener.PageReadListener;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.simuwang.base.common.conts.ExcelConst;
+import com.simuwang.base.common.enums.DistributeType;
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.common.util.DateUtils;
+import com.simuwang.base.common.util.StringUtil;
+import com.simuwang.base.mapper.daq.ProductInformationMapper;
+import com.simuwang.base.pojo.dos.FundAliasDO;
+import com.simuwang.base.pojo.dos.ProductInformationDO;
+import com.simuwang.base.pojo.dto.*;
+import com.simuwang.base.pojo.dto.query.ProductPageQuery;
+import com.simuwang.base.pojo.vo.*;
+import com.simuwang.manage.service.ProductService;
+import com.simuwang.shiro.utils.UserUtils;
+import com.smppw.common.pojo.ResultVo;
+import com.smppw.common.pojo.enums.status.ResultCode;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Service
+public class ProductServiceImpl implements ProductService {
+    @Autowired
+    private ProductInformationMapper productInformationMapper;
+
+    private static final Logger logger = LoggerFactory.getLogger(ProductServiceImpl.class);
+    @Value("${email.file.path}")
+    private String path;
+    @Override
+    public MybatisPage<ProductInformationVO> searchProductList(ProductPageQuery productPageQuery) {
+        List<ProductInformationDO> productInformationDOList = productInformationMapper.searchProductList(productPageQuery);
+        List<ProductInformationVO> productInformationVOList =  productInformationDOList.stream().map(ProductInformationDO::toVO).collect(Collectors.toList());
+        long total = productInformationMapper.countProductList(productPageQuery);
+        return MybatisPage.of(total,productInformationVOList);
+    }
+
+    @Override
+    public ResultVo uploadProduct(MultipartFile excelFile) {
+        ResultVo vo = new ResultVo(ResultCode.SUCCESS);
+        File file = null;
+        try{
+            InputStream inputStream = excelFile.getInputStream();
+            file = new File(path+"/upload/"+ System.currentTimeMillis()+"/"+excelFile.getOriginalFilename());
+            FileUtils.copyInputStreamToFile(inputStream,file);
+            ProductData productData = parseProductFile(file);
+            vo.setData(parseResult(productData));
+        }catch (Exception e){
+            logger.error(e.getMessage(),e);
+            vo.setMsg("文件解析异常");
+            vo.setData(false);
+            return vo;
+        }
+
+        return vo;
+    }
+
+    private ProductUploadResult parseResult(ProductData productData) {
+        ProductUploadResult result = new ProductUploadResult();
+        int productStartRow = 8;
+        List<ProductExcelSuccessDataVO> successDataVOList = new ArrayList<>();
+        List<ProductExcelFailDataVO> excelFailDataVOList = new ArrayList<>();
+        List<ProductInformationData> productInformationDataList = productData.getProductInformationDataList();
+        saveProductInformation(productInformationDataList,successDataVOList,excelFailDataVOList,productStartRow);
+        result.setSuccess(successDataVOList);
+        result.setFail(excelFailDataVOList);
+        result.setTotal(successDataVOList.size()+excelFailDataVOList.size());
+        result.setFailCount(excelFailDataVOList.size());
+        result.setSuccessCount(successDataVOList.size());
+        return result;
+    }
+
+    private void saveProductInformation(List<ProductInformationData> productInformationDataList, List<ProductExcelSuccessDataVO> successDataVOList, List<ProductExcelFailDataVO> excelFailDataVOList, int productStartRow) {
+        for (int idx =0;idx< productInformationDataList.size();idx++) {
+            ProductInformationData productInformationData = productInformationDataList.get(idx);
+            if(StringUtil.isEmpty(productInformationData.getId())){
+                continue;
+            }
+            if(!isNumber(productInformationData.getId())){
+                continue;
+            }
+            if(StringUtil.isEmpty(productInformationData.getRegisterNumber()) && StringUtil.isEmpty(productInformationData.getProductName())){
+                ProductExcelFailDataVO failDataVO = toExcelFailDataVO(ExcelConst.PRODUCT_SHEET_NAME,ExcelConst.DELETION_NAME_REGISTERENUMBER,idx+productStartRow);
+                excelFailDataVOList.add(failDataVO);
+                continue;
+            }
+            try{
+                Date date = DateUtils.parse(productInformationData.getInceptionDate(),DateUtils.YYYY_MM_DD);
+                if(date.after(new Date())){
+                    ProductExcelFailDataVO failDataVO = toExcelFailDataVO(ExcelConst.PRODUCT_SHEET_NAME,ExcelConst.ERROR_INCEPTION_DATE,idx+productStartRow);
+                    excelFailDataVOList.add(failDataVO);
+                    continue;
+                }
+            }catch (Exception e){
+                ProductExcelFailDataVO failDataVO = toExcelFailDataVO(ExcelConst.PRODUCT_SHEET_NAME,ExcelConst.ERROR_DATE_FORMAT,idx+productStartRow);
+                excelFailDataVOList.add(failDataVO);
+                continue;
+            }
+            ProductInformationDO productInformationDO = toProductDO(productInformationData);
+            ProductInformationDO oldProductInformationDO = productInformationMapper.selectByNameAndRegisterNumber(productInformationDO);
+            if(oldProductInformationDO != null){
+                productInformationDO.setId(oldProductInformationDO.getId());
+            }else{
+                productInformationDO.setCreatetime(new Date());
+                productInformationDO.setCreatorid(UserUtils.getLoginUser().getUserId());
+            }
+            try{
+                productInformationMapper.insertOrUpdate(productInformationDO);
+            }catch (Exception e){
+                logger.error(e.getMessage(),e);
+                ProductExcelFailDataVO failDataVO = toExcelFailDataVO(ExcelConst.PRODUCT_SHEET_NAME,ExcelConst.SAVE_FAIL,idx+productStartRow);
+                excelFailDataVOList.add(failDataVO);
+                continue;
+            }
+            ProductExcelSuccessDataVO successDataVO = new ProductExcelSuccessDataVO();
+            successDataVO.setRowNum(idx+productStartRow);
+            successDataVO.setSheet(ExcelConst.PRODUCT_SHEET_NAME);
+            successDataVO.setParseStatus(ExcelConst.SUCCESS);
+            successDataVOList.add(successDataVO);
+        }
+    }
+
+    private ProductInformationDO toProductDO(ProductInformationData productInformationData) {
+        ProductInformationDO productInformationDO = new ProductInformationDO();
+        productInformationDO.setProductName(productInformationData.getProductName());
+        productInformationDO.setRegisterNumber(productInformationData.getRegisterNumber());
+        productInformationDO.setAssetFrequency(productInformationData.getAssetFrequency());
+        productInformationDO.setNavFrequency(productInformationData.getNavFrequency());
+        productInformationDO.setFirstStrategy(productInformationData.getFirstStrategy());
+        productInformationDO.setSecondStrategy(productInformationData.getSecondStrategy());
+        productInformationDO.setThirdStrategy(productInformationData.getThirdStrategy());
+        productInformationDO.setInceptionDate(productInformationData.getInceptionDate());
+        productInformationDO.setInvestmentManager(productInformationData.getInvestmentManager());
+        productInformationDO.setInvestmentStrategyDesc(productInformationData.getInvestmentStrategyDesc());
+        productInformationDO.setReportFrequency(productInformationData.getReportFrequency());
+        productInformationDO.setRemark(productInformationData.getRemark());
+        productInformationDO.setMsLabel(productInformationDO.getMsLabel());
+        productInformationDO.setStartDate(productInformationData.getStartDate());
+        productInformationDO.setLiquidateDate(productInformationData.getLiquidateDate());
+        productInformationDO.setIsStruct(productInformationData.getIsStruct());
+        productInformationDO.setUpdatetime(new Date());
+        productInformationDO.setUpdaterid(UserUtils.getLoginUser().getUserId());
+        productInformationDO.setIsvalid(1);
+        return productInformationDO;
+    }
+
+    public static boolean isNumber(String str) {
+        if (StringUtils.isEmpty(str)) {
+            return false;
+        }
+        if ("%".equals(str)) {
+            return true;
+        }
+        str = str.replace(",", "").replace(",", "");
+        //容许没有整数部分 eg:.2
+        String regex = "^-?(\\d+)?(\\.)?\\d+%?$";
+
+        boolean judge = str.matches(regex);
+        // 非常规数值,可能为科学计数法
+        if (!judge) {
+            try {
+                String plainString = new BigDecimal(str).toPlainString();
+            } catch (Exception e) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private ProductExcelFailDataVO toExcelFailDataVO(String sheetName, String msg,Integer rowNum) {
+        ProductExcelFailDataVO failDataVO = new ProductExcelFailDataVO();
+        failDataVO.setFailReason(msg);
+        failDataVO.setRowNum(rowNum);
+        failDataVO.setSheet(sheetName);
+        return failDataVO;
+    }
+
+    private ProductData parseProductFile(File file) {
+        // 创建一个 list 存储每行的数据,即 ExcelData 对象
+        List<ProductInformationData> productInformationDataList = new ArrayList<>();
+        // 直接使用 EasyExcel 的 read 方法,同时定义表头的类型,以便将列中数据映射为 ExcelData 对象
+        EasyExcel.read(file, ProductInformationData.class, new PageReadListener<ProductInformationData>(dataList -> {
+            // 并且每行数据,并将其 add 至 list 中
+            for (ProductInformationData excelData : dataList) {
+                if (excelData != null) {
+                    productInformationDataList.add(excelData);
+                }
+            }
+        })).excelType(ExcelTypeEnum.XLSX).sheet(0).headRowNumber(8).doRead();
+
+        List<ProductContractData> productContractDataList = new ArrayList<>();
+        EasyExcel.read(file, ProductContractData.class, new PageReadListener<ProductContractData>(dataList -> {
+            // 并且每行数据,并将其 add 至 list 中
+            for (ProductContractData excelData : dataList) {
+                if (excelData != null) {
+                    productContractDataList.add(excelData);
+                }
+            }
+        })).excelType(ExcelTypeEnum.XLSX).sheet(1).headRowNumber(8).doRead();
+
+        List<ProductDerivativeData> productDerivativeDataList = new ArrayList<>();
+        EasyExcel.read(file, ProductDerivativeData.class, new PageReadListener<ProductDerivativeData>(dataList -> {
+            // 并且每行数据,并将其 add 至 list 中
+            for (ProductDerivativeData excelData : dataList) {
+                if (excelData != null) {
+                    productDerivativeDataList.add(excelData);
+                }
+            }
+        })).excelType(ExcelTypeEnum.XLSX).sheet(2).headRowNumber(8).doRead();
+
+        List<InvestmentManagerData> investmentManagerDataList = new ArrayList<>();
+        EasyExcel.read(file, InvestmentManagerData.class, new PageReadListener<InvestmentManagerData>(dataList -> {
+            // 并且每行数据,并将其 add 至 list 中
+            for (InvestmentManagerData excelData : dataList) {
+                if (excelData != null) {
+                    investmentManagerDataList.add(excelData);
+                }
+            }
+        })).excelType(ExcelTypeEnum.XLSX).sheet(3).headRowNumber(3).doRead();
+        ProductData productData = new ProductData();
+        productData.setProductInformationDataList(productInformationDataList);
+        productData.setProductContractDataList(productContractDataList);
+        productData.setProductDerivativeDataList(productDerivativeDataList);
+        productData.setInvestmentManagerDataList(investmentManagerDataList);
+        return productData;
+    }
+}