fix permissions and teacher attendance workflows

This commit is contained in:
2026-07-10 20:40:52 +08:00
parent 247879f276
commit 8ed1682b90
95 changed files with 4745 additions and 1237 deletions

View File

@@ -80,6 +80,29 @@ export class QueryDingRawDto {
@IsString()
@IsIn(['unmatched', 'pending', 'matched'])
matchStatus?: string;
@IsOptional()
@IsInt()
@Type(() => Number)
classId?: number;
@IsOptional()
@IsDateString()
dateFrom?: string;
@IsOptional()
@IsDateString()
dateTo?: string;
@IsOptional()
@IsInt()
@Type(() => Number)
page?: number;
@IsOptional()
@IsInt()
@Type(() => Number)
pageSize?: number;
}
export class QueryAttendanceRecordsDto {

View File

@@ -1,13 +1,4 @@
import {
IsOptional,
IsString,
IsDateString,
IsBoolean,
IsInt,
IsNotEmpty,
Min,
Max,
} from 'class-validator';
import { IsOptional, IsString, IsDateString, IsInt, Min } from 'class-validator';
import { Type } from 'class-transformer';
/**
@@ -15,24 +6,30 @@ import { Type } from 'class-transformer';
* Mirrors `dws attendance check result` flags.
*/
export class DingTalkImportDto {
/** Start date (YYYY-MM-DD), required */
@IsNotEmpty()
/** Start date (YYYY-MM-DD). Defaults to today when omitted. */
@IsOptional()
@IsDateString()
start: string;
start?: string;
/** End date (YYYY-MM-DD), required, max 1 month span */
@IsNotEmpty()
/** End date (YYYY-MM-DD). Defaults to start/today when omitted. */
@IsOptional()
@IsDateString()
end: string;
end?: string;
/** Comma-separated DingTalk user IDs, optional (default: all org users) */
/** Target class. Required for non-super-admin users. */
@IsOptional()
@IsInt()
@Min(1)
@Type(() => Number)
classId?: number;
/** Comma-separated DingTalk user IDs. Super-admin override only. */
@IsOptional()
@IsString()
users?: string;
/** Auto-match imported records to students after import */
/** @deprecated Imports are always matched through DingTalk user mappings. */
@IsOptional()
@IsBoolean()
@Type(() => Boolean)
autoMatch?: boolean;
}