feat: 追溯码支持批量导出 Excel/CSV(按筛选或所选)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
IsArray,
|
||||
IsBoolean,
|
||||
IsEnum,
|
||||
IsIn,
|
||||
IsInt,
|
||||
IsOptional,
|
||||
IsString,
|
||||
@@ -112,3 +113,37 @@ export class QueryBatchDto extends PaginationDto {
|
||||
@IsString()
|
||||
keyword?: string;
|
||||
}
|
||||
|
||||
export class ExportTraceCodeDto {
|
||||
@ApiPropertyOptional({ description: '导出格式', enum: ['xlsx', 'csv'] })
|
||||
@IsOptional()
|
||||
@IsIn(['xlsx', 'csv'])
|
||||
format?: 'xlsx' | 'csv';
|
||||
|
||||
@ApiPropertyOptional({ description: '分组 ID' })
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
groupId?: number;
|
||||
|
||||
@ApiPropertyOptional({ description: '批次 ID' })
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
batchId?: number;
|
||||
|
||||
@ApiPropertyOptional({ description: '状态', enum: TraceCodeStatus })
|
||||
@IsOptional()
|
||||
@IsEnum(TraceCodeStatus)
|
||||
status?: TraceCodeStatus;
|
||||
|
||||
@ApiPropertyOptional({ description: '关键词' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
keyword?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: '指定追溯码 ID(逗号分隔,用于导出所选)' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
ids?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user