فهرست منبع

Merge branch 'uat'

MaiXinRong 3 سال پیش
والد
کامیت
9596dceeca
2فایلهای تغییر یافته به همراه9 افزوده شده و 7 حذف شده
  1. 1 1
      app/controller/revise_controller.js
  2. 8 6
      app/controller/stage_controller.js

+ 1 - 1
app/controller/revise_controller.js

@@ -66,7 +66,7 @@ module.exports = app => {
                 if (changeLedgerList.length > 0 || changePosList.length > 0) {
                     // 判断审批中的变更令是否有调用了新增部位,有则无法新增修订,都没有则可新增修订
                     for (const c of changeList) {
-                        const caList = await ctx.service.changeAuditList.getList(c.cid);
+                        const caList = await ctx.service.changeAuditList.getList(c.cid, 0);
                         const gclIdList = ctx.helper._.uniq(ctx.helper._.map(caList, 'gcl_id'));
                         for (const gcl of gclIdList) {
                             if (gcl && (ctx.helper._.findIndex(changeLedgerList, { id: gcl }) !== -1 || ctx.helper._.findIndex(changePosList, { lid: gcl }) !== -1)) {

+ 8 - 6
app/controller/stage_controller.js

@@ -249,9 +249,10 @@ module.exports = app => {
             // const ledgerData = ctx.stage.ledgerHis
             //     ? await ctx.helper.loadLedgerDataFromOss(ctx.stage.ledgerHis.bills_file)
             //     : await ctx.service.ledger.getAllDataByCondition({ 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 = 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;
@@ -277,9 +278,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 =  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 = ctx.service.pos.getAllDataByCondition({ columns: posColumn, where: { tid: ctx.tender.id } });
             // 根据当前人,或指定对象查询数据
             if (ctx.stage.readOnly) {
                 curStageData = await ctx.service.stagePos.getAuditorStageData2(ctx.tender.id,