duhongyu 5 years ago
parent
commit
8979686e43

File diff suppressed because it is too large
+ 17 - 1
codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs


+ 38 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/AddressBookController.cs

@@ -268,13 +268,30 @@ namespace CallCenterApi.Interface.Controllers
268 268
                 }
269 269
                 if (userModel.F_See == "5")
270 270
                     return Success("暂无记录");
271
-                Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(dptid);
271
+              
272 272
                 DataTable dt = new DataTable();
273 273
                 string sql = "F_IsDelete=0 ";
274 274
                 if (!string.IsNullOrEmpty(keywords))
275 275
                 {
276
-                    sql += $"  and ( F_Name like '%" + keywords.Trim() + "%'or F_Telephone like '%" + keywords.Trim() + "%'or F_Mobile like '%" + keywords.Trim() + "%'or F_ElseMobile like '%" + keywords.Trim() + "%'or F_Department like '%" + keywords.Trim() + "%' ) ";
276
+                    var dept = new BLL.T_Sys_Department().GetModelList("F_DeptName like '%" + keywords + "%'").FirstOrDefault();
277
+
278
+                    if (dept != null)
279
+                    {
280
+                        if (dptid == 1)
281
+                            dptid = dept.F_DeptId;
282
+                        else
283
+                        {
284
+                            sql += $"  and ( F_Name like '%" + keywords.Trim() + "%'or F_Telephone like '%" + keywords.Trim() + "%'or F_Mobile like '%" + keywords.Trim() + "%'or F_ElseMobile like '%" + keywords.Trim() + "%'or F_Department like '%" + keywords.Trim() + "%' ) ";
285
+                        }
286
+
287
+                    }
288
+                    else
289
+                    {
290
+                        sql += $"  and ( F_Name like '%" + keywords.Trim() + "%'or F_Telephone like '%" + keywords.Trim() + "%'or F_Mobile like '%" + keywords.Trim() + "%'or F_ElseMobile like '%" + keywords.Trim() + "%'or F_Department like '%" + keywords.Trim() + "%' ) ";
291
+                    }
292
+                   
277 293
                 }
294
+                Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(dptid);
278 295
                 if (dptid > 0)
279 296
                 {
280 297
 
@@ -305,13 +322,30 @@ namespace CallCenterApi.Interface.Controllers
305 322
                 }
306 323
                 if (userModel.F_See == "5")
307 324
                     return Success("暂无记录");
308
-                Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(dptid);
325
+             
309 326
                 DataTable dt = new DataTable();
310 327
                 string sql = "F_IsDelete=0 ";
311 328
                 if (!string.IsNullOrEmpty(keywords))
312 329
                 {
313
-                    sql += $"  and ( F_Name like '%" + keywords.Trim() + "%'or F_Telephone like '%" + keywords.Trim() + "%'or F_Mobile like '%" + keywords.Trim() + "%'or F_ElseMobile like '%" + keywords.Trim() + "%'or F_Department like '%" + keywords.Trim() + "%' ) ";
330
+                    var dept = new BLL.T_Sys_Department().GetModelList("F_DeptName like '%" + keywords + "%'").FirstOrDefault();
331
+
332
+                    if (dept != null)
333
+                    {
334
+                        if (dptid == 1)
335
+                            dptid = dept.F_DeptId;
336
+                        else
337
+                        {
338
+                            sql += $"  and ( F_Name like '%" + keywords.Trim() + "%'or F_Telephone like '%" + keywords.Trim() + "%'or F_Mobile like '%" + keywords.Trim() + "%'or F_ElseMobile like '%" + keywords.Trim() + "%'or F_Department like '%" + keywords.Trim() + "%' ) ";
339
+                        }
340
+
341
+                    }
342
+                    else
343
+                    {
344
+                        sql += $"  and ( F_Name like '%" + keywords.Trim() + "%'or F_Telephone like '%" + keywords.Trim() + "%'or F_Mobile like '%" + keywords.Trim() + "%'or F_ElseMobile like '%" + keywords.Trim() + "%'or F_Department like '%" + keywords.Trim() + "%' ) ";
345
+                    }
346
+                  
314 347
                 }
348
+                Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(dptid);
315 349
                 if (dptid > 0)
316 350
                 {
317 351
 

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/ApplicationsVersionController.cs

@@ -123,7 +123,7 @@ namespace CallCenterApi.Interface.Controllers
123 123
         public ActionResult GetAndroid(int type=0)
124 124
         {
125 125
             var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
126
-            var model = new BLL.T_Sys_ApplicationsVersion().GetModelList("F_IsDelete=0 and F_Type=0 order by F_ID DESC ").FirstOrDefault();
126
+            var model = new BLL.T_Sys_ApplicationsVersion().GetModelList("F_IsDelete=0 and F_Type="+ type + " order by F_ID DESC ").FirstOrDefault();
127 127
             if (model != null)
128 128
             {
129 129
                 ApplicationsVersion app = new ApplicationsVersion();

+ 3 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/CallOutOptController.cs

@@ -59,8 +59,9 @@ namespace CallCenterApi.Interface.Controllers
59 59
                     phone = fix + tophone,
60 60
                     fix = fix
61 61
                 };
62
-
63
-                return Success("外呼号码加前缀", obj);
62
+              
63
+              
64
+                return Success("外呼号码加前缀"+ phone, obj);
64 65
             }
65 66
             return NoToken("未知错误,请重新登录");
66 67
         }

