feat: 金蝶物料编码映射常量与同步上下文缓存扩展(计量单位/客商收款账户)

This commit is contained in:
刘泉佳
2026-09-24 19:42:04 +08:00
parent 7e44d2d3d0
commit 5225444c3e
2 changed files with 26 additions and 3 deletions
@@ -58,6 +58,27 @@ public final class KingdeeBfiConstant {
/** 联调默认项目编码:金蝶测试档案值,项目档案与金蝶对齐后替换。 */
public static final String BFI_AP_BILL_PROJECT_NUMBER_TEST = "999";
/** 应付/应收单物料编码:装卸大类费用映射物料。 */
public static final String BFI_MATERIAL_LOADING = "装卸";
/** 应付/应收单物料编码:国际运输业务模式、国际货物运输代理服务项目业务类型映射物料。 */
public static final String BFI_MATERIAL_INTERNATIONAL = "国际货运代理服务费";
/** 应付/应收单物料编码:国内道路货物运输服务前缀,拼接运单运输方式(如 国内道路货物运输服务-公路运输)。 */
public static final String BFI_MATERIAL_DOMESTIC_PREFIX = "国内道路货物运输服务-";
/** 金蝶物料编码映射:物料名称 -> 金蝶物料编码 */
public static final Map<String, String> BFI_MATERIAL_NUMBER_MAP = Map.ofEntries(
Map.entry("国际货运代理服务费", "Item-00001081"),
Map.entry("物流配送", "Item-00001080"),
Map.entry("国内道路货物运输服务-公路运输", "XDWL11010001"),
Map.entry("国内道路货物运输服务-水路运输", "XDWL11010001"),
Map.entry("国内道路货物运输服务-铁路运输", "XDWL11010001"),
Map.entry("国内道路货物运输服务-航空运输", "XDWL11010001"),
Map.entry("国内道路货物运输服务-多式联运", "XDWL11010001"),
Map.entry("装卸", "XDWL11010002")
);
/** 付款类型编码:正式付款(结算付款)。 */
public static final String BFI_PAYMENT_TYPE_FORMAL = "201";
@@ -25,6 +25,7 @@
package org.springblade.transport.service;
import org.springblade.transport.pojo.entity.ContractManage;
import org.springblade.transport.pojo.entity.CustomerReceiptAccount;
import org.springblade.transport.pojo.entity.FormalSettlement;
import org.springblade.transport.pojo.entity.FormalSettlementDetail;
import org.springblade.transport.pojo.entity.ProjectApply;
@@ -39,15 +40,16 @@ import java.util.Map;
*
* @author Chill
*/
public record KingdeeSyncContext(Map<String, String> cargoCodeByName, Map<Long, ContractManage> contractCache,
public record KingdeeSyncContext(Map<String, String> measureUnitCodeByName, Map<Long, ContractManage> contractCache,
Map<String, String> customerCodeCache, Map<Long, ProjectApply> projectCache,
Map<String, String> apBillNoCache,
Map<Long, List<FormalSettlementDetail>> settlementDetailCache,
Map<Long, FormalSettlement> settlementCache) {
Map<Long, FormalSettlement> settlementCache,
Map<Long, CustomerReceiptAccount> receiptAccountCache) {
/** 空上下文:缓存可写但初始为空,首条记录命中后全批复用 */
public static KingdeeSyncContext empty() {
return new KingdeeSyncContext(new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>(),
new HashMap<>(), new HashMap<>(), new HashMap<>());
new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>());
}
}