|
@@ -63,7 +63,7 @@ public class ViewController extends Controller {
|
|
String aesEncryptStr = AESUtils.aesEncryptStr(JSON.toJSONString(map), PropKit.get("nw_key"),IV);
|
|
String aesEncryptStr = AESUtils.aesEncryptStr(JSON.toJSONString(map), PropKit.get("nw_key"),IV);
|
|
Map <String,String> mapaes = new HashMap<String,String>();
|
|
Map <String,String> mapaes = new HashMap<String,String>();
|
|
mapaes.put("data",aesEncryptStr);
|
|
mapaes.put("data",aesEncryptStr);
|
|
- String content = postWithParameters("http://127.0.0.1:8082/df/view/getExam", mapaes);
|
|
|
|
|
|
+ String content = postWithParameters("http://127.0.0.1:8082/df/view/getExams", mapaes);
|
|
// this.renderText(content);
|
|
// this.renderText(content);
|
|
|
|
|
|
// JSONObject jsonObject = JSON.parseObject(content);
|
|
// JSONObject jsonObject = JSON.parseObject(content);
|
|
@@ -126,17 +126,65 @@ public class ViewController extends Controller {
|
|
jsonObject2.put("pattoken", "appuserrequest");
|
|
jsonObject2.put("pattoken", "appuserrequest");
|
|
jsonObject2.put("hispatid", this.getPara("hpid"));
|
|
jsonObject2.put("hispatid", this.getPara("hpid"));
|
|
jsonObject.put("data", jsonObject2);
|
|
jsonObject.put("data", jsonObject2);
|
|
-
|
|
|
|
-// String c=postWithJson(this.getPara("hpid")"http://192.168.100.181:8102/api/tjwebapi/CommQuery",jsonObject);
|
|
|
|
String c=postWithJson(this.getPara("url","http://192.168.100.181:8102/api/tjwebapi/CommQuery"),jsonObject);
|
|
String c=postWithJson(this.getPara("url","http://192.168.100.181:8102/api/tjwebapi/CommQuery"),jsonObject);
|
|
-
|
|
|
|
this.renderText(c);
|
|
this.renderText(c);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ // TODO: handle exception
|
|
|
|
+ this.renderText(e.toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void testWeb2() {
|
|
|
|
+ try {
|
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
|
+ jsonObject.put("functionCode", "queryPatByPatId");
|
|
|
|
+ jsonObject.put("userid", "1301");
|
|
|
|
+ JSONObject jsonObject2 = new JSONObject();
|
|
|
|
+ jsonObject2.put("pattoken", "appuserrequest");
|
|
|
|
+ jsonObject2.put("hispatid", this.getPara("hpid"));
|
|
|
|
+ jsonObject.put("data", jsonObject2);
|
|
|
|
+// String c=postWithJson(this.getPara("url","http://192.168.100.181:8102/api/tjwebapi/CommQuery"),jsonObject);
|
|
|
|
+ this.renderJson(jsonObject);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ // TODO: handle exception
|
|
|
|
+ this.renderText(e.toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void testWeb3() {
|
|
|
|
+ try {
|
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
|
+ jsonObject.put("functionCode", "queryPatByPatId");
|
|
|
|
+ jsonObject.put("userid", "1301");
|
|
|
|
+ JSONObject jsonObject2 = new JSONObject();
|
|
|
|
+ jsonObject2.put("pattoken", "appuserrequest");
|
|
|
|
+ jsonObject2.put("hispatid", this.getPara("hpid"));
|
|
|
|
+ jsonObject.put("data", jsonObject2);
|
|
|
|
+
|
|
|
|
+ RequestBody requestBody = RequestBody.create(JSON_CODE, jsonObject.toJSONString());
|
|
|
|
|
|
|
|
+ Request request = new Request.Builder().url("http://192.168.100.181:8102/api/tjwebapi/CommQuery").post(requestBody).build();
|
|
|
|
+
|
|
|
|
+ try (Response response = OKHTTP_CLIENT.newCall(request).execute()) {
|
|
|
|
+ if (!response.isSuccessful())
|
|
|
|
+ throw new IOException("Unexpected code " + response);
|
|
|
|
+ String content = response.body().string();
|
|
|
|
+ System.out.println(content);
|
|
|
|
+ this.renderText(content);
|
|
|
|
+// return content;
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
+ // TODO Auto-generated catch block
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+// return null;
|
|
|
|
+ this.renderText(e.toString());
|
|
|
|
+ }
|
|
|
|
+
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO: handle exception
|
|
// TODO: handle exception
|
|
this.renderText(e.toString());
|
|
this.renderText(e.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
public void bg() {
|
|
public void bg() {
|
|
Map <String,Object> params = new HashMap<String,Object>();
|
|
Map <String,Object> params = new HashMap<String,Object>();
|
|
// map.put("num", 30);
|
|
// map.put("num", 30);
|
|
@@ -150,7 +198,7 @@ public class ViewController extends Controller {
|
|
//报告医生姓名
|
|
//报告医生姓名
|
|
params.put("report_doctor_name", "");
|
|
params.put("report_doctor_name", "");
|
|
//报告时间
|
|
//报告时间
|
|
- params.put("report_datetime", "2023-06-10 14:55:54");
|
|
|
|
|
|
+ params.put("report_datetime", "2023-06-10 00:00:00");
|
|
//审核医生姓名
|
|
//审核医生姓名
|
|
params.put("review_doctor_name", "");
|
|
params.put("review_doctor_name", "");
|
|
//审核时间
|
|
//审核时间
|