|
|
@@ -4,6 +4,7 @@ using Learun.Util; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Data; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
|
|
|
|
namespace Learun.Application.TwoDevelopment.AssetManagementSystem |
|
|
@@ -45,10 +46,20 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem |
|
|
|
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); |
|
|
|
strSql.Append(" AND ( t.ApplyTime >= @startTime AND t.ApplyTime <= @endTime ) "); |
|
|
|
} |
|
|
|
if (!queryParam["ApplyUser"].IsEmpty()) |
|
|
|
var userLogin = LoginUserInfo.Get(); |
|
|
|
var PrincipalRole = Config.GetValue("PrincipalRoleId"); |
|
|
|
var loginInfoRoleIds = LoginUserInfo.Get().roleIds; |
|
|
|
if (!userLogin.Description.Contains("管理员") && !loginInfoRoleIds.Split(',').Contains(PrincipalRole)) |
|
|
|
{ |
|
|
|
dp.Add("ApplyUser", queryParam["ApplyUser"].ToString(), DbType.String); |
|
|
|
strSql.Append(" AND t.ApplyUser = @ApplyUser "); |
|
|
|
strSql.Append(" AND t.ApplyUser = '" + userLogin.userId + "' "); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!queryParam["ApplyUser"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("ApplyUser", queryParam["ApplyUser"].ToString(), DbType.String); |
|
|
|
strSql.Append(" AND t.ApplyUser = @ApplyUser "); |
|
|
|
} |
|
|
|
} |
|
|
|
return this.BaseRepository("CollegeMIS").FindList<FundsApplyEntity>(strSql.ToString(), dp, pagination); |
|
|
|
} |
|
|
|