feat: 付款处理查询业务日期窗口天数改为可配置
This commit is contained in:
+5
@@ -247,6 +247,11 @@ public class BfiProperties {
|
||||
* 回写 single-flight 锁租约秒数,须大于最坏一轮耗时(分批远程查询 + 逐单回写)
|
||||
*/
|
||||
private long lockLeaseSeconds = 1800;
|
||||
|
||||
/**
|
||||
* A103-4 付款处理查询业务日期窗口天数,默认 60
|
||||
*/
|
||||
private int queryWindowDays = 60;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
-3
@@ -1185,15 +1185,17 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
|
||||
}
|
||||
|
||||
/**
|
||||
* A103-4 分页查询:按付款人(公司)编码 + 最近1个月业务日期窗口(接口限制不超过1个月),自动翻页
|
||||
* A103-4 分页查询:按付款人(公司)编码 + 业务日期窗口,自动翻页
|
||||
* <p>
|
||||
* 窗口天数取 Nacos thirdParty.bfi.payResult.queryWindowDays(默认 60)
|
||||
*
|
||||
* @param orgNumber 付款人(公司)编码
|
||||
* @return 付款处理单列表
|
||||
*/
|
||||
private List<BfiPayBillVO> queryPayBillPages(String orgNumber) {
|
||||
LocalDate endDate = LocalDate.now();
|
||||
// 业务日期窗口控制在不超过1个月
|
||||
LocalDate beginDate = endDate.minusMonths(1).plusDays(1);
|
||||
int windowDays = Math.max(bfiProperties.getPayResult().getQueryWindowDays(), 1);
|
||||
LocalDate beginDate = endDate.minusDays(windowDays);
|
||||
BfiPayBillQueryDTO param = new BfiPayBillQueryDTO();
|
||||
param.setOrgNumber(List.of(orgNumber));
|
||||
param.setBeginBizdate(beginDate.format(DateTimeFormatter.ISO_LOCAL_DATE));
|
||||
|
||||
Reference in New Issue
Block a user