Commit a5b9bde6 authored by 黄奎's avatar 黄奎

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents 8683c1c8 017a1d8b
......@@ -132,15 +132,15 @@ WHERE 1=1 and a.ExamineStatus=2 and b.ExamineStatus=2
}
else if (query.ExamStatus == 2)
{
builder.AppendFormat(" AND a.{0} < '{1}' and a.{2} > '{1}' ", nameof(RB_Examination_Publish_ViewModel.ExamStartTime), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), nameof(RB_Examination_Publish_ViewModel.ExamEndTime));
builder.AppendFormat(" AND a.{0} < '{1}' and a.{2} > '{1}' and c.{3}=2 ", nameof(RB_Examination_Publish_ViewModel.ExamStartTime), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), nameof(RB_Examination_Publish_ViewModel.ExamEndTime), nameof(RB_Examination_Publish_ViewModel.ExamStatus));
}
else if (query.ExamStatus == 3)
{
builder.AppendFormat(" AND a.{0} > '{1}' and c.{2}=0 ", nameof(RB_Examination_Publish_ViewModel.ExamEndTime), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), nameof(RB_Examination_Publish_ViewModel.ExamStatus));
builder.AppendFormat(" AND a.{0} < '{1}' and c.{2}=2 ", nameof(RB_Examination_Publish_ViewModel.ExamEndTime), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), nameof(RB_Examination_Publish_ViewModel.ExamStatus));
}
else if (query.ExamStatus == 4)
{
builder.AppendFormat(" AND a.{0} > '{1}' and c.{2}=1 ", nameof(RB_Examination_Publish_ViewModel.ExamEndTime), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), nameof(RB_Examination_Publish_ViewModel.ExamStatus));
builder.AppendFormat(" AND c.{0}=1 ", nameof(RB_Examination_Publish_ViewModel.ExamStatus));
}
}
}
......
......@@ -118,9 +118,16 @@ namespace Edu.WebApi.Controllers.Applet
}
else if (item.ExamStartTime < System.DateTime.Now && item.ExamEndTime > System.DateTime.Now)
{
item.ExamStatusStr = "已开始";
if (item.ExamStatus == 2)
{
item.ExamStatusStr = "已开始";
}
if (item.ExamStatus == 1)
{
item.ExamStatusStr = "完成";
}
}
else if (item.ExamEndTime > System.DateTime.Now)
else if (item.ExamEndTime < System.DateTime.Now)
{
if (item.ExamStatus == 2)
{
......@@ -519,7 +526,18 @@ namespace Edu.WebApi.Controllers.Applet
{
item.ExamStatusStr = "未开始";
}
else if (item.ExamEndTime > System.DateTime.Now)
else if (item.ExamStartTime<System.DateTime.Now&& item.ExamEndTime > System.DateTime.Now)
{
if (item.ExamStatus==2)
{
item.ExamStatusStr = "已开始";
}
if (item.ExamStatus == 1)
{
item.ExamStatusStr = "完成";
}
}
else if ( item.ExamEndTime < System.DateTime.Now)
{
if (item.ExamStatus == 2)
{
......@@ -530,10 +548,6 @@ namespace Edu.WebApi.Controllers.Applet
item.ExamStatusStr = "完成";
}
}
else if (item.ExamStartTime < System.DateTime.Now && item.ExamEndTime > System.DateTime.Now)
{
item.ExamStatusStr = "已开始";
}
}
pageModel.PageData = list.Select(x => new
{
......
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