Prechádzať zdrojové kódy

非系统保单导入

guoweisong 2 rokov pred
rodič
commit
9d9cd3915c

+ 60 - 0
src/main/java/com/ydtech/modules/fnc/controller/InsPlyMainController.java

@@ -0,0 +1,60 @@
+package com.ydtech.modules.fnc.controller;
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.fnc.entity.InsPlyMain;
+import com.ydtech.modules.fnc.service.InsPlyMainService;
+import com.ydtech.modules.fnc.vo.InsPlyMainVo;
+import com.ydtech.modules.order.entity.BasePageResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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;
+import org.springframework.web.multipart.MultipartFile;
+
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author gws
+ * @since 2024-01-23
+ */
+@Api(tags = "非系统出单保单管理")
+@RestController
+@RequestMapping("/fnc/plyMain")
+public class InsPlyMainController {
+
+    @Autowired
+    private InsPlyMainService insPlyMainService;
+
+    @ApiOperation(value = "保单导入")
+    @PostMapping("/import")
+    public HttpResult plyMainImport(MultipartFile file) {
+
+        HttpResult result = null;
+        try {
+            result = insPlyMainService.excelImport(file);
+        } catch (Exception e) {
+            result = HttpResult.error("保单导入失败!" + e.getMessage());
+            e.printStackTrace();
+        }
+        return result;
+    }
+    @ApiOperation(value = "导入保单查询")
+    @PostMapping("/query")
+    public HttpResult<BasePageResult<InsPlyMain>> query(@RequestBody InsPlyMainVo insPlyMainVo) {
+
+        HttpResult result = null;
+        try {
+            result = insPlyMainService.queryPly(insPlyMainVo);
+        } catch (Exception e) {
+            result = HttpResult.error("保单查询失败!" + e.getMessage());
+            e.printStackTrace();
+        }
+        return result;
+    }
+}

+ 18 - 0
src/main/java/com/ydtech/modules/fnc/dao/InsPlyMainMapper.java

@@ -0,0 +1,18 @@
+package com.ydtech.modules.fnc.dao;
+
+import com.ydtech.modules.fnc.entity.InsPlyMain;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author gws
+ * @since 2024-01-23
+ */
+@Mapper
+public interface InsPlyMainMapper extends BaseMapper<InsPlyMain> {
+
+}

+ 275 - 0
src/main/java/com/ydtech/modules/fnc/entity/InsPlyMain.java

