1
huanghongfeng
2024-10-31 47f3edac31e999a919f34968d56271c8f425cddc
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
using 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(int[] keys)
        {
            return Service.LocationEnableStatus(keys); ;
        }
        [HttpPost, Route("LocationDisableStatus")]
        public WebResponseContent LocationDisableStatus(int[] keys)
        {
            return Service.LocationDisableStatus(keys); ;
        }
    }
}