:feat: HCS创建单位改为固定组织配置(creator-unit-id/name,项目立项fd_creator_unit与fd_avail_units共用,环境变量可覆盖)
This commit is contained in:
+27
-1
@@ -26,6 +26,7 @@
|
||||
package org.springblade.hcs.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springblade.hcs.dto.HcsRefVO;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -59,7 +60,15 @@ public class HcsProperties {
|
||||
/**
|
||||
* 来源系统标识(fd_sources,D14 约定值 TMS)
|
||||
*/
|
||||
private String srcSystem = "TMS";
|
||||
private String srcSystem = "WLTMS";
|
||||
/**
|
||||
* 创建单位 fdId(HCS 组织主数据固定值,fd_creator_unit 等组织引用,各合同接口共用)
|
||||
*/
|
||||
private String creatorUnitId = "1j56etj23w358wne0ow2k5214nk4f24213w0";
|
||||
/**
|
||||
* 创建单位名称(与 creatorUnitId 配套,HCS 组织主数据固定值,各合同接口共用)
|
||||
*/
|
||||
private String creatorUnitName = "广西物产城矿发展有限公司";
|
||||
/**
|
||||
* 推送任务配置(扫描首推/补偿)
|
||||
*/
|
||||
@@ -109,6 +118,23 @@ public class HcsProperties {
|
||||
*/
|
||||
private MasterData masterData = new MasterData();
|
||||
|
||||
/**
|
||||
* 创建单位引用解析:fdId+fdName 配置优先(third-party.hcs.creator-unit-id/name),
|
||||
* 任一未配置回退单据部门名称仅传 fdName(各合同接口共用)
|
||||
*
|
||||
* @param fallbackName 单据自身部门名称(如开题部门名称)
|
||||
* @return 创建单位引用
|
||||
*/
|
||||
public HcsRefVO resolveCreatorUnit(String fallbackName) {
|
||||
if (creatorUnitId == null || creatorUnitId.isEmpty() || creatorUnitName == null || creatorUnitName.isEmpty()) {
|
||||
return HcsRefVO.ofName(fallbackName);
|
||||
}
|
||||
HcsRefVO ref = new HcsRefVO();
|
||||
ref.setFdId(creatorUnitId);
|
||||
ref.setFdName(creatorUnitName);
|
||||
return ref;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Push {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user