|
@@ -125,12 +125,9 @@ module.exports = app => {
|
|
|
async _getLedgerService() {
|
|
|
try {
|
|
|
if (this.ctx.tender.data.ledger_status === auditConst.ledger.status.checked) {
|
|
|
- const stageCount = await this.ctx.service.stage.count({tid: this.ctx.tender.id});
|
|
|
- if (stageCount === 0) {
|
|
|
- const revise = await this.ctx.service.ledgerRevise.getLastestRevise(this.ctx.tender.id);
|
|
|
- if (revise.status === auditConst.revise.status.uncheck || revise.status === auditConst.revise.status.checkNo) {
|
|
|
- return [this.ctx.service.reviseBills, this.ctx.service.revisePos];
|
|
|
- }
|
|
|
+ const revise = await this.ctx.service.ledgerRevise.getLastestRevise(this.ctx.tender.id);
|
|
|
+ if (revise.status === auditConst.revise.status.uncheck || revise.status === auditConst.revise.status.checkNo) {
|
|
|
+ return [this.ctx.service.reviseBills, this.ctx.service.revisePos];
|
|
|
}
|
|
|
} else {
|
|
|
return [this.ctx.service.ledger, this.ctx.service.pos];
|