cleanup
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
59d1327aa9
commit
5fbda5e2ed
|
|
@ -119,7 +119,7 @@ namespace _2021_backend.Pages.Message
|
||||||
var stu = Context.Students.ToList();
|
var stu = Context.Students.ToList();
|
||||||
foreach (var e in stu)
|
foreach (var e in stu)
|
||||||
{
|
{
|
||||||
if (e.Status != status.不通过)
|
if (e.Status != status.不通过 && e.Status != status.已选时间)
|
||||||
{
|
{
|
||||||
await Utils.TencentSMS.Send(Context, SMSType.TimeSelect, e, Context.Users.Find(Guid.Parse(User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Sid).Value)).Name);
|
await Utils.TencentSMS.Send(Context, SMSType.TimeSelect, e, Context.Users.Find(Guid.Parse(User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Sid).Value)).Name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-outline-primary m-2">搜索</button>
|
<button type="submit" class="btn btn-outline-primary m-2">搜索</button>
|
||||||
<input type="submit" value="finalize" class="btn btn-primary" asp-page-handler="Finalize" />
|
<input type="submit" value="finalize" class="btn btn-primary" asp-page-handler="Cleanup" />
|
||||||
</form>
|
</form>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ namespace _2021_backend.Pages.Students
|
||||||
foreach(var s in Context.Students)
|
foreach(var s in Context.Students)
|
||||||
{
|
{
|
||||||
if (s.RegisterTime.CompareTo(new DateTime(2021, 11, 11)) > 0) s.Status = status.不通过;
|
if (s.RegisterTime.CompareTo(new DateTime(2021, 11, 11)) > 0) s.Status = status.不通过;
|
||||||
else if (s.Status == status.不通过) s.Status = status.刚报名;
|
else if (s.Timelist.Count == 0) s.Status = status.需调整时间;
|
||||||
}
|
}
|
||||||
Context.SaveChanges();
|
Context.SaveChanges();
|
||||||
return Construct((int)pageId, errInfo);
|
return Construct((int)pageId, errInfo);
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace _2021_backend.Utils
|
||||||
public static bool Arrange(BackendContext context)
|
public static bool Arrange(BackendContext context)
|
||||||
{
|
{
|
||||||
Context = context;
|
Context = context;
|
||||||
students = context.Students.Where(it => it.Status != status.不通过 && it.Status != status.已确认时间 && it.Timelist.Count != 0 && it.InterviewTime == Guid.Empty && it.Status != status.需调整时间).OrderBy(it => it.Timelist.Count).ToList();
|
students = context.Students.Where(it => it.Status == status.已选时间).OrderBy(it => it.Timelist.Count).ToList();
|
||||||
sessions = context.Sessions.OrderBy(it => it.Day).ThenByDescending(it => it.Capacity - it.Students.Count).ThenBy(it => it.BeginTime).ThenBy(it => it.Place).ToList();
|
sessions = context.Sessions.OrderBy(it => it.Day).ThenByDescending(it => it.Capacity - it.Students.Count).ThenBy(it => it.BeginTime).ThenBy(it => it.Place).ToList();
|
||||||
students.Sort((Student a, Student b) =>
|
students.Sort((Student a, Student b) =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue