|
@ -73,8 +73,7 @@ public class ShiBeiCityGridApiImpl implements ShiBeiCityGridApi { |
|
|
public SendEventResultDto sendEvent(SendEventFormDto sendEventFormDto) { |
|
|
public SendEventResultDto sendEvent(SendEventFormDto sendEventFormDto) { |
|
|
String json = JSONObject.toJSONString(sendEventFormDto); |
|
|
String json = JSONObject.toJSONString(sendEventFormDto); |
|
|
String data = "content="+ json; |
|
|
String data = "content="+ json; |
|
|
LOGGER.info("发送参数:" + data); |
|
|
LOGGER.info("发送地址:"+ApiConstants.sendEventUrl + "||发送参数:" + data); |
|
|
LOGGER.info("发送地址:"+ApiConstants.sendEventUrl); |
|
|
|
|
|
HttpResponse response = null; |
|
|
HttpResponse response = null; |
|
|
try { |
|
|
try { |
|
|
response = HttpRequest.post(ApiConstants.sendEventUrl).body(data) |
|
|
response = HttpRequest.post(ApiConstants.sendEventUrl).body(data) |
|
@ -89,7 +88,7 @@ public class ShiBeiCityGridApiImpl implements ShiBeiCityGridApi { |
|
|
SendEventResultDto result = null; |
|
|
SendEventResultDto result = null; |
|
|
if(0 == Integer.parseInt(res.get("code").toString())){ |
|
|
if(0 == Integer.parseInt(res.get("code").toString())){ |
|
|
try { |
|
|
try { |
|
|
result = (SendEventResultDto) JSONObject.toJavaObject((JSONObject) res.get("data"), SendEventResultDto.class); |
|
|
result = JSONObject.toJavaObject((JSONObject) res.get("data"), SendEventResultDto.class); |
|
|
result.setCode("0"); |
|
|
result.setCode("0"); |
|
|
}catch (Exception e){ |
|
|
}catch (Exception e){ |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
@ -97,7 +96,7 @@ public class ShiBeiCityGridApiImpl implements ShiBeiCityGridApi { |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
try { |
|
|
try { |
|
|
result = (SendEventResultDto) JSONObject.toJavaObject(res, SendEventResultDto.class); |
|
|
result = JSONObject.toJavaObject(res, SendEventResultDto.class); |
|
|
}catch (Exception e){ |
|
|
}catch (Exception e){ |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
LOGGER.error("事件上报返回结果处理错误:" + e.getMessage()); |
|
|
LOGGER.error("事件上报返回结果处理错误:" + e.getMessage()); |
|
@ -109,8 +108,7 @@ public class ShiBeiCityGridApiImpl implements ShiBeiCityGridApi { |
|
|
@Override |
|
|
@Override |
|
|
public SendEventResultDto sendEventManual(String data) { |
|
|
public SendEventResultDto sendEventManual(String data) { |
|
|
data = "content="+ data; |
|
|
data = "content="+ data; |
|
|
LOGGER.info("发送参数:" + data); |
|
|
LOGGER.info("发送地址:"+ApiConstants.sendEventUrl + "||发送参数:" + data); |
|
|
LOGGER.info("发送地址:"+ApiConstants.sendEventUrl); |
|
|
|
|
|
HttpResponse response = null; |
|
|
HttpResponse response = null; |
|
|
try { |
|
|
try { |
|
|
response = HttpRequest.post(ApiConstants.sendEventUrl).body(data) |
|
|
response = HttpRequest.post(ApiConstants.sendEventUrl).body(data) |
|
@ -125,7 +123,7 @@ public class ShiBeiCityGridApiImpl implements ShiBeiCityGridApi { |
|
|
SendEventResultDto result = null; |
|
|
SendEventResultDto result = null; |
|
|
if(0 == Integer.parseInt(res.get("code").toString())){ |
|
|
if(0 == Integer.parseInt(res.get("code").toString())){ |
|
|
try { |
|
|
try { |
|
|
result = (SendEventResultDto) JSONObject.toJavaObject((JSONObject) res.get("data"), SendEventResultDto.class); |
|
|
result = JSONObject.toJavaObject((JSONObject) res.get("data"), SendEventResultDto.class); |
|
|
result.setCode("0"); |
|
|
result.setCode("0"); |
|
|
}catch (Exception e){ |
|
|
}catch (Exception e){ |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
@ -133,7 +131,7 @@ public class ShiBeiCityGridApiImpl implements ShiBeiCityGridApi { |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
try { |
|
|
try { |
|
|
result = (SendEventResultDto) JSONObject.toJavaObject(res, SendEventResultDto.class); |
|
|
result = JSONObject.toJavaObject(res, SendEventResultDto.class); |
|
|
}catch (Exception e){ |
|
|
}catch (Exception e){ |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
LOGGER.error("事件上报返回结果处理错误:" + e.getMessage()); |
|
|
LOGGER.error("事件上报返回结果处理错误:" + e.getMessage()); |
|
@ -213,8 +211,7 @@ public class ShiBeiCityGridApiImpl implements ShiBeiCityGridApi { |
|
|
public EventRejectDoResultDto sendReDoEvent(EventRejectReDoFormDto rejectReDoDTO) { |
|
|
public EventRejectDoResultDto sendReDoEvent(EventRejectReDoFormDto rejectReDoDTO) { |
|
|
String json = JSONObject.toJSONString(rejectReDoDTO); |
|
|
String json = JSONObject.toJSONString(rejectReDoDTO); |
|
|
String data = "content="+ json; |
|
|
String data = "content="+ json; |
|
|
LOGGER.info("发送参数:" + data); |
|
|
LOGGER.info("发送地址:"+ApiConstants.sendEventUrl + "||发送参数:" + data); |
|
|
LOGGER.info("发送地址:"+ApiConstants.sendEventUrl); |
|
|
|
|
|
HttpResponse response = null; |
|
|
HttpResponse response = null; |
|
|
try { |
|
|
try { |
|
|
response = HttpRequest.post(ApiConstants.sendEventUrl).body(data) |
|
|
response = HttpRequest.post(ApiConstants.sendEventUrl).body(data) |
|
|