6995-testToMaster_2410 #2139

Merged
alexm merged 236 commits from 6995-testToMaster_2410 into master 2024-03-07 07:09:08 +00:00
1 changed files with 9 additions and 13 deletions
Showing only changes of commit a359ace1b8 - Show all commits

View File

@ -59,19 +59,15 @@ module.exports = Self => {
}
async function hasSignDms(ticketId) {
const ticketDms = await models.TicketDms.findOne({
where: {ticketFk: ticketId},
include: [
{
relation: 'dms',
fields: ['id'],
scope: {
where: {dmsTypeFk: dmsTypeTicket.id}
}
}
]
});
if (ticketDms?.dms()?.id) return true;
const hasTicketDms = await Self.rawSql(`
SELECT d.id
FROM ticketDms td
JOIN dms d ON d.id = td.dmsFk
WHERE td.ticketFk = ?
AND d.dmsTypeFk = ?
`, [ticketId, dmsTypeTicket.id]);
if (hasTicketDms.length) return true;
}
async function createGestDoc() {