From c00a5c22a3eacb6319a82d3ddabbde226f81a572 Mon Sep 17 00:00:00 2001 From: zhaowenxuan <chacca165@163.com> Date: 星期六, 15 二月 2025 20:41:50 +0800 Subject: [PATCH] 20250215 --- src/main/java/com/example/factory/ServiceFactory.java | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/example/factory/ServiceFactory.java b/src/main/java/com/example/factory/ServiceFactory.java index 5f8eac4..031a444 100644 --- a/src/main/java/com/example/factory/ServiceFactory.java +++ b/src/main/java/com/example/factory/ServiceFactory.java @@ -2,7 +2,9 @@ import com.example.config.ConfigValue; import com.example.service.HisService; +import com.example.service.LisService; import com.example.service.PacsService; +import org.apache.ibatis.annotations.Case; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; @@ -31,11 +33,18 @@ return (PacsService) applicationContext.getBean(beanName+"Pacs"); } + public LisService getLisService(String hospName) { + String beanName = getServiceBeanName(hospName); + return (LisService) applicationContext.getBean(beanName+"Lis"); + } + private String getServiceBeanName(String hospName) { switch (hospName) { case "shanxiqinxamjyy": return "ShanXiQinXiAnMeiJi"; // 瀵瑰簲鐨勪笟鍔� Bean 鍚嶇О + case "shanxiqinpbkwyy": + return "ShanXiQinPbkwyy"; default: throw new RuntimeException("鎵句笉鍒板搴旂殑鍖婚櫌鏈嶅姟閰嶇疆锛�" + hospName); } -- Gitblit v1.8.0