|  | @@ -222,6 +222,17 @@ module.exports = app => {
 | 
	
		
			
				|  |  |              result.great = helper.sum(helper._.map(bqData.filter(x => {return x.quality === changeConst.quality.great.value; }), 'tp'));
 | 
	
		
			
				|  |  |              return result;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        async getFinalData(tid) {
 | 
	
		
			
				|  |  | +            const sql = 'SELECT scf.*, ' +
 | 
	
		
			
				|  |  | +                '    oc.p_code As c_code, oc.new_code As c_new_code, oc.quality, ocb.code as b_code, ocb.name, ocb.unit' +
 | 
	
		
			
				|  |  | +                '  FROM ' + this.tableName + ' scf ' +
 | 
	
		
			
				|  |  | +                '  LEFT JOIN ' + this.ctx.service.stage.tableName + ' s ON scf.sid = s.id' +
 | 
	
		
			
				|  |  | +                '  LEFT JOIN ' + this.ctx.service.change.tableName + ' oc ON scf.rela_cid = oc.cid ' +
 | 
	
		
			
				|  |  | +                '  LEFT JOIN ' + this.ctx.service.changeAuditList.tableName + ' ocb ON scf.rela_cbid = ocb.id ' +
 | 
	
		
			
				|  |  | +                '  WHERE scf.tid = ?';
 | 
	
		
			
				|  |  | +            return await this.db.query(sql, [tid]);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      return StageImportChange;
 |