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.Channel; using XYY.Service.Standard.Channel; using XYY.Service.Standard.Order; namespace XYY.Api.Order.Controllers { [Route("api/[controller]/[action]")] [ApiController] public class BoxBatchOutController : ApiControllerBase { IBoxService _boxService; IChannelService _channelService; public BoxBatchOutController(IBoxService boxService, IChannelService channelService) { _boxService = boxService; _channelService = channelService; } public async Task> Scan(string boxNumber, string channelName) { var model = await _boxService.Scan(boxNumber, channelName); return ApiJsonModel.OK(model); } public async Task> CanScan(string boxNumber) { var model = await _boxService.CanScan(boxNumber); return ApiJsonModel.OK(model); } public async Task> GetLastScanBatch() { var model = await _boxService.GetLastScanBatch(); return ApiJsonModel.OK(model); } public async Task CreateBZB(BZBBoxInfo boxInfo) { await _boxService.SetYPDJ(boxInfo); return ApiJsonModel.OK(); } public async Task EndScan() { await _boxService.EndScan(); return ApiJsonModel.OK(); } } }