Commit 9244f6b2 authored by KeYong's avatar KeYong

更新

parent 7f3a5949
......@@ -811,7 +811,7 @@ private FanHealthIndexDayMapper fanHealthIndexDayMapper;
@GetMapping("/getFullViewRecall")
public ResponseModel<Map<String, Object>> getFullViewRecall() {
HashMap<String, Object> resultMapFinally = new HashMap<>();
List<String> gatewayIds = this.getGatewayIds();
List<Map<String, Object>> stationIndexInfo = idxBizFanHealthIndexMapper.getStationIndexInfo();
Map<String, Double> stationHealthIndexMap = stationIndexInfo.stream().collect(Collectors.toMap(t -> t.get("station").toString(), t -> Double.parseDouble(t.get("healthIndex").toString())));
......@@ -828,7 +828,7 @@ private FanHealthIndexDayMapper fanHealthIndexDayMapper;
Map<String, Double> pointNameIndexInfoMap = pointNameIndexInfo.stream().collect(Collectors.toMap(t -> t.get("gatewayIndexAddress").toString(), t -> Double.parseDouble(t.get("healthIndex").toString())));
List<IdxBizFanHealthLevel> healthLevelInfoList = idxBizFanHealthIndexMapper.getHealthLevelInfoList();
List<IdxBizFanHealthLevel> healthLevelInfoList = idxBizFanHealthIndexMapper.getHealthLevelInfoList(gatewayIds);
List<FullViewRecallDataDTO> list = idxBizFanHealthIndexMapper.getFullViewRecall();
Map<String, Map<String, Map<String, Map<String, Map<String, List<FullViewRecallDataDTO>>>>>> resultMap = list.stream()
......
......@@ -6,17 +6,10 @@ import java.sql.Timestamp;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import com.yeejoin.amos.boot.module.jxiop.biz.service.IPermissionService;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.*;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils;
......@@ -114,6 +107,8 @@ public class TDBigScreenAnalyseController extends BaseController {
PvWaringRecordMapper pvWaringRecordMapper;
@Autowired
FanHealthIndexDayMapper fanHealthIndexDayMapper;
@Autowired
IPermissionService permissionService;
@Autowired
private IdxBizFanWarningRuleSetServiceImpl idxBizFanWarningRuleSetService;
......@@ -921,7 +916,7 @@ public class TDBigScreenAnalyseController extends BaseController {
@GetMapping("/getFullViewRecall")
public ResponseModel<Map<String, Object>> getFullViewRecall() {
HashMap<String, Object> resultMapFinally = new HashMap<>();
List<String> gatewayIds = this.getGatewayIds();
List<Map<String, Object>> stationIndexInfo = idxBizFanHealthIndexMapper.getStationIndexInfo();
Map<String, Double> stationHealthIndexMap = stationIndexInfo.stream().collect(Collectors
.toMap(t -> t.get("station").toString(), t -> Double.parseDouble(t.get("healthIndex").toString())));
......@@ -939,7 +934,7 @@ public class TDBigScreenAnalyseController extends BaseController {
.collect(Collectors.toMap(t -> t.get("gatewayIndexAddress").toString(),
t -> Double.parseDouble(t.get("healthIndex").toString())));
List<IdxBizFanHealthLevel> healthLevelInfoList = idxBizFanHealthIndexMapper.getHealthLevelInfoList();
List<IdxBizFanHealthLevel> healthLevelInfoList = idxBizFanHealthIndexMapper.getHealthLevelInfoList(gatewayIds);
List<FullViewRecallDataDTO> list = idxBizFanHealthIndexMapper.getFullViewRecall();
Map<String, Map<String, Map<String, Map<String, Map<String, List<FullViewRecallDataDTO>>>>>> resultMap = list
......@@ -1588,4 +1583,12 @@ public class TDBigScreenAnalyseController extends BaseController {
return ResponseHelper.buildResponse(null);
}
private List<String> getGatewayIds() {
List<String> permissions = permissionService.getCurrentUserPermissions();
if (Objects.isNull(permissions)) {
permissions = Collections.emptyList();
}
return permissions;
}
}
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