using Microsoft.AspNetCore.Mvc;
using WmsMobileServe.ApiServe.Mobile.Dto;
using WmsMobileServe.ApiServe.Mobile.Service;
using WmsMobileServe.ApiServe.Mobile.Vo;
using WmsMobileServe.DataBase.Base.Po;

namespace WmsMobileServe.ApiServe.Mobile.Controllers;

// 拣货专用控制器

[Route("api/mobile/pick")]
[ApiController]
public class PickController(PickService pickService) : ControllerBase
{


    /// <summary>
    /// 获取拣货任务
    /// </summary>
    /// <param name="vehicleNo"></param>
    /// <returns></returns>
    [HttpGet("getPickTask")]
    public MobileApiResponse<List<TPickGoods>> GetPickTask([FromQuery] string? vehicleNo) => pickService.GetPickTask(vehicleNo);

    /// <summary>
    /// 拣货完成
    /// </summary>
    /// <param name="request"></param>
    /// <returns></returns>
    [HttpPost("pickComplete")]
    public MobileApiResponse PickComplete([FromBody] List<PickCompleteDto> request) => pickService.PickComplete(request);


}
