Browse Source

关联台账,中间计量相关

MaiXinRong 3 years ago
parent
commit
c77b8b1bf6
2 changed files with 4 additions and 3 deletions
  1. 0 1
      app/middleware/stage_check.js
  2. 4 2
      app/service/stage_rela.js

+ 0 - 1
app/middleware/stage_check.js

@@ -158,7 +158,6 @@ module.exports = options => {
                     }
                 }
             }
-            console.log(this.stage);
             yield next;
         } catch (err) {
             this.helper.log(err);

+ 4 - 2
app/service/stage_rela.js

@@ -88,7 +88,7 @@ class srCache {
         ]);
         for (const p of pos) {
             p.gather_qty = this.ctx.helper.add(p.contract_qty, p.qc_qty);
-            p.pre_gather_qty = this.ctx.helper.add(p.pre_contract_qty, p.qc_qty);
+            p.pre_gather_qty = this.ctx.helper.add(p.pre_contract_qty, p.pre_qc_qty);
             p.end_contract_qty = this.ctx.helper.add(p.contract_qty, p.pre_contract_qty);
             p.end_qc_qty = this.ctx.helper.add(p.qc_qty, p.pre_qc_qty);
             p.end_gather_qty = this.ctx.helper.add(p.gather_qty, p.pre_gather_qty);
@@ -194,6 +194,7 @@ class srCache {
         this.details = await this.ctx.service.stageDetail.getLastestStageData(this.stage.tid, this.stage.id);
         stageIm.buildRelaStageIm(this.stage, this.billsTree, this.pos, this.details, this.changes);
         for (const i of stageIm.ImData) {
+            if (i.pre_jl) console.log(i);
             this.stageIm.push({
                 tid: this.ctx.tender.id, sid: this.ctx.stage.id, sorder: this.ctx.stage.order,
                 rela_tid: this.stage.tid, rela_sid: this.stage.id, rela_sorder: this.stage.order,
@@ -206,7 +207,7 @@ class srCache {
                 calc_memo: i.calc_memo, calc_img_remark: i.calc_img_remark, calc_img: i.calc_img,
                 bgl_code: i.bgl_code, bgl_drawing_code: i.bgl_drawing_code,
                 jl: i.jl, contract_jl: i.contract_jl, qc_jl: i.qc_jl,
-                pre_jl: i.jl, pre_contract_jl: i.pre_contract_jl, pre_qc_jl: i.pre_qc_jl,
+                pre_jl: i.pre_jl, pre_contract_jl: i.pre_contract_jl, pre_qc_jl: i.pre_qc_jl,
                 end_jl: i.end_jl, end_contract_jl: i.end_contract_jl, end_qc_jl: i.end_qc_jl,
                 tp: i.tp, contract_tp: i.contract_tp, qc_tp: i.qc_tp,
                 pre_tp: i.pre_tp, pre_contract_tp: i.pre_contract_tp, pre_qc_tp: i.pre_qc_tp,
@@ -216,6 +217,7 @@ class srCache {
             })
         }
         for (const i of stageIm.ImBillsData) {
+            if (i.pre_jl) console.log(i);
             this.stageImBills.push({
                 tid: this.ctx.tender.id, sid: this.ctx.stage.id, sorder: this.ctx.stage.order,
                 rela_tid: this.stage.tid, rela_sid: this.stage.id, rela_sorder: this.stage.order,