|
@@ -29,7 +29,7 @@ public class FireStatisticsServiceImpl implements FireStatisticsService {
|
|
|
@Autowired
|
|
|
private UnitService unitService;
|
|
|
@Override
|
|
|
- public List<Integer> getFireCountByData(Integer year, String address) {
|
|
|
+ public List<Integer> getFireCountByData(Integer year, String address,String fireType) {
|
|
|
List<Integer> list = new ArrayList<>();
|
|
|
Date date = new Date();
|
|
|
for (int i = 0; i < 12; i++) {
|
|
@@ -38,7 +38,7 @@ public class FireStatisticsServiceImpl implements FireStatisticsService {
|
|
|
System.out.println(DateUtils.format(setMonths,"yyyy-MM-dd HH:mm:ss"));
|
|
|
Date firstDayOfMonth = DateUtils.getFirstDayOfMonth(setMonths);
|
|
|
Date lastDayOfMonth = DateUtils.getLastDayOfMonth(setMonths);
|
|
|
- list.add(fireStatisticsMapper.selectCount(firstDayOfMonth, lastDayOfMonth, address,null));
|
|
|
+ list.add(fireStatisticsMapper.selectCount(firstDayOfMonth, lastDayOfMonth, address,fireType));
|
|
|
}
|
|
|
return list;
|
|
|
}
|
|
@@ -92,6 +92,11 @@ public class FireStatisticsServiceImpl implements FireStatisticsService {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<String> getFireType() {
|
|
|
+ return fireStatisticsMapper.groupByCause();
|
|
|
+ }
|
|
|
+
|
|
|
public FireStatisticsPO enhanceFireStatisticsPo(Map<String,Object> map){
|
|
|
FireStatisticsPO fireStatisticsPo = new FireStatisticsPO();
|
|
|
fireStatisticsPo.setId(map.get("火灾序号").toString());
|