using System.Collections;
using Aspose.Cells;
using Microsoft.AspNetCore.Mvc;
using Estsh.Core.Services.IServices;
using Estsh.Core.Model.Result;
using Estsh.Core.Models;
using System.Text.Json;
using Estsh.Core.Controllers;
using Estsh.Core.Util;
/***************************************************************************************************
*
* 更新人:sitong.dong
* 描述:生成盘点单
* 修改时间:2022.06.22
* 修改日志:系统迭代升级
*
**************************************************************************************************/
namespace Estsh.Core.Web.Controllers
{
///
/// 盘点单生产
///
public class CheckOrderCreateController :BaseController
{
private ICheckOrderCreateService service;
public CheckOrderCreateController(ICheckOrderCreateService _service)
{
this.service = _service;
}
//
// GET: /CheckOrderCreate/
public ActionResult Index()
{
return View();
}
///
/// 获取生成盘点单列表数据
///
/// 菜单名称
/// 分页
/// 排序方式
/// 排序列
///
public ActionResult getCheckOrderCreateListByPage(Pager pager, String direction, String sort, string cbChkCommand)
{
if ((string.IsNullOrEmpty(cbChkCommand)) || cbChkCommand == "null")
{
return Json("");
}
Hashtable result = new Hashtable();
result.Add("pager.pageNo", pager.pageNo);
Hashtable dataHt = this.service.getCheckOrderCreateListByPage( cbChkCommand);
result.Add("rows", dataHt["dataList"]);
result.Add("pager.totalRows", dataHt["totalCount"]);
result.Add("sort", sort);
result.Add("direction", direction);
return Json(result);
}
///
///盘点单集合
///
/// 数据集
public ActionResult GetChkCommandList()
{
Hashtable resault = new Hashtable();
List list = service.GetChkCommandList();
resault.Add("list", list);
return Json(resault);
}
///
/// 盘点单生成
///
///
///
public ActionResult CreateChkNo(string cbChkCommand)
{
Hashtable resault = new Hashtable();
string userId = CurrentEmp.EmpId.ToString();
List list = service.CreateChkNo(cbChkCommand, userId);
string message = list[0].r_msg;
resault.Add("message", message);
return Json(resault);
}
}
}