package com.sckw.order.controller;

import com.sckw.core.web.response.HttpResult;
import com.sckw.order.model.vo.req.WbTOrderDataStsParam;
import com.sckw.order.model.vo.req.WbTOrderExcelStsParam;
import com.sckw.order.serivce.KwoTradeOrderStatisticsService;
import lombok.AllArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @desc: 订单统计相关接口
 * @author: yzc
 * @date: 2023-09-13 8:34
 */
@AllArgsConstructor
@RestController
@RequestMapping("/kwoTradeOrderStatistics1")
public class KwoTradeOrderStatisticsTestController {

    private final KwoTradeOrderStatisticsService kwoTradeOrderStatisticsService;


    /**
     * @desc: 工作台贸易订单表格统计
     * @author: yzc
     * @date: 2023-09-12 16:38
     * @Param params:
     * @return: com.sckw.core.web.response.HttpResult
     */
    @PostMapping(value = "/workbenchExcel1", produces = MediaType.APPLICATION_JSON_VALUE)
    public HttpResult workbenchExcel(@RequestBody @Validated WbTOrderExcelStsParam params) {
        return HttpResult.ok(kwoTradeOrderStatisticsService.workbenchExcel(params));
    }

    /**
     * @desc: 工作台贸易订单数据统计
     * @author: yzc
     * @date: 2023-09-11 14:43
     * @Param params:
     * @return: com.sckw.core.web.response.HttpResult
     */
    @PostMapping(value = "/workbenchData1", produces = MediaType.APPLICATION_JSON_VALUE)
    public HttpResult workbenchData(@RequestBody @Validated WbTOrderDataStsParam params) {
        return HttpResult.ok(kwoTradeOrderStatisticsService.workbenchData(params));
    }

    /**
     * @desc: 工作台采购订单列表
     * @author: yzc
     * @date: 2023-09-13 19:13
     * @return: com.sckw.core.web.response.HttpResult
     */
    @GetMapping(value = "/workbenchPurchaseList1", produces = MediaType.APPLICATION_JSON_VALUE)
    public HttpResult workbenchPurchaseList() {
        return HttpResult.ok(kwoTradeOrderStatisticsService.workbenchPurchaseList());
    }
}
