Browse Source

添加业务报表、修改禅道bug

mengjie 6 years ago
parent
commit
4ed9edd223
14 changed files with 570 additions and 74 deletions
  1. 9 2
      codegit/CallCenterApi/CallCenterApi.BLL/T_Msg_NoticeInfo.cs
  2. 30 7
      codegit/CallCenterApi/CallCenterApi.DAL/T_Msg_NoticeInfo.cs
  3. 93 11
      codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs
  4. 34 6
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/information/NoticeController.cs
  5. 13 2
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs
  6. 12 7
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/DaysTalkTimeController.cs
  7. 16 11
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/TalkTimeController.cs
  8. 92 0
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WOReportController.cs
  9. 18 8
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs
  10. 2 2
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs
  11. 126 16
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs
  12. 6 0
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Enum/EnumWorkOrderState.cs
  13. 14 2
      codegit/CallCenterApi/CallCenterApi.Model/T_Msg_NoticeInfo.cs
  14. 105 0
      codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrder.cs

+ 9 - 2
codegit/CallCenterApi/CallCenterApi.BLL/T_Msg_NoticeInfo.cs

@@ -35,7 +35,7 @@ namespace CallCenterApi.BLL
35 35
         /// <summary>
36 36
         /// 删除一条数据
37 37
         /// </summary>
38
-        public bool Delete(int F_NoticeId)
38
+        public bool Delete(string F_NoticeId)
39 39
         {
40 40
 
41 41
             return dal.Delete(F_NoticeId);
@@ -51,7 +51,7 @@ namespace CallCenterApi.BLL
51 51
         /// <summary>
52 52
         /// 得到一个对象实体
53 53
         /// </summary>
54
-        public CallCenterApi.Model.T_Msg_NoticeInfo GetModel(int F_NoticeId)
54
+        public CallCenterApi.Model.T_Msg_NoticeInfo GetModel(string F_NoticeId)
55 55
         {
56 56
 
57 57
             return dal.GetModel(F_NoticeId);
@@ -124,6 +124,13 @@ namespace CallCenterApi.BLL
124 124
             return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
125 125
         }
126 126
 
127
+        /// <summary>
128
+        /// 处理一条数据
129
+        /// </summary>
130
+        public bool DealList(string F_NoticeId)
131
+        {
132
+            return dal.DealList(F_NoticeId);
133
+        }
127 134
         #endregion  BasicMethod
128 135
         #region  ExtensionMethod
129 136
 

+ 30 - 7
codegit/CallCenterApi/CallCenterApi.DAL/T_Msg_NoticeInfo.cs

@@ -91,7 +91,7 @@ namespace CallCenterApi.DAL
91 91
                     new SqlParameter("@F_RoleId", SqlDbType.NVarChar,2000),
92 92
                     new SqlParameter("@F_isCus", SqlDbType.Int,4),
93 93
                     new SqlParameter("@F_isDel", SqlDbType.Int,4),
94
-                    new SqlParameter("@F_NoticeId", SqlDbType.Int,4)};
94
+                    new SqlParameter("@F_NoticeId", SqlDbType.NVarChar,50)};
95 95
             parameters[0].Value = model.F_Title;
96 96
             parameters[1].Value = model.F_Content;
97 97
             parameters[2].Value = model.F_CreateOn;
@@ -118,7 +118,7 @@ namespace CallCenterApi.DAL
118 118
         /// <summary>
119 119
         /// 删除一条数据
120 120
         /// </summary>
