From e460e434fe3975a4ae33466710d8292245ad8e07 Mon Sep 17 00:00:00 2001 From: zhaowenxuan <chacca165@163.com> Date: 星期四, 19 六月 2025 18:09:33 +0800 Subject: [PATCH] 2025-06-19 --- src/main/java/com/example/controller/HisController.java | 132 +++++++++++++++++++++++++++---------------- 1 files changed, 82 insertions(+), 50 deletions(-) diff --git a/src/main/java/com/example/controller/HisController.java b/src/main/java/com/example/controller/HisController.java index 0f94c7b..7b18823 100644 --- a/src/main/java/com/example/controller/HisController.java +++ b/src/main/java/com/example/controller/HisController.java @@ -6,10 +6,7 @@ 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.RequestBody; -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; @@ -24,164 +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"; } /** * 寤烘。 */ - @PostMapping("creat") - public String jianDang (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/creat") + public String jianDang (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.jianDang(map); } /** * 楠岃瘉韬唤璇佹槸鍚﹀缓杩囨。 */ - @PostMapping("isCreat") - public String getBingRenXxByShengFenZheng (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/isCreat") + public String getBingRenXxByShengFenZheng (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.getBingRenXxByShengFenZheng(map); } /** * 鐥呬汉鍩烘湰淇℃伅鍙樻洿 */ - @PostMapping("update") - public String saveBingRenXx (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/update") + public String saveBingRenXx (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.saveBingRenXx(map); } /** * 寰呮敹璐硅垂鐢ㄦ煡璇� */ - @PostMapping("getPendingPaymentList") - public String getListDaiShouFei (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/getPendingPaymentList") + public String getListDaiShouFei (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.getListDaiShouFei(map); } /** * 鐢熸垚寰呮敹璐�/寰呴��璐� 璐圭敤 */ - @PostMapping("creatCostInfo") - public String createMenZhenFy (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/creatCostInfo") + public String createMenZhenFy (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.createMenZhenFy(map); } /** * 闂ㄨ瘖鏈敹璐硅垂鐢ㄦ挙閿� */ - @PostMapping("revokeCost") - public String cheXiaoMzFy (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/revokeCost") + public String cheXiaoMzFy (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.cheXiaoMzFy(map); - } - - /** - * 鏀惰垂/閫�璐瑰畬鎴愰�氱煡绗笁鏂� - */ - @PostMapping("pushPayMsg") - public String pushZhiFuMsg (@RequestBody Map<String ,Object> map) { - return hisService.pushZhiFuMsg(map); } /** * 绉戝淇℃伅鏌ヨ */ - @PostMapping("getKeShiList") - public String getKeShi (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/getKeShiList") + public String getKeShi (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.getKeShi(map); } /** * 鍖荤敓淇℃伅鏌ヨ */ - @PostMapping("getYiShengList") - public String getListYiShengZd (@RequestBody Map<String ,Object> map) { + @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); } /** * 鑾峰彇鏀惰垂椤圭洰鍒嗛〉 */ - @PostMapping("getShouFeiXmList") - public String getShouFeiXm (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/getShouFeiXmList") + public String getShouFeiXm (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.getShouFeiXm(map); } /** *绉戝淇℃伅鎺ㄩ�� */ - @PostMapping("getKeShiByConditionsList") - public String getKeShiByConditions (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/getKeShiByConditionsList") + public String getKeShiByConditions (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.getKeShiByConditions(map); } /** * 鍙栨牱鏈瓧鍏� */ - @PostMapping("getYangBen") - public String getYangBen (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/getYangBen") + public String getYangBen (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.getYangBen(map); } /** * 鐥呭尯淇℃伅鎺ㄩ�� */ - @PostMapping("getBingQuList") - public String getListBingQuZd (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/getBingQuList") + public String getListBingQuZd (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.getListBingQuZd(map); } /** * 鑱屸集淇℃伅 */ - @PostMapping("getZhiGongList") - public String getZhiGongPage (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/getZhiGongList") + public String getZhiGongPage (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.getZhiGongPage(map); } /** * 妫�鏌ラ」鐩� */ - @PostMapping("getJcxm") - public String getJianChaXm (@RequestBody Map<String ,Object> map) { + @PostMapping("/{hospName}/getJcxm") + public String getJianChaXm (@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map) { + HisService hisService = serviceFactory.getService(hospName); return hisService.getJianChaXm(map); } /** * 妫�楠岄」饨帹閫� */ - @PostMapping("getJyxm") - public String getJianYanXm(@RequestBody Map<String ,Object> map){ + @PostMapping("/{hospName}/getJyxm") + public String getJianYanXm(@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map){ + HisService hisService = serviceFactory.getService(hospName); return hisService.getJianYanXm(map); } /** * 妫�楠岄」饨敹璐规帹閫� */ - @PostMapping("getShouFeiXmjg") - public String getShouFeiXmJg(@RequestBody Map<String ,Object> map){ + @PostMapping("/{hospName}/getShouFeiXmjg") + public String getShouFeiXmJg(@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map){ + HisService hisService = serviceFactory.getService(hospName); return hisService.getShouFeiXmJg(map); } /** * 妫�楠屽鍣� */ - @PostMapping("getJyrqList") - public String getRongQi(@RequestBody Map<String ,Object> map){ + @PostMapping("/{hospName}/getJyrqList") + public String getRongQi(@PathVariable("hospName") String hospName,@RequestBody Map<String ,Object> map){ + HisService hisService = serviceFactory.getService(hospName); return hisService.getRongQi(map); } /** * 妫�楠屾牱鏈� */ - @PostMapping("getJyybList") - public String getJyYangBen(@RequestBody Map<String ,Object> map){ + @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("/{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