|
@@ -349,6 +349,8 @@ module.exports = app => {
|
|
|
tender_id: tenderId,
|
|
|
audit_order: 1,
|
|
|
});
|
|
|
+ const tenderMsg = await this.ctx.service.tender.getDataById(tenderId);
|
|
|
+ const users = this._.uniq(this._.concat(this._.map(auditList, 'audit_id'), tenderMsg.user_id));
|
|
|
if (checkType === auditConst.status.checked) {
|
|
|
const nextAudit = await this.getDataByCondition({
|
|
|
tender_id: tenderId,
|
|
@@ -377,7 +379,7 @@ module.exports = app => {
|
|
|
ledger_status: checkType,
|
|
|
});
|
|
|
await this.ctx.service.tenderTag.saveTenderTag(tenderId, {ledger_time: new Date()}, transaction);
|
|
|
- const users = this._.pull(this._.map(auditList, 'audit_id'), audit.id);
|
|
|
+ // const users = this._.pull(this._.map(auditList, 'audit_id'), audit.id);
|
|
|
await this.ctx.helper.sendAliSms(users, smsTypeConst.const.TZ, smsTypeConst.judge.result.toString(), SmsAliConst.template.ledger_result, {
|
|
|
status: SmsAliConst.status.success,
|
|
|
});
|
|
@@ -407,7 +409,7 @@ module.exports = app => {
|
|
|
}
|
|
|
await transaction.insert(this.tableName, auditors);
|
|
|
|
|
|
- const users = this._.pull(this._.map(auditList, 'audit_id'), audit.id);
|
|
|
+ // const users = this._.pull(this._.map(auditList, 'audit_id'), audit.id);
|
|
|
await this.ctx.helper.sendAliSms(users, smsTypeConst.const.TZ, smsTypeConst.judge.result.toString(), SmsAliConst.template.ledger_result, {
|
|
|
status: SmsAliConst.status.back,
|
|
|
});
|
|
@@ -417,7 +419,7 @@ module.exports = app => {
|
|
|
tips: wxConst.tips.back,
|
|
|
begin_time: Date.parse(begin_audit.begin_time),
|
|
|
};
|
|
|
- await this.ctx.helper.sendWechat(audit.audit_id, smsTypeConst.const.TZ, smsTypeConst.judge.result.toString(), wxConst.template.ledger, wechatData);
|
|
|
+ await this.ctx.helper.sendWechat(users, smsTypeConst.const.TZ, smsTypeConst.judge.result.toString(), wxConst.template.ledger, wechatData);
|
|
|
}
|
|
|
|
|
|
await transaction.commit();
|