121
-        public bool Delete(int F_NoticeId)
121
+        public bool Delete(string F_NoticeId)
122 122
         {
123 123
 
124 124
             StringBuilder strSql = new StringBuilder();
@@ -126,7 +126,7 @@ namespace CallCenterApi.DAL
126 126
             strSql.Append("update T_Msg_NoticeInfo set F_isDel=1");
127 127
             strSql.Append(" where F_NoticeId=@F_NoticeId");
128 128
             SqlParameter[] parameters = {
129
-                    new SqlParameter("@F_NoticeId", SqlDbType.Int,4)
129
+                    new SqlParameter("@F_NoticeId", SqlDbType.NVarChar ,50)
130 130
             };
131 131
             parameters[0].Value = F_NoticeId;
132 132
 
@@ -164,14 +164,14 @@ namespace CallCenterApi.DAL
164 164
         /// <summary>
165 165
         /// 得到一个对象实体
166 166
         /// </summary>
167
-        public CallCenterApi.Model.T_Msg_NoticeInfo GetModel(int F_NoticeId)
167
+        public CallCenterApi.Model.T_Msg_NoticeInfo GetModel(string F_NoticeId)
168 168
         {
169 169
 
170 170
             StringBuilder strSql = new StringBuilder();
171 171
             strSql.Append("select  top 1 * from T_Msg_NoticeInfo ");
172 172
             strSql.Append(" where F_NoticeId=@F_NoticeId");
173 173
             SqlParameter[] parameters = {
174
-                    new SqlParameter("@F_NoticeId", SqlDbType.Int,4)
174
+                    new SqlParameter("@F_NoticeId", SqlDbType.NVarChar ,50)
175 175
             };
176 176
             parameters[0].Value = F_NoticeId;
177 177
 
@@ -198,7 +198,7 @@ namespace CallCenterApi.DAL
198 198
             {
199 199
                 if (row["F_NoticeId"] != null && row["F_NoticeId"].ToString() != "")
200 200
                 {
201
-                    model.F_NoticeId = int.Parse(row["F_NoticeId"].ToString());
201
+                    model.F_NoticeId = row["F_NoticeId"].ToString();
202 202
                 }
203 203
                 if (row["F_Title"] != null)
204 204
                 {
@@ -240,7 +240,10 @@ namespace CallCenterApi.DAL
240 240
                 {
241 241
                     model.F_isDel = int.Parse(row["F_isDel"].ToString());
242 242
                 }
243
-
243
+                if (row["F_isDeal"] != null && row["F_isDeal"].ToString() != "")
244
+                {
245
+                    model.F_isDeal = int.Parse(row["F_isDeal"].ToString());
246
+                }
244 247
             }
245 248
             return model;
246 249
         }
@@ -328,6 +331,26 @@ namespace CallCenterApi.DAL
328 331
             return DbHelperSQL.Query(strSql.ToString());
329 332
         }
330 333
 
334
+
335
+        /// <summary>
336
+        /// 处理数据
337
+        /// </summary>
338
+        public bool DealList(string F_NoticeId)
339
+        {
340
+            StringBuilder strSql = new StringBuilder();
341
+            //strSql.Append("delete from T_Msg_NoticeInfo ");
342
+            strSql.Append("update T_Msg_NoticeInfo set F_isDeal=1");
343
+            strSql.Append(" where F_NoticeId = '"+F_NoticeId +"'");
344
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
345
+            if (rows > 0)
346
+            {
347
+                return true;
348
+            }
349
+            else
350
+            {
351
+                return false;
352
+            }
353
+        }
331 354
         #endregion  BasicMethod
332 355
         #region  ExtensionMethod
333 356
 

File diff suppressed because it is too large
+ 93 - 11
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs


+ 34 - 6
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/information/NoticeController.cs

@@ -65,7 +65,7 @@ namespace CallCenterApi.Interface.Controllers.information
65 65
             var users = ""; var roles = "";
66 66
             if (noticeid != null && noticeid.Trim()!="")
67 67
             {
68
-                Model.T_Msg_NoticeInfo dModel = dBLL.GetModel(int.Parse(noticeid.Trim()));
68
+                Model.T_Msg_NoticeInfo dModel = dBLL.GetModel(noticeid.Trim());
69 69
                 if (dModel != null)
70 70
                 {
71 71
                     users = dModel.F_UserId.Trim(',');
@@ -178,7 +178,7 @@ namespace CallCenterApi.Interface.Controllers.information
178 178
             int roleId = CurrentUser.UserData.F_RoleId;
179 179
             DataTable dt = new DataTable();
180 180
             
181
-            string sql = " F_isDel=0 and (ISNULL(F_UserId,'') = '' or ISNULL(F_UserId,'') like '%," + userID + ",%') ";
181
+            string sql = " F_isDel=0 and F_isDeal=0 and (ISNULL(F_UserId,'') = '' or ISNULL(F_UserId,'') like '%," + userID + ",%') ";
182 182
             dt = new BLL.T_Msg_NoticeInfo().GetList(top, sql, " F_NoticeId desc ").Tables[0];
183 183
             int recordCount = dt.Rows.Count;
184 184
             var obj = new
@@ -194,7 +194,7 @@ namespace CallCenterApi.Interface.Controllers.information
194 194
         public ActionResult GetNotice(string noticeid)
195 195
         {
196 196
             Model.T_Sys_UserAccount userModel = new Model.T_Sys_UserAccount();
197
-            Model.T_Msg_NoticeInfo dModel = dBLL.GetModel(int.Parse(noticeid.Trim()));
197
+            Model.T_Msg_NoticeInfo dModel = dBLL.GetModel(noticeid.Trim());
198 198
             if (dModel != null)
199 199
             {
200 200
                 if (dModel.F_CreateBy != null)
@@ -227,7 +227,7 @@ namespace CallCenterApi.Interface.Controllers.information
227 227
         public ActionResult AddNotice(string title, string content, string userid, string roleid, int iscus = 0)
228 228
         {
229 229
             Model.T_Msg_NoticeInfo dModel = new Model.T_Msg_NoticeInfo();
230
-
230
+            dModel.F_NoticeId = DateTime.Now.ToString("yyyyMMddHHmmssfff");
231 231
             if (title != null)
232 232
                 dModel.F_Title = title.Trim();
233 233
             if (content != null)
@@ -291,7 +291,7 @@ namespace CallCenterApi.Interface.Controllers.information
291 291
         {
292 292
             if (noticeid != null && noticeid.Trim() != "")
293 293
             {
294
-                Model.T_Msg_NoticeInfo dModel = dBLL.GetModel(int.Parse(noticeid.Trim()));
294
+                Model.T_Msg_NoticeInfo dModel = dBLL.GetModel(noticeid.Trim());
295 295
                 if (dModel != null)
296 296
                 {
297 297
                     if (title != null)
@@ -336,7 +336,7 @@ namespace CallCenterApi.Interface.Controllers.information
336 336
                                 msg = new Model.T_Msg_List();
337 337
                                 msg.Type = (int)Model.MSGType.notice;
338 338
                                 msg.ToUser = item;
339
-                                msg.ToID = dModel.F_NoticeId;
339
+                                msg.ToID = int.Parse(dModel.F_NoticeId);
340 340
                                 msg.Detail = title.Trim();
341 341
                                 msg.State = 0;
342 342
                                 msg.IsDel = 0;
@@ -399,5 +399,33 @@ namespace CallCenterApi.Interface.Controllers.information
399 399
             }
400 400
 
401 401
         }
402
+
403
+        
404
+        [Authority]
405
+        //处理公告
406
+        public ActionResult DealNotice(string id)
407
+        {
408
+            if (!string .IsNullOrEmpty (id))
409
+            {
410
+                
411
+                bool r = dBLL.DealList(id);
412
+
413
+                if (r)
414
+                {
415
+                    //若通知删除则取消消息提醒
416
+                    DbHelperSQL.ExecuteSql("update T_Msg_List set IsDel=1 where ToID ='"+id+"' and Type=5");
417
+                    return Success("删除成功");
418
+                }
419
+                else
420
+                {
421
+                    return Error("删除失败");
422
+                }
423
+            }
424
+            else
425
+            {
426
+                return Error("获取参数失败");
427
+            }
428
+
429
+        }
402 430
     }
403 431
 }

+ 13 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -466,7 +466,16 @@ namespace CallCenterApi.Interface.Controllers.knowledge
466 466
                 {
467 467
                     System.IO.Directory.CreateDirectory(localPath);
468 468
                 }
469
-                file.SaveAs(Path.Combine(localPath, filePathName));
469
+                #region
470
+                int iLen = file.ContentLength;
471
+                byte[] bData = new byte[iLen];
472
+                file.InputStream.Read(bData, 0, iLen);
473
+
474
+                FileStream newFile = new FileStream(path + filePathName, FileMode.Create);
475
+                newFile.Write(bData, 0, bData.Length);
476
+                newFile.Flush();
477
+                #endregion
478
+                //file.SaveAs(Path.Combine(localPath, filePathName));
470 479
                 #region 添加日志
471 480
                 Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
472 481
                 model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
@@ -495,5 +504,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
495 504
         }
496 505
 
497 506
         #endregion
507
+
508
+       
498 509
     }
499
-}
510
+}

+ 12 - 7
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/DaysTalkTimeController.cs

@@ -19,7 +19,7 @@ namespace CallCenterApi.Interface.Controllers.report
19 19
         {
20 20
             ActionResult res = NoToken("未知错误,请重新登录");
21 21
             
22
-                String[] str = { "日期", "呼入次数", "呼入时长", "呼出次数", "呼出时长", "呼出未接通次数", "振铃时长", "通话总时长", "平均通话时长" };
22
+                String[] str = { "日期", "呼入次数", "呼入时长","呼入未接通次数", "呼出次数", "呼出时长", "呼出未接通次数", "振铃时长", "通话总时长", "平均通话时长" };
23 23
                 res = Success("获取日通话时长统计表头成功", str);
24 24
        
25 25
             return res;
@@ -143,12 +143,13 @@ namespace CallCenterApi.Interface.Controllers.report
143 143
             DataColumn dc1 = new DataColumn("日期", Type.GetType("System.String"));
144 144
             DataColumn dc2 = new DataColumn("呼入次数", Type.GetType("System.String"));
145 145
             DataColumn dc3 = new DataColumn("呼入时长", Type.GetType("System.String"));
146
-            DataColumn dc4 = new DataColumn("呼出次数", Type.GetType("System.String"));
147
-            DataColumn dc5 = new DataColumn("呼出时长", Type.GetType("System.String"));
148
-            DataColumn dc6 = new DataColumn("呼出未接通次数", Type.GetType("System.String"));
149
-            DataColumn dc7 = new DataColumn("振铃时长", Type.GetType("System.String"));
150
-            DataColumn dc8 = new DataColumn("通话总时长", Type.GetType("System.String"));
151
-            DataColumn dc9 = new DataColumn("平均通话总时长", Type.GetType("System.String"));
146
+            DataColumn dc4 = new DataColumn("呼入未接通次数", Type.GetType("System.String"));
147
+            DataColumn dc5 = new DataColumn("呼出次数", Type.GetType("System.String"));
148
+            DataColumn dc6 = new DataColumn("呼出时长", Type.GetType("System.String"));
149
+            DataColumn dc7 = new DataColumn("呼出未接通次数", Type.GetType("System.String"));
150
+            DataColumn dc8 = new DataColumn("振铃时长", Type.GetType("System.String"));
151
+            DataColumn dc9 = new DataColumn("通话总时长", Type.GetType("System.String"));
152
+            DataColumn dc10 = new DataColumn("平均通话总时长", Type.GetType("System.String"));
152 153
 
153 154
             dtNew.Columns.Add(dc1);
154 155
             dtNew.Columns.Add(dc2);
@@ -159,6 +160,7 @@ namespace CallCenterApi.Interface.Controllers.report
159 160
             dtNew.Columns.Add(dc7);
160 161
             dtNew.Columns.Add(dc8);
161 162
             dtNew.Columns.Add(dc9);
163
+            dtNew.Columns.Add(dc10);
162 164
             #endregion
163 165
 
164 166
             DateTime beginTime;
@@ -191,9 +193,11 @@ namespace CallCenterApi.Interface.Controllers.report
191 193
             {
192 194
                 string key = t.ToString("yyyyMMdd");
193 195
                 DataRow[] drsin = dt.Select("begintime >='" + t.ToString() + "' and begintime<'" + t.AddDays(1).ToString() + "' and CallType=0");
196
+                DataRow[] drswin = dt.Select("begintime >='" + t.ToString() + "' and begintime<'" + t.AddDays(1).ToString() + "' and CallType=0 and CallState=0 ");
194 197
                 DataRow[] drsout = dt.Select("begintime >='" + t.ToString() + "' and begintime<'" + t.AddDays(1).ToString() + "' and CallType=1");
195 198
                 DataRow[] drswout = dt.Select("begintime >='" + t.ToString() + "' and begintime<'" + t.AddDays(1).ToString() + "' and CallType=1 and CallState=0 ");
196 199
                 int callincount = drsin.Length;
200
+                int callinwcount = drswin.Length;
197 201
                 int calloutcount = drsout.Length;
198 202
                 int callwoutcount = drswout.Length;
199 203
                 string thsc = gettimes(dt.Select("begintime >='" + t.ToString() + "' and begintime<'" + t.AddDays(1).ToString() + "' "), 0);
@@ -205,6 +209,7 @@ namespace CallCenterApi.Interface.Controllers.report
205 209
                 drNew["日期"] = key;
206 210
                 drNew["呼入次数"] = callincount;
207 211
                 drNew["呼入时长"] = hrsc + "S";
212
+                drNew["呼入未接通次数"] = callinwcount;
208 213
                 drNew["呼出次数"] = calloutcount;
209 214
                 drNew["呼出时长"] = hcsc + "S";
210 215
                 drNew["呼出未接通次数"] = callwoutcount;

+ 16 - 11
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/TalkTimeController.cs

@@ -20,7 +20,7 @@ namespace CallCenterApi.Interface.Controllers.report
20 20
         {
21 21
             ActionResult res = NoToken("未知错误,请重新登录");
22 22
 
23
-            String[] str = { "坐席名称", "呼入次数", "呼入时长", "呼出次数", "呼出时长", "呼出未接通次数", "振铃时长", "通话总时长", "平均通话时长" };
23
+            String[] str = { "坐席名称", "呼入次数", "呼入时长","呼入未接通次数", "呼出次数", "呼出时长", "呼出未接通次数", "振铃时长", "通话总时长", "平均通话时长" };
24 24
             res = Success("获取通话时长统计表头成功", str);
25 25
 
26 26
             return res;
@@ -117,12 +117,13 @@ namespace CallCenterApi.Interface.Controllers.report
117 117
             DataColumn dc1 = new DataColumn("坐席名称", Type.GetType("System.String"));
118 118
             DataColumn dc2 = new DataColumn("呼入次数", Type.GetType("System.String"));
119 119
             DataColumn dc3 = new DataColumn("呼入时长", Type.GetType("System.String"));
120
-            DataColumn dc4 = new DataColumn("呼出次数", Type.GetType("System.String"));
121
-            DataColumn dc5 = new DataColumn("呼出时长", Type.GetType("System.String"));
122
-            DataColumn dc6 = new DataColumn("呼出未接通次数", Type.GetType("System.String"));
123
-            DataColumn dc7 = new DataColumn("振铃时长", Type.GetType("System.String"));
124
-            DataColumn dc8 = new DataColumn("通话总时长", Type.GetType("System.String"));
125
-            DataColumn dc9 = new DataColumn("平均通话总时长", Type.GetType("System.String"));
120
+            DataColumn dc4 = new DataColumn("呼入未接通次数", Type.GetType("System.String"));
121
+            DataColumn dc5 = new DataColumn("呼出次数", Type.GetType("System.String"));
122
+            DataColumn dc6 = new DataColumn("呼出时长", Type.GetType("System.String"));
123
+            DataColumn dc7 = new DataColumn("呼出未接通次数", Type.GetType("System.String"));
124
+            DataColumn dc8 = new DataColumn("振铃时长", Type.GetType("System.String"));
125
+            DataColumn dc9 = new DataColumn("通话总时长", Type.GetType("System.String"));
126
+            DataColumn dc10 = new DataColumn("平均通话总时长", Type.GetType("System.String"));
126 127
 
127 128
             dtNew.Columns.Add(dc1);
128 129
             dtNew.Columns.Add(dc2);
@@ -133,10 +134,13 @@ namespace CallCenterApi.Interface.Controllers.report
133 134
             dtNew.Columns.Add(dc7);
134 135
             dtNew.Columns.Add(dc8);
135 136
             dtNew.Columns.Add(dc9);
137
+            dtNew.Columns.Add(dc10);
136 138
             #endregion
137 139
 
138
-            string[] CallInTime = GetCallRecordIn(stime, endtime, "0").TrimStart('[').TrimEnd(']').Split(',');
140
+            string[] CallInTime = GetCallRecordIn(stime, endtime, "0","").TrimStart('[').TrimEnd(']').Split(',');
139 141
             string[] CallInTimes = GetCallRecordTotalTime(stime, endtime, "0").TrimStart('[').TrimEnd(']').Split(',');
142
+            //加入呼入未接通量指标
143
+            string[] CallInWTime = GetCallRecordIn(stime, endtime, "0", "0").TrimStart('[').TrimEnd(']').Split(',');
140 144
             string[] CallOutTime = GetCallRecordOut(stime, endtime, "1", "").TrimStart('[').TrimEnd(']').Split(',');
141 145
             string[] CallOutTimes = GetCallRecordTotalTime(stime, endtime, "1").TrimStart('[').TrimEnd(']').Split(',');
142 146
             string[] CallOutWTime = GetCallRecordOut(stime, endtime, "1", "0").TrimStart('[').TrimEnd(']').Split(',');
@@ -152,6 +156,7 @@ namespace CallCenterApi.Interface.Controllers.report
152 156
                 drNew["坐席名称"] = AgentArr[i].Replace('\'', ' ');
153 157
                 drNew["呼入次数"] = CallInTime[i];
154 158
                 drNew["呼入时长"] = CallInTimes[i];
159
+                drNew["呼入未接通次数"] = CallInWTime[i];
155 160
                 drNew["呼出次数"] = CallOutTime[i];
156 161
                 drNew["呼出时长"] = CallOutTimes[i];
157 162
                 drNew["呼出未接通次数"] = CallOutWTime[i];
@@ -244,7 +249,7 @@ namespace CallCenterApi.Interface.Controllers.report
244 249
         {
245 250
             string result = "[";
246 251
 
247
-            string[] CallInTime = GetCallRecordIn(BeginTime, EndTime, "0").TrimStart('[').TrimEnd(']').Split(',');
252
+            string[] CallInTime = GetCallRecordIn(BeginTime, EndTime, "0","").TrimStart('[').TrimEnd(']').Split(',');
248 253
             string[] CallOutTime = GetCallRecordOut(BeginTime, EndTime, "1", "").TrimStart('[').TrimEnd(']').Split(',');
249 254
 
250 255
             string[] CallTotalTime = GetCallRecordTotalTime(BeginTime, EndTime, "").TrimStart('[').TrimEnd(']').Split(',');
@@ -274,9 +279,9 @@ namespace CallCenterApi.Interface.Controllers.report
274 279
         /// <param name="BeginTime">开始时间</param>
275 280
         /// <param name="EndTime">结束时间</param>
276 281
         /// <returns></returns>
277
-        public string GetCallRecordIn(string BeginTime, string EndTime, string Tag)
282
+        public string GetCallRecordIn(string BeginTime, string EndTime, string Tag,string calltype)
278 283
         {
279
-            return GetHighChartData(BeginTime, EndTime, Tag, "");
284
+            return GetHighChartData(BeginTime, EndTime, Tag, calltype);
280 285
         }
281 286
         /// <summary>
282 287
         /// 获取呼入呼出数据

+ 92 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WOReportController.cs

@@ -147,5 +147,97 @@ namespace CallCenterApi.Interface.Controllers.report
147 147
 
148 148
             return dtNew;
149 149
         }
150
+
151
+        //工单子类统计表
152
+        public ActionResult GetZLReport(string stime, string endtime)
153
+        {
154
+            //stime = "2018-01-01";
155
+            //endtime = "2020-01-01";
156
+            ActionResult res = NoToken("未知错误,请重新登录");
157
+            string sql = "";
158
+            #region 查询数据
159
+            //来电记录
160
+            if (string.IsNullOrEmpty(stime))
161
+            {
162
+                stime = DateTime.Now.ToString("yyyy-MM")+"-01";
163
+            }
164
+            if (string.IsNullOrEmpty(endtime))
165
+            {
166
+                stime = DateTime.Now.ToString("yyyy-MM-dd");
167
+            }
168
+           
169
+                sql += " and LastDealTime>='" + stime + " 00:00:00' ";
170
+            
171
+                sql += " and LastDealTime<='" + endtime + " 23:59:59' ";
172
+            
173
+            #endregion
174
+            
175
+            
176
+            DataSet ds = DbHelperSQL.Query("SELECT dbo.GetGDLXName(CType) as typename,count(*) as count  FROM T_Wo_WorkOrder where state >= 10 " + sql +" group by CType");
177
+            if (ds != null && ds.Tables.Count > 0)
178
+            {
179
+                DataTable dt = ds.Tables[0];
180
+                DataRow dr = dt.NewRow();
181
+                string Sum = dt.Compute("sum(count)", "true").ToString();
182
+                dr["typename"] = "总计";
183
+                dr["count"] = Sum;
184
+                dt.Rows.InsertAt(dr, 0);
185
+                res = Success("获取工单子类统计数据成功", dt);
186
+            }
187
+            else if (ds != null)
188
+            {
189
+                res = Success("此时间段内没有工单子类数据");
190
+            }
191
+           
192
+            
193
+
194
+            return res;
195
+        }
196
+
197
+        //部门处理情况统计表
198
+        public ActionResult GetDeptReport(string stime, string endtime)
199
+        {
200
+            //stime = "2018-01-01";
201
+            //endtime = "2020-01-01";
202
+            ActionResult res = NoToken("未知错误,请重新登录");
203
+            string sql = "";
204
+            #region 查询数据
205
+            //来电记录
206
+            if (string.IsNullOrEmpty(stime))
207
+            {
208
+                stime = DateTime.Now.ToString("yyyy-MM") + "-01";
209
+            }
210
+            if (string.IsNullOrEmpty(endtime))
211
+            {
212
+                stime = DateTime.Now.ToString("yyyy-MM-dd");
213
+            }
214
+
215
+            sql += " and LastDealTime>='" + stime + " 00:00:00' ";
216
+
217
+            sql += " and LastDealTime<='" + endtime + " 23:59:59' ";
218
+
219
+            #endregion
220
+
221
+
222
+            DataSet ds = DbHelperSQL.Query("SELECT dbo.GetDeptName(ToDept) as deptname,count(*) as count  FROM T_Wo_WorkOrder where state >= 10 " + sql + " group by ToDept");
223
+            if (ds != null && ds.Tables.Count > 0)
224
+            {
225
+                DataTable dt = ds.Tables[0];
226
+                DataRow dr = dt.NewRow();
227
+                string Sum = dt.Compute("sum(count)", "true").ToString();
228
+                dr["deptname"] = "总计";
229
+                dr["count"] = Sum;
230
+                dt.Rows.InsertAt(dr, 0);
231
+                res = Success("获取部门处理情况统计数据成功", dt);
232
+            }
233
+            else if (ds != null)
234
+            {
235
+                res = Success("此时间段内没有部门处理数据");
236
+            }
237
+
238
+
239
+
240
+            return res;
241
+        }
150 242
     }
151 243
 }

+ 18 - 8
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -552,6 +552,12 @@ namespace CallCenterApi.Interface.Controllers.tel
552 552
                         int gdlx = RequestString.GetFormInt("gdlx", 0);
553 553
                         //业务类型
554 554
                         int ywlx = RequestString.GetFormInt("ywlx", 0);
555
+
556
+                        //工单子类
557
+                        int gdzl = RequestString.GetFormInt("ctype", 0);
558
+                        string leaveid= RequestString.GetFormString("leaveid");
559
+                        string files = RequestString.GetFormString("files");
560
+
555 561
                         //客户id
556 562
                         int customerid = RequestString.GetFormInt("customerid", 0);
557 563
                         //客户姓名
@@ -576,14 +582,10 @@ namespace CallCenterApi.Interface.Controllers.tel
576 582
                         //是否结束
577 583
                         int isover = RequestString.GetFormInt("isover", 0);
578 584
 
579
-                        #region 添加验证判断
580
-                        if (string.IsNullOrEmpty(callCustomer))
581
-                            return Error("姓名不能为空!");
582
-                        if (string.IsNullOrEmpty(tel))
583
-                            return Error("电话不能为空!");
584
-                        if (clbm != 0 && clid == 0)
585
-                            return Error("请选择接收人");
586
-                        #endregion
585
+                        //截止时间
586
+                        string limitdate = RequestString.GetFormString("limitdate");
587
+
588
+                       
587 589
 
588 590
                         Model.T_Wo_WorkOrder model = new Model.T_Wo_WorkOrder();
589 591
                         model.WorkOrderID = DateTime.Now.ToString("yyyyMMddHHmmssfff");  //工单编号                        
@@ -601,6 +603,14 @@ namespace CallCenterApi.Interface.Controllers.tel
601 603
                         model.AuditUser = auditusercode;  //受理人 - 审核人工号
602 604
                         model.State = (int)EnumWorkOrderState.neworder;//0;    //工单状态
603 605
                         model.ResponDept = clbm;//指派部门
606
+                        model.Files = files;
607
+                        model.CType = gdzl;
608
+                        model.LeaveId = leaveid;
609
+                        //添加截止时间
610
+                        if (!string.IsNullOrEmpty(limitdate))
611
+                        {
612
+                            model.LimitDate = DateTime.Parse(limitdate );
613
+                        }
604 614
                         #region 获取接收人
605 615
                         string touser = ""; string tousername = "";
606 616
                         if (clid != 0)

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -1143,7 +1143,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1143 1143
                 return Error("参数错误");
1144 1144
             if (string.IsNullOrEmpty(stropenid))
1145 1145
                 return Error("参数错误!");
1146
-            var dModel = new BLL.T_Msg_NoticeInfo().GetModel(int.Parse(strnoticeid.Trim()));
1146
+            var dModel = new BLL.T_Msg_NoticeInfo().GetModel(strnoticeid.Trim());
1147 1147
             Model.T_Sys_UserAccount userModel = new Model.T_Sys_UserAccount();
1148 1148
 
1149 1149
             if (dModel != null)
@@ -1175,7 +1175,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1175 1175
                     Model.T_Msg_List msg = new Model.T_Msg_List();
1176 1176
                     msg.Type = (int)Model.MSGType.cusnotice;
1177 1177
                     msg.ToUser = usercode;
1178
-                    msg.ToID = dModel.F_NoticeId;
1178
+                    msg.ToID = int.Parse(dModel.F_NoticeId);
1179 1179
                     msg.Detail = "客户" + usercode + "查看了公告《" + dModel.F_Title + "》";
1180 1180
                     msg.State = 1;
1181 1181
                     msg.IsDel = 0;

File diff suppressed because it is too large
+ 126 - 16
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs


+ 6 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Enum/EnumWorkOrderState.cs

@@ -27,6 +27,8 @@ namespace CallCenterApi.Interface.Models.Enum
27 27
         finish=10,
28 28
         [Description("已评价")]
29 29
         evaluate,
30
+        [Description("已回访")]
31
+        returnbak,
30 32
     }
31 33
     /// <summary>
32 34
     /// 工单记录类型枚举
@@ -43,6 +45,8 @@ namespace CallCenterApi.Interface.Models.Enum
43 45
         update = 4,
44 46
         [Description("删除")]
45 47
         delete = 5,
48
+        [Description("回访")]
49
+        returnbak = 6,
46 50
     }
47 51
     /// <summary>
48 52
     /// 工单记录操作
@@ -73,5 +77,7 @@ namespace CallCenterApi.Interface.Models.Enum
73 77
         delete,
74 78
         [Description("审核")]
75 79
         audit,
80
+        [Description("回访")]
81
+        returnbak,
76 82
     }
77 83
 }

+ 14 - 2
codegit/CallCenterApi/CallCenterApi.Model/T_Msg_NoticeInfo.cs

@@ -15,7 +15,7 @@ namespace CallCenterApi.Model
15 15
         public T_Msg_NoticeInfo()
16 16
         { }
17 17
         #region Model
18
-        private int _f_noticeid;
18
+        private string _f_noticeid;
19 19
         private string _f_title;
20 20
         private string _f_content;
21 21
         private DateTime? _f_createon = DateTime.Now;
@@ -26,10 +26,11 @@ namespace CallCenterApi.Model
26 26
         private string _f_roleid;
27 27
         private int? _f_iscus;
28 28
         private int? _f_isdel;
29
+        private int _f_isdeal=0;
29 30
         /// <summary>
30 31
         /// 公告Id
31 32
         /// </summary>
32
-        public int F_NoticeId
33
+        public string F_NoticeId
33 34
         {
34 35
             set { _f_noticeid = value; }
35 36
             get { return _f_noticeid; }
@@ -128,7 +129,18 @@ namespace CallCenterApi.Model
128 129
             }
