|
@@ -1270,7 +1270,7 @@ module.exports = app => {
|
|
|
return auditor;
|
|
|
}
|
|
|
|
|
|
- async saveAudit(cid, times, data) {
|
|
|
+ async saveAudit(cid, times, sp_group, data) {
|
|
|
const transaction = await this.db.beginTransaction();
|
|
|
try {
|
|
|
const auditors = await this.getAuditGroupByList(cid, times);
|
|
@@ -1349,7 +1349,7 @@ module.exports = app => {
|
|
|
newAuditors.shift();
|
|
|
const newAuditorGroup = this.ctx.helper.groupAuditors(newAuditors, 'usort');
|
|
|
const uniqNewAuditorGroup = this.ctx.helper.groupAuditorsUniq(newAuditorGroup);
|
|
|
- await this.ctx.service.shenpiAudit.updateAuditListWithAuditType(transaction, this.ctx.tender.id, this.ctx.tender.info.shenpi.change, shenpiConst.sp_type.change, uniqNewAuditorGroup);
|
|
|
+ await this.ctx.service.shenpiAudit.updateAuditListWithAuditType(transaction, this.ctx.tender.id, this.ctx.tender.info.shenpi.change, shenpiConst.sp_type.change, uniqNewAuditorGroup, sp_group);
|
|
|
} else if (this.ctx.tender.info.shenpi.change === shenpiConst.sp_status.gdzs) {
|
|
|
const newAuditors = await this.getListGroupByWithoutYB(cid, times, transaction);
|
|
|
await this.ctx.service.shenpiAudit.updateAuditList(transaction, this.ctx.tender.id, this.ctx.tender.info.shenpi.change, shenpiConst.sp_type.change, this._.map(newAuditors, 'uid'));
|
|
@@ -1357,6 +1357,7 @@ module.exports = app => {
|
|
|
// 更新到审批流程方法
|
|
|
await transaction.commit();
|
|
|
} catch (err) {
|
|
|
+ console.log(err);
|
|
|
await transaction.rollback();
|
|
|
throw err;
|
|
|
}
|