+ 27 - 7
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -239,6 +239,31 @@ namespace CallCenterApi.Interface.Controllers
239 239
 
240 240
                     }
241 241
                 }
242
+                if (!string.IsNullOrWhiteSpace(filter.Key))
243
+                {
244
+                    var dept = new BLL.T_Sys_Department().GetModelList("F_DeptName like '%"+ filter.Key + "%'").FirstOrDefault();
245
+
246
+                      if (dept!=null )
247
+                    {
248
+                        if (filter.dptid == 1)
249
+                            filter.dptid = dept.F_DeptId;
250
+                        else
251
+                        {
252
+                            sql = "";
253
+                            string str = string.Format(" and (F_UserCode like '%{0}%' or F_UserName like '%{1}%')", filter.Key, filter.Key);
254
+                            sql += str;
255
+                        }
256
+
257
+                    }
258
+                        else
259
+                    {
260
+                        sql = "";
261
+                        string str = string.Format(" and (F_UserCode like '%{0}%' or F_UserName like '%{1}%')", filter.Key, filter.Key);
262
+                        sql += str;
263
+                    }
264
+                  
265
+                    
266
+                }
242 267
                 if (filter.dptid > 0)
243 268
                 {
244 269
                     Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(filter.dptid);
@@ -247,12 +272,7 @@ namespace CallCenterApi.Interface.Controllers
247 272
                         sql += " and F_DeptId in ( select F_DeptId from T_Sys_Department where F_DeptCode like '%" + deptModel.F_DeptCode + "%') ";
248 273
                     }
249 274
                 }
250
-                if (!string.IsNullOrWhiteSpace(filter.Key))
251
-                {
252
-                    sql = "";
253
-                    string str = string.Format(" and (F_UserCode like '%{0}%' or F_UserName like '%{1}%')", filter.Key, filter.Key);
254
-                    sql += str;
255
-                }
275
+               
256 276
                 if (filter.type == 1)
257 277
                 {
258 278
                     sql += "and F_RoleId=52";
@@ -344,7 +364,7 @@ namespace CallCenterApi.Interface.Controllers
344 364
                 if (userModel != null)
345 365
                 {
346 366
                     if (userModel.F_RoleId == 1 || userModel.F_RoleId == 4 || userModel.F_RoleId == 17
347
-                          || userModel.F_RoleId == 50 || userModel.F_RoleId == 67 || userModel.F_RoleId == 49 || userModel.F_RoleId == 66)
367
+                          || userModel.F_RoleId == 50 || userModel.F_RoleId == 67 || userModel.F_RoleId == 49 || userModel.F_RoleId == 66 || userModel.F_RoleId == 65)
348 368
                     {
349 369
                             if (filter.dptid == 0)
350 370
                             {

+ 9 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/SwitchedlossCallController.cs

@@ -27,9 +27,13 @@ namespace CallCenterApi.Interface.Controllers.report
27 27
                 DataTable dtNew = new DataTable();
28 28
                 int userId = CurrentUser.UserData.F_UserId;
29 29
                 if (string.IsNullOrEmpty(stime))
30
-                    stime = DateTime.Now.ToString("yyyy-MM-dd");
30
+                    stime = DateTime.Now.ToString("yyyy-MM-dd")+ " 00:00:00";
31
+                else
32
+                    stime += " 00:00:00";
31 33
                 if (string.IsNullOrEmpty(endtime))
32
-                    endtime = DateTime.Now.ToString("yyyy-MM-dd");
34
+                    endtime = DateTime.Now.ToString("yyyy-MM-dd")+ " 23:59:59";
35
+                else
36
+                    endtime+= " 23:59:59";
33 37
 
34 38
                 //  int callConnectCount = dt.Select("begintime >='" + t.ToString() + "' and begintime<'" + t.AddDays(1).ToString() + "' and CallState=1").Length;
35 39
                 //   int callLossCount = dt.Select("begintime >='" + t.ToString() + "' and begintime<'" + t.AddDays(1).ToString() + "' and CallState=0 and dealtype=5").Length;
@@ -49,6 +53,7 @@ namespace CallCenterApi.Interface.Controllers.report
49 53
                 {
50 54
                     sql += " and F_SeartGroupID = '" + userModel.F_SeartGroupID + "' ";
51 55
                 }
56
+
52 57
                 var CallState = new BLL.T_Call_CallRecords().GetModelList("begintime >= '" + stime + "' and begintime < '" + endtime + "' and CallState = 1");
53 58
                 var dealtype = new BLL.T_Call_CallRecords().GetModelList("begintime >= '" + stime + "' and begintime < '" + endtime + "' and CallState=0 and dealtype=5");
54 59
                 List<Model.T_Sys_UserAccount> userSeartList = new BLL.T_Sys_UserAccount().GetModelList(sql + " order by f_userid desc ");
@@ -86,8 +91,8 @@ namespace CallCenterApi.Interface.Controllers.report
86 91
                         int a = Connect[i] + Callloss[i];
87 92
                         if  (a>0)
88 93
                         {
89
-                            drNew["接通率"] = string.Format("{0}", Connect[i] / a);
90
-                            drNew["呼损率"] = string.Format("{0}", Callloss[i] / a);
94
+                            drNew["接通率"] = string.Format("{0:f2}%",(float ) Connect[i] / a*100);
95
+                            drNew["呼损率"] = string.Format("{0:f2}%", (float)Callloss[i] / a*100);
91 96
                         }
92 97
                         else
93 98
                         {

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


+ 26 - 19
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs

@@ -1518,33 +1518,40 @@ namespace CallCenterApi.Interface.Controllers.workorder
1518 1518
                                 return Error("工单已处理");
1519 1519
                             else  
1520 1520
                             {
1521
-                                if (!string.IsNullOrEmpty(model.F_DealUser))
1521
+                                var modellist = new BLL.T_Wo_WorkOrderItem_New().GetModelList("F_WoID='" + model.F_Id + "'and F_IsUsed =0 order by F_Id desc").FirstOrDefault();
1522
+                                if(modellist !=null )
1522 1523
                                 {
1523
-                                    var user = new BLL.T_Sys_UserAccount().GetModel(model.F_DealUser);
1524
-                                    string deptname = "";
1525
-                                    var dement = new BLL.T_Sys_Department().GetModel(ua.F_DeptId);
1526
-                                    if (dement != null)
1524
+                                    if (!string.IsNullOrEmpty(modellist.F_NextUser ))
1527 1525
                                     {
1528
-                                        deptname = dement.F_DeptName;
1529
-                                    }
1530
-                                    if (user != null)
1531
-                                    {
1532
-                                        if (!string .IsNullOrEmpty (user.F_Mobile))
1526
+                                        var user = new BLL.T_Sys_UserAccount().GetModel(modellist.F_NextUser);
1527
+                                        string deptname = "";
1528
+                                        var dement = new BLL.T_Sys_Department().GetModel(ua.F_DeptId);
1529
+                                        if (dement != null)
1530
+                                        {
1531
+                                            deptname = dement.F_DeptName;
1532
+                                        }
1533
+                                        if (user != null)
1533 1534
                                         {
1534
-                                            bool n = new WorkTypeController().SendReminderSMS("工单催单提醒:",user.F_Mobile, cont);
1535
-                                          //  string msg = new PushMessageController().Push(Title, count, user.F_UserCode);
1536
-                                            if (n )
1535
+                                            if (!string.IsNullOrEmpty(user.F_Mobile))
1537 1536
                                             {
1538
-                                                AddLog(model.F_Id, (int)model.F_State, deptname + ua.F_UserName + "催单:" + cont, 12, 12, "", 0, ua, 1);
1539
-                                                return Success ("催单成功");
1537
+                                                bool n = new WorkTypeController().SendReminderSMS("工单催单提醒:", user.F_Mobile, cont);
1538
+                                                //  string msg = new PushMessageController().Push(Title, count, user.F_UserCode);
1539
+                                                if (n)
1540
+                                                {
1541
+                                                    model.F_DealType = 1;
1542
+                                                    workorderBLL.Update(model);
1543
+                                                    AddLog(model.F_Id, (int)model.F_State, deptname + ua.F_UserName + "催单:" + cont, 12, 12, "", 0, ua, 1);
1544
+                                                    return Success("催单成功");
1545
+                                                }
1546
+                                                else
1547
+                                                    return Error("短信发送失败");
1540 1548
                                             }
1541
-                                            else
1542
-                                                return Error("短信发送失败");
1543
-                                        }
1544
-                                        return Error("该处理人暂无手机号码");
1549
+                                            return Error("该处理人暂无手机号码");
1545 1550
 
1551
+                                        }
1546 1552
                                     }
1547 1553
                                 }
1554
+                             
1548 1555
                                 else
1549 1556
                                     return Error("暂无处理人");
1550 1557
                             }

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WorkOrderInput.cs

@@ -335,7 +335,7 @@ namespace CallCenterApi.Interface.Models.Input
335 335
         {
336 336
             get; set;
337 337
         }
338
-        public DateTime? F_ltemlastTime
338
+        public string  F_ltemlastTime
339 339
         {
340 340
             get; set;
341 341
         }

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Model/T_Bus_WorkOrder.cs

@@ -428,7 +428,7 @@ namespace CallCenterApi.Model
428 428
             get { return _f_remark; }
429 429
         }
430 430
         /// <summary>
431
-        /// 处理类型
431
+        /// 处理类型1催单
432 432
         /// </summary>
433 433
         public int? F_DealType
434 434
         {