pan
5 天以前 afd8d458b14384e907943e5d0dc3e769d07a912a
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Stock;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
 
namespace WIDESEA_WMSServer.Controllers.Stock
{
    /// <summary>
    /// 库存
    /// </summary>
    [Route("api/StockInfo")]
    [ApiController]
    public class StockInfoController : ApiBaseController<IStockInfoService, Dt_StockInfo>
    {
        public StockInfoController(IStockInfoService service) : base(service)
        {
        }
        /// <summary>
        /// 查询订单立库库存视图
        /// </summary>
        /// <param name="orderId"></param>
        /// <param name="materielCode"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("GetStockSelectViews"), AllowAnonymous]
        public List<StockSelectViewDTO> GetStockSelectViews(int orderId, string materielCode)
        {
            return Service.GetStockSelectViews(orderId, materielCode);
        }
 
        /// <summary>
        /// 查询订单立库库存视图
        /// </summary>
        /// <param name="orderId"></param>
        /// <param name="materielCode"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("GetSelectViewDTOs"), AllowAnonymous]
        public List<StockSelectViewDTO> GetSelectViewDTOs(string orderNo, string materielCode)
        {
            try
            {
                return Service.GetSelectViewDTOs(orderNo, materielCode);
            }
            catch (Exception ex)
            {
                return new List<StockSelectViewDTO>();
            }
        }
 
        /// <summary>
        /// /
        /// </summary>
        /// <param name="orderNo"></param>
        /// <param name="materielCode"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("GetAllocateStockSelect"), AllowAnonymous]
        public List<StockSelectViewDTO> GetAllocateSelectViewDTOs(int orderId,int orderDetailId, string materielCode)
        {
            try
            {
                return Service.GetAllocateSelectViewDTOs(orderId, orderDetailId,materielCode);
            }
            catch (Exception ex)
            {
                return new List<StockSelectViewDTO>();
            }
        }
 
    }
}