251121:1700 Backend T3 wait testt
This commit is contained in:
16
temp.ts
Normal file
16
temp.ts
Normal 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(),
|
||||
});
|
||||
Reference in New Issue
Block a user