|
|
@@ -9,15 +9,12 @@ using System.Web.Mvc;
|
|
9
|
9
|
|
|
10
|
10
|
namespace CallCenterApi.Interface.Controllers.RegRecords
|
|
11
|
11
|
{
|
|
12
|
|
- [Authority]
|
|
|
12
|
+ //[Authority]
|
|
13
|
13
|
public class RegRecordsController : BaseController
|
|
14
|
14
|
{
|
|
15
|
15
|
//获取列表
|
|
16
|
|
- public ActionResult GetList(string key,string tel, string starttime,string endtime,string usercode, int direction=-1, int type=0, int pageindex = 1, int pagesize = 10,
|
|
17
|
|
- int innerType=-1 ,string Zsz="")
|
|
|
16
|
+ public ActionResult GetList(string key,string tel, string starttime,string endtime, int direction=-1, int type=0, int pageindex = 1, int pagesize = 10)
|
|
18
|
17
|
{
|
|
19
|
|
- if (!Request.IsAuthenticated)
|
|
20
|
|
- return NoToken("未知错误,请重新登录");
|
|
21
|
18
|
string sql = "";
|
|
22
|
19
|
DataTable dt = new DataTable();
|
|
23
|
20
|
#region 筛选
|
|
|
@@ -34,8 +31,7 @@ namespace CallCenterApi.Interface.Controllers.RegRecords
|
|
34
|
31
|
sql += " and F_Tel like '%" + tel.Trim() + "%' ";
|
|
35
|
32
|
}
|
|
36
|
33
|
|
|
37
|
|
- if (!string.IsNullOrWhiteSpace(usercode))
|
|
38
|
|
- sql += " and F_CreateBy='"+usercode+"'";
|
|
|
34
|
+
|
|
39
|
35
|
if(type>0)
|
|
40
|
36
|
{
|
|
41
|
37
|
sql += " and F_Type=" + type;
|
|
|
@@ -48,56 +44,7 @@ namespace CallCenterApi.Interface.Controllers.RegRecords
|
|
48
|
44
|
{
|
|
49
|
45
|
sql += " and F_CreateOn < '" + Convert.ToDateTime(endtime.Trim()) + "' ";
|
|
50
|
46
|
}
|
|
51
|
|
- if (innerType == 0)
|
|
52
|
|
- {
|
|
53
|
|
- //转移
|
|
54
|
|
- if (CurrentUser.UserData.F_DeptId == 1)
|
|
55
|
|
- {
|
|
56
|
|
- sql += " and( F_Id in(select F_CustomerId from T_Sys_ATheChangeLog where isnull(F_type,0)=0 ))";
|
|
57
|
|
- }
|
|
58
|
|
- else
|
|
59
|
|
- {
|
|
60
|
|
- sql += " and( F_Id in(select F_CustomerId from T_Sys_ATheChangeLog where isnull(F_type,0)=0 and F_Bdeptid=" + CurrentUser.UserData.F_DeptId + "))";
|
|
61
|
|
- }
|
|
62
|
|
-
|
|
63
|
|
-
|
|
64
|
|
- }
|
|
65
|
|
- else if (innerType == 1)
|
|
66
|
|
- {
|
|
67
|
|
- if (CurrentUser.UserData.F_DeptId == 1)
|
|
68
|
|
- {
|
|
69
|
|
- sql += " and( F_Id in(select ( select F_CustomerId from T_Sys_ATheChangeLog where F_Id=F_ATheChangeLog) from T_Sys_BTheChangeLog ) )";
|
|
70
|
|
- //sql += " and (F_Id in( select F_CustomerId from T_Sys_ATheChangeLog ))";
|
|
71
|
|
- }
|
|
72
|
|
- else
|
|
73
|
|
- {
|
|
74
|
|
- sql += " and( F_Id in(select ( select F_CustomerId from T_Sys_ATheChangeLog where F_Id=F_ATheChangeLog) from T_Sys_BTheChangeLog where F_deptid=" + CurrentUser.UserData.F_DeptId + ") )";
|
|
75
|
|
- }
|
|
76
|
|
- //转入
|
|
77
|
|
-
|
|
78
|
|
- //已接收非本部门的数据不可看到
|
|
79
|
|
- sql += @" and (
|
|
80
|
|
-isnull((
|
|
81
|
|
-select top 1 F_Bdeptid from T_Sys_ATheChangeLog where F_CustomerId=T_Rec_RegRecords.F_Id and F_type=1 order by F_Id desc ),0)=
|
|
82
|
|
-" + CurrentUser.UserData.F_DeptId + ")";
|
|
83
|
|
- // isnull((
|
|
84
|
|
-//select top 1 F_Bdeptid from T_Sys_ATheChangeLog where F_CustomerId = T_Rec_RegRecords.F_Id and F_type = 1 order by F_Id desc),0)= 0 or
|
|
85
|
|
-
|
|
86
|
|
- }
|
|
87
|
|
- else {
|
|
88
|
|
-
|
|
89
|
|
- //已接收非本部门的数据不可看到
|
|
90
|
|
- sql += @" and ((isnull((
|
|
91
|
|
-select top 1 F_Bdeptid from T_Sys_ATheChangeLog where F_CustomerId=T_Rec_RegRecords.F_Id and F_type=1 order by F_Id desc ),0)=0 and ( F_ZXZType='" + Zsz + @"') )or
|
|
92
|
|
-isnull((
|
|
93
|
|
-select top 1 F_Bdeptid from T_Sys_ATheChangeLog where F_CustomerId=T_Rec_RegRecords.F_Id and F_type=1 order by F_Id desc ),0)=
|
|
94
|
|
-" + CurrentUser.UserData.F_DeptId +
|
|
95
|
|
-")";
|
|
96
|
|
- //if (Zsz != "")
|
|
97
|
|
- //{
|
|
98
|
|
- // sql += " and ( F_ZXZType='" + Zsz + "')";
|
|
99
|
|
- //}
|
|
100
|
|
- }
|
|
|
47
|
+
|
|
101
|
48
|
|
|
102
|
49
|
|
|
103
|
50
|
|
|
|
@@ -210,14 +157,7 @@ string citizensType, string putRecord,string zXZType ,int CasePartyId,string Pr
|
|
210
|
157
|
int id = 0
|
|
211
|
158
|
)
|
|
212
|
159
|
{
|
|
213
|
|
- if (!Request.IsAuthenticated)
|
|
214
|
|
- return NoToken("未知错误,请重新登录");
|
|
215
|
|
- int userid = CurrentUser.UserData.F_UserId;
|
|
216
|
|
- if (userid == 0)
|
|
217
|
|
- return Error("用户信息获取失败,请重新登录");
|
|
218
|
|
- Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userid);
|
|
219
|
|
- if (ua == null)
|
|
220
|
|
- return Error("信息获取失败,请重新登录");
|
|
|
160
|
+
|
|
221
|
161
|
|
|
222
|
162
|
BLL.T_Rec_RegRecords dBLL = new BLL.T_Rec_RegRecords();
|
|
223
|
163
|
Model.T_Rec_RegRecords dModel = new Model.T_Rec_RegRecords();
|
|
|
@@ -263,7 +203,7 @@ int id = 0
|
|
263
|
203
|
else
|
|
264
|
204
|
{
|
|
265
|
205
|
dModel.F_RecCode = DateTime.Now.ToString("yyyyMMddHHmmssfff");
|
|
266
|
|
- dModel.F_CreateBy = ua.F_UserCode;
|
|
|
206
|
+ dModel.F_CreateBy = "8000";
|
|
267
|
207
|
dModel.F_CreateOn = DateTime.Now;
|
|
268
|
208
|
res =dBLL.Add(dModel)>0;
|
|
269
|
209
|
}
|