...
|
...
|
@@ -22,21 +22,23 @@ public class ReportTest { |
|
|
private static String token;
|
|
|
|
|
|
@BeforeClass
|
|
|
public static void init(){
|
|
|
token = loginAndGetToken(Constants.USR_ACC,Constants.USR_PWD);
|
|
|
String token =OpenIdTest.bindWithOpenIdAndLoginAndGetToken(Constants.USR_OPENID,Constants.USR_OPENID_TYPE);
|
|
|
public static void init() {
|
|
|
|
|
|
// String token = OpenIdTest.bindWithOpenIdAndLoginAndGetToken(Constants.USR_OPENID, Constants.USR_OPENID_TYPE);
|
|
|
token = loginAndGetToken(Constants.USR_ACC, Constants.USR_PWD);
|
|
|
// String token =OpenIdTest.bindWithOpenIdAndLoginAndGetToken(Constants.USR_OPENID,Constants.USR_OPENID_TYPE);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 体检报告列表查询接口
|
|
|
*/
|
|
|
@Test
|
|
|
public void testList(){
|
|
|
Map<String,String> params = new HashMap<String, String>();
|
|
|
params.put("t",HttpTools.getNow());
|
|
|
params.put("type",Constants.KEY_ID);
|
|
|
params.put("sign",HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_REPORT_LIST,"GET",params,token);
|
|
|
public void testList() {
|
|
|
Map<String, String> params = new HashMap<String, String>();
|
|
|
params.put("t", HttpTools.getNow());
|
|
|
params.put("type", Constants.KEY_ID);
|
|
|
params.put("sign", HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_REPORT_LIST, "GET", params, token);
|
|
|
System.out.println(response);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -44,13 +46,13 @@ public class ReportTest { |
|
|
* 体检报告详情查询接口
|
|
|
*/
|
|
|
@Test
|
|
|
public void testDetail(){
|
|
|
Map<String,String> params = new HashMap<String, String>();
|
|
|
params.put("report_id","141");
|
|
|
params.put("t",HttpTools.getNow());
|
|
|
params.put("type",Constants.KEY_ID);
|
|
|
params.put("sign",HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_REPORT_DETAIL,"GET",params,token);
|
|
|
public void testDetail() {
|
|
|
Map<String, String> params = new HashMap<String, String>();
|
|
|
params.put("report_id", "141");
|
|
|
params.put("t", HttpTools.getNow());
|
|
|
params.put("type", Constants.KEY_ID);
|
|
|
params.put("sign", HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_REPORT_DETAIL, "GET", params, token);
|
|
|
System.out.println(response);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -58,15 +60,15 @@ public class ReportTest { |
|
|
* 体检报告指标解释查询接口
|
|
|
*/
|
|
|
@Test
|
|
|
public void testItemInfo(){
|
|
|
Map<String,String> params = new HashMap<String, String>();
|
|
|
params.put("itemId","10");
|
|
|
params.put("status","2");
|
|
|
params.put("isPureHtml","false");
|
|
|
params.put("t",HttpTools.getNow());
|
|
|
params.put("type",Constants.KEY_ID);
|
|
|
params.put("sign",HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_ITEM_INFO,"GET",params,token);
|
|
|
public void testItemInfo() {
|
|
|
Map<String, String> params = new HashMap<String, String>();
|
|
|
params.put("itemId", "10");
|
|
|
params.put("status", "2");
|
|
|
params.put("isPureHtml", "false");
|
|
|
params.put("t", HttpTools.getNow());
|
|
|
params.put("type", Constants.KEY_ID);
|
|
|
params.put("sign", HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_ITEM_INFO, "GET", params, token);
|
|
|
System.out.println(response);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -74,15 +76,15 @@ public class ReportTest { |
|
|
* 体检报告指标解释查询接口(过滤html标签)
|
|
|
*/
|
|
|
@Test
|
|
|
public void testItemInfoPureHtml(){
|
|
|
Map<String,String> params = new HashMap<String, String>();
|
|
|
params.put("itemId","10");
|
|
|
params.put("status","1");
|
|
|
params.put("isPureHtml","true");
|
|
|
params.put("t",HttpTools.getNow());
|
|
|
params.put("type",Constants.KEY_ID);
|
|
|
params.put("sign",HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_ITEM_INFO,"GET",params,token);
|
|
|
public void testItemInfoPureHtml() {
|
|
|
Map<String, String> params = new HashMap<String, String>();
|
|
|
params.put("itemId", "10");
|
|
|
params.put("status", "1");
|
|
|
params.put("isPureHtml", "true");
|
|
|
params.put("t", HttpTools.getNow());
|
|
|
params.put("type", Constants.KEY_ID);
|
|
|
params.put("sign", HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_ITEM_INFO, "GET", params, token);
|
|
|
System.out.println(response);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -90,15 +92,15 @@ public class ReportTest { |
|
|
* 体检报告指标曲线查询接口
|
|
|
*/
|
|
|
@Test
|
|
|
public void testItemGraph(){
|
|
|
Map<String,String> params = new HashMap<String, String>();
|
|
|
params.put("itemId","10");
|
|
|
params.put("stime","2010-01-01 10:32:00");
|
|
|
params.put("etime","2019-12-22 10:32:00");
|
|
|
params.put("t",HttpTools.getNow());
|
|
|
params.put("type",Constants.KEY_ID);
|
|
|
params.put("sign",HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_ITEM_GRAPH,"GET",params,token);
|
|
|
public void testItemGraph() {
|
|
|
Map<String, String> params = new HashMap<String, String>();
|
|
|
params.put("itemId", "10");
|
|
|
params.put("stime", "2010-01-01 10:32:00");
|
|
|
params.put("etime", "2019-12-22 10:32:00");
|
|
|
params.put("t", HttpTools.getNow());
|
|
|
params.put("type", Constants.KEY_ID);
|
|
|
params.put("sign", HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_ITEM_GRAPH, "GET", params, token);
|
|
|
System.out.println(response);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -106,13 +108,13 @@ public class ReportTest { |
|
|
* 微信端体检报告分年龄比较接口
|
|
|
*/
|
|
|
@Test
|
|
|
public void testCompare(){
|
|
|
Map<String,String> params = new HashMap<String, String>();
|
|
|
params.put("report_id","77");
|
|
|
params.put("t",HttpTools.getNow());
|
|
|
params.put("type",Constants.KEY_ID);
|
|
|
params.put("sign",HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_COMPARE,"POST",params,token);
|
|
|
public void testCompare() {
|
|
|
Map<String, String> params = new HashMap<String, String>();
|
|
|
params.put("report_id", "77");
|
|
|
params.put("t", HttpTools.getNow());
|
|
|
params.put("type", Constants.KEY_ID);
|
|
|
params.put("sign", HttpTools.getSign(params));
|
|
|
String response = HttpTools.requestByMapWithToken(URL_COMPARE, "POST", params, token);
|
|
|
System.out.println(response);
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|