赵文轩
2024-06-07 cf32b62b2baae720a57d66da0b3ba3a105150483
获取数据请求接口
1个文件已添加
55 ■■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/his/TestGetController.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/his/TestGetController.java
New file
@@ -0,0 +1,55 @@
package com.ltkj.web.controller.his;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.ltkj.common.core.domain.AjaxResult;
import lombok.extern.slf4j.Slf4j;
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 java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
@RequestMapping("/his/getData")
public class TestGetController {
    @Autowired
    private HisApiGetMethodService apiGetMethodService;
    @PostMapping("test")
    public AjaxResult test(@RequestBody String json){
        JSONObject jsonObject = JSONUtil.parseObj(json);
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("his_registration_id",jsonObject.getStr("his_registration_id"));
        hashMap.put("ksbm",jsonObject.getStr("ksbm"));
        hashMap.put("pationid",jsonObject.getStr("pationid"));
        hashMap.put("ksrq",jsonObject.getStr("ksrq"));
        hashMap.put("jsrq",jsonObject.getStr("jsrq"));
        hashMap.put("pagecount",jsonObject.getInt("pagecount"));
        hashMap.put("page",jsonObject.getInt("page"));
        // 获取检验报告记录信息
        AjaxResult getlabreportinfo = apiGetMethodService.getHISDataNew("Getlabreportinfo", hashMap);
        log.info("getlabreportinfo ->{}",getlabreportinfo);
        if (getlabreportinfo.get("code").toString().equals("200")){
            List<Map<String ,Object>> data = (List<Map<String, Object>>) getlabreportinfo.get("data");
            Map<String, Object> resultMap = data.get(0);
            String jybgid = (String) resultMap.get("JYBGID");
            // 获取检验结果记录信息
            hashMap = new HashMap<>();
            hashMap.put("jybgid",jybgid);
            AjaxResult getlabdetailinfo = apiGetMethodService.getHISDataNew("Getlabdetailinfo", hashMap);
            // 获取微生物报告记录信息
            AjaxResult getlabgermrepinfo = apiGetMethodService.getHISDataNew("Getlabgermrepinfo", hashMap);
            // 获取微生物药敏信息
            AjaxResult getlabgermdetailinfo = apiGetMethodService.getHISDataNew("Getlabgermdetailinfo", hashMap);
            // 获取危急值信息
            AjaxResult getlaburgentinfo = apiGetMethodService.getHISDataNew("Getlaburgentinfo", hashMap);
        }
        return AjaxResult.success();
    }
}