using iWareCommon.Common.Entity;
|
using iWareDataCore.BASE.EnumType;
|
using iWareDataCore.BASE.Service;
|
using iWareDataCore.TASK.Entity;
|
using iWareDataCore.TASK.Service;
|
using iWarePod.Cache.Entity;
|
using iWarePod.Properties;
|
using Newtonsoft.Json;
|
using System.Collections.Generic;
|
using System.IO;
|
using System.Text;
|
using System.Web.Mvc;
|
using System.Web.Script.Serialization;
|
|
namespace iWarePod.Controllers
|
{
|
public class HomeController : Controller
|
{
|
//
|
// GET: /Home/
|
|
public ActionResult Index()
|
{
|
return View();
|
}
|
|
///// <summary>
|
///// 获取心跳信息
|
///// </summary>
|
///// <returns></returns>
|
//[HttpPost]
|
//public ActionResult GetHeartBeatInfo()
|
//{
|
// string msg;
|
// return Json(new { Result = CacheEntity.ControlCenterWcfServiceClient.GetHeartBeatInfo(out msg), Message = msg },JsonRequestBehavior.DenyGet);
|
//}
|
|
/// <summary>
|
/// 获取库位预览信息
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost]
|
public ActionResult GetPlacePreview()
|
{
|
|
string msg;
|
var result = PlaceMaterialViewService.GetInstance().GetPlacePreview(out msg);
|
return Json(new
|
{
|
Result = result,
|
Message = msg
|
}, JsonRequestBehavior.DenyGet);
|
}
|
|
/// <summary>
|
/// 获取库位统计信息
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost]
|
public ActionResult GetPlaceStatusNum()
|
{
|
string msg;
|
return Json(new { Result = PlaceMaterialViewService.GetInstance().GetPlaceStatusNum(out msg), Message = msg }, JsonRequestBehavior.DenyGet);
|
}
|
|
[HttpPost]
|
public ActionResult GetIsAutoMode()
|
{
|
return Json(new { Result = CacheEntity.ControlCenterWcfServiceClient.GetIsAutoMode() });
|
}
|
|
|
[HttpPost]
|
public ActionResult SetIsAutoMode(bool flag)
|
{
|
CacheEntity.ControlCenterWcfServiceClient.SetIsAutoMode(flag);
|
return Json(new { Result = "ok" });
|
}
|
|
[HttpPost]
|
public ActionResult GetIsAutoHandle()
|
{
|
return Json(new { Result = CacheEntity.ControlCenterWcfServiceClient.GetIsAutoHandle() });
|
}
|
|
|
[HttpPost]
|
public ActionResult SetIsAutoHandle(bool flag)
|
{
|
CacheEntity.ControlCenterWcfServiceClient.SetIsAutoHandle(flag);
|
return Json(new { Result = "ok" });
|
}
|
|
[HttpPost]
|
public ActionResult GetIsAutoRun()
|
{
|
return Json(new { Result = CacheEntity.ControlCenterWcfServiceClient.GetIsAutoRun() });
|
}
|
|
[HttpPost]
|
public ActionResult SetIsAutoRun(bool flag)
|
{
|
CacheEntity.ControlCenterWcfServiceClient.SetIsAutoRun(flag);
|
return Json(new { Result = "ok" });
|
}
|
|
[HttpPost]
|
public ActionResult GetIsLots()
|
{
|
return Json(new { Result = CacheEntity.ControlCenterWcfServiceClient.GetIsLots() });
|
}
|
|
[HttpPost]
|
public ActionResult SetIsLots(bool flag)
|
{
|
CacheEntity.ControlCenterWcfServiceClient.SetIsLots(flag);
|
return Json(new { Result = "ok" });
|
}
|
|
|
|
|
|
|
|
|
[HttpPost]
|
public ActionResult GetIsRfid()
|
{
|
return Json(new { Result = CacheEntity.ControlCenterWcfServiceClient.GetIsRfid() });
|
}
|
|
|
[HttpPost]
|
public ActionResult SetIsRfid(bool flag)
|
{
|
CacheEntity.ControlCenterWcfServiceClient.SetIsRfid(flag);
|
return Json(new { Result = "ok" });
|
}
|
|
[HttpPost]
|
public ActionResult GetIsVisualMode()
|
{
|
return Json(new { Result = CacheEntity.ControlCenterWcfServiceClient.GetIsVisualMode() });
|
}
|
|
|
[HttpPost]
|
public ActionResult SetIsVisualMode(bool flag)
|
{
|
CacheEntity.ControlCenterWcfServiceClient.SetIsVisualMode(flag);
|
return Json(new { Result = "ok" });
|
}
|
|
}
|
}
|