|
@ -38,6 +38,8 @@ public class JwPrescriptionService {
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
@Autowired
|
|
|
private PrescriptionDao prescriptionDao;
|
|
|
@Value("${spring.profiles}")
|
|
|
private String profiles;
|
|
|
|
|
|
/**
|
|
|
* 获取字典列表
|
|
@ -89,15 +91,18 @@ public class JwPrescriptionService {
|
|
|
params.add(new BasicNameValuePair("applyTimeFrom", applyTimeFrom));
|
|
|
params.add(new BasicNameValuePair("applyTimeEnd", applyTimeEnd));
|
|
|
|
|
|
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();
|
|
|
String response = "";
|
|
|
if("prod".equals(profiles)){
|
|
|
response = httpClientUtil.post(url, params, "UTF-8");
|
|
|
}else {
|
|
|
String sql = "SELECT h.response from wlyy_http_log h WHERE h.id = 806287";
|
|
|
List<Map<String ,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
response = list.get(0).get("response").toString();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("status",200);
|
|
|
jsonObject.put("data",response);
|
|
|
response = jsonObject.toString();
|
|
|
}
|
|
|
return response;
|
|
|
}
|
|
|
|