diff --git a/FCL/BLL/SysManage/Sys_ButtonPowerService.cs b/FCL/BLL/SysManage/Sys_ButtonPowerService.cs
index 5c28400..bcbd63c 100644
--- a/FCL/BLL/SysManage/Sys_ButtonPowerService.cs
+++ b/FCL/BLL/SysManage/Sys_ButtonPowerService.cs
@@ -1,7 +1,9 @@
-using System;
+using NPOI.SS.Formula.Atp;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Web.Security;
namespace BLL
{
@@ -45,7 +47,7 @@ namespace BLL
{
var bt = from x in Funs.DB.Sys_ButtonPower
join y in Funs.DB.Sys_Menu on x.MenuId equals y.MenuId
- where x.RoleId == roleId
+ where x.RoleId == roleId
select x;
if (bt.Count() > 0)
@@ -104,8 +106,25 @@ namespace BLL
//}
//else
//{
- return false;
+ return false;
//}
}
+
+ ///
+ /// 根据用户id获取有ViewAll按钮权限用户
+ ///
+ ///
+ ///
+ public static Model.Sys_User GetButtonPowerByUserId(string userId)
+ {
+ var q = (from x in Funs.DB.Sys_User
+ join y in Funs.DB.Sys_Role on x.RoleId equals y.RoleId
+ join z in Funs.DB.Sys_ButtonPower on y.RoleId equals z.RoleId
+ join w in Funs.DB.Sys_ButtonToMenu on z.ButtonToMenuId equals w.ButtonToMenuId
+ where w.ButtonEnName == "ViewAll"
+ && x.UserId == userId
+ select x).FirstOrDefault();
+ return q;
+ }
}
}
diff --git a/FCL/FineUIPro.Web/File/Excel/CSafePunish.xlsx b/FCL/FineUIPro.Web/File/Excel/CSafePunish.xlsx
new file mode 100644
index 0000000..085f6d7
Binary files /dev/null and b/FCL/FineUIPro.Web/File/Excel/CSafePunish.xlsx differ
diff --git a/FCL/FineUIPro.Web/SES/CQualityPunish.aspx.cs b/FCL/FineUIPro.Web/SES/CQualityPunish.aspx.cs
index e1e658c..331980f 100644
--- a/FCL/FineUIPro.Web/SES/CQualityPunish.aspx.cs
+++ b/FCL/FineUIPro.Web/SES/CQualityPunish.aspx.cs
@@ -41,7 +41,8 @@ namespace FineUIPro.Web.SES
private void BindGrid()
{
string strSql = string.Empty;
- if (this.CurrUser.UserId == BLL.Const.GlyId)
+ var user = BLL.Sys_ButtonPowerService.GetButtonPowerByUserId(this.CurrUser.UserId);
+ if (this.CurrUser.UserId == BLL.Const.GlyId || user != null)
{
strSql = @"SELECT * FROM dbo.View_EMC_Que_Punishment WHERE Flag='2' ";
}
diff --git a/FCL/FineUIPro.Web/SES/CSafePunish.aspx.cs b/FCL/FineUIPro.Web/SES/CSafePunish.aspx.cs
index 00848de..867001a 100644
--- a/FCL/FineUIPro.Web/SES/CSafePunish.aspx.cs
+++ b/FCL/FineUIPro.Web/SES/CSafePunish.aspx.cs
@@ -391,7 +391,7 @@ namespace FineUIPro.Web.SES
{
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
//模板文件
- string TempletFileName = rootPath + "Punishment.xlsx";
+ string TempletFileName = rootPath + "CSafePunish.xlsx";
//导出文件
string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\";
if (!Directory.Exists(filePath))
diff --git a/FCL/FineUIPro.Web/Web.config b/FCL/FineUIPro.Web/Web.config
index f4e479f..c97a2b2 100644
--- a/FCL/FineUIPro.Web/Web.config
+++ b/FCL/FineUIPro.Web/Web.config
@@ -55,7 +55,7 @@
-
+
@@ -152,7 +152,7 @@
-
+