|
|
@@ -328,10 +328,10 @@ SELECT ruserid from [dbo].[LR_OA_NewsShouldRead] where newsid='{news.F_NewsId}' |
|
|
|
strSql.Append(" left join LR_OA_NewsRead r on t.F_NewsId = r.NewsId and r.RUserId=@userId "); |
|
|
|
strSql.Append(" left join lr_base_user u on u.F_UserId=@userId "); |
|
|
|
strSql.Append(" WHERE t.F_TypeId = 2 and t.F_DeleteMark=0 and t.F_EnabledMark=1 "); |
|
|
|
if (userinfo.account.Contains("20")) |
|
|
|
{ |
|
|
|
strSql.Append(" and t.F_ReleaseTime>CONVERT(datetime,SUBSTRING(u.F_Account,1,4)+'-08-31',120) "); |
|
|
|
} |
|
|
|
//if (userinfo.account.Contains("20")) |
|
|
|
//{ |
|
|
|
// strSql.Append(" and t.F_ReleaseTime>CONVERT(datetime,SUBSTRING(u.F_Account,1,4)+'-08-31',120) "); |
|
|
|
//} |
|
|
|
|
|
|
|
strSql.Append($@" and ( |
|
|
|
((t.F_SendDeptId is null or len(t.F_SendDeptId)=0) and (t.F_SendPostId is null or len(t.F_SendPostId)=0)) |
|
|
@@ -401,10 +401,11 @@ SELECT ruserid from [dbo].[LR_OA_NewsShouldRead] where newsid='{news.F_NewsId}' |
|
|
|
strSql.Append(" left join lr_base_user u on u.F_UserId=@userId "); |
|
|
|
strSql.Append(" left join LR_BASE_DEPARTMENT d on d.F_DepartmentId = t.F_SendDeptId "); |
|
|
|
strSql.Append(" WHERE t.F_TypeId = 2 and t.F_DeleteMark=0 and t.F_EnabledMark=1 "); |
|
|
|
if (userinfo.account.Contains("20")) |
|
|
|
{ |
|
|
|
strSql.Append(" and t.F_ReleaseTime>CONVERT(datetime,SUBSTRING(u.F_Account,1,4)+'-08-31',120) "); |
|
|
|
} |
|
|
|
//去掉用户入职时间条件 |
|
|
|
//if (userinfo.account.Contains("20")) |
|
|
|
//{ |
|
|
|
// strSql.Append(" and t.F_ReleaseTime>CONVERT(datetime,SUBSTRING(u.F_Account,1,4)+'-08-31',120) "); |
|
|
|
//} |
|
|
|
|
|
|
|
strSql.Append($@" and ( |
|
|
|
((t.F_SendDeptId is null or len(t.F_SendDeptId)=0) and (t.F_SendPostId is null or len(t.F_SendPostId)=0)) |
|
|
|