|
|
@@ -711,6 +711,9 @@ handlingProportion,
|
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getCreateTimeQuery())){
|
|
|
params.put("createTimeQuery", insPlyIncomeVo.getCreateTimeQuery());
|
|
|
}
|
|
|
+ if(StringUtils.isNotEmpty(insPlyIncomeVo.getSettlementDate())){
|
|
|
+ params.put("settlementDate", insPlyIncomeVo.getSettlementDate());
|
|
|
+ }
|
|
|
|
|
|
return params;
|
|
|
}
|
|
|
@@ -782,8 +785,10 @@ handlingProportion,
|
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
|
BigDecimal totalHandingAmount = BigDecimal.ZERO;
|
|
|
BigDecimal totalOtherAmount = BigDecimal.ZERO;
|
|
|
- HashMap<String, Object> params = new HashMap<>();
|
|
|
HashMap<String, Object> resultHashMap = new HashMap<>();
|
|
|
+ HashSet<String> partnerCompaniesIdSet = new HashSet<>();
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+ String reason ="";
|
|
|
ArrayList<HashMap<String, Object>> resultNoSelect = new ArrayList<>();
|
|
|
try {
|
|
|
List<InsPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(multipartFile, InsPlyIncomeExcelDto.class, 0, 1, 1);
|
|
|
@@ -803,6 +808,28 @@ handlingProportion,
|
|
|
}
|
|
|
InsPlyIncome insPlyIncome = baseMapper.findByLicenseno(objectObjectHashMap);
|
|
|
if (ObjectUtils.isNotEmpty(insPlyIncome)) {
|
|
|
+// 如果能查询出来则 修改结算 变成已结算
|
|
|
+ if(excelItem.getJqReceivableProportion()!=null && excelItem.getJqReceivableProportion().compareTo(BigDecimal.ZERO) !=0 ){
|
|
|
+ objectObjectHashMap.put("jqReceivableProportion", excelItem.getJqReceivableProportion()); //非车保单号
|
|
|
+ List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(objectObjectHashMap);
|
|
|
+ if(insPlyIncomes.isEmpty()){
|
|
|
+ reason="交强应收比例错误!";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(excelItem.getSyReceivableProportion()!=null && excelItem.getSyReceivableProportion().compareTo(BigDecimal.ZERO) !=0 ){
|
|
|
+ objectObjectHashMap.put("syReceivableProportion", excelItem.getSyReceivableProportion()); //非车保单号
|
|
|
+ List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(objectObjectHashMap);
|
|
|
+ if(insPlyIncomes.isEmpty()){
|
|
|
+ reason="商业应收比例错误!";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(excelItem.getNoReceivableProportion()!=null && excelItem.getNoReceivableProportion().compareTo(BigDecimal.ZERO) !=0 ){
|
|
|
+ objectObjectHashMap.put("noReceivableProportion", excelItem.getNoReceivableProportion()); //非车保单号
|
|
|
+ List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(objectObjectHashMap);
|
|
|
+ if(insPlyIncomes.isEmpty()){
|
|
|
+ reason="非车应收比例错误!";
|
|
|
+ }
|
|
|
+ }
|
|
|
if (insPlyIncome.getAllFeeValue() != null && insPlyIncome.getAllFeeValue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
totalAmount = totalAmount.add(insPlyIncome.getAllFeeValue()); //总金额
|
|
|
}
|
|
|
@@ -812,11 +839,24 @@ handlingProportion,
|
|
|
if (insPlyIncome.getOtherFeevalue() != null && insPlyIncome.getOtherFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
totalOtherAmount = totalOtherAmount.add(insPlyIncome.getOtherFeevalue()); //总跟单费
|
|
|
}
|
|
|
+ if(StringUtils.isNotEmpty(reason)){
|
|
|
+ insPlyIncome.setSettlementUserId(BaseController.getUser().getId());
|
|
|
+ insPlyIncome.setSettlementTime(now);
|
|
|
+ insPlyIncome.setHandlingFeesStatus("1");
|
|
|
+ baseMapper.updateById(insPlyIncome);
|
|
|
+ }
|
|
|
+ //判断是否是相同保司机构
|
|
|
+ partnerCompaniesIdSet.add(insPlyIncome.getPartnerCompaniesId());
|
|
|
+ objectObjectHashMap.put("reason",reason);
|
|
|
+ resultNoSelect.add(objectObjectHashMap); // 添加未匹配的车牌号
|
|
|
} else {
|
|
|
+ objectObjectHashMap.put("reason","未查询车辆");
|
|
|
resultNoSelect.add(objectObjectHashMap); // 添加未匹配的车牌号
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ if(partnerCompaniesIdSet.size()>0){
|
|
|
+ throw new SystemException("表里有不同保司机构");
|
|
|
+ }
|
|
|
resultHashMap.put("totalAmount", totalAmount);
|
|
|
resultHashMap.put("totalHandingAmount", totalHandingAmount);
|
|
|
resultHashMap.put("totalOtherAmount", totalOtherAmount);
|