ソースを参照

变更立项,申请,方案微信通知

laiguoran 3 年 前
コミット
1eefffca31

+ 11 - 2
app/const/wechat_template.js

@@ -9,7 +9,7 @@
  */
 const template = {
     stage: 0,
-    change: 1,
+    change: 1, // 变更所有共用模板
     ledger: 2, // 台账和台账修订共用模板
     revise: 3,
     material: 4,
@@ -17,7 +17,7 @@ const template = {
 };
 const templateId = {
     stage: '5vU3WmR90yDajbs4LWIWH4OQhunYlS1HXTiesIGxrsk',
-    change: 'nSKl9u4DMvu7KtmFFS9bfVvznRDRpx6L7LlTnVFn4fs',
+    change: 'nSKl9u4DMvu7KtmFFS9bfVvznRDRpx6L7LlTnVFn4fs', // 变更所有共用模板
     ledger: '9Ul3KFxvYQGfT6wbGGjqqnGR0zHtx0BHKs9sXj4Ii44', // 台账和台账修订共用模板
     revise: 'ia3ObPVe_0A1GLVpU-jcDe1P6zVriJ36eAijeQvbpFM',
     material: 'Y9ov80rev3LHcoM2hOQE6jrK_5xZsqE-PZ0Z6HS9VGA',
@@ -28,17 +28,26 @@ const status = {
     back: '退回',
     success: '通过',
     report: '已上报',
+    stop: '终止',
 };
 const tips = {
     check: '需要您审批',
     back: '审批退回',
     success: '审批通过',
     report: '已上报',
+    stop: '审批终止',
 };
 
+const changeType = {
+    project: '变更立项',
+    apply: '变更申请',
+    plan: '变更方案',
+}
+
 module.exports = {
     template,
     templateId,
     status,
     tips,
+    changeType,
 };

+ 6 - 5
app/lib/wechat.js

@@ -69,12 +69,13 @@ class WX {
                         break;
                     case wxConst.template.change:
                         templateId = wxConst.templateId.change;
-                        url = this.ctx.protocol + '://' + this.ctx.host + '/wx/url2wap?project=' + data.code + '&url=' + sck + data.wap_url;
-                        remark = data.status === wxConst.status.check ? '微信可快速审批,如需进行详细审批' :
-                            (data.status === wxConst.status.success ? '审批已通过,查看审批结果' : '审批被退回,查看退回结果');
+                        url = data.type ? '' : this.ctx.protocol + '://' + this.ctx.host + '/wx/url2wap?project=' + data.code + '&url=' + sck + data.wap_url;
+                        remark = data.status === wxConst.status.check ? (data.type ? '微信暂无法在线审批' : '微信可快速审批,如需进行详细审批') :
+                            (data.status === wxConst.status.success ? '审批已通过,查看审批结果' :
+                                (data.status === wxConst.status.back ? '审批被退回,查看退回结果' : '审批已终止,查看终止结果'));
                         msgData = {
                             first: {
-                                value: '您好,工程变更申请' + data.tips,
+                                value: '您好,' + (data.type ? wxConst.changeType[data.type] : '工程变更申请') + data.tips,
                             },
                             keyword1: {
                                 value: data.projectName,
@@ -138,7 +139,7 @@ class WX {
                         break;
                     case wxConst.template.material:
                         templateId = wxConst.templateId.material;
-                        url = this.ctx.protocol + '://' + this.ctx.host + '/wx/url2wap?project=' + data.code + '&url=' + sck + data.wap_url;
+                        // url = this.ctx.protocol + '://' + this.ctx.host + '/wx/url2wap?project=' + data.code + '&url=' + sck + data.wap_url;
                         remark = data.status === wxConst.status.check ? '微信暂无法在线审批' :
                             (data.status === wxConst.status.success ? '审批已通过,查看审批结果' : '审批被退回,查看退回结果');
                         msgData = {

+ 35 - 41
app/service/change_apply_audit.js

@@ -271,16 +271,14 @@ module.exports = app => {
                     id: caId, status: auditConst.status.checking,
                 });
                 // 微信模板通知
-                // const materialInfo = await this.ctx.service.material.getDataById(materialId);
-                // const wechatData = {
-                //     qi: materialInfo.order,
-                //     status: wxConst.status.check,
-                //     tips: wxConst.tips.check,
-                //     begin_time: Date.parse(new Date()),
-                //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                // };
-                // await this.ctx.helper.sendWechat(audit.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
+                const wechatData = {
+                    type: 'apply',
+                    status: wxConst.status.check,
+                    tips: wxConst.tips.check,
+                    code: this.ctx.session.sessionProject.code,
+                    c_name: this.ctx.change.name,
+                };
+                await this.ctx.helper.sendWechat(audit.aid, smsTypeConst.const.BG, smsTypeConst.judge.approval.toString(), wxConst.template.change, wechatData);
 
                 // todo 更新标段tender状态 ?
                 await transaction.commit();
@@ -391,17 +389,15 @@ module.exports = app => {
                     await transaction.update(this.ctx.service.changeApply.tableName, {
                         id: caId, status: auditConst.status.checking,
                     });
-
                     // 微信模板通知
-                    // const wechatData = {
-                    //     qi: materialInfo.order,
-                    //     status: wxConst.status.check,
-                    //     tips: wxConst.tips.check,
-                    //     begin_time: Date.parse(begin_audit.begin_time),
-                    //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                    //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                    // };
-                    // await this.ctx.helper.sendWechat(nextAudit.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
+                    const wechatData = {
+                        type: 'apply',
+                        status: wxConst.status.check,
+                        tips: wxConst.tips.check,
+                        code: this.ctx.session.sessionProject.code,
+                        c_name: this.ctx.change.name,
+                    };
+                    await this.ctx.helper.sendWechat(nextAudit.aid, smsTypeConst.const.BG, smsTypeConst.judge.approval.toString(), wxConst.template.change, wechatData);
                 } else {
                     // 本期结束
                     // 生成截止本期数据 final数据
@@ -414,16 +410,15 @@ module.exports = app => {
                     });
 
                     // 微信模板通知
-                    // const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), materialInfo.user_id));
-                    // const wechatData = {
-                    //     qi: materialInfo.order,
-                    //     status: wxConst.status.success,
-                    //     tips: wxConst.tips.success,
-                    //     begin_time: Date.parse(begin_audit.begin_time),
-                    //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                    //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                    // };
-                    // await this.ctx.helper.sendWechat(users, smsTypeConst.const.TC, smsTypeConst.judge.result.toString(), wxConst.template.material, wechatData);
+                    const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), this.ctx.change.uid));
+                    const wechatData = {
+                        type: 'apply',
+                        status: wxConst.status.success,
+                        tips: wxConst.tips.success,
+                        code: this.ctx.session.sessionProject.code,
+                        c_name: this.ctx.change.name,
+                    };
+                    await this.ctx.helper.sendWechat(users, smsTypeConst.const.BG, smsTypeConst.judge.result.toString(), wxConst.template.change, wechatData);
                 }
                 await transaction.commit();
             } catch (err) {
@@ -471,17 +466,16 @@ module.exports = app => {
                 //     mid: materialId,
                 //     order: 1,
                 // });
-                // const materialInfo = await this.ctx.service.material.getDataById(materialId);
-                // const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), materialInfo.user_id));
-                // const wechatData = {
-                //     qi: materialInfo.order,
-                //     status: wxConst.status.back,
-                //     tips: wxConst.tips.back,
-                //     begin_time: Date.parse(begin_audit.begin_time),
-                //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                // };
-                // await this.ctx.helper.sendWechat(users, smsTypeConst.const.TC, smsTypeConst.judge.result.toString(), wxConst.template.material, wechatData);
+                // 微信模板通知
+                const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), this.ctx.change.uid));
+                const wechatData = {
+                    type: 'apply',
+                    status: wxConst.status.back,
+                    tips: wxConst.tips.back,
+                    code: this.ctx.session.sessionProject.code,
+                    c_name: this.ctx.change.name,
+                };
+                await this.ctx.helper.sendWechat(users, smsTypeConst.const.BG, smsTypeConst.judge.result.toString(), wxConst.template.change, wechatData);
                 await transaction.commit();
             } catch (err) {
                 await transaction.rollback();

+ 34 - 44
app/service/change_plan_audit.js

@@ -271,16 +271,14 @@ module.exports = app => {
                     id: cpId, status: auditConst.status.checking,
                 });
                 // 微信模板通知
