251121:1700 Backend T3 wait testt

This commit is contained in:
admin
2025-11-21 17:16:40 +07:00
parent 58cee2d007
commit bf0308e350
27 changed files with 6651 additions and 196 deletions

16
temp.ts Normal file
View File

@@ -0,0 +1,16 @@
// ใน function submit()
// 2.1 สร้าง Routing Record แรก
const routing = queryRunner.manager.create(CorrespondenceRouting, {
correspondenceId: currentRevision.id,
templateId: template.id, // ✅ บันทึก templateId ไว้ใช้อ้างอิง
sequence: 1,
fromOrganizationId: user.primaryOrganizationId,
toOrganizationId: firstStep.toOrganizationId,
stepPurpose: firstStep.stepPurpose,
status: 'SENT',
dueDate: new Date(
Date.now() + (firstStep.expectedDays || 7) * 24 * 60 * 60 * 1000,
),
processedByUserId: user.user_id,
processedAt: new Date(),
});