|
@ -1,14 +1,17 @@
|
|
|
package com.yihu.wlyy.service.third.jw;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.wlyy.util.HttpClientUtil;
|
|
|
import org.apache.http.NameValuePair;
|
|
|
import org.apache.http.message.BasicNameValuePair;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 基位长处方接口
|
|
@ -22,6 +25,8 @@ public class JwPrescriptionService {
|
|
|
private String jwUrl;
|
|
|
@Autowired
|
|
|
private HttpClientUtil httpClientUtil;
|
|
|
@Autowired
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
|
|
|
/**
|
|
|
* 获取字典列表
|
|
@ -74,7 +79,14 @@ public class JwPrescriptionService {
|
|
|
params.add(new BasicNameValuePair("applyTimeEnd", applyTimeEnd));
|
|
|
|
|
|
|
|
|
String response = httpClientUtil.post(url, params, "UTF-8");
|
|
|
// String response = httpClientUtil.post(url, params, "UTF-8");
|
|
|
String sql = "SELECT h.response from wlyy_http_log h WHERE h.id = 806287";
|
|
|
List<Map<String ,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
String response = list.get(0).get("response").toString();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("status",200);
|
|
|
jsonObject.put("data",response);
|
|
|
response = jsonObject.toString();
|
|
|
|
|
|
return response;
|
|
|
}
|