|  |  |  | @ -35,21 +35,23 @@ | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="selectBusTypePreResList" resultType="com.glxp.api.res.basic.BasicBusTypePreResponse"> | 
			
		
	
		
			
				
					|  |  |  |  |         SELECT basic_bustype_pre.*, | 
			
		
	
		
			
				
					|  |  |  |  |                awA.name                                                                              defaultInvName, | 
			
		
	
		
			
				
					|  |  |  |  |                awB.name                                                                              invName, | 
			
		
	
		
			
				
					|  |  |  |  |                (select name from basic_bussiness_type where action = basic_bustype_pre.originAction) originName, | 
			
		
	
		
			
				
					|  |  |  |  |                (select name | 
			
		
	
		
			
				
					|  |  |  |  |                 from basic_bussiness_type | 
			
		
	
		
			
				
					|  |  |  |  |                 where basic_bussiness_type.action = basic_bustype_pre.action)                        targetName, | 
			
		
	
		
			
				
					|  |  |  |  |                (select basic_bustype_change.originName | 
			
		
	
		
			
				
					|  |  |  |  |                 from basic_bustype_change | 
			
		
	
		
			
				
					|  |  |  |  |                 where basic_bustype_change.originAction = basic_bustype_pre.targetBusAction)         targetBusName | 
			
		
	
		
			
				
					|  |  |  |  |         FROM basic_bustype_pre | 
			
		
	
		
			
				
					|  |  |  |  |                      left JOIN auth_warehouse awA on basic_bustype_pre.defaultInvCode = awA.code | 
			
		
	
		
			
				
					|  |  |  |  |                      left JOIN auth_warehouse awB on basic_bustype_pre.invCode = awB.code | 
			
		
	
		
			
				
					|  |  |  |  |                      left JOIN basic_bussiness_type busTypeA on basic_bustype_pre.originAction = busTypeA.action | 
			
		
	
		
			
				
					|  |  |  |  |                      left join basic_bussiness_type busTypeB on basic_bustype_pre.action = busTypeB.action | 
			
		
	
		
			
				
					|  |  |  |  |         SELECT bbp.*, | 
			
		
	
		
			
				
					|  |  |  |  |                awA.name        AS defaultInvName, | 
			
		
	
		
			
				
					|  |  |  |  |                awB.name        AS invName, | 
			
		
	
		
			
				
					|  |  |  |  |                bbt_origin.name AS originName, | 
			
		
	
		
			
				
					|  |  |  |  |                bbt_target.name AS targetName, | 
			
		
	
		
			
				
					|  |  |  |  |                bbc.originName  AS targetBusName | 
			
		
	
		
			
				
					|  |  |  |  |         FROM basic_bustype_pre bbp | 
			
		
	
		
			
				
					|  |  |  |  |                      LEFT JOIN | 
			
		
	
		
			
				
					|  |  |  |  |                      auth_warehouse awA ON bbp.defaultInvCode = awA.code | 
			
		
	
		
			
				
					|  |  |  |  |                      LEFT JOIN | 
			
		
	
		
			
				
					|  |  |  |  |                      auth_warehouse awB ON bbp.invCode = awB.code | 
			
		
	
		
			
				
					|  |  |  |  |                      LEFT JOIN | 
			
		
	
		
			
				
					|  |  |  |  |                      basic_bussiness_type bbt_origin ON bbp.originAction = bbt_origin.action | 
			
		
	
		
			
				
					|  |  |  |  |                      LEFT JOIN | 
			
		
	
		
			
				
					|  |  |  |  |                      basic_bussiness_type bbt_target ON bbp.action = bbt_target.action | 
			
		
	
		
			
				
					|  |  |  |  |                      LEFT JOIN | 
			
		
	
		
			
				
					|  |  |  |  |                      basic_bustype_change bbc ON bbc.originAction = bbp.targetBusAction | 
			
		
	
		
			
				
					|  |  |  |  |         <where> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="action != ''and action != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND basic_bustype_pre.`action` = #{action} | 
			
		
	
	
		
			
				
					|  |  |  | 
 |