Explorar o código

上报时,更新缓存数据中的截止上期数据

MaiXinRong hai 1 ano
pai
achega
3f587ffc6a
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      app/service/stage_audit.js

+ 7 - 1
app/service/stage_audit.js

@@ -343,7 +343,13 @@ module.exports = app => {
                     sf_tp: sfPay.tp,
                 };
                 this.ctx.stage.tp_history.push({ times: this.ctx.stage.curTimes, order: 0, ...stageTp });
-                await this.ctx.service.tenderCache.updateStageCache4Start(transaction, this.ctx.stage, auditConst.status.checking, audits, ledgerTp, stageTp);
+                const completeStageTp = {
+                    ...stageTp,
+                    pre_contract_tp: this.ctx.stage.pre_contract_tp || 0, pre_qc_tp: this.ctx.stage.pre_qc_tp || 0,
+                    pre_positive_qc_tp: this.ctx.stage.pre_positive_qc_tp || 0, pre_negative_qc_tp: this.ctx.stage.pre_negative_qc_tp || 0,
+                    pre_yf_tp: this.ctx.stage.pre_yf_tp || 0, pre_sf_tp: this.ctx.stage.pre_sf_tp || 0,
+                };
+                await this.ctx.service.tenderCache.updateStageCache4Start(transaction, this.ctx.stage, auditConst.status.checking, audits, ledgerTp, completeStageTp);
                 await transaction.update(this.ctx.service.stage.tableName, {
                     id: stageId,
                     status: auditConst.status.checking,