|
@@ -1735,26 +1735,24 @@ public class GeoHazardMonitorTokenController {
|
|
AjaxResults1 = new AjaxResults(0, "预警时间参数不对,正确格式为:单位毫秒(13位)");
|
|
AjaxResults1 = new AjaxResults(0, "预警时间参数不对,正确格式为:单位毫秒(13位)");
|
|
return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
}
|
|
}
|
|
- if (ObjectUtils.isEmpty(preAlarmResponse.getPreAlarmList())) {
|
|
|
|
- AjaxResults1 = new AjaxResults(0, "预警目标集合不能为空");
|
|
|
|
- return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
|
- }
|
|
|
|
- for (PreAlarmResponse.PreAlarmList preAlarmList : preAlarmResponse.getPreAlarmList()) {
|
|
|
|
- if (ObjectUtils.isEmpty(preAlarmList.getContent())) {
|
|
|
|
- AjaxResults1 = new AjaxResults(0, "预警内容不能为空");
|
|
|
|
- return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
|
- }
|
|
|
|
- if (ObjectUtils.isEmpty(preAlarmList.getDistance())) {
|
|
|
|
- AjaxResults1 = new AjaxResults(0, "目标点离机车的距离不能为空");
|
|
|
|
- return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
|
- }
|
|
|
|
- if (ObjectUtils.isEmpty(preAlarmList.getLevel())) {
|
|
|
|
- AjaxResults1 = new AjaxResults(0, "预警级别不能为空");
|
|
|
|
- return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
|
- }
|
|
|
|
- if (ObjectUtils.isEmpty(preAlarmList.getTargetType())) {
|
|
|
|
- AjaxResults1 = new AjaxResults(0, "预警目标点类型不能为空");
|
|
|
|
- return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
|
|
|
+ if (!ObjectUtils.isEmpty(preAlarmResponse.getPreAlarmList())) {
|
|
|
|
+ for (PreAlarmResponse.PreAlarmList preAlarmList : preAlarmResponse.getPreAlarmList()) {
|
|
|
|
+ if (ObjectUtils.isEmpty(preAlarmList.getContent())) {
|
|
|
|
+ AjaxResults1 = new AjaxResults(0, "预警内容不能为空");
|
|
|
|
+ return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtils.isEmpty(preAlarmList.getDistance())) {
|
|
|
|
+ AjaxResults1 = new AjaxResults(0, "目标点离机车的距离不能为空");
|
|
|
|
+ return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtils.isEmpty(preAlarmList.getLevel())) {
|
|
|
|
+ AjaxResults1 = new AjaxResults(0, "预警级别不能为空");
|
|
|
|
+ return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtils.isEmpty(preAlarmList.getTargetType())) {
|
|
|
|
+ AjaxResults1 = new AjaxResults(0, "预警目标点类型不能为空");
|
|
|
|
+ return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
PreAlarm preAlarm = new PreAlarm();
|
|
PreAlarm preAlarm = new PreAlarm();
|