|
|
@ -106,6 +106,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.RoundingMode; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
@ -572,13 +573,22 @@ public class LoanCaseCloseApplyService extends MybatisBaseService<LoanCaseCloseA |
|
|
|
voucher.setAccountBook(organizationVo.getOrgCode()); |
|
|
|
voucher.setVoucherNo(organizationVo.getOrgCode()); |
|
|
|
} |
|
|
|
|
|
|
|
List<Voucher.VoucherResultDetailDto> voucherResultDetailDtos = new ArrayList<>(); |
|
|
|
List<Voucher.VoucherResultDetailDto> voucherResultDetailDtos2 = new ArrayList<>(); |
|
|
|
List<Voucher.VoucherResultDetailDto> voucherResultDetailDtos3= new ArrayList<>(); |
|
|
|
SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(loanCaseCloseApply.getDeptSid()).getData(); |
|
|
|
List<String> busVinSidList = loanCaseProgressVehService.selectByMainSid(loanCaseCloseApply.getBusSid()); |
|
|
|
busVinSidList.removeAll(Collections.singleton(null)); |
|
|
|
BigDecimal executeExpenseAmount = BigDecimal.ZERO; |
|
|
|
if(!busVinSidList.isEmpty()){ |
|
|
|
LoanCaseExecuteApply loanCaseExecuteApply = loanCaseProgressExecuteService.selectByBusSid(loanCaseCloseApply.getBusSid()); |
|
|
|
if(loanCaseExecuteApply != null){ |
|
|
|
executeExpenseAmount= loanCaseExecuteApply.getExecuteExpenseAmount();//预计申请坏账金额
|
|
|
|
if(executeExpenseAmount != null){ |
|
|
|
executeExpenseAmount = executeExpenseAmount.divide(BigDecimal.valueOf(busVinSidList.size()),2, RoundingMode.HALF_UP); |
|
|
|
} |
|
|
|
} |
|
|
|
for (int i = 0; i < busVinSidList.size(); i++) { |
|
|
|
String busVinSid = busVinSidList.get(i); |
|
|
|
BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.details(busVinSid).getData(); |
|
|
@ -638,6 +648,7 @@ public class LoanCaseCloseApplyService extends MybatisBaseService<LoanCaseCloseA |
|
|
|
String feesMoney = baseMapper.selectFeesMoney(loanCaseCloseApply.getBusSid()); |
|
|
|
ssf = ssf.add(StringUtils.isNotBlank(preserveMoney)?new BigDecimal(preserveMoney):BigDecimal.ZERO).add(StringUtils.isNotBlank(feesMoney)?new BigDecimal(feesMoney):BigDecimal.ZERO); |
|
|
|
fxMoney = all.add(ssf); |
|
|
|
ysqhz = executeExpenseAmount; |
|
|
|
|
|
|
|
String allMoney = loanRepaymentPlanDetailsService.selectAllMoney(busVinSid); |
|
|
|
String wdqMoney = loanRepaymentPlanDetailsService.getWdq(busVinSid); |
|
|
|