Browse Source

优化计提资金占用费定时任务

master
fanzongzhe 8 months ago
parent
commit
8fff16ed7a
  1. 9
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/FinKingDeeFeignRest.java
  2. 4
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/voucher/VoucherService.java
  3. 1
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.xml
  4. 2
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml
  5. 11
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/ScheduledRepaymentPlanDetailsService.java

9
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/FinKingDeeFeignRest.java

@ -552,7 +552,7 @@ public class FinKingDeeFeignRest implements FinKingDeeFeign {
//已逾期 //已逾期
dto2.setSummary("收" + voucherDetail.getCustomerName() + "累欠"); dto2.setSummary("收" + voucherDetail.getCustomerName() + "累欠");
dto2.setSubjectNo("1201.02.03"); dto2.setSubjectNo("1201.02.03");
} else if (voucherDetail.getSceneCode().equals(SceneCodeEnum.INDIRECT_VOUCHER3.getCode())){ } else if (voucherDetail.getSceneCode().equals(SceneCodeEnum.INDIRECT_VOUCHER3.getCode())) {
dto2.setSummary("收" + voucherDetail.getCustomerName() + "月还"); dto2.setSummary("收" + voucherDetail.getCustomerName() + "月还");
dto2.setSubjectNo("1201.01.00"); dto2.setSubjectNo("1201.01.00");
} }
@ -1006,14 +1006,9 @@ public class FinKingDeeFeignRest implements FinKingDeeFeign {
String month = split[1]; String month = split[1];
String m = ""; String m = "";
if (voucherDetail.getTimeFlag().equals("0")) { if (voucherDetail.getTimeFlag().equals("0")) {
if (month.equals("01")) { newVoucher.setBussDate(sdf.format(voucherDetail.getDataTime()));
m = "12";
} else {
m = String.valueOf(Integer.parseInt(month) - 1);
} }
} else if (voucherDetail.getTimeFlag().equals("1")) {
m = String.valueOf(Integer.parseInt(month)); m = String.valueOf(Integer.parseInt(month));
}
if (voucherDetail.getSceneCode().equals("借方")) { if (voucherDetail.getSceneCode().equals("借方")) {
Voucher.VoucherResultDetailDto dto1 = new Voucher.VoucherResultDetailDto(); //借方 Voucher.VoucherResultDetailDto dto1 = new Voucher.VoucherResultDetailDto(); //借方
dto1.setSummary("计提" + m + "月逾期利息"); dto1.setSummary("计提" + m + "月逾期利息");

4
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/voucher/VoucherService.java

@ -33,7 +33,11 @@ public class VoucherService extends FinKingDeeService {
map_fEntityModel_.put("FAccountBookID", voucher.getAccountBook()); map_fEntityModel_.put("FAccountBookID", voucher.getAccountBook());
//业务日期 //业务日期
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (StringUtils.isNotBlank(voucher.getBussDate())) {
map_fEntityModel_.put("FDate", voucher.getBussDate());
} else {
map_fEntityModel_.put("FDate", sdf.format(new Date())); map_fEntityModel_.put("FDate", sdf.format(new Date()));
}
//凭证字 //凭证字
map_fEntityModel_.put("FVOUCHERGROUPID", "PZZ34"); map_fEntityModel_.put("FVOUCHERGROUPID", "PZZ34");
List<Voucher.VoucherResultDetailDto> voucherResultDetailDtos = voucher.getResultDetails() == null ? new ArrayList<>() : voucher.getResultDetails(); List<Voucher.VoucherResultDetailDto> voucherResultDetailDtos = voucher.getResultDetails() == null ? new ArrayList<>() : voucher.getResultDetails();

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

@ -770,7 +770,6 @@
) AS t ON pd.sid = t.sid ) AS t ON pd.sid = t.sid
) AS b ) AS b
) c ) a ) c ) a
WHERE a.nowOverdue = 0
<where> <where>
${ew.sqlSegment} ${ew.sqlSegment}
</where> </where>

2
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml

