|
@ -371,76 +371,78 @@ public class BusSalesOrderLoancontractService extends MybatisBaseService<BusSale |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
String saleOrderSid = loanOtherReceivablePush.getSaleOrderSid(); |
|
|
String saleOrderSid = loanOtherReceivablePush.getSaleOrderSid(); |
|
|
String borrowerSid = loanOtherReceivablePush.getBorrowerSid(); |
|
|
String borrowerSid = loanOtherReceivablePush.getBorrowerSid(); |
|
|
|
|
|
String tag = loanOtherReceivablePush.getTag(); |
|
|
BusSalesOrder salesOrder = busSalesOrderService.fetchBySid(saleOrderSid); |
|
|
BusSalesOrder salesOrder = busSalesOrderService.fetchBySid(saleOrderSid); |
|
|
// //根据消贷合同查询贷款人
|
|
|
// //根据消贷合同查询贷款人
|
|
|
// BusSalesOrderLoancontract busSalesOrderLoancontract = fetchBySid(loanContractSid);
|
|
|
// BusSalesOrderLoancontract busSalesOrderLoancontract = fetchBySid(loanContractSid);
|
|
|
if (null != salesOrder) { |
|
|
if (tag.equals("01")) { |
|
|
BusSalesOrderBorrower borrowerDetailsVo = busSalesOrderBorrowerService.fetchBySid(borrowerSid); |
|
|
if (null != salesOrder) { |
|
|
if (null != borrowerDetailsVo) { |
|
|
BusSalesOrderBorrower borrowerDetailsVo = busSalesOrderBorrowerService.fetchBySid(borrowerSid); |
|
|
//-----------获取其他应收单对象----------------
|
|
|
if (null != borrowerDetailsVo) { |
|
|
CapitalCreditResult creditResult = new CapitalCreditResult(); |
|
|
//-----------获取其他应收单对象----------------
|
|
|
//根据销售订单的贷款人sid查询车辆表中的数据
|
|
|
CapitalCreditResult creditResult = new CapitalCreditResult(); |
|
|
List<BusSalesOrderVehicle> busSalesOrderVehicleList = busSalesOrderVehicleService.selectListByOrderSidAndXdConSid(saleOrderSid, loanOtherReceivablePush.getLoanContractSid()); |
|
|
//根据销售订单的贷款人sid查询车辆表中的数据
|
|
|
if (!busSalesOrderVehicleList.isEmpty()) { |
|
|
List<BusSalesOrderVehicle> busSalesOrderVehicleList = busSalesOrderVehicleService.selectListByOrderSidAndXdConSid(saleOrderSid, loanOtherReceivablePush.getLoanContractSid()); |
|
|
for (BusSalesOrderVehicle busSalesOrderVehicle : busSalesOrderVehicleList) { |
|
|
if (!busSalesOrderVehicleList.isEmpty()) { |
|
|
String vinNoCode = ""; |
|
|
for (BusSalesOrderVehicle busSalesOrderVehicle : busSalesOrderVehicleList) { |
|
|
if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkSid())) { |
|
|
String vinNoCode = ""; |
|
|
BaseVehicleSelectVo data = baseVehicleFeign.details(busSalesOrderVehicle.getLinkSid()).getData(); |
|
|
if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkSid())) { |
|
|
if (null != data) { |
|
|
BaseVehicleSelectVo data = baseVehicleFeign.details(busSalesOrderVehicle.getLinkSid()).getData(); |
|
|
vinNoCode = data.getVinNo(); |
|
|
if (null != data) { |
|
|
|
|
|
vinNoCode = data.getVinNo(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
String customerNumber = ""; |
|
|
String customerNumber = ""; |
|
|
//判断财务系统是否有客户
|
|
|
//判断财务系统是否有客户
|
|
|
Boolean aBoolean = finKingDeeFeign.customerExistState(busSalesOrderVehicle.getTemporaryNo()).getData(); |
|
|
Boolean aBoolean = finKingDeeFeign.customerExistState(busSalesOrderVehicle.getTemporaryNo()).getData(); |
|
|
String linkNo = ""; |
|
|
String linkNo = ""; |
|
|
if (!aBoolean) { |
|
|
if (!aBoolean) { |
|
|
// List<BdCustomer> bdCustomers = new ArrayList<>();
|
|
|
// List<BdCustomer> bdCustomers = new ArrayList<>();
|
|
|
BdCustomer bdCustomer = new BdCustomer(); |
|
|
BdCustomer bdCustomer = new BdCustomer(); |
|
|
bdCustomer.setFNumber(busSalesOrderVehicle.getTemporaryNo()); |
|
|
bdCustomer.setFNumber(busSalesOrderVehicle.getTemporaryNo()); |
|
|
bdCustomer.setFShortName(salesOrder.getContractNo()); |
|
|
bdCustomer.setFShortName(salesOrder.getContractNo()); |
|
|
BasePurchaseSystemDetailsVo data = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData(); |
|
|
BasePurchaseSystemDetailsVo data = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData(); |
|
|
bdCustomer.setTOrgIds(data.getOrgCode()); |
|
|
bdCustomer.setTOrgIds(data.getOrgCode()); |
|
|
if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) { |
|
|
if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) { |
|
|
String vinNo = busSalesOrderVehicle.getLinkNo(); |
|
|
String vinNo = busSalesOrderVehicle.getLinkNo(); |
|
|
vinNoCode = busSalesOrderVehicle.getLinkNo(); |
|
|
vinNoCode = busSalesOrderVehicle.getLinkNo(); |
|
|
if (vinNo.length() > 8) { |
|
|
if (vinNo.length() > 8) { |
|
|
linkNo = vinNo.substring(vinNo.length() - 8); |
|
|
linkNo = vinNo.substring(vinNo.length() - 8); |
|
|
} else { |
|
|
|
|
|
linkNo = busSalesOrderVehicle.getLinkNo(); |
|
|
|
|
|
} |
|
|
|
|
|
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + linkNo); |
|
|
} else { |
|
|
} else { |
|
|
linkNo = busSalesOrderVehicle.getLinkNo(); |
|
|
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + busSalesOrderVehicle.getTemporaryNo()); |
|
|
|
|
|
} |
|
|
|
|
|
// bdCustomers.add(bdCustomer);
|
|
|
|
|
|
ResultBean<String> resultBean = finKingDeeFeign.draftBdCustomer(bdCustomer); |
|
|
|
|
|
if (resultBean.getSuccess()) { |
|
|
|
|
|
customerNumber = bdCustomer.getFNumber(); |
|
|
} |
|
|
} |
|
|
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + linkNo); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + busSalesOrderVehicle.getTemporaryNo()); |
|
|
customerNumber = busSalesOrderVehicle.getTemporaryNo(); |
|
|
} |
|
|
} |
|
|
// bdCustomers.add(bdCustomer);
|
|
|
creditResult.setCommUnit(customerNumber); |
|
|
ResultBean<String> resultBean = finKingDeeFeign.draftBdCustomer(bdCustomer); |
|
|
BasePurchaseSystemDetailsVo basePurchaseSystemDetailsVo = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData(); |
|
|
if (resultBean.getSuccess()) { |
|
|
creditResult.setCollectionOrg(basePurchaseSystemDetailsVo.getOrgCode()); |
|
|
customerNumber = bdCustomer.getFNumber(); |
|
|
creditResult.setBussDate(DateUtil.formatDate(new Date())); |
|
|
|
|
|
SolutionsDetailsVo solutionsDetailsVo = loanSolutionsFeign.selectDetails(saleOrderSid).getData(); |
|
|
|
|
|
if (StringUtils.isNotBlank(solutionsDetailsVo.getPolicySid())) { |
|
|
|
|
|
LoanFinPolicyVo loanFinPolicyVo = loanFinPolicyFeign.details(solutionsDetailsVo.getPolicySid()).getData(); |
|
|
|
|
|
LoanFinBankVo loanFinBankVo = loanFinBankFeign.details(loanFinPolicyVo.getBankSid()).getData(); |
|
|
|
|
|
creditResult.setBankName(loanFinBankVo.getBankNo()); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
List<CapitalCreditResult.CapitalCreditResultDetailDto> collectionDetailDtoListOne = new ArrayList<>(); |
|
|
customerNumber = busSalesOrderVehicle.getTemporaryNo(); |
|
|
SysOrganizationVo sysOrganizationVo2 = sysOrganizationFeign.fetchBySid(salesOrder.getOrgSid()).getData(); |
|
|
} |
|
|
SolutionsDetailsVo solutions = loanSolutionsFeign.selectDetails(saleOrderSid).getData(); |
|
|
creditResult.setCommUnit(customerNumber); |
|
|
//这是生成业务系统融资放款应收的逻辑:
|
|
|
BasePurchaseSystemDetailsVo basePurchaseSystemDetailsVo = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData(); |
|
|
// 融资放款=融资项目总额-融资首付-[贷款保证金]-[厂家贴息],根据选择的产品政策来判断,若贷款保证金为固定的,需要减去,若为敞口的,不需要减;差额放款需要减厂家贴息,全额放款不需要。差额放款的厂家贴息金额存入“其他应收”字段中,
|
|
|
creditResult.setCollectionOrg(basePurchaseSystemDetailsVo.getOrgCode()); |
|
|
//计算融资放款的金额以及厂家贴息金额
|
|
|
creditResult.setBussDate(DateUtil.formatDate(new Date())); |
|
|
ResultBean<PushVo> resultBean = loanSolutionsFeign.selectMoney(saleOrderSid); |
|
|
SolutionsDetailsVo solutionsDetailsVo = loanSolutionsFeign.selectDetails(saleOrderSid).getData(); |
|
|
if (null != resultBean.getData()) { |
|
|
if (StringUtils.isNotBlank(solutionsDetailsVo.getPolicySid())) { |
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
LoanFinPolicyVo loanFinPolicyVo = loanFinPolicyFeign.details(solutionsDetailsVo.getPolicySid()).getData(); |
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
LoanFinBankVo loanFinBankVo = loanFinBankFeign.details(loanFinPolicyVo.getBankSid()).getData(); |
|
|
|
|
|
creditResult.setBankName(loanFinBankVo.getBankNo()); |
|
|
|
|
|
} |
|
|
|
|
|
List<CapitalCreditResult.CapitalCreditResultDetailDto> collectionDetailDtoListOne = new ArrayList<>(); |
|
|
|
|
|
SysOrganizationVo sysOrganizationVo2 = sysOrganizationFeign.fetchBySid(salesOrder.getOrgSid()).getData(); |
|
|
|
|
|
SolutionsDetailsVo solutions = loanSolutionsFeign.selectDetails(saleOrderSid).getData(); |
|
|
|
|
|
//这是生成业务系统融资放款应收的逻辑:
|
|
|
|
|
|
// 融资放款=融资项目总额-融资首付-[贷款保证金]-[厂家贴息],根据选择的产品政策来判断,若贷款保证金为固定的,需要减去,若为敞口的,不需要减;差额放款需要减厂家贴息,全额放款不需要。差额放款的厂家贴息金额存入“其他应收”字段中,
|
|
|
|
|
|
//计算融资放款的金额以及厂家贴息金额
|
|
|
|
|
|
ResultBean<PushVo> resultBean = loanSolutionsFeign.selectMoney(saleOrderSid); |
|
|
|
|
|
if (null != resultBean.getData()) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
/*if (null != solutions) { |
|
|
/*if (null != solutions) { |
|
|
if (StringUtils.isNotBlank(loanOtherReceivablePush.getIsCompInvoic())) { |
|
|
if (StringUtils.isNotBlank(loanOtherReceivablePush.getIsCompInvoic())) { |
|
|
if (loanOtherReceivablePush.getIsCompInvoic().equals("1")) { |
|
|
if (loanOtherReceivablePush.getIsCompInvoic().equals("1")) { |
|
@ -460,122 +462,343 @@ public class BusSalesOrderLoancontractService extends MybatisBaseService<BusSale |
|
|
creditResultDetailDto.setExTaxMoney("-" + resultBean.getData().getMoney()); |
|
|
creditResultDetailDto.setExTaxMoney("-" + resultBean.getData().getMoney()); |
|
|
} |
|
|
} |
|
|
}*/ |
|
|
}*/ |
|
|
creditResultDetailDto.setExTaxMoney("-" + resultBean.getData().getMoney()); |
|
|
creditResultDetailDto.setExTaxMoney("-" + resultBean.getData().getMoney()); |
|
|
creditResultDetailDto.setUseTo(CwSystemYT.RONGZI_FANGKUAN.getType()); |
|
|
creditResultDetailDto.setUseTo(CwSystemYT.RONGZI_FANGKUAN.getType()); |
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.RONGZI_FANGKUAN.getType(), "YT").getData(); |
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.RONGZI_FANGKUAN.getType(), "YT").getData(); |
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
if (null != solutions) { |
|
|
|
|
|
if (StringUtils.isNotBlank(loanOtherReceivablePush.getIsCompInvoic())) { |
|
|
|
|
|
if (loanOtherReceivablePush.getIsCompInvoic().equals("1")) { |
|
|
|
|
|
//挂车待退款
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getTrailerAmount()) && !("0").equals(solutions.getTrailerAmount())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getTrailerAmount()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.GCDTK.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.GCDTK.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
//贷款保证金
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getBondAmounts()) && !("0").equals(solutions.getBondAmounts())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getBondAmounts()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.BOND_AMOUNTS.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.BOND_AMOUNTS.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//保险保证金
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getDepositPremium()) && !("0").equals(solutions.getDepositPremium())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getDepositPremium()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.DEPOSIT_PREMIUM.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.DEPOSIT_PREMIUM.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//落户保证金
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getDepositSettle()) && !("0").equals(solutions.getDepositSettle())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getDepositSettle()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.DEPOSIT_SETTLE.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.DEPOSIT_SETTLE.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//服务费
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getServiceAmount()) && !("0").equals(solutions.getServiceAmount())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.SERVICE_AMOUNT_DANBAO.getType()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getServiceAmount()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.SERVICE_AMOUNT_DANBAO.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//代收意外险
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getProxyAccidentPremium()) && !("0").equals(solutions.getProxyAccidentPremium())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.PROXY_ACCIDENT_PREMIUM.getType()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getProxyAccidentPremium()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.PROXY_ACCIDENT_PREMIUM.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//上牌费、运管费
|
|
|
|
|
|
if ((StringUtils.isNotBlank(solutions.getRegisterAmount()) && !("0").equals(solutions.getRegisterAmount())) || |
|
|
|
|
|
(StringUtils.isNotBlank(solutions.getOperationAmount()) && !("0").equals(solutions.getOperationAmount()))) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
BigDecimal registerAmount = new BigDecimal(solutions.getRegisterAmount()); |
|
|
|
|
|
BigDecimal opertionAmount = new BigDecimal(solutions.getOperationAmount()); |
|
|
|
|
|
BigDecimal add = registerAmount.add(opertionAmount); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.SHANGPAI_YUNGUAN.getType()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(add.toString()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.SHANGPAI_YUNGUAN.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
} |
|
|
} |
|
|
//其它费用
|
|
|
if (null != solutions) { |
|
|
if (StringUtils.isNotBlank(solutions.getOtherAmount()) && !("0").equals(solutions.getOtherAmount())) { |
|
|
if (StringUtils.isNotBlank(loanOtherReceivablePush.getIsCompInvoic())) { |
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
if (loanOtherReceivablePush.getIsCompInvoic().equals("1")) { |
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
//挂车待退款
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getOtherAmount()); |
|
|
if (StringUtils.isNotBlank(solutions.getTrailerAmount()) && !("0").equals(solutions.getTrailerAmount())) { |
|
|
creditResultDetailDto.setUseTo(CwSystemYT.OTHER_AMOUNT.getType()); |
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.OTHER_AMOUNT.getType(), "YT").getData(); |
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
creditResultDetailDto.setExTaxMoney(solutions.getTrailerAmount()); |
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
creditResultDetailDto.setUseTo(CwSystemYT.GCDTK.getType()); |
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.GCDTK.getType(), "YT").getData(); |
|
|
} |
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
//补车价
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
if (StringUtils.isNotBlank(solutions.getVehOtherPrice()) && !("0").equals(solutions.getVehOtherPrice())) { |
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
//贷款保证金
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getBondAmounts()) && !("0").equals(solutions.getBondAmounts())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getBondAmounts()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.BOND_AMOUNTS.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.BOND_AMOUNTS.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//保险保证金
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getDepositPremium()) && !("0").equals(solutions.getDepositPremium())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getDepositPremium()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.DEPOSIT_PREMIUM.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.DEPOSIT_PREMIUM.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//落户保证金
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getDepositSettle()) && !("0").equals(solutions.getDepositSettle())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getDepositSettle()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.DEPOSIT_SETTLE.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.DEPOSIT_SETTLE.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//服务费
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getServiceAmount()) && !("0").equals(solutions.getServiceAmount())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.SERVICE_AMOUNT_DANBAO.getType()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getServiceAmount()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.SERVICE_AMOUNT_DANBAO.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//代收意外险
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getProxyAccidentPremium()) && !("0").equals(solutions.getProxyAccidentPremium())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.PROXY_ACCIDENT_PREMIUM.getType()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getProxyAccidentPremium()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.PROXY_ACCIDENT_PREMIUM.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//上牌费、运管费
|
|
|
|
|
|
if ((StringUtils.isNotBlank(solutions.getRegisterAmount()) && !("0").equals(solutions.getRegisterAmount())) || |
|
|
|
|
|
(StringUtils.isNotBlank(solutions.getOperationAmount()) && !("0").equals(solutions.getOperationAmount()))) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
BigDecimal registerAmount = new BigDecimal(solutions.getRegisterAmount()); |
|
|
|
|
|
BigDecimal opertionAmount = new BigDecimal(solutions.getOperationAmount()); |
|
|
|
|
|
BigDecimal add = registerAmount.add(opertionAmount); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.SHANGPAI_YUNGUAN.getType()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(add.toString()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.SHANGPAI_YUNGUAN.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//其它费用
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getOtherAmount()) && !("0").equals(solutions.getOtherAmount())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getOtherAmount()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.OTHER_AMOUNT.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.OTHER_AMOUNT.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//补车价
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getVehOtherPrice()) && !("0").equals(solutions.getVehOtherPrice())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getVehOtherPrice()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.VEH_OTHER_PRICE.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.VEH_OTHER_PRICE.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//留购价
|
|
|
|
|
|
/* if (StringUtils.isNotBlank(solutions.getNominalPrice()) && !("0").equals(solutions.getNominalPrice())) { |
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
creditResultDetailDto.setExTaxMoney(solutions.getVehOtherPrice()); |
|
|
creditResultDetailDto.setExTaxMoney(solutions.getNominalPrice()); |
|
|
creditResultDetailDto.setUseTo(CwSystemYT.VEH_OTHER_PRICE.getType()); |
|
|
creditResultDetailDto.setUseTo(CwSystemYT.NOMINAL_PRICE.getType()); |
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.VEH_OTHER_PRICE.getType(), "YT").getData(); |
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.NOMINAL_PRICE.getType(), "YT").getData(); |
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
}*/ |
|
|
} |
|
|
} |
|
|
//留购价
|
|
|
creditResult.setResultDetails(collectionDetailDtoListOne); |
|
|
|
|
|
finKingDeeFeign.pushOtherReceivableBill(creditResult); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} else if (tag.equals("02")) { |
|
|
|
|
|
|
|
|
|
|
|
if (null != salesOrder) { |
|
|
|
|
|
BusSalesOrderBorrower borrowerDetailsVo = busSalesOrderBorrowerService.fetchBySid(borrowerSid); |
|
|
|
|
|
if (null != borrowerDetailsVo) { |
|
|
|
|
|
//-----------获取其他应收单对象----------------
|
|
|
|
|
|
CapitalCreditResult creditResult = new CapitalCreditResult(); |
|
|
|
|
|
//根据销售订单的贷款人sid查询车辆表中的数据
|
|
|
|
|
|
List<BusSalesOrderVehicle> busSalesOrderVehicleList = busSalesOrderVehicleService.selectListByOrderSidAndDkrSid(saleOrderSid,borrowerSid); |
|
|
|
|
|
if (!busSalesOrderVehicleList.isEmpty()) { |
|
|
|
|
|
for (BusSalesOrderVehicle busSalesOrderVehicle : busSalesOrderVehicleList) { |
|
|
|
|
|
String vinNoCode = ""; |
|
|
|
|
|
if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkSid())) { |
|
|
|
|
|
BaseVehicleSelectVo data = baseVehicleFeign.details(busSalesOrderVehicle.getLinkSid()).getData(); |
|
|
|
|
|
if (null != data) { |
|
|
|
|
|
vinNoCode = data.getVinNo(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
String customerNumber = ""; |
|
|
|
|
|
//判断财务系统是否有客户
|
|
|
|
|
|
Boolean aBoolean = finKingDeeFeign.customerExistState(busSalesOrderVehicle.getTemporaryNo()).getData(); |
|
|
|
|
|
String linkNo = ""; |
|
|
|
|
|
if (!aBoolean) { |
|
|
|
|
|
// List<BdCustomer> bdCustomers = new ArrayList<>();
|
|
|
|
|
|
BdCustomer bdCustomer = new BdCustomer(); |
|
|
|
|
|
bdCustomer.setFNumber(busSalesOrderVehicle.getTemporaryNo()); |
|
|
|
|
|
bdCustomer.setFShortName(salesOrder.getContractNo()); |
|
|
|
|
|
BasePurchaseSystemDetailsVo data = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData(); |
|
|
|
|
|
bdCustomer.setTOrgIds(data.getOrgCode()); |
|
|
|
|
|
if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) { |
|
|
|
|
|
String vinNo = busSalesOrderVehicle.getLinkNo(); |
|
|
|
|
|
vinNoCode = busSalesOrderVehicle.getLinkNo(); |
|
|
|
|
|
if (vinNo.length() > 8) { |
|
|
|
|
|
linkNo = vinNo.substring(vinNo.length() - 8); |
|
|
|
|
|
} else { |
|
|
|
|
|
linkNo = busSalesOrderVehicle.getLinkNo(); |
|
|
|
|
|
} |
|
|
|
|
|
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + linkNo); |
|
|
|
|
|
} else { |
|
|
|
|
|
bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + busSalesOrderVehicle.getTemporaryNo()); |
|
|
|
|
|
} |
|
|
|
|
|
// bdCustomers.add(bdCustomer);
|
|
|
|
|
|
ResultBean<String> resultBean = finKingDeeFeign.draftBdCustomer(bdCustomer); |
|
|
|
|
|
if (resultBean.getSuccess()) { |
|
|
|
|
|
customerNumber = bdCustomer.getFNumber(); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
customerNumber = busSalesOrderVehicle.getTemporaryNo(); |
|
|
|
|
|
} |
|
|
|
|
|
creditResult.setCommUnit(customerNumber); |
|
|
|
|
|
BasePurchaseSystemDetailsVo basePurchaseSystemDetailsVo = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData(); |
|
|
|
|
|
creditResult.setCollectionOrg(basePurchaseSystemDetailsVo.getOrgCode()); |
|
|
|
|
|
creditResult.setBussDate(DateUtil.formatDate(new Date())); |
|
|
|
|
|
SolutionsDetailsVo solutionsDetailsVo = loanSolutionsFeign.selectDetails(saleOrderSid).getData(); |
|
|
|
|
|
if (StringUtils.isNotBlank(solutionsDetailsVo.getPolicySid())) { |
|
|
|
|
|
LoanFinPolicyVo loanFinPolicyVo = loanFinPolicyFeign.details(solutionsDetailsVo.getPolicySid()).getData(); |
|
|
|
|
|
LoanFinBankVo loanFinBankVo = loanFinBankFeign.details(loanFinPolicyVo.getBankSid()).getData(); |
|
|
|
|
|
creditResult.setBankName(loanFinBankVo.getBankNo()); |
|
|
|
|
|
} |
|
|
|
|
|
List<CapitalCreditResult.CapitalCreditResultDetailDto> collectionDetailDtoListOne = new ArrayList<>(); |
|
|
|
|
|
SysOrganizationVo sysOrganizationVo2 = sysOrganizationFeign.fetchBySid(salesOrder.getOrgSid()).getData(); |
|
|
|
|
|
SolutionsDetailsVo solutions = loanSolutionsFeign.selectDetails(saleOrderSid).getData(); |
|
|
|
|
|
//这是生成业务系统融资放款应收的逻辑:
|
|
|
|
|
|
// 融资放款=融资项目总额-融资首付-[贷款保证金]-[厂家贴息],根据选择的产品政策来判断,若贷款保证金为固定的,需要减去,若为敞口的,不需要减;差额放款需要减厂家贴息,全额放款不需要。差额放款的厂家贴息金额存入“其他应收”字段中,
|
|
|
|
|
|
//计算融资放款的金额以及厂家贴息金额
|
|
|
|
|
|
ResultBean<PushVo> resultBean = loanSolutionsFeign.selectMoney(saleOrderSid); |
|
|
|
|
|
if (null != resultBean.getData()) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
/*if (null != solutions) { |
|
|
|
|
|
if (StringUtils.isNotBlank(loanOtherReceivablePush.getIsCompInvoic())) { |
|
|
|
|
|
if (loanOtherReceivablePush.getIsCompInvoic().equals("1")) { |
|
|
|
|
|
//挂车待退款
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getTrailerAmount()) && !("0").equals(solutions.getTrailerAmount())) { |
|
|
|
|
|
BigDecimal trailerAmount = new BigDecimal(solutions.getTrailerAmount()); |
|
|
|
|
|
BigDecimal money = new BigDecimal(resultBean.getData().getMoney()); |
|
|
|
|
|
BigDecimal subtract = money.subtract(trailerAmount); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney("-" + subtract); |
|
|
|
|
|
} else { |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney("-" + resultBean.getData().getMoney()); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney("-" + resultBean.getData().getMoney()); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney("-" + resultBean.getData().getMoney()); |
|
|
|
|
|
} |
|
|
|
|
|
}*/ |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney("-" + resultBean.getData().getMoney()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.RONGZI_FANGKUAN.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.RONGZI_FANGKUAN.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
if (null != solutions) { |
|
|
|
|
|
if (StringUtils.isNotBlank(loanOtherReceivablePush.getIsCompInvoic())) { |
|
|
|
|
|
if (loanOtherReceivablePush.getIsCompInvoic().equals("1")) { |
|
|
|
|
|
//挂车待退款
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getTrailerAmount()) && !("0").equals(solutions.getTrailerAmount())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getTrailerAmount()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.GCDTK.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.GCDTK.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
//贷款保证金
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getBondAmounts()) && !("0").equals(solutions.getBondAmounts())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getBondAmounts()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.BOND_AMOUNTS.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.BOND_AMOUNTS.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//保险保证金
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getDepositPremium()) && !("0").equals(solutions.getDepositPremium())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getDepositPremium()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.DEPOSIT_PREMIUM.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.DEPOSIT_PREMIUM.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//落户保证金
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getDepositSettle()) && !("0").equals(solutions.getDepositSettle())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getDepositSettle()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.DEPOSIT_SETTLE.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.DEPOSIT_SETTLE.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//服务费
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getServiceAmount()) && !("0").equals(solutions.getServiceAmount())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.SERVICE_AMOUNT_DANBAO.getType()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getServiceAmount()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.SERVICE_AMOUNT_DANBAO.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//代收意外险
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getProxyAccidentPremium()) && !("0").equals(solutions.getProxyAccidentPremium())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.PROXY_ACCIDENT_PREMIUM.getType()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getProxyAccidentPremium()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.PROXY_ACCIDENT_PREMIUM.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//上牌费、运管费
|
|
|
|
|
|
if ((StringUtils.isNotBlank(solutions.getRegisterAmount()) && !("0").equals(solutions.getRegisterAmount())) || |
|
|
|
|
|
(StringUtils.isNotBlank(solutions.getOperationAmount()) && !("0").equals(solutions.getOperationAmount()))) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
BigDecimal registerAmount = new BigDecimal(solutions.getRegisterAmount()); |
|
|
|
|
|
BigDecimal opertionAmount = new BigDecimal(solutions.getOperationAmount()); |
|
|
|
|
|
BigDecimal add = registerAmount.add(opertionAmount); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.SHANGPAI_YUNGUAN.getType()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(add.toString()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.SHANGPAI_YUNGUAN.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//其它费用
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getOtherAmount()) && !("0").equals(solutions.getOtherAmount())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getOtherAmount()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.OTHER_AMOUNT.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.OTHER_AMOUNT.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//补车价
|
|
|
|
|
|
if (StringUtils.isNotBlank(solutions.getVehOtherPrice()) && !("0").equals(solutions.getVehOtherPrice())) { |
|
|
|
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
|
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
|
|
|
creditResultDetailDto.setExTaxMoney(solutions.getVehOtherPrice()); |
|
|
|
|
|
creditResultDetailDto.setUseTo(CwSystemYT.VEH_OTHER_PRICE.getType()); |
|
|
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(CwSystemYT.VEH_OTHER_PRICE.getType(), "YT").getData(); |
|
|
|
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
|
|
|
creditResultDetailDto.setMaterialNo(vinNoCode); |
|
|
|
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
|
|
|
} |
|
|
|
|
|
//留购价
|
|
|
/* if (StringUtils.isNotBlank(solutions.getNominalPrice()) && !("0").equals(solutions.getNominalPrice())) { |
|
|
/* if (StringUtils.isNotBlank(solutions.getNominalPrice()) && !("0").equals(solutions.getNominalPrice())) { |
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
CapitalCreditResult.CapitalCreditResultDetailDto creditResultDetailDto = new CapitalCreditResult.CapitalCreditResultDetailDto(); |
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
|
creditResultDetailDto.setDearDept(sysOrganizationVo2.getOrgCode()); |
|
@ -585,13 +808,16 @@ public class BusSalesOrderLoancontractService extends MybatisBaseService<BusSale |
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
creditResultDetailDto.setRemarks(dictCommonVo.getDictValue()); |
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
collectionDetailDtoListOne.add(creditResultDetailDto); |
|
|
}*/ |
|
|
}*/ |
|
|
} |
|
|
} |
|
|
creditResult.setResultDetails(collectionDetailDtoListOne); |
|
|
creditResult.setResultDetails(collectionDetailDtoListOne); |
|
|
finKingDeeFeign.pushOtherReceivableBill(creditResult); |
|
|
finKingDeeFeign.pushOtherReceivableBill(creditResult); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
return rb.success(); |
|
|
return rb.success(); |
|
|
} |
|
|
} |
|
|