배포 오류 해결
This commit is contained in:
parent
e21ec4c7b7
commit
50410475c0
|
|
@ -17,6 +17,7 @@ import {
|
||||||
} from "../types/screen";
|
} from "../types/screen";
|
||||||
|
|
||||||
import { generateId } from "../utils/generateId";
|
import { generateId } from "../utils/generateId";
|
||||||
|
import logger from "../utils/logger";
|
||||||
|
|
||||||
// 화면 복사 요청 인터페이스
|
// 화면 복사 요청 인터페이스
|
||||||
interface CopyScreenRequest {
|
interface CopyScreenRequest {
|
||||||
|
|
@ -24,7 +25,7 @@ interface CopyScreenRequest {
|
||||||
screenCode: string;
|
screenCode: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
companyCode: string; // 요청한 사용자의 회사 코드 (인증용)
|
companyCode: string; // 요청한 사용자의 회사 코드 (인증용)
|
||||||
userId: string;
|
createdBy?: string; // 생성자 ID
|
||||||
targetCompanyCode?: string; // 복사 대상 회사 코드 (최고 관리자 전용)
|
targetCompanyCode?: string; // 복사 대상 회사 코드 (최고 관리자 전용)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,16 +26,31 @@ export interface DataFilterConfig {
|
||||||
*/
|
*/
|
||||||
export function buildDataFilterWhereClause(
|
export function buildDataFilterWhereClause(
|
||||||
dataFilter: DataFilterConfig | undefined,
|
dataFilter: DataFilterConfig | undefined,
|
||||||
tableAlias?: string,
|
tableAliasOrStartIndex?: string | number,
|
||||||
startParamIndex: number = 1
|
startParamIndex: number = 1
|
||||||
): { whereClause: string; params: any[] } {
|
): { whereClause: string; params: any[] } {
|
||||||
if (!dataFilter || !dataFilter.enabled || !dataFilter.filters || dataFilter.filters.length === 0) {
|
if (!dataFilter || !dataFilter.enabled || !dataFilter.filters || dataFilter.filters.length === 0) {
|
||||||
return { whereClause: "", params: [] };
|
return { whereClause: "", params: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 파라미터 처리: 첫 번째 파라미터가 숫자면 startParamIndex, 문자열이면 tableAlias
|
||||||
|
let tableAlias: string | undefined;
|
||||||
|
let actualStartIndex: number;
|
||||||
|
|
||||||
|
if (typeof tableAliasOrStartIndex === "number") {
|
||||||
|
actualStartIndex = tableAliasOrStartIndex;
|
||||||
|
tableAlias = undefined;
|
||||||
|
} else if (typeof tableAliasOrStartIndex === "string") {
|
||||||
|
tableAlias = tableAliasOrStartIndex;
|
||||||
|
actualStartIndex = startParamIndex;
|
||||||
|
} else {
|
||||||
|
actualStartIndex = startParamIndex;
|
||||||
|
tableAlias = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
const conditions: string[] = [];
|
const conditions: string[] = [];
|
||||||
const params: any[] = [];
|
const params: any[] = [];
|
||||||
let paramIndex = startParamIndex;
|
let paramIndex = actualStartIndex;
|
||||||
|
|
||||||
// 테이블 별칭이 있으면 "alias."를 붙이고, 없으면 그냥 컬럼명만
|
// 테이블 별칭이 있으면 "alias."를 붙이고, 없으면 그냥 컬럼명만
|
||||||
const getColumnRef = (colName: string) => {
|
const getColumnRef = (colName: string) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue