|
@@ -66,12 +66,13 @@ module.exports = app => {
|
|
|
if (result.length > 0) {
|
|
|
for (const r of result) {
|
|
|
const t = await this.ctx.service.tender.getDataById(r.tid);
|
|
|
- const s = r.sid ? await this.ctx.service.stage.getDataById(r.sid) : await this.ctx.service.stage.getLastestStage(r.tid);
|
|
|
+ const s = await this.ctx.service.stage.getLastestStage(r.tid);
|
|
|
+ // const s = r.sid && r.sid === lasts.id ? lasts : await this.ctx.service.stage.getDataById(r.sid);
|
|
|
if (s) {
|
|
|
r.tender_name = t.name;
|
|
|
r.sstatus = s.status;
|
|
|
r.sorder = s.order;
|
|
|
- if (r.times && r.times === s.times && r.confirm === 1) continue;
|
|
|
+ if (r.sid && r.sid === s.id && r.times && r.times === s.times && r.confirm === 1) continue;
|
|
|
if (s && s.status === auditConst.stage.status.checkNo && s.user_id === r.user_id) {
|
|
|
const lastAudit = await this.ctx.service.stageAudit.getLastestAuditor(s.id, s.times - 1, auditConst.stage.status.checkNo);
|
|
|
r.begin_time = lastAudit ? lastAudit.end_time : s.in_time;
|