You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.2 KiB
34 lines
1.2 KiB
using NFine.Code;
|
|
using System;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using System.Data.Common;
|
|
using System.Data.SqlClient;
|
|
using System.IO;
|
|
using System.Security.Cryptography;
|
|
using System.Text;
|
|
|
|
namespace NFine.Data.Extensions
|
|
{
|
|
public class HelperMethod
|
|
{
|
|
/// <summary>
|
|
/// 通过用户获取角色对应的厂库权限
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public static string GetWarehousePermissions(string userCode,string workpoint)
|
|
{
|
|
string sql = $@"SELECT b.F_Define2 Condition FROM Sys_SRM_Items a
|
|
INNER JOIN Sys_SRM_ItemsDetail b ON a.F_Id = b.F_ItemId
|
|
INNER JOIN(SELECT b.F_EnCode from Sys_SRM_User a
|
|
inner JOIN Sys_SRM_Role b ON a.F_RoleId= b.F_ID
|
|
WHERE a.F_Account= '{userCode}' AND a.F_Location= '{workpoint}') c ON b.F_Define1 = c.F_EnCode
|
|
WHERE a.F_EnCode = 'RoleWarehouse' ";
|
|
DataTable dt = SqlHelper.GetDataTableBySql(sql);
|
|
return dt.Rows.Count>0?dt.Rows[0]["Condition"].ToString():"";
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|