Merge branch 'fix/a801-3-writeback-dedup-key' into feature/payment-apply-bfi-sync
This commit is contained in:
+4
-3
@@ -927,12 +927,13 @@ public class InvoiceReceiptServiceImpl extends BaseServiceImpl<InvoiceReceiptMap
|
||||
int filled = 0;
|
||||
List<String> failures = new ArrayList<>();
|
||||
for (Map.Entry<String, List<InvoiceReceipt>> entry : receiptsByBuyer.entrySet()) {
|
||||
Set<String> invoiceNos = entry.getValue().stream().map(InvoiceReceipt::getInvoiceNo)
|
||||
// 匹配键须与 A303-2 落库的 awrp_src_code 同源(收票登记id),按发票号匹配将永远查不到自推单据
|
||||
Set<String> srcCodes = entry.getValue().stream().map(receipt -> String.valueOf(receipt.getId()))
|
||||
.collect(Collectors.toCollection(LinkedHashSet::new));
|
||||
Map<String, BfiReceivedInvoiceVO> matched = kingdeeReceivedInvoiceSyncSupport
|
||||
.queryReceivedInvoiceBySrcCodes(entry.getKey(), invoiceNos, windowStart, windowEnd);
|
||||
.queryReceivedInvoiceBySrcCodes(entry.getKey(), srcCodes, windowStart, windowEnd);
|
||||
for (InvoiceReceipt receipt : entry.getValue()) {
|
||||
BfiReceivedInvoiceVO row = matched.get(receipt.getInvoiceNo());
|
||||
BfiReceivedInvoiceVO row = matched.get(String.valueOf(receipt.getId()));
|
||||
// 窗口内查不到不判为删除(金蝶修改时间延迟/滑窗),保持现状由人工重推兜底
|
||||
if (row == null) {
|
||||
continue;
|
||||
|
||||
+2
-2
@@ -93,10 +93,10 @@ public class KingdeeReceivedInvoiceSyncSupport {
|
||||
* 契约无来源单据号查询参数,防重键匹配在返回行上进行;查询失败中断本轮,由任务层记录异常
|
||||
*
|
||||
* @param buyerName 购方名称(接口必填,取镜像受票单位)
|
||||
* @param srcCodes 待匹配的收票单防重键(发票号码)集合
|
||||
* @param srcCodes 待匹配的收票单防重键(收票登记id,与 A303-2 的 awrp_src_code 同源)集合
|
||||
* @param windowStart 修改时间-开始(窗口不超一个月,调用方控制)
|
||||
* @param windowEnd 修改时间-结束
|
||||
* @return 发票号码 -> 收票单行(同键多行取修改时间最新)
|
||||
* @return 防重键(收票登记id) -> 收票单行(同键多行取修改时间最新)
|
||||
*/
|
||||
public Map<String, BfiReceivedInvoiceVO> queryReceivedInvoiceBySrcCodes(String buyerName, Collection<String> srcCodes,
|
||||
LocalDateTime windowStart, LocalDateTime windowEnd) {
|
||||
|
||||
Reference in New Issue
Block a user