| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author 86151 |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 列表所有文档 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<DocumentationDto> listAll() { |
| | | return documentationMapper.list(); |
| | | List<DocumentationDto> list = documentationMapper.list().stream().filter(documentationDto -> "正常".equals(documentationDto.getDocStatus())).collect(Collectors.toList()); |
| | | return list; |
| | | } |
| | | /** |
| | | * 获取文档总数 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer getTotalDocsCount() { |
| | | return documentationMapper.countTotalDocs(); |
| | | } |
| | | /** |
| | | * 获取文档分类总数 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer getCategoryNumCount() { |
| | | return documentationMapper.countCategoryNum(); |
| | | } |
| | | /** |
| | | * 获取已借出文档总数 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer getBorrowedDocsCount() { |
| | | return documentationMapper.countBorrowedDocs(); |
| | | } |
| | | /** |
| | | * 获取每月新增文档总数 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer getMonthlyAddedDocsCount() { |
| | | return documentationMapper.countMonthlyAddedDocs(); |
| | | } |
| | | /** |
| | | * 获取文档分类分布 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getCategoryDistribution() { |
| | | return documentationMapper.countCategoryDistribution(); |
| | | } |
| | | /** |
| | | * 获取文档状态分布 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getStatusDistribution() { |
| | | return documentationMapper.countStatusDistribution(); |
| | | } |
| | | } |
| | | |