You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.9 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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
{
/// <summary>
/// 收货查询补打模块的控制类
/// </summary>
public class StockBarcodePrintController : BaseController
{
private IStockBarcodePrintService service;
private ICommonService commonService;
public StockBarcodePrintController(IStockBarcodePrintService _service, ICommonService _commonService)
{
service = _service;
this.commonService = _commonService;
}
public ActionResult Index()
{
return View();
}
#region 收货查询补打
/// <summary>
/// 根据分页条件获取用户列表
/// </summary>
/// <param name="account"></param>
/// <param name="pager"></param>
/// <param name="direction"></param>
/// <param name="sort"></param>
/// <returns></returns>
public ActionResult getListByPage(string cartonNo, string refOrderNo, string status, string lotno, string locateId, string zoneId, string beginCreateTime, string endCreateTime,
Pager pager, String direction, String sort)
{
int factoryId = CurrentEmp.FactoryId;
Hashtable result = new Hashtable();
result.Add("pager.pageNo", pager.pageNo);
Hashtable dataHt = this.service.getListByPage(cartonNo, refOrderNo, status,lotno, locateId, zoneId, beginCreateTime, endCreateTime, factoryId, 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);
}
/// <summary>
/// 获取库存状态列表
/// </summary>
/// <returns></returns>
public ActionResult getStockStatus()
{
Hashtable result = new Hashtable();
List<KeyValueResult> list = commonService.GetSysEnum("sys_stock_status");
result.Add("list", list);
return Json(result);
}
/// <summary>
/// 获取库位列表
/// </summary>
/// <returns></returns>
public ActionResult getLocateList()
{
Hashtable result = new Hashtable();
List<KeyValueResult> list = this.service.getLocateList();
result.Add("list", list);
return Json(result);
}
/// <summary>
/// 获取库区列表
/// </summary>
/// <returns></returns>
public ActionResult getZoneList()
{
Hashtable result = new Hashtable();
List<KeyValueResult> list = this.service.getZoneList();
result.Add("list", list);
return Json(result);
}
/// <summary>
/// 打印
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
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
}
}