xiaoyi
2 天以前 b5e1bceabb36fe1d1e5e88397280d12e7044c6dd
yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/statistics/ErpPurchaseStatisticsController.java
@@ -16,6 +16,10 @@
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;
@@ -33,6 +37,16 @@
    @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')")