Browse Source

feat:测试邮件代码

dev
zhaobing’ 1 year ago
parent
commit
c3508d62cd
  1. 11
      api/app/lib/schedule/alarms_push.js

11
api/app/lib/schedule/alarms_push.js

@ -132,7 +132,8 @@ module.exports = function (app, opts) {
// 找对应的项企项目 // 找对应的项企项目
const corPepProject = const corPepProject =
pepProjectRes.find(p => p.id == poms.pepProjectId) 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) pepProjectName_.push(corPepProject.project_name)
pepProject_name.push({ id: poms.id, anxinProjectId: poms.anxinProjectId, name: corPepProject.project_name }) pepProject_name.push({ id: poms.id, anxinProjectId: poms.anxinProjectId, name: corPepProject.project_name })
} else { } else {
@ -1500,14 +1501,14 @@ module.exports = function (app, opts) {
let alarmHtml = '<table border="1" cellspacing="0" style="border-collapse:collapse;border-spacing:0;border-left:1px solid #888;border-top:1px solid #888;">' let alarmHtml = '<table border="1" cellspacing="0" style="border-collapse:collapse;border-spacing:0;border-left:1px solid #888;border-top:1px solid #888;">'
let alarmContent = '' let alarmContent = ''
let alarmHtmlTitle = packageTableTitle(alarmTitleArr) let alarmHtmlTitle = packageTableTitle(alarmTitleArr)
let accumulate = 0 let accumulate = 0
if (type == 1) { if (type == 1) {
console.log('xx111112222',alarmData)
alarmData.map((h, hi) => { alarmData.map((h, hi) => {
accumulate += h.rowspan || 0 accumulate += h.rowspan || 0
if (h.projects && h.projects.length) { if (h.projects && h.projects.length) {
h.projects.map((x, xi) => { h.projects.map((x, xi) => {
let flag
let showOne1 = (xi == 0) ? true : false let showOne1 = (xi == 0) ? true : false
if (x.factor && x.factor.length) { if (x.factor && x.factor.length) {
@ -1725,8 +1726,8 @@ module.exports = function (app, opts) {
if (isDev) { if (isDev) {
// !开发测试用的数据 // !开发测试用的数据
emails = ['gao.zhiyuan@free-sun.com.cn'] // emails = ['gao.zhiyuan@free-sun.com.cn']
// emails=['zhao.bin@free-sun.com.cn'] emails=['zhao.bin@free-sun.com.cn']
// emails = ['wen.lele@free-sun.com.cn'] // emails = ['wen.lele@free-sun.com.cn']
} }

Loading…
Cancel
Save