Selaa lähdekoodia

汇总表,因为分表的相关调整

MaiXinRong 4 vuotta sitten
vanhempi
commit
ea6acd2894
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      app/service/stage_pos.js

+ 2 - 2
app/service/stage_pos.js

@@ -109,7 +109,7 @@ module.exports = app => {
         async getLastestStageData2(tid, sid, where) {
             const filterSql = this._getPosFilterSql(where);
             const sql = 'SELECT id, tid, sid, pid, lid, contract_qty, qc_qty, postil, `times`, `order`, `contract_expr`' +
-                '  FROM ' + this.tableName +
+                '  FROM ' + this.departTableName(tid) +
                 '  WHERE tid = ? And sid = ? ' + filterSql;
             const sqlParam = [tid, sid];
             const stagePos = await this.db.query(sql, sqlParam);
@@ -118,7 +118,7 @@ module.exports = app => {
         async getAuditorStageData2(tid, sid, times, order, where) {
             const filterSql = this._getPosFilterSql(where);
             const sql = 'SELECT id, tid, sid, pid, lid, contract_qty, qc_qty, postil, `times`, `order`, `contract_expr`' +
-                '  FROM ' + this.tableName +
+                '  FROM ' + this.departTableName(tid) +
                 '  WHERE tid = ? And sid = ? And (`times` < ? OR (`times` = ? AND `order` <= ?)) ' + filterSql;
             const sqlParam = [tid, sid, times, times, order];
             const stagePos = await this.db.query(sql, sqlParam);