-                // const materialInfo = await this.ctx.service.material.getDataById(materialId);
-                // const wechatData = {
-                //     qi: materialInfo.order,
-                //     status: wxConst.status.check,
-                //     tips: wxConst.tips.check,
-                //     begin_time: Date.parse(new Date()),
-                //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                // };
-                // await this.ctx.helper.sendWechat(audit.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
+                const wechatData = {
+                    type: 'plan',
+                    status: wxConst.status.check,
+                    tips: wxConst.tips.check,
+                    code: this.ctx.session.sessionProject.code,
+                    c_name: this.ctx.change.name,
+                };
+                await this.ctx.helper.sendWechat(audit.aid, smsTypeConst.const.BG, smsTypeConst.judge.approval.toString(), wxConst.template.change, wechatData);
 
                 // todo 更新标段tender状态 ?
                 await transaction.commit();
@@ -396,15 +394,14 @@ module.exports = app => {
                     });
 
                     // 微信模板通知
-                    // const wechatData = {
-                    //     qi: materialInfo.order,
-                    //     status: wxConst.status.check,
-                    //     tips: wxConst.tips.check,
-                    //     begin_time: Date.parse(begin_audit.begin_time),
-                    //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                    //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                    // };
-                    // await this.ctx.helper.sendWechat(nextAudit.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
+                    const wechatData = {
+                        type: 'plan',
+                        status: wxConst.status.check,
+                        tips: wxConst.tips.check,
+                        code: this.ctx.session.sessionProject.code,
+                        c_name: this.ctx.change.name,
+                    };
+                    await this.ctx.helper.sendWechat(nextAudit.aid, smsTypeConst.const.BG, smsTypeConst.judge.approval.toString(), wxConst.template.change, wechatData);
                 } else {
                     // 本期结束
                     // 生成截止本期数据 final数据
@@ -415,16 +412,15 @@ module.exports = app => {
                     });
 
                     // 微信模板通知
