diff --git a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java index 48dabae..3562890 100644 --- a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java @@ -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 selectTodayFirePoint(String countyCode) { String addTime = DateTimeUtil.dateToString(LocalDate.now()); - if ("0000".equals(countyCode.substring(2))) { + if (9 == countyCode.length()) { + List byStreetCode = streetDao.findByStreetCode(countyCode); + String streetName = byStreetCode.get(0).getStreetName(); + return firePointDao.selectTodayFirePoint(addTime, streetName); + } else if ("0000".equals(countyCode.substring(2))) { List 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 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 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); } }