Browse Source

Merge remote-tracking branch 'origin/master'

zhanglei
dimengzhe 1 year ago
parent
commit
9583dfa123
  1. 31
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java
  2. 2
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.java
  3. 33
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.xml
  4. 20
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java

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

@ -3768,37 +3768,10 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
loanRepaymentHistoryFeign.saveHistoryByEntity(historyEntity);
}
if (v.getReceivablesName().equals("资方退还垫款")) {
try {
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder()
.setNameFormat("demo-pool-%d").build();
ExecutorService pool = new org.apache.tomcat.util.threads.ThreadPoolExecutor(1, 10,
1000, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new org.apache.tomcat.util.threads.ThreadPoolExecutor.AbortPolicy());
//推送资方退还垫款收款凭证
Future future = pool.submit(() -> {
pushReturnVoucher(v, sid);
});
} catch (Exception e) {
e.printStackTrace();
log.error("推送数据失败=========================" + e.getMessage());
}
pushReturnVoucher(v, sid);
}
//推送间还待转付列表
if (v.getReceivablesName().equals("月还") || v.getReceivablesName().equals("资方逾期利息")) {
try {
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder()
.setNameFormat("demo-pool-%d").build();
ExecutorService pool = new org.apache.tomcat.util.threads.ThreadPoolExecutor(1, 10,
1000, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new org.apache.tomcat.util.threads.ThreadPoolExecutor.AbortPolicy());
//推送间还月还收款凭证
Future future = pool.submit(() -> {
pushIndirectVoucher(v, sid);
});
} catch (Exception e) {
e.printStackTrace();
log.error("推送数据失败=========================" + e.getMessage());
}
String planSid = "";
if (v.getReceivablesName().equals("月还")) {
planSid = v.getReceivablesSid();
@ -3888,6 +3861,8 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
}
}
}
//推送间还月还收款凭证
pushIndirectVoucher(v, sid);
}
//认资金占用费消减平台资金占用费
if (v.getReceivablesName().equals("资金占用费")) {

2
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.java

@ -59,4 +59,6 @@ public interface LoanRepaymentHistoryMapper extends BaseMapper<LoanRepaymentHist
List<NoImportVo> selPlanDetailsByBank(@Param("bankSid") String bankSid, @Param("useOrgSid") String useOrgSid);
int updateTimeByPlanSids(@Param("stringList") List<String> stringList, @Param("formatDate") String formatDate);
List<String> selNotRuleForBuckSids(@Param("useOrgSid") String useOrgSid);
}

33
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.xml

@ -508,5 +508,38 @@
WHERE a.bankSid = #{bankSid}
AND a.useOrgSid = #{useOrgSid}
</select>
<select id="selNotRuleForBuckSids" resultType="java.lang.String">
SELECT DISTINCT
b.sid
FROM
(
SELECT
his.*,
a.*
FROM
loan_repayment_history AS his
LEFT JOIN loan_repayment_plan_details as p ON his.planDetailSid = p.sid
LEFT JOIN (
SELECT
h.planDetailSid AS ppp,
IFNULL( SUM( h.actualMoney ), 0 ) AS sumActualMoney
FROM
loan_repayment_history AS h
WHERE
buckleKey != '002'
AND buckleKey != '003'
AND updateState = 1
GROUP BY
h.planDetailSid
) a ON his.planDetailSid = a.ppp
WHERE
his.buckleKey != '002'
AND his.buckleKey != '003'
AND his.updateState = 1
AND p.useOrgSid = #{useOrgSid}
) AS b
WHERE
sumActualMoney &lt;= 0
</select>
</mapper>

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

@ -896,18 +896,20 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
vo.setApplyDate(sdf.format(new Date()));
List<LoanBuckleHistoryRecord> historyRecords = new ArrayList<>();
QueryWrapper<LoanRepaymentHistory> qw = new QueryWrapper<>();
//=======================
String orgSidPath = orgPath;
orgSidPath = orgSidPath + "/";
int i1 = orgSidPath.indexOf("/");
int i2 = orgSidPath.indexOf("/", i1 + 1);
int i3 = orgSidPath.indexOf("/", i2 + 1);
int i4 = orgSidPath.indexOf("/", i3 + 1);
orgSidPath = orgSidPath.substring(0, i3);
qw.like("p.orgSidPath", orgSidPath);
String useOrgSid = "";
ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(orgPath);
if (orgSidByPath.getSuccess()) {
useOrgSid = orgSidByPath.getData();
}
List<String> selNotRuleForBuckSids = baseMapper.selNotRuleForBuckSids(useOrgSid);
if (selNotRuleForBuckSids.isEmpty()) {
selNotRuleForBuckSids = new ArrayList<>();
}
qw.eq("p.orgSidPath", useOrgSid);
qw.ne("h.buckleKey", "002");
qw.ne("h.buckleKey", "003");
qw.eq("h.updateState", "1");
qw.notIn("h.sid",selNotRuleForBuckSids);
List<RepaymentHistoryVoForBuckle> histories = baseMapper.selbuckleNewInitList(qw);
Map<String, BigDecimal> countMoney = new HashMap<>();
Map<String, List<String>> sids = new HashMap<>();

Loading…
Cancel
Save