Przeglądaj źródła

Merge branch 'master' of http://192.168.1.41:3000/maixinrong/Calculation

laiguoran 5 lat temu
rodzic
commit
b89be9fe87
2 zmienionych plików z 8 dodań i 1 usunięć
  1. 7 0
      app/service/change.js
  2. 1 1
      app/service/report_memory.js

+ 7 - 0
app/service/change.js

@@ -1060,6 +1060,13 @@ module.exports = app => {
             const result = await this.db.queryOne(sql, sqlParam);
             return result.count !== 0;
         }
+
+        async getAllCheckedChanges(tid) {
+            return await this.getAllDataByCondition({
+                where: {tid: tid, status: audit.flow.status.checked},
+                orders: [['in_time', 'desc']]
+            })
+        }
     }
     return Change;
 };

+ 1 - 1
app/service/report_memory.js

@@ -654,7 +654,7 @@ module.exports = app => {
             const self = this;
             try {
                 const decimal = this.ctx.tender.info.decimal, ctx = this.ctx;
-                const change = await this.ctx.service.change.getListByStatus(tid, 3);
+                const change = await this.ctx.service.change.getAllCheckedChanges(tid);
                 for (const c of change) {
                     const types = ctx.helper._.map(c.type.split(','), function (t) {
                         return self._getChangeConstName(changeConst.type, ctx.helper._.toInteger(t));