Browse Source

Merge remote-tracking branch 'origin/master'

master
God 7 months ago
parent
commit
510bf74404
  1. 28
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java
  2. 22
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettleapply/LoanSettleApplyService.java

28
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java

@ -626,6 +626,8 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
//保存还款记录 //保存还款记录
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Set<String> setMsg = new HashSet<>();
StringBuffer sb = new StringBuffer();
if (!dto.isEmpty()) { if (!dto.isEmpty()) {
for (RepaymentExcelInfo repaymentExcelInfo : dto) { for (RepaymentExcelInfo repaymentExcelInfo : dto) {
List<LoanRepaymentPlanDetails> planDetails = loanRepaymentPlanDetailsService.selPlanByNoAndPeriod(repaymentExcelInfo.getBankContractNo(), repaymentExcelInfo.getPeriod()); List<LoanRepaymentPlanDetails> planDetails = loanRepaymentPlanDetailsService.selPlanByNoAndPeriod(repaymentExcelInfo.getBankContractNo(), repaymentExcelInfo.getPeriod());
@ -639,7 +641,27 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
check = loanRepaymentPlanDetailsService.InsertForCheckPaymentAndBankOther(planDetail.getSid()); check = loanRepaymentPlanDetailsService.InsertForCheckPaymentAndBankOther(planDetail.getSid());
} }
if (StringUtils.isNotBlank(check)) { if (StringUtils.isNotBlank(check)) {
if (!check.equals("0")) { if (check.equals("0")) {
setMsg.add("资方合同号" + planDetail.getBankContractNo() + "第" + planDetail.getPeriod() + "期");
}
}
}
}
}
if (setMsg.size() > 0) {
for (String s : setMsg) {
sb.append(s).append("、");
}
if (sb.length() > 0) {
sb.delete(sb.length() - 1, sb.length());
}
sb.append("为非退还垫款导入直还数据,导入失败!");
return rb.setMsg(sb.toString());
} else {
for (RepaymentExcelInfo repaymentExcelInfo : dto) {
List<LoanRepaymentPlanDetails> planDetails = loanRepaymentPlanDetailsService.selPlanByNoAndPeriod(repaymentExcelInfo.getBankContractNo(), repaymentExcelInfo.getPeriod());
if (!planDetails.isEmpty()) {
for (LoanRepaymentPlanDetails planDetail : planDetails) {
LoanRepaymentHistory repaymentHistory = new LoanRepaymentHistory(); LoanRepaymentHistory repaymentHistory = new LoanRepaymentHistory();
repaymentHistory.setBuckle("未申请"); repaymentHistory.setBuckle("未申请");
repaymentHistory.setBuckleKey("001"); repaymentHistory.setBuckleKey("001");
@ -662,7 +684,6 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
} }
} }
} }
}
return rb.success(); return rb.success();
} }
@ -1817,7 +1838,6 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
} }
public List<RecordCountVo> exportStatisticsExcel(RepaymentStatisticsQuery pagerQuery) { public List<RecordCountVo> exportStatisticsExcel(RepaymentStatisticsQuery pagerQuery) {
QueryWrapper<LoanRepaymentHistory> qw = new QueryWrapper<>(); QueryWrapper<LoanRepaymentHistory> qw = new QueryWrapper<>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@ -2304,6 +2324,6 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
} }
public List<AppRepaymentHistoryRecord> selSchSidAndVinNo(String scheduleSid, String vinNo) { public List<AppRepaymentHistoryRecord> selSchSidAndVinNo(String scheduleSid, String vinNo) {
return baseMapper.selSchSidAndVinNo(scheduleSid,vinNo); return baseMapper.selSchSidAndVinNo(scheduleSid, vinNo);
} }
} }

22
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettleapply/LoanSettleApplyService.java

