|
@@ -348,6 +348,7 @@ module.exports = app => {
|
|
|
});
|
|
|
});
|
|
|
await transaction.insert('zh_notice', records);
|
|
|
+ const users = this._.pull(this._.uniq(this._.concat(this._.map(auditList, 'audit_id'), revise.uid)), audit.audit_id);
|
|
|
|
|
|
// 整理当前流程审核人状态更新
|
|
|
const time = new Date();
|
|
@@ -376,29 +377,29 @@ module.exports = app => {
|
|
|
// 下一人
|
|
|
// await this.ctx.helper.sendUserSms(nextAudit.user_id, smsTypeConst.const.XD,
|
|
|
// smsTypeConst.judge.approval.toString(), '台帐修订需要您审批,请登录系统处理。');
|
|
|
- await this.ctx.helper.sendAliSms(nextAudit.user_id, smsTypeConst.const.XD, smsTypeConst.judge.approval.toString(), SmsAliConst.template.revise_check);
|
|
|
+ await this.ctx.helper.sendAliSms(nextAudit.audit_id, smsTypeConst.const.XD, smsTypeConst.judge.approval.toString(), SmsAliConst.template.revise_check);
|
|
|
// 微信模板通知
|
|
|
const wechatData = {
|
|
|
status: wxConst.status.check,
|
|
|
tips: wxConst.tips.check,
|
|
|
begin_time: Date.parse(revise.begin_time),
|
|
|
};
|
|
|
- await this.ctx.helper.sendWechat(nextAudit.user_id, smsTypeConst.const.XD, smsTypeConst.judge.approval.toString(), wxConst.template.revise, wechatData);
|
|
|
+ await this.ctx.helper.sendWechat(nextAudit.audit_id, smsTypeConst.const.XD, smsTypeConst.judge.approval.toString(), wxConst.template.revise, wechatData);
|
|
|
// 其他参与人
|
|
|
- const users = this._.pull(this._.map(auditList, 'user_id'), audit.id);
|
|
|
- users.push(revise.uid);
|
|
|
+ // const users = this._.pull(this._.map(auditList, 'audit_id'), audit.audit_id);
|
|
|
+ // users.push(revise.uid);
|
|
|
// await this.ctx.helper.sendUserSms(users, smsTypeConst.const.XD,
|
|
|
// smsTypeConst.judge.result.toString(), '台账修订审批通过。');
|
|
|
await this.ctx.helper.sendAliSms(users, smsTypeConst.const.XD, smsTypeConst.judge.result.toString(), SmsAliConst.template.revise_result2, {
|
|
|
status: SmsAliConst.status.success,
|
|
|
});
|
|
|
// 微信模板通知
|
|
|
- const wechatData2 = {
|
|
|
- status: wxConst.status.success,
|
|
|
- tips: wxConst.tips.success,
|
|
|
- begin_time: Date.parse(revise.begin_time),
|
|
|
- };
|
|
|
- await this.ctx.helper.sendWechat(users, smsTypeConst.const.XD, smsTypeConst.judge.result.toString(), wxConst.template.revise, wechatData2);
|
|
|
+ // const wechatData2 = {
|
|
|
+ // status: wxConst.status.success,
|
|
|
+ // tips: wxConst.tips.success,
|
|
|
+ // begin_time: Date.parse(revise.begin_time),
|
|
|
+ // };
|
|
|
+ // await this.ctx.helper.sendWechat(users, smsTypeConst.const.XD, smsTypeConst.judge.result.toString(), wxConst.template.revise, wechatData2);
|
|
|
} else {
|
|
|
// 同步修订信息
|
|
|
await transaction.update(this.ctx.service.ledgerRevise.tableName, {
|
|
@@ -434,15 +435,8 @@ module.exports = app => {
|
|
|
await this.ctx.helper.sendAliSms(revise.uid, smsTypeConst.const.XD, smsTypeConst.judge.result.toString(), SmsAliConst.template.revise_result, {
|
|
|
status: SmsAliConst.status.success,
|
|
|
});
|
|
|
- // 微信模板通知
|
|
|
- const wechatData = {
|
|
|
- status: wxConst.status.success,
|
|
|
- tips: wxConst.tips.success,
|
|
|
- begin_time: Date.parse(revise.begin_time),
|
|
|
- };
|
|
|
- await this.ctx.helper.sendWechat(revise.uid, smsTypeConst.const.XD, smsTypeConst.judge.result.toString(), wxConst.template.revise, wechatData);
|
|
|
// 其他参与人
|
|
|
- const users = this._.pull(this._.map(auditList, 'user_id'), audit.id);
|
|
|
+ // const users = this._.pull(this._.map(auditList, 'audit_id'), audit.audit_id);
|
|
|
// await this.ctx.helper.sendUserSms(users, smsTypeConst.const.XD,
|
|
|
// smsTypeConst.judge.result.toString(), '台账修订审批通过。');
|
|
|
await this.ctx.helper.sendAliSms(users, smsTypeConst.const.XD, smsTypeConst.judge.result.toString(), SmsAliConst.template.revise_result2, {
|