30 lines
948 B
C#
30 lines
948 B
C#
using JSMachine.WMS.App.Dto;
|
|||
|
|
using JSMachine.WMS.App.IService;
|
||
|
|
using JSMachine.WMS.RPC.ErpRPC.Dto.Out;
|
||
|
|
using Microsoft.AspNetCore.Mvc;
|
||
|
|
|
||
|
|
namespace JSMachine.WMS.WebHost.Controllers
|
||
|
|
{
|
||
|
|
[Route("api/[controller]/[action]")]
|
||
|
|
public class ElevatorCountController : ControllerBase
|
||
|
|
{
|
||
|
|
private IElevatorCountService _elevatorCountService;
|
||
|
|
public ElevatorCountController(IElevatorCountService elevatorCountService)
|
||
|
|
{
|
||
|
|
_elevatorCountService = elevatorCountService;
|
||
|
|
}
|
||
|
|
|
||
|
|
[HttpGet]
|
||
|
|
public async Task<ApiResult<List<ElevatorCountDto>>> GetElevatorCountToday()
|
||
|
|
{
|
||
|
|
List<ElevatorCountDto> elevatorCounts = await _elevatorCountService.GetListByExpression(p => p.CreationTime >= DateTime.Now.Date);
|
||
|
|
|
||
|
|
return new ApiResult<List<ElevatorCountDto>>
|
||
|
|
{
|
||
|
|
ResultCode = "200",
|
||
|
|
Data = elevatorCounts
|
||
|
|
};
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|