Sfoglia il codice sorgente

台账修订审批过后,原期数据缓存应无效

MaiXinRong 5 anni fa
parent
commit
2ed47e06e0
2 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 0
      app/service/revise_audit.js
  2. 0 1
      app/service/stage.js

+ 3 - 0
app/service/revise_audit.js

@@ -270,6 +270,9 @@ module.exports = app => {
                     // 无下一审核人表示,审核结束
                     if (nextAudit) {
                         await transaction.update(this.tableName, {id: nextAudit.id, status: auditConst.status.checking, begin_time: time});
+                        // 最新一期跟台账相关的缓存数据应过期
+                        const lastStage = await this.ctx.service.stage.getLastestStage(t.id, true);
+                        if (lastStage) await transaction.update(this.ctx.service.stage.tableName, {id: lastStage.id, cache_time_l: new Date()});
 
                         // 短信通知-需要审批提醒功能
                         // 下一人

+ 0 - 1
app/service/stage.js

@@ -27,7 +27,6 @@ module.exports = app => {
             this.tableName = 'stage';
         }
 
-
         async checkStage(sid) {
             if (!this.ctx.stage) {
                 const status = auditConst.status;