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