|
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.bizmatics.common.core.bean.CommonPage;
|
|
|
-import com.bizmatics.common.core.util.DateUtils;
|
|
|
import com.bizmatics.common.core.util.StringUtils;
|
|
|
import com.bizmatics.common.mvc.base.AbstractCrudService;
|
|
|
import com.bizmatics.mhfire.model.Alert;
|
|
@@ -28,10 +27,8 @@ public class AlertServiceImpl extends AbstractCrudService<AlertMapper, Alert> im
|
|
|
private static final String[] ALERT_TYPE = {"火灾","社会救助","抢险救援"};
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, List<AlertStatisticsVO>> getAlertStatisticsByHouse() {
|
|
|
- Date date = new Date();
|
|
|
- Date startTime = DateUtils.getDayStartTime(date);
|
|
|
- Map<String, List<AlertStatisticsVO>> typeMap = enhanceList(baseMapper.getCountByHorse(startTime, date));
|
|
|
+ public Map<String, List<AlertStatisticsVO>> getAlertStatisticsByHouse(Date startTime,Date endTime) {
|
|
|
+ Map<String, List<AlertStatisticsVO>> typeMap = enhanceList(baseMapper.getCountByHorse(startTime, endTime));
|
|
|
perfect(typeMap,24);
|
|
|
return typeMap;
|
|
|
}
|
|
@@ -75,10 +72,8 @@ public class AlertServiceImpl extends AbstractCrudService<AlertMapper, Alert> im
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, List<AlertStatisticsVO>> getAlertStatisticsByMonth() {
|
|
|
- Date date = new Date();
|
|
|
- Date startTime = DateUtils.getDayStartTime(date);
|
|
|
- Map<String, List<AlertStatisticsVO>> typeMap = enhanceList(baseMapper.getCountByMonth(startTime, date));
|
|
|
+ public Map<String, List<AlertStatisticsVO>> getAlertStatisticsByMonth(Date startTime,Date endTime) {
|
|
|
+ Map<String, List<AlertStatisticsVO>> typeMap = enhanceList(baseMapper.getCountByMonth(startTime, endTime));
|
|
|
perfect(typeMap,12);
|
|
|
return typeMap;
|
|
|
}
|