From c3508d62cd3805b61dc6550e84af538c7158800d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Thu, 23 Nov 2023 09:22:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B5=8B=E8=AF=95=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/schedule/alarms_push.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/api/app/lib/schedule/alarms_push.js b/api/app/lib/schedule/alarms_push.js index b038e7f..d6276b7 100644 --- a/api/app/lib/schedule/alarms_push.js +++ b/api/app/lib/schedule/alarms_push.js @@ -132,7 +132,8 @@ module.exports = function (app, opts) { // 找对应的项企项目 const corPepProject = pepProjectRes.find(p => p.id == poms.pepProjectId) - if (corPepProject && c.timeType.some(ct => ct == corPepProject.construction_status_id)) { + //添加true,优化成EM推送不需要关联项企项目的状态 + if (corPepProject && (c.timeType.some(ct => ct == corPepProject.construction_status_id)||true)) { pepProjectName_.push(corPepProject.project_name) pepProject_name.push({ id: poms.id, anxinProjectId: poms.anxinProjectId, name: corPepProject.project_name }) } else { @@ -1500,14 +1501,14 @@ module.exports = function (app, opts) { let alarmHtml = '' let alarmContent = '' let alarmHtmlTitle = packageTableTitle(alarmTitleArr) - let accumulate = 0 if (type == 1) { + console.log('xx111112222',alarmData) alarmData.map((h, hi) => { accumulate += h.rowspan || 0 if (h.projects && h.projects.length) { h.projects.map((x, xi) => { - + let flag let showOne1 = (xi == 0) ? true : false if (x.factor && x.factor.length) { @@ -1725,8 +1726,8 @@ module.exports = function (app, opts) { if (isDev) { // !开发测试用的数据 - emails = ['gao.zhiyuan@free-sun.com.cn'] - // emails=['zhao.bin@free-sun.com.cn'] + // emails = ['gao.zhiyuan@free-sun.com.cn'] + emails=['zhao.bin@free-sun.com.cn'] // emails = ['wen.lele@free-sun.com.cn'] }