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
{
///
/// 货位
///
[Route("api/LocationInfo")]
[ApiController]
public class LocationInfoController : ApiBaseController
{
private readonly ILocationInfoRepository _repository;
public LocationInfoController(ILocationInfoService service, ILocationInfoRepository repository) : base(service)
{
_repository = repository;
}
///
/// 货位分配
///
///
///
///
[HttpPost, HttpGet, Route("AssignLocation"), AllowAnonymous]
public Dt_LocationInfo? AssignLocation()
{
return Service.AssignLocation();
}
///
/// 初始化货位
///
///
[HttpPost, Route("InitializationLocation"), AllowAnonymous]
public WebResponseContent InitializationLocation([FromBody] InitializationLocationDTO initializationLocationDTO)
{
return Service.InitializationLocation(initializationLocationDTO);
}
///
/// 启用货位
///
///
///
[HttpPost, Route("LocationEnableStatus")]
public WebResponseContent LocationEnableStatus([FromBody] int[] keys)
{
return Service.LocationEnableStatus(keys); ;
}
///
/// 禁用货位
///
///
///
[HttpPost, Route("LocationDisableStatus")]
public WebResponseContent LocationDisableStatus([FromBody] int[] keys)
{
return Service.LocationDisableStatus(keys); ;
}
}
}