prueba gustavo baz

This commit is contained in:
Lemuel Marquez
2021-04-06 10:36:22 -05:00
parent b83dfccbd2
commit 4638ed54ac
@@ -9,14 +9,16 @@ const Carrera = require('../../db/tablas/Carrera');
const gustavoBazPrada = async (body) => {
const year = validar.validarNumero(body.year, 4);
const inicio = moment(`${year}-01-31`);
const fin = moment(`${year + 1}-01-31`);
const path = `csv/${year}_gustavo_baz_prada.csv`;
const data = [];
return Servicio.findAll({
where: {
[Op.and]: [
{ fechaLiberacion: { [Op.gte]: moment(`${year}-01-31`) } },
{ fechaLiberacion: { [Op.lte]: moment(`${year + 1}-01-31`) } },
{ fechaLiberacion: { [Op.gte]: inicio } },
{ fechaLiberacion: { [Op.lte]: fin } },
],
},
include: [{ model: Usuario }, { model: Carrera }],