|
|
@@ -1,17 +1,70 @@
|
|
1
|
|
-using System;
|
|
|
1
|
+using RMYY_CallCenter_Api.Utility;
|
|
|
2
|
+using System;
|
|
2
|
3
|
using System.Collections.Generic;
|
|
|
4
|
+using System.Data;
|
|
3
|
5
|
using System.Linq;
|
|
4
|
6
|
using System.Web;
|
|
5
|
7
|
using System.Web.Mvc;
|
|
6
|
8
|
|
|
7
|
9
|
namespace RMYY_CallCenter_Api.Controllers.System
|
|
8
|
10
|
{
|
|
9
|
|
- public class WoStatusOptController : Controller
|
|
|
11
|
+ public class WoStatusOptController : BaseController
|
|
10
|
12
|
{
|
|
11
|
|
- // GET: WoStatusOpt
|
|
12
|
|
- public ActionResult Index()
|
|
|
13
|
+
|
|
|
14
|
+ private Bll.T_Wo_StatusOpt optbll = new Bll.T_Wo_StatusOpt();
|
|
|
15
|
+ private Bll.T_Sys_GongDan gdbll = new Bll.T_Sys_GongDan();
|
|
|
16
|
+ private Bll.T_Sys_Menu menubll = new Bll.T_Sys_Menu();
|
|
|
17
|
+ /// <summary>
|
|
|
18
|
+ /// 获取列表
|
|
|
19
|
+ /// </summary>
|
|
|
20
|
+ /// <param name="type"></param>
|
|
|
21
|
+ /// <param name="pageindex"></param>
|
|
|
22
|
+ /// <param name="pagesize"></param>
|
|
|
23
|
+ /// <returns></returns>
|
|
|
24
|
+ public ActionResult GetList(int type, int pageindex = 1, int pagesize = 10)
|
|
13
|
25
|
{
|
|
14
|
|
- return View();
|
|
|
26
|
+ if (User != null)
|
|
|
27
|
+ {
|
|
|
28
|
+ #region 查询添加
|
|
|
29
|
+ string sql = "";
|
|
|
30
|
+ DataTable data = new DataTable();
|
|
|
31
|
+ if (type != 0)
|
|
|
32
|
+ sql += $"and F_Type={type}";
|
|
|
33
|
+ #endregion
|
|
|
34
|
+ int recordCount = 0;
|
|
|
35
|
+ data = Bll.PagerBll.GetListPager
|
|
|
36
|
+ (
|
|
|
37
|
+ "T_Wo_StatusOpt aa",
|
|
|
38
|
+ "F_Id",
|
|
|
39
|
+ "*,(select F_Name from T_Sys_GongDan where F_GDId=aa.F_Type)as F_Name",
|
|
|
40
|
+ sql,
|
|
|
41
|
+ "ORDER BY F_Id desc",
|
|
|
42
|
+ pagesize,
|
|
|
43
|
+ pageindex,
|
|
|
44
|
+ true,
|
|
|
45
|
+ out recordCount
|
|
|
46
|
+ );
|
|
|
47
|
+
|
|
|
48
|
+ foreach (DataRow dr in data.Rows)
|
|
|
49
|
+ {
|
|
|
50
|
+ string state = dr["F_State"] != null ? dr["F_State"].ToString() : "";
|
|
|
51
|
+ //if (state != "")
|
|
|
52
|
+ //{
|
|
|
53
|
+ // dr["F_StateName"] = GetTypeStatenew();
|
|
|
54
|
+ //}
|
|
|
55
|
+ }
|
|
|
56
|
+
|
|
|
57
|
+ var obj = new
|
|
|
58
|
+ {
|
|
|
59
|
+ state = "success",
|
|
|
60
|
+ message = "成功",
|
|
|
61
|
+ rows = data,
|
|
|
62
|
+ total = recordCount
|
|
|
63
|
+ };
|
|
|
64
|
+ return Content(obj.ToJson());
|
|
|
65
|
+
|
|
|
66
|
+ }
|
|
|
67
|
+ return Error("无操作权限!");
|
|
15
|
68
|
}
|
|
16
|
69
|
}
|
|
17
|
70
|
}
|