@@ -0,0 +1,275 @@
+package com.ydtech.modules.fnc.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gws
+ * @since 2024-01-23
+ */
+@Getter
+@Setter
+@TableName("ins_ply_main")
+@ApiModel(value = "InsPlyMain对象", description = "")
+public class InsPlyMain implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+
+
+    @ApiModelProperty("批次号")
+    @Excel(name = "批次号")
+    @TableField("batchno")
+    private String batchno;
+
+    @ApiModelProperty("订单号")
+    @Excel(name = "订单号")
+    @TableField("orderno")
+    private String orderno;
+
+    @ApiModelProperty("保单号")
+    @Excel(name = "保单号")
+    @TableId("policyno")
+    private String policyno;
+
+    @ApiModelProperty("机构代码")
+    @Excel(name = "机构代码")
+    @TableField("dept_id")
+    private String deptId;
+
+    @ApiModelProperty("机构名称")
+    @Excel(name = "机构名称")
+    @TableField(exist = false)
+    private String deptName;
+
+    @ApiModelProperty("业务员工号")
+    @Excel(name = "业务员工号")
+    @TableField("user_id")
+    private String userId;
+
+    @Excel(name = "业务员姓名")
+    @TableField(exist = false)
+    private String userName;
+
+    @ApiModelProperty("险种")
+    @Excel(name = "险种")
+    @TableField("riskcode")
+    private String riskcode;
+
+    @ApiModelProperty("出单时间")
+    @Excel(name = "出单时间",format = "yyyy-MM-dd ",width = 15)
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField("pay_date")
+    private LocalDateTime payDate;
+
+    @ApiModelProperty("起保时间")
+    @Excel(name = "起保时间",format = "yyyy-MM-dd ",width = 15)
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField("start_date")
+    private LocalDateTime startDate;
+
+    @ApiModelProperty("终保时间")
+    @Excel(name = "终保时间",format = "yyyy-MM-dd ",width = 15)
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField("end_date")
+    private LocalDateTime endDate;
+
+    @ApiModelProperty("保险公司编码")
+    @Excel(name = "保险公司编码")
+    @TableField("company_id")
+    private String companyId;
+
+    @Excel(name = "保险公司名称")
+    @TableField(exist = false)
+    private String companyName;
+
+    @ApiModelProperty("协议号")
+    @Excel(name = "协议号")
+    @TableField("agreement_id")
+    private String agreementId;
+
+    @ApiModelProperty("车牌号")
+    @Excel(name = "车牌号")
+    @TableField("licenseno")
+    private String licenseno;
+
+    @ApiModelProperty("投保人")
+    @Excel(name = "投保人")
+    @TableField("applyname")
+    private String applyname;
+
+    @ApiModelProperty("投保人联系方式")
+    @Excel(name = "投保人联系方式")
+    @TableField("applyphone")
+    private String applyphone;
+
+    @ApiModelProperty("被保人")
+    @Excel(name = "被保人")
+    @TableField("insurername")
+    private String insurername;
+
+    @ApiModelProperty("被保人联系方式")
+    @Excel(name = "被保人联系方式")
+    @TableField("insurerphone")
+    private String insurerphone;
+
+    @ApiModelProperty("车船税")
+    @Excel(name = "车船税")
+    @TableField("taxamount")
+    private BigDecimal taxamount;
+
+    @ApiModelProperty("保费")
+    @Excel(name = "保费")
+    @TableField("premium")
+    private BigDecimal premium;
+
+    @ApiModelProperty("不含税保费")
+    @Excel(name = "不含税保费")
+    @TableField("no_tax_premium")
+    private BigDecimal noTaxPremium;
+
+    @ApiModelProperty("手续费费用比例(%)")
+    @Excel(name = "手续费费用比例(%)")
+    @TableField("commission_feerate")
+    private BigDecimal commissionFeerate;
+
+    @ApiModelProperty("其他费用比例(%)")
+    @Excel(name = "其他费用比例(%)")
+    @TableField("other_feerate")
+    private BigDecimal otherFeerate;
+
+    @ApiModelProperty("手续费费用")
+    @Excel(name = "手续费费用")
+    @TableField("commission_feevalue")
+    private BigDecimal commissionFeevalue;
+
+    @ApiModelProperty("其他费用")
+    @Excel(name = "其他费用")
+    @TableField("other_feevalue")
+    private BigDecimal otherFeevalue;
+
+    @ApiModelProperty("总费用")
+    @TableField("all_fee_value")
+    private BigDecimal allFeeValue;
+
+    @ApiModelProperty("一级机构管理费比例(%)")
+    @Excel(name = "一级机构管理费比例(%)")
+    @TableField("first_dept_proportion")
+    private BigDecimal firstDeptProportion;
+
+    @ApiModelProperty("一级机构管理费")
+    @Excel(name = "一级机构管理费")
+    @TableField("first_dept_premiums")
+    private BigDecimal firstDeptPremiums;
+
+    @ApiModelProperty("二级机构管理费比例(%)")
+    @Excel(name = "二级机构管理费比例(%)")
+    @TableField("second_dept_proportion")
+    private BigDecimal secondDeptProportion;
+
+    @ApiModelProperty("二级机构管理费")
+    @Excel(name = "二级机构管理费")
+    @TableField("second_dept_premiums")
+    private BigDecimal secondDeptPremiums;
+
+    @ApiModelProperty("三级机构管理费比例(%)")
+    @Excel(name = "三级机构管理费比例(%)")
+    @TableField("third_dept_proportion")
+    private BigDecimal thirdDeptProportion;
+
+    @ApiModelProperty("三级机构管理费")
+    @Excel(name = "三级机构管理费")
+    @TableField("third_dept_premiums")
+    private BigDecimal thirdDeptPremiums;
+
+    @ApiModelProperty("四级机构管理费比例(%)")
+    @Excel(name = "四级机构管理费比例(%)")
+    @TableField("forth_dept_proportion")
+    private BigDecimal forthDeptProportion;
+
+    @ApiModelProperty("四级机构管理费")
+    @Excel(name = "四级机构管理费")
+    @TableField("forth_dept_premiums")
+    private BigDecimal forthDeptPremiums;
+
+    @ApiModelProperty("五级机构管理费比例(%)")
+    @Excel(name = "五级机构管理费比例(%)")
+    @TableField("fifth_dept_proportion")
+    private BigDecimal fifthDeptProportion;
+
+    @ApiModelProperty("五级机构管理费")
+    @Excel(name = "五级机构管理费")
+    @TableField("fifth_dept_premiums")
+    private BigDecimal fifthDeptPremiums;
+
+    @ApiModelProperty("一级分销费比例(%)")
+    @Excel(name = "一级分销费比例(%)")
+    @TableField("first_detail_proportion")
+    private BigDecimal firstDetailProportion;
+
+    @ApiModelProperty("一级分销费")
+    @Excel(name = "一级分销费")
+    @TableField("first_detail_premiums")
+    private BigDecimal firstDetailPremiums;
+
+    @ApiModelProperty("二级分销费比例(%)")
+    @Excel(name = "二级分销费比例(%)")
+    @TableField("second_detail_proportion")
+    private BigDecimal secondDetailProportion;
+
+    @ApiModelProperty("二级分销费")
+    @Excel(name = "二级分销费")
+    @TableField("second_detail_premiums")
+    private BigDecimal secondDetailPremiums;
+
+    @ApiModelProperty("三级分销费比例(%)")
+    @Excel(name = "三级分销费比例(%)")
+    @TableField("third_detail_proportion")
+    private BigDecimal thirdDetailProportion;
+
+    @ApiModelProperty("三级分销费")
+    @Excel(name = "三级分销费")
+    @TableField("third_detail_premiums")
+    private BigDecimal thirdDetailPremiums;
+
+    @ApiModelProperty("业务员结算比例(%)")
+    @Excel(name = "业务员结算比例(%)")
+    @TableField("user_fee_proportion")
+    private BigDecimal userFeeProportion;
+
+    @ApiModelProperty("业务员结算金额")
+    @Excel(name = "业务员结算金额")
+    @TableField("user_feel_premiums")
+    private BigDecimal userFeelPremiums;
+
+    @ApiModelProperty("导入人")
+    @TableField("creator")
+    private String creator;
+
+    @ApiModelProperty("导入时间")
+    @TableField("createtime")
+    private LocalDateTime createtime;
+
+    @ApiModelProperty("修改人")
+    @TableField("updateuser")
+    private String updateuser;
+
+    @ApiModelProperty("修改时间")
+    @TableField("updatetime")
+    private LocalDateTime updatetime;
+}

+ 24 - 0
src/main/java/com/ydtech/modules/fnc/service/InsPlyMainService.java

@@ -0,0 +1,24 @@
+package com.ydtech.modules.fnc.service;
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.fnc.entity.InsPlyMain;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ydtech.modules.fnc.vo.InsPlyMainVo;
+import com.ydtech.modules.order.entity.BasePageResult;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author gws
+ * @since 2024-01-23
+ */
+public interface InsPlyMainService extends IService<InsPlyMain> {
+    public HttpResult excelImport(MultipartFile file) throws Exception;
+
+    public HttpResult<BasePageResult<InsPlyMain>> queryPly(InsPlyMainVo insPlyMainVo);
+
+
+}

