|
@@ -68,32 +68,6 @@ public class FireStatisticsServiceImpl implements FireStatisticsService {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 月平均值/年平均值
|
|
|
- * @param endTime
|
|
|
- * @param distanceOfTwoDate
|
|
|
- * @param address
|
|
|
- * @param fireType
|
|
|
- * @param month
|
|
|
- * @return
|
|
|
- */
|
|
|
- public Double getFireCountByDate(Date endTime,Integer distanceOfTwoDate,String address,String fireType,Integer month){
|
|
|
- int count = 0;
|
|
|
- for (int j = 0; j < distanceOfTwoDate; j++) {
|
|
|
- Date monthDate = endTime;
|
|
|
- if (0 != j){
|
|
|
- monthDate = DateUtils.addYears(endTime, -j);
|
|
|
- }
|
|
|
- monthDate = DateUtils.setMonths(monthDate, month);
|
|
|
- Date monthDateStartTime = DateUtils.getFirstDayOfMonth(monthDate);
|
|
|
- Date monthDateEndTime = DateUtils.getLastDayOfMonth(monthDate);
|
|
|
- System.out.println(DateUtils.format(monthDateStartTime,"yyyy-MM-dd HH:mm:ss"));
|
|
|
- System.out.println(DateUtils.format(monthDateEndTime,"yyyy-MM-dd HH:mm:ss"));
|
|
|
- count+=fireStatisticsMapper.selectCount(monthDateStartTime, monthDateEndTime, address, fireType, null);
|
|
|
- }
|
|
|
- return (double) (count/distanceOfTwoDate);
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
@Override
|
|
|
public CommonPage<FireStatisticsPO> page(Integer current, Integer size, Date startTime, Date endTime, String address) {
|