Explorar el Código

修复变更清单修订丢失bug

ellisran hace 2 años
padre
commit
3c4d7f1441
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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: {