|
|
@ -110,6 +110,12 @@ import com.yxt.anrui.portal.api.sysparameter.SysParameterFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; |
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.*; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.LoanHomevisitInvestigateFeign; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatecustomer.LoanHomevisitInvestigateCustomerDetailsVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatecustomer.LoanHomevisitInvestigateCustomerFeign; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatefile.LoanHomevisitInvestigateFile; |
|
|
|
import com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview.LoanNoGuaranteeCreditReviewDetailsVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview.LoanNoGuaranteeCreditReviewFeign; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterFeign; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutionsFeign; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.app.SolutionsDetailsVo; |
|
|
@ -212,6 +218,12 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
|
@Autowired |
|
|
|
private BusArrearsCarryVehicleApplyFeign busArrearsCarryVehicleApplyFeign; |
|
|
|
@Autowired |
|
|
|
private LoanHomevisitInvestigateFeign loanHomevisitInvestigateFeign; |
|
|
|
@Autowired |
|
|
|
private LoanHomevisitInvestigateCustomerFeign loanHomevisitInvestigateCustomerFeign; |
|
|
|
@Autowired |
|
|
|
private LoanNoGuaranteeCreditReviewFeign loanNoGuaranteeCreditReviewFeign; |
|
|
|
@Autowired |
|
|
|
private FlowFeign flowFeign; |
|
|
|
@Autowired |
|
|
|
private BaseVehicleStateFeign baseVehicleStateFeign; |
|
|
@ -1012,13 +1024,23 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
|
FinBillApplication entity = fetchBySid(sid); |
|
|
|
List<FinBillVehicleVo> finBillVehicleVos = finBillVehicleService.fetchVehBySid(sid); |
|
|
|
String contractNo = entity.getContractNo(); |
|
|
|
BigDecimal oneBillMoney = entity.getOneBillMoney(); |
|
|
|
if (oneBillMoney != null) { |
|
|
|
entity.setTotalBillMoney(entity.getOneBillMoney().multiply(new BigDecimal(finBillVehicleVos.size()))); |
|
|
|
BusSalesOrder busSalesOrder = busSalesOrderFeign.selectOrderByContractNo(contractNo).getData(); |
|
|
|
SolutionsDetailsVo solutionsDetailsVo = loanSolutionsFeign.selectDetails(busSalesOrder.getSid()).getData(); |
|
|
|
BigDecimal oneBillMoney = new BigDecimal("0"); |
|
|
|
if ("2".equals(entity.getSaleTypeKey())){ |
|
|
|
oneBillMoney = new BigDecimal(solutionsDetailsVo.getMainVehicleAmount()); |
|
|
|
entity.setOneBillMoney(oneBillMoney); |
|
|
|
entity.setTotalBillMoney(oneBillMoney.multiply(new BigDecimal(finBillVehicleVos.size()))); |
|
|
|
entity.setOpenTickTypeKey(busSalesOrder.getBillingTypeKey()); |
|
|
|
entity.setOpenTickTypeValue(busSalesOrder.getBillingType()); |
|
|
|
}else { |
|
|
|
oneBillMoney = entity.getOneBillMoney(); |
|
|
|
if (oneBillMoney != null) { |
|
|
|
entity.setTotalBillMoney(entity.getOneBillMoney().multiply(new BigDecimal(finBillVehicleVos.size()))); |
|
|
|
} |
|
|
|
} |
|
|
|
FinBillApplicationDetailsVo vo = new FinBillApplicationDetailsVo(); |
|
|
|
BeanUtil.copyProperties(entity, vo); |
|
|
|
BusSalesOrder busSalesOrder = busSalesOrderFeign.selectOrderByContractNo(contractNo).getData(); |
|
|
|
vo.setBusSalesOrderSid(busSalesOrder.getSid()); |
|
|
|
if (finBillVehicleVos != null) { |
|
|
|
for (FinBillVehicleVo finBillVehicleVo : finBillVehicleVos) { |
|
|
@ -1027,6 +1049,29 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
|
List<String> clhgeImages = baseVehicleAppendixFeign.selectBySid(baseVehicleCertificateVo.getSid()).getData(); |
|
|
|
finBillVehicleVo.setCertificatePhoto(clhgeImages); |
|
|
|
} |
|
|
|
BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.selectByNoAndVinSid(contractNo, finBillVehicleVo.getVehSid()).getData(); |
|
|
|
if ("2".equals(entity.getSaleTypeKey())){ |
|
|
|
if ("01".equals(busSalesOrder.getFinancePlan())){//担保
|
|
|
|
String jfkcSid = loanHomevisitInvestigateFeign.selSaleOrderSidAndBorrSid(busSalesOrder.getSid(), busSalesOrderVehicle.getBorrowerSid()).getData(); |
|
|
|
LoanHomevisitInvestigateCustomerDetailsVo loanHomevisitInvestigateCustomerDetailsVo = loanHomevisitInvestigateCustomerFeign.selectByMainSid(jfkcSid).getData(); |
|
|
|
finBillVehicleVo.setBillTypeKey(busSalesOrder.getBillingTypeKey()); |
|
|
|
finBillVehicleVo.setBillTypeValue(busSalesOrder.getBillingType()); |
|
|
|
if ("1".equals(loanHomevisitInvestigateCustomerDetailsVo.getVehRegis())){ |
|
|
|
finBillVehicleVo.setOpenTickName(loanHomevisitInvestigateCustomerDetailsVo.getBorrowerName()); |
|
|
|
}else if ("2".equals(loanHomevisitInvestigateCustomerDetailsVo.getVehRegis())){ |
|
|
|
finBillVehicleVo.setOpenTickName(loanHomevisitInvestigateCustomerDetailsVo.getAccCompName()); |
|
|
|
} |
|
|
|
}else if ("02".equals(busSalesOrder.getFinancePlan())){//非担保
|
|
|
|
LoanNoGuaranteeCreditReviewDetailsVo loanNoGuaranteeCreditReviewDetailsVo = loanNoGuaranteeCreditReviewFeign.selByBorrSid(busSalesOrderVehicle.getBorrowerSid()).getData(); |
|
|
|
finBillVehicleVo.setBillTypeKey(busSalesOrder.getBillingTypeKey()); |
|
|
|
finBillVehicleVo.setBillTypeValue(busSalesOrder.getBillingType()); |
|
|
|
if ("1".equals(loanNoGuaranteeCreditReviewDetailsVo.getType())){ |
|
|
|
finBillVehicleVo.setOpenTickName(loanNoGuaranteeCreditReviewDetailsVo.getBorrowerName()); |
|
|
|
}else if ("2".equals(loanNoGuaranteeCreditReviewDetailsVo.getType())){ |
|
|
|
finBillVehicleVo.setOpenTickName(loanNoGuaranteeCreditReviewDetailsVo.getAffiliatedCompany()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
vo.setFinBillVehicles(finBillVehicleVos); |
|
|
|