| | |
| | | |
| | | switch (type) { |
| | | case "DOM": |
| | | return "type = 'DOM'"; |
| | | return "a.type = 'DOM'"; |
| | | case "DEM": |
| | | return "type = 'DEM'"; |
| | | return "a.type = 'DEM'"; |
| | | case "Vector": |
| | | return "type = 'Vector'"; |
| | | return "a.type = 'Vector'"; |
| | | case "Model": |
| | | return "type = 'Model'"; |
| | | return "a.type = 'Model'"; |
| | | default: |
| | | throw new Exception("数据类型不匹配"); |
| | | } |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "分页查询数简的颜色表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "port", value = "端口", dataType = "int", paramType = "query", example = "50001"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "int", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectSjColorTables") |
| | | public void selectSjColorTables(int pageSize, int pageIndex, HttpServletRequest req, HttpServletResponse res) { |
| | | public void selectSjColorTables(Integer port, int pageSize, int pageIndex, HttpServletRequest req, HttpServletResponse res) { |
| | | pageIndex = Math.max(pageIndex, 1); |
| | | pageSize = Math.max(pageSize, 5); |
| | | |
| | | shuJianService.selectSjColorTables(pageSize, pageIndex, req, res); |
| | | shuJianService.selectSjColorTables(port, pageSize, pageIndex, req, res); |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询数简图层") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "port", value = "端口", dataType = "int", paramType = "query", example = "50001") |
| | | }) |
| | | @GetMapping(value = "/selectSjLayers") |
| | | public void selectSjLayers(Integer port, HttpServletRequest req, HttpServletResponse res) { |
| | | shuJianService.selectSjLayers(port, req, res); |
| | | } |
| | | |
| | | @SysLog() |
| | |
| | | entity.setUserId(ue.getId()); |
| | | entity.setDepcode(ue.getDepcode()); |
| | | } |
| | | entity.setDefault(); |
| | | |
| | | permsService.clearPermsCache(); |
| | | Integer rows = shuJianService.insertSjService(entity); |
| | |
| | | entity.setUserId(ue.getId()); |
| | | entity.setDepcode(ue.getDepcode()); |
| | | } |
| | | entity.setDefault(); |
| | | |
| | | permsService.clearPermsCache(); |
| | | Integer rows = shuJianService.updateSjService(entity, req, res); |
| | | Integer rows = shuJianService.updateSjService(entity); |
| | | |
| | | return success(rows); |
| | | } catch (Exception ex) { |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "Integer", paramType = "query", allowMultiple = true, example = "1") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | @GetMapping(value = "/deletesSjServices") |
| | | public ResponseMsg<Integer> deletesSjServices(@RequestParam List<Integer> ids) { |
| | | try { |
| | | if (null == ids || ids.isEmpty()) { |
| | |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "更新一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "PublishEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody PublishEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = publishService.update(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | } |