Parcourir la Source

优化全部工单权限

zhangkun il y a 5 ans
Parent
commit
5cbd7aad01

+ 9 - 1
web/YTSoft.BaseCallCenter.MVCWeb/Controllers/Order/OrderController.cs

@@ -1655,7 +1655,15 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
1655 1655
             string tableNew = "(select DISTINCT  t.*  ";
1656 1656
             tableNew += ", case WHEN F_SENTORDERTIME IS NULL AND DATEDIFF(minute, DATEADD(day,1,F_CREATEDATE),  GETDATE())> 0  THEN 0 WHEN F_SENTORDERTIME IS NULL  THEN 1 WHEN DATEDIFF(minute, DATEADD(day,1,F_CREATEDATE), F_SENTORDERTIME)> 0 THEN 0 ELSE 1 END AS turntime ";
1657 1657
             tableNew += " from T_Wo_WorkOrderBase t LEFT JOIN T_Wo_WorkOrderHistory h ON t.F_WORKORDERID=h.F_INSTANCEID LEFT JOIN T_Sys_UserAccount u ON  t.F_USERID= u.F_UserId";
1658
-            tableNew += string.Format(" where(u.F_DeptId ={0}     OR h.F_OPTBTNID ={0})) as t", F_DeptId);
1658
+            
1659
+            if (F_RoleID == 17)
1660
+            {
1661
+                tableNew += " ) as t";
1662
+            }
1663
+            else
1664
+            {
1665
+                tableNew += string.Format(" where (u.F_DeptId ={0}     OR h.F_OPTBTNID ={0})) as t", F_DeptId);
1666
+            }
1659 1667
             DataTable dt = new DataTable();
1660 1668
             int recordCount = 0;
1661 1669
             Model.PageData<Model.T_Wo_WorkOrderBase> pageModel = new Model.PageData<Model.T_Wo_WorkOrderBase>();