-                    // const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), materialInfo.user_id));
-                    // const wechatData = {
-                    //     qi: materialInfo.order,
-                    //     status: wxConst.status.success,
-                    //     tips: wxConst.tips.success,
-                    //     begin_time: Date.parse(begin_audit.begin_time),
-                    //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                    //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                    // };
-                    // await this.ctx.helper.sendWechat(users, smsTypeConst.const.TC, smsTypeConst.judge.result.toString(), wxConst.template.material, wechatData);
+                    const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), this.ctx.change.uid));
+                    const wechatData = {
+                        type: 'plan',
+                        status: wxConst.status.success,
+                        tips: wxConst.tips.success,
+                        code: this.ctx.session.sessionProject.code,
+                        c_name: this.ctx.change.name,
+                    };
+                    await this.ctx.helper.sendWechat(users, smsTypeConst.const.BG, smsTypeConst.judge.result.toString(), wxConst.template.change, wechatData);
                 }
                 await transaction.commit();
             } catch (err) {
@@ -470,21 +466,15 @@ module.exports = app => {
                 // 清单审批值删除并重算变更金额
                 await this.ctx.service.changePlanList.delAuditAmount(transaction, cpId);
                 // 微信模板通知
-                // const begin_audit = await this.getDataByCondition({
-                //     mid: materialId,
-                //     order: 1,
-                // });
-                // const materialInfo = await this.ctx.service.material.getDataById(materialId);
-                // const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), materialInfo.user_id));
-                // const wechatData = {
-                //     qi: materialInfo.order,
-                //     status: wxConst.status.back,
-                //     tips: wxConst.tips.back,
-                //     begin_time: Date.parse(begin_audit.begin_time),
-                //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                // };
-                // await this.ctx.helper.sendWechat(users, smsTypeConst.const.TC, smsTypeConst.judge.result.toString(), wxConst.template.material, wechatData);
+                const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), this.ctx.change.uid));
+                const wechatData = {
+                    type: 'plan',
+                    status: wxConst.status.back,
+                    tips: wxConst.tips.back,
+                    code: this.ctx.session.sessionProject.code,
+                    c_name: this.ctx.change.name,
+                };
+                await this.ctx.helper.sendWechat(users, smsTypeConst.const.BG, smsTypeConst.judge.result.toString(), wxConst.template.change, wechatData);
                 await transaction.commit();
             } catch (err) {
                 await transaction.rollback();

+ 43 - 54
app/service/change_project_audit.js

@@ -272,16 +272,14 @@ module.exports = app => {
                     id: cpId, status: auditConst.status.checking,
                 });
                 // 微信模板通知
-                // const materialInfo = await this.ctx.service.material.getDataById(materialId);
-                // const wechatData = {
-                //     qi: materialInfo.order,
-                //     status: wxConst.status.check,
-                //     tips: wxConst.tips.check,
-                //     begin_time: Date.parse(new Date()),
-                //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                // };
-                // await this.ctx.helper.sendWechat(audit.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
+                const wechatData = {
+                    type: 'project',
+                    status: wxConst.status.check,
+                    tips: wxConst.tips.check,
+                    code: this.ctx.session.sessionProject.code,
+                    c_name: this.ctx.change.name,
+                };
+                await this.ctx.helper.sendWechat(audit.aid, smsTypeConst.const.BG, smsTypeConst.judge.approval.toString(), wxConst.template.change, wechatData);
 
                 // todo 更新标段tender状态 ?
                 await transaction.commit();
@@ -397,15 +395,14 @@ module.exports = app => {
                     });
 
                     // 微信模板通知
