|
@@ -406,10 +406,10 @@ module.exports = app => {
|
|
|
...defaultNoticeRecord,
|
|
|
});
|
|
|
});
|
|
|
- stage.userAssists.forEach(u => {
|
|
|
+ this.ctx.stage.userAssists.forEach(u => {
|
|
|
records.push({ uid: u.ass_user_id, ...defaultNoticeRecord});
|
|
|
});
|
|
|
- stage.auditAssists.forEach(u => {
|
|
|
+ this.ctx.stage.auditAssists.forEach(u => {
|
|
|
records.push({ uid: u.ass_user_id, ...defaultNoticeRecord});
|
|
|
});
|
|
|
await transaction.insert('zh_notice', records);
|
|
@@ -620,10 +620,10 @@ module.exports = app => {
|
|
|
...defaultNoticeRecord,
|
|
|
});
|
|
|
});
|
|
|
- stage.userAssists.forEach(u => {
|
|
|
+ this.ctx.stage.userAssists.forEach(u => {
|
|
|
records.push({ uid: u.ass_user_id, ...defaultNoticeRecord});
|
|
|
});
|
|
|
- stage.auditAssists.forEach(u => {
|
|
|
+ this.ctx.stage.auditAssists.forEach(u => {
|
|
|
records.push({ uid: u.ass_user_id, ...defaultNoticeRecord});
|
|
|
});
|
|
|
await transaction.insert(this.ctx.service.noticePush.tableName, records);
|
|
@@ -750,24 +750,30 @@ module.exports = app => {
|
|
|
await this._updateTender(transaction);
|
|
|
// 添加推送
|
|
|
const noticeContent = await this.getNoticeContent(pid, audit.tid, stageId, audit.aid, checkData.opinion);
|
|
|
+ const defaultNoticeRecord = {
|
|
|
+ pid,
|
|
|
+ type: pushType.stage,
|
|
|
+ status: auditConst.status.checkNoPre,
|
|
|
+ content: noticeContent,
|
|
|
+ };
|
|
|
const records = [
|
|
|
{
|
|
|
- pid,
|
|
|
- type: pushType.stage,
|
|
|
uid: this.ctx.stage.user_id,
|
|
|
- status: auditConst.status.checkNoPre,
|
|
|
- content: noticeContent,
|
|
|
+ ...defaultNoticeRecord
|
|
|
},
|
|
|
];
|
|
|
auditors2.forEach(audit => {
|
|
|
records.push({
|
|
|
- pid,
|
|
|
- type: pushType.stage,
|
|
|
uid: audit.aid,
|
|
|
- status: auditConst.status.checkNoPre,
|
|
|
- content: noticeContent,
|
|
|
+ ...defaultNoticeRecord
|
|
|
});
|
|
|
});
|
|
|
+ this.ctx.stage.userAssists.forEach(u => {
|
|
|
+ records.push({ uid: u.ass_user_id, ...defaultNoticeRecord});
|
|
|
+ });
|
|
|
+ this.ctx.stage.auditAssists.forEach(u => {
|
|
|
+ records.push({ uid: u.ass_user_id, ...defaultNoticeRecord});
|
|
|
+ });
|
|
|
|
|
|
await transaction.insert('zh_notice', records);
|
|
|
|