Commit c21ffff0 authored by zhangsen's avatar zhangsen

分析需求API

parent 889f7e54
...@@ -157,7 +157,7 @@ public class BigScreenAnalyseController extends BaseController { ...@@ -157,7 +157,7 @@ public class BigScreenAnalyseController extends BaseController {
Map<String, BigDecimal> collect = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("area").toString(), t -> new BigDecimal(t.get("healthIndex").toString()))); Map<String, BigDecimal> collect = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("area").toString(), t -> new BigDecimal(t.get("healthIndex").toString())));
List<String> list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区"); List<String> list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区");
List<Object> seriesData = new ArrayList<>(); List<Object> seriesData = new ArrayList<>();
list.forEach(item -> seriesData.add(collect.getOrDefault(item, new BigDecimal("0")))); list.forEach(item -> seriesData.add(collect.getOrDefault(item, new BigDecimal("100"))));
resultMap.put("axisData", list); resultMap.put("axisData", list);
resultMap.put("seriesData", seriesData); resultMap.put("seriesData", seriesData);
return ResponseHelper.buildResponse(resultMap); return ResponseHelper.buildResponse(resultMap);
...@@ -173,7 +173,7 @@ public class BigScreenAnalyseController extends BaseController { ...@@ -173,7 +173,7 @@ public class BigScreenAnalyseController extends BaseController {
@RequestParam(value = "current", required = false) Integer current, @RequestParam(value = "current", required = false) Integer current,
@RequestParam(value = "size", required = false) Integer size, @RequestParam(value = "size", required = false) Integer size,
@RequestParam(value = "warningName", required = false) String warningName) { @RequestParam(value = "warningName", required = false) String warningName) {
Integer count = idxBizFanWarningRecordMapper.getEquipWarningInfoByPageCount(arae, station, stationType); Integer count = idxBizFanWarningRecordMapper.getEquipWarningInfoByPageCount(arae, station, stationType, warningName);
List<IdxBizFanWarningRecord> idxBizFanWarningRecordIPage = idxBizFanWarningRecordMapper.getEquipWarningInfoByPage(arae, station, stationType, (current - 1) * size, size, warningName); List<IdxBizFanWarningRecord> idxBizFanWarningRecordIPage = idxBizFanWarningRecordMapper.getEquipWarningInfoByPage(arae, station, stationType, (current - 1) * size, size, warningName);
Page<IdxBizFanWarningRecord> idxBizFanWarningRecordPage = new Page<>(current, size); Page<IdxBizFanWarningRecord> idxBizFanWarningRecordPage = new Page<>(current, size);
idxBizFanWarningRecordPage.setRecords(idxBizFanWarningRecordIPage); idxBizFanWarningRecordPage.setRecords(idxBizFanWarningRecordIPage);
......
...@@ -22,6 +22,7 @@ public interface IdxBizFanWarningRecordMapper extends BaseMapper<IdxBizFanWarnin ...@@ -22,6 +22,7 @@ public interface IdxBizFanWarningRecordMapper extends BaseMapper<IdxBizFanWarnin
@Param("warningName") String warningName); @Param("warningName") String warningName);
Integer getEquipWarningInfoByPageCount(@Param("arae") String arae, Integer getEquipWarningInfoByPageCount(@Param("arae") String arae,
@Param("station") String station, @Param("station") String station,
@Param("stationType") String stationType); @Param("stationType") String stationType,
@Param("warningName") String warningName);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment