BoxBatchOutController.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using Microsoft.AspNetCore.Mvc;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. using XYY.Core.Standard.Mvc;
  7. using XYY.Model.Standard.Channel;
  8. using XYY.Service.Standard.Channel;
  9. using XYY.Service.Standard.Order;
  10. namespace XYY.Api.Order.Controllers
  11. {
  12. [Route("api/[controller]/[action]")]
  13. [ApiController]
  14. public class BoxBatchOutController : ApiControllerBase
  15. {
  16. IBoxService _boxService;
  17. IChannelService _channelService;
  18. public BoxBatchOutController(IBoxService boxService, IChannelService channelService)
  19. {
  20. _boxService = boxService;
  21. _channelService = channelService;
  22. }
  23. public async Task<ApiJsonModel<Logistics_BoxOutBatch>> Scan(string boxNumber, string channelName)
  24. {
  25. var model = await _boxService.Scan(boxNumber, channelName);
  26. return ApiJsonModel<Logistics_BoxOutBatch>.OK(model);
  27. }
  28. public async Task<ApiJsonModel<Logistics_BoxOutBatch>> CanScan(string boxNumber)
  29. {
  30. var model = await _boxService.CanScan(boxNumber);
  31. return ApiJsonModel<Logistics_BoxOutBatch>.OK(model);
  32. }
  33. public async Task<ApiJsonModel<Logistics_BoxOutBatch>> GetLastScanBatch()
  34. {
  35. var model = await _boxService.GetLastScanBatch();
  36. return ApiJsonModel<Logistics_BoxOutBatch>.OK(model);
  37. }
  38. public async Task<ApiJsonModel> CreateBZB(BZBBoxInfo boxInfo)
  39. {
  40. await _boxService.SetYPDJ(boxInfo);
  41. return ApiJsonModel.OK();
  42. }
  43. public async Task<ApiJsonModel> EndScan()
  44. {
  45. await _boxService.EndScan();
  46. return ApiJsonModel.OK();
  47. }
  48. }
  49. }