Files
ww-jst/wmsjst/JSMachine.WMS.WebHost/Controllers/ElevatorQueController.cs
T
2026-09-02 16:31:50 +08:00

36 lines
1.1 KiB
C#

using JSMachine.WMS.App.Dto;
using JSMachine.WMS.App.IService;
using JSMachine.WMS.App.ServiceImpl;
using JSMachine.WMS.Domain.Entity;
using JSMachine.WMS.RPC.ErpRPC.Dto.Out;
using Microsoft.AspNetCore.Mvc;
using Org.BouncyCastle.Crypto;
namespace JSMachine.WMS.WebHost.Controllers
{
[Route("api/[controller]/[action]")]
public class ElevatorQueController : ControllerBase
{
private IElevatorPlcQueueService _elevatorPlcQueueService;
public ElevatorQueController(IElevatorPlcQueueService elevatorPlcQueueService)
{
_elevatorPlcQueueService = elevatorPlcQueueService;
}
[HttpGet]
public async Task<ApiResult<List<ElevatorPlcQueueDto>>> GetElevatorQueToday()
{
List<ElevatorPlcQueueDto> elevatorPlcQueues = await _elevatorPlcQueueService.GetListByExpression(p =>
p.CreationTime >= DateTime.Now.Date &&
(p.ElevatorChannel == 1001 || p.ElevatorChannel == 1011));
return new ApiResult<List<ElevatorPlcQueueDto>>
{
ResultCode = "200",
Data = elevatorPlcQueues
};
}
}
}