From 9dbd3e49006acf0901c08480657224b501807a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com> Date: Wed, 3 Sep 2025 11:51:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=BF=81=E7=A7=BB=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E4=B8=BA=20=5Fv1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Learn.Archives.API/appsettings.Staging.json | 2 +- Learn.Archives.API/appsettings.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Learn.Archives.API/appsettings.Staging.json b/Learn.Archives.API/appsettings.Staging.json index 10408ea..6da4172 100644 --- a/Learn.Archives.API/appsettings.Staging.json +++ b/Learn.Archives.API/appsettings.Staging.json @@ -19,7 +19,7 @@ "OtherDBArr": [ { "ConfigId": 1001, //用户中心 - "ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Port=3306;Database=usercenter;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;", + "ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Port=3306;Database=usercenter_v1;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;", "SqlType": "MySql" } ] diff --git a/Learn.Archives.API/appsettings.json b/Learn.Archives.API/appsettings.json index ab25147..d3d0c1e 100644 --- a/Learn.Archives.API/appsettings.json +++ b/Learn.Archives.API/appsettings.json @@ -29,7 +29,7 @@ { "ConfigId": 1001, //用户中心 //"ConnectionString": "AllowLoadLocalInfile=true;Server=192.168.2.9;User ID=root;Password=qwe123!@#;Port=3306;Database=usercenter;CharSet=utf8mb4;pooling=true;SslMode=None;", - "ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Port=3306;Database=usercenter;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;", + "ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Port=3306;Database=usercenter_v1;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;", "SqlType": "MySql" } ] From d0638bcfd4058e2cd3db5d33b41812ba9f72bd6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com> Date: Fri, 5 Sep 2025 18:12:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E8=B5=B4=E6=A0=A1?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E6=8B=93=E5=B1=95=20=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E6=89=A7=E8=A1=8C=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ExamUserInfoController.cs | 16 ++++++++++++++-- Learn.Archives.API/appsettings.json | 2 +- .../Model/Dto/SchoolBusinessDto.cs | 6 +++++- Learn.Archives.Core/Model/SchoolBusiness.cs | 6 ++++++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Learn.Archives.API/Controllers/ExamUserInfoController.cs b/Learn.Archives.API/Controllers/ExamUserInfoController.cs index 8b0754e..c7a5903 100644 --- a/Learn.Archives.API/Controllers/ExamUserInfoController.cs +++ b/Learn.Archives.API/Controllers/ExamUserInfoController.cs @@ -6,9 +6,11 @@ using Learn.Archives.Core.Model.Dto; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Diagnostics; +using System.Linq; using System.Security.Claims; using UserCenter.Model; using UserCenter.Model.Common; +using UserCenter.Model.Enum; namespace Learn.Archives.API.Controllers { @@ -24,7 +26,7 @@ namespace Learn.Archives.API.Controllers this.baseService = baseService; this.userInfo = userInfo; } - public override Task PageList([FromBody] QueryRequestBase model) + public override async Task PageList([FromBody] QueryRequestBase model) { var c = model.Conditions.FirstOrDefault(s => s.FieldName == "Grade"); if (c != null) @@ -46,7 +48,17 @@ namespace Learn.Archives.API.Controllers }); } } - return base.PageList(model); + var oldSer = model.OrderBy.ToEnum(); + if (oldSer != null) + { + model.OrderBy = "id"; + var res = (PageResult)await base.PageList(model); + if (model.OrderByType == SqlSugar.OrderByType.Asc) + res.Data = res.Data.OrderBy(s => s.SubjectDic?[oldSer.Value]).ToList(); + else + res.Data = res.Data.OrderByDescending(s => s.SubjectDic?[oldSer.Value]).ToList(); + } + return await base.PageList(model); } } } diff --git a/Learn.Archives.API/appsettings.json b/Learn.Archives.API/appsettings.json index d3d0c1e..76c592f 100644 --- a/Learn.Archives.API/appsettings.json +++ b/Learn.Archives.API/appsettings.json @@ -14,7 +14,7 @@ "DB": { "ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Port=3306;Database=learn.archives;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;", "SqlType": "MySql", - "UpdateTable": false + "UpdateTable": true }, "AuthKey": { "Secret": "9FAB7AC7-F1DB-4C56-B84F-044055A34AF2", diff --git a/Learn.Archives.Core/Model/Dto/SchoolBusinessDto.cs b/Learn.Archives.Core/Model/Dto/SchoolBusinessDto.cs index 374f7fc..62306d0 100644 --- a/Learn.Archives.Core/Model/Dto/SchoolBusinessDto.cs +++ b/Learn.Archives.Core/Model/Dto/SchoolBusinessDto.cs @@ -51,7 +51,7 @@ namespace Learn.Archives.Core.Model.Dto /// public DateTime? ExecutionTime { get; set; } /// - /// 操作人 [后台自动赋值提交人名称] + /// 操作人 /// public string? Operator { get; set; } public string? ExecutionTimeStr => ExecutionTime?.ToString("yyyy-MM-dd"); @@ -86,6 +86,10 @@ namespace Learn.Archives.Core.Model.Dto /// 解决时间 /// public DateTime? EndTime { get; set; } + /// + /// 反馈问题的执行记录 + /// + public RecordDto[]? RecordArr { get; set; } public string? EndTimeStr=> EndTime?.ToString("yyyy-MM-dd"); diff --git a/Learn.Archives.Core/Model/SchoolBusiness.cs b/Learn.Archives.Core/Model/SchoolBusiness.cs index a181514..2542666 100644 --- a/Learn.Archives.Core/Model/SchoolBusiness.cs +++ b/Learn.Archives.Core/Model/SchoolBusiness.cs @@ -89,6 +89,12 @@ namespace Learn.Archives.Core.Model [SugarColumn(IsNullable = true, Length = 1000)] public string? ClassMeeting { get; set; } + /// + /// 预计解决时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? EndTime { get; set; } + /// /// 反馈问题数量 /// From abcdad03b08b80d2f74b765fb09631d6bd003fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com> Date: Fri, 12 Sep 2025 18:33:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=81=8C=E4=BD=8Did?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StudentController.cs | 44 ++++++++++++++++++- Learn.Archives.API/appsettings.json | 2 +- .../Learn.Archives.Core.csproj | 2 +- .../Model/Dto/UserCenterServiceDto.cs | 32 ++++++++++++++ 4 files changed, 76 insertions(+), 4 deletions(-) diff --git a/Learn.Archives.API/Controllers/StudentController.cs b/Learn.Archives.API/Controllers/StudentController.cs index c6a5b8c..d74102e 100644 --- a/Learn.Archives.API/Controllers/StudentController.cs +++ b/Learn.Archives.API/Controllers/StudentController.cs @@ -10,7 +10,9 @@ using Mapster; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using MiniExcelLibs; +using SqlSugar; using System.Diagnostics; +using System.Linq.Expressions; using System.Security.Claims; using System.Text.RegularExpressions; using UserCenter.Model; @@ -20,20 +22,22 @@ using UserCenter.Model.Enum; namespace Learn.Archives.API.Controllers { /// - /// 年级控制器 + /// 学生接口 /// public class StudentController : BackController { private readonly IHttpContextAccessor _httpContextAccessor; readonly Repository baseService; + readonly Repository positionService; readonly UserCenterService _userCenterService; readonly LiveUserInfo userInfo; - public StudentController(Repository baseService, LiveUserInfo userInfo, IHttpContextAccessor httpContextAccessor, UserCenterService userCenterService) : base(baseService) + public StudentController(Repository baseService, LiveUserInfo userInfo, IHttpContextAccessor httpContextAccessor, UserCenterService userCenterService, Repository positionService) : base(baseService) { this.baseService = baseService; this.userInfo = userInfo; _httpContextAccessor = httpContextAccessor; _userCenterService = userCenterService; + this.positionService = positionService; } [NonAction] @@ -54,6 +58,42 @@ namespace Learn.Archives.API.Controllers Oh.ModelError("无效数据"); return await baseService.AsQueryable().FirstAsync(s => s.UserCenterId == uid); } + /// + /// 获取职位id + /// 调用流程 用户中心->档案系统 + /// + /// + [HttpPost] + public async Task PosititonIds(PositionIdsReq[] data) + { + if (data == null || data.Count()==0) + Oh.ModelError("无效数据"); + var query = new Expressionable(); + foreach (var pos in data) + { + query = query.Or(q => + q.SchoolId == pos.SchoolId && + q.PositionType == pos.PositionType && + q.GradeLevel == pos.GradeLevel && + q.GraduationYear == pos.GraduationYear && + q.PositionLevel == pos.PositionLevel + && + ( + // PositionLevel == 3:只匹配前三个字段 + (pos.PositionLevel == 3) || + // PositionLevel == 4:再加上 ClassId + (pos.PositionLevel == 4 && q.ClassId == pos.ClassId) || + + // PositionLevel == 5:再加上 ClassId + SubjectId + (pos.PositionLevel == 5 && q.ClassId == pos.ClassId && q.SubjectId == pos.SubjectId) + ) + ); + } + return await positionService.AsQueryable() + .Where(query.ToExpression()) + .Select(p => p.Id).ToArrayAsync(); + } + /// /// 修改用户信息 diff --git a/Learn.Archives.API/appsettings.json b/Learn.Archives.API/appsettings.json index 76c592f..d3d0c1e 100644 --- a/Learn.Archives.API/appsettings.json +++ b/Learn.Archives.API/appsettings.json @@ -14,7 +14,7 @@ "DB": { "ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Port=3306;Database=learn.archives;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;", "SqlType": "MySql", - "UpdateTable": true + "UpdateTable": false }, "AuthKey": { "Secret": "9FAB7AC7-F1DB-4C56-B84F-044055A34AF2", diff --git a/Learn.Archives.Core/Learn.Archives.Core.csproj b/Learn.Archives.Core/Learn.Archives.Core.csproj index 7f3019b..d41fa79 100644 --- a/Learn.Archives.Core/Learn.Archives.Core.csproj +++ b/Learn.Archives.Core/Learn.Archives.Core.csproj @@ -28,6 +28,6 @@ - + diff --git a/Learn.Archives.Core/Model/Dto/UserCenterServiceDto.cs b/Learn.Archives.Core/Model/Dto/UserCenterServiceDto.cs index e1f0b17..1b4b135 100644 --- a/Learn.Archives.Core/Model/Dto/UserCenterServiceDto.cs +++ b/Learn.Archives.Core/Model/Dto/UserCenterServiceDto.cs @@ -10,6 +10,38 @@ using UserCenter.Model; namespace Learn.Archives.Core.Model.Dto { + + + public class PositionIdsReq + { + /// + /// 学校编号 + /// + public long SchoolId { get; set; } + /// + /// 年级 + /// + public string GradeLevel { get; set; } + /// + /// 毕业届 + /// + public int GraduationYear { get; set; } + + /// + /// 班级编号 + /// + public long? ClassId { get; set; } + + /// + /// 职级 + /// + public int PositionLevel { get; set; } + public int? PositionType { get; set; } = 2; + /// + /// 科目 + /// + public int? SubjectId { get; set; } + } public class TeacherInfoImportError : TeacherInfoImport { ///