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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http;
using VueWebApi.DLL.BLL;
using VueWebApi.Models;
using VueWebApi.Tools;
 
namespace VueWebApi.Controllers
{
    [RoutePrefix(prefix: "api/DeviceManager")]
    [ControllerGroup("设备管理", "在线接口")]
    [ChannelActionFilter]
    public class DeviceManagerController : ApiController
    {
        //定义全局信息返回变量
        ToMessage mes = new ToMessage();
        RedisHelper redis = new RedisHelper();
 
        #region[设备类型查询]
        /// <summary>
        /// 设备类型查询
        /// </summary>
        /// <param name="page">页码</param>
        /// <param name="rows">每页显示条数</param>
        /// <param name="prop">排序字段</param>
        /// <param name="order">排序规则</param>
        /// <returns></returns>
        [Route(template: "DeviceTypeSearch")]
        [HttpGet]
        public HttpResponseMessage DeviceTypeSearch(int page = 0, int rows = 0, string prop = null, string order = null)
        {
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = DeviceManagerBLL.DeviceTypeSearch(startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备类型新增]
        /// <summary>
        /// 设备类型新增
        /// </summary>
        /// <param name="json">提交数据对象</param>
        /// <returns></returns>
        [Route(template: "AddUpdateDeviceType")]
        [HttpPost]
        public HttpResponseMessage AddUpdateDeviceType(List<ObjectDataCont> json)
        {
            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString();
            mes = DeviceManagerBLL.AddUpdateDeviceType(json, username);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备类型删除]
        /// <summary>
        /// 设备类型删除
        /// </summary>
        /// <param name="devicetypecode">设备类型编码</param>
        /// <returns></returns>
        [Route(template: "DeleteDeviceType")]
        [HttpPost]
        public HttpResponseMessage DeleteDeviceType(string devicetypecode)
        {
            mes = DeviceManagerBLL.DeleteDeviceType(devicetypecode);
            return TJson.toJson(mes);
        }
        #endregion
 
 
        #region[设备类型下拉框接口]
        /// <summary>
        /// 设备类型下拉框接口
        /// </summary>
        /// <returns></returns>
        [Route(template: "DeviceTypeSelect")]
        [HttpGet]
        public HttpResponseMessage DeviceTypeSelect()
        {
            try
            {
                mes = DeviceManagerBLL.DeviceTypeSelect();
            }
            catch (Exception e)
            {
                mes.code = "300";
                mes.Message = e.Message;
            }
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备组查询]
        /// <summary>
        /// 设备组查询
        /// </summary>
        /// <param name="page">页码</param>
        /// <param name="rows">每页显示条数</param>
        /// <param name="prop">排序字段</param>
        /// <param name="order">排序规则</param>
        /// <returns></returns>
        [Route(template: "DeviceGroupSearch")]
        [HttpGet]
        public HttpResponseMessage DeviceGroupSearch(int page = 0, int rows = 0, string prop = null, string order = null)
        {
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = DeviceManagerBLL.DeviceGroupSearch(startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备组新增]
        /// <summary>
        /// 设备组新增
        /// </summary>
        /// <param name="json">提交数据对象</param>
        /// <returns></returns>
        [Route(template: "AddUpdateDeviceGroup")]
        [HttpPost]
        public HttpResponseMessage AddUpdateDeviceGroup(List<ObjectDataCont> json)
        {
            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString();
            mes = DeviceManagerBLL.AddUpdateDeviceGroup(json, username);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备组删除]
        /// <summary>
        /// 设备组删除
        /// </summary>
        /// <param name="devicegroupcode">设备组编码</param>
        /// <returns></returns>
        [Route(template: "DeleteDeviceGroup")]
        [HttpPost]
        public HttpResponseMessage DeleteDeviceGroup(string devicegroupcode)
        {
            mes = DeviceManagerBLL.DeleteDeviceGroup(devicegroupcode);
            return TJson.toJson(mes);
        }
        #endregion
 
 
        #region[设备类型查找设备组]
        /// <summary>
        /// 设备类型查找设备组
        /// </summary>
        /// <param name="eqptypecode">设备类型编码</param>
        /// <returns></returns>
        [Route(template: "DeviceTypeSelectGroup")]
        [HttpGet]
        public HttpResponseMessage DeviceTypeSelectGroup(string eqptypecode)
        {
            try
            {
                mes = DeviceManagerBLL.DeviceTypeSelectGroup(eqptypecode);
            }
            catch (Exception e)
            {
                mes.code = "300";
                mes.Message = e.Message;
            }
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[所属车间下拉接口]
        /// <summary>
        /// 所属车间下拉接口
        /// </summary>
        /// <returns></returns>
 
        [Route(template: "WorkShopSelect")]
        [HttpGet]
        public HttpResponseMessage WorkShopSelect()
        {
            mes = DeviceManagerBLL.WorkShopSelect();
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[所属车间查找所属产线接口]
        /// <summary>
        /// 所属车间查找所属产线接口
        /// </summary>
        /// <param name="workshopcode">车间编码</param>
        /// <returns></returns>
        [Route(template: "WorkShopSelectLine")]
        [HttpGet]
        public HttpResponseMessage WorkShopSelectLine(string workshopcode)
        {
            mes = DeviceManagerBLL.WorkShopSelectLine(workshopcode);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备清单查询]
        /// <summary>
        /// 设备清单查询
        /// </summary>
        /// <param name="DeviceCode">设备编码</param>
        /// <param name="DeviceName">设备名称</param>
        /// <param name="Status">使用状态</param>
        /// <param name="WorkShop">所属车间</param>
        /// <param name="DeviceType">设备类型</param>
        /// <param name="DeviceGroup">设备组</param>
        /// <param name="page">页码</param>
        /// <param name="rows">每页显示条数</param>
        /// <param name="prop">排序字段</param>
        /// <param name="order">排序规则</param>
        /// <returns></returns>
        [Route(template: "DeviceMangerSearch")]
        [HttpGet]
        public HttpResponseMessage DeviceMangerSearch(string DeviceCode = null, string DeviceName = null, string Status = null, string WorkShop = null,string DeviceType=null,string DeviceGroup=null,int page = 0, int rows = 0, string prop = null, string order = null)
        {
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = DeviceManagerBLL.DeviceMangerSearch(DeviceCode, DeviceName, Status, WorkShop, DeviceType, DeviceGroup, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备清单新增编辑]
        /// <summary>
        /// 设备清单新增编辑
        /// </summary>
        /// <param name="obj">提交数据对象</param>
        /// <returns></returns>
        [Route(template: "AddUpdateDeviceManger")]
        [HttpPost]
        public HttpResponseMessage AddUpdateDeviceManger([FromBody] JObject obj)
        {
            string deviceid = obj["id"].ToString();    //设备清单id(主键)
            string devicecode = obj["devicecode"].ToString(); //设备编码
            string devicename = obj["devicename"].ToString(); //设备名称
            string devicetype = obj["devicetypecode"].ToString(); //设备类型编码
            string devicegroup = obj["devicegroupcode"].ToString(); //设备组编码
            string importdate = obj["importdate"].ToString(); //投入日期
            string workshop = obj["workshopcode"].ToString(); //所属车间编码
            string linecode = obj["linecode"].ToString(); //所属产线编码
            string status = obj["status"].ToString(); //使用状态
            string ratio = obj["ratio"].ToString(); //稼动率
            var usercode = HttpContext.Current.Request.Cookies["admin"].Value.ToString();
            string OperType = obj["OperType"].ToString();  //操作类型
            mes = DeviceManagerBLL.AddUpdateDeviceManger(deviceid, devicecode, devicename, devicetype, devicegroup, importdate, workshop, linecode, status, ratio, usercode, OperType);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备清单删除]
        /// <summary>
        /// 设备清单删除
        /// </summary>
        /// <param name="devicecode">设备编码</param>
        /// <returns></returns>
        [Route(template: "DeleteDeviceManger")]
        [HttpPost]
        public HttpResponseMessage DeleteDeviceManger(string devicecode)
        {
            mes = DeviceManagerBLL.DeleteDeviceManger(devicecode);
            return TJson.toJson(mes);
        }
        #endregion
 
 
 
        #region[设备点检项列表查询]
        /// <summary>
        /// 设备点检项列表查询
        /// </summary>
        /// <param name="checkitemcode">点检部位编码</param>
        /// <param name="checkitemname">点检部位名称</param>
        /// <param name="checkdescr">点检要求</param>
        /// <param name="isqrcode">选中扫码</param>
        /// <param name="cycle">点检周期</param>
        /// <param name="page">页码</param>
        /// <param name="rows">每页显示条数</param>
        /// <param name="prop">排序字段</param>
        /// <param name="order">排序规则</param>
        /// <returns></returns>
        [Route(template: "DeviceCheckItemSearch")]
        [HttpGet]
        public HttpResponseMessage DeviceCheckItemSearch(int page, int rows, string prop,string order,string checkitemcode = null, string checkitemname = null, string checkdescr = null, string isqrcode = null,string cycle=null)
        {
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = DeviceManagerBLL.DeviceCheckItemSearch(checkitemcode, checkitemname, checkdescr, isqrcode, cycle, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备点检项新增编辑]
        /// <summary>
        /// 设备点检项新增编辑
        /// </summary>
        /// <param name="obj">提交数据对象</param>
        /// <returns></returns>
        [Route(template: "AddUpdateDeviceCheckItem")]
        [HttpPost]
        public HttpResponseMessage AddUpdateDeviceCheckItem([FromBody] JObject obj)
        {
            string checkitemid = obj["id"].ToString();    //设备点检项id(主键)
            string checkitemcode = obj["checkitemcode"].ToString(); //设备点检部位编码
            string checkitemname = obj["checkitemname"].ToString(); //设备点检部位名称
            string checkitemdescr = obj["checkitemdescr"].ToString(); //设备点检部位要求
            string cycle = obj["cycle"].ToString(); //设备点检部位周期
            string isqrcode = obj["isqrcode"].ToString(); //是否扫码
            var usercode = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); 
            string OperType = obj["OperType"].ToString();  //操作类型
            mes = DeviceManagerBLL.AddUpdateDeviceCheckItem(checkitemid, checkitemcode, checkitemname, checkitemdescr, cycle, isqrcode, usercode, OperType);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备点检项删除]
        /// <summary>
        /// 设备点检项删除
        /// </summary>
        /// <param name="checkitemcode">设备点检项目(部位)编码</param>
        /// <returns></returns>
        [Route(template: "DeleteDeviceCheckItem")]
        [HttpPost]
        public HttpResponseMessage DeleteDeviceCheckItem(string checkitemcode)
        {
            mes = DeviceManagerBLL.DeleteDeviceCheckItem(checkitemcode);
            return TJson.toJson(mes);
        }
        #endregion
 
 
 
        #region[设备保养项列表查询]
        /// <summary>
        /// 设备保养项列表查询
        /// </summary>
        /// <param name="maiitemcode">保养部位编码</param>
        /// <param name="maiitemname">保养部位名称</param>
        /// <param name="maidescr">保养要求</param>
        /// <param name="isqrcode">选中扫码</param>
        /// <param name="cycle">保养周期</param>
        /// <param name="page">页码</param>
        /// <param name="rows">每页显示条数</param>
        /// <param name="prop">排序字段</param>
        /// <param name="order">排序规则</param>
        /// <returns></returns>
        [Route(template: "DeviceMaiItemSearch")]
        [HttpGet]
        public HttpResponseMessage DeviceMaiItemSearch(int page, int rows, string prop, string order,string maiitemcode = null, string maiitemname = null, string maidescr = null, string isqrcode = null, string cycle = null)
        {
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = DeviceManagerBLL.DeviceMaiItemSearch(maiitemcode, maiitemname, maidescr, isqrcode, cycle, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备保养项新增编辑]
        /// <summary>
        /// 设备保养项新增编辑
        /// </summary>
        /// <param name="obj">提交数据对象</param>
        /// <returns></returns>
        [Route(template: "AddUpdateDeviceMaiItem")]
        [HttpPost]
        public HttpResponseMessage AddUpdateDeviceMaiItem([FromBody] JObject obj)
        {
            string maiitemid = obj["id"].ToString();    //设备保养项id(主键)
            string maiitemcode = obj["maiitemcode"].ToString(); //设备保养部位编码
            string maiitemname = obj["maiitemname"].ToString(); //设备保养部位名称
            string maiitemdescr = obj["maiitemdescr"].ToString(); //设备保养部位要求
            string cycle = obj["cycle"].ToString(); //设备点检部位周期
            string isqrcode = obj["isqrcode"].ToString(); //是否扫码
            var usercode = HttpContext.Current.Request.Cookies["admin"].Value.ToString();
            string OperType = obj["OperType"].ToString();  //操作类型
            mes = DeviceManagerBLL.AddUpdateDeviceMaiItem(maiitemid, maiitemcode, maiitemname, maiitemdescr, cycle, isqrcode, usercode, OperType);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备保养项删除]
        /// <summary>
        /// 设备保养项删除
        /// </summary>
        /// <param name="maiitemcode">设备保养项目(部位)编码</param>
        /// <returns></returns>
        [Route(template: "DeleteDeviceMaiItem")]
        [HttpPost]
        public HttpResponseMessage DeleteDeviceMaiItem(string maiitemcode)
        {
            mes = DeviceManagerBLL.DeleteDeviceMaiItem(maiitemcode);
            return TJson.toJson(mes);
        }
        #endregion
 
 
        #region[设备点检标准列表查询]
        /// <summary>
        /// 设备点检标准列表查询
        /// </summary>
        /// <param name="checkstandcode">点检标准编码</param>
        /// <param name="checkstandname">点检标准名称</param>
        /// <param name="checkcontr">点检管控</param>
        /// <param name="page">页码</param>
        /// <param name="rows">每页显示条数</param>
        /// <param name="prop">排序字段</param>
        /// <param name="order">排序规则</param>
        /// <returns></returns>
        [Route(template: "DeviceCheckStandArdSearch")]
        [HttpGet]
        public HttpResponseMessage DeviceCheckStandArdSearch(int page, int rows, string prop, string order,string checkstandcode = null, string checkstandname = null, string checkcontr = null)
        {
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = DeviceManagerBLL.DeviceCheckStandArdSearch(checkstandcode, checkstandname, checkcontr, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备点检标准新增、编辑获取检验项目下拉列表]
        /// <summary>
        /// 设备点检标准新增、编辑获取检验项目下拉列表
        /// </summary>
        /// <returns></returns>
        [Route(template: "DeviceCheckItemSelect")]
        [HttpGet]
        public HttpResponseMessage DeviceCheckItemSelect()
        {
            mes = DeviceManagerBLL.DeviceCheckItemSelect();
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备点检标准编辑/查看获取数据]
        /// <summary>
        /// 设备点检标准编辑/查看获取数据
        /// </summary>
        /// <param name="checkstand_code">设备点检标准编码</param>
        /// <returns></returns>
        [Route(template: "ViewDeviceCheckStanedSearch")]
        [HttpPost]
        public HttpResponseMessage ViewDeviceCheckStanedSearch(string checkstand_code)
        {
            mes = DeviceManagerBLL.ViewDeviceCheckStanedSearch(checkstand_code);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备点检标准新增编辑]
        /// <summary>
        /// 设备点检标准新增编辑
        /// </summary>
        /// <param name="opertype">操作类型</param>
        /// <param name="json">提交数据</param>
        /// <returns></returns>
        [Route(template: "AddUpdateDeviceCheckStandArd")]
        [HttpPost]
        public HttpResponseMessage AddUpdateDeviceCheckStandArd(string opertype, RoutEdit json)
        {
            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员
            mes = DeviceManagerBLL.AddUpdateDeviceCheckStandArd(opertype, json, username);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备点检标准删除]
        /// <summary>
        /// 设备点检标准删除
        /// </summary>
        /// <param name="checkstand_code">设备点检标准编码</param>
        /// <returns></returns>
        [Route(template: "DeleteDeviceCheckStaned")]
        [HttpPost]
        public HttpResponseMessage DeleteDeviceCheckStaned(string checkstand_code)
        {
            mes = DeviceManagerBLL.DeleteDeviceCheckStaned(checkstand_code);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备点检标准关联工作站查询]
        /// <summary>
        /// 设备点检标准关联工作站查询
        /// </summary>
        /// <param name="checkstand_code">设备点检标准编码</param>
        /// <returns></returns>
        [Route(template: "DeviceCheckStanedAssociationEqp")]
        [HttpGet]
        public HttpResponseMessage DeviceCheckStanedAssociationEqp(string checkstand_code)
        {
            mes = DeviceManagerBLL.DeviceCheckStanedAssociationEqp(checkstand_code);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region [设备点检标准关联工作站提交]
        /// <summary>
        /// 设备点检标准关联工作站提交
        /// </summary>
        /// <param name="checkstand_code">设备点检标准编码</param>
        /// <param name="json">提交数据</param>
        /// <returns></returns>
        [Route(template: "SaveDeviceCheckStanedAssociationEqp")]
        [HttpPost]
        public HttpResponseMessage SaveDeviceCheckStanedAssociationEqp(string checkstand_code, List<ObjectData> json)
        {
            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员
            mes = DeviceManagerBLL.SaveDeviceCheckStanedAssociationEqp(checkstand_code, username, json);
            return TJson.toJson(mes);
        }
        #endregion
 
 
 
        #region[设备保养标准列表查询]
        /// <summary>
        /// 设备保养标准列表查询
        /// </summary>
        /// <param name="repairstandcode">保养标准编码</param>
        /// <param name="repairstandname">保养标准名称</param>
        /// <param name="repairstanddescr">保养标准描述</param>
        /// <param name="page">页码</param>
        /// <param name="rows">每页显示条数</param>
        /// <param name="prop">排序字段</param>
        /// <param name="order">排序规则</param>
        /// <returns></returns>
        [Route(template: "DeviceRepairStandArdSearch")]
        [HttpGet]
        public HttpResponseMessage DeviceRepairStandArdSearch(int page, int rows, string prop, string order,string repairstandcode = null, string repairstandname = null, string repairstanddescr = null)
        {
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = DeviceManagerBLL.DeviceRepairStandArdSearch(repairstandcode, repairstandname, repairstanddescr, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备保养标准新增、编辑获取保养项目下拉列表]
        /// <summary>
        /// 设备保养标准新增、编辑获取保养项目下拉列表
        /// </summary>
        /// <returns></returns>
        [Route(template: "DeviceRepairItemSelect")]
        [HttpGet]
        public HttpResponseMessage DeviceRepairItemSelect()
        {
            mes = DeviceManagerBLL.DeviceRepairItemSelect();
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备保养标准编辑/查看获取数据]
        /// <summary>
        /// 设备保养标准编辑/查看获取数据
        /// </summary>
        /// <param name="repairstand_code">设备保养标准编码</param>
        /// <returns></returns>
        [Route(template: "ViewDeviceRepairStanedSearch")]
        [HttpPost]
        public HttpResponseMessage ViewDeviceRepairStanedSearch(string repairstand_code)
        {
            mes = DeviceManagerBLL.ViewDeviceRepairStanedSearch(repairstand_code);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备保养标准新增编辑]
        /// <summary>
        /// 设备保养标准新增编辑
        /// </summary>
        /// <param name="opertype">操作类型</param>
        /// <param name="json">提交数据</param>
        /// <returns></returns>
        [Route(template: "AddUpdateDeviceRepairStandArd")]
        [HttpPost]
        public HttpResponseMessage AddUpdateDeviceRepairStandArd(string opertype, RoutEdit json)
        {
            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员
            mes = DeviceManagerBLL.AddUpdateDeviceRepairStandArd(opertype, json, username);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备保养标准删除]
        /// <summary>
        /// 设备保养标准删除
        /// </summary>
        /// <param name="repairstand_code">设备保养标准编码</param>
        /// <returns></returns>
        [Route(template: "DeleteDeviceRepairStaned")]
        [HttpPost]
        public HttpResponseMessage DeleteDeviceRepairStaned(string repairstand_code)
        {
            mes = DeviceManagerBLL.DeleteDeviceRepairStaned(repairstand_code);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region[设备保养标准关联工作站查询]
        /// <summary>
        /// 设备保养标准关联工作站查询
        /// </summary>
        /// <param name="repairstand_code">设备保养标准编码</param>
        /// <returns></returns>
        [Route(template: "DeviceRepairStanedAssociationEqp")]
        [HttpGet]
        public HttpResponseMessage DeviceRepairStanedAssociationEqp(string repairstand_code)
        {
            mes = DeviceManagerBLL.DeviceRepairStanedAssociationEqp(repairstand_code);
            return TJson.toJson(mes);
        }
        #endregion
 
        #region [设备保养标准关联工作站提交]
        /// <summary>
        /// 设备保养标准关联工作站提交
        /// </summary>
        /// <param name="repairstand_code">设备保养标准编码</param>
        /// <param name="json">提交数据</param>
        /// <returns></returns>
        [Route(template: "SaveDeviceRepairStanedAssociationEqp")]
        [HttpPost]
        public HttpResponseMessage SaveDeviceRepairStanedAssociationEqp(string repairstand_code, List<ObjectData> json)
        {
            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员
            mes = DeviceManagerBLL.SaveDeviceRepairStanedAssociationEqp(repairstand_code, username, json);
            return TJson.toJson(mes);
        }
        #endregion
 
 
 
    }
}