Commit a44039e0 authored by lilongyang's avatar lilongyang

Merge branch 'developer' of http://36.40.66.175:5000/moa/jxdj_zx/amos-boot-zx-biz into developer

parents 66a8a6fb aae0a6f0
...@@ -20,7 +20,7 @@ public class DateUtils { ...@@ -20,7 +20,7 @@ public class DateUtils {
public static final String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss"; public static final String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";
public static final String MINUTE_PATTERN = "yyyy-MM-dd HH:mm"; public static final String MINUTE_PATTERN = "yyyy-MM-dd HH:mm";
public static final String HOUR_PATTERN = "yyyy-MM-dd HH:mm:ss"; public static final String HOUR_PATTERN = "yyyy-MM-dd HH";
public static final String DATE_PATTERN = "yyyy-MM-dd"; public static final String DATE_PATTERN = "yyyy-MM-dd";
public static final String MONTH_PATTERN = "yyyy-MM"; public static final String MONTH_PATTERN = "yyyy-MM";
public static final String YEAR_PATTERN = "yyyy"; public static final String YEAR_PATTERN = "yyyy";
......
...@@ -50,7 +50,7 @@ public class EquipmentSpecificIndex { ...@@ -50,7 +50,7 @@ public class EquipmentSpecificIndex {
private String emergencyLevelColor; private String emergencyLevelColor;
@TableField("is_alarm") @TableField("is_alarm")
private boolean isAlarm; private Double isAlarm;
@TableField("emergency_level") @TableField("emergency_level")
private String emergencyLevel; private String emergencyLevel;
......
...@@ -798,7 +798,7 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -798,7 +798,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
Date startDate = DateUtils.dateParse(startTimeTop); Date startDate = DateUtils.dateParse(startTimeTop);
startTimeTop = formatter.format(startDate); startTimeTop = formatter.format(startDate);
List<FanHealthIndexDay> fanHealthIndexDays = fanHealthIndexDayMapper.selectTrendData(healthLevel, area, equipmentName, subSystem, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop,null,null, orgCode); List<FanHealthIndexDay> fanHealthIndexDays = fanHealthIndexDayMapper.selectTrendData(healthLevel, area, equipmentName, subSystem, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop,null,null, orgCode);
fanHealthIndexDays= fanHealthIndexDays.stream().sorted(Comparator.comparing(FanHealthIndexDay::getAnalysisTime)).collect(Collectors.toList()); fanHealthIndexDays= fanHealthIndexDays.stream().sorted(Comparator.comparing(FanHealthIndexDay::getRecDate)).collect(Collectors.toList());
for (FanHealthIndexDay obj : fanHealthIndexDays) { for (FanHealthIndexDay obj : fanHealthIndexDays) {
if (type.equals("0")){ if (type.equals("0")){
...@@ -814,13 +814,13 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -814,13 +814,13 @@ public class IdxBizFanHealthIndexController extends BaseController {
}else if (WarningPeriodEnum.HOUR.getName().equals(requiredType)){ }else if (WarningPeriodEnum.HOUR.getName().equals(requiredType)){
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if ( null != endTimeTop){ if ( null != endTimeTop){
Date endDate = DateUtils.dateAddHours(DateUtils.dateParse(endTimeTop), -8); Date endDate = DateUtils.dateParse(endTimeTop);
endTimeTop = formatter.format(endDate); endTimeTop = formatter.format(endDate);
} }
Date startDate = DateUtils.dateAddHours(DateUtils.dateParse(startTimeTop), -8); Date startDate = DateUtils.dateParse(startTimeTop);
startTimeTop = formatter.format(startDate); startTimeTop = formatter.format(startDate);
List<FanHealthIndexHour> fanHealthIndexHours = fanHealthIndexHourMapper.selectTrendData(healthLevel, area, equipmentName, subSystem, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop,null,null, orgCode); List<FanHealthIndexHour> fanHealthIndexHours = fanHealthIndexHourMapper.selectTrendData(healthLevel, area, equipmentName, subSystem, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop,null,null, orgCode);
fanHealthIndexHours= fanHealthIndexHours.stream().sorted(Comparator.comparing(FanHealthIndexHour::getAnalysisTime)).collect(Collectors.toList()); fanHealthIndexHours= fanHealthIndexHours.stream().sorted(Comparator.comparing(FanHealthIndexHour::getRecDate)).collect(Collectors.toList());
for (FanHealthIndexHour obj : fanHealthIndexHours) { for (FanHealthIndexHour obj : fanHealthIndexHours) {
if (type.equals("0")){ if (type.equals("0")){
seriesData.add(Double.parseDouble(df.format(obj.getHealthIndex()))); seriesData.add(Double.parseDouble(df.format(obj.getHealthIndex())));
...@@ -837,14 +837,14 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -837,14 +837,14 @@ public class IdxBizFanHealthIndexController extends BaseController {
}else { }else {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if ( null != endTimeTop){ if ( null != endTimeTop){
Date endDate = DateUtils.dateAddHours(DateUtils.dateParse(endTimeTop), -8); Date endDate = DateUtils.dateParse(endTimeTop);
endTimeTop = formatter.format(endDate); endTimeTop = formatter.format(endDate);
} }
Date startDate = DateUtils.dateAddHours(DateUtils.dateParse(startTimeTop), -8); Date startDate = DateUtils.dateParse(startTimeTop);
startTimeTop = formatter.format(startDate); startTimeTop = formatter.format(startDate);
List<FanHealthIndexMoment> fanHealthIndexMoments = fanHealthIndexMomentMapper.selectTrendData(healthLevel, area, equipmentName, subSystem, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop,null,null, orgCode); List<FanHealthIndexMoment> fanHealthIndexMoments = fanHealthIndexMomentMapper.selectTrendData(healthLevel, area, equipmentName, subSystem, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop,null,null, orgCode);
fanHealthIndexMoments= fanHealthIndexMoments.stream().sorted(Comparator.comparing(FanHealthIndexMoment::getAnalysisTime)).collect(Collectors.toList()); fanHealthIndexMoments= fanHealthIndexMoments.stream().sorted(Comparator.comparing(FanHealthIndexMoment::getRecDate)).collect(Collectors.toList());
for (FanHealthIndexMoment obj : fanHealthIndexMoments) { for (FanHealthIndexMoment obj : fanHealthIndexMoments) {
if (type.equals("0")){ if (type.equals("0")){
seriesData.add(Double.parseDouble(df.format(obj.getHealthIndex()))); seriesData.add(Double.parseDouble(df.format(obj.getHealthIndex())));
......
...@@ -475,7 +475,7 @@ public class IdxBizPvHealthIndexController extends BaseController { ...@@ -475,7 +475,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
startTimeTop = formatter.format(startDate); startTimeTop = formatter.format(startDate);
List<PvHealthIndexDay> fanHealthIndexDays = pvHealthIndexDayMapper.selectTrendData(station, analysisType, indexAddress, healthLevel, area, analysisObjType, subarray, pointName, startTimeTop, endTimeTop, equipmentName, null, null, orgCode); List<PvHealthIndexDay> fanHealthIndexDays = pvHealthIndexDayMapper.selectTrendData(station, analysisType, indexAddress, healthLevel, area, analysisObjType, subarray, pointName, startTimeTop, endTimeTop, equipmentName, null, null, orgCode);
fanHealthIndexDays= fanHealthIndexDays.stream().sorted(Comparator.comparing(PvHealthIndexDay::getAnalysisTime)).collect(Collectors.toList()); fanHealthIndexDays= fanHealthIndexDays.stream().sorted(Comparator.comparing(PvHealthIndexDay::getRecDate)).collect(Collectors.toList());
for (PvHealthIndexDay obj : fanHealthIndexDays) { for (PvHealthIndexDay obj : fanHealthIndexDays) {
if (type.equals("0")){ if (type.equals("0")){
...@@ -491,13 +491,13 @@ public class IdxBizPvHealthIndexController extends BaseController { ...@@ -491,13 +491,13 @@ public class IdxBizPvHealthIndexController extends BaseController {
}else if (WarningPeriodEnum.HOUR.getName().equals(requiredType)){ }else if (WarningPeriodEnum.HOUR.getName().equals(requiredType)){
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if ( null != endTimeTop){ if ( null != endTimeTop){
Date endDate = DateUtils.dateAddHours(DateUtils.dateParse(endTimeTop), -8); Date endDate = DateUtils.dateParse(endTimeTop);
endTimeTop = formatter.format(endDate); endTimeTop = formatter.format(endDate);
} }
Date startDate = DateUtils.dateAddHours(DateUtils.dateParse(startTimeTop), -8); Date startDate = DateUtils.dateParse(startTimeTop);
startTimeTop = formatter.format(startDate); startTimeTop = formatter.format(startDate);
List<PvHealthIndexHour> fanHealthIndexHours = pvHealthIndexHourMapper.selectTrendData(healthLevel, area, equipmentName, subarray, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop,null,null, orgCode); List<PvHealthIndexHour> fanHealthIndexHours = pvHealthIndexHourMapper.selectTrendData(healthLevel, area, equipmentName, subarray, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop,null,null, orgCode);
fanHealthIndexHours= fanHealthIndexHours.stream().sorted(Comparator.comparing(PvHealthIndexHour::getAnalysisTime)).collect(Collectors.toList()); fanHealthIndexHours= fanHealthIndexHours.stream().sorted(Comparator.comparing(PvHealthIndexHour::getRecDate)).collect(Collectors.toList());
for (PvHealthIndexHour obj : fanHealthIndexHours) { for (PvHealthIndexHour obj : fanHealthIndexHours) {
if (type.equals("0")){ if (type.equals("0")){
seriesData.add(Double.parseDouble(df.format(obj.getHealthIndex()))); seriesData.add(Double.parseDouble(df.format(obj.getHealthIndex())));
...@@ -517,10 +517,10 @@ public class IdxBizPvHealthIndexController extends BaseController { ...@@ -517,10 +517,10 @@ public class IdxBizPvHealthIndexController extends BaseController {
SimpleDateFormat formatterNYRSF = new SimpleDateFormat("yyyy-MM-dd HH:mm"); SimpleDateFormat formatterNYRSF = new SimpleDateFormat("yyyy-MM-dd HH:mm");
if ( null != endTimeTop){ if ( null != endTimeTop){
Date endDate = DateUtils.dateAddHours(DateUtils.dateParse(endTimeTop), -8); Date endDate = DateUtils.dateParse(endTimeTop);
endTimeTop = formatter.format(endDate); endTimeTop = formatter.format(endDate);
} }
Date startDate = DateUtils.dateAddHours(DateUtils.dateParse(startTimeTop), -8); Date startDate = DateUtils.dateParse(startTimeTop);
startTimeTop = formatter.format(startDate); startTimeTop = formatter.format(startDate);
List<PvHealthIndexMoment> fanHealthIndexMoments = pvHealthIndexMomentMapper.selectTrendData(healthLevel, area, equipmentName, subarray, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop,null,null, orgCode); List<PvHealthIndexMoment> fanHealthIndexMoments = pvHealthIndexMomentMapper.selectTrendData(healthLevel, area, equipmentName, subarray, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop,null,null, orgCode);
......
...@@ -1016,7 +1016,7 @@ public class TDBigScreenAnalyseController extends BaseController { ...@@ -1016,7 +1016,7 @@ public class TDBigScreenAnalyseController extends BaseController {
LambdaQueryWrapper<IdxBizPvHealthLevel> query = new LambdaQueryWrapper<>(); LambdaQueryWrapper<IdxBizPvHealthLevel> query = new LambdaQueryWrapper<>();
query.eq(IdxBizPvHealthLevel::getAnalysisObjType, "设备"); query.eq(IdxBizPvHealthLevel::getAnalysisObjType, "设备");
query.eq(IdxBizPvHealthLevel::getStatus, item.get("station")); query.eq(IdxBizPvHealthLevel::getStatus, item.get("station"));
query.le(IdxBizPvHealthLevel::getGroupLowerLimit, equipmentHealthScore); query.lt(IdxBizPvHealthLevel::getGroupLowerLimit, equipmentHealthScore);
query.ge(IdxBizPvHealthLevel::getGroupUpperLimit, equipmentHealthScore); query.ge(IdxBizPvHealthLevel::getGroupUpperLimit, equipmentHealthScore);
IdxBizPvHealthLevel idxBizFanHealthLevel = idxBizPvHealthLevelMapper.selectOne(query); IdxBizPvHealthLevel idxBizFanHealthLevel = idxBizPvHealthLevelMapper.selectOne(query);
if (ObjectUtils.isEmpty(idxBizFanHealthLevel)) { if (ObjectUtils.isEmpty(idxBizFanHealthLevel)) {
......
...@@ -104,13 +104,13 @@ public class TdInfoQueryController extends BaseController { ...@@ -104,13 +104,13 @@ public class TdInfoQueryController extends BaseController {
if (CharSequenceUtil.isNotEmpty(dto.getStartDate())) { if (CharSequenceUtil.isNotEmpty(dto.getStartDate())) {
String startDate = dto.getStartDate(); String startDate = dto.getStartDate();
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按天") && startDate.length() == 10) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按天") && startDate.length() == 10) {
startDate = startDate + " " + hhmmss.format(currentDate); startDate = startDate + " 00:00:00";
} }
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按小时") && startDate.length() == 13) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按小时") && startDate.length() == 13) {
startDate = startDate + ":" + mmss.format(currentDate); startDate = startDate + ":00:00";
} }
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按10分钟") && startDate.length() == 16) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按10分钟") && startDate.length() == 16) {
startDate = startDate + ":" + ss.format(currentDate); startDate = startDate + ":00";
} }
Date date = DateUtils.dateParse(startDate, DATE_TIME_PATTERN); Date date = DateUtils.dateParse(startDate, DATE_TIME_PATTERN);
...@@ -121,13 +121,13 @@ public class TdInfoQueryController extends BaseController { ...@@ -121,13 +121,13 @@ public class TdInfoQueryController extends BaseController {
String endDate = dto.getEndDate(); String endDate = dto.getEndDate();
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按天") && endDate.length() == 10) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按天") && endDate.length() == 10) {
endDate = endDate + " " + hhmmss.format(currentDate); endDate = endDate + " 00:00:00";
} }
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按小时") && endDate.length() == 13) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按小时") && endDate.length() == 13) {
endDate = endDate + ":" + mmss.format(currentDate); endDate = endDate + ":00:00";
} }
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按10分钟") && endDate.length() == 16) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按10分钟") && endDate.length() == 16) {
endDate = endDate + ":" + ss.format(currentDate); endDate = endDate + ":00";
} }
Date endDateDate = DateUtils.dateParse(endDate, DATE_TIME_PATTERN); Date endDateDate = DateUtils.dateParse(endDate, DATE_TIME_PATTERN);
...@@ -204,13 +204,13 @@ public class TdInfoQueryController extends BaseController { ...@@ -204,13 +204,13 @@ public class TdInfoQueryController extends BaseController {
String startDate = dto.getStartDate(); String startDate = dto.getStartDate();
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按天") && startDate.length() == 10) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按天") && startDate.length() == 10) {
startDate = startDate + " " + hhmmss.format(currentDate); startDate = startDate + " 00:00:00";
} }
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按小时") && startDate.length() == 13) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按小时") && startDate.length() == 13) {
startDate = startDate + ":" + mmss.format(currentDate); startDate = startDate + ":00:00";
} }
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按10分钟") && startDate.length() == 16) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按10分钟") && startDate.length() == 16) {
startDate = startDate + ":" + ss.format(currentDate); startDate = startDate + ":00";
} }
...@@ -222,13 +222,13 @@ public class TdInfoQueryController extends BaseController { ...@@ -222,13 +222,13 @@ public class TdInfoQueryController extends BaseController {
String endDate = dto.getEndDate(); String endDate = dto.getEndDate();
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按天") && endDate.length() == 10) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按天") && endDate.length() == 10) {
endDate = endDate + " " + hhmmss.format(currentDate); endDate = endDate + " 00:00:00";
} }
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按小时") && endDate.length() == 13) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按小时") && endDate.length() == 13) {
endDate = endDate + ":" + mmss.format(currentDate); endDate = endDate + ":00:00";
} }
if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按10分钟") && endDate.length() == 16) { if(dto.getAnalysisType() != null && dto.getAnalysisType().equals("按10分钟") && endDate.length() == 16) {
endDate = endDate + ":" + ss.format(currentDate); endDate = endDate + ":00";
} }
Date endDateDate = DateUtils.dateParse(endDate, DATE_TIME_PATTERN); Date endDateDate = DateUtils.dateParse(endDate, DATE_TIME_PATTERN);
...@@ -282,14 +282,40 @@ public class TdInfoQueryController extends BaseController { ...@@ -282,14 +282,40 @@ public class TdInfoQueryController extends BaseController {
orgCode = stdUserEmpower.getAmosOrgCode().get(0)+"%"; orgCode = stdUserEmpower.getAmosOrgCode().get(0)+"%";
} }
dto.setOrgCode(orgCode); dto.setOrgCode(orgCode);
Date currentDate = new Date();
if (CharSequenceUtil.isNotEmpty(dto.getStartDate())) { if (CharSequenceUtil.isNotEmpty(dto.getStartDate())) {
String startDate = dto.getStartDate(); String startDate = dto.getStartDate();
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按天") && startDate.length() == 10) {
startDate = startDate + " 00:00:00";
}
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按小时") && startDate.length() == 13) {
startDate = startDate + ":00:00";
}
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按10分钟") && startDate.length() == 16) {
startDate = startDate + ":00";
}
Date date = DateUtils.dateParse(startDate, DATE_TIME_PATTERN); Date date = DateUtils.dateParse(startDate, DATE_TIME_PATTERN);
String startDateString = DateUtils.dateFormat(DateUtils.dateAddHours(date, -8), DATE_TIME_PATTERN); String startDateString = DateUtils.dateFormat(DateUtils.dateAddHours(date, -8), DATE_TIME_PATTERN);
dto.setStartDate(startDateString); dto.setStartDate(startDateString);
} }
if (CharSequenceUtil.isNotEmpty(dto.getEndDate())) { if (CharSequenceUtil.isNotEmpty(dto.getEndDate())) {
String endDate = dto.getEndDate(); String endDate = dto.getEndDate();
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按天") && endDate.length() == 10) {
endDate = endDate + " 00:00:00";
}
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按小时") && endDate.length() == 13) {
endDate = endDate + ":00:00";
}
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按10分钟") && endDate.length() == 16) {
endDate = endDate + ":00";
}
Date endDateDate = DateUtils.dateParse(endDate, DATE_TIME_PATTERN); Date endDateDate = DateUtils.dateParse(endDate, DATE_TIME_PATTERN);
String endDateString = DateUtils.dateFormat(DateUtils.dateAddHours(endDateDate, -8), DATE_TIME_PATTERN); String endDateString = DateUtils.dateFormat(DateUtils.dateAddHours(endDateDate, -8), DATE_TIME_PATTERN);
dto.setEndDate(endDateString); dto.setEndDate(endDateString);
...@@ -340,14 +366,38 @@ public class TdInfoQueryController extends BaseController { ...@@ -340,14 +366,38 @@ public class TdInfoQueryController extends BaseController {
orgCode = stdUserEmpower.getAmosOrgCode().get(0)+"%"; orgCode = stdUserEmpower.getAmosOrgCode().get(0)+"%";
} }
dto.setOrgCode(orgCode); dto.setOrgCode(orgCode);
Date currentDate = new Date();
if (CharSequenceUtil.isNotEmpty(dto.getStartDate())) { if (CharSequenceUtil.isNotEmpty(dto.getStartDate())) {
String startDate = dto.getStartDate(); String startDate = dto.getStartDate();
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按天") && startDate.length() == 10) {
startDate = startDate + " 00:00:00";
}
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按小时") && startDate.length() == 13) {
startDate = startDate + ":00:00";
}
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按10分钟") && startDate.length() == 16) {
startDate = startDate + ":00";
}
Date date = DateUtils.dateParse(startDate, DATE_TIME_PATTERN); Date date = DateUtils.dateParse(startDate, DATE_TIME_PATTERN);
String startDateString = DateUtils.dateFormat(DateUtils.dateAddHours(date, -8), DATE_TIME_PATTERN); String startDateString = DateUtils.dateFormat(DateUtils.dateAddHours(date, -8), DATE_TIME_PATTERN);
dto.setStartDate(startDateString); dto.setStartDate(startDateString);
} }
if (CharSequenceUtil.isNotEmpty(dto.getEndDate())) { if (CharSequenceUtil.isNotEmpty(dto.getEndDate())) {
String endDate = dto.getEndDate(); String endDate = dto.getEndDate();
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按天") && endDate.length() == 10) {
endDate = endDate + " 00:00:00";
}
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按小时") && endDate.length() == 13) {
endDate = endDate + ":00:00";
}
if(dto.getWarningPeriod() != null && dto.getWarningPeriod().equals("按10分钟") && endDate.length() == 16) {
endDate = endDate + ":00";
}
Date endDateDate = DateUtils.dateParse(endDate, DATE_TIME_PATTERN); Date endDateDate = DateUtils.dateParse(endDate, DATE_TIME_PATTERN);
String endDateString = DateUtils.dateFormat(DateUtils.dateAddHours(endDateDate, -8), DATE_TIME_PATTERN); String endDateString = DateUtils.dateFormat(DateUtils.dateAddHours(endDateDate, -8), DATE_TIME_PATTERN);
dto.setEndDate(endDateString); dto.setEndDate(endDateString);
......
...@@ -9,6 +9,7 @@ import java.util.Map; ...@@ -9,6 +9,7 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.HealthStatusIndicatorServiceImpl;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -47,6 +48,8 @@ public class TestController extends BaseController { ...@@ -47,6 +48,8 @@ public class TestController extends BaseController {
IndicatorDataMapper indicatorDataMapper; IndicatorDataMapper indicatorDataMapper;
@Autowired @Autowired
CommonServiceImpl commonService; CommonServiceImpl commonService;
@Autowired
HealthStatusIndicatorServiceImpl healthStatusIndicatorService;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "test1", notes = "test1") @ApiOperation(httpMethod = "GET", value = "test1", notes = "test1")
...@@ -162,29 +165,13 @@ public class TestController extends BaseController { ...@@ -162,29 +165,13 @@ public class TestController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "test2", notes = "test1") @ApiOperation(httpMethod = "GET", value = "test2", notes = "test1")
@GetMapping("/set-date") @GetMapping("/test123")
public void clearRecord() { public void clearRecord() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date time = new Date();
String d = sdf.format(new Date()); time = DateUtil.offsetMinute(time, -DateUtil.minute(time) % 10);
LambdaQueryWrapper<FanWarningRecord> wf = new LambdaQueryWrapper<>(); String format = DateUtil.format(time, "yyyy-MM-dd HH:mm:00");
wf.isNull(FanWarningRecord::getDisposotionDate); time = DateUtil.parse(format, "yyyy-MM-dd HH:mm:00");
List<FanWarningRecord> list = fanWaringRecordMapper.selectList(wf); healthStatusIndicatorService.healthWarningMinuteGF(time);
if (!list.isEmpty()) {
list.forEach(i -> {
i.setDisposotionDate(d);
});
fanWaringRecordMapper.saveBatchWarningRecords(list);
}
LambdaQueryWrapper<PvWarningRecord> pf = new LambdaQueryWrapper<>();
pf.isNull(PvWarningRecord::getDisposotionDate);
List<PvWarningRecord> list1 = pvWaringRecordMapper.selectList(pf);
if (!list1.isEmpty()) {
list1.forEach(i -> {
i.setDisposotionDate(d);
});
pvWaringRecordMapper.saveBatchWarningRecords(list1);
}
} }
@TycloudOperation(ApiLevel = UserType.PUBLIC, needAuth = false) @TycloudOperation(ApiLevel = UserType.PUBLIC, needAuth = false)
......
...@@ -2073,7 +2073,7 @@ public class CommonServiceImpl { ...@@ -2073,7 +2073,7 @@ public class CommonServiceImpl {
// 获取健康指数对应等级 // 获取健康指数对应等级
for (IdxBizFanHealthLevel idxBizFanHealthLevel : idxBizFanHealthLevels) { for (IdxBizFanHealthLevel idxBizFanHealthLevel : idxBizFanHealthLevels) {
if (indexValueArray.getDoubleValue(i) <= idxBizFanHealthLevel.getGroupUpperLimit() if (indexValueArray.getDoubleValue(i) <= idxBizFanHealthLevel.getGroupUpperLimit()
&& indexValueArray.getDoubleValue(i) >= idxBizFanHealthLevel.getGroupLowerLimit()) { && indexValueArray.getDoubleValue(i) > idxBizFanHealthLevel.getGroupLowerLimit()) {
idxBizFanHealthIndex.setHealthLevel(idxBizFanHealthLevel.getHealthLevel()); idxBizFanHealthIndex.setHealthLevel(idxBizFanHealthLevel.getHealthLevel());
} }
...@@ -2430,7 +2430,6 @@ public class CommonServiceImpl { ...@@ -2430,7 +2430,6 @@ public class CommonServiceImpl {
* *
* @param fanHealthIndices * @param fanHealthIndices
*/ */
@Async
public void insertFanDataTDEngine(ArrayList<FanHealthIndex> fanHealthIndices, String recDate, String analysisType) { public void insertFanDataTDEngine(ArrayList<FanHealthIndex> fanHealthIndices, String recDate, String analysisType) {
idxFanHealthIndexMapper.deleteAllDataByTableName("fan_health_index_latest_data", analysisType); idxFanHealthIndexMapper.deleteAllDataByTableName("fan_health_index_latest_data", analysisType);
// 按时刻 - 测点插入 // 按时刻 - 测点插入
...@@ -2680,7 +2679,7 @@ public class CommonServiceImpl { ...@@ -2680,7 +2679,7 @@ public class CommonServiceImpl {
for (IdxBizPvHealthLevel idxBizFanHealthLevel : idxBizFanHealthLevels) { for (IdxBizPvHealthLevel idxBizFanHealthLevel : idxBizFanHealthLevels) {
if (indexValueArray.getDoubleValue(i) <= idxBizFanHealthLevel.getGroupUpperLimit() if (indexValueArray.getDoubleValue(i) <= idxBizFanHealthLevel.getGroupUpperLimit()
&& indexValueArray.getDoubleValue(i) >= idxBizFanHealthLevel.getGroupLowerLimit()) { && indexValueArray.getDoubleValue(i) > idxBizFanHealthLevel.getGroupLowerLimit()) {
idxBizPvHealthIndex.setHealthLevel(idxBizFanHealthLevel.getHealthLevel()); idxBizPvHealthIndex.setHealthLevel(idxBizFanHealthLevel.getHealthLevel());
} }
...@@ -2694,7 +2693,7 @@ public class CommonServiceImpl { ...@@ -2694,7 +2693,7 @@ public class CommonServiceImpl {
BeanUtil.copyProperties(idxBizPvHealthIndex, pvHealthIndex); BeanUtil.copyProperties(idxBizPvHealthIndex, pvHealthIndex);
pvHealthIndex.setWeight(idxBizPvHealthIndex.getWeigth()); pvHealthIndex.setWeight(idxBizPvHealthIndex.getWeigth());
pvHealthIndex.setAnomaly(idxBizPvHealthIndex.getANOMALY()); pvHealthIndex.setAnomaly(idxBizPvHealthIndex.getANOMALY());
pvHealthIndex.setRecDate(DateUtil.now()); pvHealthIndex.setRecDate(format);
pvHealthIndex.setArea(idxBizPvHealthIndex.getArae()); pvHealthIndex.setArea(idxBizPvHealthIndex.getArae());
pvHealthIndex.setAnalysisTime(format); pvHealthIndex.setAnalysisTime(format);
pvHealthIndex.setHealthLevel(idxBizPvHealthIndex.getHealthLevel()); pvHealthIndex.setHealthLevel(idxBizPvHealthIndex.getHealthLevel());
...@@ -2988,7 +2987,6 @@ public class CommonServiceImpl { ...@@ -2988,7 +2987,6 @@ public class CommonServiceImpl {
* *
* @param pvHealthIndices * @param pvHealthIndices
*/ */
@Async
public void insertPvDataTDEngine(ArrayList<PvHealthIndex> pvHealthIndices, String recDate, String analysisType) { public void insertPvDataTDEngine(ArrayList<PvHealthIndex> pvHealthIndices, String recDate, String analysisType) {
idxFanHealthIndexMapper.deleteAllDataByTableName("pv_health_index_latest_data", analysisType); idxFanHealthIndexMapper.deleteAllDataByTableName("pv_health_index_latest_data", analysisType);
......
...@@ -167,11 +167,7 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -167,11 +167,7 @@ public class HealthStatusIndicatorServiceImpl {
*/ */
// @Scheduled(cron = "0 0 */1 * * ?") // @Scheduled(cron = "0 0 */1 * * ?")
@Async("async")
public void healthWarningMinuteGF(Date time) { public void healthWarningMinuteGF(Date time) {
if (!openHealth) {
return;
}
String format = DateUtil.format(time, "yyyy-MM-dd HH:mm:00"); String format = DateUtil.format(time, "yyyy-MM-dd HH:mm:00");
// Date date = DateUtils.dateAddHours(time, -8); // Date date = DateUtils.dateAddHours(time, -8);
log.info("光伏---------------------预警时间----" + time); log.info("光伏---------------------预警时间----" + time);
...@@ -548,7 +544,6 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -548,7 +544,6 @@ public class HealthStatusIndicatorServiceImpl {
// //
// } // }
@Async("async")
public void healthWarningMinuteGF(Date time, String gatewayId) { public void healthWarningMinuteGF(Date time, String gatewayId) {
if (!openHealth) { if (!openHealth) {
return; return;
...@@ -756,7 +751,6 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -756,7 +751,6 @@ public class HealthStatusIndicatorServiceImpl {
*/ */
// @Scheduled(cron = "0 0 0/1 * * ?") // @Scheduled(cron = "0 0 0/1 * * ?")
@Async("async")
public void healthWarningHourGF() { public void healthWarningHourGF() {
if (!openHealth) { if (!openHealth) {
return; return;
...@@ -962,7 +956,6 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -962,7 +956,6 @@ public class HealthStatusIndicatorServiceImpl {
// @Scheduled(cron = "0 0 0/1 * * ?") // @Scheduled(cron = "0 0 0/1 * * ?")
// @Scheduled(cron = "0 0/5 * * * ?") // @Scheduled(cron = "0 0/5 * * * ?")
@Async("async")
public void healthWarningHourGFNew() { public void healthWarningHourGFNew() {
if (!openHealth) { if (!openHealth) {
...@@ -1184,7 +1177,6 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -1184,7 +1177,6 @@ public class HealthStatusIndicatorServiceImpl {
*/ */
// @Scheduled(cron = "0 0 0 0/1 * ? ") // @Scheduled(cron = "0 0 0 0/1 * ? ")
@Async("async")
public void healthWarningDayGF() { public void healthWarningDayGF() {
if (!openHealth) { if (!openHealth) {
return; return;
...@@ -1393,7 +1385,6 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -1393,7 +1385,6 @@ public class HealthStatusIndicatorServiceImpl {
} }
// @Scheduled(cron = "0 0 0 0/1 * ? ") // @Scheduled(cron = "0 0 0 0/1 * ? ")
@Async("async")
public void healthWarningDayGFNew() { public void healthWarningDayGFNew() {
if (!openHealth) { if (!openHealth) {
return; return;
...@@ -1614,7 +1605,6 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -1614,7 +1605,6 @@ public class HealthStatusIndicatorServiceImpl {
} }
// @Scheduled(cron = "0 0 */1 * * ?") // @Scheduled(cron = "0 0 */1 * * ?")
@Async("async")
public void healthWarningMinute(Date time) { public void healthWarningMinute(Date time) {
if (!openHealth) { if (!openHealth) {
return; return;
...@@ -1839,7 +1829,6 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -1839,7 +1829,6 @@ public class HealthStatusIndicatorServiceImpl {
fetchDataFan(tdFanWarningRecordList, stationMap); fetchDataFan(tdFanWarningRecordList, stationMap);
} }
@Async("async")
// @PostConstruct // @PostConstruct
public void healthWarningMinute(Date time, String gatewayId) { public void healthWarningMinute(Date time, String gatewayId) {
if (!openHealth) { if (!openHealth) {
...@@ -2072,7 +2061,6 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -2072,7 +2061,6 @@ public class HealthStatusIndicatorServiceImpl {
*/ */
// @Scheduled(cron = "0 0 0/1 * * ?") // @Scheduled(cron = "0 0 0/1 * * ?")
@Async("async")
// @PostConstruct // @PostConstruct
public void healthWarningHour() { public void healthWarningHour() {
// if (!openHealth) { // if (!openHealth) {
...@@ -2297,7 +2285,6 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -2297,7 +2285,6 @@ public class HealthStatusIndicatorServiceImpl {
} }
// @Scheduled(cron = "0 0 0/1 * * ?") // @Scheduled(cron = "0 0 0/1 * * ?")
@Async("async")
public void healthWarningHourNew() { public void healthWarningHourNew() {
if (!openHealth) { if (!openHealth) {
return; return;
...@@ -2520,7 +2507,6 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -2520,7 +2507,6 @@ public class HealthStatusIndicatorServiceImpl {
*/ */
// @Scheduled(cron = "0 0 0 0/1 * ? ") // @Scheduled(cron = "0 0 0 0/1 * ? ")
@Async("async")
public void healthWarningDay() { public void healthWarningDay() {
if (!openHealth) { if (!openHealth) {
return; return;
...@@ -2737,7 +2723,6 @@ public class HealthStatusIndicatorServiceImpl { ...@@ -2737,7 +2723,6 @@ public class HealthStatusIndicatorServiceImpl {
} }
// @Scheduled(cron = "0 0 0 0/1 * ? ") // @Scheduled(cron = "0 0 0 0/1 * ? ")
@Async("async")
public void healthWarningDayNew() { public void healthWarningDayNew() {
if (!openHealth) { if (!openHealth) {
return; return;
......
...@@ -162,7 +162,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService { ...@@ -162,7 +162,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService {
String analysisObjectType) { String analysisObjectType) {
List<PvHealthIndex> pvHealthIndices = pvHealthIndexMapper.getInfoList(startTime, tableName, analysisObjectType); List<PvHealthIndex> pvHealthIndices = pvHealthIndexMapper.getInfoList(startTime, tableName, analysisObjectType);
QueryWrapper<IdxBizPvWeight> queryWrapper = new QueryWrapper<>(); QueryWrapper<IdxBizPvWeight> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", "3"); queryWrapper.eq("type", "4");
queryWrapper.isNotNull("value"); queryWrapper.isNotNull("value");
List<IdxBizPvWeight> idxBizFanWeights = idxBizPvWeightMapper.selectList(queryWrapper); List<IdxBizPvWeight> idxBizFanWeights = idxBizPvWeightMapper.selectList(queryWrapper);
Map<String, Float> weightMap = idxBizFanWeights.stream().collect(Collectors.toMap(o -> o.getArae() + o.getStation() + o.getEquipmentName() + o.getSubarray(), IdxBizPvWeight::getValue)); Map<String, Float> weightMap = idxBizFanWeights.stream().collect(Collectors.toMap(o -> o.getArae() + o.getStation() + o.getEquipmentName() + o.getSubarray(), IdxBizPvWeight::getValue));
...@@ -215,7 +215,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService { ...@@ -215,7 +215,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService {
String analysisObjectType) { String analysisObjectType) {
List<PvHealthIndex> pvHealthIndices = pvHealthIndexMapper.getInfoList(startTime, tableName, analysisObjectType); List<PvHealthIndex> pvHealthIndices = pvHealthIndexMapper.getInfoList(startTime, tableName, analysisObjectType);
QueryWrapper<IdxBizPvWeight> queryWrapper = new QueryWrapper<>(); QueryWrapper<IdxBizPvWeight> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", "4"); queryWrapper.eq("type", "3");
queryWrapper.isNotNull("value"); queryWrapper.isNotNull("value");
List<IdxBizPvWeight> idxBizFanWeights = idxBizPvWeightMapper.selectList(queryWrapper); List<IdxBizPvWeight> idxBizFanWeights = idxBizPvWeightMapper.selectList(queryWrapper);
Map<String, Float> weightMap = idxBizFanWeights.stream().collect(Collectors.toMap(o -> o.getArae() + o.getStation() + o.getEquipmentName(), IdxBizPvWeight::getValue)); Map<String, Float> weightMap = idxBizFanWeights.stream().collect(Collectors.toMap(o -> o.getArae() + o.getStation() + o.getEquipmentName(), IdxBizPvWeight::getValue));
......
...@@ -80,7 +80,7 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> { ...@@ -80,7 +80,7 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> " + "<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> " +
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" + "<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" + "<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" +
"order by health_index " + "order by rec_date " +
"<if test='current != null and size != null'>limit ${current},${size} </if>" + "<if test='current != null and size != null'>limit ${current},${size} </if>" +
"</script>") "</script>")
List<FanHealthIndexDay> selectTrendData(@Param("healthLevel") String healthLevel, @Param("area") String area, @Param("equipmentName") String equipmentName, @Param("subSystem") String subSystem, @Param("analysisType") String analysisType, @Param("analysisObjType") String analysisObjType, @Param("station") String station, @Param("pointName") String pointName, @Param("indexAddress") String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop") String endTimeTop, List<FanHealthIndexDay> selectTrendData(@Param("healthLevel") String healthLevel, @Param("area") String area, @Param("equipmentName") String equipmentName, @Param("subSystem") String subSystem, @Param("analysisType") String analysisType, @Param("analysisObjType") String analysisObjType, @Param("station") String station, @Param("pointName") String pointName, @Param("indexAddress") String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop") String endTimeTop,
......
...@@ -40,7 +40,7 @@ public interface FanHealthIndexHourMapper extends BaseMapper<FanHealthIndexHour> ...@@ -40,7 +40,7 @@ public interface FanHealthIndexHourMapper extends BaseMapper<FanHealthIndexHour>
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> " + "<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> " +
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" + "<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" + "<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" +
"order by health_index " + "order by rec_date" +
"<if test='current != null and size != null'>limit ${current},${size} </if>" + "<if test='current != null and size != null'>limit ${current},${size} </if>" +
"</script>") "</script>")
List<FanHealthIndexHour> selectTrendData(@Param("healthLevel") String healthLevel, @Param("area") String area, @Param("equipmentName") String equipmentName, @Param("subSystem") String subSystem, @Param("analysisType") String analysisType, @Param("analysisObjType") String analysisObjType, @Param("station") String station, @Param("pointName") String pointName, @Param("indexAddress") String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop") String endTimeTop, List<FanHealthIndexHour> selectTrendData(@Param("healthLevel") String healthLevel, @Param("area") String area, @Param("equipmentName") String equipmentName, @Param("subSystem") String subSystem, @Param("analysisType") String analysisType, @Param("analysisObjType") String analysisObjType, @Param("station") String station, @Param("pointName") String pointName, @Param("indexAddress") String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop") String endTimeTop,
......
...@@ -39,7 +39,7 @@ public interface FanHealthIndexMomentMapper extends BaseMapper<FanHealthIndexMom ...@@ -39,7 +39,7 @@ public interface FanHealthIndexMomentMapper extends BaseMapper<FanHealthIndexMom
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> " + "<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> " +
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" + "<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" + "<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" +
"order by health_index " + "order by rec_date " +
"<if test='current != null and size != null'>limit ${current},${size} </if>" + "<if test='current != null and size != null'>limit ${current},${size} </if>" +
"</script>") "</script>")
List<FanHealthIndexMoment> selectTrendData(@Param("healthLevel") String healthLevel, @Param("area") String area, @Param("equipmentName") String equipmentName, @Param("subSystem") String subSystem, @Param("analysisType") String analysisType, @Param("analysisObjType") String analysisObjType, @Param("station") String station, @Param("pointName") String pointName, @Param("indexAddress") String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop") String endTimeTop, List<FanHealthIndexMoment> selectTrendData(@Param("healthLevel") String healthLevel, @Param("area") String area, @Param("equipmentName") String equipmentName, @Param("subSystem") String subSystem, @Param("analysisType") String analysisType, @Param("analysisObjType") String analysisObjType, @Param("station") String station, @Param("pointName") String pointName, @Param("indexAddress") String indexAddress, @Param("startTimeTop") String startTimeTop, @Param("endTimeTop") String endTimeTop,
......
...@@ -93,7 +93,7 @@ public interface PvHealthIndexDayMapper extends BaseMapper<PvHealthIndexDay> { ...@@ -93,7 +93,7 @@ public interface PvHealthIndexDayMapper extends BaseMapper<PvHealthIndexDay> {
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" + "<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" + "<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" +
// "<if test='gatewayIds != null and gatewayIds.size() > 0'>AND GATEWAY_ID IN <foreach collection='gatewayIds' item='gatewayId' open='(' separator=',' close=')'>#{gatewayId}</foreach></if>" + // "<if test='gatewayIds != null and gatewayIds.size() > 0'>AND GATEWAY_ID IN <foreach collection='gatewayIds' item='gatewayId' open='(' separator=',' close=')'>#{gatewayId}</foreach></if>" +
"order by health_index "+ "order by rec_date "+
"<if test='current != null and size != null'>limit ${current},${size} </if>" + "<if test='current != null and size != null'>limit ${current},${size} </if>" +
"</script>") "</script>")
List<PvHealthIndexDay> selectTrendData(@Param("station")String station, List<PvHealthIndexDay> selectTrendData(@Param("station")String station,
......
...@@ -61,7 +61,7 @@ public interface PvHealthIndexHourMapper extends BaseMapper<PvHealthIndexHour> { ...@@ -61,7 +61,7 @@ public interface PvHealthIndexHourMapper extends BaseMapper<PvHealthIndexHour> {
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" + "<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" + "<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" +
// "<if test='gatewayIds != null and gatewayIds.size() > 0'>AND GATEWAY_ID IN <foreach collection='gatewayIds' item='gatewayId' open='(' separator=',' close=')'>#{gatewayId}</foreach></if>" + // "<if test='gatewayIds != null and gatewayIds.size() > 0'>AND GATEWAY_ID IN <foreach collection='gatewayIds' item='gatewayId' open='(' separator=',' close=')'>#{gatewayId}</foreach></if>" +
"order by health_index " + "order by rec_date " +
"<if test='current != null and size != null'>limit ${current},${size} </if>" + "<if test='current != null and size != null'>limit ${current},${size} </if>" +
"</script>") "</script>")
......
...@@ -60,7 +60,7 @@ public interface PvHealthIndexMomentMapper extends BaseMapper<PvHealthIndexMomen ...@@ -60,7 +60,7 @@ public interface PvHealthIndexMomentMapper extends BaseMapper<PvHealthIndexMomen
"<if test='subarray!= null'>AND subarray = #{subarray} </if> " + "<if test='subarray!= null'>AND subarray = #{subarray} </if> " +
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" + "<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>" +
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" + "<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>" +
"order by health_index " + "order by rec_date " +
"<if test='current != null and size != null'>limit ${current},${size} </if>" + "<if test='current != null and size != null'>limit ${current},${size} </if>" +
"</script>") "</script>")
List<PvHealthIndexMoment> selectTrendData(@Param("healthLevel") String healthLevel, List<PvHealthIndexMoment> selectTrendData(@Param("healthLevel") String healthLevel,
......
...@@ -66,6 +66,9 @@ public class EarningsForecastImpl { ...@@ -66,6 +66,9 @@ public class EarningsForecastImpl {
}); });
TreeMap<String, Double> map = commonService.getListDataByCondtionsSum(queryCondtion1,objects, ESMoonPowerGeneration.class,null); TreeMap<String, Double> map = commonService.getListDataByCondtionsSum(queryCondtion1,objects, ESMoonPowerGeneration.class,null);
if (null == map || map.isEmpty() ){
return null;
}
TreeMap<String, String> carbonDioxide = new TreeMap<>(); TreeMap<String, String> carbonDioxide = new TreeMap<>();
TreeMap<String, String> standardCoal = new TreeMap<>(); TreeMap<String, String> standardCoal = new TreeMap<>();
TreeMap<String, String> toner = new TreeMap<>(); TreeMap<String, String> toner = new TreeMap<>();
...@@ -162,6 +165,9 @@ public class EarningsForecastImpl { ...@@ -162,6 +165,9 @@ public class EarningsForecastImpl {
}); });
TreeMap<String, Double> map = commonService.getListDataByCondtionsSum(queryCondtion1,objects, ESMoonPowerGeneration.class,null); TreeMap<String, Double> map = commonService.getListDataByCondtionsSum(queryCondtion1,objects, ESMoonPowerGeneration.class,null);
if (null == map || map.isEmpty() ){
return null;
}
TreeMap<String, String> carbonDioxide = new TreeMap<>(); TreeMap<String, String> carbonDioxide = new TreeMap<>();
TreeMap<String, String> standardCoal = new TreeMap<>(); TreeMap<String, String> standardCoal = new TreeMap<>();
TreeMap<String, String> toner = new TreeMap<>(); TreeMap<String, String> toner = new TreeMap<>();
......
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