对比新文件 |
| | |
| | | 锘縰sing Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.Collections.Generic; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Basic |
| | | { |
| | | [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; |
| | | } |
| | | |
| | | [HttpPost, Route("InitializationLocation")] |
| | | public WebResponseContent InitializationLocation([FromBody] InitializationLocationDTO initializationLocationDTO) |
| | | { |
| | | return Service.InitializationLocation(initializationLocationDTO); |
| | | } |
| | | |
| | | [HttpPost, Route("AdjacentDepthLocation"), AllowAnonymous] |
| | | public Dt_LocationInfo AdjacentDepthLocation(string locationCode) |
| | | { |
| | | return Service.AdjacentDepthLocation(locationCode); |
| | | } |
| | | |
| | | [HttpPost, Route("GetAllLocationGroups"), AllowAnonymous] |
| | | public List<LocationGroupDTO> GetAllLocationGroups(string roadway) |
| | | { |
| | | List<LocationGroupDTO> locations = _repository.GetAllLocationGroups(roadway); |
| | | return locations; |
| | | } |
| | | |
| | | [HttpPost, Route("GetLocationGroups"), AllowAnonymous] |
| | | public List<LocationGroupDTO> GetLocationGroups(string roadway, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus) |
| | | { |
| | | List<LocationGroupDTO> locations = _repository.GetLocationGroups(roadway, locationAStatus, locationBStatus); |
| | | return locations; |
| | | } |
| | | [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); ; |
| | | } |
| | | } |
| | | } |