|
|
@ -321,6 +321,17 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
if (StringUtils.isNotBlank(dto.getOtherBankNo())) { |
|
|
|
loanRepaymentSchedule.setOtherBankNo(dto.getOtherBankNo()); |
|
|
|
} |
|
|
|
List<String> repayDate = returnRepayDate(dto.getMainRepayDate(), dto.getMainPeriod()); |
|
|
|
if (!repayDate.isEmpty()) { |
|
|
|
String lastDate = repayDate.get(repayDate.size() - 1); |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
try { |
|
|
|
Date date = sdf.parse(lastDate); |
|
|
|
loanRepaymentSchedule.setMainLastDate(date); |
|
|
|
} catch (ParseException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
baseMapper.updateById(loanRepaymentSchedule); |
|
|
|
loanRepaymentPlanDetailsService.deletePlanDetails(loanRepaymentSchedule.getSid()); |
|
|
|
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(orderSid).getData(); |
|
|
@ -620,7 +631,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
} else if (i == Integer.parseInt(otherPeriod) - 1) { |
|
|
|
otherRepay = new BigDecimal(otherLastPay); |
|
|
|
} else if (i < Integer.parseInt(otherPeriod) - 1) { |
|
|
|
otherRepay = new BigDecimal(otherLastPay); |
|
|
|
otherRepay = new BigDecimal(otherMidPay); |
|
|
|
} |
|
|
|
if (i == 0) { |
|
|
|
BigDecimal mainF = new BigDecimal(mainFirstRepay); |
|
|
@ -1005,7 +1016,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
} else if (i == Integer.parseInt(otherPeriod) - 1) { |
|
|
|
otherRepay = new BigDecimal(otherLastPay); |
|
|
|
} else if (i > 0 && i < Integer.parseInt(otherPeriod) - 1) { |
|
|
|
otherRepay = new BigDecimal(otherLastPay); |
|
|
|
otherRepay = new BigDecimal(otherMidPay); |
|
|
|
} |
|
|
|
if (i == 0) { |
|
|
|
BigDecimal mainF = new BigDecimal(mainFirstRepay); |
|
|
@ -1607,89 +1618,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
return rb.success().setData(vo); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 还款计划表多台回显 |
|
|
|
* |
|
|
|
* @param salesOrderSid |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
// public ResultBean<LoanCreateScheduleVinsVo> viewVinsSchedule2(String salesOrderSid) {
|
|
|
|
// ResultBean<LoanCreateScheduleVinsVo> rb = ResultBean.fireFail();
|
|
|
|
// LoanCreateScheduleVinsVo vo = new LoanCreateScheduleVinsVo();
|
|
|
|
// BusSalesOrderLoancontractDetailsVo loancontract = busSalesOrderLoancontractFeign.fetchDetailsBySid(salesOrderSid).getData();
|
|
|
|
// if (null != loancontract) {
|
|
|
|
// if (StringUtils.isNotBlank(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.getBorrowerName())) {
|
|
|
|
// vo.setBorrowerName(loancontract.getBorrowerName());
|
|
|
|
// }
|
|
|
|
// LoanRepaymentSchedule schedule = baseMapper.selByLoanContractSid(salesOrderSid);
|
|
|
|
// if (null != schedule) {
|
|
|
|
// if (StringUtils.isNotBlank(schedule.getIsOtherPolicy())) {
|
|
|
|
// vo.setIsOtherPolicy(schedule.getIsOtherPolicy());
|
|
|
|
// }
|
|
|
|
// if (null != schedule.getMainRepayDate()) {
|
|
|
|
// mainDate = sdf.format(schedule.getMainRepayDate());
|
|
|
|
// }
|
|
|
|
// if (null != schedule.getOtherRepayDate()) {
|
|
|
|
// otherDate = sdf.format(schedule.getOtherRepayDate());
|
|
|
|
// }
|
|
|
|
// //主产品月还日
|
|
|
|
// if (StringUtils.isNotBlank(mainDate)) {
|
|
|
|
// String[] splitMainDate = mainDate.split("-");
|
|
|
|
// String day = splitMainDate[2];
|
|
|
|
// if (day.length() == 2 && Integer.parseInt(day) >= 10) {
|
|
|
|
// vo.setMainRepayDate(day);
|
|
|
|
// } else {
|
|
|
|
// vo.setMainRepayDate(day.replace("0", ""));
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// //其他融月还日
|
|
|
|
// if (StringUtils.isNotBlank(otherDate)) {
|
|
|
|
// String[] splitOtherDate = otherDate.split("-");
|
|
|
|
// String day = splitOtherDate[2];
|
|
|
|
// if (day.length() == 2 && Integer.parseInt(day) >= 10) {
|
|
|
|
// vo.setOtherRepayDate(day);
|
|
|
|
// } else {
|
|
|
|
// vo.setOtherRepayDate(day.replace("0", ""));
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// 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()) {
|
|
|
|
// List<String> vinList = new ArrayList<>();
|
|
|
|
// for (String linkNo : stringVinNos) {
|
|
|
|
// String vinNo = "";
|
|
|
|
// if (linkNo.length() > 8) {
|
|
|
|
// vinNo = linkNo.substring(linkNo.length() - 8);
|
|
|
|
//
|
|
|
|
// } else {
|
|
|
|
// vinNo = linkNo;
|
|
|
|
// }
|
|
|
|
// vinList.add(vinNo);
|
|
|
|
// }
|
|
|
|
// vo.setVinNo(String.join(",", vinList));
|
|
|
|
// }
|
|
|
|
// for (BusSalesOrderVehicle busSalesOrderVehicle : busSalesOrderVehicles) {
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// vo.setSalesOrderSid(salesOrderSid);
|
|
|
|
// return rb.success().setData(vo);
|
|
|
|
// }
|
|
|
|
|
|
|
|
/** |
|
|
|
* 生成pdf |
|
|
|
* |
|
|
|