wangxinhui
2025-11-30 f2b85c65234e0dcdd3fcce4dafbe16933b7f1b48
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 HslCommunication.WebSocket;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using WIDESEA_Core;
using WIDESEA_DTO.Basic;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_IBasicInfoService;
using WIDESEAWCS_Model.Models;
 
namespace WIDESEA_WMSServer.Controllers.Basic
{
    /// <summary>
    /// 货位
    /// </summary>
    [Route("api/LocationInfo")]
    [ApiController]
    public class LocationInfoController : ApiBaseController<ILocationInfoService, Dt_LocationInfo>
    {
        private readonly ILocationInfoRepository _repository;
        public LocationInfoController(ILocationInfoService service, ILocationInfoRepository repository) : base(service)
        {
            _repository = repository;
        }
 
        /// <summary>
        /// 货位分配
        /// </summary>
        /// <param name="roadwayNo"></param>
        /// <param name="palletType"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("AssignLocation"), AllowAnonymous]
        public Dt_LocationInfo? AssignLocation()
        {
            return Service.AssignLocation();
        }
 
        /// <summary>
        /// 初始化货位
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("InitializationLocation"), AllowAnonymous]
        public WebResponseContent InitializationLocation([FromBody] InitializationLocationDTO initializationLocationDTO)
        {
            return Service.InitializationLocation(initializationLocationDTO);
        }
        /// <summary>
        /// 启用货位
        /// </summary>
        /// <param name="keys"></param>
        /// <returns></returns>
        [HttpPost, Route("LocationEnableStatus")]
        public WebResponseContent LocationEnableStatus([FromBody] int[] keys)
        {
            return Service.LocationEnableStatus(keys); ;
        }
 
        /// <summary>
        /// 禁用货位
        /// </summary>
        /// <param name="keys"></param>
        /// <returns></returns>
        [HttpPost, Route("LocationDisableStatus")]
        public WebResponseContent LocationDisableStatus([FromBody] int[] keys)
        {
            return Service.LocationDisableStatus(keys); ;
        }
 
    }
}