新增 [Eis.Tools (line 1)](C:/Users/BI/Documents/EIS-dotnet/src/Eis.Tools/Program.cs:1),支持 database init/reset/seed。
数据库维护、安全校验和事务逻辑位于 [DatabaseMaintenanceService.cs (line 1)](C:/Users/BI/Documents/EIS-dotnet/src/Eis.Infrastructure/Data/DatabaseMaintenanceService.cs:1)。 内置完整演示数据:1200 名考生、10800 条成绩、2404 条招生记录。 删除旧 import-test-data.mjs 和 reset-dev-database.mjs 运行入口。 Docker 镜像同时包含 Web 和 /app/tools/Eis.Tools.dll。 [package.json (line 11)](C:/Users/BI/Documents/EIS-dotnet/package.json:11) 原数据库命令已改为调用 .NET。 新增统一发布脚本:[publish.ps1 (line 1)](C:/Users/BI/Documents/EIS-dotnet/scripts/publish.ps1:1)。
This commit is contained in:
1 parent
e3c04dad8a
commit
f3ffc18aae
23 files changed
+1299
-281
No files matched your search
@@ -30,7 +30,7 @@ internal sealed partial class AdminAdmissionService
|
||||
["school"] = SchoolJson(school),
|
||||
["exams"] = new JsonArray(data.Operational.Exams
|
||||
.Where(item => item.Data["archivedAt"] is null)
|
||||
.Select(item => (JsonNode)PublicExam(item)).ToArray()),
|
||||
.Select(item => item.Data.DeepClone()).ToArray()),
|
||||
["template"] = template,
|
||||
["updatedAt"] = JsonValue.Create(record?.UpdatedAt)
|
||||
});
|
||||
@@ -265,7 +265,7 @@ internal sealed partial class AdminAdmissionService
|
||||
var completed = data.Operational.Exams.Where(exam =>
|
||||
Records(data, "setting", exam.Id).Any(setting => setting.Status == "completed") &&
|
||||
placements.Any(item => Text(item["examId"]) == exam.Id && Text(item["status"]) == "final"))
|
||||
.Select(item => (JsonNode)PublicExam(item)).ToArray();
|
||||
.Select(item => item.Data.DeepClone()).ToArray();
|
||||
return Success(new JsonObject
|
||||
{
|
||||
["ok"] = true,
|
||||
|
||||
@@ -32,7 +32,8 @@ internal sealed partial class AdminAdmissionService
|
||||
}).ToArray();
|
||||
var home = await publicQueries.GetHomeAsync(cancellationToken);
|
||||
var notifications = (home["notices"] as JsonArray ?? []).OfType<JsonObject>()
|
||||
.Where(item => Text(item["schoolId"]).Length == 0 || Text(item["schoolId"]) == school.Id)
|
||||
.Where(item => Text(item["sourceType"]).Length > 0 &&
|
||||
(Text(item["schoolId"]).Length == 0 || Text(item["schoolId"]) == school.Id))
|
||||
.Take(6)
|
||||
.Select(item =>
|
||||
{
|
||||
@@ -43,7 +44,7 @@ internal sealed partial class AdminAdmissionService
|
||||
var exams = data.Operational.Exams.Where(item =>
|
||||
item.Data["archivedAt"] is null &&
|
||||
Records(data, "setting", item.Id).Any(setting => Boolean(setting.Payload["enabled"])))
|
||||
.Select(item => (JsonNode)PublicExam(item)).ToArray();
|
||||
.Select(item => item.Data.DeepClone()).ToArray();
|
||||
return Success(new JsonObject
|
||||
{
|
||||
["ok"] = true,
|
||||
@@ -76,7 +77,7 @@ internal sealed partial class AdminAdmissionService
|
||||
["school"] = SchoolJson(school),
|
||||
["plans"] = new JsonArray(plans),
|
||||
["exams"] = new JsonArray(data.Operational.Exams.Where(item => item.Data["archivedAt"] is null)
|
||||
.Select(item => (JsonNode)PublicExam(item)).ToArray()),
|
||||
.Select(item => item.Data.DeepClone()).ToArray()),
|
||||
["sourceSchools"] = new JsonArray(data.Directory.Schools
|
||||
.Where(item => item.Active && item.IsSourceSchool)
|
||||
.Select(item => (JsonNode)SchoolJson(item)).ToArray())
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
namespace Eis.Web.Configuration;
|
||||
namespace Eis.Infrastructure.Configuration;
|
||||
|
||||
public static class EnvironmentFile
|
||||
{
|
||||
@@ -35,7 +35,9 @@ public static class EnvironmentFile
|
||||
}
|
||||
|
||||
var value = line[(separator + 1)..].Trim();
|
||||
if (value.Length >= 2 && ((value[0] == '"' && value[^1] == '"') || (value[0] == '\'' && value[^1] == '\'')))
|
||||
if (value.Length >= 2 &&
|
||||
((value[0] == '"' && value[^1] == '"') ||
|
||||
(value[0] == '\'' && value[^1] == '\'')))
|
||||
{
|
||||
value = value[1..^1];
|
||||
}
|
||||
Loaded 3 of 23 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user