package com.ruoyi.common.config; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; /** * 旧系统配置 * * @author ruoyi */ @Component @ConfigurationProperties(prefix = "legacy.system") public class LegacySystemConfig { /** 旧系统基础URL */ private String baseUrl; /** 急救转运创建接口路径 */ private String emergencyCreatePath = "/admin_save_19.gds"; /** 调度单创建接口路径 */ private String dispatchCreatePath = "/admin_save_24.gds"; /** 连接超时时间(毫秒) */ private int connectTimeout = 30000; /** 读取超时时间(毫秒) */ private int readTimeout = 30000; /** 是否启用同步 */ private boolean enabled = true; /** 字符编码 */ private String charset = "UTF-8"; public String getBaseUrl() { return baseUrl; } public void setBaseUrl(String baseUrl) { this.baseUrl = baseUrl; } public String getEmergencyCreatePath() { return emergencyCreatePath; } public void setEmergencyCreatePath(String emergencyCreatePath) { this.emergencyCreatePath = emergencyCreatePath; } public String getDispatchCreatePath() { return dispatchCreatePath; } public void setDispatchCreatePath(String dispatchCreatePath) { this.dispatchCreatePath = dispatchCreatePath; } public int getConnectTimeout() { return connectTimeout; } public void setConnectTimeout(int connectTimeout) { this.connectTimeout = connectTimeout; } public int getReadTimeout() { return readTimeout; } public void setReadTimeout(int readTimeout) { this.readTimeout = readTimeout; } public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public String getCharset() { return charset; } public void setCharset(String charset) { this.charset = charset; } /** * 获取完整的急救转运创建URL */ public String getEmergencyCreateUrl() { return baseUrl + emergencyCreatePath; } /** * 获取完整的调度单创建URL */ public String getDispatchCreateUrl() { return baseUrl + dispatchCreatePath; } }