Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/screen-management

This commit is contained in:
kjs
2025-12-08 17:59:09 +09:00
33 changed files with 6875 additions and 308 deletions

View File

@@ -1178,7 +1178,15 @@ export class DynamicFormService {
console.log("📝 실행할 DELETE SQL:", deleteQuery);
console.log("📊 SQL 파라미터:", [id]);
const result = await query<any>(deleteQuery, [id]);
// 🔥 트랜잭션 내에서 app.user_id 설정 후 DELETE 실행 (이력 트리거용)
const result = await transaction(async (client) => {
// 이력 트리거에서 사용할 사용자 정보 설정
if (userId) {
await client.query(`SET LOCAL app.user_id = '${userId}'`);
}
const res = await client.query(deleteQuery, [id]);
return res.rows;
});
console.log("✅ 서비스: 실제 테이블 삭제 성공:", result);