diff --git a/src/excel/excel.service.ts b/src/excel/excel.service.ts index d68d0b3..d21a1c4 100644 --- a/src/excel/excel.service.ts +++ b/src/excel/excel.service.ts @@ -813,16 +813,8 @@ export class ExcelService { } finally { await queryRunner.release(); - const subQuery = await this.servActivosRepo.manager + await this.servActivosRepo .createQueryBuilder() - .select('1') - .from(Usuario, 'u') - .where('u.id_usuario = sa.id_usuario') - .andWhere('u.id_usuario IN (:...ids)') - .getQuery(); - -await this.servActivosRepo - .createQueryBuilder('sa') .update() .set({ Red: false, @@ -834,10 +826,10 @@ await this.servActivosRepo ATStatus: 'Inactivo', CorreoStatus: 'Inactivo', }) - .where(`NOT EXISTS (${subQuery})`) - .setParameters({ ids: idsUsuarios }) + .where('id_usuario NOT IN (SELECT id_usuario FROM usuario)') .execute(); + } }