HuXiYu
authored
|
1
2
3
4
5
6
|
using Hh.Mes.Common.Request;
using Hh.Mes.POJO.Entity;
using Hh.Mes.Service.Equipment;
using Microsoft.AspNetCore.Mvc;
using Hh.Mes.Service.SystemAuth;
using WebMvc.Aop;
|
赖素文
authored
|
7
8
|
using Microsoft.AspNetCore.Http;
using System.Collections.Generic;
|
HuXiYu
authored
|
9
10
11
|
namespace WebMvc.Areas.Equipment.Controllers
{
|
赖素文
authored
|
12
13
14
|
/// <summary>
/// 设备保养规则
/// </summary>
|
HuXiYu
authored
|
15
|
[Area("Equipment")]
|
赖素文
authored
|
16
|
public class BusEquipmentMaintainRuleController : BaseController
|
HuXiYu
authored
|
17
|
{
|
赖素文
authored
|
18
|
private readonly BusEquipmentMaintainRuleService _service;
|
HuXiYu
authored
|
19
|
|
赖素文
authored
|
20
|
public BusEquipmentMaintainRuleController(IAuth authUtil, BusEquipmentMaintainRuleService service) : base(authUtil)
|
HuXiYu
authored
|
21
22
23
24
25
26
27
28
|
{
_service = service;
_service.sysWebUser = authUtil.GetCurrentUser().User;
}
#region 视图功能
/// <summary>
/// 默认视图Action
|
唐召明
authored
|
29
|
/// </summary>
|
HuXiYu
authored
|
30
31
32
33
34
35
36
37
|
/// <returns></returns>
[Authenticate]
[ServiceFilter(typeof(OperLogFilter))]
public ActionResult Index()
{
return View();
}
#endregion
|
赖素文
authored
|
38
|
|
HuXiYu
authored
|
39
|
#region 数据操作
|
赖素文
authored
|
40
41
|
#region 主表
|
HuXiYu
authored
|
42
43
44
45
46
47
48
49
50
51
52
|
/// <summary>
/// 加载及分页查询
/// </summary>
/// <param name="pageRequest">表单请求信息</param>
/// <param name="entity">请求条件实例</param>
/// <returns></returns>
[HttpPost]
public string Load(PageReq pageRequest, bus_equipment_maintain_rule_head entity)
{
return Serialize(_service.Load(pageRequest, entity));
}
|
HuXiYu
authored
|
53
|
|
HuXiYu
authored
|
54
55
56
57
58
59
60
61
62
63
64
|
/// <summary>
/// 新增数据
/// </summary>
/// <param name="entity">新增实例</param>
/// <returns></returns>
[HttpPost]
[ServiceFilter(typeof(OperLogFilter))]
public string Ins(bus_equipment_maintain_rule_head entity)
{
return Serialize(_service.Ins(entity));
}
|
赖素文
authored
|
65
|
|
HuXiYu
authored
|
66
|
/// <summary>
|
|
67
68
69
70
71
72
73
74
75
76
77
78
|
/// 新增设备保养规则,同时复制新增对应的规则明细
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
[HttpPost]
[ServiceFilter(typeof(OperLogFilter))]
public string InsAll(bus_equipment_maintain_rule_head entity)
{
return Serialize(_service.InsAll(entity));
}
/// <summary>
|
HuXiYu
authored
|
79
80
81
82
83
84
85
86
87
88
|
/// 修改数据
/// </summary>
/// <param name="entity">修改实例</param>
/// <returns></returns>
[HttpPost]
[ServiceFilter(typeof(OperLogFilter))]
public string Upd(bus_equipment_maintain_rule_head entity)
{
return Serialize(_service.Upd(entity));
}
|
赖素文
authored
|
89
|
|
HuXiYu
authored
|
90
91
92
93
94
95
96
97
98
99
100
|
/// <summary>
/// 删除数据
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
[HttpPost]
[ServiceFilter(typeof(OperLogFilter))]
public string DelByIds(int[] ids)
{
return Serialize(_service.DelByIds(ids));
}
|
|
101
102
|
|
HuXiYu
authored
|
103
|
#endregion
|
赖素文
authored
|
104
|
|
唐召明
authored
|
105
|
#region 子表
|
赖素文
authored
|
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
|
[HttpPost]
public string LoadDesc(PageReq pageRequest, bus_equipment_maintain_rule_detail entity)
{
return Serialize(_service.LoadDesc(pageRequest, entity));
}
/// <summary>
/// 新增数据
/// </summary>
/// <param name="entity">新增实例</param>
/// <returns></returns>
[HttpPost]
[ServiceFilter(typeof(OperLogFilter))]
public string InsDesc(bus_equipment_maintain_rule_detail entity)
{
return Serialize(_service.InsDesc(entity));
}
/// <summary>
/// 修改数据
/// </summary>
/// <param name="entity">修改实例</param>
/// <returns></returns>
[HttpPost]
[ServiceFilter(typeof(OperLogFilter))]
public string UpdDesc(bus_equipment_maintain_rule_detail entity)
{
return Serialize(_service.UpdDesc(entity));
}
/// <summary>
/// 删除数据
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
[HttpPost]
[ServiceFilter(typeof(OperLogFilter))]
public string DelByIdsDesc(int[] ids)
{
return Serialize(_service.DelByIdsDesc(ids));
|
赖素文
authored
|
147
148
149
150
151
152
153
154
155
|
}
#endregion
#region 关系表
[HttpPost]
public string LoadDetailIndicatorRelList(bus_equipment_maintain_rule_detail_indicator_rel entity)
{
return Serialize(_service.LoadDetailIndicatorRelList(entity));
|
赖素文
authored
|
156
157
158
159
160
|
}
#endregion
#endregion
|
HuXiYu
authored
|
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
#region 导出数据
/// <summary>
/// 导出数据
/// </summary>
/// <param name="entity">请求条件实例</param>
/// <returns></returns>
[HttpPost]
public string Export(bus_equipment_maintain_rule_head entity)
{
return Serialize(_service.ExportData(entity));
}
#endregion
#region 自定义方法
#endregion
}
}
|