| | |
| | | @Autowired |
| | | DataLoaderService dataLoaderService; |
| | | |
| | | private final static String POINT = "."; |
| | | |
| | | private final static String FILE_TYPES = "'xls','shp','gdb','mdb'"; |
| | | |
| | | public static List<String> extList = new ArrayList<>(Arrays.asList(".xls", ".xlsx", ".mdb", ".zip")); |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询表中数据") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "元数据ID", dataType = "Integer", paramType = "query", example = "113"), |
| | | @ApiImplicitParam(name = "id", value = "元数据ID", dataType = "Integer", paramType = "query", example = "115"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10") |
| | | }) |
| | | @GetMapping(value = "/selectDbData") |
| | | public ResponseMsg<Object> selectDbData(Integer id, Integer pageIndex, Integer pageSize) { |
| | | // noinspection AlibabaRemoveCommentedCode |
| | | try { |
| | | if (null == id || id < 0) { |
| | | return fail("元数据ID不能为空或小于0", null); |
| | | } |
| | | |
| | | MetaEntity meta = metaService.selectById(id); |
| | | if (null == meta || null == meta.getTab() || !meta.getTab().contains(".")) { |
| | | if (null == meta || null == meta.getTab() || !meta.getTab().contains(POINT)) { |
| | | return fail("找不到元数据信息", null); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | QueryWrapper wrapper = new QueryWrapper(); |
| | | wrapper.eq("dirid", meta.getDirid()); |
| | | wrapper.eq("depid", meta.getDepid()); |
| | | wrapper.eq("verid", meta.getVerid()); |
| | | //wrapper.eq("dirid", meta.getDirid()); |
| | | //wrapper.eq("depid", meta.getDepid()); |
| | | //wrapper.eq("verid", meta.getVerid()); |
| | | wrapper.eq("createuser", meta.getCreateUser()); |
| | | wrapper.eq("createtime", meta.getCreateTime()); |
| | | |
| | | Page<Object> page = new Page<>(pageIndex, pageSize); |
| | |
| | | public class GdbHelper { |
| | | private final static Log log = LogFactory.getLog(GdbHelper.class); |
| | | |
| | | private final static String OBJECT ="java.lang.Object"; |
| | | |
| | | private static List<String> excludeFields = new ArrayList<>(Arrays.asList("gid", "objectid", "dirid", "depid", "verid","createtime", "createuser", "updateuser", "updatetime", "shape_leng", "shape_area")); |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | if ("java.lang.Object" != clazz.getSuperclass().getName()) { |
| | | if (OBJECT != clazz.getSuperclass().getName()) { |
| | | getFieldMapper(clazz.getSuperclass(), layer, map); |
| | | } |
| | | } catch (Exception ex) { |