1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using Microsoft.AspNetCore.Mvc;
- using Newtonsoft.Json;
- using wms.sqlsugar.model.pt;
- using WMS.BZModels.Dto.PT.BaseMatinfoDtos;
- using WMS.BZServices.PT;
- using WMS.Info;
- namespace WMS.BZWeb.Areas.PTManager.Controllers
- {
- [Area("PTManager")]
- public class MesInfoController : MvcControllerBase
- {
- private readonly BillmesinfoService _billmesinfoService ;
- public MesInfoController(BillmesinfoService billmesinfoService)
- {
- _billmesinfoService = billmesinfoService;
- }
- #region 视图功能
- public IActionResult Index()
- {
- return View();
- }
- public IActionResult Form()
- {
- return View();
- }
- #endregion
- public ActionResult GetPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = InitPagination(pagination);
- var query = new MesInfoQueryDto();
- if (!string.IsNullOrEmpty(queryJson))
- {
- query = JsonConvert.DeserializeObject<MesInfoQueryDto>(queryJson);
- }
- var lists = _billmesinfoService.GetMesInfoList(paginationobj, query ?? new MesInfoQueryDto());
- var jsonData = new
- {
- rows = lists.Result,
- total = lists.TotalPage,
- page = lists.PageIndex,
- records = lists.TotalNum
- };
- return Success(jsonData);
- }
- [HttpPost]
- public ActionResult SaveForm(string keyValue, BillMesmiddle Data)
- {
- LoginUserInfo LoginUser = GetLoginUser();
- _billmesinfoService.Save(LoginUser, keyValue, Data);
- return Success("保存成功。");
- }
- }
- }
|