Kaynağa Gözat

用户权限,超期修改

duhongyu 5 yıl önce
ebeveyn
işleme
4a125f192f

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

568
         /// <returns></returns>
568
         /// <returns></returns>
569
         public ActionResult GetDeptUserList(int deptid = 0)
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
             var rolelist = new BLL.T_Sys_RoleInfo().GetModelList("").ToList();
573
             var rolelist = new BLL.T_Sys_RoleInfo().GetModelList("").ToList();
573
             foreach (var item in DeptUserList)
574
             foreach (var item in DeptUserList)
574
             {
575
             {

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

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

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

2783
                     model.F_AuditBy = model1[i].F_AuditBy;//审核人
2783
                     model.F_AuditBy = model1[i].F_AuditBy;//审核人
2784
                     model.F_AuditOn = model1[i].F_AuditOn;//审核时间
2784
                     model.F_AuditOn = model1[i].F_AuditOn;//审核时间
2785
                     model.F_AuditCont = model1[i].F_AuditCont;//审核内容
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
                     if (ua != null)
2801
                     if (ua != null)
2788
                     {
2802
                     {
2789
                         var itemlast = itembll.GetModelList("   F_WoID='" + model.F_ID + "' order by F_ID desc").FirstOrDefault();
2803
                         var itemlast = itembll.GetModelList("   F_WoID='" + model.F_ID + "' order by F_ID desc").FirstOrDefault();
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
                     if (model1[i].F_Type !="3")
2829
                     if (model1[i].F_Type !="3")
2806
                     {
2830
                     {
2807
                         if (TimeToOver(model1[i].F_ID, model1[i].F_limit) < 0)
2831
                         if (TimeToOver(model1[i].F_ID, model1[i].F_limit) < 0)
2861
                     if (itemlasts[i].F_WoState >= 1)
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
                             y = i;
2890
                             y = i;
2867
                             time2 = itemlasts[i].F_CreateTime.ToString();
2891
                             time2 = itemlasts[i].F_CreateTime.ToString();
2872
                 {
2896
                 {
2873
                     if (time1 != "")
2897
                     if (time1 != "")
2874
                     {
2898
                     {
2875
-                        if (x > y)
2899
+                        if (y >x  )
2876
                         {
2900
                         {
2877
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
2901
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
2878
                             float b = limit - (float)a.TotalHours;
2902
                             float b = limit - (float)a.TotalHours;
3976
                         {
4000
                         {
3977
                             if (clus.F_WorkNumber == "7000")
4001
                             if (clus.F_WorkNumber == "7000")
3978
                                 return Error("不能转派到市场管理员");
4002
                                 return Error("不能转派到市场管理员");
4003
+                            else if (clus.F_RoleId == 1 || clus.F_RoleId == 4)
4004
+                                return Error("不能转派到话务人员");
3979
                             else if (clus.F_RoleId == 58)
4005
                             else if (clus.F_RoleId == 58)
3980
                                 return Error("不能转派到业务员");
4006
                                 return Error("不能转派到业务员");
3981
                             else if (clus.F_RoleId == 60)
4007
                             else if (clus.F_RoleId == 60)
4143
                 {
4169
                 {
4144
                     sql = " and F_RoleId=59";
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
                 foreach (var l in list)
4173
                 foreach (var l in list)
4148
                 {
4174
                 {
4149
                     if (string.IsNullOrEmpty(users))
4175
                     if (string.IsNullOrEmpty(users))
4458
                     if (itemlasts[i].F_WoState >= 1)
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
                             y = i;
4489
                             y = i;
4464
                             time2 = itemlasts[i].F_CreateTime.ToString();
4490
                             time2 = itemlasts[i].F_CreateTime.ToString();
4469
                 {
4495
                 {
4470
                     if (time1 != "")
4496
                     if (time1 != "")
4471
                     {
4497
                     {
4472
-                        if (x > y)
4498
+                        if (y > x )
4473
                         {
4499
                         {
4474
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
4500
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
4475
                             if ((float)a.TotalHours > time)
4501
                             if ((float)a.TotalHours > time)

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

4705
                     {
4705
                     {
4706
                         model.F_IsVisit ="否";//
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
                     model.F_VisitOn = model1[i].F_VisitOn;//回访时间
4722
                     model.F_VisitOn = model1[i].F_VisitOn;//回访时间
4711
                     model.F_VisitBy = model1[i].F_VisitBy;//回访人
4723
                     model.F_VisitBy = model1[i].F_VisitBy;//回访人
4712
                     model.F_VisitResult = model1[i].F_VisitResult;//回访结果:非常满意、满意、一般、不满意
4724
                     model.F_VisitResult = model1[i].F_VisitResult;//回访结果:非常满意、满意、一般、不满意
4748
                     {
4760
                     {
4749
                         model.F_AuditState = "";
4761
                         model.F_AuditState = "";
4750
                     }
4762
                     }
4763
+                   
4751
                     model .F_Canal = model1[i].F_Canal;
4764
                     model .F_Canal = model1[i].F_Canal;
4752
                     model .F_limit = model1[i].F_limit ;
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
                     model.F_AuditBy = model1[i].F_AuditBy;//审核人
4775
                     model.F_AuditBy = model1[i].F_AuditBy;//审核人
4754
                     model.F_AuditOn = model1[i].F_AuditOn;//审核时间
4776
                     model.F_AuditOn = model1[i].F_AuditOn;//审核时间
4755
                     model.F_AuditCont = model1[i].F_AuditCont;//审核内容
4777
                     model.F_AuditCont = model1[i].F_AuditCont;//审核内容
4880
                 {
4902
                 {
4881
                     if (itemlasts[i].F_WoState >= 1)
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
                             y = i;
4907
                             y = i;
4886
                             time2 = itemlasts[i].F_CreateTime.ToString();
4908
                             time2 = itemlasts[i].F_CreateTime.ToString();
4891
                 {
4913
                 {
4892
                     if (time1 != "")
4914
                     if (time1 != "")
4893
                     {
4915
                     {
4894
-                        if (x > y)
4916
+                        if (y > x )
4895
                         {
4917
                         {
4896
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
4918
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
4897
                             float b = limit - (float)a.TotalHours;
4919
                             float b = limit - (float)a.TotalHours;
4957
                 {
4979
                 {
4958
                     if (itemlasts[i ].F_WoState >= 1)
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
                             y = i;
4984
                             y = i;
4963
                             time2 = itemlasts[i].F_CreateTime.ToString();
4985
                             time2 = itemlasts[i].F_CreateTime.ToString();
4968
                 {
4990
                 {
4969
                     if (time1 != "")
4991
                     if (time1 != "")
4970
                     {
4992
                     {
4971
-                        if (x > y)
4993
+                        if (y >x  )
4972
                         {
4994
                         {
4973
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
4995
                             System.TimeSpan a = DateTime.Parse(time2) - DateTime.Parse(time1);
4974
                            
4996
                            
5444
                     {
5466
                     {
5445
                         if (clus.F_WorkNumber == "7000")
5467
                         if (clus.F_WorkNumber == "7000")
5446
                             return Error("不能转派到市场管理员");
5468
                             return Error("不能转派到市场管理员");
5469
+                        else if (clus.F_RoleId == 1|| clus.F_RoleId == 4)
5470
+                            return Error("不能转派到话务人员");
5447
                         else if (clus.F_RoleId == 58)
5471
                         else if (clus.F_RoleId == 58)
5448
                             return Error("不能转派到业务员");
5472
                             return Error("不能转派到业务员");
5449
                         else if (clus.F_RoleId == 60)
5473
                         else if (clus.F_RoleId == 60)
7111
                 {
7135
                 {
7112
                     sql = " and F_RoleId=59";
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
                 foreach (var l in list)
7139
                 foreach (var l in list)
7116
                 {
7140
                 {
7117
                     if (string.IsNullOrEmpty(users))
7141
                     if (string.IsNullOrEmpty(users))

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

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