| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/downloadShp", produces = "application/json; charset=UTF-8") |
| | | public void downloadShp(@RequestBody List<MarkJsonEntity> list, HttpServletRequest req, HttpServletResponse res) { |
| | | public ResponseMsg<String> downloadShp(@RequestBody List<MarkJsonEntity> list, HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue == null) { |
| | | WebHelper.write2Page(res, WebHelper.getErrJson(HttpStatus.UNAUTHORIZED, "用户未登录")); |
| | | return fail("用户未登录", null); |
| | | } |
| | | if (list == null || list.isEmpty()) { |
| | | WebHelper.write2Page(res, WebHelper.getErrJson(HttpStatus.BAD_REQUEST, "找不到标绘实体")); |
| | | return fail("找不到标绘数据", null); |
| | | } |
| | | |
| | | markService.downloadShp(ue, list, req, res); |
| | | String str = markService.downloadShp(ue, list, req, res); |
| | | |
| | | return success(str); |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | public void downloadFile(String guid) { |
| | | |
| | | } |
| | | } |