|
@@ -11,10 +11,12 @@ 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;
|
|
|
+import com.bizmatics.mhfire.model.CarPerson;
|
|
|
import com.bizmatics.mhfire.persistence.mapper.AlertMapper;
|
|
|
import com.bizmatics.mhfire.persistence.mapper.po.FireStatisticsPO;
|
|
|
import com.bizmatics.mhfire.persistence.mapper.vo.LocateInfo;
|
|
|
import com.bizmatics.mhfire.service.AlertService;
|
|
|
+import com.bizmatics.mhfire.service.CarPersonService;
|
|
|
import com.bizmatics.mhfire.service.FireStatisticsService;
|
|
|
import com.bizmatics.mhfire.service.util.Arith;
|
|
|
import com.bizmatics.mhfire.service.util.GouldUtil;
|
|
@@ -36,6 +38,10 @@ public class AlertServiceImpl extends AbstractCrudService<AlertMapper, Alert> im
|
|
|
@Autowired
|
|
|
private FireStatisticsService fireStatisticsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CarPersonService carPersonService;
|
|
|
+
|
|
|
+
|
|
|
private static final String[] ALERT_TYPE = {"火灾","社会救助","抢险救援"};
|
|
|
|
|
|
@Override
|
|
@@ -141,6 +147,7 @@ public class AlertServiceImpl extends AbstractCrudService<AlertMapper, Alert> im
|
|
|
Date endTime = DateUtils.addMonths(alert.getLasj(), 30);
|
|
|
List<LocateInfo> lonLat = GouldUtil.getLonLat(alert.getAfdz());
|
|
|
LocateInfo locateInfo = lonLat.get(0);
|
|
|
+ //计算精度维度在一定范围内的数据和火灾关联
|
|
|
List<FireStatisticsPO> list = fireStatisticsService.distanceList(locateInfo.getLongitude(), locateInfo.getLatitude(), startTime, endTime);
|
|
|
if (CollectionUtils.isNotEmpty(list)){
|
|
|
FireStatisticsPO fireStatisticsPo = list.get(0);
|
|
@@ -149,6 +156,9 @@ public class AlertServiceImpl extends AbstractCrudService<AlertMapper, Alert> im
|
|
|
alert.setNonFatal(fireStatisticsPo.getNonFatal());
|
|
|
}
|
|
|
}
|
|
|
+ //查询车辆和人员信息
|
|
|
+ List<CarPerson> carLit = carPersonService.getByAjId(alert.getId());
|
|
|
+ alert.setCarList(carLit);
|
|
|
return alert;
|
|
|
}
|
|
|
|