|
|
@ -155,24 +155,24 @@ public class LoanDiffService extends MybatisBaseService<LoanDiffMapper, LoanDiff |
|
|
|
//验证差额=实际之和
|
|
|
|
List<LoanDiffDetailsDto> loanDiffDetails = dto.getLoanDiffDetails(); |
|
|
|
loanDiffDetails.removeAll(Collections.singleton(null)); |
|
|
|
if(!loanDiffDetails.isEmpty()){ |
|
|
|
if (!loanDiffDetails.isEmpty()) { |
|
|
|
for (int i = 0; i < loanDiffDetails.size(); i++) { |
|
|
|
LoanDiffDetailsDto loanDiffDetailsDto = loanDiffDetails.get(i); |
|
|
|
BigDecimal bigAll = BigDecimal.ZERO; |
|
|
|
BigDecimal diffLoan = new BigDecimal(loanDiffDetailsDto.getDiffLoan()); |
|
|
|
if(StringUtils.isNotBlank(loanDiffDetailsDto.getRealityDiscount())){ |
|
|
|
if (StringUtils.isNotBlank(loanDiffDetailsDto.getRealityDiscount())) { |
|
|
|
bigAll = bigAll.add(new BigDecimal(loanDiffDetailsDto.getRealityDiscount())); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(loanDiffDetailsDto.getRealityLoanMargin())){ |
|
|
|
if (StringUtils.isNotBlank(loanDiffDetailsDto.getRealityLoanMargin())) { |
|
|
|
bigAll = bigAll.add(new BigDecimal(loanDiffDetailsDto.getRealityLoanMargin())); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(loanDiffDetailsDto.getRealityOtherDiscount())){ |
|
|
|
if (StringUtils.isNotBlank(loanDiffDetailsDto.getRealityOtherDiscount())) { |
|
|
|
bigAll = bigAll.add(new BigDecimal(loanDiffDetailsDto.getRealityOtherDiscount())); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(loanDiffDetailsDto.getRealityPremium())){ |
|
|
|
if (StringUtils.isNotBlank(loanDiffDetailsDto.getRealityPremium())) { |
|
|
|
bigAll = bigAll.add(new BigDecimal(loanDiffDetailsDto.getRealityPremium())); |
|
|
|
} |
|
|
|
if(bigAll.compareTo(diffLoan) != 0){ |
|
|
|
if (bigAll.compareTo(diffLoan) != 0) { |
|
|
|
return rb.setMsg("放款差额不等于其他四项实际之和,不允许提交"); |
|
|
|
} |
|
|
|
} |
|
|
@ -299,7 +299,7 @@ public class LoanDiffService extends MybatisBaseService<LoanDiffMapper, LoanDiff |
|
|
|
BusSalesOrder busSalesOrder = baseMapper.selectByOrderSid(busSalesOrderVehicle.getSalesOrderSid()); |
|
|
|
LoanSolutions loanSolutions = loanSolutionsService.selectByApplySid(busSalesOrder.getSid()); |
|
|
|
LoanFinPolicy loanFinPolicy = loanFinPolicyService.fetchBySid(loanSolutions.getPolicySid()); |
|
|
|
if(loanFinPolicy != null){ |
|
|
|
if (loanFinPolicy != null) { |
|
|
|
LoanFinBank loanFinBank = loanFinBankService.fetchBySid(loanFinPolicy.getBankSid()); |
|
|
|
creditResult.setBankName(loanFinBank.getBankNo()); |
|
|
|
} |
|
|
@ -338,13 +338,13 @@ public class LoanDiffService extends MybatisBaseService<LoanDiffMapper, LoanDiff |
|
|
|
List<CapitalCreditResult.CapitalCreditResultDetailDto> collectionDetailDtoListOne = new ArrayList<>(); |
|
|
|
SysOrganizationVo sysOrganizationVo2 = sysOrganizationFeign.fetchBySid(busSalesOrder.getOrgSid()).getData(); |
|
|
|
if (loanDiffDetails.getRealityLoanMargin() != null) {//实扣贷款保证金
|
|
|
|
if(loanDiffDetails.getRealityLoanMargin().compareTo(BigDecimal.ZERO) != 0){ |
|
|
|
if (loanDiffDetails.getRealityLoanMargin().compareTo(BigDecimal.ZERO) != 0) { |
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
creditResultDetailDto.setExTaxMoney("-" + loanDiffDetails.getRealityLoanMargin().toString()); |
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.GDBZJ.getType()); |
|
|
|
creditResultDetailDto.setRemarks(CwSystemYT.GDBZJ.getMark()); |
|
|
|
if(baseVehicle != null){ |
|
|
|
if (baseVehicle != null) { |
|
|
|
String vinNo = baseVehicle.getVinNo().substring(baseVehicle.getVinNo().length() - 8); |
|
|
|
creditResultDetailDto.setMaterialNo(vinNo); |
|
|
|
} |
|
|
@ -353,13 +353,13 @@ public class LoanDiffService extends MybatisBaseService<LoanDiffMapper, LoanDiff |
|
|
|
|
|
|
|
} |
|
|
|
if (loanDiffDetails.getRealityDiscount() != null) {//实扣主产品厂家贴息
|
|
|
|
if(loanDiffDetails.getRealityDiscount().compareTo(BigDecimal.ZERO) != 0){ |
|
|
|
if (loanDiffDetails.getRealityDiscount().compareTo(BigDecimal.ZERO) != 0) { |
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
creditResultDetailDto.setExTaxMoney("-" + loanDiffDetails.getRealityDiscount().toString()); |
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.SANFANG_TIEXI_DIECHEKUAN.getType()); |
|
|
|
creditResultDetailDto.setRemarks(CwSystemYT.SANFANG_TIEXI_DIECHEKUAN.getMark()); |
|
|
|
if(baseVehicle != null){ |
|
|
|
if (baseVehicle != null) { |
|
|
|
String vinNo = baseVehicle.getVinNo().substring(baseVehicle.getVinNo().length() - 8); |
|
|
|
creditResultDetailDto.setMaterialNo(vinNo); |
|
|
|
} |
|
|
@ -368,13 +368,13 @@ public class LoanDiffService extends MybatisBaseService<LoanDiffMapper, LoanDiff |
|
|
|
|
|
|
|
} |
|
|
|
if (loanDiffDetails.getRealityOtherDiscount() != null) {//实扣其他融厂家贴息
|
|
|
|
if(loanDiffDetails.getRealityOtherDiscount().compareTo(BigDecimal.ZERO) != 0){ |
|
|
|
if (loanDiffDetails.getRealityOtherDiscount().compareTo(BigDecimal.ZERO) != 0) { |
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
creditResultDetailDto.setExTaxMoney("-" + loanDiffDetails.getRealityOtherDiscount().toString()); |
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.SANFANG_TIEXI_DIECHEKUAN.getType()); |
|
|
|
creditResultDetailDto.setRemarks(CwSystemYT.SANFANG_TIEXI_DIECHEKUAN.getMark()); |
|
|
|
if(baseVehicle != null){ |
|
|
|
if (baseVehicle != null) { |
|
|
|
String vinNo = baseVehicle.getVinNo().substring(baseVehicle.getVinNo().length() - 8); |
|
|
|
creditResultDetailDto.setMaterialNo(vinNo); |
|
|
|
} |
|
|
@ -383,13 +383,13 @@ public class LoanDiffService extends MybatisBaseService<LoanDiffMapper, LoanDiff |
|
|
|
|
|
|
|
} |
|
|
|
if (loanDiffDetails.getReceivedPremium() != null) {//已收意外险
|
|
|
|
if(loanDiffDetails.getReceivedPremium().compareTo(BigDecimal.ZERO) != 0){ |
|
|
|
if (loanDiffDetails.getReceivedPremium().compareTo(BigDecimal.ZERO) != 0) { |
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
creditResultDetailDto.setExTaxMoney("-" + loanDiffDetails.getReceivedPremium().toString()); |
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.PROXY_ACCIDENT_PREMIUM.getType()); |
|
|
|
creditResultDetailDto.setRemarks(CwSystemYT.PROXY_ACCIDENT_PREMIUM.getMark()); |
|
|
|
if(baseVehicle != null){ |
|
|
|
if (baseVehicle != null) { |
|
|
|
String vinNo = baseVehicle.getVinNo().substring(baseVehicle.getVinNo().length() - 8); |
|
|
|
creditResultDetailDto.setMaterialNo(vinNo); |
|
|
|
} |
|
|
@ -398,13 +398,13 @@ public class LoanDiffService extends MybatisBaseService<LoanDiffMapper, LoanDiff |
|
|
|
|
|
|
|
} |
|
|
|
if (loanDiffDetails.getDiffPremium() != null) {//意外险差额
|
|
|
|
if(loanDiffDetails.getDiffPremium().compareTo(BigDecimal.ZERO) != 0){ |
|
|
|
if (loanDiffDetails.getDiffPremium().compareTo(BigDecimal.ZERO) != 0) { |
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
creditResultDetailDto.setExTaxMoney(loanDiffDetails.getDiffPremium().toString()); |
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.YWXSR.getType()); |
|
|
|
creditResultDetailDto.setRemarks(CwSystemYT.YWXSR.getMark()); |
|
|
|
if(baseVehicle != null){ |
|
|
|
if (baseVehicle != null) { |
|
|
|
String vinNo = baseVehicle.getVinNo().substring(baseVehicle.getVinNo().length() - 8); |
|
|
|
creditResultDetailDto.setMaterialNo(vinNo); |
|
|
|
} |
|
|
@ -415,7 +415,7 @@ public class LoanDiffService extends MybatisBaseService<LoanDiffMapper, LoanDiff |
|
|
|
creditResult.setResultDetails(collectionDetailDtoListOne); |
|
|
|
creditResult.setRemarks("放款差额"); |
|
|
|
finKingDeeFeign.pushOtherReceivableBill(creditResult); |
|
|
|
int updateCount = baseMapper.selectByBusVnS(loanDiffDetails.getBusVinSid(),loanDiffDetails.getRealityLoan().toString()); |
|
|
|
int updateCount = baseMapper.selectByBusVnS(loanDiffDetails.getBusVinSid(), loanDiffDetails.getRealityLoan().toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -657,7 +657,7 @@ public class LoanDiffService extends MybatisBaseService<LoanDiffMapper, LoanDiff |
|
|
|
BeanUtil.copyProperties(dto, loanDiff); |
|
|
|
List<LoanDiffDetailssDto> loanDiffDetailssDtos = dto.getLoanDiffDetailssDtos(); |
|
|
|
loanDiffDetailssDtos.removeAll(Collections.singleton(null)); |
|
|
|
String billNo =getApplyCode(loanDiff.getOrgSidPath()); |
|
|
|
String billNo = getApplyCode(loanDiff.getOrgSidPath()); |
|
|
|
loanDiff.setBillNo(billNo); |
|
|
|
if (!loanDiffDetailssDtos.isEmpty()) { |
|
|
|
for (int i = 0; i < loanDiffDetailssDtos.size(); i++) { |
|
|
@ -788,4 +788,10 @@ public class LoanDiffService extends MybatisBaseService<LoanDiffMapper, LoanDiff |
|
|
|
flowFeign.delegate(delegateQuery); |
|
|
|
return rb.success(); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean ctDiff(String sid) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
pushFinOther(sid); |
|
|
|
return rb.success(); |
|
|
|
} |
|
|
|
} |
|
|
|