fix: 修复A901-1供应商查询未过滤已审核可用状态

This commit is contained in:
刘泉佳
2026-10-28 15:40:53 +08:00
parent b939b69bb9
commit 28d85b4776
2 changed files with 14 additions and 2 deletions
@@ -36,6 +36,7 @@ import org.springblade.system.cache.SysCache;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.pojo.entity.Dept;
import org.springblade.system.pojo.entity.FeeItem;
import org.springblade.thirdparty.bfi.constant.BfiConstant;
import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillSaveDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillSaveEntryDTO;
@@ -1074,12 +1075,13 @@ public class KingdeeApBillSyncSupport {
return this.queryKingdeeSupplierNumber(customer.getUnifiedCreditCode().trim());
}
/** A901-1 按统一社会信用代码查询金蝶供应商档案,取返回值 number 即金蝶客商编码,无数据返回 null(开票申请受票方复用);
* shortcut: 查询未过滤 status=C(已审核)/enable=1,暂存/禁用档案的 number 也会返回,金蝶侧拒收时再补过滤 */
/** A901-1 按统一社会信用代码查询金蝶供应商档案,仅取已审核且可用的档案,返回值 number 即金蝶客商编码,无数据返回 null(开票申请受票方复用) */
public String queryKingdeeSupplierNumber(String unifiedCreditCode) {
BfiSupplierQueryDTO param = new BfiSupplierQueryDTO();
param.setPageNo(1);
param.setPageSize(1);
param.setStatus(BfiConstant.BILL_STATUS_AUDITED);
param.setEnable(BfiConstant.ENABLE_ENABLED);
param.setSocietycreditcode(List.of(unifiedCreditCode));
BfiPageVO<BfiSupplierVO> page = bfiService.querySupplier(param);
List<BfiSupplierVO> rows = page == null ? null : page.getRows();
@@ -250,6 +250,16 @@ public class BfiConstant {
*/
public static final String BILL_STATUS_RETURNED = "G";
/**
* 使用状态:可用
*/
public static final String ENABLE_ENABLED = "1";
/**
* 使用状态:禁用
*/
public static final String ENABLE_DISABLED = "0";
/**
* 结算状态:未结算
*/