feat: 重构勘察业务为明细模式并新增定时任务人性化配置
- 重构勘察业务:移除SOP相关表,新增勘察明细表支持建筑/楼层/房间/照片管理 - 新增定时任务人性化频率配置,支持分钟/小时/天/周/月/自定义六种模式 - 新增频率预览接口,支持配置转换为cron表达式与执行时间预览 - 更新系统品牌名称为鑫潼智电,修改全局标题与登录页文案
This commit is contained in:
1 parent
f72644c24f
commit
22d27a940d
29 files changed
+1908
-576
No files matched your search
@@ -1,10 +1,15 @@
|
||||
import { IsNotEmpty, IsOptional, IsString, IsInt, IsObject, Min, Max, MaxLength } from "class-validator";
|
||||
|
||||
/** 频率配置:字段按 freqType 取用,由 util/cron_schedule 统一校验与翻译 */
|
||||
export class UpdateJobDTO {
|
||||
@IsString()
|
||||
@IsNotEmpty({ message: "cron 表达式不能为空" })
|
||||
@MaxLength(64, { message: "cron 表达式最大 64 字符" })
|
||||
cronExpression!: string;
|
||||
@IsNotEmpty({ message: "频率类型不能为空" })
|
||||
@MaxLength(16, { message: "频率类型非法" })
|
||||
freqType!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsObject()
|
||||
freqConfig?: Record<string, any>;
|
||||
|
||||
@IsOptional()
|
||||
@IsObject()
|
||||
@@ -26,6 +31,18 @@ export class UpdateJobDTO {
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/** 频率预览入参:只传频率配置,cron 与下次执行时间由后端计算 */
|
||||
export class CronPreviewDTO {
|
||||
@IsString()
|
||||
@IsNotEmpty({ message: "频率类型不能为空" })
|
||||
@MaxLength(16, { message: "频率类型非法" })
|
||||
freqType!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsObject()
|
||||
freqConfig?: Record<string, any>;
|
||||
}
|
||||
|
||||
export class JobStatusDTO {
|
||||
@IsInt()
|
||||
@Min(0, { message: "状态值非法" })
|
||||
|
||||
Reference in new issue
Block a user