123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- package thyyxxk.webserver.service.externalhttp;
- import cn.hutool.core.util.StrUtil;
- import cn.hutool.http.HttpRequest;
- import com.alibaba.fastjson.JSON;
- import com.alibaba.fastjson.JSONObject;
- import org.springframework.stereotype.Service;
- @Service
- public class OutpatientBookingHttp {
- private static final String baseURL = "http://webhis.thyy.cn:81/thmz";
- public JSONObject getAmpmByDateAndDeptCode(String authorization, String date, String deptCode) {
- String url = baseURL + StrUtil.format("/getAmpmByDateAndDeptCode?date={}&deptCode={}",
- date, deptCode);
- String body = HttpRequest.get(url).header("Authorization", authorization)
- .execute().body();
- return JSON.parseObject(body);
- }
- public JSONObject getChargeTypeByRequestDayAndDoctor(String authorization,
- String unitCode, String ampm,
- String date, String apTime) {
- String url = baseURL + StrUtil.format("/getChargeTypeByRequestDayAndDoctor?" +
- "unitCode={}&m={}&date={}&apTime={}&doctorCode={}", unitCode, ampm, date, apTime);
- String body = HttpRequest.get(url).header("Authorization", authorization)
- .execute().body();
- return JSON.parseObject(body);
- }
- public JSONObject getDoctorCodeByRequestDayAndDoctor(String authorization,
- String unitCode, String ampm,
- String date, String apTime,
- String chargeType) {
- String url = baseURL + StrUtil.format("/getDoctorCodeByRequestDayAndDoctor?" +
- "unitCode={}&m={}&chargeType={}&date={}&apTime={}", unitCode, ampm, chargeType, date, ampm);
- String body = HttpRequest.get(url).header("Authorization", authorization)
- .execute().body();
- return JSON.parseObject(body);
- }
- public JSONObject getMzChargeTypeByMzyRequestId(String authorization, String mzyRequestId,
- String birthDay, String patientId) {
- String url = baseURL + StrUtil.format("/getMzChargeTypeByMzyRequestId?" +
- "mzyRequestId={}&birthDay={}&patientId={}", mzyRequestId, birthDay, patientId);
- String body = HttpRequest.get(url).header("Authorization", authorization)
- .execute().body();
- return JSON.parseObject(body);
- }
- @Post("/saveMzyReqrec")
- public JSONObject saveMzyReqrec(@Header("Authorization") String Authorization, @JSONBody JSONObject jsonObject);
- }
|