| | |
| | | using System.IO; |
| | | using WIDESEA_Model.Models; |
| | | using System; |
| | | using WIDESEA_StorageSocketServices; |
| | | using WIDESEAWCS_BasicInfoRepository; |
| | | using WIDESEAWCS_BasicInfoService; |
| | | using WIDESEA_DTO.WMS; |
| | | using WIDESEA_IBusinessServices; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers |
| | | { |
| | |
| | | public class PDAController : Controller |
| | | { |
| | | |
| | | public PDAController() |
| | | private readonly IHttpContextAccessor _httpContextAccessor; |
| | | private readonly IDt_StationManagerService StationManager; |
| | | private readonly IDt_HandAutomaticService _handAutomaticService; |
| | | private readonly IDt_TaskService _taskService; |
| | | private readonly ILogger<SocketClientService> _logger; |
| | | public SocketClientService _Socketservice { get; set; } |
| | | |
| | | public PDAController(IHttpContextAccessor httpContextAccessor, SocketClientService socketClientService, IDt_StationManagerService dt_StationManager, IDt_TaskService taskService, ILogger<SocketClientService> logger,IDt_HandAutomaticService handAutomaticService) |
| | | { |
| | | |
| | | _httpContextAccessor = httpContextAccessor; |
| | | _Socketservice = socketClientService; |
| | | StationManager = dt_StationManager; |
| | | _taskService = taskService; |
| | | _logger = logger; |
| | | _handAutomaticService = handAutomaticService; |
| | | } |
| | | /// <summary> |
| | | /// æ¯å¦å¨çº¿ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("Socketonline"), AllowAnonymous] |
| | | public bool Socketonline() |
| | | { |
| | | return _Socketservice.Socketonline(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åç«å°ç¶æ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("GetStationStatus"), AllowAnonymous] |
| | | public WebResponseContent GetStationStatus() |
| | | { |
| | | return StationManager.GetStationStatus(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
¥åº |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("InboundTask"), AllowAnonymous] |
| | | public WebResponseContent InboundTask([FromBody]TaskDTO taskDTO) |
| | | { |
| | | return _taskService.InboundTask(taskDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ½æ£å
¥åº |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("SamplingInboundTask"), AllowAnonymous] |
| | | public WebResponseContent SamplingInboundTask([FromBody] TaskDTO taskDTO) |
| | | { |
| | | return _taskService.SamplingInboundTask(taskDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åºåº |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("OutboundTask"), AllowAnonymous] |
| | | public WebResponseContent OutboundTask([FromBody] TaskDTO taskDTO) |
| | | { |
| | | return _taskService.OutboundTask(taskDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ½æ£åºåº |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("SamplingOutboundTask"), AllowAnonymous] |
| | | public WebResponseContent SamplingOutboundTask([FromBody] TaskDTO taskDTO) |
| | | { |
| | | return _taskService.SamplingOutboundTask(taskDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æèªå¨åæ¢ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("GetAutoStatus"), AllowAnonymous] |
| | | public bool GetAutoStatus() |
| | | { |
| | | return _handAutomaticService.GetAutoStatus(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æèªå¨åæ¢ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("AutoStatus"), AllowAnonymous] |
| | | public WebResponseContent AutoStatus(string auto) |
| | | { |
| | | return _handAutomaticService.AutoStatus(auto); |
| | | } |
| | | |
| | | [HttpPost, HttpGet, Route("UploadApp"), AllowAnonymous] |