فهرست منبع

往期计量读取台账历史

MaiXinRong 2 سال پیش
والد
کامیت
a4be6e17ec
1فایلهای تغییر یافته به همراه8 افزوده شده و 8 حذف شده
  1. 8 8
      app/controller/stage_controller.js

+ 8 - 8
app/controller/stage_controller.js

@@ -246,10 +246,10 @@ module.exports = app => {
         }
 
         async _getStageLedgerData(ctx, ledgerColumn) {
-            // const ledgerData = ctx.stage.ledgerHis
-            //     ? await ctx.service.ledger.loadDataFromOss(ctx.tender.id, ctx.stage.ledgerHis.bills_file)
-            //     : await ctx.service.ledger.getAllDataByCondition({ columns: ledgerColumn, where: { tender_id: ctx.tender.id } });
-            const ledgerData = await ctx.service.ledger.getAllDataByCondition({ columns: ledgerColumn, where: { tender_id: ctx.tender.id } });
+            const ledgerData = ctx.stage.ledgerHis
+                ? await ctx.service.ledger.loadDataFromOss(ctx.tender.id, ctx.stage.ledgerHis.bills_file)
+                : await ctx.service.ledger.getAllDataByCondition({ columns: ledgerColumn, where: { tender_id: ctx.tender.id } });
+            // const ledgerData = await ctx.service.ledger.getAllDataByCondition({ columns: ledgerColumn, where: { tender_id: ctx.tender.id } });
             const dgnData = await ctx.service.stageBillsDgn.getDgnData(ctx.tender.id);
             const importData = await ctx.service.stageImportChange.getImportLid(ctx.stage.id);
             let curStageData;
@@ -275,10 +275,10 @@ module.exports = app => {
         }
         async _getStagePosData(ctx, posColumn) {
             let curStageData;
-            // const posData =  ctx.stage.ledgerHis
-            //     ? await ctx.service.ledger.loadDataFromOss(ctx.tender.id, ctx.stage.ledgerHis.pos_file)
-            //     : await ctx.service.pos.getAllDataByCondition({ columns: posColumn, where: { tid: ctx.tender.id } });
-            const posData = await ctx.service.pos.getAllDataByCondition({ columns: posColumn, where: { tid: ctx.tender.id } });
+            const posData =  ctx.stage.ledgerHis
+                ? await ctx.service.ledger.loadDataFromOss(ctx.tender.id, ctx.stage.ledgerHis.pos_file)
+                : await ctx.service.pos.getAllDataByCondition({ columns: posColumn, where: { tid: ctx.tender.id } });
+            // const posData = await ctx.service.pos.getAllDataByCondition({ columns: posColumn, where: { tid: ctx.tender.id } });
             // 根据当前人,或指定对象查询数据
             if (ctx.stage.readOnly) {
                 curStageData = await ctx.service.stagePos.getAuditorStageData2(ctx.tender.id,