路泰机电科技体检——数据平台后端
zhaowenxuan
2025-05-19 48e75a9aa5546494cd74274404a2e7cf891a005c
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;
//    里面有danJia/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 正常;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);
    }
}