using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using WIDESEA_Core.BaseController; using WIDESEA_DTO.Stock; using WIDESEA_IBasicRepository; using WIDESEA_IStockRepository; using WIDESEA_IStockService; using WIDESEA_Model.Models; namespace WIDESEA_WMSServer.Controllers.Stock { [Route("api/StockInfo")] [ApiController] public class StockInfoController : ApiBaseController { private readonly IStockInfoRepository _stockInfoRepository; public StockInfoController(IStockInfoService service, IStockInfoRepository stockInfoRepository) : base(service) { _stockInfoRepository = stockInfoRepository; } [HttpPost, Route("GetAllStockViews"), AllowAnonymous] public List GetAllStockViews() { return _stockInfoRepository.GetAllStockViews(); } [HttpPost, Route("GetStockSelectViews"), AllowAnonymous] public List GetStockSelectViews(string materielCode) { return Service.GetStockSelectViews(materielCode); } } }