|  |  | @ -3,17 +3,17 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | <mapper namespace="com.glxp.api.dao.inout.IoOrderDao"> |  |  |  | <mapper namespace="com.glxp.api.dao.inout.IoOrderDao"> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="filterList" resultType="com.glxp.api.res.inout.IoOrderResponse"> |  |  |  |     <select id="filterList" resultType="com.glxp.api.res.inout.IoOrderResponse"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         select io.*, |  |  |  |         select io.*, | 
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from basic_bussiness_type bus where bus.action = io.action) billTypeName, |  |  |  |         (select name from basic_bussiness_type bus where bus.action = io.action) billTypeName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from auth_dept ad where ad.code = io.deptCode)              deptName, |  |  |  |         (select name from auth_dept ad where ad.code = io.deptCode)              deptName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from auth_warehouse aw where aw.code = io.invCode)          invName, |  |  |  |         (select name from auth_warehouse aw where aw.code = io.invCode)          invName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select employeeName from auth_user au where au.id = io.createUser)      createUserName, |  |  |  |         (select employeeName from auth_user au where au.id = io.createUser)      createUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select employeeName from auth_user au2 where au2.id = io.updateUser)    updateUserName, |  |  |  |         (select employeeName from auth_user au2 where au2.id = io.updateUser)    updateUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select employeeName from auth_user au3 where au3.id = io.reviewUser)    reviewUserName, |  |  |  |         (select employeeName from auth_user au3 where au3.id = io.reviewUser)    reviewUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select employeeName from auth_user au4 where au4.id = io.checkUser)     checkUserName, |  |  |  |         (select employeeName from auth_user au4 where au4.id = io.checkUser)     checkUserName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from auth_dept ad2 where ad2.code = io.fromDeptCode)        fromDeptName, |  |  |  |         (select name from auth_dept ad2 where ad2.code = io.fromDeptCode)        fromDeptName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from auth_warehouse aw2 where aw2.code = io.fromInvCode)    fromInvName, |  |  |  |         (select name from auth_warehouse aw2 where aw2.code = io.fromInvCode)    fromInvName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from basic_corp bc where bc.erpId = io.fromCorp)            fromCorpName, |  |  |  |         (select name from basic_corp bc where bc.erpId = io.fromCorp)            fromCorpName, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                (select name from basic_corp bc where bc.erpId = io.customerId)          customerName |  |  |  |         (select name from basic_corp bc where bc.erpId = io.customerId)          customerName | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         from io_order as io |  |  |  |         from io_order as io | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="id != null and id != ''"> |  |  |  |             <if test="id != null and id != ''"> | 
			
		
	
	
		
		
			
				
					|  |  | @ -21,7 +21,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="corpName != null and corpName != ''"> |  |  |  |             <if test="corpName != null and corpName != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like |  |  |  |                 AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like | 
			
		
	
		
		
			
				
					
					|  |  |  |                     concat('%', #{corpName}, '%') |  |  |  |                 concat('%', #{corpName}, '%') | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="action != null and action != ''"> |  |  |  |             <if test="action != null and action != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND action = #{action} |  |  |  |                 AND action = #{action} | 
			
		
	
	
		
		
			
				
					|  |  | @ -109,12 +109,12 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 <if test="invoiceActions1 == null and invoiceActions2 != null"> |  |  |  |                 <if test="invoiceActions1 == null and invoiceActions2 != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                     and ( |  |  |  |                     and ( | 
			
		
	
		
		
			
				
					
					|  |  |  |                             `action` in |  |  |  |                     `action` in | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     <foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=","> |  |  |  |                     <foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |                         #{item} |  |  |  |                         #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |                     </foreach> |  |  |  |                     </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |                     and status = 7 |  |  |  |                     and status = 7 | 
			
		
	
		
		
			
				
					
					|  |  |  |                             ) |  |  |  |                     ) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 </if> |  |  |  |                 </if> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 <if test="invoiceActions1 != null and invoiceActions2 != null"> |  |  |  |                 <if test="invoiceActions1 != null and invoiceActions2 != null"> | 
			
		
	
	
		
		
			
				
					|  |  | @ -123,13 +123,13 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                         #{item} |  |  |  |                         #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |                     </foreach> |  |  |  |                     </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |                     and status = 10) |  |  |  |                     and status = 10) | 
			
		
	
		
		
			
				
					
					|  |  |  |                             or ( |  |  |  |                     or ( | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             `action` in |  |  |  |                     `action` in | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     <foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=","> |  |  |  |                     <foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |                         #{item} |  |  |  |                         #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |                     </foreach> |  |  |  |                     </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |                     and status = 7) |  |  |  |                     and status = 7) | 
			
		
	
		
		
			
				
					
					|  |  |  |                             ) |  |  |  |                     ) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 </if> |  |  |  |                 </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
	
		
		
			
				
					|  |  | @ -274,12 +274,12 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                 </if> |  |  |  |                 </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  |         order by createTime desc |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="filterOrderList" resultType="com.glxp.api.entity.inout.IoOrderEntity"> |  |  |  |     <select id="filterOrderList" resultType="com.glxp.api.entity.inout.IoOrderEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         select * |  |  |  |         select * | 
			
		
	
		
		
			
				
					
					|  |  |  |         from io_order |  |  |  |         from io_order | 
			
		
	
	
		
		
			
				
					|  |  | @ -330,7 +330,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                 ]]> |  |  |  |                 ]]> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  |         order by createTime desc |  |  |  | 
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -407,4 +407,157 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         from io_order |  |  |  |         from io_order | 
			
		
	
		
		
			
				
					
					|  |  |  |         where billNo = #{billNo} |  |  |  |         where billNo = #{billNo} | 
			
		
	
		
		
			
				
					
					|  |  |  |     </select> |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     <select id="getfilterOrderList" resultType="com.glxp.api.res.inout.IoOrderResponse"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         SELECT | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         io.*, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         bus.NAME AS billTypeName, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ad.NAME AS deptName, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         aw.NAME AS invName, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         bc.NAME AS fromCorpName, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         COUNT(IF(dc.regStatus = 1, 1, NULL)) AS allCout, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         COUNT(IF(dc.regStatus = 0, 1, NULL)) AS partCount | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         FROM | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         io_order io | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN basic_bussiness_type bus ON io.action = bus.action | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN auth_dept ad ON io.deptCode = ad.CODE | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN auth_warehouse aw ON io.invCode = aw.CODE | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN basic_corp bc ON io.fromCorp = bc.erpId | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         LEFT JOIN io_order_detail_code dc ON io.billNo = dc.orderIdFk | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="id != null and id != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.id = #{id} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="corpName != null and corpName != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 concat('%', #{corpName}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="action != null and action != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.action = #{action} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="mainAction != null and mainAction != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.mainAction = #{mainAction} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="billNo != null and billNo != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.billNo like concat('%', #{billNo}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="corpOrderId != null and corpOrderId != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.corpOrderId = #{corpOrderId} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="fromCorp != null and fromCorp != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.fromCorp = #{fromCorp} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="deptCode != null and deptCode != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.deptCode = #{deptCode} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="invCode != null and invCode != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.invCode = #{invCode} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="busType != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.busType = #{busType} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="inCodeStatus != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.inCodeStatus = #{inCodeStatus} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="relKey != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.relKey = #{relKey} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND date_format(io.createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="startAduditTime != null and startAduditTime != '' and endAduditTime != null and endAduditTime != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND date_format(io.auditTime, '%Y-%m-%d') between date_format(#{startAduditTime}, '%Y-%m-%d') and date_format(#{endAduditTime}, '%Y-%m-%d') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="actions != null and actions.size() != 0"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.`action` in | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <foreach collection="actions" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="sourceTypes != null and sourceTypes.size() != 0"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.fromType in | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <foreach collection="sourceTypes" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="statuses != null and statuses.size() != 0"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.status in | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <foreach collection="statuses" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="dealStatuses != null and dealStatuses.size() != 0"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.dealStatus in | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <foreach collection="dealStatuses" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="orderIds != null and orderIds.size() != 0"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.billNo in | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <foreach collection="orderIds" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="status != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.status = #{status} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="orderType != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 AND io.orderType = #{orderType} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="supInoivceSearch != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <if test="invoiceActions1 != null and invoiceActions2 == null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     AND (io.`action` in | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     <foreach collection="invoiceActions1" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     and io.status = 10) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <if test="invoiceActions1 == null and invoiceActions2 != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     and ( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     io.`action` in | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     <foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     and io.status = 7 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <if test="invoiceActions1 != null and invoiceActions2 != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     AND ((io.`action` in | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     <foreach collection="invoiceActions1" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     and io.status = 10) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     or ( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     io.`action` in | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     <foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         #{item} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     and io.status = 7) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         GROUP BY io.id | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <choose> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <when test="(orderBy!=null ) and (sort=='desc' or sort=='asc')"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 order by ${orderBy}   ${sort} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </when> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <otherwise> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 order by updateTime desc | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </otherwise> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         </choose> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     </select> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | </mapper> |  |  |  | </mapper> | 
			
		
	
	
		
		
			
				
					|  |  | 
 |