PalletLayerMathController.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using Microsoft.AspNetCore.Mvc;
  2. using Newtonsoft.Json;
  3. using WMS.BZModels.Dto.SX.BillPboxruleDtos;
  4. using WMS.BZModels.Dto.SX.PalletizingDtos;
  5. using WMS.BZServices.SX;
  6. using WMS.Info;
  7. using WMS.Util;
  8. namespace WMS.BZWeb.Areas.SXManager.Controllers
  9. {
  10. [Area("SXManager")]
  11. public class PalletLayerMathController : MvcControllerBase
  12. {
  13. private readonly PalletlayermathService _PalletlayermathService;
  14. public PalletLayerMathController(PalletlayermathService palletlayermathService)
  15. {
  16. _PalletlayermathService = palletlayermathService;
  17. }
  18. #region 视图功能
  19. public IActionResult Index()
  20. {
  21. ViewBag.SXWMSWebAPIUrl = ConfigHelper.GetConfig().SXWMSWebAPIUrl;
  22. return View();
  23. }
  24. #endregion
  25. public ActionResult GetPageList(string pagination, string queryJson)
  26. {
  27. Pagination paginationobj = InitPagination(pagination);
  28. var query = new PalletlayermathQueryDto();
  29. if (!string.IsNullOrEmpty(queryJson))
  30. {
  31. query = JsonConvert.DeserializeObject<PalletlayermathQueryDto>(queryJson);
  32. }
  33. var lists = _PalletlayermathService.GetPageList(paginationobj, query ?? new PalletlayermathQueryDto());
  34. var jsonData = new
  35. {
  36. rows = lists.Result,
  37. total = lists.TotalPage,
  38. page = lists.PageIndex,
  39. records = lists.TotalNum
  40. };
  41. return Success(jsonData);
  42. }
  43. }
  44. }