package vip.xiaonuo.purchase.controller;


import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.pojo.CommonResult;
import vip.xiaonuo.purchase.entity.vo.PurchaseContractVo;
import vip.xiaonuo.purchase.entity.vo.PurchaseOrderVo;
import vip.xiaonuo.purchase.param.PurchaseOrderParam;
import vip.xiaonuo.purchase.param.PurchaseParam;
import vip.xiaonuo.purchase.service.IPurchaseContractService;

import java.util.List;

/**
 * <p>
 * 采购合同 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-11-27
 */

@Api(tags = "采购合同表控制器")
@ApiSupport(author = "wang", order = 1)
@RestController
@Validated
public class PurchaseContractController {

    @Autowired
    private IPurchaseContractService contractService;

    @ApiOperationSupport(order = 1)
    @ApiOperation("采购合同金额")
    @PostMapping("/purchase-contract/getList")
    public CommonResult<List<PurchaseContractVo>> getList(@RequestBody PurchaseOrderParam orderParam) {
        return CommonResult.data(contractService.getList(orderParam));
    }
}
