|
@@ -267,9 +267,14 @@ module.exports = app => {
|
|
|
// smsTypeConst.judge.approval.toString(), '台账修订需要您审批,请登录系统处理。');
|
|
|
await this.ctx.helper.sendAliSms(audit.audit_id, smsTypeConst.const.XD, smsTypeConst.judge.approval.toString(), SmsAliConst.template.revise_check);
|
|
|
// 微信模板通知
|
|
|
+ const shenpiUrl = await this.ctx.helper.urlToShort(
|
|
|
+ this.ctx.protocol + '://' + this.ctx.host + '/wap/tender/' + revise.tid + '/revise/' + revise.id + '/info'
|
|
|
+ );
|
|
|
const wechatData = {
|
|
|
+ wap_url: shenpiUrl,
|
|
|
status: wxConst.status.check,
|
|
|
tips: wxConst.tips.check,
|
|
|
+ code: this.ctx.session.sessionProject.code,
|
|
|
begin_time: Date.parse(time),
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(audit.audit_id, smsTypeConst.const.XD, smsTypeConst.judge.approval.toString(), wxConst.template.revise, wechatData);
|
|
@@ -281,9 +286,11 @@ module.exports = app => {
|
|
|
await this.ctx.helper.sendAliSms(users, smsTypeConst.const.XD, smsTypeConst.judge.result.toString(), SmsAliConst.template.revise_report);
|
|
|
// 微信模板通知
|
|
|
const wechatData2 = {
|
|
|
+ wap_url: shenpiUrl,
|
|
|
status: wxConst.status.report,
|
|
|
tips: wxConst.tips.report,
|
|
|
begin_time: Date.parse(time),
|
|
|
+ code: this.ctx.session.sessionProject.code,
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(users, smsTypeConst.const.XD, smsTypeConst.judge.result.toString(), wxConst.template.revise, wechatData2);
|
|
|
await transaction.commit();
|
|
@@ -403,9 +410,14 @@ module.exports = app => {
|
|
|
// smsTypeConst.judge.approval.toString(), '台账修订需要您审批,请登录系统处理。');
|
|
|
await this.ctx.helper.sendAliSms(nextAudit.audit_id, smsTypeConst.const.XD, smsTypeConst.judge.approval.toString(), SmsAliConst.template.revise_check);
|
|
|
// 微信模板通知
|
|
|
+ const shenpiUrl = await this.ctx.helper.urlToShort(
|
|
|
+ this.ctx.protocol + '://' + this.ctx.host + '/wap/tender/' + revise.tid + '/revise/' + revise.id + '/info'
|
|
|
+ );
|
|
|
const wechatData = {
|
|
|
+ wap_url: shenpiUrl,
|
|
|
status: wxConst.status.check,
|
|
|
tips: wxConst.tips.check,
|
|
|
+ code: this.ctx.session.sessionProject.code,
|
|
|
begin_time: Date.parse(revise.begin_time),
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(nextAudit.audit_id, smsTypeConst.const.XD, smsTypeConst.judge.approval.toString(), wxConst.template.revise, wechatData);
|
|
@@ -471,10 +483,15 @@ module.exports = app => {
|
|
|
users.push(revise.uid);
|
|
|
|
|
|
// 微信模板通知
|
|
|
+ const shenpiUrl = await this.ctx.helper.urlToShort(
|
|
|
+ this.ctx.protocol + '://' + this.ctx.host + '/wap/tender/' + revise.tid + '/revise/' + revise.id + '/info'
|
|
|
+ );
|
|
|
const wechatData2 = {
|
|
|
+ wap_url: shenpiUrl,
|
|
|
status: wxConst.status.success,
|
|
|
tips: wxConst.tips.success,
|
|
|
begin_time: Date.parse(revise.begin_time),
|
|
|
+ code: this.ctx.session.sessionProject.code,
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(users, smsTypeConst.const.XD, smsTypeConst.judge.result.toString(), wxConst.template.revise, wechatData2);
|
|
|
}
|
|
@@ -505,10 +522,15 @@ module.exports = app => {
|
|
|
status: SmsAliConst.status.back,
|
|
|
});
|
|
|
// 微信模板通知
|
|
|
+ const shenpiUrl = await this.ctx.helper.urlToShort(
|
|
|
+ this.ctx.protocol + '://' + this.ctx.host + '/wap/tender/' + revise.tid + '/revise/' + revise.id + '/info'
|
|
|
+ );
|
|
|
const wechatData = {
|
|
|
+ wap_url: shenpiUrl,
|
|
|
status: wxConst.status.back,
|
|
|
tips: wxConst.tips.back,
|
|
|
begin_time: Date.parse(revise.begin_time),
|
|
|
+ code: this.ctx.session.sessionProject.code,
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(revise.uid, smsTypeConst.const.XD, smsTypeConst.judge.result.toString(), wxConst.template.revise, wechatData);
|
|
|
// 其他参与人
|
|
@@ -525,9 +547,11 @@ module.exports = app => {
|
|
|
);
|
|
|
// 微信模板通知
|
|
|
const wechatData2 = {
|
|
|
+ wap_url: shenpiUrl,
|
|
|
status: wxConst.status.back,
|
|
|
tips: wxConst.tips.back,
|
|
|
begin_time: Date.parse(revise.begin_time),
|
|
|
+ code: this.ctx.session.sessionProject.code,
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(this._.map(auditors, 'user_id'), smsTypeConst.const.XD, smsTypeConst.judge.result.toString(), wxConst.template.revise, wechatData2);
|
|
|
}
|