|
@@ -1004,7 +1004,10 @@ module.exports = app => {
|
|
|
cache_time_r: this.ctx.stage.cache_time_l,
|
|
|
status: times === 1 ? auditConst.status.uncheck : auditConst.status.checkNo,
|
|
|
});
|
|
|
- await this.ctx.service.tenderCache.updateStageCache4Flow(transaction, this.ctx.stage, times === 1 ? auditConst.status.uncheck : auditConst.status.checkNo, { id: this.ctx.stage.user_id }, { id: this.ctx.stage.user_id }, ledgerTp, stageTp);
|
|
|
+ const preFlow = times > 1 ? await this.getLastestAuditor(stageId, times, auditConst.status.checkNo): null;
|
|
|
+ const curFlow = { aid: this.ctx.stage.user_id, order: 1, status: auditConst.status.uncheck};
|
|
|
+ await this.ctx.service.tenderCache.updateStageCache4Flow(transaction, this.ctx.stage, times === 1 ? auditConst.status.uncheck : auditConst.status.checkNo,
|
|
|
+ curFlow, preFlow, ledgerTp, stageTp);
|
|
|
// 计算该审批人最终数据
|
|
|
await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
// 复制一份最新数据给下一人
|
|
@@ -1077,7 +1080,7 @@ module.exports = app => {
|
|
|
tp_history: JSON.stringify(this.ctx.stage.tp_history),
|
|
|
cache_time_r: this.ctx.stage.cache_time_l,
|
|
|
});
|
|
|
- await this.ctx.service.tenderCache.updateStageCache4Flow(transaction, this.ctx.stage.status, preAudit, preAudit, ledgerTp, stageTp);
|
|
|
+ await this.ctx.service.tenderCache.updateStageCache4Flow(transaction, this.ctx.stage, this.ctx.stage.status, newAuditors[1], newAuditors[0], ledgerTp, stageTp);
|
|
|
|
|
|
// 计算该审批人最终数据
|
|
|
await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
@@ -1143,7 +1146,8 @@ module.exports = app => {
|
|
|
tp_history: JSON.stringify(this.ctx.stage.tp_history),
|
|
|
cache_time_r: this.ctx.stage.cache_time_l,
|
|
|
});
|
|
|
- await this.ctx.service.tenderCache.updateStageCache4Flow(transaction, this.ctx.stage.status, preAudit, preAudit, ledgerTp, stageTp);
|
|
|
+ const cur = {tid: curAudit.tid, sid: curAudit.sid, aid: preAudit.aid, times: curAudit.times, order: curAudit.order + 1, status: auditConst.status.checking};
|
|
|
+ await this.ctx.service.tenderCache.updateStageCache4Flow(transaction, this.ctx.stage, this.ctx.stage.status, cur, newAuditors[0], ledgerTp, stageTp);
|
|
|
|
|
|
// 计算该审批人最终数据
|
|
|
await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
@@ -1215,7 +1219,7 @@ module.exports = app => {
|
|
|
cache_time_r: this.ctx.stage.cache_time_l,
|
|
|
status: auditConst.status.checking,
|
|
|
});
|
|
|
- await this.ctx.service.tenderCache.updateStageCache4Flow(transaction, this.ctx.stage.status, curAudit, curAudit, ledgerTp, stageTp);
|
|
|
+ await this.ctx.service.tenderCache.updateStageCache4Flow(transaction, this.ctx.stage, auditConst.status.checking, newAuditors[1], newAuditors[0], ledgerTp, stageTp);
|
|
|
// 计算该审批人最终数据
|
|
|
await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
// 复制一份最新数据给下一人
|