|
@@ -2,11 +2,8 @@ package com.ydtech.modules.fnc.service.impl;
|
|
|
|
|
|
|
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
|
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
|
|
-import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
-import cn.hutool.core.text.StrBuilder;
|
|
|
|
|
-import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fasterxml.jackson.databind.JsonNode;
|
|
import com.fasterxml.jackson.databind.JsonNode;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
@@ -17,16 +14,13 @@ import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.base.controller.BaseController;
|
|
import com.ydtech.modules.base.controller.BaseController;
|
|
|
import com.ydtech.modules.esm.model.EsmInsCompany;
|
|
import com.ydtech.modules.esm.model.EsmInsCompany;
|
|
|
import com.ydtech.modules.esm.service.EsmInsCompanyService;
|
|
import com.ydtech.modules.esm.service.EsmInsCompanyService;
|
|
|
-import com.ydtech.modules.fnc.entity.*;
|
|
|
|
|
import com.ydtech.modules.fnc.dao.InsPlyIncomeMapper;
|
|
import com.ydtech.modules.fnc.dao.InsPlyIncomeMapper;
|
|
|
|
|
+import com.ydtech.modules.fnc.entity.*;
|
|
|
import com.ydtech.modules.fnc.service.*;
|
|
import com.ydtech.modules.fnc.service.*;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import com.ydtech.modules.fnc.vo.InsPlyIncomeVo;
|
|
import com.ydtech.modules.fnc.vo.InsPlyIncomeVo;
|
|
|
import com.ydtech.modules.fnc.vo.SettlementDocumentaryFeesVo;
|
|
import com.ydtech.modules.fnc.vo.SettlementDocumentaryFeesVo;
|
|
|
import com.ydtech.modules.ins.model.vo.res.*;
|
|
import com.ydtech.modules.ins.model.vo.res.*;
|
|
|
-import com.ydtech.modules.inv.model.InvChannelsExternalBillsDetails;
|
|
|
|
|
import com.ydtech.modules.inv.model.dto.*;
|
|
import com.ydtech.modules.inv.model.dto.*;
|
|
|
-import com.ydtech.modules.inv.model.excel.InvDisburseExcel;
|
|
|
|
|
import com.ydtech.modules.inv.utils.EasyExcelUtils;
|
|
import com.ydtech.modules.inv.utils.EasyExcelUtils;
|
|
|
import com.ydtech.modules.order.entity.BasePageResult;
|
|
import com.ydtech.modules.order.entity.BasePageResult;
|
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
@@ -42,11 +36,9 @@ import com.ydtech.utils.SnowFlakeUtil;
|
|
|
import com.ydtech.utils.StringOperations;
|
|
import com.ydtech.utils.StringOperations;
|
|
|
import com.ydtech.utils.excel.ExcelEasypoiUtils;
|
|
import com.ydtech.utils.excel.ExcelEasypoiUtils;
|
|
|
import com.ydtech.utils.excel.ExcelStyleUtil;
|
|
import com.ydtech.utils.excel.ExcelStyleUtil;
|
|
|
-import com.ydtech.utils.excel.ExcelUtils2;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.poi.ss.formula.functions.Now;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -55,11 +47,9 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
-import redis.clients.jedis.params.Params;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-import java.awt.image.BandedSampleModel;
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
import java.math.RoundingMode;
|
|
@@ -70,9 +60,6 @@ import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.YearMonth;
|
|
import java.time.YearMonth;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
-import java.util.concurrent.CompletableFuture;
|
|
|
|
|
-import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* <p>
|
|
* <p>
|
|
@@ -171,7 +158,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
}
|
|
}
|
|
|
insPlyIncome.setOtherFeevalue(insFeeOrderNew.getNoOtherCostsPremiums()); //非车跟单费
|
|
insPlyIncome.setOtherFeevalue(insFeeOrderNew.getNoOtherCostsPremiums()); //非车跟单费
|
|
|
insPlyIncome.setOtherFeerate(insFeeOrderNew.getNoOtherCostsProportion()); //非车跟单费用比例
|
|
insPlyIncome.setOtherFeerate(insFeeOrderNew.getNoOtherCostsProportion()); //非车跟单费用比例
|
|
|
- insPlyIncome.setDeptId(insFeeOrderNew.getDeptId());
|
|
|
|
|
|
|
+// insPlyIncome.setDeptId(insFeeOrderNew.getDeptId());
|
|
|
this.saveRiskCode(order.getProductid(),insPlyIncome);
|
|
this.saveRiskCode(order.getProductid(),insPlyIncome);
|
|
|
insPlyIncome.setPayDate(insAreaCompany.getPayDate());
|
|
insPlyIncome.setPayDate(insAreaCompany.getPayDate());
|
|
|
insPlyIncome.setSignDate(insAreaCompany.getSigningTime());
|
|
insPlyIncome.setSignDate(insAreaCompany.getSigningTime());
|
|
@@ -179,6 +166,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setAgreementId(insFeeOrderNew.getAgreementId());
|
|
insPlyIncome.setAgreementId(insFeeOrderNew.getAgreementId());
|
|
|
insPlyIncome.setLicenseno(order.getLicenseno());
|
|
insPlyIncome.setLicenseno(order.getLicenseno());
|
|
|
insPlyIncome.setTaxamount(insAreaCompany.getTaxamount());
|
|
insPlyIncome.setTaxamount(insAreaCompany.getTaxamount());
|
|
|
|
|
+ insPlyIncome.setNoTaxPremium(insFeeOrderNew.getNoNoTaxPremium());
|
|
|
insPlyIncome.setCreateTime(LocalDate.now());
|
|
insPlyIncome.setCreateTime(LocalDate.now());
|
|
|
insPlyIncome.setDocumentaryFeesStatus("0");
|
|
insPlyIncome.setDocumentaryFeesStatus("0");
|
|
|
insPlyIncome.setHandlingFeesStatus("0");
|
|
insPlyIncome.setHandlingFeesStatus("0");
|
|
@@ -191,7 +179,10 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setSyStartDate(insAreaCompany.getSyStartDate());
|
|
insPlyIncome.setSyStartDate(insAreaCompany.getSyStartDate());
|
|
|
insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
|
insPlyIncome.setAllFeeValue(insFeeOrderNew.getNoOtherCostsPremiums());
|
|
insPlyIncome.setAllFeeValue(insFeeOrderNew.getNoOtherCostsPremiums());
|
|
|
|
|
+ insPlyIncome.setNoOtherCostsPremium(insFeeOrderNew.getNoOtherCostsPremiums());
|
|
|
|
|
+ insPlyIncome.setNoOtherCostsProportion(insFeeOrderNew.getNoOtherCostsProportion());
|
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
|
|
|
+ this.getDeptId(insPlyIncome);
|
|
|
baseMapper.insert(insPlyIncome);
|
|
baseMapper.insert(insPlyIncome);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -205,7 +196,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setNoPolicyno(noPolicyno); // 非车保单号
|
|
insPlyIncome.setNoPolicyno(noPolicyno); // 非车保单号
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- insPlyIncome.setDeptId(insFeeOrderNew.getDeptId());
|
|
|
|
|
|
|
+// insPlyIncome.setDeptId(insFeeOrderNew.getDeptId());
|
|
|
this.saveRiskCode(order.getProductid(),insPlyIncome);
|
|
this.saveRiskCode(order.getProductid(),insPlyIncome);
|
|
|
insPlyIncome.setPayDate(insAreaCompany.getPayDate());
|
|
insPlyIncome.setPayDate(insAreaCompany.getPayDate());
|
|
|
insPlyIncome.setSignDate(insAreaCompany.getSigningTime());
|
|
insPlyIncome.setSignDate(insAreaCompany.getSigningTime());
|
|
@@ -227,6 +218,9 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setJqEndDate(insAreaCompany.getJqEndDate());
|
|
insPlyIncome.setJqEndDate(insAreaCompany.getJqEndDate());
|
|
|
insPlyIncome.setSyStartDate(insAreaCompany.getSyStartDate());
|
|
insPlyIncome.setSyStartDate(insAreaCompany.getSyStartDate());
|
|
|
insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
|
|
|
+ insPlyIncome.setNoSuperviseCostsPremiums(insFeeOrderNew.getNoSuperviseCostsPremiums());
|
|
|
|
|
+ insPlyIncome.setNoSuperviseCostsProportion(insFeeOrderNew.getNoSuperviseCostsProportion());
|
|
|
|
|
+ this.getDeptId(insPlyIncome);
|
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
|
|
|
|
|
|
baseMapper.insert(insPlyIncome);
|
|
baseMapper.insert(insPlyIncome);
|
|
@@ -259,7 +253,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
BigDecimal allPremium = this.calculateTotal(insFeeOrderNew.getJqPremium(), insFeeOrderNew.getSyPremium(), null);// 总保费
|
|
BigDecimal allPremium = this.calculateTotal(insFeeOrderNew.getJqPremium(), insFeeOrderNew.getSyPremium(), null);// 总保费
|
|
|
|
|
|
|
|
|
|
|
|
|
- InsPlyIncome insPlyIncome = new InsPlyIncome(insFeeOrderNew.getInsOrderNo(),insAreaCompany.getJqpolicyno(),insAreaCompany.getSypolicyno(),null,null,insFeeOrderNew.getDeptId(),null,order.getProductid(),insAreaCompany.getPayDate(),insAreaCompany.getSigningTime(),insAreaCompany.getCompanyId(),null,insFeeOrderNew.getAgreementId(),order.getLicenseno(),insAreaCompany.getTaxamount(),
|
|
|
|
|
|
|
+ InsPlyIncome insPlyIncome = new InsPlyIncome(insFeeOrderNew.getInsOrderNo(),insAreaCompany.getJqpolicyno(),insAreaCompany.getSypolicyno(),null,null,null,null,order.getProductid(),insAreaCompany.getPayDate(),insAreaCompany.getSigningTime(),insAreaCompany.getCompanyId(),null,insFeeOrderNew.getAgreementId(),order.getLicenseno(),insAreaCompany.getTaxamount(),
|
|
|
allNoTaxPremium,null,otherProportion,null,otherAmount,otherAmount,null,null,LocalDate.now(),null,null,null,"0","0","0","1");
|
|
allNoTaxPremium,null,otherProportion,null,otherAmount,otherAmount,null,null,LocalDate.now(),null,null,null,"0","0","0","1");
|
|
|
this.saveRiskCode(order.getProductid(),insPlyIncome);
|
|
this.saveRiskCode(order.getProductid(),insPlyIncome);
|
|
|
insPlyIncome.setTaxPremium(allPremium);
|
|
insPlyIncome.setTaxPremium(allPremium);
|
|
@@ -277,6 +271,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
|
insPlyIncome.setUserId(insFeeOrderNew.getUserId());
|
|
insPlyIncome.setUserId(insFeeOrderNew.getUserId());
|
|
|
insPlyIncome.setInsuredName(order.getInsuredname());
|
|
insPlyIncome.setInsuredName(order.getInsuredname());
|
|
|
|
|
+ this.getDeptId(insPlyIncome);
|
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
|
|
|
|
|
|
baseMapper.insert(insPlyIncome);
|
|
baseMapper.insert(insPlyIncome);
|
|
@@ -287,7 +282,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
BigDecimal handlingAmount = this.calculateTotal(insFeeOrderNew.getJqSuperviseCostsPremiums(), insFeeOrderNew.getSySuperviseCostsPremiums(),null);
|
|
BigDecimal handlingAmount = this.calculateTotal(insFeeOrderNew.getJqSuperviseCostsPremiums(), insFeeOrderNew.getSySuperviseCostsPremiums(),null);
|
|
|
BigDecimal handlingProportion = this.calculateTotal(insFeeOrderNew.getJqSuperviseCostsProportion(), insFeeOrderNew.getSySuperviseCostsProportion(),null);
|
|
BigDecimal handlingProportion = this.calculateTotal(insFeeOrderNew.getJqSuperviseCostsProportion(), insFeeOrderNew.getSySuperviseCostsProportion(),null);
|
|
|
BigDecimal allNoTaxPremium = this.calculateTotal(insFeeOrderNew.getJqNoTaxPremium(), insFeeOrderNew.getSyNoTaxPremium(), null);//不含税保费
|
|
BigDecimal allNoTaxPremium = this.calculateTotal(insFeeOrderNew.getJqNoTaxPremium(), insFeeOrderNew.getSyNoTaxPremium(), null);//不含税保费
|
|
|
- InsPlyIncome insPlyIncome = new InsPlyIncome(insFeeOrderNew.getInsOrderNo(),insAreaCompany.getJqpolicyno(),insAreaCompany.getSypolicyno(),null,null,insFeeOrderNew.getDeptId(),null,order.getProductid(),insAreaCompany.getPayDate(),insAreaCompany.getSigningTime(),insAreaCompany.getCompanyId(),null,insFeeOrderNew.getAgreementId(),order.getLicenseno(),insAreaCompany.getTaxamount()
|
|
|
|
|
|
|
+ InsPlyIncome insPlyIncome = new InsPlyIncome(insFeeOrderNew.getInsOrderNo(),insAreaCompany.getJqpolicyno(),insAreaCompany.getSypolicyno(),null,null,null,null,order.getProductid(),insAreaCompany.getPayDate(),insAreaCompany.getSigningTime(),insAreaCompany.getCompanyId(),null,insFeeOrderNew.getAgreementId(),order.getLicenseno(),insAreaCompany.getTaxamount()
|
|
|
,allNoTaxPremium,handlingProportion,null,handlingAmount,null,handlingAmount,null,null,LocalDate.now(),null,null,null,"0","0","0","0");
|
|
,allNoTaxPremium,handlingProportion,null,handlingAmount,null,handlingAmount,null,null,LocalDate.now(),null,null,null,"0","0","0","0");
|
|
|
BigDecimal allTaxPremium = this.calculateTotal(insFeeOrderNew.getJqPremium(), insFeeOrderNew.getSyPremium(), null);
|
|
BigDecimal allTaxPremium = this.calculateTotal(insFeeOrderNew.getJqPremium(), insFeeOrderNew.getSyPremium(), null);
|
|
|
insPlyIncome.setJqPremium(insFeeOrderNew.getJqPremium());
|
|
insPlyIncome.setJqPremium(insFeeOrderNew.getJqPremium());
|
|
@@ -307,6 +302,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setSyStartDate(insAreaCompany.getSyStartDate());
|
|
insPlyIncome.setSyStartDate(insAreaCompany.getSyStartDate());
|
|
|
insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
|
|
|
+ this.getDeptId(insPlyIncome);
|
|
|
baseMapper.insert(insPlyIncome);
|
|
baseMapper.insert(insPlyIncome);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -352,7 +348,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
|
|
|
|
|
String noPolicyno = this.setNoPolicyno(insAreaCompany);
|
|
String noPolicyno = this.setNoPolicyno(insAreaCompany);
|
|
|
InsPlyIncome insPlyIncome = new InsPlyIncome(insFeeOrderNew.getInsOrderNo(),insAreaCompany.getJqpolicyno(),insAreaCompany.getSypolicyno(),
|
|
InsPlyIncome insPlyIncome = new InsPlyIncome(insFeeOrderNew.getInsOrderNo(),insAreaCompany.getJqpolicyno(),insAreaCompany.getSypolicyno(),
|
|
|
- noPolicyno,null,insFeeOrderNew.getDeptId(), null,order.getProductid(),insAreaCompany.getPayDate(),insAreaCompany.getSigningTime(),insAreaCompany.getCompanyId(),
|
|
|
|
|
|
|
+ noPolicyno,null,null, null,order.getProductid(),insAreaCompany.getPayDate(),insAreaCompany.getSigningTime(),insAreaCompany.getCompanyId(),
|
|
|
null,insFeeOrderNew.getAgreementId(),order.getLicenseno(),insAreaCompany.getTaxamount(),allNoTaxPremium,handlingProportion,
|
|
null,insFeeOrderNew.getAgreementId(),order.getLicenseno(),insAreaCompany.getTaxamount(),allNoTaxPremium,handlingProportion,
|
|
|
otherProportion,handlingAmount,otherAmount,allAmount,null,null,LocalDate.now(),null,null,null,"0","0","0","0");
|
|
otherProportion,handlingAmount,otherAmount,allAmount,null,null,LocalDate.now(),null,null,null,"0","0","0","0");
|
|
|
insPlyIncome.setJqReceivableProportion(jqReceivableProportion);
|
|
insPlyIncome.setJqReceivableProportion(jqReceivableProportion);
|
|
@@ -379,12 +375,19 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setJqEndDate(StringOperations.emptyStringToNull(insAreaCompany.getJqEndDate()));
|
|
insPlyIncome.setJqEndDate(StringOperations.emptyStringToNull(insAreaCompany.getJqEndDate()));
|
|
|
insPlyIncome.setSyStartDate(StringOperations.emptyStringToNull(insAreaCompany.getSyStartDate()));
|
|
insPlyIncome.setSyStartDate(StringOperations.emptyStringToNull(insAreaCompany.getSyStartDate()));
|
|
|
insPlyIncome.setSyEndDate(StringOperations.emptyStringToNull(insAreaCompany.getSyEndDate()));
|
|
insPlyIncome.setSyEndDate(StringOperations.emptyStringToNull(insAreaCompany.getSyEndDate()));
|
|
|
|
|
+ this.getDeptId(insPlyIncome);
|
|
|
this.saveRiskCode(order.getProductid(),insPlyIncome);
|
|
this.saveRiskCode(order.getProductid(),insPlyIncome);
|
|
|
insPlyIncome.setInsuredName(order.getInsuredname());
|
|
insPlyIncome.setInsuredName(order.getInsuredname());
|
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
|
baseMapper.insert(insPlyIncome);
|
|
baseMapper.insert(insPlyIncome);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private void getDeptId(InsPlyIncome insPlyIncome) {
|
|
|
|
|
+ PtlAgreement ptlAgreement = ptlAgreementService.getById(insPlyIncome.getAgreementId());
|
|
|
|
|
+ String deptId = ptlAgreement.getDeptId();
|
|
|
|
|
+ insPlyIncome.setDeptId(deptId);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private void saveByCompanyId(InsFeeOrderNew insFeeOrderNew,String companyId, InsPlyIncome insPlyIncome) {
|
|
private void saveByCompanyId(InsFeeOrderNew insFeeOrderNew,String companyId, InsPlyIncome insPlyIncome) {
|
|
|
PtlAgreement ptlAgreementQueryVo = this.ptlAgreementService.getByAgreementIdNew(insFeeOrderNew.getAgreementId());
|
|
PtlAgreement ptlAgreementQueryVo = this.ptlAgreementService.getByAgreementIdNew(insFeeOrderNew.getAgreementId());
|
|
|
if(ObjectUtils.isNotEmpty(ptlAgreementQueryVo)){
|
|
if(ObjectUtils.isNotEmpty(ptlAgreementQueryVo)){
|
|
@@ -985,14 +988,34 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
params =this.saveParams(insPlyIncomeVo,params);
|
|
params =this.saveParams(insPlyIncomeVo,params);
|
|
|
List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(params);
|
|
List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(params);
|
|
|
|
|
|
|
|
- ExportParams exportParams = new ExportParams("保险跟单明细导出", null, ExcelType.HSSF);
|
|
|
|
|
- exportParams.setStyle(ExcelStyleUtil.class);
|
|
|
|
|
- List<BxOtherDetailsExcel> resultList = new ArrayList<>();
|
|
|
|
|
- for (InsPlyIncome item :insPlyIncomes){
|
|
|
|
|
- BxOtherDetailsExcel bxOtherDetailsExcel = new BxOtherDetailsExcel();
|
|
|
|
|
- BeanUtils.copyProperties(item, bxOtherDetailsExcel);
|
|
|
|
|
- resultList.add(bxOtherDetailsExcel);
|
|
|
|
|
|
|
+ String filePathName ="";
|
|
|
|
|
+ List<BxOtherDetailsNorExcel> resultNoList=new ArrayList<>();
|
|
|
|
|
+ List<BxOtherDetailsExcel> resultList=new ArrayList<>();
|
|
|
|
|
+ //判断是否是非车 1 是非车
|
|
|
|
|
+ if("1".equals(insPlyIncomeVo.getIsNotCar())){
|
|
|
|
|
+ filePathName="非车跟单明细导出";
|
|
|
|
|
+ ExportParams exportParams = new ExportParams("非车跟单明细", null, ExcelType.HSSF);
|
|
|
|
|
+ exportParams.setStyle(ExcelStyleUtil.class);
|
|
|
|
|
+ for (InsPlyIncome item :insPlyIncomes){
|
|
|
|
|
+ BxOtherDetailsNorExcel bxOtherDetailsNorExcel = new BxOtherDetailsNorExcel();
|
|
|
|
|
+ LocalDateTime signDate = item.getSignDate();
|
|
|
|
|
+ BeanUtils.copyProperties(item, bxOtherDetailsNorExcel);
|
|
|
|
|
+ bxOtherDetailsNorExcel.setSigndate(signDate);
|
|
|
|
|
+ resultNoList.add(bxOtherDetailsNorExcel);
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ filePathName="车险跟单明细导出";
|
|
|
|
|
+ ExportParams exportParams = new ExportParams("车险跟单明细", null, ExcelType.HSSF);
|
|
|
|
|
+ exportParams.setStyle(ExcelStyleUtil.class);
|
|
|
|
|
+ for (InsPlyIncome item :insPlyIncomes){
|
|
|
|
|
+ BxOtherDetailsExcel bxOtherDetailsExcel = new BxOtherDetailsExcel();
|
|
|
|
|
+ LocalDateTime signDate = item.getSignDate();
|
|
|
|
|
+ BeanUtils.copyProperties(item, bxOtherDetailsExcel);
|
|
|
|
|
+ bxOtherDetailsExcel.setSigndate(signDate);
|
|
|
|
|
+ resultList.add(bxOtherDetailsExcel);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
String uploadPath = this.uploadPath + "/excel/";
|
|
String uploadPath = this.uploadPath + "/excel/";
|
|
|
Path path = Paths.get(uploadPath);
|
|
Path path = Paths.get(uploadPath);
|
|
|
if (!Files.exists(path)) {
|
|
if (!Files.exists(path)) {
|
|
@@ -1002,7 +1025,12 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- String fileName = EasyExcelUtils.downExcel(uploadPath, "保险跟单明细导出", BxOtherDetailsExcel.class, resultList);
|
|
|
|
|
|
|
+ String fileName="";
|
|
|
|
|
+ if("1".equals(insPlyIncomeVo.getIsNotCar())){
|
|
|
|
|
+ fileName = EasyExcelUtils.downExcel(uploadPath, filePathName, BxSettlementFeesExcel.class, resultNoList);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ fileName = EasyExcelUtils.downExcel(uploadPath, filePathName, BxSettlementFeesExcel.class, resultList);
|
|
|
|
|
+ }
|
|
|
return HttpResult.ok("",uploadUrl + "excel/" + fileName);
|
|
return HttpResult.ok("",uploadUrl + "excel/" + fileName);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1694,15 +1722,34 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
params =this.saveParams(insPlyIncomeVo,params);
|
|
params =this.saveParams(insPlyIncomeVo,params);
|
|
|
List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(params);
|
|
List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(params);
|
|
|
|
|
|
|
|
- ExportParams exportParams = new ExportParams("保险手续费", null, ExcelType.HSSF);
|
|
|
|
|
- exportParams.setStyle(ExcelStyleUtil.class);
|
|
|
|
|
- List<BxSettlementFeesExcel> resultList = new ArrayList<>();
|
|
|
|
|
- for (InsPlyIncome item :insPlyIncomes){
|
|
|
|
|
- BxSettlementFeesExcel bxSettlementFeesExcel = new BxSettlementFeesExcel();
|
|
|
|
|
- LocalDateTime signDate = item.getSignDate();
|
|
|
|
|
- BeanUtils.copyProperties(item, bxSettlementFeesExcel);
|
|
|
|
|
- resultList.add(bxSettlementFeesExcel);
|
|
|
|
|
|
|
+ String filePathName ="";
|
|
|
|
|
+ List<BxSettlementFeesNorExcel> resultNoList=new ArrayList<>();
|
|
|
|
|
+ List<BxSettlementFeesExcel> resultList=new ArrayList<>();
|
|
|
|
|
+ //判断是否是非车 1 是非车
|
|
|
|
|
+ if("1".equals(insPlyIncomeVo.getIsNotCar())){
|
|
|
|
|
+ filePathName="非车手续费导出";
|
|
|
|
|
+ ExportParams exportParams = new ExportParams("非车手续费", null, ExcelType.HSSF);
|
|
|
|
|
+ exportParams.setStyle(ExcelStyleUtil.class);
|
|
|
|
|
+ for (InsPlyIncome item :insPlyIncomes){
|
|
|
|
|
+ BxSettlementFeesNorExcel bxSettlementFeesNorExcel = new BxSettlementFeesNorExcel();
|
|
|
|
|
+ LocalDateTime signDate = item.getSignDate();
|
|
|
|
|
+ BeanUtils.copyProperties(item, bxSettlementFeesNorExcel);
|
|
|
|
|
+ bxSettlementFeesNorExcel.setSigndate(signDate);
|
|
|
|
|
+ resultNoList.add(bxSettlementFeesNorExcel);
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ filePathName="车险手续费导出";
|
|
|
|
|
+ ExportParams exportParams = new ExportParams("车险手续费", null, ExcelType.HSSF);
|
|
|
|
|
+ exportParams.setStyle(ExcelStyleUtil.class);
|
|
|
|
|
+ for (InsPlyIncome item :insPlyIncomes){
|
|
|
|
|
+ BxSettlementFeesExcel bxSettlementFeesExcel = new BxSettlementFeesExcel();
|
|
|
|
|
+ LocalDateTime signDate = item.getSignDate();
|
|
|
|
|
+ BeanUtils.copyProperties(item, bxSettlementFeesExcel);
|
|
|
|
|
+ bxSettlementFeesExcel.setSigndate(signDate);
|
|
|
|
|
+ resultList.add(bxSettlementFeesExcel);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
String uploadPath = this.uploadPath + "/excel/";
|
|
String uploadPath = this.uploadPath + "/excel/";
|
|
|
Path path = Paths.get(uploadPath);
|
|
Path path = Paths.get(uploadPath);
|
|
|
if (!Files.exists(path)) {
|
|
if (!Files.exists(path)) {
|
|
@@ -1712,7 +1759,13 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- String fileName = EasyExcelUtils.downExcel(uploadPath, "保险手续费导出", BxSettlementFeesExcel.class, resultList);
|
|
|
|
|
|
|
+ String fileName="";
|
|
|
|
|
+ if("1".equals(insPlyIncomeVo.getIsNotCar())){
|
|
|
|
|
+ fileName = EasyExcelUtils.downExcel(uploadPath, filePathName, BxSettlementFeesExcel.class, resultNoList);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ fileName = EasyExcelUtils.downExcel(uploadPath, filePathName, BxSettlementFeesExcel.class, resultList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return HttpResult.ok("",uploadUrl + "excel/" + fileName);
|
|
return HttpResult.ok("",uploadUrl + "excel/" + fileName);
|
|
|
}
|
|
}
|
|
|
|
|
|