|
@@ -202,15 +202,14 @@ 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, audit_order: 1, status: auditConst.stage.status.checking});
|
|
|
+ const cur_flow_info = await this.ctx.service.projectAccount.getAccountCacheDatas(auditIds,
|
|
|
+ {order: stage.order, audit_type: auditors[0].audit_type, 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);
|
|
|
}
|
|
|
|
|
|
async updateStageCache4Flow(transaction, stage, status, auditors, preAuditors, ledgerTp, stageTp, pcTp) {
|
|
|
- console.log(preAuditors);
|
|
|
- console.log(auditors);
|
|
|
const orgCache = await this.getDataById(stage.tid);
|
|
|
const data = { id: stage.tid, stage_status: status };
|
|
|
if (ledgerTp) data.ledger_tp = JSON.stringify(ledgerTp);
|
|
@@ -220,7 +219,8 @@ module.exports = app => {
|
|
|
if (preAuditors && preAuditors.length > 0) {
|
|
|
const preAuditorIds = preAuditors.map(x => { return x.aid; });
|
|
|
data.stage_flow_pre_uid = preAuditorIds.join(',');
|
|
|
- const info = await this.ctx.service.projectAccount.getAccountCacheDatas(preAuditorIds, { order: stage.order, status: preAuditors[0].status, audit_order: preAuditors[0].audit_order, time: new Date() });
|
|
|
+ const info = await this.ctx.service.projectAccount.getAccountCacheDatas(preAuditorIds,
|
|
|
+ { order: stage.order, status: preAuditors[0].status, audit_type:preAuditors[0].audit_type, audit_order: preAuditors[0].audit_order, time: new Date() });
|
|
|
data.stage_flow_pre_info = JSON.stringify(info);
|
|
|
} else {
|
|
|
data.stage_flow_pre_uid = orgCache.stage_flow_cur_uid;
|
|
@@ -231,7 +231,7 @@ module.exports = app => {
|
|
|
if (auditors && auditors.length > 0) {
|
|
|
const auditorIds = auditors.map(x => { return x.aid; });
|
|
|
data.stage_flow_cur_uid = auditorIds.join(',');
|
|
|
- const info = await this.ctx.service.projectAccount.getAccountCacheDatas(auditorIds, { order: stage.order, status, audit_order: auditors[0].audit_order });
|
|
|
+ const info = await this.ctx.service.projectAccount.getAccountCacheDatas(auditorIds, { order: stage.order, audit_type: auditors[0].audit_type, status, audit_order: auditors[0].audit_order });
|
|
|
data.stage_flow_cur_info = JSON.stringify(info);
|
|
|
}
|
|
|
if (status === auditConst.stage.status.checked && (!auditors || auditors.length === 0)) data.stage_complete_count = stage.order;
|