Browse Source

修复wap计量期统计数据bug

ellisran 7 months ago
parent
commit
9f4779b311
1 changed files with 1 additions and 8 deletions
  1. 1 8
      app/controller/wap_controller.js

+ 1 - 8
app/controller/wap_controller.js

@@ -336,17 +336,10 @@ module.exports = app => {
                 // }
                 // }
                 const stage = ctx.stage;
                 const stage = ctx.stage;
                 if (stage) {
                 if (stage) {
-                    await this.ctx.service.stage.checkStageGatherData(stage);
+                    if (stage.status !== auditConst.stage.status.checked) await this.ctx.service.stage.checkStageGatherData(stage);
                     stage.tp = this.ctx.helper.sum([stage.contract_tp, stage.qc_tp, stage.pc_tp]);
                     stage.tp = this.ctx.helper.sum([stage.contract_tp, stage.qc_tp, stage.pc_tp]);
                     stage.pre_tp = this.ctx.helper.add(stage.pre_contract_tp, stage.pre_qc_tp);
                     stage.pre_tp = this.ctx.helper.add(stage.pre_contract_tp, stage.pre_qc_tp);
                     stage.end_tp = this.ctx.helper.add(stage.pre_tp, stage.tp);
                     stage.end_tp = this.ctx.helper.add(stage.pre_tp, stage.tp);
-                    // if (stage.yf_tp && stage.sf_tp === 0) {
-                    //     const sf = await this.ctx.service.stagePay.getHistorySf(stage);
-                    //     if (sf && stage.readOnly) {
-                    //         await this.ctx.service.stage.update({ sf_tp: sf.tp, pre_sf_tp: sf.pre_tp }, { id: stage.id });
-                    //     }
-                    //     stage.sf_tp = sf ? sf.tp : 0;
-                    // }
                 }
                 }
                 await ctx.service.stage.loadStageAuditViewData(stage);
                 await ctx.service.stage.loadStageAuditViewData(stage);
                 const renderData = {
                 const renderData = {