13 Commits

Author SHA1 Message Date
evenegas 1abf4d4e9c Cambio de contraseña 2026-02-26 14:38:21 -06:00
evenegas 3ef076111e se agregaron cambios 2026-01-29 12:09:40 -06:00
evenegas a387f11302 se agregó la relacion 2026-01-29 09:58:13 -06:00
evenegas e336f0bb86 se agregó la relacion 2026-01-29 09:51:48 -06:00
evenegas e5f98c9596 se agrgó un log para depurar 2026-01-28 12:03:41 -06:00
evenegas 24717cf931 se agrgó un log para depurar 2026-01-28 11:37:36 -06:00
evenegas b6e7525dc2 enviar diferente el caso especial 2026-01-23 10:17:25 -06:00
evenegas bc975bc295 gitignore 2026-01-22 14:34:27 -06:00
evenegas cb82dd3354 gitignore 2026-01-22 14:17:34 -06:00
evenegas a18fbe441d gitignore 2026-01-22 14:16:44 -06:00
evenegas c42c87e080 gitignore 2026-01-22 14:16:00 -06:00
evenegas 3bc245e1f7 creditos 2026-01-22 13:31:24 -06:00
evenegas 5c5e7b3f0f creditos 2026-01-22 12:12:59 -06:00
6 changed files with 114 additions and 114 deletions
+3 -2
View File
@@ -2,7 +2,8 @@
/dist
/node_modules
/build
/server/uploads
/server
# Logs
logs
*.log
@@ -13,7 +14,7 @@ yarn-error.log*
lerna-debug.log*
/initdb/init.sql
/initdb2
# OS
.DS_Store
@@ -18,9 +18,11 @@ import { FilterCasoEspecialDto } from './dto/filter-caso-especial.dto';
import { arch } from 'os';
import { SendMailDto } from 'src/helpers.services/dto/send-email.dto';
const {
terminoValidado
} = require('./../helpers.services/msjCorreos');
@Injectable()
export class CasoEspecialService {
constructor(
@@ -27,7 +27,6 @@ export class CreateCasoEspecialDto {
idStatus: number;
@IsString()
@Length(9, 9)
@Matches(/^\d+$/, { message: 'solo puede contener números' })
numeroCuenta: string;
@@ -1,145 +1,143 @@
import { Servicio } from "src/servicio/entities/servicio.entity";
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { Servicio } from 'src/servicio/entities/servicio.entity';
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
@Entity('cuestionario_alumno_2')
export class CuestionarioAlumno2 {
@PrimaryGeneratedColumn()
idCuestionarioAlumno2: number;
@Column({ type: 'varchar', length: 100, nullable: false })
@Column({ type: 'text', nullable: true })
p1: string;
@Column({ type: 'varchar', length: 50, nullable: false })
@Column({ type: 'varchar', length: 200, nullable: true })
p2: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 200, nullable: true })
p4: string;
@Column({ type: 'varchar', length: 50, nullable: true })
@Column({ type: 'varchar', length: 500, nullable: true })
p5: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 200, nullable: true })
p6: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 200, nullable: true })
p7: string;
@Column({ type: 'varchar', length: 50, nullable: true })
@Column({ type: 'varchar', length: 500, nullable: true })
p8: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 200, nullable: true })
p9: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 50, nullable: true })
p3_1: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 50, nullable: true })
p3_2: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 50, nullable: true })
p3_3: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 50, nullable: true })
p3_4: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p10_1: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p10_2: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p10_3: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p11_1: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p11_2: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p11_3: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p11_4: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_A_1: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_A_2: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_A_3: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_A_4: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_B_1: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_B_2: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_B_3: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_B_4: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_C_1: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_C_2: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_C_3: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p12_C_4: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 50, nullable: true })
p12_D_1: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 50, nullable: true })
p12_D_2: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 50, nullable: true })
p12_D_3: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 50, nullable: true })
p12_D_4: string;
@Column({ type: 'varchar', length: 20, nullable: false })
@Column({ type: 'varchar', length: 50, nullable: true })
p12_D_5: string;
@Column({ type: 'varchar', length: 100, nullable: false })
@Column({ type: 'varchar', length: 200, nullable: true })
p13: string;
@Column({ type: 'varchar', length: 100, nullable: false })
@Column({ type: 'varchar', length: 200, nullable: true })
p14: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 200, nullable: true })
p15: string;
@Column({ type: 'varchar', length: 50, nullable: true })
@Column({ type: 'varchar', length: 500, nullable: true })
p16: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p17_1: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p17_2: string;
@Column({ type: 'varchar', length: 5, nullable: false })
@Column({ type: 'varchar', length: 20, nullable: true })
p17_3: string;
@Column({ type: 'varchar', length: 50, nullable: true })
@Column({ type: 'varchar', length: 500, nullable: true })
p18: string;
@OneToMany(()=>Servicio,(servicio)=>servicio.cuestionarioAlumno2)
servicio:Servicio[];
@OneToMany(() => Servicio, (servicio) => servicio.cuestionarioAlumno2)
servicio: Servicio[];
}
+60 -60
View File
@@ -1581,76 +1581,76 @@ export class ServicioService {
},
});
}
// @Cron('0 0 * * *')
// async diario(): Promise<void> {
// const now = moment().startOf('day');
// let mensaje = '';
@Cron('0 0 * * *')
async diario(): Promise<void> {
const now = moment().startOf('day');
let mensaje = '';
// const servicios = await this.servicioRepo.find({
// where: { status: { idStatus: 3 } },
// relations: [
// 'status',
// 'usuario',
// 'programa',
// 'programa.usuario',
// ],
// });
const servicios = await this.servicioRepo.find({
where: { status: { idStatus: 3 } },
relations: [
'status',
'usuario',
'programa',
'programa.usuario',
],
});
// for (const servicio of servicios) {
// const fechaFin = moment(servicio.fechaFin).startOf('day');
for (const servicio of servicios) {
const fechaFin = moment(servicio.fechaFin).startOf('day');
// const diferencia = fechaFin.diff(now, 'days');
const diferencia = fechaFin.diff(now, 'days');
// console.log("diferencia:", diferencia)
console.log("diferencia:", diferencia)
// // ===== 7 días antes =====
// if (diferencia === 7) {
// const correoAlumno = avisoTerminoAlumno(
// servicio.usuario.nombre,
// );
// ===== 7 días antes =====
if (diferencia === 7) {
const correoAlumno = avisoTerminoAlumno(
servicio.usuario.nombre,
);
// const correoResponsable = avisoTerminoResponsable(
// servicio.usuario.nombre,
// );
const correoResponsable = avisoTerminoResponsable(
servicio.usuario.nombre,
);
// mensaje +=
// `Se envió correo al alumno ${servicio.usuario.usuario} ` +
// `con id ${servicio.usuario.idUsuario} al correo ${servicio.correo} ` +
// `y al responsable ${servicio.programa.usuario.nombre} ` +
// `con id ${servicio.programa.usuario.idUsuario} ` +
// `y correo ${servicio.programa.usuario.usuario}\n\n`;
mensaje +=
`Se envió correo al alumno ${servicio.usuario.usuario} ` +
`con id ${servicio.usuario.idUsuario} al correo ${servicio.correo} ` +
`y al responsable ${servicio.programa.usuario.nombre} ` +
`con id ${servicio.programa.usuario.idUsuario} ` +
`y correo ${servicio.programa.usuario.usuario}\n\n`;
// await this.gmailService.enviarCorreo({
// subject: correoAlumno.subject,
// to: servicio.correo,
// text: correoAlumno.msj,
// fecha_recibido: new Date(),
// });
await this.gmailService.enviarCorreo({
subject: correoAlumno.subject,
to: servicio.correo,
text: correoAlumno.msj,
fecha_recibido: new Date(),
});
// await this.gmailService.enviarCorreo({
// subject: correoResponsable.subject,
// to: servicio.programa.usuario.usuario,
// text: correoResponsable.msj,
// fecha_recibido: new Date(),
// });
// }
await this.gmailService.enviarCorreo({
subject: correoResponsable.subject,
to: servicio.programa.usuario.usuario,
text: correoResponsable.msj,
fecha_recibido: new Date(),
});
}
// // ===== Servicio vencido =====
// else if (diferencia <= 0) {
// mensaje +=
// `El servicio con id ${servicio.idServicio} ` +
// `del alumno ${servicio.usuario.usuario} ` +
// `con id ${servicio.usuario.idUsuario} ` +
// `pasó al status 4\n\n`;
// ===== Servicio vencido =====
else if (diferencia <= 0) {
mensaje +=
`El servicio con id ${servicio.idServicio} ` +
`del alumno ${servicio.usuario.usuario} ` +
`con id ${servicio.usuario.idUsuario} ` +
`pasó al status 4\n\n`;
// await this.servicioRepo.update(
// { idServicio: servicio.idServicio },
// { status: { idStatus: 4 } },
// );
// }
// }
await this.servicioRepo.update(
{ idServicio: servicio.idServicio },
{ status: { idStatus: 4 } },
);
}
}
// // ===== Reporte =====
// console.log("se realizo carga masiva")
// }
// ===== Reporte =====
console.log("se realizo carga masiva")
}
}
+1 -1
View File
@@ -157,7 +157,7 @@ export class UsuarioService {
});
alum = await this.userRepo.save(nuevoUsuario);
}
console.log("Alumno:", alumno);
console.log("el alumno es:", alumno);
return { ...alumno, idUsuario: alum.idUsuario };
}