Commit 66a8a6fb authored by lilongyang's avatar lilongyang

1、解决变量层级健康等级划分页面下的风电/光伏分析变量运行监测数据趋势图按照时间等查询问题

parent aca108ae
......@@ -99,20 +99,30 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
);
tdid=address+"_"+idxBizFanPointProcessVariableClassification.getGatewayId();
}
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
SimpleDateFormat sdf = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN);
//限制必须是区间时间段
if(startTime==null||endTime==null){
Date currentDayStartTime = DateUtils.getCurrentDayStartTime(new Date());
Date currentDayEndTime = DateUtils.getCurrentDayEndTime(new Date());
startTime = sdf.format(currentDayStartTime);
endTime= sdf.format(currentDayEndTime);
}else{
Date currentDayStartTime =DateUtils.dateParse(startTime);
Date currentDayEndTime = DateUtils.dateParse(endTime);
if("1".equals(type)){
startTime = startTime.concat(" 00:00:00");
endTime = endTime.concat(" 23:59:59");
}
if("2".equals(type)){
startTime = startTime.concat(":00:00");
endTime = endTime.concat(":59:59");
}
if("3".equals(type)){
startTime = startTime.concat(":00");
endTime = endTime.concat(":59");
}
Date currentDayStartTime = DateUtils.dateAddHours(DateUtils.dateParse(startTime), -8);
Date currentDayEndTime = DateUtils.dateAddHours(DateUtils.dateParse(endTime), -8);
startTime = sdf.format(currentDayStartTime);
endTime= sdf.format(currentDayEndTime);
}
......
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