| | |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.annotation.Resource; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | @GetMapping("/summary") |
| | | @Operation(summary = "获得采购统计") |
| | | @PreAuthorize("@ss.hasPermission('erp:statistics:query')") |
| | | public CommonResult<ErpPurchaseSummaryRespVO> getPurchaseSummary() { |
| | | LocalDateTime today = LocalDateTimeUtils.getToday(); |
| | | LocalDateTime yesterday = LocalDateTimeUtils.getYesterday(); |
| | |
| | | @GetMapping("/time-summary") |
| | | @Operation(summary = "获得采购时间段统计") |
| | | @Parameter(name = "count", description = "时间段数量", example = "6") |
| | | @PreAuthorize("@ss.hasPermission('erp:statistics:query')") |
| | | public CommonResult<List<ErpPurchaseTimeSummaryRespVO>> getPurchaseTimeSummary( |
| | | @RequestParam(value = "count", defaultValue = "6") Integer count) { |
| | | List<ErpPurchaseTimeSummaryRespVO> summaryList = new ArrayList<>(); |