| | |
| | | //获取传入对象信息 |
| | | U u = clazz.cast(t); |
| | | try { |
| | | Field lngField = u.getClass().getDeclaredField(lngKey); |
| | | Field latField = u.getClass().getDeclaredField(latKey); |
| | | Field lngField = null; |
| | | Field latField = null; |
| | | try { |
| | | lngField = u.getClass().getDeclaredField(lngKey); |
| | | latField = u.getClass().getDeclaredField(latKey); |
| | | } catch (NoSuchFieldException e) { |
| | | lngField = u.getClass().getSuperclass().getDeclaredField(lngKey); |
| | | latField = u.getClass().getSuperclass().getDeclaredField(latKey); |
| | | } |
| | | // 获取点信息 |
| | | lngField.setAccessible(true); |
| | | latField.setAccessible(true); |
| | |
| | | if (!Strings.isBlank(gridCodeKey)) { |
| | | // 根据位置设置网格,警格编号 |
| | | IGridService gridService = SpringUtils.getBean(IGridService.class); |
| | | Field gridCodeField = u.getClass().getDeclaredField(gridCodeKey); |
| | | Field gridCodeField = null; |
| | | try { |
| | | gridCodeField = u.getClass().getDeclaredField(gridCodeKey); |
| | | } catch (NoSuchFieldException e) { |
| | | gridCodeField = u.getClass().getSuperclass().getDeclaredField(gridCodeKey); |
| | | } |
| | | //点坐标解析网格 |
| | | List<GridEntity> gridEntityList = gridService.spatialAnalysis(point); |
| | | if (gridEntityList.size() > 0) { |
| | |
| | | // 判断是否分析警格 |
| | | if (!Strings.isBlank(jwGirdCodeKey)) { |
| | | IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class); |
| | | Field jwGridCodeField = u.getClass().getDeclaredField(jwGirdCodeKey); |
| | | Field jwGridCodeField = null; |
| | | try { |
| | | jwGridCodeField = u.getClass().getDeclaredField(jwGirdCodeKey); |
| | | } catch (NoSuchFieldException e) { |
| | | jwGridCodeField = u.getClass().getSuperclass().getDeclaredField(jwGirdCodeKey); |
| | | } |
| | | //点坐标解析警格 |
| | | List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point); |
| | | if (policeAffairsGridEntityList.size() > 0) { |