|  |  | 
 |  |  | using Microsoft.AspNetCore.Authorization; | 
 |  |  | using HslCommunication.WebSocket; | 
 |  |  | using Microsoft.AspNetCore.Authorization; | 
 |  |  | using Microsoft.AspNetCore.Http; | 
 |  |  | using Microsoft.AspNetCore.Mvc; | 
 |  |  | using System.Collections.Generic; | 
 |  |  | using WIDESEA_Common.CommonEnum; | 
 |  |  | using WIDESEA_Common.LocationEnum; | 
 |  |  | using WIDESEA_Core; | 
 |  |  | using WIDESEA_Core.BaseController; | 
 |  |  | using WIDESEA_Core.Enums; | 
 |  |  | 
 |  |  |  | 
 |  |  | namespace WIDESEA_WMSServer.Controllers.Basic | 
 |  |  | { | 
 |  |  |     /// <summary> | 
 |  |  |     /// è´§ä½ | 
 |  |  |     /// </summary> | 
 |  |  |     [Route("api/LocationInfo")] | 
 |  |  |     [ApiController] | 
 |  |  |     public class LocationInfoController : ApiBaseController<ILocationInfoService, Dt_LocationInfo> | 
 |  |  | 
 |  |  |             _repository = repository; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// è·åæ§WMSç³»ç»è¾
æä»åºå | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [HttpPost, Route("GetContainerInfo"), AllowAnonymous] | 
 |  |  |         public WebResponseContent GetContainerInfo() | 
 |  |  |         { | 
 |  |  |             return Service.GetContainerInfo(); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// åå§åè´§ä½ | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="initializationLocationDTO"></param> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [HttpPost, Route("InitializationLocation"), AllowAnonymous] | 
 |  |  |         public WebResponseContent InitializationLocation([FromBody] InitializationLocationDTO initializationLocationDTO) | 
 |  |  |         { | 
 |  |  |             return Service.InitializationLocation(initializationLocationDTO); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// è´§ä½åé
 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="roadwayNo"></param> | 
 |  |  |         /// <param name="palletType"></param> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [HttpPost, HttpGet, Route("AssignLocation"), AllowAnonymous] | 
 |  |  |         public Dt_LocationInfo? AssignLocation(string roadwayNo, PalletTypeEnum palletType) | 
 |  |  |         public Dt_LocationInfo? AssignLocation(string roadwayNo, int palletType, int warehouseId) | 
 |  |  |         { | 
 |  |  |             return Service.AssignLocation(roadwayNo, palletType); | 
 |  |  |             return Service.AssignLocation(roadwayNo, palletType, warehouseId); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <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); ; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         [HttpPost, Route("UpdateLocationStatus"), AllowAnonymous] | 
 |  |  |         public WebResponseContent UpdateLocationStatus(string locationCode, int palletType, LocationStatusEnum locationStatus, int warehousId) | 
 |  |  |         { | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 Service.UpdateLocationStatus(locationCode, palletType, locationStatus, warehousId); | 
 |  |  |                 return WebResponseContent.Instance.OK(); | 
 |  |  |             } | 
 |  |  |             catch (Exception e) | 
 |  |  |             { | 
 |  |  |                 return WebResponseContent.Instance.Error(e.Message); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  | } |