|
@@ -385,7 +385,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncomeLogService.saveLog(insPlyIncomeLog); //添加日志
|
|
insPlyIncomeLogService.saveLog(insPlyIncomeLog); //添加日志
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private String setNoPolicyno(com.ydtech.modules.fnc.entity.InsAreaCompany insAreaCompany) {
|
|
|
|
|
|
|
+ private String setNoPolicyno(InsAreaCompany insAreaCompany) {
|
|
|
if (insAreaCompany.getJypremium() == null || insAreaCompany.getJypremium().compareTo(BigDecimal.ZERO) == 0) { // 非车跟单费
|
|
if (insAreaCompany.getJypremium() == null || insAreaCompany.getJypremium().compareTo(BigDecimal.ZERO) == 0) { // 非车跟单费
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
@@ -2113,7 +2113,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
|
|
|
|
|
List<InsuranceHandlingSettlementMonthEntity> insuranceHandlingList = insPlyIncomeVo.getInsuranceHandlingList();
|
|
List<InsuranceHandlingSettlementMonthEntity> insuranceHandlingList = insPlyIncomeVo.getInsuranceHandlingList();
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ ArrayList<InsuranceHandlingSettlementMonthEntity> insuranceHandlingListNew = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
// 判断是否是第一次结算
|
|
// 判断是否是第一次结算
|
|
@@ -2127,6 +2127,8 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
// 分批结算
|
|
// 分批结算
|
|
|
BigDecimal allsettlementAmount = BigDecimal.ZERO;
|
|
BigDecimal allsettlementAmount = BigDecimal.ZERO;
|
|
|
for(InsuranceHandlingSettlementMonthEntity item : insuranceHandlingList){
|
|
for(InsuranceHandlingSettlementMonthEntity item : insuranceHandlingList){
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
String incomeSigningTime = item.getIncomeSigningTime();
|
|
String incomeSigningTime = item.getIncomeSigningTime();
|
|
|
|
|
|
|
|
DateTimeFormatter yearMonthFormatter = DateTimeFormatter.ofPattern("yyyy-MM");
|
|
DateTimeFormatter yearMonthFormatter = DateTimeFormatter.ofPattern("yyyy-MM");
|
|
@@ -2143,19 +2145,23 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
BigDecimal totalAmount = item.getRemainingAmount(); //开票金额
|
|
BigDecimal totalAmount = item.getRemainingAmount(); //开票金额
|
|
|
BigDecimal settlementAmount = item.getSettlementAmount(); //结算金额
|
|
BigDecimal settlementAmount = item.getSettlementAmount(); //结算金额
|
|
|
if(settlementAmount.compareTo(BigDecimal.ZERO) > 0){
|
|
if(settlementAmount.compareTo(BigDecimal.ZERO) > 0){
|
|
|
- allsettlementAmount = this.calculateTotal(settlementAmount,allsettlementAmount,null);
|
|
|
|
|
|
|
+ InsuranceHandlingSettlementMonthEntity byId = insuranceHandlingSettlementMonthService.getById(item.getId());
|
|
|
|
|
+ allsettlementAmount = this.calculateTotal(byId.getSettlementAmount(),item.getSettlementAmount(),null);
|
|
|
|
|
+
|
|
|
BigDecimal subtract1 = totalAmount.subtract(settlementAmount);
|
|
BigDecimal subtract1 = totalAmount.subtract(settlementAmount);
|
|
|
item.setRemainingAmount(subtract1);
|
|
item.setRemainingAmount(subtract1);
|
|
|
item.setCreateTime(LocalDateTime.now());
|
|
item.setCreateTime(LocalDateTime.now());
|
|
|
item.setPartnerCompaniesId(insPlyIncomeVo.getPartnerCompaniesId());
|
|
item.setPartnerCompaniesId(insPlyIncomeVo.getPartnerCompaniesId());
|
|
|
item.setSigningTime(localDateTime);
|
|
item.setSigningTime(localDateTime);
|
|
|
item.setSettlementDocumentaryFeesId(byIdSettlementDocumentaryFeesEntity.getId());
|
|
item.setSettlementDocumentaryFeesId(byIdSettlementDocumentaryFeesEntity.getId());
|
|
|
|
|
+ item.setSettlementAmount(allsettlementAmount);
|
|
|
|
|
+ insuranceHandlingListNew.add(item);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if(insuranceHandlingSettlementMonthDtos.size()>0){
|
|
if(insuranceHandlingSettlementMonthDtos.size()>0){
|
|
|
- insuranceHandlingSettlementMonthService.updateBatchById(insuranceHandlingList);
|
|
|
|
|
|
|
+ insuranceHandlingSettlementMonthService.updateBatchById(insuranceHandlingListNew);
|
|
|
}else{
|
|
}else{
|
|
|
- insuranceHandlingSettlementMonthService.saveBatch(insuranceHandlingList);
|
|
|
|
|
|
|
+ insuranceHandlingSettlementMonthService.saveBatch(insuranceHandlingListNew);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
@@ -3357,8 +3363,14 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
}else{
|
|
}else{
|
|
|
year = Integer.parseInt(financialReceivablesQueryVo.getYear());
|
|
year = Integer.parseInt(financialReceivablesQueryVo.getYear());
|
|
|
}
|
|
}
|
|
|
|
|
+ List<FinancialReceivablesVo> list = new ArrayList<>();
|
|
|
|
|
+ if("2".equals(financialReceivablesQueryVo.getType())){
|
|
|
|
|
+ list.addAll(baseMapper.queryDateByType(financialReceivablesQueryVo)) ;
|
|
|
|
|
+ }else {
|
|
|
|
|
+ list.addAll(baseMapper.queryDateByTypePt(financialReceivablesQueryVo)) ;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- List<FinancialReceivablesVo> list = baseMapper.queryDateByType(financialReceivablesQueryVo);
|
|
|
|
|
|
|
|
|
|
financialReceivablesQueryVo.setBeginDate(SliceUpDateUtil.getYearBeginDateStr(year)+" 00:00:00");
|
|
financialReceivablesQueryVo.setBeginDate(SliceUpDateUtil.getYearBeginDateStr(year)+" 00:00:00");
|
|
|
financialReceivablesQueryVo.setEndDate(SliceUpDateUtil.getYearEndDateStr(year)+" 23:59:59");
|
|
financialReceivablesQueryVo.setEndDate(SliceUpDateUtil.getYearEndDateStr(year)+" 23:59:59");
|
|
@@ -3435,9 +3447,9 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
} else {
|
|
} else {
|
|
|
amountMap = this.platformSett(resultData, financialReceivablesQueryVo);
|
|
amountMap = this.platformSett(resultData, financialReceivablesQueryVo);
|
|
|
}
|
|
}
|
|
|
- vo.setYisSumAmount(amountMap.get("yishouAmount").toString());
|
|
|
|
|
- vo.setYsSumAmount(amountMap.get("yinshouAmount").toString());
|
|
|
|
|
- vo.setWsSumAmount(amountMap.get("weishouAmount").toString());
|
|
|
|
|
|
|
+// vo.setYisSumAmount(amountMap.get("yishouAmount").toString());
|
|
|
|
|
+// vo.setYsSumAmount(amountMap.get("yinshouAmount").toString());
|
|
|
|
|
+// vo.setWsSumAmount(amountMap.get("weishouAmount").toString());
|
|
|
return vo;
|
|
return vo;
|
|
|
}
|
|
}
|
|
|
|
|
|