MaiXinRong преди 3 години
родител
ревизия
f28f073171
променени са 2 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 1 1
      app/controller/report_controller.js
  2. 2 1
      app/lib/rptCustomData.js

+ 1 - 1
app/controller/report_controller.js

@@ -24,7 +24,7 @@ const needCustomTables = [
     'mem_custom_select',
     'mem_gather_stage_bills', 'mem_gather_deal_bills', 'mem_gather_stage_pay', 'mem_gather_tender_info',
     'mem_stage_sum_bills', 'mem_stage_sum_pay',
-    'mem_jh_gather_im_change', 'mem_jh_im_change',
+    'mem_jh_gather_im_change', 'mem_jh_im_change', 'mem_jh_gather_stage_bills_compare',
 ];
 
 module.exports = app => {

+ 2 - 1
app/lib/rptCustomData.js

@@ -303,7 +303,8 @@ class jhHelper {
         const stageChangeDetail = await this.getCurChangeDetailData(tender.id, stage.id);
         this.ctx.helper.saveBufferFile(JSON.stringify(stageChangeDetail, '', '\t'), this.ctx.app.baseDir + '/temp.json');
         for (const dc of gsDefine.defaultCompare) {
-            const scd = helper.filterTimesOrderData(stageChangeDetail, ['lid', 'pid', 'cid', 'cbid'], 'stimes', 'sorder', auditors[dc].times, auditors[dc].order);
+            if (!auditors[dc]) continue;
+             const scd = helper.filterTimesOrderData(stageChangeDetail, ['lid', 'pid', 'cid', 'cbid'], 'stimes', 'sorder', auditors[dc].times, auditors[dc].order);
             this._loadChangeDetail(billsIndex, scd, gsDefine, `r${dc}_`);
             this.prefixes.push(`r${dc}_`);
         }