/** * 通过终端信息得到终端所在地的地理属性名称 * * @param Terminfo terminfo * @return String */ public Places getLocation(Terminfo terminfo) { try { Integer placeId = terminfo.getPlaces().getPlacesId(); Places place = terminfoDefineService.findByPlaceId(placeId); LocationTypes location = gltmsumDefineService.findLocaitonByPlace(place); place.setLocationTypes(location); return place; } catch (Exception ex) { return null; } }
/** * 通过终端信息得到终端所在地的名称 * * @param Terminfo terminfo * @return String */ public String getPlaceName(Terminfo terminfo) { Integer placeId = terminfo.getPlaces().getPlacesId(); String name = terminfoDefineService.findPlaceNameByPlaceId(placeId); return name; }