Przeglądaj źródła

uat内容更新

laiguoran 4 lat temu
rodzic
commit
be14d91d12

+ 7 - 7
app/service/material_audit.js

@@ -316,7 +316,7 @@ module.exports = app => {
                         m_tp: this.ctx.helper.round(materialInfo.m_tp, 2),
                         hs_m_tp: this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2),
                     };
-                    await this.ctx.helper.sendWechat(nextAudit.id, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
+                    await this.ctx.helper.sendWechat(nextAudit.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
 
 
                     // 添加短信通知-需要审批提醒功能
@@ -543,7 +543,7 @@ module.exports = app => {
                     m_tp: this.ctx.helper.round(materialInfo.m_tp, 2),
                     hs_m_tp: this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), 2),
                 };
-                await this.ctx.helper.sendWechat(audit.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
+                await this.ctx.helper.sendWechat(preAuditor.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
 
                 await transaction.insert(this.tableName, newAuditors);
                 await transaction.commit();
@@ -669,11 +669,11 @@ module.exports = app => {
          */
         async getAuditMaterial(auditorId) {
             const sql = 'SELECT ma.`aid`, ma.`times`, ma.`order`, ma.`begin_time`, ma.`end_time`, ma.`tid`, ma.`mid`,' +
-                        '    m.`order` As `morder`, m.`status` As `mstatus`,' +
-                        '    t.`name`, t.`project_id`, t.`type`, t.`user_id` ' +
-                        '  FROM ?? AS ma, ?? AS m, ?? As t ' +
-                        '  WHERE ((ma.`aid` = ? and ma.`status` = ?) OR (m.`user_id` = ? and ma.`status` = ? and m.`status` = ? and ma.`times` = (m.`times`-1)))' +
-                        '    and ma.`mid` = m.`id` and ma.`tid` = t.`id` ORDER BY ma.`begin_time` DESC';
+                '    m.`order` As `morder`, m.`status` As `mstatus`,' +
+                '    t.`name`, t.`project_id`, t.`type`, t.`user_id` ' +
+                '  FROM ?? AS ma, ?? AS m, ?? As t ' +
+                '  WHERE ((ma.`aid` = ? and ma.`status` = ?) OR (m.`user_id` = ? and ma.`status` = ? and m.`status` = ? and ma.`times` = (m.`times`-1)))' +
+                '    and ma.`mid` = m.`id` and ma.`tid` = t.`id` ORDER BY ma.`begin_time` DESC';
             const sqlParam = [this.tableName, this.ctx.service.material.tableName, this.ctx.service.tender.tableName, auditorId, auditConst.status.checking, auditorId, auditConst.status.checkNo, auditConst.status.checkNo];
             return await this.db.query(sql, sqlParam);
         }

+ 6 - 4
app/service/revise_audit.js

@@ -348,7 +348,6 @@ 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();
@@ -386,8 +385,8 @@ module.exports = app => {
                         };
                         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, 'audit_id'), audit.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, {
@@ -436,12 +435,15 @@ module.exports = app => {
                             status: SmsAliConst.status.success,
                         });
                         // 其他参与人
-                        // const users = this._.pull(this._.map(auditList, 'audit_id'), audit.audit_id);
+                        const users = this._.pull(this._.map(auditList, 'audit_id'), 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,
                         });
+
+                        users.push(revise.uid);
+
                         // 微信模板通知
                         const wechatData2 = {
                             status: wxConst.status.success,

+ 1 - 1
app/view/stage/audit_modal.ejs

@@ -807,7 +807,7 @@
     const dataChecker = DataChecker({
         checkUrl: '/tender/<%- ctx.tender.id %>/measure/stage/<%- ctx.stage.order %>/check',
         errorList: $.cs_errorList({
-            storeKey: 'stage-error-' + '<% - ctx.stage.id %>',
+            storeKey: 'stage-error-' + '<%- ctx.stage.id %>',
         }),
     });