Commit 5c602063 authored by 黄奎's avatar 黄奎

页面修改

parent 0782273f
......@@ -35,11 +35,11 @@ namespace Edu.Module.Goods
/// 获取问卷调查列表
/// </summary>
/// <param name="where"></param>
/// <param name="StuId"></param>
/// <param name="StuAccountId"></param>
/// <returns></returns>
public List<RB_ActivitySurvey> GetActivitySurveyListModule(RB_ActivitySurvey where, string StuId)
public List<RB_ActivitySurvey> GetActivitySurveyListModule(RB_ActivitySurvey where, string StuAccountId)
{
return activitySurveyRepository.GetActivitySurveyListRepository(where, StuId);
return activitySurveyRepository.GetActivitySurveyListRepository(where, StuAccountId);
}
#region 活动参与人员
......
......@@ -20,19 +20,21 @@ namespace Edu.Repository.Mall
/// 获取问卷调查列表
/// </summary>
/// <param name="where"></param>
/// <param name="StuId"></param>
/// <param name="StuAccountId"></param>
/// <returns></returns>
public List<RB_ActivitySurvey> GetActivitySurveyListRepository(RB_ActivitySurvey where,string StuId)
public List<RB_ActivitySurvey> GetActivitySurveyListRepository(RB_ActivitySurvey where,string StuAccountId)
{
StringBuilder sb = new StringBuilder();
sb.AppendFormat($@"
SELECT A.*
FROM RB_ActivitySurvey AS A
WHERE A.State=0 ");
sb.AppendFormat(" AND A.StartDate<'{0}' AND A.EndDate>'{0}' ", Common.ConvertHelper.FormatDate(DateTime.Now));
if (!string.IsNullOrEmpty(StuId))
string dateStr = Common.ConvertHelper.FormatDate(DateTime.Now);
sb.AppendFormat(" AND A.StartDate<'{0}' AND A.EndDate>'{0}' ", dateStr);
if (!string.IsNullOrEmpty(StuAccountId))
{
sb.AppendFormat(" AND NOT EXISTS(SELECT 1 FROM rb_guestsurvey WHERE UserType=2 AND ActivitySurveyId=A.ID AND UserId={0}) ", StuId);
//sb.AppendFormat(" AND NOT EXISTS(SELECT 1 FROM rb_guestsurvey WHERE UserType=2 AND ActivitySurveyId=A.ID AND UserId={0}) ", StuAccountId);
sb.AppendFormat(" AND EXISTS(SELECT 1 FROM RB_ActivitySurvey_Guest WHERE GuestType=2 AND IsFinish=0 AND SurveyId=A.ID AND GuestId={0} AND StartTime<'{1}' AND EndTime>'{1}' )", StuAccountId, dateStr);
}
if (where != null)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment