| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| | | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| | | import cn.iocoder.yudao.module.erp.controller.admin.statistics.vo.purchase.ErpPurchasePriceRespVO; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | |
| | | @Resource |
| | | private ErpPurchaseStatisticsService purchaseStatisticsService; |
| | | |
| | | @GetMapping("/price") |
| | | @Operation(summary = "采购价格分析") |
| | | @PreAuthorize("@ss.hasPermission('erp:statistics:query')") |
| | | public CommonResult<PageResult<ErpPurchasePriceRespVO>> getPriceAnalysis(@Validated PageParam page, |
| | | @RequestParam(value = "productId", required = false) Long productId, |
| | | @RequestParam(value = "orderTime", required = false) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime[] orderTime) { |
| | | return success(purchaseStatisticsService.getPriceAnalysis(page, productId, orderTime)); |
| | | } |
| | | |
| | | @GetMapping("/summary") |
| | | @Operation(summary = "获得采购统计") |
| | | @PreAuthorize("@ss.hasPermission('erp:statistics:query')") |