| | |
| | | * @param file 需要上传的文件,通过multipart/form-data方式提交 |
| | | * @return 返回上传结果的ResponseResult对象,其中包含上传成功的消息 |
| | | */ |
| | | @PostMapping("/upload") |
| | | public ResponseResult<String> uploadFile(@RequestParam("file") MultipartFile file) { |
| | | tbDkjbxxService.uploadFile(file); |
| | | List<TbDkjbxxEntity> list = tbDkjbxxService.list(); |
| | | service.savaInMysql(list); |
| | | return tbDkjbxxService.uploadFile(file); |
| | | } |
| | | // @PostMapping("/upload") |
| | | // public ResponseResult<String> uploadFile(@RequestParam("file") MultipartFile file) { |
| | | // tbDkjbxxService.uploadFile(file); |
| | | // List<TbDkjbxxEntity> list = tbDkjbxxService.list(); |
| | | //// service.savaInMysql(list); |
| | | // return tbDkjbxxService.uploadFile(file); |
| | | // } |
| | | |
| | | @PostMapping("/uploadLot") |
| | | public ResponseResult getGeo(@RequestParam String workspaceId, |
| | |
| | | @RequestParam double airportLat, |
| | | @RequestParam double airportLon, |
| | | HttpServletRequest request) throws Exception { |
| | | List<TbDkjbxxEntity> list = tbDkjbxxService.list(); |
| | | service.savaInMysql(list,workspaceId); |
| | | MultipartFile multipartFile = tbDkjbxxService.listFile(workspaceId, waylineName, airportLat, airportLon); |
| | | CustomClaim customClaim = (CustomClaim) request.getAttribute(TOKEN_CLAIM); |
| | | String creator = customClaim.getUsername(); |