using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using XYY.Core.Standard.Mvc;
using XYY.Model.Standard.Order;
using XYY.Service.Standard.Order;

namespace XYY.Api.Order.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class LabelSysController : ApiControllerBase
    {
        IOrderService _orderService;
        public LabelSysController(IOrderService orderService)
        {
            _orderService = orderService;
        }

        [ActionName("GetWaitDownFile")]
        public async Task<IActionResult> GetWaitDownFile(int qty = 200)
        {
            var data = await _orderService.GetWaitDownFile(qty);
            return Ok(data);
        }

        [ActionName("UpdateDownFile")]
        public async Task<IActionResult> UpdateDownFile(Dto dto)
        {
            await _orderService.UpdateDownFile(dto.Data);
            return Ok();
        }

        public class Dto
        {
            public List<SysWarehouseFileLog> Data { get; set; }
        }

    }
}
