yaowanxin
3 天以前 8f4db901aa772a808c243f8a4e39522f6f09d5da
src/main/java/com/ruoyi/warehouse/controller/DocumentationController.java
@@ -18,7 +18,9 @@
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")
@@ -66,9 +68,24 @@
    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());
    }
}