✨ 客商档案同步金蝶完善:伙伴类型按客商性质字典解析、推送银行/联系人分录、BFI配置抽取BfiProperties

This commit is contained in:
刘泉佳
2026-09-20 16:05:54 +08:00
parent 3950a3a0b0
commit 719ec4e8f6
18 changed files with 1513 additions and 117 deletions
@@ -0,0 +1,80 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.config;
import lombok.Data;
import org.springblade.thirdparty.bfi.constant.BfiConstant;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* 业财融合(BFI)推送金蝶配置属性,统一收口 Nacos 配置 thirdParty.bfi.*:
* <p>
* srcSys 为客商、付款申请等各业务推送金蝶的公共参数(外部系统编号);
* customer、payApply 为各业务专属参数;未配置时使用字段默认值。
* <p>
* prefix 须为全小写(thirdparty.bfi),Spring 宽松绑定可匹配 Nacos 中的 camelCase 键(thirdParty.payApply.srcSys 等)。
*
* @author Chill
*/
@Data
@Component
@ConfigurationProperties(prefix = "thirdparty.bfi")
public class BfiProperties {
/**
* 数据来源系统编码(公共):客商、付款申请等推送金蝶时统一使用,默认 WLTMS(运输TMS)
*/
private String srcSys = BfiConstant.DATA_SOURCE_WLTMS;
/**
* 付款申请推送配置(A103-3 付款申请保存)
*/
private PayApply payApply = new PayApply();
/**
* 付款申请推送配置项
*/
@Data
public static class PayApply {
/**
* 单据类型编码:ap_payapply_BT_S 付款申请单、ap_payapply_oth_BT_S 其他付款单,默认其他付款单
*/
private String billtype = "ap_payapply_oth_BT_S";
/**
* 汇率表编码,默认 01
*/
private String exratetable = "01";
/**
* 外部单据类型,默认 0KzXs
*/
private String srcType = "0KzXs";
}
}
@@ -25,8 +25,6 @@
*/
package org.springblade.transport.constant;
import java.util.Map;
/**
* 客商档案金蝶(星瀚)协同常量
*
@@ -40,29 +38,25 @@ public class CustomerBfiConstants {
public static final String BIZ_FUNCTION_ALL = "1,2,3,4";
/**
* 推送金蝶固定值:伙伴类型兜底编码(民营企业),客商性质未命中映射时使用
* 客商类型:内部组织(customer_kind 字段值)
*/
public static final String DEFAULT_PARTNER_TYPE = "6";
public static final String CUSTOMER_KIND_INTERNAL = "internal";
/**
* 客商类型:外部客商(customer_kind 字段值)
*/
public static final String CUSTOMER_KIND_EXTERNAL = "external";
/**
* 金蝶伙伴类型编码有效范围上界(BfiCustomerSaveDTO.type 全集 1~17)
*/
public static final int PARTNER_TYPE_MAX = 17;
/**
* 营业期限类型:长期(TMS 表单文本)
*/
public static final String BUSINESS_TERM_LONG = "长期";
/**
* 客商性质(nature_of_client 字典 dictKey)→ 金蝶伙伴类型编码
* 键名以数据库字典 nature_of_client 实际 dictKey 为准核对;未命中走 DEFAULT_PARTNER_TYPE
*/
public static final Map<String, String> NATURE_TYPE_MAPPING = Map.of(
"企业法人", "1",
"个人", "4",
"个体工商户", "5",
"民营企业", "6",
"国有企业", "8",
"政府事业单位", "9",
"其他", "12"
);
private CustomerBfiConstants() {
}
@@ -193,6 +193,16 @@ public class CustomerArchiveController extends BladeController {
return R.data(customerArchiveService.syncKingdee(id));
}
/**
* 金蝶客商数据定时同步测试入口:手动触发 syncKingdeeCustomerData 定时任务逻辑,便于联调验证
*/
@PostMapping("/sync-kingdee-data-test")
@ApiOperationSupport(order = 13)
@Operation(summary = "金蝶客商数据同步测试", description = "手动触发定时任务逻辑:自动推送待推送客商(approved 且 none/failed),并联动已同步客商的金蝶使用状态")
public R<String> syncKingdeeCustomerDataTest() {
return R.data(customerArchiveService.syncKingdeeCustomerData());
}
/**
* 评分明细模板
*/
@@ -116,18 +116,69 @@ import java.util.stream.Collectors;
@RequiredArgsConstructor
public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveMapper, CustomerArchive> implements ICustomerArchiveService {
/**
* 状态:启用
*/
private static final int STATUS_ENABLED = 1;
/**
* 状态:停用
*/
private static final int STATUS_DISABLED = 2;
/**
* 准入类型:临时
*/
private static final String ACCESS_TEMPORARY = "temporary";
/**
* 准入类型:正式
*/
private static final String ACCESS_FORMAL = "formal";
/**
* 审批状态:草稿
*/
private static final String APPROVAL_DRAFT = "draft";
/**
* 审批状态:审核中
*/
private static final String APPROVAL_REVIEWING = "reviewing";
/**
* 审批状态:审批通过
*/
private static final String APPROVAL_APPROVED = "approved";
/**
* 审批状态:审批驳回
*/
private static final String APPROVAL_REJECTED = "rejected";
/**
* 金蝶协同状态:未推送(新增客商默认值,审批通过后参与推送)
*/
private static final String KINGDEE_STATUS_NONE = "none";
/**
* 金蝶协同状态:金蝶已有档案(A902-1 查到已审核,审批通过后跳过推送,终态)
*/
private static final String KINGDEE_STATUS_EXIST = "exist";
/**
* 金蝶协同状态:已推送成功(终态,重推时幂等跳过)
*/
private static final String KINGDEE_STATUS_SYNCED = "synced";
/**
* 金蝶协同状态:推送失败 / 金蝶审核中(可列表「同步金蝶」人工重推)
*/
private static final String KINGDEE_STATUS_FAILED = "failed";
/**
* 客商编号前缀
*/
private static final String CUSTOMER_CODE_PREFIX = "KS";
/**
* A902-1 批量查询分批大小
@@ -26,16 +26,18 @@
package org.springblade.transport.service.impl;
import lombok.RequiredArgsConstructor;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.pojo.entity.DictBiz;
import org.springblade.thirdparty.bfi.constant.BfiConstant;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerBankEntryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerGroupEntryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerLinkmanEntryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerSaveDTO;
import org.springblade.transport.config.BfiProperties;
import org.springblade.transport.constant.CustomerBfiConstants;
import org.springblade.transport.pojo.vo.CustomerArchiveVO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.time.LocalDate;
@@ -52,17 +54,7 @@ import java.util.stream.Collectors;
@RequiredArgsConstructor
public class CustomerBfiConverter {
/**
* 数据来源系统编码,默认 WLTMS(运输TMS)
*/
@Value("${thirdParty.bfi.customer.srcSys:WLTMS}")
private String srcSys;
/**
* 创建组织.编码,默认 WLTMS,需与财务确认
*/
@Value("${thirdParty.bfi.customer.createOrg:WLTMS}")
private String createOrg;
private final BfiProperties bfiProperties;
/**
* 组装 A902-2 客户保存参数
@@ -72,44 +64,161 @@ public class CustomerBfiConverter {
*/
public BfiCustomerSaveDTO buildSaveDTO(CustomerArchiveVO customer) {
BfiCustomerSaveDTO param = new BfiCustomerSaveDTO();
// 金蝶客户编码与 TMS 客商编号保持一致
// 编码:不传由星瀚生成;金蝶客户编码与 TMS 客商编号保持一致
param.setNumber(customer.getCustomerCode());
param.setStatus(BfiConstant.BILL_STATUS_SUBMITTED);
// 数据状态:固定传 B 已提交,金蝶校验工商信息通过后由机器人自动审核
// param.setStatus(BfiConstant.BILL_STATUS_SUBMITTED);
// 【必填】名称:客商名称
param.setName(customer.getFullName());
// 【必填】统一社会信用代码(候选键):个人为身份证号或手机号
param.setSocietycreditcode(customer.getUnifiedCreditCode());
// 纳税人识别号:与统一社会信用代码一致时推送
param.setTxRegisterNo(customer.getUnifiedCreditCode());
// 法人代表:企业法人
param.setArtificialperson(customer.getLegalPerson());
param.setType(resolvePartnerType(customer.getCustomerNature()));
// 【必填】伙伴类型:客商性质字典 dictKey 即伙伴类型编码,直接推送,无效编码抛异常
param.setType(this.resolvePartnerType(customer.getCustomerNature()));
// 详细地址:注册地址(省市区 + 详细地址拼接文本)
param.setBizpartnerAddress(customer.getRegisteredAddress());
param.setBusinessscope(buildBusinessScopeText(customer.getBusinessScope()));
param.setBusinessterm(buildBusinessTerm(customer.getBusinessTermType(), customer.getBusinessEndDate()));
// 经营范围:多选编码 → 字典文本「、」拼接
param.setBusinessscope(this.buildBusinessScopeText(customer.getBusinessScope()));
// 营业期限:长期传「长期」,固定期限传「至 yyyy-MM-dd」(TMS 未采集起始日)
param.setBusinessterm(this.buildBusinessTerm(customer.getBusinessTermType(), customer.getBusinessEndDate()));
// 联系电话:客商联系电话
param.setBizpartnerPhone(customer.getContactPhone());
// 备注:客商备注,空时不传
param.setFcusbeizhu(customer.getRemark());
// 业务职能:固定全选(1销售,2结算,3付款,4收货)
param.setBizfunction(CustomerBfiConstants.BIZ_FUNCTION_ALL);
param.setAwrpDatasourcesys(srcSys);
// 数据来源系统:thirdParty.bfi.srcSys(公共参数),默认 WLTMS(运输TMS)
param.setAwrpDatasourcesys(bfiProperties.getSrcSys());
// 【必填】是否为贸易客商:固定传 A 是
param.setAwrpCusfortrade(BfiConstant.CUS_FOR_TRADE_YES);
param.setCreateorgNumber(createOrg);
// 【必填】分类标准分录:外部客商 1102、内部组织 1101
BfiCustomerGroupEntryDTO groupEntry = new BfiCustomerGroupEntryDTO();
groupEntry.setStandardidNumber(BfiConstant.GROUP_STANDARD_BASIC);
groupEntry.setGroupidNumber(BfiConstant.CUSTOMER_GROUP_EXTERNAL);
groupEntry.setGroupidNumber(this.resolveGroupId(customer.getCustomerKind()));
param.setEntryGroupstandard(List.of(groupEntry));
// 银行信息分录:收款账户明细(账户名称传开户行,币种默认 RMB)
param.setEntryBank(this.buildBankEntries(customer));
// 联系人信息分录:页面填写的客商负责人与联系电话
param.setEntryLinkman(this.buildLinkmanEntries(customer));
return param;
}
/**
* 客商性质(字典 dictKey)→ 金蝶伙伴类型编码,未命中走兜底值
* 解析分类标准分录客户分组编码:内部组织 1101,其余(外部客商)1102
*
* @param customerNature 客商性质字典值
* @param customerKind 客商类型(internal 内部组织 / external 外部客商)
* @return 客户分组编码
*/
private String resolveGroupId(String customerKind) {
if (CustomerBfiConstants.CUSTOMER_KIND_INTERNAL.equals(customerKind)) {
return BfiConstant.CUSTOMER_GROUP_INTERNAL;
}
return BfiConstant.CUSTOMER_GROUP_EXTERNAL;
}
/**
* 组装 A902-2 银行信息分录:每条收款账户一行分录,账户名称传开户行、币种默认 RMB,收款账户未填写时返回空分录
*
* @param customer 客商档案
* @return 银行信息分录
*/
private List<BfiCustomerBankEntryDTO> buildBankEntries(CustomerArchiveVO customer) {
if (Func.isEmpty(customer.getReceiptAccounts())) {
return List.of();
}
return customer.getReceiptAccounts().stream()
.filter(account -> Func.isNotBlank(account.getBankAccount()) || Func.isNotBlank(account.getBankName()))
.map(account -> {
BfiCustomerBankEntryDTO entry = new BfiCustomerBankEntryDTO();
// 银行账号
entry.setBankaccount(account.getBankAccount());
// 账户名称:传开户行
entry.setAccountname(account.getBankName());
// 开户银行.编码(行号) todo
entry.setBankNumber("001110012009");
// 币种:人民币(CNY)
entry.setCurrencyNumber(BfiConstant.CURRENCY_CNY);
// 是否默认银行
entry.setIsdefaultBank(true);
return entry;
})
.collect(Collectors.toList());
}
/**
* 组装 A902-2 联系人信息分录:页面填写的客商负责人与联系电话,未填负责人时返回空分录
*
* @param customer 客商档案
* @return 联系人信息分录
*/
private List<BfiCustomerLinkmanEntryDTO> buildLinkmanEntries(CustomerArchiveVO customer) {
if (Func.isBlank(customer.getPrincipal())) {
return List.of();
}
BfiCustomerLinkmanEntryDTO entry = new BfiCustomerLinkmanEntryDTO();
// 联系人:客商负责人
entry.setContactperson(customer.getPrincipal());
// 电话:联系电话
entry.setPhone(customer.getContactPhone());
// 默认联系人
entry.setIsdefaultLinkman(Boolean.TRUE);
return List.of(entry);
}
/**
* 金蝶伙伴类型编码:客商性质(nature_of_client 字典)——
* 值为 dictKey(即伙伴类型编码,1~17)时直接使用;
* 值为 dictValue 文本(前端字典下拉存文本,含存量数据,如「我区国企/国企控股」)时按字典反查对应 dictKey;
* 均无法解析时抛出异常,阻断推送
*
* @param customerNature 客商性质(dictKey 编码或 dictValue 文本)
* @return 金蝶伙伴类型编码
*/
public String resolvePartnerType(String customerNature) {
if (Func.isNotEmpty(customerNature)) {
String partnerType = CustomerBfiConstants.NATURE_TYPE_MAPPING.get(customerNature.trim());
if (StringUtil.isNotBlank(partnerType)) {
return partnerType;
String nature = Func.isEmpty(customerNature) ? "" : customerNature.trim();
if (nature.matches("\\d{1,2}")) {
int partnerType = Integer.parseInt(nature);
if (partnerType >= 1 && partnerType <= CustomerBfiConstants.PARTNER_TYPE_MAX) {
return nature;
}
}
return CustomerBfiConstants.DEFAULT_PARTNER_TYPE;
String partnerType = this.resolvePartnerTypeFromDictValue(nature);
if (Func.isBlank(partnerType)) {
throw new ServiceException("客商性质未配置有效的金蝶伙伴类型编码(nature_of_client 字典 dictKey):" + customerNature);
}
return partnerType;
}
/**
* 按客商性质文本(dictValue)反查 nature_of_client 字典,返回对应 dictKey(即伙伴类型编码)
*
* @param natureValue 客商性质文本
* @return 金蝶伙伴类型编码,未命中返回 null
*/
private String resolvePartnerTypeFromDictValue(String natureValue) {
if (Func.isEmpty(natureValue)) {
return null;
}
List<DictBiz> dictList = DictBizCache.getList("nature_of_client");
if (dictList == null) {
return null;
}
return dictList.stream()
.filter(dict -> natureValue.equals(dict.getDictValue()))
.map(DictBiz::getDictKey)
.map(key -> Func.isEmpty(key) ? "" : key.trim())
.filter(key -> {
if (!key.matches("\\d{1,2}")) {
return false;
}
int partnerType = Integer.parseInt(key);
return partnerType >= 1 && partnerType <= CustomerBfiConstants.PARTNER_TYPE_MAX;
})
.findFirst()
.orElse(null);
}
/**
@@ -82,6 +82,7 @@ import org.springblade.transport.pojo.entity.PaymentApplicationRecord;
import org.springblade.transport.pojo.entity.PaymentApplicationSettlement;
import org.springblade.transport.pojo.entity.PreSettlement;
import org.springblade.transport.pojo.entity.PreSettlementAdvance;
import org.springblade.transport.config.BfiProperties;
import org.springblade.transport.pojo.entity.ProjectApply;
import org.springblade.transport.pojo.entity.TemporaryCreditLimit;
import org.springblade.transport.pojo.vo.PaymentApplicationReferenceAmountVO;
@@ -91,7 +92,6 @@ import org.springblade.transport.service.IPaymentApplicationService;
import org.springblade.transport.service.KingdeeSyncContext;
import org.springblade.transport.support.KingdeeApBillSyncSupport;
import org.springblade.transport.wrapper.PaymentApplicationWrapper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -144,14 +144,7 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
private final IFormalSettlementService formalSettlementService;
private final IBfiService bfiService;
private final KingdeeApBillSyncSupport kingdeeApBillSyncSupport;
@Value("${thirdParty.bfi.payApply.srcSys:WLTMS}")
private String bfiPayApplySrcSys;
@Value("${thirdParty.bfi.payApply.billtype:ap_payapply_oth_BT_S}")
private String bfiPayApplyBilltype;
@Value("${thirdParty.bfi.payApply.exratetable:01}")
private String bfiPayApplyExratetable;
@Value("${thirdParty.bfi.payApply.srcType:0KzXs}")
private String bfiPayApplySrcType;
private final BfiProperties bfiProperties;
@Override
public IPage<PaymentApplicationVO> selectPage(IPage<PaymentApplication> page, PaymentApplicationVO query) {
@@ -678,7 +671,7 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
private List<BfiPayApplyVO> queryPayApplyPages(List<String> awrpSrcCodes) {
BfiPayApplyQueryDTO param = new BfiPayApplyQueryDTO();
param.setAwrpSrcCode(awrpSrcCodes);
param.setAwrpSrcSys(bfiPayApplySrcSys);
param.setAwrpSrcSys(bfiProperties.getSrcSys());
return BfiUtil.queryAllPages(pageNo -> {
param.setPageNo(pageNo);
param.setPageSize(PAY_RESULT_PAGE_SIZE);
@@ -849,9 +842,9 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
BigDecimal applyAmount = money(entity.getAppliedAmount()).setScale(2, RoundingMode.HALF_UP);
BfiPayApplySaveDTO param = new BfiPayApplySaveDTO();
param.setAwrpSrcCode(entity.getPaymentNo());
param.setAwrpSrcSys(bfiPayApplySrcSys);
param.setAwrpSrcSys(bfiProperties.getSrcSys());
param.setSettleorgNumber(orgNumber);
param.setBilltypeNumber(bfiPayApplyBilltype);
param.setBilltypeNumber(bfiProperties.getPayApply().getBilltype());
param.setApplydate(applyDateText);
param.setApplyorgNumber(orgNumber);
param.setPayorgNumber(orgNumber);
@@ -859,8 +852,8 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
param.setApplycause(bfiApplyCause(entity.getPaymentType()));
param.setPaycurrencyNumber(currency);
param.setSettlecurrencyNumber(currency);
param.setAwrpSrcType(bfiPayApplySrcType);
param.setExratetableNumber(bfiPayApplyExratetable);
param.setAwrpSrcType(bfiProperties.getPayApply().getSrcType());
param.setExratetableNumber(bfiProperties.getPayApply().getExratetable());
param.setExratedate(applyDateText);
param.setAwrpTextfield1(bfiPaymentMethodLabel(entity.getPaymentMethod()));
@@ -930,7 +923,7 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
// 【必填】外部系统来源单据号(候选键):付款申请号
param.setAwrpSrcCode(entity.getPaymentNo());
// 【必填】外部系统编号
param.setAwrpSrcSys(bfiPayApplySrcSys);
param.setAwrpSrcSys(bfiProperties.getSrcSys());
// 【必填】申请日期:yyyy-MM-dd HH:mm:ss(各接口统一格式)
param.setApplydate(applyDateText);
// 付款组织.编码(非必传,不传时根据应付单自动带出)
@@ -940,7 +933,7 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
// 请款事由(非必传)
// param.setApplycause(bfiApplyCause(entity.getPaymentType()));
// 汇率表.编码(非必传,不传时根据应付单自动带出)
// param.setExratetableNumber(bfiPayApplyExratetable);
// param.setExratetableNumber(bfiProperties.getPayApply().getExratetable());
// 汇率日期(非必传,不传时根据应付单自动带出)
// param.setExratedate(applyDateText);
// 付款渠道(非必传)
@@ -975,7 +968,7 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
// 备注(非必传)
// entry.setERemark(entity.getRemark());
// 【必填】外部单据类型 todo
entry.setAwrpSrcType(bfiPayApplySrcType);
entry.setAwrpSrcType(bfiProperties.getPayApply().getSrcType());
entries.add(entry);
}
param.setEntry(entries);
@@ -53,12 +53,12 @@ import org.springblade.transport.mapper.ReceivablePayableCargoFeeMapper;
import org.springblade.transport.pojo.entity.ContractManage;
import org.springblade.transport.pojo.entity.CustomerArchive;
import org.springblade.transport.pojo.entity.FormalSettlement;
import org.springblade.transport.config.BfiProperties;
import org.springblade.transport.pojo.entity.FormalSettlementDetail;
import org.springblade.transport.pojo.entity.FormalSettlementDetailFee;
import org.springblade.transport.pojo.entity.PreSettlementDetailFee;
import org.springblade.transport.pojo.entity.ReceivablePayableCargoFee;
import org.springblade.transport.service.KingdeeSyncContext;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
@@ -101,8 +101,7 @@ public class KingdeeApBillSyncSupport {
private final PreSettlementDetailFeeMapper preSettlementDetailFeeMapper;
private final ReceivablePayableCargoFeeMapper receivablePayableCargoFeeMapper;
private final ISysClient sysClient;
@Value("${thirdParty.bfi.payApply.srcSys:WLTMS}")
private String bfiPayApplySrcSys;
private final BfiProperties bfiProperties;
// ==================== 财务应付单防重键(awrp_src_code) ====================
@@ -149,7 +148,7 @@ public class KingdeeApBillSyncSupport {
batchForeach(awrpSrcCodes, PAY_RESULT_QUERY_BATCH, batch -> {
BfiApBillQueryDTO param = new BfiApBillQueryDTO();
param.setAwrpSrcCode(batch);
param.setAwrpSrcSys(bfiPayApplySrcSys);
param.setAwrpSrcSys(bfiProperties.getSrcSys());
for (BfiApBillVO apBill : BfiUtil.queryAllPages(pageNo -> {
param.setPageNo(pageNo);
param.setPageSize(PAY_RESULT_PAGE_SIZE);
@@ -178,7 +177,7 @@ public class KingdeeApBillSyncSupport {
return context.apBillPlanCodeCache().computeIfAbsent(apBillSrcCode, code -> {
BfiApBillQueryDTO param = new BfiApBillQueryDTO();
param.setAwrpSrcCode(List.of(code));
param.setAwrpSrcSys(bfiPayApplySrcSys);
param.setAwrpSrcSys(bfiProperties.getSrcSys());
List<BfiApBillVO> bills = BfiUtil.queryAllPages(pageNo -> {
param.setPageNo(pageNo);
param.setPageSize(PAY_RESULT_PAGE_SIZE);
@@ -262,7 +261,7 @@ public class KingdeeApBillSyncSupport {
param.setIspricetotal(true);
param.setIsintax(false);
// 汇率表.编码(非必传)
// param.setExratetableNumber(bfiPayApplyExratetable);
// param.setExratetableNumber(bfiProperties.getPayApply().getExratetable());
// 汇率日期(非必传)
// param.setExratedate(billDateText);
// 往来单位名称(非必传)
@@ -270,7 +269,7 @@ public class KingdeeApBillSyncSupport {
// 备注(非必传)
// param.setRemark(subject);
// 【必填】外部系统编号(候选键)
param.setAwrpSrcSys(bfiPayApplySrcSys);
param.setAwrpSrcSys(bfiProperties.getSrcSys());
// 【必填】外部系统来源单据号(候选键):正式结算单号_结算明细单据号1_单据号2...(复用预检已组装的防重键)
param.setAwrpSrcCode(apBillSrcCode);
// 来源单据(非必传,有上游合同时传 awrp_contract_info)