From cf32b62b2baae720a57d66da0b3ba3a105150483 Mon Sep 17 00:00:00 2001 From: 赵文轩 <1652863494@qq.com> Date: 星期五, 07 六月 2024 09:48:54 +0800 Subject: [PATCH] 获取数据请求接口 --- ltkj-admin/src/main/java/com/ltkj/web/controller/his/TestGetController.java | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 55 insertions(+), 0 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/his/TestGetController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/his/TestGetController.java new file mode 100644 index 0000000..21d0b41 --- /dev/null +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/his/TestGetController.java @@ -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(); + } +} -- Gitblit v1.8.0