@ -974,7 +974,7 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
//设置认款月还为已转付 //设置认款月还为已转付
updatePaymentStateByBusVinSid(loanSettleApply.getBusVinSid()); updatePaymentStateByBusVinSid(loanSettleApply.getBusVinSid());
//推送财务凭证 //推送财务凭证
pushSettleVoucher(loanSettleApply,check,actualDeposit); pushSettleVoucher(loanSettleApply, check, actualDeposit);
} }
baseMapper.updateById(loanSettleApply); baseMapper.updateById(loanSettleApply);
} else { } else {
@ -1638,7 +1638,7 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
} }
//--------推送财务结清凭证------------------ //--------推送财务结清凭证------------------
private void pushSettleVoucher(LoanSettleApply loanSettleApply,int check,BigDecimal actualDeposit) { private void pushSettleVoucher(LoanSettleApply loanSettleApply, int check, BigDecimal actualDeposit) {
String sid = loanSettleApply.getSid(); String sid = loanSettleApply.getSid();
LoanSettleCompanyCost companyCost = loanSettleCompanyCostService.selectByMainSid(sid); LoanSettleCompanyCost companyCost = loanSettleCompanyCostService.selectByMainSid(sid);
LoanSettleCompanyReduction reduction = loanSettleCompanyReductionService.selectByMainSid(sid); LoanSettleCompanyReduction reduction = loanSettleCompanyReductionService.selectByMainSid(sid);
@ -2896,7 +2896,7 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
//设置认款月还为已转付 //设置认款月还为已转付
updatePaymentStateByBusVinSid(loanSettleApply.getBusVinSid()); updatePaymentStateByBusVinSid(loanSettleApply.getBusVinSid());
//推送财务凭证 //推送财务凭证
pushSettleVoucher(loanSettleApply,1,actualDeposit); pushSettleVoucher(loanSettleApply, 1, actualDeposit);
return rb.success(); return rb.success();
} }
@ -3313,6 +3313,7 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
LoanSettleApply apply = fetchBySid(sid); LoanSettleApply apply = fetchBySid(sid);
LoanSettleBankCost bankCost = loanSettleBankCostService.selectByMainSid(sid); LoanSettleBankCost bankCost = loanSettleBankCostService.selectByMainSid(sid);
// LoanSettleCompanyCost companyCost = loanSettleCompanyCostService.selectByMainSid(sid);
LoanSettleCompanyReduction reduction = loanSettleCompanyReductionService.selectByMainSid(sid); LoanSettleCompanyReduction reduction = loanSettleCompanyReductionService.selectByMainSid(sid);
if (null != apply) { if (null != apply) {
BigDecimal amountAll = BigDecimal.ZERO;//推送资方结清款总数 BigDecimal amountAll = BigDecimal.ZERO;//推送资方结清款总数
@ -3324,6 +3325,10 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
BigDecimal bbjDDMoney = BigDecimal.ZERO; //资方保证金抵顶 BigDecimal bbjDDMoney = BigDecimal.ZERO; //资方保证金抵顶
BigDecimal sub = BigDecimal.ZERO; //资方保证金差额 BigDecimal sub = BigDecimal.ZERO; //资方保证金差额
BigDecimal shouxufeiCW = new BigDecimal(shouxufei); BigDecimal shouxufeiCW = new BigDecimal(shouxufei);
// // 资方未到期金额
// BigDecimal zfwdq = BigDecimal.ZERO;
// // 公司未到期金额
// BigDecimal gswdq = BigDecimal.ZERO;
if (null != reduction) { if (null != reduction) {
if (null != reduction.getNotDuePriceRelief()) { if (null != reduction.getNotDuePriceRelief()) {
companyRelief = reduction.getNotDuePriceRelief(); companyRelief = reduction.getNotDuePriceRelief();
@ -3341,7 +3346,18 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
if (null != bankCost.getLoanDeposit()) { if (null != bankCost.getLoanDeposit()) {
bbjDDMoney = bankCost.getLoanDeposit(); bbjDDMoney = bankCost.getLoanDeposit();
} }
// if (null != bankCost.getNotDuePrice()) {
// zfwdq = bankCost.getNotDuePrice();
// }
} }
// if (null != companyCost) {
// if (null != companyCost.getBankNotPrice()) {
// gswdq = companyCost.getBankNotPrice();
// }
// }
// if (companyRelief.compareTo(BigDecimal.ZERO) == 0 && bankRelief.compareTo(BigDecimal.ZERO) == 0) {
// noRelief = gswdq.subtract(zfwdq);
// }
sub = zfJQK.subtract(bbjDDMoney); sub = zfJQK.subtract(bbjDDMoney);
amountAll = noRelief.add(companyRelief).add(bbjDDMoney).add(sub); amountAll = noRelief.add(companyRelief).add(bbjDDMoney).add(sub);
if (zfJQK.compareTo(BigDecimal.ZERO) > 0) { if (zfJQK.compareTo(BigDecimal.ZERO) > 0) {

Loading…
Cancel
Save