|
@@ -120,7 +120,10 @@ module.exports = app => {
|
|
|
// 获取待审批的期
|
|
|
const auditStages = await ctx.service.stageAudit.getAuditStageByWap(ctx.session.sessionUser.accountId);
|
|
|
for (const audit of auditStages) {
|
|
|
- await this.ctx.service.stage.checkStageGatherData(audit);
|
|
|
+ if (audit.status !== auditConst.stage.status.uncheck) {
|
|
|
+ const isLastage = await ctx.service.stage.isLastStage(audit.tid, audit.id);
|
|
|
+ if (isLastage) await this.ctx.service.stage.checkStageGatherData(audit);
|
|
|
+ }
|
|
|
audit.gather_tp = ctx.helper.add(audit.contract_tp, audit.qc_tp);
|
|
|
audit.end_contract_tp = ctx.helper.add(audit.contract_tp, audit.pre_contract_tp);
|
|
|
audit.end_qc_tp = ctx.helper.add(audit.qc_tp, audit.pre_qc_tp);
|