|
@ -8,7 +8,9 @@ import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; |
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; |
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; |
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.SolutionsDetailsssVo; |
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.SolutionsDetailsssVo; |
|
|
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontract; |
|
|
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontract; |
|
|
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontractDetailsVo; |
|
|
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontractFeign; |
|
|
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontractFeign; |
|
|
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontractVo; |
|
|
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; |
|
|
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; |
|
|
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; |
|
|
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; |
|
|
import com.yxt.anrui.buscenter.api.busvehicledatahandover.BusDataListPdfVo; |
|
|
import com.yxt.anrui.buscenter.api.busvehicledatahandover.BusDataListPdfVo; |
|
@ -84,7 +86,8 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
LoanCreateSchedulePdfVo vo = new LoanCreateSchedulePdfVo(); |
|
|
LoanCreateSchedulePdfVo vo = new LoanCreateSchedulePdfVo(); |
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
vo.setSalesOrderSid(salesOrderSid); |
|
|
vo.setSalesOrderSid(salesOrderSid); |
|
|
BusSalesOrderLoancontract loancontract = busSalesOrderLoancontractFeign.fetchDetailsByOrderSid(salesOrderSid).getData(); |
|
|
BusSalesOrderLoancontractDetailsVo loancontract = busSalesOrderLoancontractFeign.fetchDetailsBySid(salesOrderSid).getData(); |
|
|
|
|
|
String orderSid = ""; |
|
|
if (null != loancontract) { |
|
|
if (null != loancontract) { |
|
|
// 消贷合同编号
|
|
|
// 消贷合同编号
|
|
|
if (StringUtils.isNotBlank(loancontract.getLoanContractNo())) { |
|
|
if (StringUtils.isNotBlank(loancontract.getLoanContractNo())) { |
|
@ -98,91 +101,97 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
if (StringUtils.isNotBlank(loancontract.getBorrowerName())) { |
|
|
if (StringUtils.isNotBlank(loancontract.getBorrowerName())) { |
|
|
vo.setBorrowerName(loancontract.getBorrowerName()); |
|
|
vo.setBorrowerName(loancontract.getBorrowerName()); |
|
|
} |
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(loancontract.getSalesOrderSid())) { |
|
|
|
|
|
orderSid = loancontract.getSalesOrderSid(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
LoanSolutions loanSolutions = loanSolutionsService.selectBySaleOrderSid(salesOrderSid); |
|
|
if (StringUtils.isNotBlank(orderSid)) { |
|
|
if (null != loanSolutions) { |
|
|
LoanSolutions loanSolutions = loanSolutionsService.selectBySaleOrderSid(orderSid); |
|
|
//------金融方案-----------
|
|
|
if (null != loanSolutions) { |
|
|
ResultBean<SolutionsDetailsVo> solutionsDetailsVoResultBean = loanSolutionsService.selectDetailss(salesOrderSid); |
|
|
//------金融方案-----------
|
|
|
if (solutionsDetailsVoResultBean.getData() != null) { |
|
|
ResultBean<SolutionsDetailsVo> solutionsDetailsVoResultBean = loanSolutionsService.selectDetailss(orderSid); |
|
|
LoanSolutionsDetailsssVo solutionsDetailsssVo = new LoanSolutionsDetailsssVo(); |
|
|
if (solutionsDetailsVoResultBean.getData() != null) { |
|
|
BeanUtil.copyProperties(solutionsDetailsVoResultBean.getData(), solutionsDetailsssVo); |
|
|
LoanSolutionsDetailsssVo solutionsDetailsssVo = new LoanSolutionsDetailsssVo(); |
|
|
vo.setSolutionsDetailsssVo(solutionsDetailsssVo); |
|
|
BeanUtil.copyProperties(solutionsDetailsVoResultBean.getData(), solutionsDetailsssVo); |
|
|
} |
|
|
vo.setSolutionsDetailsssVo(solutionsDetailsssVo); |
|
|
// 产品方案sid
|
|
|
|
|
|
vo.setSolutionsSid(loanSolutions.getSid()); |
|
|
|
|
|
// 主金融产品
|
|
|
|
|
|
if (StringUtils.isNotBlank(loanSolutions.getPolicyName())) { |
|
|
|
|
|
vo.setPolicyName(loanSolutions.getPolicyName()); |
|
|
|
|
|
} |
|
|
|
|
|
// 主产品贷款金额
|
|
|
|
|
|
if (null != loanSolutions.getLoanAmount()) { |
|
|
|
|
|
vo.setLoanAmount(loanSolutions.getLoanAmount().toString()); |
|
|
|
|
|
} |
|
|
|
|
|
// 主产品期数
|
|
|
|
|
|
if (StringUtils.isNotBlank(loanSolutions.getLoanPeriod())) { |
|
|
|
|
|
vo.setMainPeriod(loanSolutions.getLoanPeriod()); |
|
|
|
|
|
} |
|
|
|
|
|
LoanRepaymentSchedule schedule = baseMapper.selectByOrderSid(salesOrderSid); |
|
|
|
|
|
if (null != schedule) { |
|
|
|
|
|
// 主产品首期还款日
|
|
|
|
|
|
if (null != schedule.getMainRepayDate()) { |
|
|
|
|
|
vo.setMainRepayDate(sdf.format(schedule.getMainRepayDate())); |
|
|
|
|
|
} |
|
|
|
|
|
// 主产品首期月还
|
|
|
|
|
|
if (null != schedule.getMainFirstRepay()) { |
|
|
|
|
|
|
|
|
|
|
|
vo.setMainFirstRepay(schedule.getMainFirstRepay().toString()); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// 主产品期间月还
|
|
|
// 产品方案sid
|
|
|
if (null != schedule.getMainMidRepay()) { |
|
|
vo.setSolutionsSid(loanSolutions.getSid()); |
|
|
vo.setMainMidRepay(schedule.getMainMidRepay().toString()); |
|
|
// 主金融产品
|
|
|
|
|
|
if (StringUtils.isNotBlank(loanSolutions.getPolicyName())) { |
|
|
|
|
|
vo.setPolicyName(loanSolutions.getPolicyName()); |
|
|
} |
|
|
} |
|
|
// 主产品期末月还
|
|
|
// 主产品贷款金额
|
|
|
if (null != schedule.getMainLastRepay()) { |
|
|
if (null != loanSolutions.getLoanAmount()) { |
|
|
vo.setMainLastRepay(schedule.getMainLastRepay().toString()); |
|
|
vo.setLoanAmount(loanSolutions.getLoanAmount().toString()); |
|
|
} |
|
|
} |
|
|
} |
|
|
// 主产品期数
|
|
|
//查看是否有其他融
|
|
|
if (StringUtils.isNotBlank(loanSolutions.getLoanPeriod())) { |
|
|
LoanSolutionsOtherpolicy otherpolicy = loanSolutionsOtherpolicyService.selectByLoanSid(loanSolutions.getSid()); |
|
|
vo.setMainPeriod(loanSolutions.getLoanPeriod()); |
|
|
if (null != otherpolicy) { |
|
|
} |
|
|
if (StringUtils.isNotBlank(otherpolicy.getOtherPolicyPeriod())) { |
|
|
LoanRepaymentSchedule schedule = baseMapper.selectByContractSid(salesOrderSid); |
|
|
vo.setIsOtherPolicy("1"); |
|
|
if (null != schedule) { |
|
|
// 其他融产品
|
|
|
// 主产品首期还款日
|
|
|
if (StringUtils.isNotBlank(otherpolicy.getOtherPolicyName())) { |
|
|
if (null != schedule.getMainRepayDate()) { |
|
|
vo.setOtherPolicyName(otherpolicy.getOtherPolicyName()); |
|
|
vo.setMainRepayDate(sdf.format(schedule.getMainRepayDate())); |
|
|
} |
|
|
} |
|
|
// 其他融贷款金额
|
|
|
// 主产品首期月还
|
|
|
if (null != otherpolicy.getOtherPolicyAmount()) { |
|
|
if (null != schedule.getMainFirstRepay()) { |
|
|
vo.setOtherAmount(otherpolicy.getOtherPolicyAmount().toString()); |
|
|
|
|
|
|
|
|
vo.setMainFirstRepay(schedule.getMainFirstRepay().toString()); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// 其他融期数
|
|
|
// 主产品期间月还
|
|
|
if (StringUtils.isNotBlank(otherpolicy.getOtherPolicyPeriod())) { |
|
|
if (null != schedule.getMainMidRepay()) { |
|
|
vo.setOtherPeriod(otherpolicy.getOtherPolicyPeriod()); |
|
|
vo.setMainMidRepay(schedule.getMainMidRepay().toString()); |
|
|
|
|
|
} |
|
|
|
|
|
// 主产品期末月还
|
|
|
|
|
|
if (null != schedule.getMainLastRepay()) { |
|
|
|
|
|
vo.setMainLastRepay(schedule.getMainLastRepay().toString()); |
|
|
} |
|
|
} |
|
|
if (null != schedule) { |
|
|
} |
|
|
// 其他融首期还款日
|
|
|
//查看是否有其他融
|
|
|
if (null != schedule.getOtherRepayDate()) { |
|
|
LoanSolutionsOtherpolicy otherpolicy = loanSolutionsOtherpolicyService.selectByLoanSid(loanSolutions.getSid()); |
|
|
vo.setOtherRepayDate(sdf.format(schedule.getOtherRepayDate())); |
|
|
if (null != otherpolicy) { |
|
|
|
|
|
if (StringUtils.isNotBlank(otherpolicy.getOtherPolicyPeriod())) { |
|
|
|
|
|
vo.setIsOtherPolicy("1"); |
|
|
|
|
|
// 其他融产品
|
|
|
|
|
|
if (StringUtils.isNotBlank(otherpolicy.getOtherPolicyName())) { |
|
|
|
|
|
vo.setOtherPolicyName(otherpolicy.getOtherPolicyName()); |
|
|
} |
|
|
} |
|
|
// 其他融首期月还
|
|
|
// 其他融贷款金额
|
|
|
if (null != schedule.getOtherFirstRepay()) { |
|
|
if (null != otherpolicy.getOtherPolicyAmount()) { |
|
|
vo.setOtherFirstRepay(schedule.getOtherFirstRepay().toString()); |
|
|
vo.setOtherAmount(otherpolicy.getOtherPolicyAmount().toString()); |
|
|
} |
|
|
} |
|
|
// 其他融期间月还
|
|
|
// 其他融期数
|
|
|
if (null != schedule.getOtherMidRepay()) { |
|
|
if (StringUtils.isNotBlank(otherpolicy.getOtherPolicyPeriod())) { |
|
|
vo.setOtherMidRepay(schedule.getOtherMidRepay().toString()); |
|
|
vo.setOtherPeriod(otherpolicy.getOtherPolicyPeriod()); |
|
|
} |
|
|
} |
|
|
// 其他融期末月还
|
|
|
if (null != schedule) { |
|
|
if (null != schedule.getOtherLastRepay()) { |
|
|
// 其他融首期还款日
|
|
|
vo.setOtherLastRepay(schedule.getOtherLastRepay().toString()); |
|
|
if (null != schedule.getOtherRepayDate()) { |
|
|
|
|
|
vo.setOtherRepayDate(sdf.format(schedule.getOtherRepayDate())); |
|
|
|
|
|
} |
|
|
|
|
|
// 其他融首期月还
|
|
|
|
|
|
if (null != schedule.getOtherFirstRepay()) { |
|
|
|
|
|
vo.setOtherFirstRepay(schedule.getOtherFirstRepay().toString()); |
|
|
|
|
|
} |
|
|
|
|
|
// 其他融期间月还
|
|
|
|
|
|
if (null != schedule.getOtherMidRepay()) { |
|
|
|
|
|
vo.setOtherMidRepay(schedule.getOtherMidRepay().toString()); |
|
|
|
|
|
} |
|
|
|
|
|
// 其他融期末月还
|
|
|
|
|
|
if (null != schedule.getOtherLastRepay()) { |
|
|
|
|
|
vo.setOtherLastRepay(schedule.getOtherLastRepay().toString()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
vo.setIsOtherPolicy("0"); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
|
|
|
vo.setIsOtherPolicy("0"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return rb.success().setData(vo); |
|
|
return rb.success().setData(vo); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -195,7 +204,14 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public ResultBean<String> loanCreateSchedulePdf(LoanCreateSchedulePdfVo dto) { |
|
|
public ResultBean<String> loanCreateSchedulePdf(LoanCreateSchedulePdfVo dto) { |
|
|
ResultBean<String> rb = ResultBean.fireFail(); |
|
|
ResultBean<String> rb = ResultBean.fireFail(); |
|
|
LoanRepaymentSchedule loanRepaymentSchedule = baseMapper.selectByOrderSid(dto.getSalesOrderSid()); |
|
|
LoanRepaymentSchedule loanRepaymentSchedule = baseMapper.selectByContractSid(dto.getSalesOrderSid()); |
|
|
|
|
|
String orderSid = ""; |
|
|
|
|
|
BusSalesOrderLoancontractDetailsVo loancontract = busSalesOrderLoancontractFeign.fetchDetailsBySid(dto.getSalesOrderSid()).getData(); |
|
|
|
|
|
if (null != loancontract) { |
|
|
|
|
|
if (StringUtils.isNotBlank(loancontract.getSalesOrderSid())) { |
|
|
|
|
|
orderSid = loancontract.getSalesOrderSid(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
if (StringUtils.isBlank(dto.getMainRepayDate())) { |
|
|
if (StringUtils.isBlank(dto.getMainRepayDate())) { |
|
|
return rb.setMsg("请选择主金融产品首期还款日!"); |
|
|
return rb.setMsg("请选择主金融产品首期还款日!"); |
|
|
} |
|
|
} |
|
@ -224,11 +240,15 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
} |
|
|
} |
|
|
if (null != loanRepaymentSchedule) { |
|
|
if (null != loanRepaymentSchedule) { |
|
|
BeanUtil.copyProperties(dto, loanRepaymentSchedule, "id", "sid"); |
|
|
BeanUtil.copyProperties(dto, loanRepaymentSchedule, "id", "sid"); |
|
|
|
|
|
loanRepaymentSchedule.setLoanContractSid(dto.getSalesOrderSid()); |
|
|
|
|
|
loanRepaymentSchedule.setSalesOrderSid(orderSid); |
|
|
baseMapper.updateById(loanRepaymentSchedule); |
|
|
baseMapper.updateById(loanRepaymentSchedule); |
|
|
} else { |
|
|
} else { |
|
|
LoanRepaymentSchedule entity = new LoanRepaymentSchedule(); |
|
|
LoanRepaymentSchedule entity = new LoanRepaymentSchedule(); |
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(dto.getSalesOrderSid()).getData(); |
|
|
entity.setLoanContractSid(dto.getSalesOrderSid()); |
|
|
|
|
|
entity.setSalesOrderSid(orderSid); |
|
|
|
|
|
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(orderSid).getData(); |
|
|
if (null != busSalesOrder) { |
|
|
if (null != busSalesOrder) { |
|
|
if (StringUtils.isNotBlank(busSalesOrder.getCreateBySid())) { |
|
|
if (StringUtils.isNotBlank(busSalesOrder.getCreateBySid())) { |
|
|
entity.setStaffSid(busSalesOrder.getCreateBySid()); |
|
|
entity.setStaffSid(busSalesOrder.getCreateBySid()); |
|
@ -237,7 +257,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
entity.setStaffName(busSalesOrder.getStaffName()); |
|
|
entity.setStaffName(busSalesOrder.getStaffName()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
List<BusSalesOrderVehicle> busSalesOrderVehicles = busSalesOrderVehicleFeign.selectListByOrderSid(dto.getSalesOrderSid()).getData(); |
|
|
List<BusSalesOrderVehicle> busSalesOrderVehicles = busSalesOrderVehicleFeign.selbyContractSid(dto.getSalesOrderSid()).getData(); |
|
|
busSalesOrderVehicles.removeAll(Collections.singleton(null)); |
|
|
busSalesOrderVehicles.removeAll(Collections.singleton(null)); |
|
|
if (!busSalesOrderVehicles.isEmpty()) { |
|
|
if (!busSalesOrderVehicles.isEmpty()) { |
|
|
List<String> stringVinNos = busSalesOrderVehicles.stream().map(c -> c.getLinkNo()).collect(Collectors.toList()); |
|
|
List<String> stringVinNos = busSalesOrderVehicles.stream().map(c -> c.getLinkNo()).collect(Collectors.toList()); |
|
@ -245,16 +265,17 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
entity.setVinNo(String.join(",", stringVinNos)); |
|
|
entity.setVinNo(String.join(",", stringVinNos)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
BusSalesOrderLoancontract loancontract = busSalesOrderLoancontractFeign.fetchDetailsByOrderSid(dto.getSalesOrderSid()).getData(); |
|
|
|
|
|
if (null != loancontract) { |
|
|
BusSalesOrderLoancontractDetailsVo loancontractVo = busSalesOrderLoancontractFeign.fetchDetailsBySid(dto.getSalesOrderSid()).getData(); |
|
|
if (StringUtils.isNotBlank(loancontract.getBorrowerSid())) { |
|
|
if (null != loancontractVo) { |
|
|
entity.setBorrowerSid(loancontract.getBorrowerSid()); |
|
|
if (StringUtils.isNotBlank(loancontractVo.getBorrowerSid())) { |
|
|
|
|
|
entity.setBorrowerSid(loancontractVo.getBorrowerSid()); |
|
|
} |
|
|
} |
|
|
if (StringUtils.isNotBlank(loancontract.getBankName())) { |
|
|
if (StringUtils.isNotBlank(loancontractVo.getBankName())) { |
|
|
entity.setBankName(loancontract.getBankName()); |
|
|
entity.setBankName(loancontractVo.getBankName()); |
|
|
} |
|
|
} |
|
|
if (StringUtils.isNotBlank(loancontract.getPolicyName())) { |
|
|
if (StringUtils.isNotBlank(loancontractVo.getPolicyName())) { |
|
|
entity.setPolicyName(loancontract.getPolicyName()); |
|
|
entity.setPolicyName(loancontractVo.getPolicyName()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
baseMapper.insert(entity); |
|
|
baseMapper.insert(entity); |
|
@ -267,7 +288,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
String pdfPath = commonCreatePdf(createScheduleVinsVo); |
|
|
String pdfPath = commonCreatePdf(createScheduleVinsVo); |
|
|
String filePath = pdfPath.substring(docPdfComponent.getUploadTemplateUrl().length()); |
|
|
String filePath = pdfPath.substring(docPdfComponent.getUploadTemplateUrl().length()); |
|
|
returnPath = template + filePath; |
|
|
returnPath = template + filePath; |
|
|
LoanRepaymentSchedule entity = baseMapper.selectByOrderSid(dto.getSalesOrderSid()); |
|
|
LoanRepaymentSchedule entity = baseMapper.selectByContractSid(dto.getSalesOrderSid()); |
|
|
if (null != entity) { |
|
|
if (null != entity) { |
|
|
entity.setSchedulePath(filePath); |
|
|
entity.setSchedulePath(filePath); |
|
|
baseMapper.updateById(entity); |
|
|
baseMapper.updateById(entity); |
|
@ -285,13 +306,33 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
public ResultBean<LoanCreateScheduleVinsVo> viewVinsSchedule(String salesOrderSid) { |
|
|
public ResultBean<LoanCreateScheduleVinsVo> viewVinsSchedule(String salesOrderSid) { |
|
|
ResultBean<LoanCreateScheduleVinsVo> rb = ResultBean.fireFail(); |
|
|
ResultBean<LoanCreateScheduleVinsVo> rb = ResultBean.fireFail(); |
|
|
LoanCreateScheduleVinsVo vo = new LoanCreateScheduleVinsVo(); |
|
|
LoanCreateScheduleVinsVo vo = new LoanCreateScheduleVinsVo(); |
|
|
BusSalesOrderLoancontract loancontract = busSalesOrderLoancontractFeign.fetchDetailsByOrderSid(salesOrderSid).getData(); |
|
|
BusSalesOrderLoancontractDetailsVo loancontract = busSalesOrderLoancontractFeign.fetchDetailsBySid(salesOrderSid).getData(); |
|
|
if (null != loancontract) { |
|
|
if (null != loancontract) { |
|
|
if (StringUtils.isNotBlank(loancontract.getBankName())) { |
|
|
if (StringUtils.isNotBlank(loancontract.getBankName())) { |
|
|
vo.setBankName(loancontract.getBankName()); |
|
|
vo.setBankName(loancontract.getBankName()); |
|
|
} |
|
|
} |
|
|
|
|
|
if (null != loancontract.getVehCount()) { |
|
|
|
|
|
vo.setVehCount(String.valueOf(loancontract.getVehCount())); |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(loancontract.getLoanContractNo())) { |
|
|
|
|
|
vo.setLoanContractNo(loancontract.getLoanContractNo()); |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(loancontract.getLoanContractNo())) { |
|
|
|
|
|
vo.setLoanContractNo(loancontract.getLoanContractNo()); |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(loancontract.getBorrowerName())) { |
|
|
|
|
|
vo.setBorrowerName(loancontract.getBorrowerName()); |
|
|
|
|
|
} |
|
|
|
|
|
List<BusSalesOrderVehicle> busSalesOrderVehicles = busSalesOrderVehicleFeign.selbyContractSid(salesOrderSid).getData(); |
|
|
|
|
|
busSalesOrderVehicles.removeAll(Collections.singleton(null)); |
|
|
|
|
|
if (!busSalesOrderVehicles.isEmpty()) { |
|
|
|
|
|
List<String> stringVinNos = busSalesOrderVehicles.stream().map(c -> c.getLinkNo()).collect(Collectors.toList()); |
|
|
|
|
|
if (!stringVinNos.isEmpty()) { |
|
|
|
|
|
vo.setVinNo(String.join(",", stringVinNos)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
LoanRepaymentSchedule schedule = baseMapper.selectByOrderSid(salesOrderSid); |
|
|
LoanRepaymentSchedule schedule = baseMapper.selectByContractSid(salesOrderSid); |
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
String mainDate = ""; |
|
|
String mainDate = ""; |
|
|
String otherDate = ""; |
|
|
String otherDate = ""; |
|
@ -446,6 +487,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
vo.setSalesOrderSid(salesOrderSid); |
|
|
return rb.success().setData(vo); |
|
|
return rb.success().setData(vo); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -517,7 +559,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
public ResultBean<List<LoanCreateScheduleVinOneVo>> viewVinOneSchedule(String salesOrderSid) { |
|
|
public ResultBean<List<LoanCreateScheduleVinOneVo>> viewVinOneSchedule(String salesOrderSid) { |
|
|
ResultBean<List<LoanCreateScheduleVinOneVo>> rb = ResultBean.fireFail(); |
|
|
ResultBean<List<LoanCreateScheduleVinOneVo>> rb = ResultBean.fireFail(); |
|
|
List<LoanCreateScheduleVinOneVo> list = new ArrayList<>(); |
|
|
List<LoanCreateScheduleVinOneVo> list = new ArrayList<>(); |
|
|
LoanRepaymentSchedule schedule = baseMapper.selectByOrderSid(salesOrderSid); |
|
|
LoanRepaymentSchedule schedule = baseMapper.selectByContractSid(salesOrderSid); |
|
|
LoanCreateScheduleVinsVo scheduleVinsVo = viewVinsSchedule(salesOrderSid).getData(); |
|
|
LoanCreateScheduleVinsVo scheduleVinsVo = viewVinsSchedule(salesOrderSid).getData(); |
|
|
if (null != schedule) { |
|
|
if (null != schedule) { |
|
|
if (StringUtils.isNotBlank(schedule.getVinNo())) { |
|
|
if (StringUtils.isNotBlank(schedule.getVinNo())) { |
|
@ -757,14 +799,14 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
return rb.success().setData(vo); |
|
|
return rb.success().setData(vo); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public ResultBean<List<AppRepaymentPlanListDetailsVo>> getRepaymentPlanListByVinNo(String vinNo , String sid) { |
|
|
public ResultBean<List<AppRepaymentPlanListDetailsVo>> getRepaymentPlanListByVinNo(String vinNo, String sid) { |
|
|
ResultBean<List<AppRepaymentPlanListDetailsVo>> rb = ResultBean.fireFail(); |
|
|
ResultBean<List<AppRepaymentPlanListDetailsVo>> rb = ResultBean.fireFail(); |
|
|
AppRepaymentPlanDetailsVo data = getRepaymentPlanListBySid(sid).getData(); |
|
|
AppRepaymentPlanDetailsVo data = getRepaymentPlanListBySid(sid).getData(); |
|
|
if (null != data) { |
|
|
if (null != data) { |
|
|
List<AppRepaymentPlanListDetailsVo> records = data.getRecords(); |
|
|
List<AppRepaymentPlanListDetailsVo> records = data.getRecords(); |
|
|
records.removeAll(Collections.singleton(null)); |
|
|
records.removeAll(Collections.singleton(null)); |
|
|
if (!records.isEmpty()) |
|
|
if (!records.isEmpty()) |
|
|
return rb.success().setData(records); |
|
|
return rb.success().setData(records); |
|
|
} |
|
|
} |
|
|
return rb.success(); |
|
|
return rb.success(); |
|
|
} |
|
|
} |
|
|