|
@@ -38,9 +38,9 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
HadCountVO hadCountVO = new HadCountVO();
|
|
|
Integer userId = SessionLocal.getUserId();
|
|
|
Date date = new Date();
|
|
|
- hadCountVO.setDayCount(hadSiteStaticService.getCount(userId,DateUtils.getDayStartTime(date),date));
|
|
|
- hadCountVO.setMonthCount(hadSiteStaticService.getCount(userId, DateUtils.getFirstDayOfMonth(date), date));
|
|
|
- hadCountVO.setYearCount(hadSiteStaticService.getCount(userId,DateUtils.getBeginDayOfYear(date),date));
|
|
|
+ hadCountVO.setDayCount(hadSiteStaticService.getCount(userId,DateUtils.getDayStartTime(date),date,null));
|
|
|
+ hadCountVO.setMonthCount(hadSiteStaticService.getCount(userId, DateUtils.getFirstDayOfMonth(date), date,null));
|
|
|
+ hadCountVO.setYearCount(hadSiteStaticService.getCount(userId,DateUtils.getBeginDayOfYear(date),date,null));
|
|
|
return hadCountVO;
|
|
|
}
|
|
|
|
|
@@ -72,7 +72,7 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
for (int i = 2; i < 24 ; i+=2) {
|
|
|
//结束时间
|
|
|
Date hours = DateUtils.setHours(startTime, i);
|
|
|
- objects.add(hadSiteStaticService.getCount(userId,startTime,hours));
|
|
|
+ objects.add(hadSiteStaticService.getCount(userId,startTime,hours,null));
|
|
|
startTime = hours;
|
|
|
dates.add(DateUtils.getTime(hours));
|
|
|
}
|
|
@@ -121,7 +121,7 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
Date setDays = DateUtils.setDays(date, i);
|
|
|
Date dayStartTime = DateUtils.getDayStartTime(setDays);
|
|
|
Date dayEndTime = DateUtils.getDayEndTime(setDays);
|
|
|
- objects.add(hadSiteStaticService.getCount(userId,dayStartTime,dayEndTime));
|
|
|
+ objects.add(hadSiteStaticService.getCount(userId,dayStartTime,dayEndTime,null));
|
|
|
dateList.add(DateUtils.getDay(setDays));
|
|
|
}
|
|
|
return CommonIcoVO.builder().name(name).list(objects).listDate(dateList).build();
|
|
@@ -138,12 +138,12 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
//当年开始时间
|
|
|
Date firstDayOfYear = DateUtils.getBeginDayOfYear(date);
|
|
|
HadCountVO hadCountVO = new HadCountVO();
|
|
|
- hadCountVO.setDayCount(hadSiteStaticService.getCount(userId,DateUtils.getDayStartTime(date),date));
|
|
|
- hadCountVO.setMonthCount(hadSiteStaticService.getCount(userId, DateUtils.getFirstDayOfMonth(date), date));
|
|
|
- hadCountVO.setYearCount(hadSiteStaticService.getCount(userId,DateUtils.getBeginDayOfYear(date),date));
|
|
|
- hadCountVO.setLastDayCount(hadSiteStaticService.getCount(userId, DateUtils.addDays(firstDayOfDate, -1), DateUtils.addDays(date, -1)));
|
|
|
- hadCountVO.setLastMonthCount(hadSiteStaticService.getCount(userId, DateUtils.addMonths(firstDayOfMonth, -1), DateUtils.addMonths(date, -1)));
|
|
|
- hadCountVO.setLastYearCount(hadSiteStaticService.getCount(userId, DateUtils.addYears(firstDayOfYear, -1), DateUtils.addYears(date, -1)));
|
|
|
+ hadCountVO.setDayCount(hadSiteStaticService.getCount(userId,DateUtils.getDayStartTime(date),date,siteId));
|
|
|
+ hadCountVO.setMonthCount(hadSiteStaticService.getCount(userId, DateUtils.getFirstDayOfMonth(date), date,siteId));
|
|
|
+ hadCountVO.setYearCount(hadSiteStaticService.getCount(userId,DateUtils.getBeginDayOfYear(date),date,siteId));
|
|
|
+ hadCountVO.setLastDayCount(hadSiteStaticService.getCount(userId, DateUtils.addDays(firstDayOfDate, -1), DateUtils.addDays(date, -1),siteId));
|
|
|
+ hadCountVO.setLastMonthCount(hadSiteStaticService.getCount(userId, DateUtils.addMonths(firstDayOfMonth, -1), DateUtils.addMonths(date, -1),siteId));
|
|
|
+ hadCountVO.setLastYearCount(hadSiteStaticService.getCount(userId, DateUtils.addYears(firstDayOfYear, -1), DateUtils.addYears(date, -1),siteId));
|
|
|
hadCountVO.setDayRadio(Optional.ofNullable(hadCountVO.getDayCount())
|
|
|
.filter(dayCount -> 0.00 != dayCount)
|
|
|
.map(dayCount -> Arith.div(hadCountVO.getLastDayCount(), dayCount))
|