fix: A301-3 成功响应 number 为空,金蝶收款单号取回执 keys.awrp_src_code;A301-1 回写命中后以真实收款单号覆盖占位
This commit is contained in:
+3
-1
@@ -334,7 +334,9 @@ public class ReceiptClaimRecordServiceImpl extends BaseServiceImpl<ReceiptClaimM
|
||||
// 窗口内未查到:金蝶回单延迟/状态未同步,不改状态,由下次回写或人工处置兜底
|
||||
continue;
|
||||
}
|
||||
if (Func.isEmpty(flow.getKingdeeBillNo())) {
|
||||
// 推送成功时金蝶收款单号先以来源编码占位(A301-3 响应 number 为空,取回执 keys.awrp_src_code),
|
||||
// 回写命中后以金蝶真实收款单号覆盖
|
||||
if (Func.isNotEmpty(bill.getBillno())) {
|
||||
flow.setKingdeeBillNo(bill.getBillno());
|
||||
}
|
||||
flow.setKingdeeBillStatus(billStatusOf(bill.getBillstatus()));
|
||||
|
||||
+16
-3
@@ -856,7 +856,8 @@ public class ReceiptFlowServiceImpl extends BaseServiceImpl<KingdeeReceiptFlowMa
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析 A301-3 推送结果:全项成功返回金蝶收款单号,否则抛出汇总错误文本(由失败路径落库)
|
||||
* 解析 A301-3 推送结果:全项成功返回单据号,否则抛出汇总错误文本(由失败路径落库)。
|
||||
* 成功响应的 number 为空,金蝶收款单号取回执 keys 中的 awrp_src_code(来源编码)。
|
||||
*/
|
||||
private String extractClaimPushBillNo(BfiBillSaveResultVO result) {
|
||||
if (result == null || result.getResult() == null || result.getResult().isEmpty()) {
|
||||
@@ -872,8 +873,20 @@ public class ReceiptFlowServiceImpl extends BaseServiceImpl<KingdeeReceiptFlowMa
|
||||
throw new ServiceException("金蝶认领结果推送失败"
|
||||
+ (errorText.isEmpty() ? "" : ":" + errorText));
|
||||
}
|
||||
return items.stream().map(BfiBillSaveResultItemVO::getNumber)
|
||||
.filter(Func::isNotEmpty).findFirst().orElse(null);
|
||||
return items.stream()
|
||||
.map(this::claimPushBillNoOf)
|
||||
.filter(Func::isNotEmpty)
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单项推送结果 → 单据号:A301-3 成功响应 number 为空,取回执键值中的 awrp_src_code
|
||||
*/
|
||||
private String claimPushBillNoOf(BfiBillSaveResultItemVO item) {
|
||||
if (Func.isNotEmpty(item.getNumber())) {
|
||||
return item.getNumber();
|
||||
}
|
||||
return item.getKeys() == null ? null : item.getKeys().get("awrp_src_code");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user