1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using Microsoft.AspNetCore.Mvc;
- using Newtonsoft.Json;
- using WMS.BZModels.Dto.PT.BarcodeDtos;
- using WMS.BZServices.PT;
- using WMS.Info;
- namespace WMS.BZWeb.Areas.PTManager.Controllers
- {
- [Area("PTManager")]
- public class BarCodeController : MvcControllerBase
- {
- private readonly barCodeInfoService _barCodeInfoService;
- public BarCodeController(barCodeInfoService barCodeInfoService)
- {
- _barCodeInfoService = barCodeInfoService;
- }
- public IActionResult Index()
- {
- return View();
- }
- public ActionResult GetPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = InitPagination(pagination);
- var query = new BarcodeQueryDto();
- if (!string.IsNullOrEmpty(queryJson))
- {
- query = JsonConvert.DeserializeObject<BarcodeQueryDto>(queryJson);
- }
- var lists = _barCodeInfoService.GetPageList(paginationobj, query ?? new BarcodeQueryDto());
- var jsonData = new
- {
- rows = lists.Result,
- total = lists.TotalPage,
- page = lists.PageIndex,
- records = lists.TotalNum
- };
- return Success(jsonData);
- }
- }
- }
|