Browse Source

审批退回相关

MaiXinRong 11 months ago
parent
commit
7c52f96974
1 changed files with 4 additions and 2 deletions
  1. 4 2
      app/service/ledger_audit.js

+ 4 - 2
app/service/ledger_audit.js

@@ -611,8 +611,10 @@ module.exports = app => {
                     where: { tender_id: tenderId, times },
                     columns: ['tender_id', 'audit_order', 'audit_id', 'audit_type', 'audit_ledger_id'],
                 });
-                const insertAuditors = orgAuditors.map(x => {
-                    return { ...x, times: times + 1, status: auditConst.status.uncheck };
+                const insertAuditors = [];
+                orgAuditors.forEach(x => {
+                    if (insertAuditors.find(y => { return y.audit_id === x.audit_id && y.audit_type === x.audit_type})) return;
+                    insertAuditors.push({ ...x, times: times + 1, status: auditConst.status.uncheck });
                 });
                 await transaction.insert(this.tableName, insertAuditors);