schangxiang@126.com
2025-09-17 60dd1afc3e8f94aa1b23211b6738d35b47294382
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
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" });
        }
       
    }
}