129 130
         }
130 131
 
132
+        public int F_isDeal
133
+        {
134
+            get
135
+            {
136
+                return _f_isdeal;
137
+            }
131 138
 
139
+            set
140
+            {
141
+                _f_isdeal = value;
142
+            }
143
+        }
132 144
         #endregion Model
133 145
     }
134 146
 }

+ 105 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrder.cs

@@ -52,11 +52,21 @@ namespace CallCenterApi.Model
52 52
         private DateTime? _audittime;
53 53
         private string _auditcont;
54 54
         private DateTime? _appointtime;
55
+        private string _appointcode;
55 56
         private string _clcontent;
56 57
         private string _createuserid;
57 58
         private string _buildingnum;
58 59
         private string _unitnum;
59 60
         private string _score;
61
+        private DateTime? _limitdate;
62
+        private string _todept;
63
+        private string _surecode;
64
+        private DateTime? _suretime;
65
+        private string _returncode;
66
+        private string _returncontent;
67
+        private string _appointcontent;
68
+        private int? _ctype;
69
+        private string _leaveid;
60 70
         /// <summary>
61 71
         /// 工单ID
62 72
         /// </summary>
@@ -379,6 +389,15 @@ namespace CallCenterApi.Model
379 389
         }
380 390
 
381 391
         /// <summary>
