|
@@ -202,7 +202,7 @@ module.exports = app => {
|
|
|
|
|
|
const auditIds = auditors.map(x => { return x.aid; });
|
|
|
data.stage_flow_cur_uid = auditIds.join(',');
|
|
|
- const cur_flow_info = await this.ctx.service.projectAccount.getAccountCacheDatas(auditIds, {order: stage.order, status: auditConst.stage.status.checking});
|
|
|
+ const cur_flow_info = await this.ctx.service.projectAccount.getAccountCacheDatas(auditIds, {order: stage.order, audit_order: 1, status: auditConst.stage.status.checking});
|
|
|
data.stage_flow_cur_info = JSON.stringify(cur_flow_info);
|
|
|
data.stage_flow_cur_tp = JSON.stringify(tp);
|
|
|
await transaction.update(this.tableName, data);
|
|
@@ -431,17 +431,17 @@ module.exports = app => {
|
|
|
name: curAuditor.name, company: curAuditor.company, role: curAuditor.role, mobile: curAuditor.mobile, telephone: curAuditor.telephone,
|
|
|
}}));
|
|
|
data.stage_flow_cur_tp = JSON.stringify(tp);
|
|
|
- const preAuditors = lastStage.curOrder > 1 ? await this.ctx.service.stageAudit.getAuditorsByOrder(lastStage.id, lastStage.times, lastStage.curOrder - 1) : null;
|
|
|
+ const preAuditors = lastStage.curOrder > 1 ? await this.ctx.service.stageAudit.getAuditorsByOrder(lastStage.id, lastStage.times, lastStage.curOrder - 1) : [];
|
|
|
if (preAuditors.length > 0) {
|
|
|
const preAuditorIds = preAuditors.map(x => { return x.aid; });
|
|
|
data.stage_flow_pre_uid = preAuditorIds.join(',');
|
|
|
data.stage_flow_pre_info = JSON.stringify(preAuditors.map(preAuditor => { return {
|
|
|
- order: lastStage.order, audit_order: preAuditor.order, status: preAuditor.status, time: preAuditor.end_time,
|
|
|
+ order: lastStage.order, audit_order: preAuditor.audit_order, status: preAuditor.status, time: preAuditor.end_time,
|
|
|
name: preAuditor.name, company: preAuditor.company, role: preAuditor.role, mobile: preAuditor.mobile, telephone: preAuditor.telephone,
|
|
|
}}));
|
|
|
} else {
|
|
|
data.stage_flow_pre_uid = lastStage.user_id;
|
|
|
- const preInfo = await this.ctx.service.projectAccount.getAccountCacheData(lastStage.user_id, { order: 0, status: auditConst.stage.status.uncheck, time: curAuditor.begin_time });
|
|
|
+ const preInfo = await this.ctx.service.projectAccount.getAccountCacheData(lastStage.user_id, { order: 0, status: auditConst.stage.status.uncheck, time: curAuditors[0].begin_time });
|
|
|
data.stage_flow_pre_info = JSON.stringify(preInfo);
|
|
|
}
|
|
|
const his = preAuditors.length > 0
|