浏览代码

修复wap计量期统计数据bug

ellisran 7 月之前
父节点
当前提交
9f4779b311
共有 1 个文件被更改,包括 1 次插入8 次删除
  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;
                 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.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);
-                    // 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);
                 const renderData = {