|
@@ -33,13 +33,13 @@ public class DrgWebApi {
|
|
|
.execute(JSONObject.class);
|
|
|
}
|
|
|
|
|
|
- public JSONObject etlClient(JSONObject obj) {
|
|
|
+ public void etlClient(JSONObject obj) {
|
|
|
if (StrUtil.isBlank(apiUrl.getDrgWebApi())) {
|
|
|
- return new JSONObject();
|
|
|
+ return;
|
|
|
}
|
|
|
- return Forest.post(apiUrl.getDrgWebApi() + "/etlClient/callHisData.action")
|
|
|
- .connectTimeout(3000)
|
|
|
- .readTimeout(6000)
|
|
|
+ Forest.post(apiUrl.getDrgWebApi() + "/etlClient/callHisData.action")
|
|
|
+ .setConnectTimeout(3000)
|
|
|
+ .setReadTimeout(6000)
|
|
|
.contentTypeJson()
|
|
|
.addBody(obj)
|
|
|
.execute(JSONObject.class);
|
|
@@ -51,12 +51,18 @@ public class DrgWebApi {
|
|
|
jsonObject.put("code", 404);
|
|
|
return jsonObject;
|
|
|
}
|
|
|
- return Forest.post(apiUrl.getDrgWebApi() + "/drg_web/drgGroupThird/getAllDrgResults.action")
|
|
|
- .connectTimeout(3000)
|
|
|
- .readTimeout(6000)
|
|
|
- .contentTypeJson()
|
|
|
- .addBody(obj)
|
|
|
- .execute(JSONObject.class);
|
|
|
+ try {
|
|
|
+ return Forest.post(apiUrl.getDrgWebApi() + "/drg_web/drgGroupThird/getAllDrgResults.action")
|
|
|
+ .setConnectTimeout(3000)
|
|
|
+ .setReadTimeout(6000)
|
|
|
+ .contentTypeJson()
|
|
|
+ .addBody(obj)
|
|
|
+ .execute(JSONObject.class);
|
|
|
+ } catch (Exception e) {
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("code", 0);
|
|
|
+ return jsonObject;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public ResultVo<JSONArray> powersiPreDischarge(String visitId) {
|
|
@@ -72,6 +78,8 @@ public class DrgWebApi {
|
|
|
JSONObject response;
|
|
|
try {
|
|
|
response = Forest.post(url)
|
|
|
+ .setConnectTimeout(3000)
|
|
|
+ .setReadTimeout(6000)
|
|
|
.contentTypeJson()
|
|
|
.addBody(params)
|
|
|
.execute(JSONObject.class);
|