1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using Microsoft.AspNetCore.Mvc;
- using Newtonsoft.Json;
- using WMS.BZModels.Dto.PT.PushInfoDtos;
- using WMS.BZServices.PT;
- using WMS.Info;
- using WMS.Util;
- namespace WMS.BZWeb.Areas.PTManager.Controllers
- {
- [Area("PTManager")]
- public class PushinfoController : MvcControllerBase
- {
- private readonly PushInfoService _pushInfoService;
- public PushinfoController(PushInfoService pushInfoService)
- {
- _pushInfoService = pushInfoService;
- }
- public IActionResult Index()
- {
- ViewBag.PTWMSWebAPIUrl = ConfigHelper.GetConfig().PTWMSWebAPIUrl;
- return View();
- }
- public ActionResult GetPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = InitPagination(pagination);
- var query = new PushInfoQueryDto();
- if (!string.IsNullOrEmpty(queryJson))
- {
- query = JsonConvert.DeserializeObject<PushInfoQueryDto>(queryJson);
- }
- var lists = _pushInfoService.GetPageList(paginationobj, query ?? new PushInfoQueryDto());
- var jsonData = new
- {
- rows = lists.Result,
- total = lists.TotalPage,
- page = lists.PageIndex,
- records = lists.TotalNum
- };
- return Success(jsonData);
- }
- }
- }
|