Browse Source

修复变更清单修订丢失bug

ellisran 2 years ago
parent
commit
3c4d7f1441
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/service/change_audit_list.js

+ 3 - 1
app/service/change_audit_list.js

@@ -324,7 +324,9 @@ module.exports = app => {
                         const newList = await transaction.query(sql2, sqlParam2);
                         // const newList = await transaction.select(this.tableName, { where: { cid: this.ctx.change.cid } });
                         for (const used of usedList) {
-                            const newone = this._.find(newList, { lid: used.lid, gcl_id: used.gcl_id, bwmx: used.bwmx, mx_id: used.mx_id });
+                            const findFilter = { lid: used.lid, gcl_id: used.gcl_id, bwmx: used.bwmx };
+                            if (used.mx_id) findFilter.mx_id = used.mx_id;
+                            const newone = this._.find(newList, findFilter);
                             if (newone) {
                                 updateList.push({
                                     row: {