@ -637,7 +637,7 @@
SUM(j.reveivableMoney) as reveivableMoney SUM(j.reveivableMoney) as reveivableMoney
FROM anrui_fin.fin_uncollected_receivables_detailed_jr AS j FROM anrui_fin.fin_uncollected_receivables_detailed_jr AS j
LEFT JOIN loan_repayment_plan_details AS p ON j.busSid = p.sid LEFT JOIN loan_repayment_plan_details AS p ON j.busSid = p.sid
WHERE j.payCostTitleKey = '006' AND j.isEnable != 3 WHERE j.payCostTitleKey = '006'
GROUP BY p.busVinSid GROUP BY p.busVinSid
) as a) as b ) as a) as b
WHERE b.reveivableMoney - b.fund > 0 WHERE b.reveivableMoney - b.fund > 0

11
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/ScheduledRepaymentPlanDetailsService.java

@ -187,7 +187,12 @@ public class ScheduledRepaymentPlanDetailsService {
List<String> useOrgSidList = loanRepaymentPlanDetailsService.selUseOrgSidListForFundVoucher(); List<String> useOrgSidList = loanRepaymentPlanDetailsService.selUseOrgSidListForFundVoucher();
useOrgSidList.removeAll(Collections.singleton(null)); useOrgSidList.removeAll(Collections.singleton(null));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); //取今天日期,如果日期类型为String类型,可以使用df.parse()方法,转换为Date类型
Date date = new Date();
Calendar calendar = Calendar.getInstance();//new一个Calendar类,把Date放进去
calendar.setTime(date);
calendar.add(Calendar.DATE, -1);
Date time = calendar.getTime();
if (!useOrgSidList.isEmpty()) { if (!useOrgSidList.isEmpty()) {
for (String u : useOrgSidList) { for (String u : useOrgSidList) {
List<LoanPlanDetailsVoForFundVoucher> fundVouchers = loanRepaymentPlanDetailsService.getFundForVoucher(u); List<LoanPlanDetailsVoForFundVoucher> fundVouchers = loanRepaymentPlanDetailsService.getFundForVoucher(u);
@ -206,7 +211,7 @@ public class ScheduledRepaymentPlanDetailsService {
} }
GeneralVoucher.GeneralVoucherDetail voucherDetail1 = new GeneralVoucher.GeneralVoucherDetail(); GeneralVoucher.GeneralVoucherDetail voucherDetail1 = new GeneralVoucher.GeneralVoucherDetail();
voucherDetail1.setSceneCode("贷方"); voucherDetail1.setSceneCode("贷方");
voucherDetail1.setDataTime(new Date()); voucherDetail1.setDataTime(time);
voucherDetail1.setAmount(result); voucherDetail1.setAmount(result);
voucherDetail1.setTimeFlag("0"); voucherDetail1.setTimeFlag("0");
List<SysOrganizationVo> deptVo = sysOrganizationFeign.selectChildrenListBySid(u).getData(); List<SysOrganizationVo> deptVo = sysOrganizationFeign.selectChildrenListBySid(u).getData();
@ -226,7 +231,7 @@ public class ScheduledRepaymentPlanDetailsService {
GeneralVoucher.GeneralVoucherDetail voucherDetail = new GeneralVoucher.GeneralVoucherDetail(); GeneralVoucher.GeneralVoucherDetail voucherDetail = new GeneralVoucher.GeneralVoucherDetail();
voucherDetail.setSceneCode("借方"); voucherDetail.setSceneCode("借方");
voucherDetail.setTimeFlag("0"); voucherDetail.setTimeFlag("0");
voucherDetail.setDataTime(new DateTime()); voucherDetail.setDataTime(time);
String cwDeptCode = loanRepaymentPlanDetailsService.fetchCwDeptCodeByBusVinSid(v.getBusVinSid()); String cwDeptCode = loanRepaymentPlanDetailsService.fetchCwDeptCodeByBusVinSid(v.getBusVinSid());
if (StringUtils.isNotBlank(cwDeptCode)) { if (StringUtils.isNotBlank(cwDeptCode)) {
voucherDetail.setDeptCode(cwDeptCode); voucherDetail.setDeptCode(cwDeptCode);

Loading…
Cancel
Save