using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Estsh.Web.Util;
using System.Collections;
using Estsh.Web.Service;
/***************************************************************************************************
*
* 作者:贾文涛
* 创建时间:2014.07.8
* 描述:目视单打印模块控制类
* 修改日志:
*
* *************************************************************************************************/
namespace Estsh.Core.Web.Controllers
{
///
/// 目视单打印模块的控制类
///
public class InspPrintController : Controller
{
private InspPrintService service = new InspPrintService();
public ActionResult Index()
{
return View();
}
#region 目视单打印
///
/// 获取JIT生产列表
///
///
///
///
///
///
public ActionResult getJitListByPage(String startCarNo, String endCarNo, Pager pager, String direction, String sort)
{
Hashtable requestHt = new Hashtable();
requestHt.Add("@startCarNo", startCarNo);
requestHt.Add("@endCarNo", endCarNo);
Hashtable result = new Hashtable();
result.Add("pager.pageNo", pager.pageNo);
Hashtable dataHt = this.service.getJitListByPage(requestHt, pager, direction, sort, true);
result.Add("rows", dataHt["dataList"]);
result.Add("sort", sort);
result.Add("direction", direction);
return Json(result);
}
///
/// 获取备料列表
///
///
///
///
///
///
public ActionResult getPartBakListByPage(String startCarNo, String endCarNo, Pager pager, String direction, String sort)
{
Hashtable requestHt = new Hashtable();
requestHt.Add("@startCarNo", startCarNo);
requestHt.Add("@endCarNo", endCarNo);
Hashtable result = new Hashtable();
result.Add("pager.pageNo", pager.pageNo);
Hashtable dataHt = this.service.getJitListByPage(requestHt, pager, direction, sort, false);
result.Add("rows", dataHt["dataList"]);
result.Add("sort", sort);
result.Add("direction", direction);
return Json(result);
}
///
/// 更新打印数据
///
///
///
public ActionResult updatePrintData(String ids)
{
int delCount = 0;
try
{
delCount = this.service.updatePrintData(ids);
}
catch (Exception e)
{
delCount = -1;
}
Hashtable result = new Hashtable();
result.Add("status", delCount);
return Json(result);
}
#endregion
}
}