修改 查询今天的火点信息

This commit is contained in:
liuchengqian 2022-05-07 15:31:25 +08:00
parent e357bc9b2e
commit 9321bdf9bf

View File

@ -69,6 +69,9 @@ public class FirePointServiceImpl implements FirePointService {
@Resource
private CountyDao countyDao;
@Resource
private StreetDao streetDao;
@Resource
private FireDao fireDao;
@ -146,39 +149,24 @@ public class FirePointServiceImpl implements FirePointService {
/**
* 查询今天的火点信息
*
* @param
* @return
*/
@Cacheable(keyGenerator = "keyGenerator", unless = "#result == null")
@Override
public List<FirePointEntity> selectTodayFirePoint(String countyCode) {
String addTime = DateTimeUtil.dateToString(LocalDate.now());
if ("0000".equals(countyCode.substring(2))) {
if (9 == countyCode.length()) {
List<StreetEntity> byStreetCode = streetDao.findByStreetCode(countyCode);
String streetName = byStreetCode.get(0).getStreetName();
return firePointDao.selectTodayFirePoint(addTime, streetName);
} else if ("0000".equals(countyCode.substring(2))) {
List<CityEntity> byProCode = cityDao.findByProCode(countyCode);
String proName = byProCode.get(0).getProName();
// if(proName.equals("山东省")){
// return firePointDao.selectTodayFirePointShandong(addTime,proName);
// }
return firePointDao.selectTodayFirePoint(addTime, proName);
} else if ("00".equals(countyCode.substring(4)) && !"0000".equals(countyCode.substring(2))) {
List<CountyEntity> byCityCode = countyDao.findByCityCode(countyCode);
String cityName = byCityCode.get(0).getCityName();
CityEntity byCityName = cityDao.findByCityName(cityName);
// if(byCityName.getProName().equals("山东省")){
// return firePointDao.selectTodayFirePointShandong(addTime,cityName);
// }
return firePointDao.selectTodayFirePoint(addTime, cityName);
} else {
List<CountyEntity> byCountyCode = countyDao.findByCountyCode(countyCode);
CityEntity byCityName = cityDao.findByCityName(byCountyCode.get(0).getCityName());
// if(b
//
//
// yCityName.getProName().equals("山东省")){
// return firePointDao.selectTodayFirePointOneShandong(addTime,countyCode);
// }
return firePointDao.selectTodayFirePointOne(addTime, countyCode);
}
}