Compare commits

..

No commits in common. "aa7b035eb6c1129e635a6eeadd8463d026cbe376" and "520a3ef59f9310926d1e10bf74a55018482988b1" have entirely different histories.

4 changed files with 27 additions and 8 deletions

View File

@ -1,7 +1,6 @@
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;
@ -85,7 +84,6 @@ 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);
@ -96,7 +94,6 @@ 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)
@ -106,7 +103,6 @@ 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

View File

@ -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,
ReliefType =s.ReliefType?.ToEnum<ReliefSubTimeEnum>()
});
userCenterImp.Add(new UserExcelExportData()
{

View File

@ -0,0 +1,23 @@
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,
}
}

View File

@ -34,8 +34,8 @@ namespace Learn.Archives.Core.Model
/// <summary>
/// 减免申请类型
/// </summary>
[SugarColumn(IsNullable = true, Length = 20)]
public string? ReliefType { get; set; }
[SugarColumn(IsNullable = true)]
public ReliefSubTimeEnum? ReliefType { get; set; }
/// <summary>
/// 减免申请时间
/// </summary>