فهرست منبع

报表数据源,汇总表,标段信息,现有数据计算补差,新增补差、正负变更等指标数据

MaiXinRong 1 سال پیش
والد
کامیت
391bca281c
1فایلهای تغییر یافته به همراه31 افزوده شده و 8 حذف شده
  1. 31 8
      app/service/rpt_gather_memory.js

+ 31 - 8
app/service/rpt_gather_memory.js

@@ -831,14 +831,23 @@ module.exports = app => {
 
                 info.pre_contract_tp = stage.pre_contract_tp;
                 info.pre_qc_tp = stage.pre_qc_tp;
+                info.pre_positive_qc_tp = stage.pre_positive_qc_tp;
+                info.pre_negative_qc_tp = stage.pre_negative_qc_tp;
                 info.pre_gather_tp = helper.add(info.pre_contract_tp, info.pre_qc_tp);
 
                 info.contract_tp = stage.contract_tp;
                 info.qc_tp = stage.qc_tp;
-                info.gather_tp = helper.add(info.contract_tp, info.qc_tp);
-
-                info.end_contract_tp = helper.add(info.pre_contract_tp, info.contract_tp);
-                info.end_qc_tp = helper.add(info.pre_qc_tp, info.qc_tp);
+                info.positive_qc_tp = stage.positive_qc_tp;
+                info.positive_qc_pc_tp = stage.positive_qc_pc_tp;
+                info.negative_qc_tp = stage.negative_qc_tp;
+                info.negative_qc_pc_tp = stage.negative_qc_pc_tp;
+                info.contract_pc_tp = stage.contract_pc_tp;
+                info.qc_pc_tp = stage.qc_pc_tp;
+                info.pc_tp = stage.pc_tp;
+                info.gather_tp = helper.sum([info.contract_tp, info.qc_tp, info.pc_tp]);
+
+                info.end_contract_tp = helper.sum([info.pre_contract_tp, info.contract_tp, info.contract_pc_tp]);
+                info.end_qc_tp = helper.sum([info.pre_qc_tp, info.qc_tp, info.qc_pc_tp]);
                 info.end_gather_tp = helper.add(info.pre_gather_tp, info.gather_tp);
 
                 info.yf_tp = stage.yf_tp;
@@ -855,25 +864,39 @@ module.exports = app => {
             if (preStage) {
                 info.pre_contract_tp = helper.add(preStage.contract_tp, preStage.pre_contract_tp);
                 info.pre_qc_tp = helper.add(preStage.qc_tp, preStage.pre_qc_tp);
+                info.pre_positive_qc_tp = helper.add(preStage.positive_qc_tp, preStage.pre_positive_qc_tp);
+                info.pre_negative_qc_tp = helper.add(preStage.negative_qc_tp, preStage.pre_negative_qc_tp);
                 info.pre_gather_tp = helper.add(info.pre_contract_tp, info.pre_qc_tp);
                 info.pre_yf_tp = helper.add(preStage.yf_tp, preStage.pre_yf_tp);
+                info.pre_sf_tp = helper.add(preStage.sf_tp, preStage.pre_sf_tp);
             }
 
             for (const stage of stages) {
                 await this.ctx.service.stage.doCheckStage(stage);
                 await this.ctx.service.stage.checkStageGatherData(stage, this.ctx.session.sessionUser.is_admin);
 
-
                 info.contract_tp = helper.add(info.contract_tp, stage.contract_tp);
                 info.qc_tp = helper.add(info.qc_tp, stage.qc_tp);
 
+                info.positive_qc_tp = helper.add(info.positive_qc_tp, stage.positive_qc_tp);
+                info.positive_qc_pc_tp = helper.add(info.positive_qc_tp, stage.positive_qc_pc_tp);
+                info.negative_qc_tp = helper.add(info.negative_qc_tp, stage.negative_qc_tp);
+                info.negative_qc_pc_tp = helper.add(info.negative_qc_pc_tp, stage.negative_qc_pc_tp);
+
+                info.contract_pc_tp = helper.add(info.contract_pc_tp, stage.contract_pc_tp);
+                info.qc_pc_tp = helper.add(info.qc_pc_tp, stage.qc_pc_tp);
+                info.pc_tp = helper.add(info.pc_tp, stage.pc_tp);
+
                 info.yf_tp = helper.add(info.yf_tp, stage.yf_tp);
+
+                info.sf_tp = helper.add(info.sf_tp, stage.sf_tp);
             }
-            info.gather_tp = helper.add(info.contract_tp, info.qc_tp);
-            info.end_contract_tp = helper.add(info.pre_contract_tp, info.contract_tp);
-            info.end_qc_tp = helper.add(info.pre_qc_tp, info.qc_tp);
+            info.gather_tp = helper.sum([info.contract_tp, info.qc_tp, info.pc_tp]);
+            info.end_contract_tp = helper.sum([info.pre_contract_tp, info.contract_tp, info.contract_pc_tp]);
+            info.end_qc_tp = helper.sum([info.pre_qc_tp, info.qc_tp, info.qc_pc_tp]);
             info.end_gather_tp = helper.add(info.pre_gather_tp, info.gather_tp);
             info.end_yf_tp = helper.add(info.pre_yf_tp, info.yf_tp);
+            info.end_sf_tp = helper.add(info.pre_sf_tp, info.sf_tp);
         }
         async _gatherZoneTenderInfo(tender, index, zone) {
             const info = await this._getBaseTenderInfo(tender);