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.

103 lines
3.3 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;
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
{
/// <summary>
/// 目视单打印模块的控制类
/// </summary>
public class InspPrintController : Controller
{
private InspPrintService service = new InspPrintService();
public ActionResult Index()
{
return View();
}
#region 目视单打印
/// <summary>
/// 获取JIT生产列表
/// </summary>
/// <param name="account"></param>
/// <param name="pager"></param>
/// <param name="direction"></param>
/// <param name="sort"></param>
/// <returns></returns>
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);
}
/// <summary>
/// 获取备料列表
/// </summary>
/// <param name="account"></param>
/// <param name="pager"></param>
/// <param name="direction"></param>
/// <param name="sort"></param>
/// <returns></returns>
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);
}
/// <summary>
/// 更新打印数据
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
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
}
}