-                    // const wechatData = {
-                    //     qi: materialInfo.order,
-                    //     status: wxConst.status.check,
-                    //     tips: wxConst.tips.check,
-                    //     begin_time: Date.parse(begin_audit.begin_time),
-                    //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                    //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                    // };
-                    // await this.ctx.helper.sendWechat(nextAudit.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
+                    const wechatData = {
+                        type: 'project',
+                        status: wxConst.status.check,
+                        tips: wxConst.tips.check,
+                        code: this.ctx.session.sessionProject.code,
+                        c_name: this.ctx.change.name,
+                    };
+                    await this.ctx.helper.sendWechat(nextAudit.aid, smsTypeConst.const.BG, smsTypeConst.judge.approval.toString(), wxConst.template.change, wechatData);
                 } else {
                     // 本期结束
                     // 生成截止本期数据 final数据
@@ -415,16 +412,15 @@ module.exports = app => {
                     });
 
                     // 微信模板通知
-                    // const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), materialInfo.user_id));
-                    // const wechatData = {
-                    //     qi: materialInfo.order,
-                    //     status: wxConst.status.success,
-                    //     tips: wxConst.tips.success,
-                    //     begin_time: Date.parse(begin_audit.begin_time),
-                    //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                    //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                    // };
-                    // await this.ctx.helper.sendWechat(users, smsTypeConst.const.TC, smsTypeConst.judge.result.toString(), wxConst.template.material, wechatData);
+                    const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), this.ctx.change.uid));
+                    const wechatData = {
+                        type: 'project',
+                        status: wxConst.status.success,
+                        tips: wxConst.tips.success,
+                        code: this.ctx.session.sessionProject.code,
+                        c_name: this.ctx.change.name,
+                    };
+                    await this.ctx.helper.sendWechat(users, smsTypeConst.const.BG, smsTypeConst.judge.result.toString(), wxConst.template.change, wechatData);
                 }
                 await transaction.commit();
             } catch (err) {
@@ -468,21 +464,15 @@ module.exports = app => {
                 // 拷贝新一次审核流程列表
                 await transaction.insert(this.tableName, auditors);
                 // 微信模板通知
-                // const begin_audit = await this.getDataByCondition({
-                //     mid: materialId,
-                //     order: 1,
-                // });
-                // const materialInfo = await this.ctx.service.material.getDataById(materialId);
-                // const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), materialInfo.user_id));
-                // const wechatData = {
-                //     qi: materialInfo.order,
-                //     status: wxConst.status.back,
-                //     tips: wxConst.tips.back,
-                //     begin_time: Date.parse(begin_audit.begin_time),
-                //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                // };
-                // await this.ctx.helper.sendWechat(users, smsTypeConst.const.TC, smsTypeConst.judge.result.toString(), wxConst.template.material, wechatData);
+                const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), this.ctx.change.uid));
+                const wechatData = {
+                    type: 'project',
+                    status: wxConst.status.back,
+                    tips: wxConst.tips.back,
+                    code: this.ctx.session.sessionProject.code,
+                    c_name: this.ctx.change.name,
+                };
+                await this.ctx.helper.sendWechat(users, smsTypeConst.const.BG, smsTypeConst.judge.result.toString(), wxConst.template.change, wechatData);
                 await transaction.commit();
             } catch (err) {
                 await transaction.rollback();
@@ -523,16 +513,15 @@ module.exports = app => {
                 });
 
                 // 微信模板通知
-                // const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), materialInfo.user_id));
-                // const wechatData = {
-                //     qi: materialInfo.order,
-                //     status: wxConst.status.success,
-                //     tips: wxConst.tips.success,
-                //     begin_time: Date.parse(begin_audit.begin_time),
-                //     m_tp: this.ctx.helper.add(this.ctx.helper.round(materialInfo.m_tp, 2), this.ctx.helper.round(materialInfo.ex_tp, 2)),
-                //     hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.rate/100), 2)),
-                // };
-                // await this.ctx.helper.sendWechat(users, smsTypeConst.const.TC, smsTypeConst.judge.result.toString(), wxConst.template.material, wechatData);
+                const users = this._.uniq(this._.concat(this._.map(auditors, 'aid'), this.ctx.change.uid));
+                const wechatData = {
+                    type: 'project',
+                    status: wxConst.status.stop,
+                    tips: wxConst.tips.stop,
+                    code: this.ctx.session.sessionProject.code,
+                    c_name: this.ctx.change.name,
+                };
+                await this.ctx.helper.sendWechat(users, smsTypeConst.const.BG, smsTypeConst.judge.result.toString(), wxConst.template.change, wechatData);
                 await transaction.commit();
             } catch (err) {
                 await transaction.rollback();