patch
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
FROM --platform=$BUILDPLATFORM node:24-alpine AS frontend
|
||||
WORKDIR /source
|
||||
COPY versions.props ./
|
||||
COPY web/package.json web/package-lock.json ./web/
|
||||
RUN npm --prefix web ci
|
||||
COPY web/ ./web/
|
||||
@@ -11,6 +12,7 @@ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
|
||||
ARG TARGETARCH
|
||||
WORKDIR /source
|
||||
COPY global.json ./
|
||||
COPY versions.props ./
|
||||
COPY .env.example ./
|
||||
COPY src/Jiaowu.Api/Jiaowu.Api.csproj ./src/Jiaowu.Api/
|
||||
RUN dotnet restore ./src/Jiaowu.Api/Jiaowu.Api.csproj --arch "$TARGETARCH"
|
||||
|
||||
@@ -61,19 +61,20 @@ public sealed class ClickHouseAnalyticsController(
|
||||
GROUP BY attendanceDate ORDER BY attendanceDate
|
||||
""", cancellationToken);
|
||||
var grades = await client.QueryAsync($"""
|
||||
SELECT academicTermId, academicTermName, studentCount,
|
||||
round(weightedScore / nullIf(studentCount, 0), 2) AS averageScore,
|
||||
round(passedCount / nullIf(studentCount, 0), 4) AS passRate
|
||||
SELECT academicTermId, academicTermName,
|
||||
totalStudentCount AS studentCount,
|
||||
round(totalWeightedScore / nullIf(totalStudentCount, 0), 2) AS averageScore,
|
||||
round(totalPassedCount / nullIf(totalStudentCount, 0), 4) AS passRate
|
||||
FROM
|
||||
(
|
||||
SELECT academicTermId, any(academicTermName) AS academicTermName,
|
||||
sum(studentCount) AS studentCount,
|
||||
sum(averageScore * studentCount) AS weightedScore,
|
||||
sum(passedCount) AS passedCount
|
||||
sum(studentCount) AS totalStudentCount,
|
||||
sum(averageScore * studentCount) AS totalWeightedScore,
|
||||
sum(passedCount) AS totalPassedCount
|
||||
FROM {options.Database}.gradeStatistics FINAL
|
||||
WHERE 1 = 1{collegeFilter}
|
||||
GROUP BY academicTermId
|
||||
)
|
||||
) AS gradeTotals
|
||||
ORDER BY academicTermName
|
||||
""", cancellationToken);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user