|
@@ -109,7 +109,7 @@ public class CustomDisplayServiceImpl implements CustomDisplayService {
|
|
|
|
|
|
List<StationInfoVo> stationList = null;
|
|
|
List<StationIndexVo> stationIndexList = new ArrayList<>();
|
|
|
- if ( wis.getStartEndTimes() != null && wis.getStartEndTimes().size() != 0) {
|
|
|
+ if (CollUtil.isNotEmpty(wis.getStartEndTimes())) {
|
|
|
List<StartEndTimeDto> startEndTimes = wis.getStartEndTimes();
|
|
|
List<StationIndexVo> stationIndexListFinal;
|
|
|
for (StartEndTimeDto startEndTime : startEndTimes) {
|
|
@@ -119,7 +119,11 @@ public class CustomDisplayServiceImpl implements CustomDisplayService {
|
|
|
}
|
|
|
wis.setStartDate(startEndTime.getStartTime());
|
|
|
wis.setEndDate(startEndTime.getEndTime());
|
|
|
- stationIndexListFinal = customDisplayMapper.viewStatisticsScada(wis);
|
|
|
+ if (wis.getIsHistory().equals("0")) {
|
|
|
+ stationIndexListFinal = customDisplayMapper.viewStationIndex(wis);
|
|
|
+ } else {
|
|
|
+ stationIndexListFinal = customDisplayMapper.viewStatisticsScada(wis);
|
|
|
+ }
|
|
|
if (CollUtil.isNotEmpty(stationIndexListFinal)) {
|
|
|
for (StationIndexVo stationIndexVo : stationIndexListFinal) {
|
|
|
stationIndexVo.setStartTime(startEndTime.getStartTime());
|
|
@@ -131,7 +135,11 @@ public class CustomDisplayServiceImpl implements CustomDisplayService {
|
|
|
wis.setStartDate(null);
|
|
|
wis.setEndDate(null);
|
|
|
}else {
|
|
|
- stationIndexList = customDisplayMapper.viewStatisticsScada(wis);
|
|
|
+ if (wis.getIsHistory().equals("0")) {
|
|
|
+ stationIndexList = customDisplayMapper.viewStationIndex(wis);
|
|
|
+ } else {
|
|
|
+ stationIndexList = customDisplayMapper.viewStatisticsScada(wis);
|
|
|
+ }
|
|
|
}
|
|
|
switch (queryStationType) {
|
|
|
case "1":
|
|
@@ -213,7 +221,6 @@ public class CustomDisplayServiceImpl implements CustomDisplayService {
|
|
|
wis.setIsHistory("0");
|
|
|
}
|
|
|
if (statisticsType == null) {
|
|
|
- statisticsType = 0;
|
|
|
wis.setStatisticsType(0);
|
|
|
}
|
|
|
if (StringUtils.isBlank(wis.getIsStatisticsReport())) {
|
|
@@ -252,7 +259,7 @@ public class CustomDisplayServiceImpl implements CustomDisplayService {
|
|
|
|
|
|
Page<StationInfoVo> stationPage = new Page<>();
|
|
|
List<StationIndexVo> stationIndexList = new ArrayList<>();
|
|
|
- if ( wis.getStartEndTimes() != null && wis.getStartEndTimes().size() != 0) {
|
|
|
+ if (CollUtil.isNotEmpty(wis.getStartEndTimes())) {
|
|
|
List<StartEndTimeDto> startEndTimes = wis.getStartEndTimes();
|
|
|
List<StationIndexVo> stationIndexListFinal;
|
|
|
for (StartEndTimeDto startEndTime : startEndTimes) {
|
|
@@ -262,7 +269,11 @@ public class CustomDisplayServiceImpl implements CustomDisplayService {
|
|
|
}
|
|
|
wis.setStartDate(startEndTime.getStartTime());
|
|
|
wis.setEndDate(startEndTime.getEndTime());
|
|
|
- stationIndexListFinal = customDisplayMapper.viewStatisticsScada(wis);
|
|
|
+ if (wis.getIsHistory().equals("0")) {
|
|
|
+ stationIndexListFinal = customDisplayMapper.viewStationIndex(wis);
|
|
|
+ } else {
|
|
|
+ stationIndexListFinal = customDisplayMapper.viewStatisticsScada(wis);
|
|
|
+ }
|
|
|
if (CollUtil.isNotEmpty(stationIndexListFinal)) {
|
|
|
for (StationIndexVo stationIndexVo : stationIndexListFinal) {
|
|
|
stationIndexVo.setStartTime(startEndTime.getStartTime());
|
|
@@ -274,7 +285,11 @@ public class CustomDisplayServiceImpl implements CustomDisplayService {
|
|
|
wis.setStartDate(null);
|
|
|
wis.setEndDate(null);
|
|
|
}else {
|
|
|
- stationIndexList = customDisplayMapper.viewStatisticsScada(wis);
|
|
|
+ if (wis.getIsHistory().equals("0")) {
|
|
|
+ stationIndexList = customDisplayMapper.viewStationIndex(wis);
|
|
|
+ } else {
|
|
|
+ stationIndexList = customDisplayMapper.viewStatisticsScada(wis);
|
|
|
+ }
|
|
|
}
|
|
|
switch (queryStationType) {
|
|
|
case "1":
|
|
@@ -294,7 +309,7 @@ public class CustomDisplayServiceImpl implements CustomDisplayService {
|
|
|
@Override
|
|
|
public Page<Device> viewDeviceIndexNewPage(Page page, WisdomDisplayDto wis) {
|
|
|
String queryStationType = wis.getQueryStationType();
|
|
|
- Long category = 50701L;
|
|
|
+ long category = 50701L;
|
|
|
if (StringUtils.isBlank(queryStationType)) {
|
|
|
queryStationType = "1";
|
|
|
wis.setQueryStationType("1");
|
|
@@ -332,7 +347,7 @@ public class CustomDisplayServiceImpl implements CustomDisplayService {
|
|
|
wis.setDeptStationIds(stationIds);
|
|
|
|
|
|
List<StationIndexVo> stationIndexList = new ArrayList<>();
|
|
|
- if ( wis.getStartEndTimes() != null && wis.getStartEndTimes().size() != 0) {
|
|
|
+ if (CollUtil.isNotEmpty(wis.getStartEndTimes())) {
|
|
|
List<StartEndTimeDto> startEndTimes = wis.getStartEndTimes();
|
|
|
List<StationIndexVo> stationIndexListFinal;
|
|
|
for (StartEndTimeDto startEndTime : startEndTimes) {
|