Browse Source

通讯录权限修改,部门权限修改,用户管理权限修改,地址修改,报表修改,坐席监控权限修改,工单修改

duhongyu 6 years ago
parent
commit
a680ad82f1

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

@@ -353,12 +353,13 @@ namespace CallCenterApi.Interface.Controllers
353 353
             {
354 354
                 int userId = CurrentUser.UserData.F_UserId;
355 355
                 Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
356
+                Model.T_Sys_RoleInfo ro = new BLL.T_Sys_RoleInfo().GetModel(userModel.F_RoleId);
356 357
                 int dptid = 0;
357 358
                 if (userModel != null)
358 359
                 {
359 360
                         dptid = userModel.F_DeptId;
360 361
                 }
361
-                if (userModel.F_RoleId == 49)
362
+                if (ro.F_RoleCode == "CLZY" || ro.F_RoleCode == "ZR" || ro.F_RoleCode == "XTGLY")
362 363
                 {
363 364
                     dptid = 1;
364 365
                 }
@@ -390,12 +391,13 @@ namespace CallCenterApi.Interface.Controllers
390 391
             {
391 392
                 int userId = CurrentUser.UserData.F_UserId;
392 393
                 Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
394
+                Model.T_Sys_RoleInfo ro = new BLL.T_Sys_RoleInfo().GetModel(userModel.F_RoleId);
393 395
                 int dptid = 0;
394 396
                 if (userModel != null)
395 397
                 {
396 398
                     dptid = userModel.F_DeptId;
397 399
                 }
398
-                if (userModel.F_RoleId == 49)
400
+                if (ro.F_RoleCode  == "CLZY" || ro.F_RoleCode == "ZR" || ro.F_RoleCode == "XTGLY")
399 401
                 {
400 402
                     dptid = 1;
401 403
                 }

+ 5 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

@@ -455,6 +455,10 @@ namespace CallCenterApi.Interface.Controllers
455 455
                 {
456 456
                     if (ro.F_RoleCode == "CLZY")
457 457
                         pId=1;
458
+                    else if (ro.F_RoleCode == "ZR")
459
+                        pId = 1;
460
+                    else if (ro.F_RoleCode == "XTGLY")
461
+                        pId = 1;
458 462
                 }
459 463
                 if (pId == 2)
460 464
                 {
@@ -463,7 +467,7 @@ namespace CallCenterApi.Interface.Controllers
463 467
                 else if (pId == 421)
464 468
                 {
465 469
                     where = "isnull(F_DeptId,0)='" + 1+ "'and F_State=1";
466
-                        } 
470
+                 } 
467 471
                 else
468 472
                 {
469 473
                      where = " isnull(F_DeptId,0)='" + pId + "' and F_State=1 ";

+ 48 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -689,21 +689,34 @@ namespace CallCenterApi.Interface.Controllers
689 689
             {
690 690
                 int userId = CurrentUser.UserData.F_UserId;
691 691
                 Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
692
-
692
+                int pId = 0;
693
+                if (userModel != null)
694
+                    pId = userModel.F_DeptId;
693 695
                 if (userModel.F_RoleId == 53)
694 696
                 {
695 697
                     return Error("无操作权限");
696 698
                 }
699
+              
700
+                var uModel = new BLL.T_Sys_UserAccount().GetModel(input.Usercode);
697 701
                 if (userModel .F_RoleId ==49)
698 702
                 {
699
-                    var uModel = new BLL.T_Sys_UserAccount().GetModel(input.Usercode);
700 703
                     if (uModel!=null )
701 704
                     {
702 705
                         if (userModel.F_UserCode != uModel.F_UserCode&& uModel.F_RoleId ==49)
703 706
                             return Error("不能修改其他人员");
704 707
                     }
705
-                  
708
+                   
709
+                }
710
+                if (pId == 2|| pId == 421)
711
+                {
712
+                    if (uModel != null)
713
+                    {
714
+                        Model.T_Sys_RoleInfo ro = rolebll.GetModel(uModel.F_RoleId);
715
+                        if (ro.F_RoleCode  != "ZG" && ro.F_RoleCode != "YWY")
716
+                            return Error("无修改此人员权限");
717
+                    }
706 718
                 }
719
+               
707 720
                 BLL.T_Sys_UserAccount sysUserAccountBll = new BLL.T_Sys_UserAccount();
708 721
                 Model.T_Sys_UserAccount userAccountModel = sysUserAccountBll.GetModelList("  F_UserId = " + 
709 722
                     input.UserId).FirstOrDefault();
@@ -851,12 +864,27 @@ namespace CallCenterApi.Interface.Controllers
851 864
         [Authority]
852 865
         public ActionResult DelUsers(string[] ids, int state = 0)
853 866
         {
867
+            int userId = CurrentUser.UserData.F_UserId;
868
+            Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
854 869
             if (ids == null || ids.Length <= 0)
855 870
                 return Error("请选择用户");
856 871
             var idStr = string.Join(",", ids);
857 872
             if (string.IsNullOrEmpty(idStr))
858 873
                 return Error("请选择用户");
874
+            int pId = 0;
875
+            if (userModel != null)
876
+                pId = userModel.F_DeptId;
877
+            var uModel = new BLL.T_Sys_UserAccount().GetModel(int.Parse(ids[0]));
859 878
 
879
+            if (pId == 2 || pId == 421)
880
+            {
881
+                if (uModel != null)
882
+                {
883
+                    Model.T_Sys_RoleInfo ro = rolebll.GetModel(uModel.F_RoleId);
884
+                    if (ro.F_RoleCode != "ZG" && ro.F_RoleCode != "YWY")
885
+                        return Error("无删除此人员权限");
886
+                }
887
+            }
860 888
             SysConfigController sys = new SysConfigController();
861 889
             if (state == 0)
862 890
             {
@@ -882,11 +910,27 @@ namespace CallCenterApi.Interface.Controllers
882 910
         {
883 911
             if (Request.IsAuthenticated)
884 912
             {
913
+                int userId = CurrentUser.UserData.F_UserId;
914
+                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
885 915
                 if (ids == null || ids.Length <= 0)
886 916
                     return Error("请选择用户");
887 917
                 var idStr = string.Join(",", ids);
888 918
                 if (string.IsNullOrEmpty(idStr))
889 919
                     return Error("请选择用户");
920
+                int pId = 0;
921
+                if (userModel != null)
922
+                    pId = userModel.F_DeptId;
923
+                var uModel = new BLL.T_Sys_UserAccount().GetModel(int .Parse (ids[0]));
924
+
925
+                if (pId == 2 || pId == 421)
926
+                {
927
+                    if (uModel != null)
928
+                    {
929
+                        Model.T_Sys_RoleInfo ro = rolebll.GetModel(uModel.F_RoleId);
930
+                        if (ro.F_RoleCode != "ZG" && ro.F_RoleCode != "YWY")
931
+                            return Error("无删除此人员权限");
932
+                    }
933
+                }
890 934
                 if (sysUserAccountBll.DeleteList(idStr))
891 935
                     return Success("删除成功");
892 936
                 else
@@ -912,7 +956,7 @@ namespace CallCenterApi.Interface.Controllers
912 956
                     if (roleid != 17)
913 957
                     {
914 958
                         if (deptid != 0)
915
-                            sql += " and F_DeptId=" + deptid;
959
+                            sql += " and F_RoleId=" + 1;
916 960
                     }
917 961
                 }
918 962
 

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerController.cs

@@ -867,7 +867,7 @@ namespace CallCenterApi.Interface.Controllers.customer
867 867
         public ActionResult Import()
868 868
         {
869 869
             DataTable dt = new DataTable();
870
-            var depts = new BLL.T_Sys_UserAccount().GetModelList("F_DeptId in (select F_DeptId   FROM T_Sys_Department WHERE F_State=1 and ( F_DeptCode like '|0|1|14|%' )) ");
870
+            var depts = new BLL.T_Sys_UserAccount().GetModelList("F_DeptId in (select F_DeptId   FROM T_Sys_Department WHERE F_State=1 and ( F_DeptCode like '|0|1|16|%'or F_DeptCode like '|0|1|17|%' )) ");
871 871
            
872 872
             #region 
873 873
             dt.Columns.Add("工号");

+ 17 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/RegionCategoryController.cs

@@ -172,6 +172,23 @@ namespace CallCenterApi.Interface.Controllers.customer
172 172
             }
173 173
             return NoToken("未知错误,请重新登录");
174 174
         }
175
+        public ActionResult GetCounty  (string city)
176
+        {
177
+            if (Request.IsAuthenticated)
178
+            {
179
+                if (string .IsNullOrEmpty (city))
180
+                    return Success("加载失败");
181
+                var model = new BLL.T_RegionCategory().GetModelList (" F_DeleteFlag=0 and F_RegionName like'%" + city.Trim() + "%'  and F_ParentId !=0").FirstOrDefault ();
182
+                if (model!=null )
183
+                {
184
+                    DataTable dt = new DataTable();
185
+                    dt = new BLL.T_RegionCategory().GetList(" F_DeleteFlag=0 and F_ParentId=" + model.F_RegionId ).Tables[0];
186
+                    return Success("加载成功", dt);
187
+                }
188
+                return Success("加载失败");
189
+            }
190
+            return NoToken("未知错误,请重新登录");
191
+        }
175 192
         /// <summary>
176 193
         /// 获取地市列表
177 194
         /// </summary>

+ 69 - 42
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/BusinessController.cs

@@ -632,7 +632,7 @@ namespace CallCenterApi.Interface.Controllers.report
632 632
         /// <param name="edate"></param>
633 633
         /// <param name="isdc"></param>
634 634
         /// <returns></returns>
635
-        public ActionResult Distribution(DateTime? datetime , int isdc = 0)
635
+        public ActionResult Distribution(string sttime  ,string endtime, int isdc = 0)
636 636
         {
637 637
           //  int userId = CurrentUser.UserData.F_UserId;
638 638
          //   Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
@@ -640,64 +640,91 @@ namespace CallCenterApi.Interface.Controllers.report
640 640
             DateTime time=DateTime .Now ;
641 641
            
642 642
             DataTable dt = new DataTable();
643
-            if (datetime != null )
643
+           
644
+            if (!string .IsNullOrEmpty (endtime))
644 645
             {
645
-                time =DateTime .Parse ( datetime.ToString ());
646
+                time =DateTime .Parse (endtime);
646 647
             }
647 648
             Timeslot timeslot = GetTimeslot(time.Month );
648 649
             int days = 30;
649
-            if (time.Month ==1)
650
-            {
651
-                days = 31;
652
-            }
653
-            else
654
-            {
655
-                 days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(time.Year, time.Month - 1);//获取天数
656
-            }
657 650
             int day = 31;
658
-            DateTime lastmonth= time.AddMonths(-1);
659
-            sql += " and F_CreateTime>='" + lastmonth.ToString ("yyyy-MM") +"-28" + " 00:00:00' ";
660
-            if (time.Month != 12)
661
-            {
662
-                sql += " and F_CreateTime<='" + time.ToString("yyyy-MM") + "-27" + " 23:59:59' ";
663
-                day = 27;
664
-            }
665
-            else
666
-            {
667
-                sql += " and F_CreateTime<='" + time.ToString("yyyy-MM") + "-31" + " 23:59:59' ";
668
-            }
669
-            sql += $" and (F_Type=2 or (F_Duplicate in(2,0)and F_Type=3))";
670
-            var modelList= new BLL.T_Bus_WorkOrder().GetModelList(sql);
671 651
             Product product = new Product();
672 652
             product.dates = new List<Date>();
673
-            int lastday = days - 27;
674
-            #region 上月28号至最后一天
675
-          
676
-            if (time .Month !=1)
677
-            {
678
-                for (int i = 0; i < lastday; i++)
653
+            //时间筛选
654
+            if (!string.IsNullOrEmpty(sttime))
655
+            {
656
+                DateTime stime = DateTime.Parse(sttime);
657
+                System.TimeSpan ime = time - stime;
658
+                days = (int )ime.TotalDays+1;
659
+                sql += " and F_CreateTime>='" + stime.ToString("yyyy-MM-dd") + " 00:00:00' ";
660
+                sql += " and F_CreateTime<='" + time.ToString("yyyy-MM-dd") + " 23:59:59' ";
661
+                sql += $" and (F_Type=2 or (F_Duplicate in(2,0)and F_Type=3))";
662
+                var modelLis = new BLL.T_Bus_WorkOrder().GetModelList(sql);
663
+                for (int i = 0; i < days; i++)
679 664
                 {
680
-                    string name = string.Format("{0}-{1}", lastmonth.ToString("yyyy-MM"), 28 + i);
681
-                    product.dates.Add(RetuDate(name, timeslot, modelList));
665
+                    string name = "";
666
+                    name = stime.AddDays(i).ToString("yyyy-MM-dd");
667
+                    product.dates.Add(RetuDate(name, timeslot, modelLis));
682 668
                 }
683 669
             }
684
-           
685
-
686
-            #endregion
687
-                #region 本月一号至27号
688
-            for (int i=0;i < day; i++)
670
+            else
689 671
             {
690
-                string name = "";
691
-                if (i <9)
672
+                //系统时间
673
+                if (time.Month == 1)
692 674
                 {
693
-                    name=  string.Format("{0}-0{1}", time.ToString("yyyy-MM"), 1 + i);
675
+                    days = 31;
694 676
                 }
695 677
                 else
696 678
                 {
697
-                   name = string.Format("{0}-{1}", time.ToString("yyyy-MM"), 1 + i);
679
+                    days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(time.Year, time.Month - 1);//获取天数
680
+                }
681
+                DateTime lastmonth = time.AddMonths(-1);
682
+                sql += " and F_CreateTime>='" + lastmonth.ToString("yyyy-MM") + "-28" + " 00:00:00' ";
683
+                if (time.Month != 12)
684
+                {
685
+                    sql += " and F_CreateTime<='" + time.ToString("yyyy-MM") + "-27" + " 23:59:59' ";
686
+                    day = 27;
687
+                }
688
+                else
689
+                {
690
+                    sql += " and F_CreateTime<='" + time.ToString("yyyy-MM") + "-31" + " 23:59:59' ";
691
+                }
692
+                sql += $" and (F_Type=2 or (F_Duplicate in(2,0)and F_Type=3))";
693
+                var modelLis = new BLL.T_Bus_WorkOrder().GetModelList(sql);
694
+               
695
+                int lastday = days - 27;
696
+                #region 上月28号至最后一天
697
+
698
+                if (time.Month != 1)
699
+                {
700
+                    for (int i = 0; i < lastday; i++)
701
+                    {
702
+                        string name = string.Format("{0}-{1}", lastmonth.ToString("yyyy-MM"), 28 + i);
703
+                        product.dates.Add(RetuDate(name, timeslot, modelLis));
704
+                    }
705
+                }
706
+                for (int i = 0; i < day; i++)
707
+                {
708
+                    string name = "";
709
+                    if (i < 9)
710
+                    {
711
+                        name = string.Format("{0}-0{1}", time.ToString("yyyy-MM"), 1 + i);
712
+                    }
713
+                    else
714
+                    {
715
+                        name = string.Format("{0}-{1}", time.ToString("yyyy-MM"), 1 + i);
716
+                    }
717
+                    product.dates.Add(RetuDate(name, timeslot, modelLis));
698 718
                 }
699
-                product.dates.Add(RetuDate(name, timeslot, modelList));
700 719
             }
720
+
721
+
722
+
723
+
724
+
725
+            #endregion
726
+            #region 本月一号至27号
727
+            var modelList = new BLL.T_Bus_WorkOrder().GetModelList(sql);
701 728
             Date date = new Date();
702 729
             date.total = modelList.Count;
703 730
             date.name = "合计";

+ 4 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/ZuoXiWorkTotalController.cs

@@ -365,11 +365,11 @@ namespace CallCenterApi.Interface.Controllers.report
365 365
                         //未评价为0
366 366
                        
367 367
                         drNew["坐席登录次数"] = izxdlcs.ToString();
368
-                        float a = idlsc / 360;
369
-                        float  b=idlsc % 360/60;
368
+                        float a = idlsc / 3600;
369
+                        float  b=idlsc % 3600/60;
370 370
                     drNew["登录时长分钟数"] = string .Format ("{0}小时{1}分钟",a ,b );
371
-                    float c = idlsc / 360;
372
-                    float d = idlsc % 360 / 60;
371
+                    float c = idlsc / 3600;
372
+                    float d = idlsc % 3600 / 60;
373 373
                     drNew["工作时长分钟数"] = drNew["工作时长分钟数"] = string.Format("{0}小时{1}分钟", c, d); ;
374 374
                         drNew["平均每天工作时长"] = Math.Round((double.Parse(iWorktime.ToString()) / 60 / 60 / days), 2).ToString();
375 375
                         drNew["平均操作分钟数"] = (ipjczsc / 60).ToString();

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

@@ -30,7 +30,8 @@ namespace CallCenterApi.Interface.Controllers.tel
30 30
                 string sql = "";
31 31
                 if (roleid != 17)
32 32
                 {
33
-                    sql = " and F_DeptId=" + deptid;
33
+                    if (deptid != 0)
34
+                        sql += " and F_RoleId=" + 1;
34 35
                 }
35 36
                 if (userModel.F_SeartGroupID!=0)
36 37
                 {

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


+ 24 - 27
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs

@@ -186,7 +186,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
186 186
                             sql += "AND F_Duplicate !=5"+ uwhere+ where;
187 187
                             sql += "AND F_State in (1)";
188 188
                             sql += RetuSql(ro, 0, ua);
189
-                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
189
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX" || ro.F_RoleCode == "ZG")
190 190
                             {
191 191
                                 DFP = 0;
192 192
                                 break;
@@ -199,7 +199,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
199 199
                             sql += "AND F_Duplicate !=5" + uwhere+ where;
200 200
                             sql += "AND F_State=3";
201 201
                             sql += RetuSql(ro, 0, ua);
202
-                            if (ro.F_RoleCode == "YWY")
202
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
203 203
                             {
204 204
                                 sql += "AND F_Notifications=" + ua.F_UserCode;
205 205
                             }
@@ -216,7 +216,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
216 216
                             sql += "AND F_Duplicate !=5" + uwhere+ where;
217 217
                             sql += "AND F_State=4";
218 218
                             sql += RetuSql(ro, 0, ua);
219
-                            if (ro.F_RoleCode == "YWY")
219
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
220 220
                             {
221 221
                                 sql += "AND F_Notifications=" + ua.F_UserCode;
222 222
                             }
@@ -233,7 +233,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
233 233
                             sql += "AND F_Duplicate !=5" + uwhere+ where;
234 234
                             sql += "AND F_State=5";
235 235
                             sql += RetuSql(ro, 0, ua);
236
-                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
236
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX" || ro.F_RoleCode == "ZG")
237 237
                             {
238 238
                                 THDFP  = 0;
239 239
                                 break;
@@ -246,7 +246,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
246 246
                             sql += "AND F_Duplicate !=5"+ where;
247 247
                             sql += "AND F_State=6";
248 248
                             sql += RetuSql(ro, 0, ua);
249
-                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS")
249
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "ZG")
250 250
                             {
251 251
                                 THDTJ  = 0;
252 252
                                 break;
@@ -259,7 +259,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
259 259
                             sql += "AND F_Duplicate !=5" + uwhere+ where;
260 260
                             sql += "AND F_State=10";
261 261
                             sql += RetuSql(ro, 0, ua);
262
-                            if (ro.F_RoleCode == "YWY")
262
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
263 263
                             {
264 264
                                 sql += "AND F_Notifications ='" + ua.F_UserCode + "'";
265 265
                             }
@@ -283,7 +283,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
283 283
                             sql += $" and (F_DealTimely= '1类问题' or F_DealTimely= 'Ⅰ级' )";
284 284
                             sql += $" and F_State !=10";
285 285
                             sql += RetuSql(ro, 0, ua);
286
-                            if (ro.F_RoleCode == "YWY")
286
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
287 287
                                 sql += "AND F_DealUser=" + ua.F_UserCode;
288 288
                             if (ro.F_RoleCode == "QTJS")
289 289
                                 sql += "AND F_CreateUser=" + ua.F_UserCode;
@@ -298,7 +298,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
298 298
                             sql += $" and (F_DealTimely= '2类问题' or F_DealTimely= 'Ⅱ级' )";
299 299
                             sql += $" and F_State !=10";
300 300
                             sql += RetuSql(ro, 0, ua);
301
-                            if (ro.F_RoleCode == "YWY")
301
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
302 302
                                 sql += "AND F_DealUser=" + ua.F_UserCode;
303 303
                             if (ro.F_RoleCode == "QTJS")
304 304
                                 sql += "AND F_CreateUser=" + ua.F_UserCode;
@@ -312,7 +312,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
312 312
                             sql += $" and (F_DealTimely= '3类问题' or F_DealTimely= '普通工单' )";
313 313
                             sql += $"and  F_State !=10";
314 314
                             sql += RetuSql(ro, 0, ua);
315
-                            if (ro.F_RoleCode == "YWY")
315
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
316 316
                                 sql += "AND F_DealUser=" + ua.F_UserCode;
317 317
                             if (ro.F_RoleCode == "QTJS")
318 318
                                 sql += "AND F_CreateUser=" + ua.F_UserCode;
@@ -323,7 +323,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
323 323
                             sql += $"  F_IsDelete=0" + uwhere+ where;
324 324
                             sql += "AND F_Duplicate !=5";
325 325
                             sql += "AND F_Duplicate=6";
326
-                            if (ro.F_RoleCode == "BSCJL" || ro.F_RoleCode == "YWY")
326
+                            if (ro.F_RoleCode == "BSCJL" || ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
327 327
                             {
328 328
                                 sql += "AND F_Notifications ='" + ua.F_UserCode + "'";
329 329
                             }
@@ -343,7 +343,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
343 343
                             sql += "AND F_Duplicate !=5" + uwhere ;
344 344
                             sql += " and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2 ))";
345 345
                             sql += RetuSql(ro, 0, ua);
346
-                            if (ro.F_RoleCode == "YWY")
346
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
347 347
                                 sql += "AND F_DealUser=" + ua.F_UserCode;
348 348
                             if (ro.F_RoleCode == "QTJS")
349 349
                             {
@@ -411,7 +411,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
411 411
                     else
412 412
                         return Error("无操作权限");
413 413
                 }
414
-                if (!string.IsNullOrWhiteSpace(dealTimely))//重要级别
414
+                if (!string.IsNullOrEmpty(dealTimely))//重要级别
415 415
                 {
416 416
                     if (dealTimely == "3类问题"|| dealTimely == "普通工单")
417 417
                         sql += $" and (F_DealTimely= '3类问题' or F_DealTimely= '普通工单' )";
@@ -420,7 +420,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
420 420
                     else if (dealTimely == "1类问题" || dealTimely == "Ⅰ级")
421 421
                         sql += $" and (F_DealTimely= '1类问题' or F_DealTimely= 'Ⅰ级' )";
422 422
                 }
423
-                if (!string.IsNullOrWhiteSpace(area)&& !string.IsNullOrWhiteSpace(offce))
423
+                if (!string.IsNullOrEmpty(area)&& !string.IsNullOrEmpty(offce))
424 424
                 {
425 425
                     if (area == "0"|| offce == "0")
426 426
                     {
@@ -431,7 +431,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
431 431
                         sql += $" and (F_Area in(" + area + ") or  F_Office in(" + offce + "))";
432 432
                     }
433 433
                 }
434
-                else if (!string.IsNullOrWhiteSpace(area))//分公司
434
+                else if (!string.IsNullOrEmpty(area))//分公司
435 435
                 {
436 436
                     if (area == "0")
437 437
                     {
@@ -443,7 +443,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
443 443
                     }
444 444
 
445 445
                 }
446
-                else  if (!string.IsNullOrWhiteSpace(offce))//分公司
446
+                else  if (!string.IsNullOrEmpty(offce))//分公司
447 447
                 {
448 448
                     if (offce=="0")
449 449
                     {
@@ -454,7 +454,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
454 454
                           sql += $" and F_Office in(" + offce + ")";
455 455
                     }
456 456
                 }
457
-                if (!string.IsNullOrWhiteSpace(keywords))//关键字搜索
457
+                if (!string.IsNullOrEmpty(keywords))//关键字搜索
458 458
                 {
459 459
                     if (keywords=="咨询")
460 460
                     {
@@ -530,13 +530,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
530 530
                         case 1://待分派
531 531
                             sql += "AND F_State in (1)"+ uwhere;
532 532
                             sql += RetuSql(ro, see, ua);
533
-                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" )
533
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "ZG")
534 534
                                 return Error("无操作权限");
535 535
                             break;
536 536
                         case 3://待处理
537 537
                             sql += "AND F_State=3"+ uwhere;
538 538
                             sql += RetuSql(ro, see, ua);
539
-                            if (ro.F_RoleCode == "YWY")
539
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
540 540
                             {
541 541
                                 sql += "AND F_Notifications=" + ua.F_UserCode;
542 542
                             }
@@ -546,7 +546,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
546 546
                         case 4://处理中
547 547
                             sql += "AND F_State=4"+ uwhere;
548 548
                             sql += RetuSql(ro, see, ua);
549
-                            if (ro.F_RoleCode == "YWY")
549
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
550 550
                             {
551 551
                                 sql += "AND F_Notifications ='" + ua.F_UserCode + "'";
552 552
                             }
@@ -556,13 +556,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
556 556
                         case 5://退回待分派
557 557
                             sql += "AND F_State=5"+ uwhere;
558 558
                             sql += RetuSql(ro, see, ua);
559
-                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" )
559
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "ZG")
560 560
                                 return Error("无操作权限");
561 561
                             break;
562 562
                         case 6://退回待提交
563 563
                             sql += "AND F_State=6";
564 564
                             sql += RetuSql(ro, see, ua);
565
-                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS")
565
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "ZG")
566 566
                                 return Error("无操作权限");
567 567
                             break;
568 568
                    
@@ -570,7 +570,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
570 570
                             sql += "AND F_State=10"+ uwhere;
571 571
                             sql += RetuSql(ro, see, ua);
572 572
 
573
-                            if ( ro.F_RoleCode == "YWY")
573
+                            if ( ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
574 574
                             {
575 575
                                 sql += "AND F_Notifications ='" + ua.F_UserCode + "'";
576 576
                             }
@@ -582,7 +582,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
582 582
                         case 11:
583 583
                             sql += $" and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2 ))";
584 584
                             sql += RetuSql(ro, see, ua);
585
-                            if (ro.F_RoleCode == "YWY")
585
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
586 586
                                 sql += "AND F_DealUser=" + ua.F_UserCode;
587 587
                             if (ro.F_RoleCode == "QTJS")
588 588
                                 return Error("无操作权限");
@@ -978,10 +978,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
978 978
             {
979 979
                 sql += "AND F_Office =" + ua.F_DeptId;
980 980
             }
981
-            else if (ro.F_RoleCode == "ZG")
982
-            {
983
-                sql += "AND F_Distribution =" + ua.F_DeptId;
984
-            }
981
+          
985 982
             return sql;
986 983
         }
987 984
         /// <summary>

+ 4 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WorkOrderInput.cs

@@ -327,5 +327,9 @@ namespace CallCenterApi.Interface.Models.Input
327 327
         {
328 328
             get; set;
329 329
         }
330
+        public DateTime? F_ltemlastTime
331
+        {
332
+            get; set;
333
+        }
330 334
     }
331 335
 }