+ 3 - 3
src/main/java/com/ydtech/modules/fnc/service/impl/InsFeeAuditServiceImpl.java

@@ -272,7 +272,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
                 commission.setLevel("3");
                 commission.setAuditstatus("1");  //0未审核 1已审核
                 commission.setSettlestatus("0"); //0未结算 1已结算
-                commission.setInsuredtime(DateUtil.getDateFormat(new Date(),DateUtil.FULL_TIME_SPLIT_PATTERN)); //承保确认时间
+                commission.setInsuredtime(plyDto.getPayDate().toString()); //承保确认时间
                 if(StringUtils.isNotEmpty(plyDto.getJqpolicyno())){
                     commission.setPolicyno(plyDto.getJqpolicyno());
                     commission.setRiskcode("交强");
@@ -309,7 +309,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
                 commission.setLevel("2");
                 commission.setAuditstatus("1");  //0未审核 1已审核
                 commission.setSettlestatus("0"); //0未结算 1已结算
-                commission.setInsuredtime(DateUtil.getDateFormat(new Date(),DateUtil.FULL_TIME_SPLIT_PATTERN)); //承保确认时间
+                commission.setInsuredtime(plyDto.getPayDate().toString()); //承保确认时间
                 if(StringUtils.isNotEmpty(plyDto.getJqpolicyno())){
                     commission.setPolicyno(plyDto.getJqpolicyno());
                     commission.setRiskcode("交强");
@@ -345,7 +345,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
                 commission.setLevel("1");
                 commission.setAuditstatus("1");  //0未审核 1已审核
                 commission.setSettlestatus("0"); //0未结算 1已结算
-                commission.setInsuredtime(DateUtil.getDateFormat(new Date(),DateUtil.FULL_TIME_SPLIT_PATTERN)); //承保确认时间
+                commission.setInsuredtime(plyDto.getPayDate().toString()); //承保确认时间
                 if(StringUtils.isNotEmpty(plyDto.getJqpolicyno())){
                     commission.setPolicyno(plyDto.getJqpolicyno());
                     commission.setRiskcode("交强");

+ 446 - 0
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyMainServiceImpl.java

@@ -0,0 +1,446 @@
+package com.ydtech.modules.fnc.service.impl;
+
+import cn.afterturn.easypoi.excel.ExcelImportUtil;
+import cn.afterturn.easypoi.excel.entity.ImportParams;
+import cn.dev33.satoken.stp.StpUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ydtech.aop.exception.DescribeException;
+import com.ydtech.constants.SysConstants;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.admin.dao.SysDeptMapper;
+import com.ydtech.modules.admin.dao.SysUserMapper;
+import com.ydtech.modules.admin.model.SysDept;
+import com.ydtech.modules.admin.model.SysUser;
+import com.ydtech.modules.esm.dao.EsmInsCompanyMapper;
+import com.ydtech.modules.esm.model.EsmInsCompany;
+import com.ydtech.modules.esm.service.EsmUserReferrerService;
+import com.ydtech.modules.fnc.dao.InsPlyIncomeMapper;
+import com.ydtech.modules.fnc.entity.InsPlyIncome;
+import com.ydtech.modules.fnc.entity.InsPlyMain;
+import com.ydtech.modules.fnc.dao.InsPlyMainMapper;
+import com.ydtech.modules.fnc.service.InsPlyMainService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.modules.fnc.vo.InsPlyIncomeVo;
+import com.ydtech.modules.fnc.vo.InsPlyMainVo;
+import com.ydtech.modules.ins.model.InsCmain;
+import com.ydtech.modules.ins.model.InsCommission;
+import com.ydtech.modules.ins.model.InsCompanyFee;
+import com.ydtech.modules.ins.model.InsDeptFee;
+import com.ydtech.modules.ins.model.vo.InsCmainExcelVO;
+import com.ydtech.modules.ins.service.InsCommissionService;
+import com.ydtech.modules.ins.service.InsCompanyFeeService;
+import com.ydtech.modules.ins.service.InsDeptFeeService;
+import com.ydtech.modules.order.entity.BasePageResult;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsFeeOrder;
+import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.security.PubUserInfo;
+import com.ydtech.utils.BigDecimalUtils;
+import com.ydtech.utils.DateUtil;
+import com.ydtech.utils.StringUtils;
+import com.ydtech.utils.excel.ExcelUtils2;
+import org.jsoup.helper.DataUtil;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author gws
+ * @since 2024-01-23
+ */
+@Service
+public class InsPlyMainServiceImpl extends ServiceImpl<InsPlyMainMapper, InsPlyMain> implements InsPlyMainService {
+
+    @Autowired
+    private EsmInsCompanyMapper esmInsCompanyMapper;
+    @Autowired
+    private SysDeptMapper sysDeptMapper;
+    @Autowired
+    private SysUserMapper sysUserMapper;
+    @Autowired
+    private InsPlyIncomeMapper insPlyIncomeMapper;
+    @Autowired
+    private InsDeptFeeService insDeptFeeService;
+    @Autowired
+    private InsCommissionService insCommissionService;
+    @Autowired
+    private InsCompanyFeeService insCompanyFeeService;
+    @Autowired
+    private EsmUserReferrerService esmUserReferrerService;
+
+
+    public HttpResult<BasePageResult<InsPlyMain>> queryPly(InsPlyMainVo insPlyMainVo) {
+
+        try {
+            PageInfo<List<InsPlyMain>> pageHelper = null;
+            PageHelper.startPage(insPlyMainVo.getPageNum(), insPlyMainVo.getPageSize());
+            LambdaQueryWrapper<InsPlyMain> wrapper=new LambdaQueryWrapper<InsPlyMain>();
+            wrapper.eq(StringUtils.isNotEmpty(insPlyMainVo.getBatchno()),InsPlyMain::getBatchno,insPlyMainVo.getBatchno());
+            wrapper.eq(StringUtils.isNotEmpty(insPlyMainVo.getDeptId()),InsPlyMain::getDeptId,insPlyMainVo.getDeptId());
+            wrapper.eq(StringUtils.isNotEmpty(insPlyMainVo.getPolicyno()),InsPlyMain::getPolicyno,insPlyMainVo.getPolicyno());
+
+            List<InsPlyMain> list = this.baseMapper.selectList(wrapper);
+            pageHelper = new PageInfo(list);
+            BasePageResult<InsPlyMain> pageResult = new BasePageResult<InsPlyMain>(insPlyMainVo.getPageNum(), insPlyMainVo.getPageSize(), pageHelper.getTotal(), pageHelper.getPages(), list);
+            return HttpResult.ok(pageResult);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return HttpResult.error("查询异常");
+        }
+    }
+    /**
+     * 保单导入
+     *
+     * @param file    excel文件
+     * @return
+     */
+    @Transactional
+    @Override
+    public HttpResult excelImport(MultipartFile file) throws Exception {
+        String msg = "导入成功";
+        try {
+            List<InsPlyMain> insPlyMainList = ExcelUtils2.importExcel(file, 0, 1, InsPlyMain.class);
+
+            //  校验保单信息
+            Date date = new Date();
+            int count = 0;
+
+            String batchno = DateUtil.formatFullTime(LocalDateTime.now())+StpUtil.getLoginId().toString();
+            for (int i = 0; i < insPlyMainList.size(); i++) {
+                InsPlyMain excelVo = insPlyMainList.get(i);
+                /**
+                 * 1.校验是否为空
+                 */
+                isNullCmain(i, excelVo);
+               /**
+                 * 2.码值校验:保险公司、协议号、机构代码、业务员工号
+                 */
+                checkData(i, excelVo);
+                excelVo.setAllFeeValue(excelVo.getCommissionFeevalue().add(excelVo.getOtherFeevalue()));
+                excelVo.setBatchno(batchno);
+                excelVo.setCreator(StpUtil.getLoginId().toString());
+                excelVo.setCreatetime(LocalDateTime.now());
+                this.baseMapper.insert(excelVo);
+                //生成保司费用(应收费用)
+                gene_orderIncome(  excelVo);
+                //生成机构费用
+                gene_deptfee( excelVo);
+                //生成分销费用
+                saveRetail(excelVo);
+                //个代费用生成
+                saveInsCompanyFee(excelVo);
+                count++;
+            }
+
+            if (insPlyMainList.size() != count) {
+                throw new DescribeException("导入数据错误,应导入" + insPlyMainList.size() + "条数据,实际导入" + count + "条数据,请检查excel数据格式后重新导入或请联系相关人员!");
+            }
+            msg = "导入成功,批次号:"+batchno+"  成功导入<" + insPlyMainList.size() + ">条数据!";
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw e;
+        }
+        return HttpResult.ok(msg, null);
+    }
+
+    /**
+     * 生成保司费用(应收费用)
+
+     * @throws Exception
+     */
+    private void gene_orderIncome(InsPlyMain excelVo) throws Exception{
+
+        InsPlyIncome insPlyIncome =new InsPlyIncome();
+        insPlyIncome.setOrderno(excelVo.getOrderno());
+        insPlyIncome.setDeptId(excelVo.getDeptId());
+        insPlyIncome.setCompanyId(excelVo.getCompanyId());
+        insPlyIncome.setAgreementId(excelVo.getAgreementId());
+        insPlyIncome.setLicenseno(excelVo.getLicenseno());
+        insPlyIncome.setPayDate(StringUtils.isNullOrEmpty(excelVo.getPayDate())?excelVo.getCreatetime():excelVo.getPayDate());
+        insPlyIncome.setCreateTime(LocalDateTime.now() );
+        insPlyIncome.setPolicyno(excelVo.getPolicyno());
+        insPlyIncome.setRiskcode(excelVo.getRiskcode());
+        insPlyIncome.setTaxamount(excelVo.getTaxamount());
+        insPlyIncome.setNoTaxPremium(excelVo.getNoTaxPremium());
+        insPlyIncome.setCommissionFeerate(excelVo.getCommissionFeerate());
+        insPlyIncome.setOtherFeerate(excelVo.getOtherFeerate());
+        insPlyIncome.setCommissionFeevalue(excelVo.getCommissionFeevalue());
+        insPlyIncome.setOtherFeevalue(excelVo.getOtherFeevalue());
+        insPlyIncome.setAllFeeValue(excelVo.getAllFeeValue());
+        insPlyIncomeMapper.insert(insPlyIncome);
+
+    }
+    /**
+     * 生成机构费用
+     * @throws Exception
+     */
+    private void gene_deptfee( InsPlyMain excelVo) throws Exception{
+        InsDeptFee deptFee = new InsDeptFee();
+        deptFee.setOrderno(excelVo.getOrderno());
+        deptFee.setAgreeid(excelVo.getAgreementId());
+        deptFee.setAuditstatus("1");
+        deptFee.setSettlestatus("0");
+        deptFee.setInscompany(excelVo.getCompanyId());
+        deptFee.setPolicyno(excelVo.getPolicyno());
+        deptFee.setRiskcode(excelVo.getRiskcode());
+        deptFee.setLicenseno(excelVo.getLicenseno());
+        geneInsDeptFee(deptFee,excelVo);
+
+
+    }
+
+    private void geneInsDeptFee(InsDeptFee deptFee,InsPlyMain excelVo) {
+        if (excelVo.getFirstDeptPremiums().doubleValue() > 0) {
+            deptFee.setComcode(excelVo.getDeptId().substring(0, 2));  //99140302M01D01
+            deptFee.setKeeprate(excelVo.getFirstDeptProportion().doubleValue() );
+            deptFee.setKeepamount(excelVo.getFirstDeptPremiums().doubleValue());
+            deptFee.setComlevel("一级");
+            insDeptFeeService.insert(deptFee);
+        }
+        if (excelVo.getSecondDeptPremiums().doubleValue() > 0) {
+            deptFee.setComcode(excelVo.getDeptId().substring(0, 4));  //99140302M01D01
+            deptFee.setKeeprate(excelVo.getSecondDeptProportion().doubleValue() );
+            deptFee.setKeepamount(excelVo.getSecondDeptPremiums().doubleValue());
+            deptFee.setComlevel("二级");
+            insDeptFeeService.insert(deptFee);
+        }
+        if (excelVo.getThirdDeptPremiums().doubleValue() > 0) {
+            deptFee.setComcode(excelVo.getDeptId().substring(0, 6));  //99140302M01D01
+            deptFee.setKeeprate(excelVo.getThirdDeptProportion().doubleValue() );
+            deptFee.setKeepamount(excelVo.getThirdDeptPremiums().doubleValue());
+            deptFee.setComlevel("三级");
+            insDeptFeeService.insert(deptFee);
+        }
+        if (excelVo.getForthDeptPremiums().doubleValue() > 0) {
+            deptFee.setComcode(excelVo.getDeptId().substring(0, 8));  //99140302M01D01
+            deptFee.setKeeprate(excelVo.getForthDeptProportion().doubleValue() );
+            deptFee.setKeepamount(excelVo.getForthDeptPremiums().doubleValue());
+            deptFee.setComlevel("四级");
+            insDeptFeeService.insert(deptFee);
+        }
+        if (excelVo.getFifthDeptPremiums().doubleValue() > 0) {
+            deptFee.setComcode(excelVo.getDeptId().substring(0, 11));  //99140302M01D01
+            deptFee.setKeeprate(excelVo.getFifthDeptProportion().doubleValue() );
+            deptFee.setKeepamount(excelVo.getFifthDeptPremiums().doubleValue());
+            deptFee.setComlevel("五级");
+            insDeptFeeService.insert(deptFee);
+        }
+    }
+
+    /**
+     * 三级分销费用保存
+     *
+     * @return
+     */
+    public void saveRetail(InsPlyMain excelVo) throws Exception{
+        List<String> userlist=new ArrayList<>();
+        esmUserReferrerService.getUpUser(excelVo.getUserId(),userlist);
+
+        //userlist:包括本人在内向上所有人
+        if(userlist.size()-1>0){
+            if(userlist.size()-1>=1
+                    && excelVo.getThirdDetailProportion().doubleValue()>0)
+            {//三级分销
+                SysUser user=sysUserMapper.selectById(userlist.get(1));
+                InsCommission commission = new InsCommission();
+                commission.setOrderno(excelVo.getOrderno());
+                commission.setDeptid(excelVo.getDeptId());
+                commission.setDeptname(excelVo.getDeptName());
+                commission.setInscompany(excelVo.getCompanyId());
+                commission.setAgreeid(excelVo.getAgreementId());
+                commission.setRefereescode(user.getId());
+                commission.setRefereesname(user.getName());
+                commission.setLevel("3");
+                commission.setAuditstatus("1");  //0未审核 1已审核
+                commission.setSettlestatus("0"); //0未结算 1已结算
+                commission.setInsuredtime(excelVo.getPayDate().toString()); //承保确认时间
+                commission.setPolicyno(excelVo.getPolicyno());
+                commission.setRiskcode(excelVo.getRiskcode());
+                commission.setLicenseno(excelVo.getLicenseno());
+
+                commission.setCommissionrate(excelVo.getThirdDetailProportion().doubleValue());
+                commission.setCommissionamount(excelVo.getThirdDetailPremiums().doubleValue());
+                insCommissionService.insert(commission);
+
+            }
+            if(userlist.size()-1>=2
+                    &&excelVo.getSecondDetailPremiums().doubleValue()>0)
+            {//二级分销
+                SysUser user=sysUserMapper.selectById(userlist.get(1));
+                InsCommission commission = new InsCommission();
+                commission.setOrderno(excelVo.getOrderno());
+                commission.setDeptid(excelVo.getDeptId());
+                commission.setDeptname(excelVo.getDeptName());
+                commission.setInscompany(excelVo.getCompanyId());
+                commission.setAgreeid(excelVo.getAgreementId());
+                commission.setRefereescode(user.getId());
+                commission.setRefereesname(user.getName());
+                commission.setLevel("2");
+                commission.setAuditstatus("1");  //0未审核 1已审核
+                commission.setSettlestatus("0"); //0未结算 1已结算
+                commission.setInsuredtime(excelVo.getPayDate().toString()); //承保确认时间
+                commission.setPolicyno(excelVo.getPolicyno());
+                commission.setRiskcode(excelVo.getRiskcode());
+                commission.setLicenseno(excelVo.getLicenseno());
+
+                commission.setCommissionrate(excelVo.getSecondDetailProportion().doubleValue());
+                commission.setCommissionamount(excelVo.getSecondDetailPremiums().doubleValue());
+                insCommissionService.insert(commission);
+            }
+            if(userlist.size()-1>=3
+                    &&excelVo.getFirstDetailPremiums().doubleValue()>0)
+            {//一级分销
+                SysUser user=sysUserMapper.selectById(userlist.get(1));
+                InsCommission commission = new InsCommission();
+                commission.setOrderno(excelVo.getOrderno());
+                commission.setDeptid(excelVo.getDeptId());
+                commission.setDeptname(excelVo.getDeptName());
+                commission.setInscompany(excelVo.getCompanyId());
+                commission.setAgreeid(excelVo.getAgreementId());
+                commission.setRefereescode(user.getId());
+                commission.setRefereesname(user.getName());
+                commission.setLevel("1");
+                commission.setAuditstatus("1");  //0未审核 1已审核
+                commission.setSettlestatus("0"); //0未结算 1已结算
+                commission.setInsuredtime(excelVo.getPayDate().toString()); //承保确认时间
+                commission.setPolicyno(excelVo.getPolicyno());
+                commission.setRiskcode(excelVo.getRiskcode());
+                commission.setLicenseno(excelVo.getLicenseno());
+
+                commission.setCommissionrate(excelVo.getFirstDetailProportion().doubleValue());
+                commission.setCommissionamount(excelVo.getFirstDetailPremiums().doubleValue());
+                insCommissionService.insert(commission);
+            }
+        }
+    }
+
+
+    /**
+     * 生成个代费用
+     * @throws Exception
+     */
+    public void saveInsCompanyFee(InsPlyMain excelVo) throws Exception {
+
+        SysDept sysDept=sysDeptMapper.selectById(excelVo.getDeptId());
+        SysUser sysUser=sysUserMapper.selectById(excelVo.getUserId());
+
+        InsCompanyFee insCompanyFee = new InsCompanyFee();
+        insCompanyFee.setOrderno(excelVo.getOrderno());
+//        insCompanyFee.setFrameNo(excelVo.getFrameno());
+        insCompanyFee.setLicenseNo(excelVo.getLicenseno());
+        insCompanyFee.setInscompany(excelVo.getCompanyId());
+        insCompanyFee.setAgreeid(excelVo.getAgreementId());
+        insCompanyFee.setUserid(excelVo.getUserId());
+        insCompanyFee.setUsername(sysUser.getName());
+        insCompanyFee.setDeptid(excelVo.getDeptId());
+        insCompanyFee.setDeptname(sysDept.getName());
+        insCompanyFee.setSettletype("B");
+        insCompanyFee.setSettlestatus("0");
+        insCompanyFee.setCreatetime(DateUtil.getDateFormat(new Date(),DateUtil.FULL_TIME_SPLIT_PATTERN));
+
+        BigDecimal dept_rate=excelVo.getFirstDeptProportion()
+                .add(excelVo.getSecondDeptProportion())
+                .add(excelVo.getThirdDeptProportion())
+                .add(excelVo.getForthDeptProportion())
+                .add(excelVo.getFifthDeptProportion());
+        BigDecimal retail_rate=excelVo.getFirstDetailProportion()
+                .add(excelVo.getSecondDetailProportion())
+                .add(excelVo.getThirdDetailProportion());
+        insCompanyFee.setPolicyno(excelVo.getPolicyno());
+        insCompanyFee.setRiskcode(excelVo.getRiskcode());
+
+
+        if("交强".equals(excelVo.getRiskcode())){
+
+            //交强费用比例=总费用比例-五级机构管理费比例-三级分销比例
+            insCompanyFee.setFeerate(excelVo.getCommissionFeerate().add(excelVo.getOtherFeerate()).subtract(dept_rate).subtract(retail_rate).doubleValue());
+            insCompanyFee.setFeeamount(excelVo.getNoTaxPremium().multiply(new BigDecimal(insCompanyFee.getFeerate())).divide(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
+            insCompanyFee.setJqpremium(excelVo.getNoTaxPremium().doubleValue());
+            //保存业务员费用
+            insCompanyFeeService.insert(insCompanyFee);
+        }
+        if("商业".equals(excelVo.getRiskcode())){
+
+            //商业费用比例=总费用比例-五级机构管理费比例-三级分销比例
+            insCompanyFee.setDisrate(excelVo.getCommissionFeerate().add(excelVo.getOtherFeerate()).subtract(dept_rate).subtract(retail_rate).doubleValue());
+            insCompanyFee.setDisamount(excelVo.getNoTaxPremium().multiply(new BigDecimal(insCompanyFee.getDisrate())).divide(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
+            insCompanyFee.setSypremium(excelVo.getNoTaxPremium().doubleValue());
+            //保存业务员费用
+            insCompanyFeeService.insert(insCompanyFee);
+        }
+
+    }
+    private void isNullCmain(int i, InsPlyMain excelVo) {
+        if (StringUtils.isNullOrEmpty(excelVo.getOrderno())
+                ||StringUtils.isNullOrEmpty(excelVo.getPolicyno())
+                ||StringUtils.isNullOrEmpty(excelVo.getCompanyId())
+                ||StringUtils.isNullOrEmpty(excelVo.getDeptId())
+                ||StringUtils.isNullOrEmpty(excelVo.getUserId())
+                ||StringUtils.isNullOrEmpty(excelVo.getRiskcode())
+                ||StringUtils.isNullOrEmpty(excelVo.getLicenseno())
+                ||StringUtils.isNullOrEmpty(excelVo.getPayDate())
+                ||StringUtils.isNullOrEmpty(excelVo.getPremium())
+                ||StringUtils.isNullOrEmpty(excelVo.getTaxamount())
+                ||StringUtils.isNullOrEmpty(excelVo.getNoTaxPremium())
+                ||StringUtils.isNullOrEmpty(excelVo.getCommissionFeerate())
+                ||StringUtils.isNullOrEmpty(excelVo.getCommissionFeevalue())
+                ||StringUtils.isNullOrEmpty(excelVo.getOtherFeerate())
+                ||StringUtils.isNullOrEmpty(excelVo.getOtherFeevalue())
+                ||StringUtils.isNullOrEmpty(excelVo.getFirstDeptProportion())
+                ||StringUtils.isNullOrEmpty(excelVo.getFirstDeptPremiums())
+                ||StringUtils.isNullOrEmpty(excelVo.getSecondDeptProportion())
+                ||StringUtils.isNullOrEmpty(excelVo.getSecondDeptPremiums())
+                ||StringUtils.isNullOrEmpty(excelVo.getThirdDeptProportion())
+                ||StringUtils.isNullOrEmpty(excelVo.getThirdDeptPremiums())
+                ||StringUtils.isNullOrEmpty(excelVo.getForthDeptProportion())
+                ||StringUtils.isNullOrEmpty(excelVo.getForthDeptPremiums())
+                ||StringUtils.isNullOrEmpty(excelVo.getFifthDeptProportion())
+                ||StringUtils.isNullOrEmpty(excelVo.getFifthDeptPremiums())
+                ||StringUtils.isNullOrEmpty(excelVo.getFirstDetailProportion())
+                ||StringUtils.isNullOrEmpty(excelVo.getFirstDetailPremiums())
+                ||StringUtils.isNullOrEmpty(excelVo.getSecondDetailProportion())
+                ||StringUtils.isNullOrEmpty(excelVo.getSecondDetailPremiums())
+                ||StringUtils.isNullOrEmpty(excelVo.getThirdDetailProportion())
+                ||StringUtils.isNullOrEmpty(excelVo.getThirdDetailPremiums())
+                ||StringUtils.isNullOrEmpty(excelVo.getUserFeeProportion())
+                ||StringUtils.isNullOrEmpty(excelVo.getUserFeelPremiums())
+        ) {
+            throw new DescribeException("第" + (i + 1) + "行 必填字段 不可为空");
+        }
+    }
+    private void checkData(int i, InsPlyMain excelVo) {
+        EsmInsCompany esmInsCompany =esmInsCompanyMapper.selectById(excelVo.getCompanyId());
+        if(StringUtils.isNullOrEmpty(esmInsCompany)){
+            throw new DescribeException("第" + (i + 1) + "行 保司编码错误,请核对!");
+        }
+        SysDept sysDept=sysDeptMapper.selectById(excelVo.getDeptId());
+        if(StringUtils.isNullOrEmpty(sysDept)){
+            throw new DescribeException("第" + (i + 1) + "行 机构编码错误,请核对!");
+        }
+        SysUser sysUser=sysUserMapper.selectById(excelVo.getUserId());
+        if(StringUtils.isNullOrEmpty(sysUser)){
+            throw new DescribeException("第" + (i + 1) + "行 人员编码错误,请核对!");
+        }
+        if(!"交强".equals(excelVo.getRiskcode())&&!"商业".equals(excelVo.getRiskcode())){
+            throw new DescribeException("第" + (i + 1) + "行 险种错误,只能填写 【交强】、【商业】!");
+        }
+    }
+}

+ 49 - 0
src/main/java/com/ydtech/modules/fnc/vo/InsPlyMainVo.java

@@ -0,0 +1,49 @@
+package com.ydtech.modules.fnc.vo;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gws
+ * @since 2024-01-23
+ */
+@Data
+public class InsPlyMainVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(name = "批次号")
+    private String batchno;
+
+    @ApiModelProperty("保单号")
+    private String policyno;
+
+    @ApiModelProperty("机构")
+    private String deptId;
+
+    @ApiModelProperty(value = "每页页数")
+    @Min(value = 20, message = "页数最小为20")
+    @Max(value = 100, message = "页数最大为100")
+    private int pageSize=20;
+
+    @ApiModelProperty(value = "页数")
+    @Min(value = 1, message = "页数最小为1")
+    private int pageNum=1;
+}

+ 55 - 0
src/main/java/com/ydtech/modules/fnc/xml/InsPlyMainMapper.xml

@@ -0,0 +1,55 @@
+<?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.ydtech.modules.fnc.dao.InsPlyMainMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.ydtech.modules.fnc.entity.InsPlyMain">
+        <id column="policyno" property="policyno" />
+        <result column="batchno" property="batchno" />
+        <result column="orderno" property="orderno" />
+        <result column="dept_id" property="deptId" />
+        <result column="user_id" property="userId" />
+        <result column="riskcode" property="riskcode" />
+        <result column="pay_date" property="payDate" />
+        <result column="start_date" property="startDate" />
+        <result column="end_date" property="endDate" />
+        <result column="company_id" property="companyId" />
+        <result column="agreement_id" property="agreementId" />
+        <result column="licenseno" property="licenseno" />
+        <result column="applyname" property="applyname" />
+        <result column="applyphone" property="applyphone" />
+        <result column="insurername" property="insurername" />
+        <result column="insurerphone" property="insurerphone" />
+        <result column="taxamount" property="taxamount" />
+        <result column="premium" property="premium" />
+        <result column="no_tax_premium" property="noTaxPremium" />
+        <result column="commission_feerate" property="commissionFeerate" />
+        <result column="other_feerate" property="otherFeerate" />
+        <result column="commission_feevalue" property="commissionFeevalue" />
+        <result column="other_feevalue" property="otherFeevalue" />
+        <result column="all_fee_value" property="allFeeValue" />
+        <result column="first_dept_proportion" property="firstDeptProportion" />
+        <result column="first_dept_premiums" property="firstDeptPremiums" />
+        <result column="second_dept_proportion" property="secondDeptProportion" />
+        <result column="second_dept_premiums" property="secondDeptPremiums" />
+        <result column="third_dept_proportion" property="thirdDeptProportion" />
+        <result column="third_dept_premiums" property="thirdDeptPremiums" />
+        <result column="forth_dept_proportion" property="forthDeptProportion" />
+        <result column="forth_dept_premiums" property="forthDeptPremiums" />
+        <result column="fifth_dept_proportion" property="fifthDeptProportion" />
+        <result column="fifth_dept_premiums" property="fifthDeptPremiums" />
+        <result column="first_detail_proportion" property="firstDetailProportion" />
+        <result column="first_detail_premiums" property="firstDetailPremiums" />
+        <result column="second_detail_proportion" property="secondDetailProportion" />
+        <result column="second_detail_premiums" property="secondDetailPremiums" />
+        <result column="third_detail_proportion" property="thirdDetailProportion" />
+        <result column="third_detail_premiums" property="thirdDetailPremiums" />
+        <result column="user_fee_proportion" property="userFeeProportion" />
+        <result column="user_feel_premiums" property="userFeelPremiums" />
+        <result column="creator" property="creator" />
+        <result column="createtime" property="createtime" />
+        <result column="updateuser" property="updateuser" />
+        <result column="updatetime" property="updatetime" />
+    </resultMap>
+
+</mapper>

+ 2 - 0
src/main/java/com/ydtech/modules/ins/dao/InsCommissionDao.java

@@ -19,6 +19,8 @@ public interface InsCommissionDao {
 
     public double sumAmount(String whereCase, Object[] paramValues);
 
+    public double sumCommRate(String whereCase, Object[] paramValues);
+
     public PageResult selectPaging(int pageNumber, int pageSize, String whereCase, Object[] paramValues);
 
     public Integer insert(InsCommission model);

+ 6 - 0
src/main/java/com/ydtech/modules/ins/dao/impl/InsCommissionDaoImpl.java

@@ -106,7 +106,13 @@ public class InsCommissionDaoImpl implements InsCommissionDao {
 
         return jdbcTemplate.queryForObject(sql, paramValues, Double.class);
     }
+    public double sumCommRate(String whereCase, Object[] paramValues) {
+        String sql = "select IFNULL(sum(t.commissionrate),0) totalamount from ins_commission t " + whereCase;
 
+        JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
+
+        return jdbcTemplate.queryForObject(sql, paramValues, Double.class);
+    }
     public PageResult selectPaging(int pageNumber, int pageSize, String whereCase, Object[] paramValues) {
 
         Dialect dialect = Dialect.guessDialect(dataSource);

+ 3 - 2
src/main/java/com/ydtech/utils/excel/ExcelUtils2.java

@@ -221,9 +221,10 @@ public class ExcelUtils2 {
         ImportParams params = new ImportParams();
         params.setTitleRows(titleRows);
         params.setHeadRows(headerRows);
-        params.setSaveUrl("/home/server/upload/excel/");
+        //       params.setSaveUrl("/home/server/upload/excel/");
 //        params.setNeedSave(true);  //不保存
-        params.setNeedVerify(true);
+//        params.setNeedVerify(true);
+        params.setStartSheetIndex(0);
         try {
             return ExcelImportUtil.importExcel(inputStream, pojoClass, params);
         } catch (NoSuchElementException e) {

+ 55 - 0
src/main/resources/mapper/modules/fnc/InsPlyMainMapper.xml

@@ -0,0 +1,55 @@
+<?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.ydtech.modules.fnc.dao.InsPlyMainMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.ydtech.modules.fnc.entity.InsPlyMain">
+        <id column="policyno" property="policyno" />
+        <result column="batchno" property="batchno" />
+        <result column="orderno" property="orderno" />
+        <result column="dept_id" property="deptId" />
+        <result column="user_id" property="userId" />
+        <result column="riskcode" property="riskcode" />
+        <result column="pay_date" property="payDate" />
+        <result column="start_date" property="startDate" />
+        <result column="end_date" property="endDate" />
+        <result column="company_id" property="companyId" />
+        <result column="agreement_id" property="agreementId" />
+        <result column="licenseno" property="licenseno" />
+        <result column="applyname" property="applyname" />
+        <result column="applyphone" property="applyphone" />
+        <result column="insurername" property="insurername" />
+        <result column="insurerphone" property="insurerphone" />
+        <result column="taxamount" property="taxamount" />
+        <result column="premium" property="premium" />
+        <result column="no_tax_premium" property="noTaxPremium" />
+        <result column="commission_feerate" property="commissionFeerate" />
+        <result column="other_feerate" property="otherFeerate" />
+        <result column="commission_feevalue" property="commissionFeevalue" />
+        <result column="other_feevalue" property="otherFeevalue" />
+        <result column="all_fee_value" property="allFeeValue" />
+        <result column="first_dept_proportion" property="firstDeptProportion" />
+        <result column="first_dept_premiums" property="firstDeptPremiums" />
+        <result column="second_dept_proportion" property="secondDeptProportion" />
+        <result column="second_dept_premiums" property="secondDeptPremiums" />
+        <result column="third_dept_proportion" property="thirdDeptProportion" />
+        <result column="third_dept_premiums" property="thirdDeptPremiums" />
+        <result column="forth_dept_proportion" property="forthDeptProportion" />
+        <result column="forth_dept_premiums" property="forthDeptPremiums" />
+        <result column="fifth_dept_proportion" property="fifthDeptProportion" />
+        <result column="fifth_dept_premiums" property="fifthDeptPremiums" />
+        <result column="first_detail_proportion" property="firstDetailProportion" />
+        <result column="first_detail_premiums" property="firstDetailPremiums" />
+        <result column="second_detail_proportion" property="secondDetailProportion" />
+        <result column="second_detail_premiums" property="secondDetailPremiums" />
+        <result column="third_detail_proportion" property="thirdDetailProportion" />
+        <result column="third_detail_premiums" property="thirdDetailPremiums" />
+        <result column="user_fee_proportion" property="userFeeProportion" />
+        <result column="user_feel_premiums" property="userFeelPremiums" />
+        <result column="creator" property="creator" />
+        <result column="createtime" property="createtime" />
+        <result column="updateuser" property="updateuser" />
+        <result column="updatetime" property="updatetime" />
+    </resultMap>
+
+</mapper>

BIN
src/main/resources/template/policyImport.xlsx