|
@@ -124,10 +124,10 @@ public class AlertServiceImpl extends AbstractCrudService<AlertMapper, Alert> im
|
|
if (null != current && size != null){
|
|
if (null != current && size != null){
|
|
IPage<Alert> page = new Page<>(current,size);
|
|
IPage<Alert> page = new Page<>(current,size);
|
|
page = this.page(page,queryWrapper);
|
|
page = this.page(page,queryWrapper);
|
|
- commonPage = new CommonPage<AlertMapVO>(BeanMapperUtils.mapList(page.getRecords(),Alert.class,AlertMapVO.class),page.getTotal(),page.getSize(),page.getCurrent());
|
|
|
|
|
|
+ commonPage = new CommonPage<>(BeanMapperUtils.mapList(page.getRecords(),Alert.class,AlertMapVO.class),page.getTotal(),page.getSize(),page.getCurrent());
|
|
}else {
|
|
}else {
|
|
List<Alert> list = this.list(queryWrapper);
|
|
List<Alert> list = this.list(queryWrapper);
|
|
- commonPage = new CommonPage<AlertMapVO>(BeanMapperUtils.mapList(list,Alert.class,AlertMapVO.class),list.size(),list.size(),1);
|
|
|
|
|
|
+ commonPage = new CommonPage<>(BeanMapperUtils.mapList(list,Alert.class,AlertMapVO.class),list.size(),list.size(),1);
|
|
}
|
|
}
|
|
return commonPage;
|
|
return commonPage;
|
|
}
|
|
}
|
|
@@ -142,7 +142,6 @@ public class AlertServiceImpl extends AbstractCrudService<AlertMapper, Alert> im
|
|
List<LocateInfo> lonLat = GouldUtil.getLonLat(alert.getAfdz());
|
|
List<LocateInfo> lonLat = GouldUtil.getLonLat(alert.getAfdz());
|
|
LocateInfo locateInfo = lonLat.get(0);
|
|
LocateInfo locateInfo = lonLat.get(0);
|
|
List<FireStatisticsPO> list = fireStatisticsService.distanceList(locateInfo.getLongitude(), locateInfo.getLatitude(), startTime, endTime);
|
|
List<FireStatisticsPO> list = fireStatisticsService.distanceList(locateInfo.getLongitude(), locateInfo.getLatitude(), startTime, endTime);
|
|
- System.out.println(list);
|
|
|
|
if (CollectionUtils.isNotEmpty(list)){
|
|
if (CollectionUtils.isNotEmpty(list)){
|
|
FireStatisticsPO fireStatisticsPo = list.get(0);
|
|
FireStatisticsPO fireStatisticsPo = list.get(0);
|
|
alert.setPropertyLoss(fireStatisticsPo.getPropertyLoss());
|
|
alert.setPropertyLoss(fireStatisticsPo.getPropertyLoss());
|
|
@@ -153,11 +152,6 @@ public class AlertServiceImpl extends AbstractCrudService<AlertMapper, Alert> im
|
|
return alert;
|
|
return alert;
|
|
}
|
|
}
|
|
|
|
|
|
- public String checkAddress(String address){
|
|
|
|
- String s = address.replaceAll(" ", "");
|
|
|
|
- return s.substring(0,s.indexOf("("));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public List<AlertStatisticsVO> getAlertStatistics(Date startTime, Date endTime) {
|
|
public List<AlertStatisticsVO> getAlertStatistics(Date startTime, Date endTime) {
|
|
|
|
|