package com.ltkj.web.controller.lis; import cn.hutool.json.JSONUtil; import com.ltkj.common.core.domain.AjaxResult; import com.ltkj.hosp.lisDto.LisSaveSqdxxDto; import com.ltkj.web.controller.his.HisApiGetMethodService; import com.ltkj.web.wxUtils.HttpClientUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.HashMap; import java.util.Map; @Component @Slf4j public class LisApiMethodService { private static String HIS_URL = "http://ip:prot/api/Tjinterface/"; @Autowired private HisApiGetMethodService service; //获取检验项目 public AjaxResult getjyxm() { Map map = new HashMap<>(); // String post = HttpClientUtils.sendPost(HIS_URL + "getjyxm", map); // return AjaxResult.success().put("data", post); return service.getLisData("getjyxm", map); } //获取检验指标项目 public AjaxResult getjyzbxm() { Map map = new HashMap<>(); // String post = HttpClientUtils.sendPost(HIS_URL + "getjyzbxm", map); // return AjaxResult.success().put("data", post); return service.getLisData("getjyzbxm",map); } //获取检验项目对应指标明细项目 public AjaxResult getjyxmdyzbxm() { Map map = new HashMap<>(); // String post = HttpClientUtils.sendPost(HIS_URL + "getjyxmdyzbxm", map); // return AjaxResult.success().put("data", post); return service.getLisData("getjyxmdyzbxm",map); } //获取检验样本信息 public AjaxResult getJyybbm() { Map map = new HashMap<>(); // String post = HttpClientUtils.sendPost(HIS_URL + "getJyybbm", map); // return AjaxResult.success().put("data", post); return service.getLisData("getJyybbm",map); } //获取检验分类合并信息 public AjaxResult getJyflhbxx() { Map map = new HashMap<>(); // String post = HttpClientUtils.sendPost(HIS_URL + "getJyflhbxx", map); // return AjaxResult.success().put("data", post); return service.getLisData("getJyflhbxx",map); } //保存检验申请信息 public AjaxResult saveSqdxx(LisSaveSqdxxDto dto) { Map map = new HashMap<>(); map.put("jyxh", dto.getJyxh()); map.put("bah", dto.getBah()); map.put("brxm", dto.getBrxm()); map.put("brdm", dto.getBrdm()); map.put("xb", dto.getXb()); map.put("csrq", dto.getCsrq()); map.put("nl", dto.getNl()); map.put("nldw", dto.getNldw()); map.put("sfzh", dto.getSfzh()); map.put("lxdh", dto.getLxdh()); map.put("jtzz", dto.getJtzz()); map.put("sqrq", dto.getSqrq()); map.put("ybbm", dto.getYbbm()); map.put("cyrq", dto.getCyrq()); map.put("lczd", dto.getLczd()); map.put("fyje", dto.getFyje()); map.put("bz", dto.getBz()); map.put("ksbm", dto.getKsbm()); map.put("sqys", dto.getSqys()); map.put("jyxmlist", dto.getJyxmlist()); // String post = HttpClientUtils.sendPost(HIS_URL + "saveSqdxx", map); // return AjaxResult.success().put("data", post); return service.getLisData("saveSqdxx",map); } //获取检验结果 public AjaxResult getJyjg(String bah) { Map map = new HashMap<>(); map.put("bah", bah); // String post = HttpClientUtils.sendPost(HIS_URL + "getJyjg", map); // return AjaxResult.success().put("data", post); return service.getLisData("getJyjg",map); } //作废检验申请信息 public AjaxResult updateSqdxx(String bah, String jyxh, String brxm) { Map map = new HashMap<>(); map.put("bah", bah); map.put("jyxh", jyxh); map.put("brxm", brxm); log.info("作废检验 ->{}", JSONUtil.toJsonStr(map)); // return AjaxResult.warn("暂无此数据"); // String post = HttpClientUtils.sendPost(HIS_URL + "/updateSqdxx", map); // return AjaxResult.success().put("data", post); return service.getLisData("updateSqdxx",map); } //调用返回检验结果: //exec usp_tjjk_jyjg ‘体检号’ 调用更新状态: //exec usp_tjjk_jyzt ‘检验序号’ }