修改 查询今天的火点信息
This commit is contained in:
parent
e357bc9b2e
commit
9321bdf9bf
@ -69,6 +69,9 @@ public class FirePointServiceImpl implements FirePointService {
|
|||||||
@Resource
|
@Resource
|
||||||
private CountyDao countyDao;
|
private CountyDao countyDao;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private StreetDao streetDao;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private FireDao fireDao;
|
private FireDao fireDao;
|
||||||
|
|
||||||
@ -146,39 +149,24 @@ public class FirePointServiceImpl implements FirePointService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询今天的火点信息
|
* 查询今天的火点信息
|
||||||
*
|
|
||||||
* @param
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Cacheable(keyGenerator = "keyGenerator", unless = "#result == null")
|
@Cacheable(keyGenerator = "keyGenerator", unless = "#result == null")
|
||||||
@Override
|
@Override
|
||||||
public List<FirePointEntity> selectTodayFirePoint(String countyCode) {
|
public List<FirePointEntity> selectTodayFirePoint(String countyCode) {
|
||||||
String addTime = DateTimeUtil.dateToString(LocalDate.now());
|
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);
|
List<CityEntity> byProCode = cityDao.findByProCode(countyCode);
|
||||||
String proName = byProCode.get(0).getProName();
|
String proName = byProCode.get(0).getProName();
|
||||||
// if(proName.equals("山东省")){
|
|
||||||
// return firePointDao.selectTodayFirePointShandong(addTime,proName);
|
|
||||||
// }
|
|
||||||
return firePointDao.selectTodayFirePoint(addTime, proName);
|
return firePointDao.selectTodayFirePoint(addTime, proName);
|
||||||
|
|
||||||
} else if ("00".equals(countyCode.substring(4)) && !"0000".equals(countyCode.substring(2))) {
|
} else if ("00".equals(countyCode.substring(4)) && !"0000".equals(countyCode.substring(2))) {
|
||||||
List<CountyEntity> byCityCode = countyDao.findByCityCode(countyCode);
|
List<CountyEntity> byCityCode = countyDao.findByCityCode(countyCode);
|
||||||
String cityName = byCityCode.get(0).getCityName();
|
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);
|
return firePointDao.selectTodayFirePoint(addTime, cityName);
|
||||||
} else {
|
} 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);
|
return firePointDao.selectTodayFirePointOne(addTime, countyCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user