Browse Source

优化天气气象预警信息回传

修改在线率检测使用字段
develop
zhaoxianglong 8 months ago
parent
commit
1cb75b4e73
  1. 2
      zc-business/src/main/java/com/zc/business/controller/BroadcastController.java
  2. 5
      zc-business/src/main/java/com/zc/business/controller/StatusController.java
  3. 17
      zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java

2
zc-business/src/main/java/com/zc/business/controller/BroadcastController.java

@ -39,7 +39,7 @@ public class BroadcastController extends BaseController {
private static final String SECRET = "21232f297a57a5a743894a0e4a801fc3";
private static final String CALLBACKURL = "http://10.0.81.209/broadcast/logIn";
private static final String CALLBACKURL = "http://10.0.81.202/broadcast/logIn";
private final static String URL = HTTP + "10.0.81.106/api/REST-API/";

5
zc-business/src/main/java/com/zc/business/controller/StatusController.java

@ -207,8 +207,11 @@ public class StatusController extends BaseController {
maps.put("sucessRate",String.format("%.2f", sucessRate)+"%");
//离线率
maps.put("failRate",failRate);
List<DcDevice> list = dcDeviceService.list();
//已使用数量
maps.put("sumUseState",String.valueOf(lastEntry.size()));
//总数
maps.put("sum",String.valueOf(lastEntry.size()));
maps.put("sum",String.valueOf(list.size()));
subMap.put("全部设备",maps);
return AjaxResult.success(subMap);

17
zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java

@ -116,15 +116,14 @@ public class WeatherForecastController extends BaseController {
JSONArray meteorologicalEarlyWarning6 = jsonObject.getJSONArray("meteorologicalEarlyWarning6");
JSONArray meteorologicalEarlyWarning7 = jsonObject.getJSONArray("meteorologicalEarlyWarning7");
JSONArray meteorologicalEarlyWarning8 = jsonObject.getJSONArray("meteorologicalEarlyWarning8");
return AjaxResult.success(meteorologicalEarlyWarning1.size() +
meteorologicalEarlyWarning2.size() +
meteorologicalEarlyWarning3.size() +
meteorologicalEarlyWarning4.size() +
meteorologicalEarlyWarning5.size() +
meteorologicalEarlyWarning6.size() +
meteorologicalEarlyWarning7.size() +
meteorologicalEarlyWarning8.size()
);
return AjaxResult.success((meteorologicalEarlyWarning1 == null ? 0 : meteorologicalEarlyWarning1.size()) +
(meteorologicalEarlyWarning2 == null ? 0 : meteorologicalEarlyWarning2.size()) +
(meteorologicalEarlyWarning3 == null ? 0 : meteorologicalEarlyWarning3.size()) +
(meteorologicalEarlyWarning4 == null ? 0 : meteorologicalEarlyWarning4.size()) +
(meteorologicalEarlyWarning5 == null ? 0 : meteorologicalEarlyWarning5.size()) +
(meteorologicalEarlyWarning6 == null ? 0 : meteorologicalEarlyWarning6.size()) +
(meteorologicalEarlyWarning7 == null ? 0 : meteorologicalEarlyWarning7.size()) +
(meteorologicalEarlyWarning8 == null ? 0 : meteorologicalEarlyWarning8.size()));
}

Loading…
Cancel
Save