|
|
@@ -174,7 +174,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setAgreementId(insFeeOrderNew.getAgreementId());
|
|
|
insPlyIncome.setLicenseno(order.getLicenseno());
|
|
|
insPlyIncome.setTaxamount(insAreaCompany.getTaxamount());
|
|
|
- insPlyIncome.setCreateTime(LocalDateTime.now());
|
|
|
+ insPlyIncome.setCreateTime(LocalDate.now());
|
|
|
insPlyIncome.setDocumentaryFeesStatus("0");
|
|
|
insPlyIncome.setHandlingFeesStatus("0");
|
|
|
insPlyIncome.setNoNoTaxPremium(insPlyIncome.getNoNoTaxPremium());
|
|
|
@@ -203,7 +203,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setAgreementId(insFeeOrderNew.getAgreementId());
|
|
|
insPlyIncome.setLicenseno(order.getLicenseno());
|
|
|
insPlyIncome.setTaxamount(insAreaCompany.getTaxamount());
|
|
|
- insPlyIncome.setCreateTime(LocalDateTime.now());
|
|
|
+ insPlyIncome.setCreateTime(LocalDate.now());
|
|
|
insPlyIncome.setDocumentaryFeesStatus("0");
|
|
|
insPlyIncome.setHandlingFeesStatus("0");
|
|
|
insPlyIncome.setIsNotCar("1");
|
|
|
@@ -225,7 +225,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
|
|
|
|
|
|
InsPlyIncome insPlyIncome = new InsPlyIncome(insFeeOrderNew.getId(),insAreaCompany.getJqpolicyno(),insAreaCompany.getSypolicyno(),null,null,insFeeOrderNew.getDeptId(),null,order.getProductid(),insAreaCompany.getPayDate(),insAreaCompany.getSigningTime(),insAreaCompany.getCompanyId(),null,insFeeOrderNew.getAgreementId(),order.getLicenseno(),insAreaCompany.getTaxamount(),
|
|
|
- allNoTaxPremium,null,otherProportion,null,otherAmount,otherAmount,null,null,LocalDateTime.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");
|
|
|
|
|
|
insPlyIncome.setTaxPremium(allPremium);
|
|
|
insPlyIncome.setJqPremium(insFeeOrderNew.getJqPremium());
|
|
|
@@ -248,7 +248,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
BigDecimal handlingProportion = this.calculateTotal(insFeeOrderNew.getJqSuperviseCostsProportion(), insFeeOrderNew.getSySuperviseCostsProportion(),null);
|
|
|
BigDecimal allNoTaxPremium = this.calculateTotal(insFeeOrderNew.getJqNoTaxPremium(), insFeeOrderNew.getSyNoTaxPremium(), null);//不含税保费
|
|
|
InsPlyIncome insPlyIncome = new InsPlyIncome(insFeeOrderNew.getId(),insAreaCompany.getJqpolicyno(),insAreaCompany.getSypolicyno(),null,null,insFeeOrderNew.getDeptId(),null,order.getProductid(),insAreaCompany.getPayDate(),insAreaCompany.getSigningTime(),insAreaCompany.getCompanyId(),null,insFeeOrderNew.getAgreementId(),order.getLicenseno(),insAreaCompany.getTaxamount()
|
|
|
- ,allNoTaxPremium,handlingProportion,null,handlingAmount,null,handlingAmount,null,null,LocalDateTime.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);
|
|
|
insPlyIncome.setJqPremium(insFeeOrderNew.getJqPremium());
|
|
|
insPlyIncome.setSyPremium(insFeeOrderNew.getSyPremium());
|
|
|
@@ -309,7 +309,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
InsPlyIncome insPlyIncome = new InsPlyIncome(insFeeOrderNew.getId(),insAreaCompany.getJqpolicyno(),insAreaCompany.getSypolicyno(),
|
|
|
noPolicyno,null,insFeeOrderNew.getDeptId(), null,order.getProductid(),insAreaCompany.getPayDate(),insAreaCompany.getSigningTime(),insAreaCompany.getCompanyId(),
|
|
|
null,insFeeOrderNew.getAgreementId(),order.getLicenseno(),insAreaCompany.getTaxamount(),allNoTaxPremium,handlingProportion,
|
|
|
- otherProportion,handlingAmount,otherAmount,allAmount,null,null,LocalDateTime.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.setSyReceivableProportion(syReceivableProportion);
|
|
|
insPlyIncome.setNoReceivableProportion(noReceivableProportion);
|
|
|
@@ -411,11 +411,12 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
InsPlyIncome noTotalAmount =baseMapper.totalAmount(params);
|
|
|
if(ObjectUtils.isNotEmpty(totalledAmount) && ObjectUtils.isNotEmpty(noTotalAmount)){
|
|
|
totalledAmount.setReadyTotalFeevalue(noTotalAmount.getTotalFeevalue());
|
|
|
- totalledAmount.setReadyCommissionFeevalue(noTotalAmount.getReadyCommissionFeevalue());
|
|
|
+ totalledAmount.setReadyCommissionFeevalue(noTotalAmount.getCommissionFeevalue());
|
|
|
totalledAmount.setReadyOtherFeevalue(noTotalAmount.getOtherFeevalue());
|
|
|
return totalledAmount;
|
|
|
}
|
|
|
- return totalledAmount;
|
|
|
+
|
|
|
+ return new InsPlyIncome();
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -426,7 +427,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
List<InsPlyIncome> list= this.baseMapper.queryNew(params);
|
|
|
for (InsPlyIncome item : list) {
|
|
|
item.setHandlingFeesStatus("1");
|
|
|
- item.setSettlementTime(LocalDateTime.now());
|
|
|
+ item.setSettlementTime(LocalDate.now());
|
|
|
baseMapper.updateById(item);
|
|
|
}
|
|
|
SettlementDocumentaryLogEntity settlementDocumentaryLogEntity = new SettlementDocumentaryLogEntity();
|
|
|
@@ -489,9 +490,6 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getNoPolicyno())){
|
|
|
params.put("noPolicyno",insPlyIncomeVo.getNoPolicyno().split(","));
|
|
|
}
|
|
|
- if(insPlyIncomeVo.getSigndate()!=null){
|
|
|
- params.put("signdate",insPlyIncomeVo.getSigndate());
|
|
|
- }
|
|
|
if(insPlyIncomeVo.getCreateTime()!=null){
|
|
|
params.put("createTime",insPlyIncomeVo.getCreateTime());
|
|
|
}
|
|
|
@@ -513,6 +511,12 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getDay())){
|
|
|
params.put("day",insPlyIncomeVo.getDay());
|
|
|
}
|
|
|
+ if(StringUtils.isNotEmpty(insPlyIncomeVo.getSignDateEnd())){
|
|
|
+ params.put("signDateEnd",insPlyIncomeVo.getSignDateEnd());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(insPlyIncomeVo.getSignDateStart())){
|
|
|
+ params.put("signDateStart",insPlyIncomeVo.getSignDateStart());
|
|
|
+ }
|
|
|
return params;
|
|
|
}
|
|
|
|
|
|
@@ -569,21 +573,28 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void importData(MultipartFile file, InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
+ public void importData(MultipartFile MultipartFile) {
|
|
|
List<InsPlyIncome> list = null;
|
|
|
+ HashMap<String, Object> params = new HashMap<>();
|
|
|
try {
|
|
|
- List<InsPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(file, InsPlyIncomeExcelDto.class, 0, 1, 1);
|
|
|
+ List<InsPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(MultipartFile, InsPlyIncomeExcelDto.class, 0, 1, 1);
|
|
|
for (InsPlyIncomeExcelDto excelItem : dtoList) {
|
|
|
+ params.clear();
|
|
|
String licenseno = excelItem.getLicenseno();//车牌号
|
|
|
+ params.put("licenseno",licenseno);
|
|
|
String policyno = excelItem.getPolicyno(); //交强保单号
|
|
|
+ params.put("policyno",policyno);
|
|
|
String syPolicyno = excelItem.getSyPolicyno(); //商业保单号
|
|
|
+ params.put("syPolicyno",syPolicyno);
|
|
|
String noPolicyno = excelItem.getNoPolicyno(); //非车保单号
|
|
|
-
|
|
|
+ params.put("noPolicyno",noPolicyno);
|
|
|
if(ObjectUtils.isNotEmpty(licenseno)){
|
|
|
- InsPlyIncome insPlyIncome=baseMapper.findByLicenseno(licenseno,policyno,syPolicyno,noPolicyno);
|
|
|
- if(ObjectUtils.isNotEmpty(insPlyIncome)){
|
|
|
- insPlyIncome.setHandlingFeesStatus("1"); //已结算
|
|
|
- baseMapper.updateById(insPlyIncome);
|
|
|
+ List<InsPlyIncome> insPlyIncome=baseMapper.findByLicenseno(params);
|
|
|
+ for (InsPlyIncome item : insPlyIncome) {
|
|
|
+ if(ObjectUtils.isNotEmpty(item)){
|
|
|
+ item.setHandlingFeesStatus("1"); //已结算
|
|
|
+ baseMapper.updateById(item);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -758,7 +769,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
String id = split[i];
|
|
|
InsPlyIncome insPlyIncome = baseMapper.selectById(id);
|
|
|
insPlyIncome.setDocumentaryFeesStatus("1"); //1 为跟单费已经结算
|
|
|
- insPlyIncome.setSettlementTime(LocalDateTime.now());
|
|
|
+ insPlyIncome.setSettlementTime(LocalDate.now());
|
|
|
baseMapper.updateById(insPlyIncome);
|
|
|
}
|
|
|
}
|
|
|
@@ -781,6 +792,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
public List<InsPlyIncome> totalBxAmount(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
params=this.saveParams(insPlyIncomeVo,params);
|
|
|
+ params.remove("handlingFeesStatus");
|
|
|
List<InsPlyIncome> resultList = baseMapper.totalBxAmount(params);
|
|
|
return resultList;
|
|
|
}
|
|
|
@@ -820,8 +832,8 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
String[] split = insPlyIncomeVo.getIds().split(",");
|
|
|
for(String id : split){
|
|
|
insPlyIncome.setId(id);
|
|
|
- insPlyIncome.setHandlingFeesStatus("2");
|
|
|
- insPlyIncome.setSettlementTime(LocalDateTime.now());
|
|
|
+ insPlyIncome.setHandlingFeesStatus("1");
|
|
|
+ insPlyIncome.setSettlementTime(LocalDate.now());
|
|
|
baseMapper.updateById(insPlyIncome);
|
|
|
}
|
|
|
|
|
|
@@ -865,7 +877,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setContractId(insPlyIncomeVo.getContractId()); // 合同id
|
|
|
insPlyIncome.setContractFileId(insPlyIncomeVo.getContractFileId());
|
|
|
insPlyIncome.setVoucherNumber(insPlyIncomeVo.getVoucherNumber());
|
|
|
- insPlyIncome.setSettlementTime(LocalDateTime.now());
|
|
|
+ insPlyIncome.setSettlementTime(LocalDate.now());
|
|
|
baseMapper.updateById(insPlyIncome);
|
|
|
}
|
|
|
}
|
|
|
@@ -967,5 +979,13 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
return HttpResult.ok("",uploadUrl + "excel/" + fileName);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public InsPlyIncome bxTotalAmount(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
+ HashMap<String, Object> params = new HashMap<>();
|
|
|
+ params = this.saveParams(insPlyIncomeVo, params);
|
|
|
+ InsPlyIncome totalledAmount =baseMapper.bxTotalAmount(params); //总金额
|
|
|
+ return totalledAmount;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|