fix: 修复考勤控制器 DI 解析与班级日期迁移空 SQL
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { Controller, Get, Post, Put, Delete, Body, Param, Query, Request, Res, BadRequestException, ForbiddenException, ParseIntPipe } from '@nestjs/common';
|
||||
import type { Response } from 'express';
|
||||
import { AttendanceControllerBase, RequestUser } from './attendance.controller-base';
|
||||
import { AttendanceService } from './attendance.service';
|
||||
import { AttendanceImportService } from './attendance-import.service';
|
||||
import { OperationLogsService } from '../operation-logs/operation-logs.service';
|
||||
import { AuthorizationService } from '../authorization';
|
||||
import { logAudit } from '../common/with-audit-log';
|
||||
@@ -23,8 +25,8 @@ import * as ExcelJS from 'exceljs';
|
||||
@Controller()
|
||||
export class AttendanceRecordsController extends AttendanceControllerBase {
|
||||
constructor(
|
||||
service: import('./attendance.service').AttendanceService,
|
||||
importService: import('./attendance-import.service').AttendanceImportService,
|
||||
service: AttendanceService,
|
||||
importService: AttendanceImportService,
|
||||
logService: OperationLogsService,
|
||||
authz: AuthorizationService,
|
||||
) {
|
||||
|
||||
@@ -139,8 +139,8 @@ export async function normalizeClassDates(
|
||||
const type = String(column?.type ?? '').toLowerCase();
|
||||
return !['date', 'datetime', 'timestamp'].includes(type);
|
||||
});
|
||||
if (columns.length === 0) return;
|
||||
});
|
||||
if (columns.length === 0) return;
|
||||
|
||||
const columnText = (column: string) => `CAST(${column} AS CHAR)`;
|
||||
const firstTenChars = (column: string) => `NULLIF(LEFT(${columnText(column)}, 10), '')`;
|
||||
|
||||
Reference in New Issue
Block a user