commit
d22e07353d
|
|
@ -17,7 +17,7 @@ namespace Learn.Archives.API.Controllers.Dto
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 导入的错误结果
|
/// 导入的错误结果
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ImportExamInfoError: ImportExamInfo
|
public class ImportExamInfoError : ImportExamInfo
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 学校
|
/// 学校
|
||||||
|
|
@ -25,10 +25,10 @@ namespace Learn.Archives.API.Controllers.Dto
|
||||||
[ExcelColumnName("错误信息")]
|
[ExcelColumnName("错误信息")]
|
||||||
public string? Error { get; set; }
|
public string? Error { get; set; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 导入考试成绩
|
/// 导入考试成绩
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ImportExamInfo
|
public class ImportExamInfo
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 学校
|
/// 学校
|
||||||
|
|
@ -117,6 +117,12 @@ namespace Learn.Archives.API.Controllers.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ExcelColumnName("赋分后总分")]
|
[ExcelColumnName("赋分后总分")]
|
||||||
public decimal 赋分后总分 { get; set; }
|
public decimal 赋分后总分 { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 总分资源校排名
|
||||||
|
/// </summary>
|
||||||
|
[ExcelColumn(Name="赋分总分资源校排名",Width =20)]
|
||||||
|
public int 资源校排名 { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RestartEntryDto
|
public class RestartEntryDto
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,11 @@ namespace Learn.Archives.API.Controllers
|
||||||
var errorExcelInfo = new List<ImportExamInfoError>();
|
var errorExcelInfo = new List<ImportExamInfoError>();
|
||||||
var insertUserInfo = new List<ExamUserInfo>();
|
var insertUserInfo = new List<ExamUserInfo>();
|
||||||
var insertClassInfo = new List<ExamClassInfo>();
|
var insertClassInfo = new List<ExamClassInfo>();
|
||||||
|
var oldUidAr = await examUserInfoService.AsQueryable()
|
||||||
|
.Where(s => s.ExamId == exam.Id)
|
||||||
|
.Select(s=>s.UserId)
|
||||||
|
.ToArrayAsync();
|
||||||
|
var oldUidHash = oldUidAr.ToHashSet();
|
||||||
var db = schoolService.Context;
|
var db = schoolService.Context;
|
||||||
SqlSugarExpand.SetDbAop(db);
|
SqlSugarExpand.SetDbAop(db);
|
||||||
foreach (var schoolArr in dataList.GroupBy(s => s.School))
|
foreach (var schoolArr in dataList.GroupBy(s => s.School))
|
||||||
|
|
@ -135,6 +140,12 @@ namespace Learn.Archives.API.Controllers
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
var uid = userDic[name];
|
var uid = userDic[name];
|
||||||
|
if(oldUidHash!=null &&oldUidHash.Contains((long)uid))
|
||||||
|
{
|
||||||
|
s.Error = "此学生已经在考试中已经录入过成绩";
|
||||||
|
errorExcelInfo.Add(s);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return new ExamUserInfo()
|
return new ExamUserInfo()
|
||||||
{
|
{
|
||||||
ExamId = exam.Id,
|
ExamId = exam.Id,
|
||||||
|
|
@ -149,7 +160,7 @@ namespace Learn.Archives.API.Controllers
|
||||||
Type = exam.Type,
|
Type = exam.Type,
|
||||||
SubjectDic = sub,
|
SubjectDic = sub,
|
||||||
AssignScore = s.赋分后总分,
|
AssignScore = s.赋分后总分,
|
||||||
AssignRanking = 0,
|
AssignRanking = s.资源校排名,
|
||||||
};
|
};
|
||||||
}).ToList();
|
}).ToList();
|
||||||
insertUserInfo.AddRange(userList);
|
insertUserInfo.AddRange(userList);
|
||||||
|
|
@ -196,14 +207,15 @@ namespace Learn.Archives.API.Controllers
|
||||||
eCInfo.Average = avgTotal / eCInfo.PeopleCount;
|
eCInfo.Average = avgTotal / eCInfo.PeopleCount;
|
||||||
//计算上线率
|
//计算上线率
|
||||||
eCInfo.OnLineRate = (decimal)eCInfo.OnLineCount / (decimal)eCInfo.PeopleCount;
|
eCInfo.OnLineRate = (decimal)eCInfo.OnLineCount / (decimal)eCInfo.PeopleCount;
|
||||||
//处理学生班级排名
|
//不计算 直接Excel导入
|
||||||
var i = 0;
|
////处理学生班级排名
|
||||||
foreach (var item in classUserArr.OrderByDescending(s => s.AssignScore)
|
//var i = 0;
|
||||||
.GroupBy(s => s.AssignScore))
|
//foreach (var item in classUserArr.OrderByDescending(s => s.AssignScore)
|
||||||
{
|
// .GroupBy(s => s.AssignScore))
|
||||||
foreach (var u in item)
|
//{
|
||||||
u.AssignRanking =++ i;
|
// foreach (var u in item)
|
||||||
}
|
// u.AssignRanking =++ i;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,13 @@
|
||||||
using Learn.Archives.API.Expand;
|
using Learn.Archives.API.Expand;
|
||||||
using Learn.Archives.Core.Common;
|
using Learn.Archives.Core.Common;
|
||||||
using Learn.Archives.Core.Model;
|
using Learn.Archives.Core.Model;
|
||||||
|
using Learn.Archives.Core.Model.Dto;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using UserCenter.Model;
|
using UserCenter.Model;
|
||||||
|
using UserCenter.Model.Common;
|
||||||
|
|
||||||
namespace Learn.Archives.API.Controllers
|
namespace Learn.Archives.API.Controllers
|
||||||
{
|
{
|
||||||
|
|
@ -22,5 +24,29 @@ namespace Learn.Archives.API.Controllers
|
||||||
this.baseService = baseService;
|
this.baseService = baseService;
|
||||||
this.userInfo = userInfo;
|
this.userInfo = userInfo;
|
||||||
}
|
}
|
||||||
|
public override Task<dynamic> PageList([FromBody] QueryRequestBase model)
|
||||||
|
{
|
||||||
|
var c = model.Conditions.FirstOrDefault(s => s.FieldName == "Grade");
|
||||||
|
if (c != null)
|
||||||
|
{
|
||||||
|
var gInfo = GradeHelper.GetStudentGradeBaseByGrade(c.FieldValue);
|
||||||
|
if (gInfo != null)
|
||||||
|
{
|
||||||
|
model.Conditions = model.Conditions.Where(s => s != c).ToList();
|
||||||
|
model.Conditions.Add(new SqlSugar.ConditionalModel()
|
||||||
|
{
|
||||||
|
FieldName = "GradeLevel",
|
||||||
|
FieldValue = gInfo.GradeLevel,
|
||||||
|
});
|
||||||
|
model.Conditions.Add(new SqlSugar.ConditionalModel()
|
||||||
|
{
|
||||||
|
FieldName = "GradeYear",
|
||||||
|
FieldValue = gInfo.GradeYear.ToString(),
|
||||||
|
CSharpTypeName = "int"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return base.PageList(model);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,7 @@ namespace Learn.Archives.API.Controllers
|
||||||
ReliefApplication=s.ReliefApplication?.Contains("已申请")??false,
|
ReliefApplication=s.ReliefApplication?.Contains("已申请")??false,
|
||||||
ReliefSubTime = s.ReliefSubTime,
|
ReliefSubTime = s.ReliefSubTime,
|
||||||
ReliefType =s.ReliefType,
|
ReliefType =s.ReliefType,
|
||||||
|
StudentType =s.StudentType.ToEnum<StudentTypeEnum>(),
|
||||||
});
|
});
|
||||||
userCenterImp.Add(new UserExcelExportData()
|
userCenterImp.Add(new UserExcelExportData()
|
||||||
{
|
{
|
||||||
|
|
@ -269,8 +270,9 @@ namespace Learn.Archives.API.Controllers
|
||||||
ClassType = "必填:可选值\r\n[云校班 海豚智学班 蓝鲸智库班 中职班 其他 雅思班 点阵笔班级 移动校园班级 智学班 ...]",
|
ClassType = "必填:可选值\r\n[云校班 海豚智学班 蓝鲸智库班 中职班 其他 雅思班 点阵笔班级 移动校园班级 智学班 ...]",
|
||||||
Status = "选填 可选值\r\n[就读,退出]",
|
Status = "选填 可选值\r\n[就读,退出]",
|
||||||
AmountRelief ="选填: 为0则视为 '未申请减免'",
|
AmountRelief ="选填: 为0则视为 '未申请减免'",
|
||||||
ReliefType ="选填: 1.建卡贫困户\r\n2.低保户\r\n3.教师子女 \r\n4.孤儿\r\n5.艺体生\r\n6.残疾学生\r\n7.领导特殊承诺减免\r\n8.领导同意的特殊贫困减免",
|
ReliefType ="选填: 建卡贫困户\r\n低保户\r\n教师子女 \r\n孤儿\r\n艺体生\r\n残疾学生\r\n领导特殊承诺减免\r\n领导同意的特殊贫困减免",
|
||||||
ReliefApplication ="选填: [已申请, 未申请]",
|
ReliefApplication ="选填: [已申请, 未申请]",
|
||||||
|
StudentType = "选填: 可选值:\r\n复读生\r\n艺术生\r\n春招生\r\n领导承诺批准全免\r\n资源班\r\n国际班\r\n合同制收费学校\r\n渠道商家属\r\n新开班但领导承诺第一学期不收费",
|
||||||
Phone="选填",
|
Phone="选填",
|
||||||
Remark="选填",
|
Remark="选填",
|
||||||
} };
|
} };
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,10 @@ namespace Learn.Archives.Core.Model.Dto
|
||||||
/// 执行时间
|
/// 执行时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? ExecutionTime { get; set; }
|
public DateTime? ExecutionTime { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 操作人 [后台自动赋值提交人名称]
|
||||||
|
/// </summary>
|
||||||
|
public string? Operator { get; set; }
|
||||||
public string? ExecutionTimeStr => ExecutionTime?.ToString("yyyy-MM-dd");
|
public string? ExecutionTimeStr => ExecutionTime?.ToString("yyyy-MM-dd");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,12 @@ namespace Learn.Archives.Core.Model.Dto
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 学生类型
|
||||||
|
/// </summary>
|
||||||
|
[ExcelColumn(Name = "学生类型", Width = 20)]
|
||||||
|
public string StudentType { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 学生状态[就读/退出]
|
/// 学生状态[就读/退出]
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
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 StudentTypeEnum
|
||||||
|
{
|
||||||
|
复读生 = 1,
|
||||||
|
艺术生 = 10,
|
||||||
|
春招生 = 20,
|
||||||
|
领导承诺批准全免 = 30,
|
||||||
|
资源班 = 40,
|
||||||
|
国际班 = 50,
|
||||||
|
合同制收费学校 = 60,
|
||||||
|
渠道商家属 = 70,
|
||||||
|
新开班但领导承诺第一学期不收费 = 80,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -36,6 +36,12 @@ namespace Learn.Archives.Core.Model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(IsNullable = true, Length = 20)]
|
[SugarColumn(IsNullable = true, Length = 20)]
|
||||||
public string? ReliefType { get; set; }
|
public string? ReliefType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 学生类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsNullable = true)]
|
||||||
|
public StudentTypeEnum? StudentType { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 减免申请时间
|
/// 减免申请时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue