zhengbingbing лет назад: 5
Родитель
Сommit
262ae3e86e

+ 7 - 7
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_UserAccount.cs

317
         {
317
         {
318
 
318
 
319
             StringBuilder strSql = new StringBuilder();
319
             StringBuilder strSql = new StringBuilder();
320
-            strSql.Append("select  top 1 F_UserId,F_UserCode,F_Password,F_ExtensionNumber,F_UserName,F_DeptId,F_RoleId,F_GroupId,F_SeatFlag,F_SeatRight,F_SeatLevel,F_SexFlag,F_RemindFlag,F_Remark,F_Telephone,F_Mobile,F_HomePhone,F_Birthday,F_CreateOn,F_CancelOn,F_DeleteFlag,F_APPOnFlag,F_LastActiveTime,F_See,F_HJType,F_PId,F_TmId,F_WorkNumber,F_DeptCode,F_WXNo,F_SeartGroupID,F_SeartGroup ,F_Post from T_Sys_UserAccount WITH(NOLOCK)");
321
-            strSql.Append(" where F_UserCode=@F_UserCode and F_Password=@F_Password and  F_DeleteFlag=0");
320
+            strSql.Append("select  top 1 * from T_Sys_UserAccount WITH(NOLOCK)");
321
+            strSql.Append(" where F_UserCode=@F_UserCode and F_Password=@F_Password ");
322
             SqlParameter[] parameters = {
322
             SqlParameter[] parameters = {
323
                     new SqlParameter("@F_UserCode", SqlDbType.VarChar,50),
323
                     new SqlParameter("@F_UserCode", SqlDbType.VarChar,50),
324
                     new SqlParameter("@F_Password", SqlDbType.VarChar,50)
324
                     new SqlParameter("@F_Password", SqlDbType.VarChar,50)
344
         {
344
         {
345
 
345
 
346
             StringBuilder strSql = new StringBuilder();
346
             StringBuilder strSql = new StringBuilder();
347
-            strSql.Append("select  top 1 F_UserId,F_UserCode,F_Password,F_ExtensionNumber,F_UserName,F_DeptId,F_RoleId,F_GroupId,F_SeatFlag,F_SeatRight,F_SeatLevel,F_SexFlag,F_RemindFlag,F_Remark,F_Telephone,F_Mobile,F_HomePhone,F_Birthday,F_CreateOn,F_CancelOn,F_DeleteFlag,F_APPOnFlag,F_LastActiveTime,F_See,F_HJType,F_PId,F_TmId,F_WorkNumber,F_DeptCode,F_WXNo,F_SeartGroupID,F_SeartGroup,F_Post from T_Sys_UserAccount WITH(NOLOCK)");
347
+            strSql.Append("select  top 1 * from T_Sys_UserAccount WITH(NOLOCK)");
348
             strSql.Append(" where F_UserName=@F_UserName");
348
             strSql.Append(" where F_UserName=@F_UserName");
349
             SqlParameter[] parameters = {
349
             SqlParameter[] parameters = {
350
                     new SqlParameter("@F_UserName", SqlDbType.VarChar,50)
350
                     new SqlParameter("@F_UserName", SqlDbType.VarChar,50)
370
         {
370
         {
371
 
371
 
372
             StringBuilder strSql = new StringBuilder();
372
             StringBuilder strSql = new StringBuilder();
373
-            strSql.Append("select  top 1 F_UserId,F_UserCode,F_Password,F_ExtensionNumber,F_UserName,F_DeptId,F_RoleId,F_GroupId,F_SeatFlag,F_SeatRight,F_SeatLevel,F_SexFlag,F_RemindFlag,F_Remark,F_Telephone,F_Mobile,F_HomePhone,F_Birthday,F_CreateOn,F_CancelOn,F_DeleteFlag,F_APPOnFlag,F_LastActiveTime,F_See,F_HJType,F_PId,F_TmId,F_WorkNumber,F_DeptCode,F_WXNo,F_SeartGroupID,F_SeartGroup,F_Post from T_Sys_UserAccount WITH(NOLOCK)");
373
+            strSql.Append("select  top 1 * from T_Sys_UserAccount WITH(NOLOCK)");
374
             strSql.Append(" where F_UserCode=@F_UserCode");
374
             strSql.Append(" where F_UserCode=@F_UserCode");
375
             SqlParameter[] parameters = {
375
             SqlParameter[] parameters = {
376
                     new SqlParameter("@F_UserCode", SqlDbType.VarChar,50)
376
                     new SqlParameter("@F_UserCode", SqlDbType.VarChar,50)
396
         {
396
         {
397
 
397
 
398
             StringBuilder strSql = new StringBuilder();
398
             StringBuilder strSql = new StringBuilder();
399
-            strSql.Append("select  top 1 F_UserId,F_UserCode,F_Password,F_ExtensionNumber,F_UserName,F_DeptId,F_RoleId,F_GroupId,F_SeatFlag,F_SeatRight,F_SeatLevel,F_SexFlag,F_RemindFlag,F_Remark,F_Telephone,F_Mobile,F_HomePhone,F_Birthday,F_CreateOn,F_CancelOn,F_DeleteFlag,F_APPOnFlag,F_LastActiveTime,F_See,F_HJType,F_PId,F_TmId,F_WorkNumber,F_DeptCode,F_WXNo,F_SeartGroupID,F_SeartGroup ,F_Post from T_Sys_UserAccount WITH(NOLOCK)");
399
+            strSql.Append("select  top 1 * from T_Sys_UserAccount WITH(NOLOCK)");
400
             strSql.Append(" where F_UserId=@F_UserId");
400
             strSql.Append(" where F_UserId=@F_UserId");
401
             SqlParameter[] parameters = {
401
             SqlParameter[] parameters = {
402
                     new SqlParameter("@F_UserId", SqlDbType.Int,4)
402
                     new SqlParameter("@F_UserId", SqlDbType.Int,4)
628
         public DataSet GetList(string strWhere)
628
         public DataSet GetList(string strWhere)
629
         {
629
         {
630
             StringBuilder strSql = new StringBuilder();
630
             StringBuilder strSql = new StringBuilder();
631
-            strSql.Append("select F_UserId,F_UserCode,F_Password,F_ExtensionNumber,F_UserName,F_DeptId,F_RoleId,F_GroupId,F_SeatFlag,F_SeatRight,F_SeatLevel,F_SexFlag,F_RemindFlag,F_Remark,F_Telephone,F_Mobile,F_HomePhone,F_Birthday,F_CreateOn,F_CancelOn,F_DeleteFlag,F_APPOnFlag,F_LastActiveTime,F_See,F_HJType,F_PId,F_TmId,F_WorkNumber,F_DeptCode,F_WXNo,F_SeartGroupID,F_SeartGroup,F_Post ");
631
+            strSql.Append("select * ");
632
             strSql.Append(" FROM T_Sys_UserAccount WITH(NOLOCK)");
632
             strSql.Append(" FROM T_Sys_UserAccount WITH(NOLOCK)");
633
             if (strWhere.Trim() != "")
633
             if (strWhere.Trim() != "")
634
             {
634
             {
660
             {
660
             {
661
                 strSql.Append(" top " + Top.ToString());
661
                 strSql.Append(" top " + Top.ToString());
662
             }
662
             }
663
-            strSql.Append(" F_UserId,F_UserCode,F_Password,F_ExtensionNumber,F_UserName,F_DeptId,F_RoleId,F_GroupId,F_SeatFlag,F_SeatRight,F_SeatLevel,F_SexFlag,F_RemindFlag,F_Remark,F_Telephone,F_Mobile,F_HomePhone,F_Birthday,F_CreateOn,F_CancelOn,F_DeleteFlag,F_APPOnFlag,F_LastActiveTime,F_See,F_HJType,F_PId,F_TmId,F_WorkNumber,F_DeptCode,F_WXNo,F_SeartGroupID,F_SeartGroup ,F_Post");
663
+            strSql.Append(" * ");
664
             strSql.Append(" FROM T_Sys_UserAccount WITH(NOLOCK)");
664
             strSql.Append(" FROM T_Sys_UserAccount WITH(NOLOCK)");
665
             if (strWhere.Trim() != "")
665
             if (strWhere.Trim() != "")
666
             {
666
             {

+ 2 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/CallCenterApi.Interface.csproj

178
     <Compile Include="Controllers\customer\RegionCategoryController.cs" />
178
     <Compile Include="Controllers\customer\RegionCategoryController.cs" />
179
     <Compile Include="Controllers\DepartmentController.cs" />
179
     <Compile Include="Controllers\DepartmentController.cs" />
180
     <Compile Include="Controllers\DictionaryController.cs" />
180
     <Compile Include="Controllers\DictionaryController.cs" />
181
+    <Compile Include="Controllers\Docking\DockingController.cs" />
181
     <Compile Include="Controllers\HomeController.cs" />
182
     <Compile Include="Controllers\HomeController.cs" />
182
     <Compile Include="Controllers\IndexController.cs" />
183
     <Compile Include="Controllers\IndexController.cs" />
183
     <Compile Include="Controllers\InfoController.cs" />
184
     <Compile Include="Controllers\InfoController.cs" />
307
     <Folder Include="Views\Default\" />
308
     <Folder Include="Views\Default\" />
308
     <Folder Include="Views\Department\" />
309
     <Folder Include="Views\Department\" />
309
     <Folder Include="Views\Dictionary\" />
310
     <Folder Include="Views\Dictionary\" />
311
+    <Folder Include="Views\Docking\" />
310
     <Folder Include="Views\DutyPhone\" />
312
     <Folder Include="Views\DutyPhone\" />
311
     <Folder Include="Views\DXRecords\" />
313
     <Folder Include="Views\DXRecords\" />
312
     <Folder Include="Views\DXReports\" />
314
     <Folder Include="Views\DXReports\" />

+ 32 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Docking/DockingController.cs

1
+using CallCenter.Utility;
2
+using CallCenterApi.Interface.Controllers.Base;
3
+using Newtonsoft.Json;
4
+using Newtonsoft.Json.Linq;
5
+using System;
6
+using System.Collections.Generic;
7
+using System.Linq;
8
+using System.Web;
9
+using System.Web.Mvc;
10
+
11
+namespace CallCenterApi.Interface.Controllers.Docking
12
+{
13
+    public class DockingController : BaseController
14
+    {
15
+        // GET: Docking
16
+        public ActionResult GetDocument(string mobile)
17
+        {
18
+            string strURL = "http://222.143.48.99:82/api/acase-main/send/documentSendList";
19
+            if (!string.IsNullOrWhiteSpace(mobile))
20
+                strURL += "?mobile=" + mobile;
21
+
22
+            string strHTML = HttpMethods.HttpGet(strURL);
23
+            JObject jo1 = (JObject)JsonConvert.DeserializeObject(strHTML);
24
+            if (jo1 != null && jo1["success"].ToString().ToLower()== "true")
25
+            {
26
+                return Success("成功", jo1["data"]);
27
+            }
28
+            else
29
+                return Error("失败");
30
+        }
31
+    }
32
+}

+ 4 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/IndexController.cs

331
 
331
 
332
                     //int daynocon = bll.GetList("CallType='0' and CallState='0' and datediff(day,BeginTime, '" + strDate + "')=0 ").Tables[0].Rows.Count;
332
                     //int daynocon = bll.GetList("CallType='0' and CallState='0' and datediff(day,BeginTime, '" + strDate + "')=0 ").Tables[0].Rows.Count;
333
                     ////int daynocon = bll.GetList("CallType='0' and CONVERT(varchar(100),BeginTime, 23)='" + strDate + "' ").Tables[0].Rows.Count;
333
                     ////int daynocon = bll.GetList("CallType='0' and CONVERT(varchar(100),BeginTime, 23)='" + strDate + "' ").Tables[0].Rows.Count;
334
-                    DataTable dtConnect = DbHelperSQL.Query("select CONVERT(varchar(10),BeginTime, 23) AS yearmonthdays,CONVERT(char(7),BeginTime,20) AS yearmonths,CallType,BeginTime,groupcode,UserCode,ISNULL(TalkLongTime,0) AS TalkLongTime FROM T_Call_CallRecords WITH(NOLOCK) where " + uwhere + "").Tables[0];
334
+                    DataTable dtConnect = DbHelperSQL.Query("select CONVERT(varchar(10),BeginTime, 23) AS yearmonthdays,CONVERT(char(7),BeginTime,20) AS yearmonths,CallType,callstate,BeginTime,groupcode,UserCode,ISNULL(TalkLongTime,0) AS TalkLongTime FROM T_Call_CallRecords WITH(NOLOCK) where " + uwhere + "").Tables[0];
335
 
335
 
336
                     // 今日来电
336
                     // 今日来电
337
                     var dayinlist = dtConnect.Select("CallType='0' and yearmonthdays = '" + strDate + "'").Count();
337
                     var dayinlist = dtConnect.Select("CallType='0' and yearmonthdays = '" + strDate + "'").Count();
349
                     var monoutlist = dtConnect.Select("CallType='1' and yearmonths = '" + strMonth + "'").Count();
349
                     var monoutlist = dtConnect.Select("CallType='1' and yearmonths = '" + strMonth + "'").Count();
350
                     var monoutlist_totaltimesum_0 = dtConnect.Select("CallType='1' and yearmonths = '" + strMonth + "'");
350
                     var monoutlist_totaltimesum_0 = dtConnect.Select("CallType='1' and yearmonths = '" + strMonth + "'");
351
                     var monoutlist_totaltimesum = (from DataRow dr in monoutlist_totaltimesum_0 select dr.Field<int>("TalkLongTime")).Sum();
351
                     var monoutlist_totaltimesum = (from DataRow dr in monoutlist_totaltimesum_0 select dr.Field<int>("TalkLongTime")).Sum();
352
-                    //未接来电    
353
-                    var daynocon = dtConnect.Select("CallType='0' and yearmonthdays = '" + strDate + "'").Count();
352
+                    //今日未接来电    
353
+                    var daynocon = dtConnect.Select("CallType='0' and callstate=0 and yearmonthdays = '" + strDate + "'").Count();
354
 
354
 
355
                     var obj = new
355
                     var obj = new
356
                     {
356
                     {
367
                         monin = new { count = moninlist, totaltime = DateTimeConvert.parseTimeSeconds(int.Parse(moninlist_totaltimesum.ToString()), 0) },
367
                         monin = new { count = moninlist, totaltime = DateTimeConvert.parseTimeSeconds(int.Parse(moninlist_totaltimesum.ToString()), 0) },
368
                         //本月去电    
368
                         //本月去电    
369
                         monout = new { count = monoutlist, totaltime = DateTimeConvert.parseTimeSeconds(int.Parse(monoutlist_totaltimesum.ToString()), 0) },
369
                         monout = new { count = monoutlist, totaltime = DateTimeConvert.parseTimeSeconds(int.Parse(monoutlist_totaltimesum.ToString()), 0) },
370
-                        //未接来电    
370
+                        //今日未接来电    
371
                         daynocon = daynocon
371
                         daynocon = daynocon
372
                     };
372
                     };
373
                     res = Success("成功", obj);
373
                     res = Success("成功", obj);

+ 75 - 69
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Login/LoginController.cs

28
         public ActionResult login(LoginModel login)
28
         public ActionResult login(LoginModel login)
29
         {
29
         {
30
             bool appResult = LoodLoop();
30
             bool appResult = LoodLoop();
31
-            if (appResult)
32
-            {
33
-                Model.T_Sys_UserAccount loginUser = new BLL.T_Sys_UserAccount().LoginGetModel(login.Username, login.Password);
31
+            if (!appResult)
32
+                return Error("授权过期,请联系系统厂家。");
33
+            Model.T_Sys_UserAccount loginUser = new BLL.T_Sys_UserAccount().LoginGetModel(login.Username, login.Password);
34
 
34
 
35
-                if (loginUser != null)
35
+            if (loginUser == null)
36
+            {
37
+                int rr = new BLL.T_Sys_LoginLogs().Add(new Model.T_Sys_LoginLogs()
36
                 {
38
                 {
37
-                    string deptcode = "";
38
-                    Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(loginUser.F_DeptId);
39
-                    if (deptModel != null)
40
-                    {
41
-                        deptcode = deptModel.F_DeptCode;
42
-                    }
43
-                    string seatgroup = "";
44
-                    if (loginUser.F_SeartGroupID != null)
45
-                    {
46
-                        Model.T_Sys_SeatGroup seatgroupmodel = new BLL.T_Sys_SeatGroup().GetModel(loginUser.F_SeartGroupID.Value);
47
-                        if (seatgroupmodel != null)
48
-                            seatgroup = seatgroupmodel.F_ZXZName;
49
-                    }
50
-                    //写入登录日志
51
-                    new CallCenterApi.BLL.T_Sys_LoginLogs().Add(new Model.T_Sys_LoginLogs()
52
-                    {
53
-                        F_LoginName = loginUser.F_UserName,
54
-                        F_LoginId = loginUser.F_UserId,
55
-                        F_Result = "登录成功",
56
-                        F_LoginIP = Common.DTRequest.GetIP(),
57
-                        F_Hostname = Common.DTRequest.GetIP(),
58
-                        F_LoginDate = DateTime.Now,
59
-                        F_Remark = "",
60
-                        F_State = 0
61
-                    });
62
-                    Cache.Models.CurrentUserInfo currentUserInfo = new Cache.Models.CurrentUserInfo()
63
-                    {
64
-                        F_UserId = loginUser.F_UserId,
65
-                        F_UserName = loginUser.F_UserName,
66
-                        F_UserCode = loginUser.F_UserCode,
67
-                        F_GroupId = loginUser.F_GroupId,
68
-                        F_RoleId = loginUser.F_RoleId,
69
-                        F_SeartGroupID = loginUser.F_SeartGroupID,
70
-                        F_SeartGroup = seatgroup,
71
-                        F_WorkNumber = loginUser.F_WorkNumber,
72
-                        F_DeptId = loginUser.F_DeptId,
73
-                        F_DeptCode = deptcode
74
-                    };
75
-                    var token = FormsPrincipal<Cache.Models.CurrentUserInfo>.GetCookieValue(currentUserInfo.F_UserCode, currentUserInfo);
76
-
77
-                    //放入redis缓存
78
-                    RedisHelper.StringSet(token, currentUserInfo.ToJson(), new TimeSpan(24, 0, 0));
79
-
80
-                    return Success("登录成功", new
81
-                    {
82
-                        token = token
83
-                    });
84
-                }
85
-                else
39
+                    F_LoginName = login.Username,
40
+                    F_LoginId = -1,
41
+                    F_Result = "登录失败:帐号-" + login.Username + ";分机号-" + login.ExtensionPhone,
42
+                    F_LoginIP = Common.DTRequest.GetIP(),
43
+                    F_Hostname = Common.DTRequest.GetIP(),
44
+                    F_LoginDate = DateTime.Now,
45
+                    F_Remark = "",
46
+                    F_State = 0
47
+                });
48
+                return Error("账号或密码错误,请重新登录");
49
+            }
50
+            if (loginUser.F_DeleteFlag == 1)
51
+            {
52
+                int rr = new BLL.T_Sys_LoginLogs().Add(new Model.T_Sys_LoginLogs()
86
                 {
53
                 {
87
-                    int rr = new BLL.T_Sys_LoginLogs().Add(new Model.T_Sys_LoginLogs()
88
-                    {
89
-                        F_LoginName = login.Username,
90
-                        F_LoginId = -1,
91
-                        F_Result = "登录失败:帐号-" + login.Username + ";分机号-" + login.ExtensionPhone,
92
-                        F_LoginIP = Common.DTRequest.GetIP(),
93
-                        F_Hostname = Common.DTRequest.GetIP(),
94
-                        F_LoginDate = DateTime.Now,
95
-                        F_Remark = "",
96
-                        F_State = 0
97
-                    });
98
-                    return Error("账号或密码错误,请重新登录");
99
-                }
100
-
54
+                    F_LoginName = login.Username,
55
+                    F_LoginId = -1,
56
+                    F_Result = "登录失败:帐号-" + login.Username + ";分机号-" + login.ExtensionPhone,
57
+                    F_LoginIP = Common.DTRequest.GetIP(),
58
+                    F_Hostname = Common.DTRequest.GetIP(),
59
+                    F_LoginDate = DateTime.Now,
60
+                    F_Remark = "账号已被禁用,请联系管理员",
61
+                    F_State = 0
62
+                });
63
+                return Error("账号已被禁用,请联系管理员");
101
             }
64
             }
102
-            else
65
+            string deptcode = "";
66
+            Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(loginUser.F_DeptId);
67
+            if (deptModel != null)
103
             {
68
             {
104
-                return Error("授权过期,请联系系统厂家。");
69
+                deptcode = deptModel.F_DeptCode;
105
             }
70
             }
71
+            string seatgroup = "";
72
+            if (loginUser.F_SeartGroupID != null)
73
+            {
74
+                Model.T_Sys_SeatGroup seatgroupmodel = new BLL.T_Sys_SeatGroup().GetModel(loginUser.F_SeartGroupID.Value);
75
+                if (seatgroupmodel != null)
76
+                    seatgroup = seatgroupmodel.F_ZXZName;
77
+            }
78
+            //写入登录日志
79
+            new CallCenterApi.BLL.T_Sys_LoginLogs().Add(new Model.T_Sys_LoginLogs()
80
+            {
81
+                F_LoginName = loginUser.F_UserName,
82
+                F_LoginId = loginUser.F_UserId,
83
+                F_Result = "登录成功",
84
+                F_LoginIP = Common.DTRequest.GetIP(),
85
+                F_Hostname = Common.DTRequest.GetIP(),
86
+                F_LoginDate = DateTime.Now,
87
+                F_Remark = "",
88
+                F_State = 0
89
+            });
90
+            Cache.Models.CurrentUserInfo currentUserInfo = new Cache.Models.CurrentUserInfo()
91
+            {
92
+                F_UserId = loginUser.F_UserId,
93
+                F_UserName = loginUser.F_UserName,
94
+                F_UserCode = loginUser.F_UserCode,
95
+                F_GroupId = loginUser.F_GroupId,
96
+                F_RoleId = loginUser.F_RoleId,
97
+                F_SeartGroupID = loginUser.F_SeartGroupID,
98
+                F_SeartGroup = seatgroup,
99
+                F_WorkNumber = loginUser.F_WorkNumber,
100
+                F_DeptId = loginUser.F_DeptId,
101
+                F_DeptCode = deptcode
102
+            };
103
+            var token = FormsPrincipal<Cache.Models.CurrentUserInfo>.GetCookieValue(currentUserInfo.F_UserCode, currentUserInfo);
104
+
105
+            //放入redis缓存
106
+            RedisHelper.StringSet(token, currentUserInfo.ToJson(), new TimeSpan(24, 0, 0));
107
+
108
+            return Success("登录成功", new
109
+            {
110
+                token = token
111
+            });
106
         }
112
         }
107
       
113
       
108
         public ActionResult Logout(string token = "")
114
         public ActionResult Logout(string token = "")

+ 4 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/RegRecords/RegRecordsController.cs

13
     public class RegRecordsController : BaseController
13
     public class RegRecordsController : BaseController
14
     {
14
     {
15
         //获取列表
15
         //获取列表
16
-        public ActionResult GetList(string key, string starttime,string endtime, int direction=-1, int type=0, int pageindex = 1, int pagesize = 10)
16
+        public ActionResult GetList(string key, string starttime,string endtime,string usercode, int direction=-1, int type=0, int pageindex = 1, int pagesize = 10)
17
         {
17
         {
18
             if (!Request.IsAuthenticated)
18
             if (!Request.IsAuthenticated)
19
                 return NoToken("未知错误,请重新登录");
19
                 return NoToken("未知错误,请重新登录");
26
             }
26
             }
27
             if (!string.IsNullOrWhiteSpace(key))
27
             if (!string.IsNullOrWhiteSpace(key))
28
             {
28
             {
29
-                sql += " and (F_Complained like '%" + key.Trim() + "%' or F_Content like '%" + key.Trim() + "%' or F_Remark like '%" + key.Trim() + "%')";
29
+                sql += " and (F_RecCode like '%" + key.Trim() + "%' or F_Complained like '%" + key.Trim() + "%' or F_Content like '%" + key.Trim() + "%' or F_Remark like '%" + key.Trim() + "%')";
30
             }
30
             }
31
+            if (!string.IsNullOrWhiteSpace(usercode))
32
+                sql += " and F_CreateBy='"+usercode+"'";
31
             if(type>0)
33
             if(type>0)
32
             {
34
             {
33
                 sql += " and F_Type=" + type;
35
                 sql += " and F_Type=" + type;

+ 29 - 31
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

981
         //获取坐席列表
981
         //获取坐席列表
982
         public ActionResult GetSeatList()
982
         public ActionResult GetSeatList()
983
         {
983
         {
984
-            if (Request.IsAuthenticated)
985
-            {
986
-
987
-                int userId = CurrentUser.UserData.F_UserId;
988
-                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
989
-
990
-                string sql = " f_seatflag=1 ";
991
-                int roleid = CurrentUser.UserData.F_RoleId;
992
-                int deptid = CurrentUser.UserData.F_DeptId;
993
-                if (roleid != 0)
994
-                {
995
-                    if (roleid != 17)
996
-                    {
997
-                        if (deptid != 0)
998
-                            sql += " and F_RoleId=" + 1;
999
-                    }
1000
-                }
984
+            if (!Request.IsAuthenticated)
985
+                return NoToken("未知错误,请重新登录");
986
+            int userId = CurrentUser.UserData.F_UserId;
987
+            Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
1001
 
988
 
1002
-                if (userModel.F_SeartGroupID != 0)
989
+            string sql = " f_seatflag=1 and F_DeleteFlag=0 ";
990
+            int roleid = CurrentUser.UserData.F_RoleId;
991
+            int deptid = CurrentUser.UserData.F_DeptId;
992
+            if (roleid != 0)
993
+            {
994
+                if (roleid != 17)
1003
                 {
995
                 {
1004
-                    sql += " and F_SeartGroupID = '" + userModel.F_SeartGroupID + "' ";
996
+                    if (deptid != 0)
997
+                        sql += " and F_RoleId=" + 1;
1005
                 }
998
                 }
999
+            }
1006
 
1000
 
1007
-                List<Model.T_Sys_UserAccount> userSeartList = sysUserAccountBll.GetModelList(sql + " order by f_userid desc ");
1008
-                if (userSeartList.Count > 0)
1009
-                    return Success("列表加载成功", userSeartList);
1010
-                else
1011
-                    return Error("列表加载失败");
1001
+            if (userModel.F_SeartGroupID != 0)
1002
+            {
1003
+                sql += " and F_SeartGroupID = '" + userModel.F_SeartGroupID + "' ";
1012
             }
1004
             }
1013
-            return NoToken("未知错误,请重新登录");
1005
+
1006
+            List<Model.T_Sys_UserAccount> userSeartList = sysUserAccountBll.GetModelList(sql + " order by f_userid desc ");
1007
+            if (userSeartList.Count > 0)
1008
+                return Success("列表加载成功", userSeartList);
1009
+            else
1010
+                return Error("列表加载失败");
1014
         }
1011
         }
1015
 
1012
 
1016
         //根据部门获取用户
1013
         //根据部门获取用户
1017
         public ActionResult GetDeptUserList(int deptid = 0)
1014
         public ActionResult GetDeptUserList(int deptid = 0)
1018
         {
1015
         {
1019
-            if (Request.IsAuthenticated)
1020
-            {
1021
-                List<Model.T_Sys_UserAccount> DeptUserList = sysUserAccountBll.GetModelList("F_DeptId='" + deptid + "' order by f_userid desc ");
1022
-                return Success("列表加载成功", DeptUserList);
1023
-            }
1024
-            return NoToken("未知错误,请重新登录");
1016
+            if (!Request.IsAuthenticated)
1017
+                return NoToken("未知错误,请重新登录");
1018
+            var sql = " F_DeleteFlag=0 ";
1019
+            if (deptid > 0)
1020
+                sql += " and F_DeptId='" + deptid + "' ";
1021
+            List<Model.T_Sys_UserAccount> DeptUserList = sysUserAccountBll.GetModelList(sql + " order by f_userid desc ");
1022
+            return Success("列表加载成功", DeptUserList);
1025
         }
1023
         }
1026
         public DataTable GetFileData(string ids, string prefix)
1024
         public DataTable GetFileData(string ids, string prefix)
1027
         {
1025
         {

+ 2 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerController.cs

211
                 model.F_CreateTime = DateTime.Now;
211
                 model.F_CreateTime = DateTime.Now;
212
                 model.F_IsDelete = 0;
212
                 model.F_IsDelete = 0;
213
                 int n = bll.Add(model);
213
                 int n = bll.Add(model);
214
+                model.F_Id = n;
214
                 res = n > 0;
215
                 res = n > 0;
215
             }
216
             }
216
             else
217
             else
220
 
221
 
221
             if (res)
222
             if (res)
222
             {
223
             {
223
-                return Success("保存成功!");
224
+                return Success("保存成功!", model.F_Id);
224
             }
225
             }
225
             else
226
             else
226
             {
227
             {