| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.javaweb.common.annotation.Log; |
| | | import com.javaweb.common.enums.BusinessType; |
| | | import com.javaweb.geo.domain.ProjectData; |
| | |
| | | import com.javaweb.common.core.domain.AjaxResult; |
| | | import com.javaweb.common.utils.poi.ExcelUtil; |
| | | import com.javaweb.common.core.page.TableDataInfo; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * 项目资料Controller |
| | |
| | | return prefix + "/projectData"; |
| | | } |
| | | |
| | | @RequiresPermissions("geo:projectData:view") |
| | | @GetMapping("/2") |
| | | public String projectData2(String id, String type, ModelMap mmap) { |
| | | mmap.put("projectId", id); |
| | | mmap.put("type", type); |
| | | return prefix + "/projectData2"; |
| | | } |
| | | |
| | | /** |
| | | * 导入压缩包 |
| | | */ |
| | | @GetMapping("/importImg") |
| | | public String importPdf(){ |
| | | return prefix + "/upload"; |
| | | } |
| | | |
| | | /** |
| | | * 图片展示 |
| | | */ |
| | | @GetMapping("/viewImage") |
| | | public String viewImage(ModelMap mmap, @RequestParam("id") String id){ |
| | | ProjectData data = projectDataService.selectProjectDataById(id); |
| | | String path = ""; |
| | | if (!ObjectUtils.isEmpty(data)){ |
| | | path = data.getDataUrl(); |
| | | } |
| | | mmap.put("urlAddress",path); |
| | | return prefix + "/image_view"; |
| | | } |
| | | |
| | | /** |
| | | * 查询项目资料列表 |
| | |
| | | public AjaxResult remove(String ids) { |
| | | return toAjax(projectDataService.deleteProjectDataByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 上传压缩包 |
| | | */ |
| | | @PostMapping("/uploadZIP") |
| | | @ResponseBody |
| | | public AjaxResult uploadZIP(MultipartFile file, HttpServletRequest request){ |
| | | return projectDataService.uploadZIP(file,request); |
| | | } |
| | | |
| | | } |