staging #31
|
|
@ -1,6 +1,7 @@
|
|||
using Learn.Archives.API.Controllers.Dto;
|
||||
using Learn.Archives.API.Expand;
|
||||
using Learn.Archives.Core.Common;
|
||||
using Learn.Archives.Core.Common.Expand;
|
||||
using Learn.Archives.Core.Model;
|
||||
using Learn.Archives.Core.Model.Dto;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
|
@ -84,6 +85,7 @@ namespace Learn.Archives.API.Controllers
|
|||
var insertUserInfo = new List<ExamUserInfo>();
|
||||
var insertClassInfo = new List<ExamClassInfo>();
|
||||
var db = schoolService.Context;
|
||||
SqlSugarExpand.SetDbAop(db);
|
||||
foreach (var schoolArr in dataList.GroupBy(s => s.School))
|
||||
{
|
||||
var school = await schoolService.GetFirstAsync(s => s.Name == schoolArr.Key);
|
||||
|
|
@ -94,6 +96,7 @@ namespace Learn.Archives.API.Controllers
|
|||
var classArr = await db.Queryable<Classes>().Where(c => c.SchoolId == school.Id &&
|
||||
c.GradeLevel == gradeInfo.GradeLevel &&
|
||||
c.GraduationYear == gradeInfo.GradeYear && !c.DeleteState).ToArrayAsync();
|
||||
|
||||
var userDic = await db.Queryable<School>()
|
||||
.LeftJoin<Classes>((s, c) => c.SchoolId == s.Id)
|
||||
.LeftJoin<Position>((s, c, p) => p.ClassId == c.Id)
|
||||
|
|
@ -103,6 +106,7 @@ namespace Learn.Archives.API.Controllers
|
|||
s.Id == school.Id &&
|
||||
c.GradeLevel == gradeInfo.GradeLevel &&
|
||||
c.GraduationYear == gradeInfo.GradeYear &&
|
||||
u.UserType == UserTypeEnum.学生.GetHashCode() &&
|
||||
s.Enable && p.Enable && pr.Enable &&
|
||||
!p.DeleteState && !c.DeleteState && !u.DeleteState && !s.DeleteState)
|
||||
.Select((s, c, p, pr, u) => new
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ namespace Learn.Archives.API.Controllers
|
|||
item.AmountRelief = ex.AmountRelief;
|
||||
item.ReliefApplication = ex.ReliefApplication;
|
||||
item.Remark = ex.Remark;
|
||||
item.ReliefType = ex.ReliefType.ToString();
|
||||
item.ReliefType = ex?.ReliefType?.ToString();
|
||||
item.ReliefSubTime = ex.ReliefSubTime?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||
|
||||
}
|
||||
|
|
@ -209,7 +209,7 @@ namespace Learn.Archives.API.Controllers
|
|||
UserCenterId = s.Id,
|
||||
ReliefApplication=s.ReliefApplication?.Contains("已申请")??false,
|
||||
ReliefSubTime = s.ReliefSubTime,
|
||||
ReliefType =s.ReliefType?.ToEnum<ReliefSubTimeEnum>()
|
||||
ReliefType =s.ReliefType,
|
||||
});
|
||||
userCenterImp.Add(new UserExcelExportData()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Learn.Archives.Core.Model.Enum
|
||||
{
|
||||
/// <summary>
|
||||
/// 学生减免类型
|
||||
/// </summary>
|
||||
public enum ReliefSubTimeEnum
|
||||
{
|
||||
低保户 = 10,
|
||||
教师子女 = 20,
|
||||
孤儿 = 30,
|
||||
艺体生 = 40,
|
||||
残疾学生 = 50,
|
||||
领导特殊承诺减免 = 60,
|
||||
领导同意的特殊贫困减免 = 70,
|
||||
建卡贫困户 = 80,
|
||||
}
|
||||
}
|
||||
|
|
@ -34,8 +34,8 @@ namespace Learn.Archives.Core.Model
|
|||
/// <summary>
|
||||
/// 减免申请类型
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public ReliefSubTimeEnum? ReliefType { get; set; }
|
||||
[SugarColumn(IsNullable = true, Length = 20)]
|
||||
public string? ReliefType { get; set; }
|
||||
/// <summary>
|
||||
/// 减免申请时间
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue