|  | @@ -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);
 |