Browse Source

完善金融认款部分、划扣申请部分

zhanglei
fanzongzhe 1 year ago
parent
commit
f53d7c1586
  1. 26
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java
  2. 5
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyService.java
  3. 13
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java

26
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java

@ -3733,6 +3733,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
} }
LoanRepaymentPlanDetails planDetails = loanRepaymentPlanDetailsFeign.fetchDetails(planSid).getData(); LoanRepaymentPlanDetails planDetails = loanRepaymentPlanDetailsFeign.fetchDetails(planSid).getData();
if (null != planDetails) { if (null != planDetails) {
if (null != planDetails.getPaymentMoney()) {
if (planDetails.getPaymentMoney().compareTo(BigDecimal.ZERO) == 1) { if (planDetails.getPaymentMoney().compareTo(BigDecimal.ZERO) == 1) {
String orderSid = planDetails.getSalesOrderSid(); String orderSid = planDetails.getSalesOrderSid();
ResultBean<LoanFinBank> bankResultBean = loanFinBankFeign.reAdvancesByOrderSid(orderSid); ResultBean<LoanFinBank> bankResultBean = loanFinBankFeign.reAdvancesByOrderSid(orderSid);
@ -3794,6 +3795,31 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
loanRepaymentHistoryFeign.saveHistoryByEntity(historyEntity); loanRepaymentHistoryFeign.saveHistoryByEntity(historyEntity);
} }
} else {
LoanRepaymentHistory historyEntity = new LoanRepaymentHistory();
historyEntity.setSkdBillNo(finalConfirmation.getBillNo());
historyEntity.setActualMoney(new BigDecimal(v.getSubscriptionMoney()));
historyEntity.setActualDate(new DateTime());
historyEntity.setReturnWay("间还");
historyEntity.setReturnWayKey("02");
historyEntity.setPaymentState("待转付");
historyEntity.setPaymentStateKey("001");
Date dueDate = planDetails.getDueDate();
if (new Date().compareTo(dueDate) > 0) {
historyEntity.setPrepareDate(new DateTime());
} else {
Calendar cal_1 = Calendar.getInstance();// 使用默认时区和语言环境获得一个日历
cal_1.setTime(dueDate);
cal_1.add(Calendar.DAY_OF_MONTH, -1);
historyEntity.setPrepareDate(cal_1.getTime());
}
historyEntity.setPrepareDate(new DateTime());
historyEntity.setPlanDetailSid(planSid);
historyEntity.setScheduleSid(planDetails.getScheduleSid());
loanRepaymentHistoryFeign.saveHistoryByEntity(historyEntity);
}
} }
} }
}); });

5
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyService.java

@ -682,8 +682,11 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth
private void pushAccrualVoucher(String businessSid) { private void pushAccrualVoucher(String businessSid) {
List<LoanMonthlyAccrualRecord> records = loanMonthlyAccrualRecordService.selByMainSid(businessSid); List<LoanMonthlyAccrualRecord> records = loanMonthlyAccrualRecordService.selByMainSid(businessSid);
// xxxxxxxxx if (!records.isEmpty()) {
}
} }

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

@ -713,12 +713,6 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
qw.ne("h.buckleKey", "002"); qw.ne("h.buckleKey", "002");
qw.ne("h.buckleKey", "003"); qw.ne("h.buckleKey", "003");
qw.eq("h.updateState", "0"); qw.eq("h.updateState", "0");
List<String> monthHeadAndLast = getMonthHeadAndLast(new Date());
String head = monthHeadAndLast.get(0);
String last = monthHeadAndLast.get(1);
qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')").
apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')"
);
List<String> histories = baseMapper.selUpdateStateList(qw); List<String> histories = baseMapper.selUpdateStateList(qw);
if (!histories.isEmpty()) { if (!histories.isEmpty()) {
for (String historySid : histories) { for (String historySid : histories) {
@ -753,12 +747,7 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
qw.like("p.orgSidPath", orgSidPath); qw.like("p.orgSidPath", orgSidPath);
qw.ne("h.buckleKey", "002"); qw.ne("h.buckleKey", "002");
qw.ne("h.buckleKey", "003"); qw.ne("h.buckleKey", "003");
List<String> monthHeadAndLast = getMonthHeadAndLast(new Date()); qw.eq("h.updateState","1");
String head = monthHeadAndLast.get(0);
String last = monthHeadAndLast.get(1);
qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')").
apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')"
);
List<LoanRepaymentHistoryVo> histories = baseMapper.selbuckleNewInitList(qw); List<LoanRepaymentHistoryVo> histories = baseMapper.selbuckleNewInitList(qw);
Set<String> planSids = new HashSet<>(); Set<String> planSids = new HashSet<>();
if (!histories.isEmpty()) { if (!histories.isEmpty()) {

Loading…
Cancel
Save