1
hutongqing
2024-09-13 3ca95f10e441ff66d4d62f8dfe202bfb26c3c8e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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<IStockInfoService, Dt_StockInfo>
    {
        private readonly IStockInfoRepository _stockInfoRepository;
        public StockInfoController(IStockInfoService service, IStockInfoRepository stockInfoRepository) : base(service)
        {
            _stockInfoRepository = stockInfoRepository;
        }
 
        [HttpPost, Route("GetAllStockViews"), AllowAnonymous]
        public List<StockViewDTO> GetAllStockViews()
        {
            return _stockInfoRepository.GetAllStockViews();
        }
 
        [HttpPost, Route("GetStockSelectViews"), AllowAnonymous]
        public List<StockSelectViewDTO> GetStockSelectViews(string materielCode)
        {
            return Service.GetStockSelectViews(materielCode);
        }
    }
}