using System.Collections;
using Microsoft.AspNetCore.Mvc;
using Estsh.Core.Services.IServices;
using Estsh.Core.Model.Result;
using Estsh.Core.Controllers;
using Estsh.Core.Util;
/***************************************************************************************************
*
* 更新人:sitong.dong
* 描述:收货查询补打
* 修改时间:2022.06.22
* 修改日志:系统迭代升级
*
**************************************************************************************************/
namespace Estsh.Core.Web.Controllers
{
///
/// 收货查询补打模块的控制类
///
public class ROSerchPrintController : BaseController
{
private IROSerchPrintService service;
private ICommonService commonService;
public ROSerchPrintController(IROSerchPrintService _service, ICommonService _commonService)
{
service = _service;
this.commonService = _commonService;
}
public ActionResult Index()
{
return View();
}
#region 收货查询补打
///
/// 根据分页条件获取用户列表
///
///
///
///
///
///
public ActionResult getListByPage(String orderNo, String status, String startDate, String endDate, String startCartonNo,
String endCartonNo, String locateName, Pager pager, String direction, String sort)
{
Hashtable requestHt = new Hashtable();
requestHt.Add("orderNo", orderNo);
requestHt.Add("status", status);
requestHt.Add("startDate", startDate);
requestHt.Add("endDate", endDate);
requestHt.Add("startCartonNo", startCartonNo);
requestHt.Add("endCartonNo", endCartonNo);
requestHt.Add("locateName", locateName);
Hashtable result = new Hashtable();
result.Add("pager.pageNo", pager.pageNo);
Hashtable dataHt = this.service.getListByPage(requestHt, pager, direction, sort);
result.Add("rows", dataHt["dataList"]);
result.Add("pager.totalRows", dataHt["totalCount"]);
result.Add("sort", sort);
result.Add("direction", direction);
return Json(result);
}
///
/// 获取库存状态列表
///
///
public ActionResult getStockStatus()
{
Hashtable result = new Hashtable();
List list = commonService.GetSysEnum("sys_stock_status");
result.Add("list", list);
return Json(result);
}
///
/// 获取库位列表
///
///
public ActionResult getLocateList()
{
Hashtable result = new Hashtable();
List list = this.service.getLocateList();
result.Add("list", list);
return Json(result);
}
///
/// 打印
///
///
///
public ActionResult print(String ids)
{
String message = "";
try
{
message = this.service.print(ids);
}
catch (Exception e)
{
message = "Controller:" + e.Message;
}
Hashtable result = new Hashtable();
result.Add("status", message);
return Json(result);
}
#endregion
}
}