|
|
@@ -18,17 +18,17 @@ namespace RMYY_CallCenter_Api.Controllers.System
|
|
18
|
18
|
/// 获取列表
|
|
19
|
19
|
/// </summary>
|
|
20
|
20
|
/// <returns></returns>
|
|
21
|
|
- public ActionResult GetList(string keyword,int hosid=0,int pid=0, int pageindex = 1, int pagesize = 10)
|
|
|
21
|
+ public ActionResult GetList(string keyword, int hosid = 0, int pid = 0, int pageindex = 1, int pagesize = 10)
|
|
22
|
22
|
{
|
|
23
|
23
|
DataTable date = new DataTable();
|
|
24
|
24
|
string sql = "";
|
|
25
|
25
|
string where = " and F_State=1";
|
|
26
|
26
|
if (!string.IsNullOrEmpty(keyword))
|
|
27
|
|
- sql += $" and F_DeptName like '%" + keyword + "%'";
|
|
28
|
|
- if(pid!=0)
|
|
29
|
|
- sql += $" and F_ParentId= "+pid;
|
|
|
27
|
+ sql += $" and F_DeptName like '%" + keyword + "%'";
|
|
|
28
|
+ if (pid != 0)
|
|
|
29
|
+ sql += $" and F_ParentId= " + pid;
|
|
30
|
30
|
if (hosid != 0)
|
|
31
|
|
- sql += $" and T_Woid="+hosid;
|
|
|
31
|
+ sql += $" and T_Woid=" + hosid;
|
|
32
|
32
|
int recordCount = 0;
|
|
33
|
33
|
if (!string.IsNullOrEmpty(sql))
|
|
34
|
34
|
{
|
|
|
@@ -47,20 +47,21 @@ namespace RMYY_CallCenter_Api.Controllers.System
|
|
47
|
47
|
|
|
48
|
48
|
);
|
|
49
|
49
|
// List<Model.T_Sys_Department> carlist = new Bll.T_Sys_Department().DataTableToList(date);
|
|
50
|
|
- var obj = new
|
|
51
|
|
- {
|
|
52
|
|
- state = "success",
|
|
53
|
|
- message = "成功",
|
|
54
|
|
- rows = date,
|
|
55
|
|
- total = recordCount
|
|
56
|
|
- };
|
|
57
|
|
- return Content(obj.ToJson());
|
|
|
50
|
+ var obj = new
|
|
|
51
|
+ {
|
|
|
52
|
+ state = "success",
|
|
|
53
|
+ message = "成功",
|
|
|
54
|
+ rows = date,
|
|
|
55
|
+ total = recordCount
|
|
|
56
|
+ };
|
|
|
57
|
+ return Content(obj.ToJson());
|
|
58
|
58
|
}
|
|
59
|
59
|
|
|
60
|
60
|
/// <summary>
|
|
61
|
61
|
/// 返回树形下拉框 菜单数据
|
|
62
|
62
|
/// </summary>
|
|
63
|
63
|
/// <returns></returns>
|
|
|
64
|
+
|
|
64
|
65
|
[HttpGet]
|
|
65
|
66
|
public ActionResult GetTreeList(int hosid=0,int pid=0)
|
|
66
|
67
|
{
|
|
|
@@ -164,7 +165,7 @@ namespace RMYY_CallCenter_Api.Controllers.System
|
|
164
|
165
|
/// <param name="sort"></param>
|
|
165
|
166
|
/// <returns></returns>
|
|
166
|
167
|
[HttpPost]
|
|
167
|
|
- public ActionResult Insert(int pid, string code, string name,int hosid, string location, string floorDistribution, string officeTelephone, int sort=0,int transfertype=0)
|
|
|
168
|
+ public ActionResult Add(int pid, string code, string name,int hosid, string location, string floorDistribution, string officeTelephone, int sort=0,int transfertype=0)
|
|
168
|
169
|
{
|
|
169
|
170
|
if (departmentBLL.Exists(code))
|
|
170
|
171
|
{
|
|
|
@@ -208,7 +209,7 @@ namespace RMYY_CallCenter_Api.Controllers.System
|
|
208
|
209
|
/// <param name="sort"></param>
|
|
209
|
210
|
/// <returns></returns>
|
|
210
|
211
|
[HttpPost]
|
|
211
|
|
- public ActionResult Update(int id, int pid, string code, string name, int sort,int hosid,string location,string floorDistribution,string officeTelephone,int transfertype=0)
|
|
|
212
|
+ public ActionResult Edit(int id, int pid, string code, string name, int sort,int hosid,string location,string floorDistribution,string officeTelephone,int transfertype=0)
|
|
212
|
213
|
{
|
|
213
|
214
|
Model.T_Sys_Department dModel = departmentBLL.GetModel(id);
|
|
214
|
215
|
if (dModel != null)
|