|
@@ -48,9 +48,13 @@ module.exports = app => {
|
|
|
}
|
|
|
if (t.ledger_status === auditConst.ledger.status.checked) {
|
|
|
t.lastStage = await this.ctx.service.stage.getLastestStage(t.id, true);
|
|
|
- if (t.lastStage) {
|
|
|
- await this.ctx.service.stage.checkStageGatherData(t.lastStage);
|
|
|
- }
|
|
|
+
|
|
|
+ if (!t.lastStage) continue;
|
|
|
+ if (t.lastStage.status === auditConst.stage.status.uncheck && t.lastStage.user_id !== this.ctx.session.sessionUser.accountId)
|
|
|
+ t.lastStage = await this.ctx.service.stage.getLastestStage(t.id);
|
|
|
+
|
|
|
+ if (!t.lastStage) continue;
|
|
|
+ await this.ctx.service.stage.checkStageGatherData(t.lastStage);
|
|
|
}
|
|
|
}
|
|
|
const categoryData = await this.ctx.service.category.getAllCategory(this.ctx.session.sessionProject.id);
|
|
@@ -112,6 +116,7 @@ module.exports = app => {
|
|
|
renderData.pid = this.ctx.session.sessionProject.id;
|
|
|
await this.layout(view, renderData, modal);
|
|
|
} catch (err) {
|
|
|
+ console.log('error', err);
|
|
|
this.log(err);
|
|
|
this.ctx.redirect('/dashboard')
|
|
|
}
|