1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using Microsoft.AspNetCore.Mvc;
- using Newtonsoft.Json;
- using WMS.BZModels;
- using WMS.BZModels.Dto.CP.WeighingResult;
- using WMS.BZServices.CP;
- using WMS.Info;
- using WMS.Util;
- namespace WMS.BZWeb.Areas.CPManager.Controllers
- {
- [Area("CPManager")]
- public class WeighingResultController : MvcControllerBase
- {
- private readonly WeighingResultService _syscon;
- public WeighingResultController(WeighingResultService syscon)
- {
- _syscon = syscon;
- }
- public IActionResult Index()
- {
- return View();
- }
- public IActionResult TunnelIndex()
- {
- //ViewBag.HJWCSWebAPIUrl = ConfigHelper.GetConfig().HJWCSWebAPIUrl;
- return View();
- }
- public IActionResult OutInPationIndex()
- {
- return View();
- }
- public ActionResult Form()
- {
- return View();
- }
- public IActionResult StartIndex()
- {
- return View();
- }
- public IActionResult StopIndex()
- {
- return View();
- }
- public IActionResult BoxBingIndex()
- {
- ViewBag.CPWMSWebAPIUrl = ConfigHelper.GetConfig().CPWMSWebAPIUrl;
- return View();
- }
- public ActionResult GetPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = InitPagination(pagination);
- var query = new WeighingResultQueryDto();
- if (!string.IsNullOrEmpty(queryJson))
- {
- query = JsonConvert.DeserializeObject<WeighingResultQueryDto>(queryJson);
- }
- var lists = _syscon.GetPageList(paginationobj, query ?? new WeighingResultQueryDto());
- var jsonData = new
- {
- rows = lists.Result,
- total = lists.TotalPage,
- page = lists.PageIndex,
- records = lists.TotalNum
- };
- return Success(jsonData);
- }
- public ActionResult GetIsOutOfTolerance(string pagination, string queryJson)
- {
- var jsonData = new List<EnumEntity>()
- {
- new EnumEntity(){ id=1,text="超限" },
- new EnumEntity(){ id=2,text="未超限" }
- };
- return Success(jsonData);
- }
- }
- }
|