package com.jwipc.inquiry.controller.rest;

import com.jwipc.inquiry.dto.InquiryApproveDTO;
import com.jwipc.inquiry.dto.InquiryMaterialSupplierDTO;
import com.jwipc.inquiry.logic.InquiryApproveLogic;
import com.jwipc.inquiry.model.query.InquiryQuoteQuery;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.jwipc.inquiry.constant.ModuleConst.MODULE_ROOT;

/**
 * <p>
 * 询价单审批记录表 前端控制器
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-04-30
 */

@RestController
@RequestMapping(MODULE_ROOT+ "/approve/rest")
@RequiredArgsConstructor
public class InquiryApproveRestController {
    private final InquiryApproveLogic inquiryApproveLogic;

    /**
     * 物料供应商列表
     * @param inquiryId 参数
     */
    @RequestMapping("/list")
    public ResponseEntity<List<InquiryApproveDTO>> list(Long inquiryId) {
        List<InquiryApproveDTO> inquiryApproveDTOS = inquiryApproveLogic.list(inquiryId);
        return ResponseEntity.ok(inquiryApproveDTOS);
    }
}
