dev #3
|
|
@ -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
|
||||
|
|
@ -254,7 +258,7 @@ namespace Learn.Archives.API.Controllers
|
|||
{
|
||||
List<ImportExamInfo> resultList = new List<ImportExamInfo>() { new ImportExamInfo()
|
||||
{
|
||||
School="例子学校",
|
||||
School="例子学校[导入时候请删除]",
|
||||
Class="测试班级",
|
||||
ClassType="普通班级",
|
||||
Grade="高2028",
|
||||
|
|
|
|||
|
|
@ -211,19 +211,27 @@ namespace Learn.Archives.API.Controllers
|
|||
}
|
||||
}
|
||||
}
|
||||
var feedbackQuestions = resultQuestion.ToArray();
|
||||
|
||||
var feedbackQuestions = resultQuestion.ToArray();
|
||||
if(feedbackQuestions.Length==0)
|
||||
{
|
||||
imp.Error = $"未能识别到有效的赴校问题信息";
|
||||
errorExcelInfo.Add(imp);
|
||||
continue;
|
||||
}
|
||||
//沟通时间/执行记录
|
||||
var regex1 = new Regex(@"(.*?):(.*?)(?=;|$)", RegexOptions.Singleline);
|
||||
var record = new List<RecordDto>();
|
||||
foreach (Match match in regex1.Matches(imp.Record))
|
||||
{
|
||||
record.Add(new RecordDto()
|
||||
|
||||
if (!string.IsNullOrEmpty(imp.Record))
|
||||
foreach (Match match in regex1.Matches(imp.Record))
|
||||
{
|
||||
ExecutionTime = match.Groups[1].Value.ExtractDateTime(),
|
||||
ExecutionRecords = match.Groups[2].Value,
|
||||
});
|
||||
}
|
||||
record.Add(new RecordDto()
|
||||
{
|
||||
ExecutionTime = match.Groups[1].Value.ExtractDateTime(),
|
||||
ExecutionRecords = match.Groups[2].Value,
|
||||
});
|
||||
}
|
||||
|
||||
var business = new SchoolBusiness()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -96,11 +96,16 @@ namespace Learn.Archives.API.Controllers
|
|||
res.Data.Add(item);
|
||||
if (!exDataDic.ContainsKey(item.Id)) continue;
|
||||
var ex = exDataDic[item.Id].First();
|
||||
item.AmountRelief = ex.AmountRelief;
|
||||
item.Status = ex.Status;
|
||||
item.ExitTime = ex.ExitTime?.ToString("yyyy-MM-dd")??string.Empty;
|
||||
item.JoinTime = ex.JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||
|
||||
item.AmountRelief = ex.AmountRelief;
|
||||
item.ReliefApplication = ex.ReliefApplication;
|
||||
item.Remark = ex.Remark;
|
||||
item.ReliefType = ex?.ReliefType?.ToString();
|
||||
item.ReliefSubTime = ex.ReliefSubTime?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
@ -202,6 +207,9 @@ namespace Learn.Archives.API.Controllers
|
|||
JoinTime = s.JoinTime,
|
||||
Status = s.Status.ToEnum<UserStatusEnum>()??default,
|
||||
UserCenterId = s.Id,
|
||||
ReliefApplication=s.ReliefApplication?.Contains("已申请")??false,
|
||||
ReliefSubTime = s.ReliefSubTime,
|
||||
ReliefType =s.ReliefType,
|
||||
});
|
||||
userCenterImp.Add(new UserExcelExportData()
|
||||
{
|
||||
|
|
@ -210,7 +218,7 @@ namespace Learn.Archives.API.Controllers
|
|||
School = s.School,
|
||||
Grade = s.Grade,
|
||||
Class = s.Class,
|
||||
ClassType = s.ClassType,
|
||||
ClassType = s.ClassType??ClassTypeEnum.云校班.ToString(),
|
||||
ExamNo = s.Id.ToString(),
|
||||
Phone = s.Phone,
|
||||
RealName = s.RealName,
|
||||
|
|
@ -252,7 +260,7 @@ namespace Learn.Archives.API.Controllers
|
|||
[HttpGet, ResultIgnore, AllowAnonymous]
|
||||
public IActionResult DwImportTemplate()
|
||||
{
|
||||
var resultList = new List<StudentInfoImport>() { new StudentInfoImport()
|
||||
var resultList = new List<StudentInfoImport>() { new StudentInfoImport()
|
||||
{
|
||||
RealName = "导入规范[导入时请删除本列]",
|
||||
School = "必填:与系统匹配",
|
||||
|
|
@ -261,6 +269,8 @@ namespace Learn.Archives.API.Controllers
|
|||
ClassType = "必填:可选值\r\n[云校班 海豚智学班 蓝鲸智库班 中职班 其他 雅思班 点阵笔班级 移动校园班级 智学班 ...]",
|
||||
Status = "选填 可选值\r\n[就读,退出]",
|
||||
AmountRelief ="选填: 为0则视为 '未申请减免'",
|
||||
ReliefType ="选填: 1.建卡贫困户\r\n2.低保户\r\n3.教师子女 \r\n4.孤儿\r\n5.艺体生\r\n6.残疾学生\r\n7.领导特殊承诺减免\r\n8.领导同意的特殊贫困减免",
|
||||
ReliefApplication ="选填: [已申请, 未申请]",
|
||||
Phone="选填",
|
||||
Remark="选填",
|
||||
} };
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR "/src/Learn.Archives.API"
|
||||
ENV NUGET_XMLDOC_MODE none
|
||||
RUN dotnet nuget add source --name marking https://gitea.23544.com/api/packages/marking/nuget/index.json
|
||||
RUN dotnet publish "Learn.Archives.API.csproj" -c Release -o /app
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app .
|
||||
ENV ASPNETCORE_ENVIRONMENT=Staging
|
||||
ENV TZ=Asia/Shanghai
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["dotnet", "Learn.Archives.API.dll"]
|
||||
|
|
@ -239,7 +239,7 @@ namespace Learn.Archives.API.Expand
|
|||
code = exception.Code;
|
||||
var result = new BaseReturn()
|
||||
{
|
||||
Code = -1,
|
||||
Code = code,
|
||||
Message = context.Exception.Message
|
||||
};
|
||||
context.Result = new JsonResult(result);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace Learn.Archives.Core.Model
|
|||
/// <summary>
|
||||
/// 账号
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 12)]
|
||||
[SugarColumn(Length = 20)]
|
||||
public string Account { get; set; }
|
||||
/// <summary>
|
||||
/// 密码
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ namespace Learn.Archives.Core.Model.Dto
|
|||
/// <summary>
|
||||
/// 姓名
|
||||
/// </summary>
|
||||
[ExcelColumn(Name="姓名", Width = 20)]
|
||||
[ExcelColumn(Name="姓名", Width = 28)]
|
||||
public string RealName { get; set; }
|
||||
/// <summary>
|
||||
/// 家长电话
|
||||
|
|
@ -141,6 +141,27 @@ namespace Learn.Archives.Core.Model.Dto
|
|||
[ExcelColumn(Name = "减免金额")]
|
||||
public string AmountRelief { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 减免是否申请
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "减免是否申请", Width = 15)]
|
||||
public string ReliefApplication { get; set; }
|
||||
/// <summary>
|
||||
/// 减免申请类型
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "减免申请类型", Width = 10)]
|
||||
public string? ReliefType { get; set; }
|
||||
/// <summary>
|
||||
/// 减免申请时间
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "减免申请时间", Width = 10)]
|
||||
public DateTime? ReliefSubTime { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 学生状态[就读/退出]
|
||||
/// </summary>
|
||||
|
|
@ -299,6 +320,19 @@ namespace Learn.Archives.Core.Model.Dto
|
|||
/// 退出时间
|
||||
/// </summary>
|
||||
public string? JoinTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 减免是否申请
|
||||
/// </summary>
|
||||
public bool ReliefApplication { get; set; }
|
||||
/// <summary>
|
||||
/// 减免申请类型
|
||||
/// </summary>
|
||||
public string? ReliefType { get; set; }
|
||||
/// <summary>
|
||||
/// 减免申请时间
|
||||
/// </summary>
|
||||
public string ReliefSubTime { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -470,7 +504,7 @@ namespace Learn.Archives.Core.Model.Dto
|
|||
/// </summary>
|
||||
public long SchoolId { get; set; }
|
||||
public bool Enable { get; set; }
|
||||
public DateTime? EndTime { get; set; }
|
||||
//public DateTime? EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 学校名称
|
||||
|
|
@ -479,7 +513,6 @@ namespace Learn.Archives.Core.Model.Dto
|
|||
/// <summary>
|
||||
/// 级别(初/高)
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public string GradeLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 所属届
|
||||
|
|
|
|||
|
|
@ -27,6 +27,20 @@ namespace Learn.Archives.Core.Model
|
|||
/// </summary>
|
||||
[SugarColumn(DecimalDigits =2)]
|
||||
public decimal AmountRelief { get; set; }
|
||||
/// <summary>
|
||||
/// 减免是否申请
|
||||
/// </summary>
|
||||
public bool ReliefApplication { get; set; }
|
||||
/// <summary>
|
||||
/// 减免申请类型
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true, Length = 20)]
|
||||
public string? ReliefType { get; set; }
|
||||
/// <summary>
|
||||
/// 减免申请时间
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public DateTime? ReliefSubTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 学生状态
|
||||
|
|
|
|||
Loading…
Reference in New Issue