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

+ 2 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -568,7 +568,8 @@ namespace CallCenterApi.Interface.Controllers
568 568
         /// <returns></returns>
569 569
         public ActionResult GetDeptUserList(int deptid = 0)
570 570
         {
571
-            List<Model.T_Sys_UserAccount> DeptUserList = sysUserAccountBll.GetModelList(" 1=1 and F_DeptId=" + deptid + " order by f_userid desc ");
571
+
572
+            List<Model.T_Sys_UserAccount> DeptUserList = sysUserAccountBll.GetModelList(" 1=1 and F_DeptId=" + deptid + "and F_DeleteFlag=0  order by f_userid desc ");
572 573
             var rolelist = new BLL.T_Sys_RoleInfo().GetModelList("").ToList();
573 574
             foreach (var item in DeptUserList)
574 575
             {

+ 3 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WOReportController.cs

@@ -3317,7 +3317,7 @@ question, int page = 1, int limit = 10)
3317 3317
                                         {
3318 3318
                                             if (timeover != "")
3319 3319
                                             {
3320
-                                                if (x > y)
3320
+                                                if (y  > x )
3321 3321
                                                 {
3322 3322
                                                     System.TimeSpan id = DateTime.Parse(timeover2) - DateTime.Parse(timeover);
3323 3323
                                                     double a = id.TotalHours;
@@ -3562,7 +3562,7 @@ question, int page = 1, int limit = 10)
3562 3562
                                                 {
3563 3563
                                                     if (timeover != "")
3564 3564
                                                     {
3565
-                                                        if (x > y)
3565
+                                                        if (y  > x)
3566 3566
                                                         {
3567 3567
                                                             System.TimeSpan id = DateTime.Parse(timeover2) - DateTime.Parse(timeover);
3568 3568
                                                             double a = id.TotalHours;
@@ -4425,7 +4425,7 @@ question, int page = 1, int limit = 10)
4425 4425
                 {
4426 4426
                     if (time1 != "")
4427 4427
                     {
4428
-                        if (x > y)
4428
+                        if (y  > x )
4429 4429
                         {
4430 4430
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
4431 4431
                             float b = time - (float)a.TotalHours;

+ 32 - 6
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -2783,7 +2783,21 @@ namespace CallCenterApi.Interface.Controllers.weixin
2783 2783
                     model.F_AuditBy = model1[i].F_AuditBy;//审核人
2784 2784
                     model.F_AuditOn = model1[i].F_AuditOn;//审核时间
2785 2785
                     model.F_AuditCont = model1[i].F_AuditCont;//审核内容
2786
-                    model.RemainingTime = float.Parse(string.Format("{0:f2}", TimeToOver(model1[i].F_ID, model1[i].F_limit)));
2786
+                                                              // model.RemainingTime = float.Parse(string.Format("{0:f2}", TimeToOver(model1[i].F_ID, model1[i].F_limit)));
2787
+
2788
+                    float c = TimeToOver(model1[i].F_ID, model1[i].F_limit);
2789
+                   float a = Math.Abs(c);
2790
+                    int days = (int)Math.Floor(Convert.ToDouble(a / 24));
2791
+                    int hours = days > 0
2792
+                                   ? (int)Math.Floor(Convert.ToDouble((a - days * 24)))
2793
+                                   : (int)Math.Floor(Convert.ToDouble(a));
2794
+                    float minutes = hours > 0
2795
+                                   ? a * 60 - days * 1440 - hours * 60
2796
+                                   : 0;
2797
+                    if (c > 0)
2798
+                    model.RemainingTime = string.Format("剩余{0:f0}天{1:f0}时{2:f0}分", days, hours, minutes);
2799
+                    else
2800
+                        model.RemainingTime = string.Format("超时{0:f0}天{1:f0}时{2:f0}分", days, hours, minutes);
2787 2801
                     if (ua != null)
2788 2802
                     {
2789 2803
                         var itemlast = itembll.GetModelList("   F_WoID='" + model.F_ID + "' order by F_ID desc").FirstOrDefault();
@@ -2802,6 +2816,16 @@ namespace CallCenterApi.Interface.Controllers.weixin
2802 2816
                         }
2803 2817
 
2804 2818
                     }
2819
+                    model.F_limit = model1[i].F_limit;
2820
+                    int day = (int)Math.Floor(Convert.ToDouble(model.F_limit / 24));
2821
+                    int hour = day > 0
2822
+                                   ? (int)Math.Floor(Convert.ToDouble((model.F_limit - day * 24)))
2823
+                                   : (int)Math.Floor(Convert.ToDouble(model.F_limit));
2824
+
2825
+                    string time = "";
2826
+                    if (day > 0) time += day + "天";
2827
+                    if (hour > 0) time += hour + "小时";
2828
+                    model.F_limitTime = time;
2805 2829
                     if (model1[i].F_Type !="3")
2806 2830
                     {
2807 2831
                         if (TimeToOver(model1[i].F_ID, model1[i].F_limit) < 0)
@@ -2861,7 +2885,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2861 2885
                     if (itemlasts[i].F_WoState >= 1)
2862 2886
                     {
2863 2887
                       
2864
-                        if (itemlasts[i].F_WoState == 11)
2888
+                        if (itemlasts[i].F_WoState == 10 || itemlasts[i].F_WoState == 11)
2865 2889
                         {
2866 2890
                             y = i;
2867 2891
                             time2 = itemlasts[i].F_CreateTime.ToString();
@@ -2872,7 +2896,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2872 2896
                 {
2873 2897
                     if (time1 != "")
2874 2898
                     {
2875
-                        if (x > y)
2899
+                        if (y >x  )
2876 2900
                         {
2877 2901
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
2878 2902
                             float b = limit - (float)a.TotalHours;
@@ -3976,6 +4000,8 @@ namespace CallCenterApi.Interface.Controllers.weixin
3976 4000
                         {
3977 4001
                             if (clus.F_WorkNumber == "7000")
3978 4002
                                 return Error("不能转派到市场管理员");
4003
+                            else if (clus.F_RoleId == 1 || clus.F_RoleId == 4)
4004
+                                return Error("不能转派到话务人员");
3979 4005
                             else if (clus.F_RoleId == 58)
3980 4006
                                 return Error("不能转派到业务员");
3981 4007
                             else if (clus.F_RoleId == 60)
@@ -4143,7 +4169,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
4143 4169
                 {
4144 4170
                     sql = " and F_RoleId=59";
4145 4171
                 }
4146
-                var list = userAccountBLL.GetModelList(" F_DeptId='" + clbm + "'"+ sql);
4172
+                var list = userAccountBLL.GetModelList(" F_DeptId='" + clbm + "'and F_DeleteFlag=0" + sql);
4147 4173
                 foreach (var l in list)
4148 4174
                 {
4149 4175
                     if (string.IsNullOrEmpty(users))
@@ -4458,7 +4484,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
4458 4484
                     if (itemlasts[i].F_WoState >= 1)
4459 4485
                     {
4460 4486
                       
4461
-                        if (itemlasts[i].F_WoState == 11)
4487
+                        if (itemlasts[i].F_WoState == 10)
4462 4488
                         {
4463 4489
                             y = i;
4464 4490
                             time2 = itemlasts[i].F_CreateTime.ToString();
@@ -4469,7 +4495,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
4469 4495
                 {
4470 4496
                     if (time1 != "")
4471 4497
                     {
4472
-                        if (x > y)
4498
+                        if (y > x )
4473 4499
                         {
4474 4500
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
4475 4501
                             if ((float)a.TotalHours > time)

+ 31 - 7
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -4705,8 +4705,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
4705 4705
                     {
4706 4706
                         model.F_IsVisit ="否";//
4707 4707
                     }
4708
-                   
4709
-                    model.RemainingTime =float .Parse (string .Format ("{0:f2}", TimeToOver(model1[i].F_ID, model1[i].F_limit)) );
4708
+                    float c = TimeToOver(model1[i].F_ID, model1[i].F_limit);
4709
+                    float a = Math.Abs(c);
4710
+                    int days = (int)Math.Floor(Convert.ToDouble(a / 24));
4711
+                    int hours = days > 0
4712
+                                   ? (int)Math.Floor(Convert.ToDouble((a - days * 24)))
4713
+                                   : (int)Math.Floor(Convert.ToDouble(a));
4714
+                    float minutes = hours > 0
4715
+                                   ? a * 60 - days * 1440 - hours * 60
4716
+                                   : 0;
4717
+                    if (c > 0)
4718
+                        model.RemainingTime = string.Format("剩余{0:f0}天{1:f0}时{2:f0}分", days, hours, minutes);
4719
+                    else
4720
+                        model.RemainingTime = string.Format("超时{0:f0}天{1:f0}时{2:f0}分", days, hours, minutes);
4721
+
4710 4722
                     model.F_VisitOn = model1[i].F_VisitOn;//回访时间
4711 4723
                     model.F_VisitBy = model1[i].F_VisitBy;//回访人
4712 4724
                     model.F_VisitResult = model1[i].F_VisitResult;//回访结果:非常满意、满意、一般、不满意
@@ -4748,8 +4760,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
4748 4760
                     {
4749 4761
                         model.F_AuditState = "";
4750 4762
                     }
4763
+                   
4751 4764
                     model .F_Canal = model1[i].F_Canal;
4752 4765
                     model .F_limit = model1[i].F_limit ;
4766
+                    int day = (int)Math.Floor(Convert.ToDouble(model.F_limit / 24));
4767
+                    int hour = day > 0
4768
+                                   ? (int)Math.Floor(Convert.ToDouble((model.F_limit - day * 24) ))
4769
+                                   : (int)Math.Floor(Convert.ToDouble(model.F_limit));
4770
+                   
4771
+                    string time = "";
4772
+                    if (day > 0) time += day + "天";
4773
+                    if (hour > 0) time += hour + "小时";
4774
+                        model.F_limitTime = time;
4753 4775
                     model.F_AuditBy = model1[i].F_AuditBy;//审核人
4754 4776
                     model.F_AuditOn = model1[i].F_AuditOn;//审核时间
4755 4777
                     model.F_AuditCont = model1[i].F_AuditCont;//审核内容
@@ -4880,7 +4902,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4880 4902
                 {
4881 4903
                     if (itemlasts[i].F_WoState >= 1)
4882 4904
                     {
4883
-                        if (itemlasts[i].F_WoState == 11)
4905
+                        if (itemlasts[i].F_WoState == 10|| itemlasts[i].F_WoState == 11)
4884 4906
                         {
4885 4907
                             y = i;
4886 4908
                             time2 = itemlasts[i].F_CreateTime.ToString();
@@ -4891,7 +4913,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4891 4913
                 {
4892 4914
                     if (time1 != "")
4893 4915
                     {
4894
-                        if (x > y)
4916
+                        if (y > x )
4895 4917
                         {
4896 4918
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
4897 4919
                             float b = limit - (float)a.TotalHours;
@@ -4957,7 +4979,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4957 4979
                 {
4958 4980
                     if (itemlasts[i ].F_WoState >= 1)
4959 4981
                     {
4960
-                        if (itemlasts[i].F_WoState == 11)
4982
+                        if (itemlasts[i].F_WoState == 10 || itemlasts[i].F_WoState == 11)
4961 4983
                         {
4962 4984
                             y = i;
4963 4985
                             time2 = itemlasts[i].F_CreateTime.ToString();
@@ -4968,7 +4990,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4968 4990
                 {
4969 4991
                     if (time1 != "")
4970 4992
                     {
4971
-                        if (x > y)
4993
+                        if (y >x  )
4972 4994
                         {
4973 4995
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
4974 4996
                            
@@ -5444,6 +5466,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
5444 5466
                     {
5445 5467
                         if (clus.F_WorkNumber == "7000")
5446 5468
                             return Error("不能转派到市场管理员");
5469
+                        else if (clus.F_RoleId == 1|| clus.F_RoleId == 4)
5470
+                            return Error("不能转派到话务人员");
5447 5471
                         else if (clus.F_RoleId == 58)
5448 5472
                             return Error("不能转派到业务员");
5449 5473
                         else if (clus.F_RoleId == 60)
@@ -7111,7 +7135,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
7111 7135
                 {
7112 7136
                     sql = " and F_RoleId=59";
7113 7137
                 }
7114
-                var list = sysUserAccountBll.GetModelList(" F_DeptId='" + clbm + "'"+ sql);
7138
+                var list = sysUserAccountBll.GetModelList(" F_DeptId='" + clbm + "' and F_DeleteFlag=0 " + sql);
7115 7139
                 foreach (var l in list)
7116 7140
                 {
7117 7141
                     if (string.IsNullOrEmpty(users))

+ 6 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WorkOrderNewInput.cs

@@ -148,10 +148,11 @@ namespace CallCenterApi.Interface.Models.Input
148 148
         /// <summary>
149 149
         /// 剩余时间
150 150
         /// </summary>
151
-        public float RemainingTime
151
+        public string  RemainingTime
152 152
         {
153 153
             get; set;
154 154
         }
155
+       
155 156
         /// <summary>
156 157
         /// 处理方式:当即办理、电话转接、网络转办
157 158
         /// </summary>
@@ -613,6 +614,10 @@ namespace CallCenterApi.Interface.Models.Input
613 614
         {
614 615
             get; set;
615 616
         }
617
+        public string  F_limitTime
618
+        {
619
+            get; set;
620
+        }
616 621
         /// <summary>
617 622
         /// 审核人
618 623
         /// </summary>