删除后同步修改BIP的开票申请存的NCC信息-代码优化

This commit is contained in:
mzr 2025-03-21 11:25:38 +08:00
parent d32199e4cb
commit 2a6577868b
1 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,13 @@ public class SyncBipBillRuleForDelete implements IRule<SaleInvoiceVO> {
@Override
public void process(SaleInvoiceVO[] vos) {
try {
boolean hasVdef38 = Arrays.stream(vos)
.map(SaleInvoiceVO::getParentVO)
.anyMatch(hvo -> StringUtils.isNotEmpty(hvo.getVdef38()));
// 如果vos里边都没有存BIP合同的开票申请的主键则不往下执行
if (!hasVdef38) {
return;
}
String access_token = getAccessToken();
for (SaleInvoiceVO invoiceVO : vos) {
SaleInvoiceHVO hvo = invoiceVO.getParentVO();