瀏覽代碼

内存表,合同支付,数据问题

MaiXinRong 5 年之前
父節點
當前提交
5945408815
共有 2 個文件被更改,包括 2 次插入3 次删除
  1. 0 2
      app/lib/rpt_data_analysis.js
  2. 2 1
      app/service/report_memory.js

+ 0 - 2
app/lib/rpt_data_analysis.js

@@ -737,7 +737,6 @@ const union = {
     fun: function(ctx, data, fields, options) {
     fun: function(ctx, data, fields, options) {
         if (!options || !options.union) return;
         if (!options || !options.union) return;
 
 
-        console.log(data.mem_stage_pay);
         const result = [];
         const result = [];
         for (const u of options.union) {
         for (const u of options.union) {
             const unionData = data[u.table];
             const unionData = data[u.table];
@@ -754,7 +753,6 @@ const union = {
             }
             }
         }
         }
         data.mem_union_data = result;
         data.mem_union_data = result;
-        //console.log(data.mem_union_data);
     }
     }
 };
 };
 
 

+ 2 - 1
app/service/report_memory.js

@@ -522,6 +522,7 @@ module.exports = app => {
         async getStagePayData(tid, sid, fields) {
         async getStagePayData(tid, sid, fields) {
             await this.ctx.service.tender.checkTender(tid);
             await this.ctx.service.tender.checkTender(tid);
             await this.ctx.service.stage.checkStage(sid);
             await this.ctx.service.stage.checkStage(sid);
+            const stage = this.ctx.stage;
 
 
             const dealPay = await this.ctx.service.stagePay.getStagePays(this.ctx.stage);
             const dealPay = await this.ctx.service.stagePay.getStagePays(this.ctx.stage);
 
 
@@ -535,7 +536,7 @@ module.exports = app => {
             if (this._checkFieldsExistReg(fields, 'r[0-9]+_tp')) {
             if (this._checkFieldsExistReg(fields, 'r[0-9]+_tp')) {
                 const validRole = this._getStageValidRole();
                 const validRole = this._getStageValidRole();
                 const allStagePays = await this.ctx.service.stagePay.getAllDataByCondition({
                 const allStagePays = await this.ctx.service.stagePay.getAllDataByCondition({
-                    where: {sid: this.ctx.stage.id, stimes: this.ctx.stage.curTimes}
+                    where: {sid: stage.id, stimes: stage.curTimes}
                 });
                 });
 
 
                 for (const [i, role] of validRole.entries()) {
                 for (const [i, role] of validRole.entries()) {