392
+        /// 派单人
393
+        /// </summary>
394
+        public string AppointCode
395
+        {
396
+            set { _appointcode = value; }
397
+            get { return _appointcode; }
398
+        }
399
+
400
+        /// <summary>
382 401
         /// 处理内容
383 402
         /// </summary>
384 403
         public string Clcontent
@@ -439,6 +458,92 @@ namespace CallCenterApi.Model
439 458
             get { return _score; }
440 459
             set { _score = value; }
441 460
         }
461
+
462
+        /// <summary>
463
+        /// 工单办理截止时间(超时)
464
+        /// </summary>
465
+        public DateTime? LimitDate
466
+        {
467
+            set { _limitdate = value; }
468
+            get { return _limitdate; }
469
+        }
470
+
471
+        /// <summary>
472
+        /// 指给部门
473
+        /// </summary>
474
+        public string ToDept
475
+        {
476
+            get { return _todept; }
477
+            set { _todept = value; }
478
+        }
479
+
480
+        /// <summary>
481
+        /// 接单人
482
+        /// </summary>
483
+        public string SureCode
484
+        {
485
+            set { _surecode = value; }
486
+            get { return _surecode; }
487
+        }
488
+        /// <summary>
489
+        /// 接单时间
490
+        /// </summary>
491
+        public DateTime? SureTime
492
+        {
493
+            set { _suretime = value; }
494
+            get { return _suretime; }
495
+        }
496
+
497
+        /// <summary>
498
+        /// 回访人
499
+        /// </summary>
500
+        public string ReturnCode
501
+        {
502
+            set { _returncode = value; }
503
+            get { return _returncode; }
504
+        }
505
+
506
+        /// <summary>
507
+        /// 回访详情
508
+        /// </summary>
509
+        public string ReturnContent
510
+        {
511
+            set { _returncontent = value; }
512
+            get { return _returncontent; }
513
+        }
514
+        /// <summary>
515
+        /// 指派详情
516
+        /// </summary>
517
+        public string AppointContent
518
+        {
519
+            get
520
+            {
521
+                return _appointcontent;
522
+            }
523
+
524
+            set
525
+            {
526
+                _appointcontent = value;
527
+            }
528
+        }
529
+
530
+        /// <summary>
531
+        /// 工单子类
532
+        /// </summary>
533
+        public int? CType
534
+        {
535
+            set { _ctype = value; }
536
+            get { return _ctype; }
537
+        }
538
+        /// <summary>
539
+        /// 语音留言id
540
+        /// </summary>
541
+        public string LeaveId
542
+        {
543
+            set { _leaveid = value; }
544
+            get { return _leaveid; }
545
+        }
546
+
442 547
         #endregion Model
443 548
 
444 549
     }