| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/documentation") |
| | |
| | | @ApiOperation("文档信息表-分页查询") |
| | | @Log(title = "文档信息表-分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, Documentation documentation) { |
| | | List<DocumentationDto> list = documentationService.listPage(page, documentation); |
| | | IPage<DocumentationDto> list = documentationService.listPage(page, documentation); |
| | | return AjaxResult.success(list); |
| | | } |
| | | @GetMapping("/list") |
| | | @ApiOperation("文档信息表查询") |
| | | @Log(title = "文档信息表查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult list() { |
| | | List<DocumentationDto> list = documentationService.listAll(); |
| | | return AjaxResult.success(list); |
| | | } |
| | | @PostMapping("/add") |
| | |
| | | public void export(HttpServletResponse response,Documentation documentation ) { |
| | | documentationService.export(response,documentation); |
| | | } |
| | | //附件详情 |
| | | // @GetMapping("/getDocumentation") |
| | | // public Documentation getDocumentation(Documentation documentation) { |
| | | // return documentationService.getById(id); |
| | | // } |
| | | @ApiOperation("文档信息表-统计") |
| | | @GetMapping("/overview") |
| | | public AjaxResult getOverviewStatistics() { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("totalDocsCount", documentationService.getTotalDocsCount()); |
| | | result.put("categoryNumCount", documentationService.getCategoryNumCount()); |
| | | result.put("borrowedDocsCount", documentationService.getBorrowedDocsCount()); |
| | | result.put("monthlyAddedDocsCount", documentationService.getMonthlyAddedDocsCount()); |
| | | return AjaxResult.success(result); |
| | | } |
| | | @ApiOperation("文档信息表-分类统计") |
| | | @GetMapping("/category") |
| | | public AjaxResult getCategoryDistribution() { |
| | | return AjaxResult.success(documentationService.getCategoryDistribution()); |
| | | } |
| | | @ApiOperation("文档信息表-状态统计") |
| | | @GetMapping("/status") |
| | | public AjaxResult getStatusDistribution() { |
| | | return AjaxResult.success(documentationService.getStatusDistribution()); |
| | | } |
| | | } |