|
@@ -1517,11 +1517,11 @@ module.exports = app => {
|
|
|
? await ctx.helper.loadLedgerDataFromOss(ctx.stage.ledgerHis.bills_file)
|
|
|
: await ctx.service.ledger.getData(ctx.tender.id);
|
|
|
const bpcData = await ctx.service.stageBillsPc.getAllDataByCondition({ where: { sid: ctx.stage.id } });
|
|
|
- if (bpcData.length > 0) {
|
|
|
- this.ctx.helper.assignRelaData(result.main.ledger, [
|
|
|
- { data: bpcData, fields: ['pc_tp', 'org_price'], prefix: '', relaId: 'lid' },
|
|
|
- ]);
|
|
|
- }
|
|
|
+ const extraData = await ctx.service.ledgerExtra.getData(ctx.tender.id, ['id', 'is_tp']);
|
|
|
+ this.ctx.helper.assignRelaData(result.main.ledger, [
|
|
|
+ { data: bpcData, fields: ['pc_tp', 'org_price'], prefix: '', relaId: 'lid' },
|
|
|
+ { data: extraData, fields: ['is_tp'], prefix: '', relaId: 'id' },
|
|
|
+ ]);
|
|
|
|
|
|
result.main.pos = ctx.stage.ledgerHis
|
|
|
? await ctx.helper.loadLedgerDataFromOss(ctx.stage.ledgerHis.pos_file)
|