|  |  | @ -26,24 +26,32 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="filterOrderList" resultType="com.glxp.api.res.inout.IoOrderDetailResultResponse"> |  |  |  |     <select id="filterOrderList" resultType="com.glxp.api.res.inout.IoOrderDetailResultResponse"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT a2.*, |  |  |  |         SELECT a2.*, | 
			
		
	
		
		
			
				
					
					|  |  |  |                aw.name                                                                  as fromInvName, |  |  |  |                aw.name                                                                  as fromInvName, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               aw2.name                                                                  as fromOutName, | 
			
		
	
		
		
			
				
					
					|  |  |  |                a1.mainAction, |  |  |  |                a1.mainAction, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                a1.confirmTime, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                a1.auditTime, | 
			
		
	
		
		
			
				
					
					|  |  |  |                bu.isStack, |  |  |  |                bu.isStack, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                bu.groupBuy, | 
			
		
	
		
		
			
				
					
					|  |  |  |                GROUP_CONCAT(ioi.invoiceEncode ORDER BY ioi.invoiceEncode SEPARATOR ',') AS invoiceCodes, |  |  |  |                GROUP_CONCAT(ioi.invoiceEncode ORDER BY ioi.invoiceEncode SEPARATOR ',') AS invoiceCodes, | 
			
		
	
		
		
			
				
					
					|  |  |  |                b1.NAME                                                                  AS fromCorpName |  |  |  |                b1.NAME                                                                  AS fromCorpName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 , |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                basic_bussiness_type.name                                                   billTypeName |  |  |  |                basic_bussiness_type.name                                                   billTypeName | 
			
		
	
		
		
			
				
					
					|  |  |  |         FROM io_order_detail_result a2 |  |  |  |         FROM io_order_detail_result a2 | 
			
		
	
		
		
			
				
					
					|  |  |  |                      LEFT JOIN io_order a1 ON a1.billNo = a2.orderIdFk |  |  |  |                      LEFT JOIN io_order a1 ON a1.billNo = a2.orderIdFk | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                      LEFT JOIN io_order a3 ON a3.ullageSupNo = a2.orderIdFk | 
			
		
	
		
		
			
				
					
					|  |  |  |                      LEFT JOIN basic_corp b1 ON b1.erpId = a1.fromCorp |  |  |  |                      LEFT JOIN basic_corp b1 ON b1.erpId = a1.fromCorp | 
			
		
	
		
		
			
				
					
					|  |  |  |                      LEFT JOIN basic_udirel bu ON a2.bindRlFk = bu.id |  |  |  |                      LEFT JOIN basic_udirel bu ON a2.bindRlFk = bu.id | 
			
		
	
		
		
			
				
					
					|  |  |  |                      left join basic_bussiness_type on a1.action = basic_bussiness_type.action |  |  |  |                      left join basic_bussiness_type on a1.action = basic_bussiness_type.action | 
			
		
	
		
		
			
				
					
					|  |  |  |                      LEFT JOIN io_order_invoice ioi ON a1.billNo = ioi.orderIdFk |  |  |  |                      LEFT JOIN io_order_invoice ioi ON a1.billNo = ioi.orderIdFk | 
			
		
	
		
		
			
				
					
					|  |  |  |                      left join auth_warehouse aw on aw.code = a1.fromInvCode |  |  |  |                      left join auth_warehouse aw on aw.code = a1.fromInvCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                      left join auth_warehouse aw2 on aw2.code = a3.fromInvCode | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |             a1.status = 7 |  |  |  |             a1.status = 7 | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="orderIdFk != null and orderIdFk != ''"> |  |  |  |             <if test="orderIdFk != null and orderIdFk != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND a2.orderIdFk = #{orderIdFk} |  |  |  |                 AND a2.orderIdFk = #{orderIdFk} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="groupBuy != null "> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND bu.groupBuy = #{groupBuy} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="keyWords != null and keyWords != ''"> |  |  |  |             <if test="keyWords != null and keyWords != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND (aw.name like concat('%', #{keyWords}, '%') or b1.name like concat('%', #{keyWords}, '%')) |  |  |  |                 AND (aw.name like concat('%', #{keyWords}, '%') or b1.name like concat('%', #{keyWords}, '%')) | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
	
		
		
			
				
					|  |  | @ -71,6 +79,9 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="spec != null and spec != ''"> |  |  |  |             <if test="spec != null and spec != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND a2.spec like concat('%', #{spec}, '%') |  |  |  |                 AND a2.spec like concat('%', #{spec}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="fromOutName != null and fromOutName != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND aw2.name like concat('%', #{fromOutName}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="fromCorp != null and fromCorp != ''"> |  |  |  |             <if test="fromCorp != null and fromCorp != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND a1.fromCorp = #{fromCorp} |  |  |  |                 AND a1.fromCorp = #{fromCorp} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
	
		
		
			
				
					|  |  | 
 |