From 493d39e60bae93a724448af7dd53e2ff10b927c8 Mon Sep 17 00:00:00 2001
From: zhaowenxuan <chacca165@163.com>
Date: 星期四, 12 六月 2025 17:15:39 +0800
Subject: [PATCH] 增加新医院

---
 src/main/java/com/example/controller/HisController.java |  253 +++++++++++++++++++------------------------------
 1 files changed, 99 insertions(+), 154 deletions(-)

diff --git a/src/main/java/com/example/controller/HisController.java b/src/main/java/com/example/controller/HisController.java
index 978e21f..7b18823 100644
--- a/src/main/java/com/example/controller/HisController.java
+++ b/src/main/java/com/example/controller/HisController.java
@@ -6,11 +6,10 @@
 import com.example.factory.ServiceFactory;
 import com.example.service.HisService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * his鎺ュ彛璇锋眰
@@ -22,253 +21,199 @@
 @RequestMapping("/api/his")
 public class HisController {
 
+//    妫�楠屾鏌ヤ慨鏀圭殑鏇存柊濂戒簡,
+//    鍏ュ弬闇�瑕佸姞涓�涓弬鏁�:  needShouFeiXm=1鏃�, 杩斿洖shouFeiXmList;
+//    閲岄潰鏈塪anJia/shuLiang/shouFeiXmId;
+
     private final ServiceFactory serviceFactory;
-    private final HisService hisService;
 
     @Autowired
     public HisController(ServiceFactory serviceFactory) {
         this.serviceFactory = serviceFactory;
-        hisService= serviceFactory.getService();
     }
 
+    @GetMapping("/{hospName}/test")
+    public String test(@PathVariable("hospName") String hospName){
+        HisService hisService = serviceFactory.getService(hospName);
+        hisService.syncDict(hospName);
+        return "test";
+    }
 
     /**
      * 寤烘。
-     * @param customer
-     * @return
      */
-    @PostMapping("creat")
-    public String jianDang (TjCustomer customer) {
-        return hisService.jianDang(customer);
+    @PostMapping("/{hospName}/creat")
+    public String jianDang (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.jianDang(map);
     }
 
     /**
      * 楠岃瘉韬唤璇佹槸鍚﹀缓杩囨。
-     * @param customer
-     * @return
      */
-    @PostMapping("isCreat")
-    public String getBingRenXxByShengFenZheng (TjCustomer customer) {
-        return hisService.getBingRenXxByShengFenZheng(customer);
+    @PostMapping("/{hospName}/isCreat")
+    public String getBingRenXxByShengFenZheng (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getBingRenXxByShengFenZheng(map);
     }
 
     /**
      * 鐥呬汉鍩烘湰淇℃伅鍙樻洿
-     * @param customer
-     * @return
      */
-    @PostMapping("update")
-    public String saveBingRenXx (TjCustomer customer) {
-        return hisService.saveBingRenXx(customer);
+    @PostMapping("/{hospName}/update")
+    public String saveBingRenXx (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.saveBingRenXx(map);
     }
 
     /**
      * 寰呮敹璐硅垂鐢ㄦ煡璇�
-     * @param bingRenId
-     * @param jiuZhenKh
-     * @param yuanQuId
-     * @return
      */
-    @PostMapping("getPendingPaymentList")
-    public String getListDaiShouFei (String bingRenId,String jiuZhenKh,String yuanQuId) {
-        return hisService.getListDaiShouFei(bingRenId,jiuZhenKh,yuanQuId);
+    @PostMapping("/{hospName}/getPendingPaymentList")
+    public String getListDaiShouFei (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getListDaiShouFei(map);
     }
-
 
     /**
      * 鐢熸垚寰呮敹璐�/寰呴��璐� 璐圭敤
-     * @param dto
-     * @return
      */
-    @PostMapping("creatCostInfo")
-    public String createMenZhenFy (CreateMenZhenFyDto dto) {
-        return hisService.createMenZhenFy(dto);
+    @PostMapping("/{hospName}/creatCostInfo")
+    public String createMenZhenFy (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.createMenZhenFy(map);
     }
-
 
     /**
      * 闂ㄨ瘖鏈敹璐硅垂鐢ㄦ挙閿�
-     * @param dto
-     * @return
      */
-    @PostMapping("revokeCost")
-    public String cheXiaoMzFy (CheXiaoMzFyDto dto) {
-        return hisService.cheXiaoMzFy(dto);
+    @PostMapping("/{hospName}/revokeCost")
+    public String cheXiaoMzFy (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.cheXiaoMzFy(map);
     }
-
-
-    /**
-     * 鏀惰垂/閫�璐瑰畬鎴愰�氱煡绗笁鏂�
-     * @param feiYongId
-     * @param yeWuLx
-     * @return
-     */
-    @PostMapping("pushPayMsg")
-    public String pushZhiFuMsg (String feiYongId,int yeWuLx ) {
-        return hisService.pushZhiFuMsg(feiYongId,yeWuLx);
-    }
-
 
     /**
      * 绉戝淇℃伅鏌ヨ
-     * @param yuanQuId
-     * @param keShiMc
-     * @param pageIndex
-     * @param pageSize
-     * @return
      */
-    @PostMapping("getKeShiList")
-    public String getKeShi (String yuanQuId,String keShiMc,int pageIndex,int pageSize ) {
-        return hisService.getKeShi(yuanQuId,keShiMc,pageIndex,pageSize);
+    @PostMapping("/{hospName}/getKeShiList")
+    public String getKeShi (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getKeShi(map);
     }
 
     /**
      * 鍖荤敓淇℃伅鏌ヨ
-     * @param yuanQuId
-     * @param keShiMc
-     * @param pageIndex
-     * @param pageSize
-     * @return
      */
-    @PostMapping("getYiShengList")
-    public String getListYiShengZd (String yuanQuId,String keShiMc,int pageIndex,int pageSize ) {
-        return hisService.getListYiShengZd(yuanQuId,keShiMc,pageIndex,pageSize);
+    @PostMapping("/{hospName}/getYiShengList")
+    public String getListYiShengZd (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+//        浜哄憳杩欎釜鎺ュ彛getListYishengZd,
+//                澧炲姞鍏ュ弬 zhiGongKs
+//        boolean绫诲瀷锛屼紶true杩斿洖鑱屽伐绉戝list
+//        杩斿洖鍊奸噷鐨� zhiGongKsBqList,  灏辨槸鑱屽伐绉戝list
+        return hisService.getListYiShengZd(map);
     }
-
 
     /**
      * 鑾峰彇鏀惰垂椤圭洰鍒嗛〉
-     * @param queryString
-     * @param bianGengSj
-     * @param pageIndex
-     * @param pageSize
-     * @return
      */
-    @PostMapping("getShouFeiXmList")
-    public String getShouFeiXm (String queryString,String bianGengSj,int pageIndex,int pageSize ) {
-        return hisService.getShouFeiXm(queryString,bianGengSj,pageIndex,pageSize);
+    @PostMapping("/{hospName}/getShouFeiXmList")
+    public String getShouFeiXm (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getShouFeiXm(map);
     }
-
-
 
     /**
      *绉戝淇℃伅鎺ㄩ��
-     * @param xingZhiSx 缁勭粐灞炴�� 绗竴浣�1聽琛ㄧず 鎸傚彿
-     * 绗簩浣� 1琛ㄧず涓村簥
-     * 绗笁浣� 1琛ㄧず妫�鏌�
-     * 绗洓浣� 1 琛ㄧず鎵嬫湳
-     * 绗簲浣� 1 琛ㄧず娌荤枟
-     * 绗叚浣� 1 琛ㄧず鎶ょ悊
-     * @param queryString 妯$硦鍖归厤杈撯紛鐮�1銆佺瀹ゅ悕绉�
-     * @param zuoFeiBz 浣滃簾鏍囧織锛�0 姝e父锛�1 浣滃簾
-     * @param yuanQuId 闄㈠尯id
-     * @param keShiIds 绉戝ID闆嗗悎
-     * @param ifPlus 鏄惁鏌ヨplus灞炴��
-     * @return
      */
-    @PostMapping("getKeShiByConditionsList")
-    public String getKeShiByConditions (int xingZhiSx, String queryString, int zuoFeiBz, String yuanQuId, List<String> keShiIds, int ifPlus) {
-        return hisService.getKeShiByConditions(xingZhiSx, queryString, zuoFeiBz, yuanQuId, keShiIds,ifPlus);
+    @PostMapping("/{hospName}/getKeShiByConditionsList")
+    public String getKeShiByConditions (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getKeShiByConditions(map);
     }
-
-
 
     /**
      * 鍙栨牱鏈瓧鍏�
-     * @param queryString 鏍锋湰绫诲瀷鍚嶇О(鏍锋湰鍚嶇О/鏍锋湰绫诲瀷id)
-     * @param pageIndex
-     * @param pageSize 姣忊粴鏉℃暟锛堟渶饧や笉鑳借秴杩�100锛�
-     * @return
      */
-    @PostMapping("getYangBen")
-    public String getYangBen (String queryString,int pageIndex,int pageSize ) {
-        return hisService.getYangBen(queryString,pageIndex,pageSize);
+    @PostMapping("/{hospName}/getYangBen")
+    public String getYangBen (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getYangBen(map);
     }
-
 
     /**
      *  鐥呭尯淇℃伅鎺ㄩ��
-     * @param yuanQuId 闄㈠尯Id
-     * @param keShiId 绉戝Id
-     * @param pageIndex 褰撳墠饣�
-     * @param pageSize 姣忊粴鏉℃暟锛堟渶饧や笉鑳借秴杩�100锛�
-     * @return
      */
-    @PostMapping("getBingQuList")
-    public String getListBingQuZd (String yuanQuId,String keShiId,int pageIndex,int pageSize ) {
-        return hisService.getListBingQuZd(yuanQuId,keShiId,pageIndex,pageSize);
+    @PostMapping("/{hospName}/getBingQuList")
+    public String getListBingQuZd (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getListBingQuZd(map);
     }
 
     /**
      * 鑱屸集淇℃伅
-     * @param bianGengSj 鍙樻洿鏃堕棿
-     * @param pageIndex 褰撳墠饣�
-     * @param pageSize 姣忊粴鏉℃暟锛堟渶饧や笉鑳借秴杩�100锛�
-     * @return
      */
-    @PostMapping("getZhiGongList")
-    public String getZhiGongPage (String bianGengSj,int pageIndex,int pageSize ) {
-        return hisService.getZhiGongPage(bianGengSj,pageIndex,pageSize);
+    @PostMapping("/{hospName}/getZhiGongList")
+    public String getZhiGongPage (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getZhiGongPage(map);
     }
-
 
     /**
      * 妫�鏌ラ」鐩�
-     * @param queryString
-     * @param bianGengSj
-     * @param pageIndex
-     * @param pageSize
-     * @return
      */
-    @PostMapping("getJcxm")
-    public String getJianChaXm (String queryString,String bianGengSj,int pageIndex,int pageSize ) {
-        return hisService.getJianChaXm(queryString,bianGengSj,pageIndex,pageSize);
+    @PostMapping("/{hospName}/getJcxm")
+    public String getJianChaXm (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getJianChaXm(map);
     }
 
     /**
      * 妫�楠岄」饨帹閫�
-     * @param queryCode 鏌ヨ鐮�(椤光浆缂栫爜/鎷尖境鐮�
-     * @param page 褰撳墠饣�
-     * @param size 姣忊粴鏉℃暟锛堟渶饧や笉鑳借秴杩�100
-     * @return
      */
-    @PostMapping("getJyxm")
-    public String getJianYanXm(String queryCode,Integer page,Integer size){
-        return hisService.getJianYanXm(queryCode,page,size);
+    @PostMapping("/{hospName}/getJyxm")
+    public String getJianYanXm(@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map){
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getJianYanXm(map);
     }
 
     /**
      * 妫�楠岄」饨敹璐规帹閫�
-     * @param shouFeiXmId 鏀惰垂椤光浆id
-     * @param jiaGeTx 浠锋牸浣撶郴
-     * @return
      */
-    @PostMapping("getShouFeiXmjg")
-    public String getShouFeiXmJg(String shouFeiXmId,String jiaGeTx){
-        return hisService.getShouFeiXmJg(shouFeiXmId,jiaGeTx);
+    @PostMapping("/{hospName}/getShouFeiXmjg")
+    public String getShouFeiXmJg(@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map){
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getShouFeiXmJg(map);
     }
 
     /**
      * 妫�楠屽鍣�
-     * @param queryString 瀹瑰櫒鍚嶇О(瀹瑰櫒鍚嶇О/杈撯紛鐮�1)
-     * @param pageIndex 褰撳墠饣�
-     * @param pageSize 姣忊粴鏉℃暟锛堟渶饧や笉鑳借秴杩�100锛�
-     * @return
      */
-    @PostMapping("getJyrqList")
-    public String getRongQi(String queryString,Integer pageIndex,Integer pageSize){
-        return hisService.getRongQi(queryString,pageIndex,pageSize);
+    @PostMapping("/{hospName}/getJyrqList")
+    public String getRongQi(@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map){
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getRongQi(map);
     }
 
     /**
      *  妫�楠屾牱鏈�
-     * @param queryString 鏍锋湰绫诲瀷鍚嶇О(鏍锋湰鍚嶇О/鏍锋湰绫诲瀷id)
-     * @param pageIndex  褰撳墠饣�
-     * @param pageSize 姣忊粴鏉℃暟锛堟渶饧や笉鑳借秴杩�100锛�
+     */
+    @PostMapping("/{hospName}/getJyybList")
+    public String getJyYangBen(@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map){
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.getJyYangBen(map);
+    }
+
+    /**
+     * 鏀堕��璐瑰洖璋冩帴鍙�
+     * @param hospName 鍔ㄦ�佸洯鍖哄悕 鎴戞柟鎻愪緵
+     * @param map 鍙傛暟
      * @return
      */
-    @PostMapping("getJyybList")
-    public String getYangBen(String queryString,Integer pageIndex,Integer pageSize){
-        return hisService.getJyYangBen(queryString,pageIndex,pageSize);
+    @PostMapping("/{hospName}/pushZhiFuMsg")
+    public String getPushZhiFuMsg (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) {
+        HisService hisService = serviceFactory.getService(hospName);
+        return hisService.pushZhiFuMsg(hospName,map);
     }
 }

--
Gitblit v1.8.0