duhongyu лет назад: 4
Родитель
Сommit
e19d379911

+ 54 - 17
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/IndexController.cs

@@ -23,18 +23,68 @@ namespace CallCenterApi.Interface.Controllers
23 23
         private BLL.T_Msg_Chat_Map bllmap = new BLL.T_Msg_Chat_Map();
24 24
         private readonly BLL.T_Sys_UserAccount userAccount = new BLL.T_Sys_UserAccount();
25 25
         private BLL.T_Sys_SystemConfig configBll = new BLL.T_Sys_SystemConfig();
26
-
26
+        private BLL.T_Bus_WorkOrder workorderBLL = new BLL.T_Bus_WorkOrder();
27 27
         /// <summary>
28 28
         /// 获取菜单
29 29
         /// </summary>
30 30
         /// <returns></returns>
31 31
         [Authority]
32
-        public ActionResult GetMenu()
32
+        public ActionResult GetCount()
33 33
         {
34
-            
34
+            int zxdcl = 0;
35
+            string zxdclsql = "";
36
+            if (User.F_RoleCode != "GLY" && User.F_RoleCode != "ZXLD" && User.F_RoleCode != "DDZG" && User.F_RoleCode != "MTDD")
37
+            {
38
+                if (User.F_RoleCode != "ZJZY" && User.F_RoleCode != "ZXHWY")
39
+                    zxdclsql += " and F_CreateUser='" + User.F_UserCode + "'";
35 40
 
36
-            
41
+            }
42
+            zxdclsql += "and F_ToBereply=0" ;
43
+            zxdclsql += "and (F_IsReturn !='1' or F_IsReturn is null)";
44
+            string sqlzxdcl = "SELECT count(1) from T_Bus_WorkOrder where F_IsDelete=0 " + zxdclsql;
45
+            zxdcl = Int32.Parse(DbHelperSQL.Query(sqlzxdcl).Tables[0].Rows[0][0].ToString());
46
+
47
+
48
+            int gdbh = 0;
49
+           string  gdbhsql = " and F_WorkState in (0,10) and F_IsReturn=1";
50
+            if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG")
51
+            {
52
+                gdbhsql += " and F_CreateUser='" + User.F_UserCode + "'";
53
+            }
54
+            string sqlgdbh = "SELECT count(1) from T_Bus_WorkOrder where F_IsDelete=0 " + gdbhsql;
55
+            gdbh = Int32.Parse(DbHelperSQL.Query(sqlgdbh).Tables[0].Rows[0][0].ToString());
37 56
 
57
+
58
+            int ybdhf = 0;
59
+            string ybdhfsql = "";
60
+            if (User.F_RoleCode != "GLY" && User.F_RoleCode != "ZXLD" && User.F_RoleCode != "DDZG" && User.F_RoleCode != "MTDD")
61
+            {
62
+                if (User.F_RoleCode != "ZJZY" && User.F_RoleCode != "ZXHWY")
63
+                    ybdhfsql += " and F_CreateUser='" + User.F_UserCode + "'";
64
+
65
+            }
66
+            ybdhfsql += "and F_ToBereply=1";
67
+            ybdhfsql += " and F_WorkState = '6' ";
68
+            ybdhfsql += "and F_WorkOrderID not in (select F_WorkOrderID from T_Bus_RemindRecord where F_Type=1 and F_IsDelete=0and F_Content != '推诿工单' and F_State!=2)";
69
+            string sqlybdhf = "SELECT count(1) from T_Bus_WorkOrder where F_IsDelete=0 " + ybdhfsql;
70
+            ybdhf = Int32.Parse(DbHelperSQL.Query(sqlybdhf).Tables[0].Rows[0][0].ToString());
71
+
72
+
73
+            var obj = new
74
+            {
75
+                zxdcl,
76
+                gdbh,
77
+                ybdhf
78
+            };
79
+              return Success("成功", obj);
80
+        }
81
+        /// <summary>
82
+        /// 获取菜单
83
+        /// </summary>
84
+        /// <returns></returns>
85
+        [Authority]
86
+        public ActionResult GetMenu()
87
+        {
38 88
             var fids = new BLL.T_Sys_RoleFunction().GetModelList(" F_RoleId='" + User.F_RoleId + "'").Select(p => p.F_FunctionId).ToList();
39 89
             if (fids.Count > 0)
40 90
             {
@@ -61,10 +111,6 @@ namespace CallCenterApi.Interface.Controllers
61 111
         [Authority]
62 112
         public ActionResult UploadTX()
63 113
         {
64
-            
65
-
66
-            
67
-
68 114
             string path = string.Empty;
69 115
             HttpPostedFile _upfile = RequestString.GetFile("upFile");
70 116
             if (_upfile != null)
@@ -98,12 +144,7 @@ namespace CallCenterApi.Interface.Controllers
98 144
         [Authority]
99 145
         public ActionResult UploadTX64()
100 146
         {
101
-            
102
-
103
-            
104
-
105 147
             string path = string.Empty;
106
-
107 148
             string dataurl = HttpUtility.UrlDecode(RequestString.GetFormString("dataurl"));
108 149
             if (!string.IsNullOrEmpty(dataurl))
109 150
             {
@@ -150,10 +191,6 @@ namespace CallCenterApi.Interface.Controllers
150 191
         [Authority]
151 192
         public ActionResult GetTelRecordsTotal()
152 193
         {
153
-            
154
-
155
-            
156
-
157 194
             var date = DateTime.Now;
158 195
             string strDate = date.ToString("yyyy-MM-dd");
159 196
             string strMonth = date.ToString("yyyy-MM");

+ 13 - 13
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CusVipController.cs

@@ -11,6 +11,7 @@ using System.Web.Mvc;
11 11
 
12 12
 namespace CallCenterApi.Interface.Controllers.customer
13 13
 {
14
+    [Authority]
14 15
     public class CusVipController : BaseController
15 16
     {
16 17
         private BLL.T_Cus_VipInfo vipinfp=new BLL.T_Cus_VipInfo ();
@@ -100,16 +101,15 @@ namespace CallCenterApi.Interface.Controllers.customer
100 101
             }
101 102
 
102 103
         }
103
-        public ActionResult AddVip(Model.T_Cus_VipInfo vipinfos)
104
+        public ActionResult AddVip(string F_Name,string F_Phone,string F_Remarks)
104 105
         {
105 106
             
106
-            
107
-            if (string.IsNullOrEmpty(vipinfos.F_Phone))
107
+            if (string.IsNullOrEmpty(F_Phone))
108 108
                 return Error("请输入vip电话");
109 109
             Model.T_Cus_VipInfo model = new Model.T_Cus_VipInfo();
110
-            model.F_Name = vipinfos.F_Name;
111
-            model.F_Phone = vipinfos.F_Phone;
112
-            model.F_Remarks = vipinfos.F_Remarks;
110
+            model.F_Name = F_Name;
111
+            model.F_Phone = F_Phone;
112
+            model.F_Remarks = F_Remarks;
113 113
             model.F_State = 0;
114 114
             model.F_AddUser = User.F_UserCode ;
115 115
             model.F_AddTime  = DateTime .Now ;
@@ -120,20 +120,20 @@ namespace CallCenterApi.Interface.Controllers.customer
120 120
             else
121 121
                 return Error("添加失败");
122 122
         }
123
-        public ActionResult EditVip(Model.T_Cus_VipInfo vipinfos)
123
+        public ActionResult EditVip(string F_Phone,string F_Name,string F_Remarks, int F_ID=0)
124 124
         {
125 125
             
126 126
             
127
-            if (vipinfos.F_ID <= 0)
127
+            if (F_ID <= 0)
128 128
                 return Error("参数错误");
129
-            if (string.IsNullOrEmpty(vipinfos.F_Phone))
129
+            if (string.IsNullOrEmpty(F_Phone))
130 130
                 return Error("请输入vip电话");
131
-            Model.T_Cus_VipInfo model = vipinfp.GetModel (vipinfos.F_ID );
131
+            Model.T_Cus_VipInfo model = vipinfp.GetModel (F_ID );
132 132
             if (model == null)
133 133
                 return Error("该VIP用户不存在");
134
-            model.F_Name = vipinfos.F_Name;
135
-            model.F_Phone = vipinfos.F_Phone;
136
-            model.F_Remarks = vipinfos.F_Remarks;
134
+            model.F_Name = F_Name;
135
+            model.F_Phone =F_Phone;
136
+            model.F_Remarks =F_Remarks;
137 137
             model.F_State = 0;
138 138
             model.F_UpdateUser  = User.F_UserCode;
139 139
             model.F_UpdateTime  = DateTime.Now;

+ 4 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/information/NoticeController.cs

@@ -149,7 +149,7 @@ namespace CallCenterApi.Interface.Controllers.information
149 149
             dt = BLL.PagerBLL.GetListPager(
150 150
                 "T_Msg_NoticeInfo a",
151 151
                 "F_NoticeId",
152
-                "*,dbo.GetUserName(F_CreateBy) as F_CreateByName",
152
+                "*,dbo.GetUserNameByID(F_CreateBy) as F_CreateByName",
153 153
                 sql,
154 154
                 "ORDER BY F_NoticeId desc",
155 155
                 pagesize,
@@ -335,7 +335,9 @@ namespace CallCenterApi.Interface.Controllers.information
335 335
                     dModel.F_RoleId = "," + roleid.Trim() + ",";//= roleid
336 336
                     dModel.F_UserId = "," + userid.Trim() + ",";//= userid
337 337
                     dModel.F_ModifyDate = DateTime.Now;
338
-                  //  dModel.F_ModifyBy = User.F_UserId;
338
+                    if (dModel.F_Frequency >0)
339
+                        dModel.F_Frequency = dModel.F_Frequency - 1;
340
+                    //  dModel.F_ModifyBy = User.F_UserId;
339 341
                     bool b = dBLL.Update(dModel);
340 342
                     if (b)
341 343
                     {

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/ZuoXiWorkTotalController.cs

@@ -155,7 +155,7 @@ namespace CallCenterApi.Interface.Controllers.report
155 155
 
156 156
             
157 157
             DataTable dtdpt = DbHelperSQL.Query("select F_DeptId,F_DeptName,F_Remark from  T_Sys_Department WITH(NOLOCK) where F_PartentId!=0 ").Tables[0];
158
-            DataTable dtUser = DbHelperSQL.Query("SELECT F_UserCode,F_UserName,F_WorkNumber,F_UserId,F_DeptId FROM T_Sys_UserAccount WITH(NOLOCK) where F_DeleteFlag=0 and f_seatFlag=1 and isnull(F_WorkNumber,'')<>''"+ sqlUser + " order by  F_WorkNumber asc").Tables[0];
158
+            DataTable dtUser = DbHelperSQL.Query("SELECT F_UserCode,F_UserName,F_WorkNumber,F_UserId,F_DeptId FROM T_Sys_UserAccount WITH(NOLOCK) where F_DeleteFlag=0 and f_seatFlag=1 AND F_DeptId>0 and isnull(F_WorkNumber,'')<>''" + sqlUser + " order by  F_WorkNumber asc").Tables[0];
159 159
 
160 160
             DataTable dtTrunk = DbHelperSQL.Query("select AgentID,COUNT(*) as ct,SUM(DATEDIFF(Second,timewantagent,timeconnected)) as dd from rep_trunk_call_in WITH(NOLOCK) where 1=1 " + strsqlTrunk+ " group by AgentID ").Tables[0];
161 161
             DataTable dtcall = DbHelperSQL.Query("select UserCode,CallType,CallState,MYD from T_Call_CallRecords WITH(NOLOCK) where 1=1 " + strsqlcall).Tables[0];

+ 2 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

@@ -93,7 +93,7 @@ namespace CallCenterApi.Interface.Controllers.tel
93 93
                 if (calltype=="3")
94 94
                 {
95 95
                     sql += " and CallType='1'";
96
-                    sql += " and CallId in(select F_CallRecordId from T_Bus_VisitResult WITH(NOLOCK) where F_CallRecordId !='' and F_CallRecordId is not null )";
96
+                    sql += " and CallRecordsId in(select F_CallRecordId from T_Bus_VisitResult WITH(NOLOCK) where F_CallRecordId !='' and F_CallRecordId is not null )";
97 97
                 }
98 98
                 else 
99 99
                 sql += " and CallType='" + calltype + "'";
@@ -137,7 +137,7 @@ namespace CallCenterApi.Interface.Controllers.tel
137 137
             }
138 138
             if (isdc > 0)
139 139
             {
140
-                var dtdc = DbHelperSQL.Query(" select   ROW_NUMBER()  OVER(ORDER BY CallRecordsId desc) 编号, CallNumber 电话号码,(case CallType when 0 then '呼入' else '呼出' end ) 呼叫方向,(case CallState when 0 then ( case CallType when 0 then (case  when isnull(UserCode,'')!='' then  '主动放弃' else '未接通' end) else '未接通' end    ) else '已接通' end ) 呼叫状态,UserCode 坐席工号,dbo.GetUserName(UserCode) as 坐席姓名, "
140
+                var dtdc = DbHelperSQL.Query(" select   ROW_NUMBER()  OVER(ORDER BY CallRecordsId desc) 编号, CallNumber 电话号码,(case CallType when 0 then '呼入' else '呼出' end ) 呼叫方向,(case CallState when 0 then ( case  when CallType=0 and isnull(UserCode,'')='' then  '主动放弃' else '未接通'   end    ) else '已接通' end ) 呼叫状态,UserCode 坐席工号,dbo.GetUserName(UserCode) as 坐席姓名, "
141 141
                     + "BeginTime 开始时间,TalkStartTime 通话开始时间 ,TalkEndTime " +
142 142
                     " 通话结束时间 ,EndTime 结束时间 ,LongTime 通话时长 ,PhoneType " +
143 143
                     "电话类别"

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/SeatMonitoringController.cs

@@ -22,7 +22,7 @@ namespace CallCenterApi.Interface.Controllers.tel
22 22
         public ActionResult GetList()
23 23
         {
24 24
             DataTable dt = new DataTable();
25
-            dt = Userbll.GetList(" f_seatflag=1", "f_userid desc").Tables[0];
25
+            dt = Userbll.GetList(" f_seatflag=1", "F_GroupCode desc").Tables[0];
26 26
 
27 27
             if (dt.Rows.Count > 0)
28 28
             {

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/APPSController.cs


Разница между файлами не показана из-за своего большого размера
+ 310 - 215
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs