|
@@ -242,6 +242,7 @@ module.exports = app => {
|
|
|
if (this.ctx.session.sessionProject.gxby) this.posExtraColumn.push('gxby_status', 'gxby_url', 'gxby_limit');
|
|
|
if (this.ctx.session.sessionProject.dagl) this.posExtraColumn.push('dagl_status', 'dagl_url', 'dagl_limit');
|
|
|
|
|
|
+ if (!sjsRela) return;
|
|
|
for (const field of sjsRela.ledgerCol) {
|
|
|
if (field.show) {
|
|
|
this.ledgerColumn.push(field.field);
|
|
@@ -252,9 +253,8 @@ module.exports = app => {
|
|
|
|
|
|
async _getStageLedgerData(ctx) {
|
|
|
const ledgerData = ctx.stage.ledgerHis
|
|
|
- ? await ctx.service.ledger.loadDataFromOss(ctx.tender.id, ctx.stage.ledgerHis.bills_file)
|
|
|
+ ? await ctx.helper.loadLedgerDataFromOss(ctx.stage.ledgerHis.bills_file)
|
|
|
: await ctx.service.ledger.getAllDataByCondition({ columns: this.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 extraData = await ctx.service.ledgerExtra.getData(ctx.tender.id, this.ledgerExtraColumn);
|
|
|
const importData = await ctx.service.stageImportChange.getImportLid(ctx.stage.id);
|
|
@@ -398,6 +398,7 @@ module.exports = app => {
|
|
|
|
|
|
async check(ctx) {
|
|
|
try {
|
|
|
+ this._getLedgerColumn();
|
|
|
const ledgerData = await this._getStageLedgerData(ctx);
|
|
|
const posData = await this._getStagePosData(ctx);
|
|
|
|
|
@@ -1414,6 +1415,7 @@ module.exports = app => {
|
|
|
|
|
|
async loadBwtz(ctx) {
|
|
|
try {
|
|
|
+ this._getLedgerColumn();
|
|
|
const data = ctx.request.body.data ? JSON.parse(ctx.request.body.data) : {};
|
|
|
const ledgerData = await this._getStageLedgerData(ctx);
|
|
|
const posData = await this._getStagePosData(ctx);
|