明树Git Lab

Commit 33c24818 authored by zfp1's avatar zfp1

update

parent 2117d1dd
Pipeline #109234 passed with stage
in 4 seconds
......@@ -72,7 +72,7 @@ async function getYyqtzhsInfo(req, res, next) {
tzhs = tzhs.toJSON();
let lastyear = moment(tzhs.nd).subtract(1, 'year').format('YYYY');
console.log(lastyear, "=========")
let lastyeartzhs = await DB.ThYyqtzhs.findOne({ where: { projectId: tzhs.projectId, nd: sequelize.where(sequelize.fn('YEAR', sequelize.col('nd')), lastyear) } });
let lastyeartzhs = await DB.ThYyqtzhs.findOne({ where: { projectId: tzhs.projectId, nd: sequelize.where(sequelize.fn('YEAR', sequelize.col('nd')), lastyear), del: 0 } });
tzhs.lastyeartzhs = lastyeartzhs || null;
// let yyqtzhss = await DB.ThYyqtzhszb.findAll({ where: { projectId: tzhs.projectId, sourceId: req.body.id }, raw: true });
// tzhs.yyqtzhss = _.values(_.groupBy(yyqtzhss, 'groupBy')) || [[]]
......
......@@ -690,7 +690,7 @@ async function getJsqtzhsInfo(req, res, next) {
tzhs = tzhs.toJSON();
let lastyear = moment(tzhs.nd).subtract(1, 'year').format('YYYY');
console.log(lastyear, "=========")
let lastyeartzhs = await DB.TzJsqtzhs.findOne({ where: { projectId: tzhs.projectId, nd: sequelize.where(sequelize.fn('YEAR', sequelize.col('nd')), lastyear) } });
let lastyeartzhs = await DB.TzJsqtzhs.findOne({ where: { projectId: tzhs.projectId, nd: sequelize.where(sequelize.fn('YEAR', sequelize.col('nd')), lastyear), del: 0 } });
tzhs.lastyeartzhs = lastyeartzhs || null;
// let jsqtzhss = await DB.TzJsqtzhszb.findAll({ where: { projectId: tzhs.projectId, sourceId: tzhs.id }, raw: true });
// tzhs.jsqtzhss = _.values(_.groupBy(jsqtzhss, 'groupBy')) || [[]]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment