diff --git a/src/excel/excel.controller.ts b/src/excel/excel.controller.ts index 554d230..8b759f5 100644 --- a/src/excel/excel.controller.ts +++ b/src/excel/excel.controller.ts @@ -38,34 +38,27 @@ export class ExcelController { console.log('Alta de usuario:', alta); await this.movimientoService.updateStatus(alta.movId, 'SUCCESS') - await this.mailService.sendMail({ - to: req.user.email, // Asegúrate de que el usuario tenga un email - subject: 'Carga de datos exitosa', - text: "La carga de datos se ha realizado con éxito.", - html: `
La carga de datos se ha realizado con éxito ${alta}
`, - }); - await this.excelService.enviarInforme("LOAD","Carga Individual de datos en Servicios PCpuma", `Se ha hecho una carga individual en el sistema por el usuario ${req.user.email}`) if(alta.at){ await this.excelService.enviarInforme('AT',"Carga Individual de datos en Servicios PCpuma", - `Se ha hecho una carga individual en el sistema`) + `Se ha hecho una carga individual en el sistema de ${usuario.tipo_usuario}`) } if(alta.red){ await this.excelService.enviarInforme('RED',"Carga Individual de datos en Servicios PCpuma", - `Se ha hecho una carga individual en el sistema`) + `Se ha hecho una carga individual en el sistema de ${usuario.tipo_usuario}`) } if(alta.solicita){ await this.excelService.enviarInforme('SOLICITA',"Carga Individual de datos en Servicios PCpuma", - `Se ha hecho una carga individual en el sistema` ) + `Se ha hecho una carga individual en el sistema de ${usuario.tipo_usuario}` ) } if(alta.correo){ await this.excelService.enviarInforme('CORREO',"Carga Individual de datos en Servicios PCpuma", - `Se ha hecho una carga individual en el sistema`) + `Se ha hecho una carga individual en el sistema de ${usuario.tipo_usuario}`) } } @@ -138,9 +131,13 @@ export class ExcelController { to: req.user.email, // Asegúrate de que el usuario tenga un email subject: 'Carga de datos exitosa', text: "La carga de datos se ha realizado con éxito.", - html: `La carga de datos se ha realizado con éxito. Se han insertado ${result.inserted} registros.
-Errores encontrados:
-La carga de datos se ha realizado con éxito. Se han insertado ${result.inserted} registros.
+Usuarios At: ${result.conteoTiposAt}
+Usuarios Red: ${result.conteoTiposRed}
+Usuarios Solicita: ${result.conteoTiposSolicita}
+Usuarios Correo: ${result.conteoTiposCorreo}
+