|  |  |  | @ -3,14 +3,30 @@ | 
			
		
	
		
			
				
					|  |  |  |  | <mapper namespace="com.glxp.api.dao.collect.IoCollectOrderMapper"> | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="filterList" parameterType="com.glxp.api.req.collect.CollectOrderRequest" | 
			
		
	
		
			
				
					|  |  |  |  |             resultType="com.glxp.api.res.collect.IoCollectOrderResponse"> | 
			
		
	
		
			
				
					|  |  |  |  |         SELECT | 
			
		
	
		
			
				
					|  |  |  |  |         ico.billNo,ico.busType,ico.fromType,ico.fromTypeDesc,ico.fromCorp,ico.billTime,ico.orderCirType, | 
			
		
	
		
			
				
					|  |  |  |  |         ico.createTime,ico.workPlaceCode,ico.remark,ico.createUser,ico.updateTime,ico.updateUser,ico.tagStatus,ico.splitStatus,ico.splitMsg | 
			
		
	
		
			
				
					|  |  |  |  |         ,ico.tagMsg, | 
			
		
	
		
			
				
					|  |  |  |  |         SELECT ico.billNo, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.busType, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.fromType, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.fromTypeDesc, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.fromCorp, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.billTime, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.orderCirType, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.createTime, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.workPlaceCode, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.remark, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.createUser, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.updateTime, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.updateUser, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.tagStatus, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.splitStatus, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.splitMsg | 
			
		
	
		
			
				
					|  |  |  |  |                 , | 
			
		
	
		
			
				
					|  |  |  |  |                ico.tagMsg, | 
			
		
	
		
			
				
					|  |  |  |  |                sys_workplace_document.busName                       busTypeName, | 
			
		
	
		
			
				
					|  |  |  |  |                bc.name                                              fromCorpName, | 
			
		
	
		
			
				
					|  |  |  |  |                sw.workplaceId                                       workPlaceCode, | 
			
		
	
		
			
				
					|  |  |  |  |         sw.workplaceName,ico.id,ico.orderTime, | 
			
		
	
		
			
				
					|  |  |  |  |                sw.workplaceName, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.id, | 
			
		
	
		
			
				
					|  |  |  |  |                ico.orderTime, | 
			
		
	
		
			
				
					|  |  |  |  |                row_number() over ( order by ico.orderTime desc ) as orderSequence | 
			
		
	
		
			
				
					|  |  |  |  |         FROM io_collect_order ico | 
			
		
	
		
			
				
					|  |  |  |  |                  left join sys_workplace_document on ico.busType = sys_workplace_document.documentTypeCode | 
			
		
	
	
		
			
				
					|  |  |  | @ -26,9 +42,6 @@ | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="busType != null and busType != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND busType = #{busType} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="fromType != null and fromType != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND sys_workplace_document.fromType LIKE concat('%', #{fromType}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="fromCorp != '' and fromCorp != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND fromCorp LIKE concat('%', #{fromCorp}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
	
		
			
				
					|  |  |  | @ -48,17 +61,16 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                 AND sw.chargeUser = #{chargeUser} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="unionKey != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND | 
			
		
	
		
			
				
					|  |  |  |  |                 ( | 
			
		
	
		
			
				
					|  |  |  |  |                 ico.unionKey like concat('%', #{billNo}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                 or ico.unionKey like concat('%', #{fromCorp}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                 or ico.unionKey like concat('%', #{fromCorpName}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                 or ico.unionKey like concat('%', #{backupOrderRemark1}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                 or ico.unionKey like concat('%', #{backupOrderRemark2}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                 or ico.unionKey like concat('%', #{backupOrderRemark3}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                 or ico.unionKey like concat('%', #{backupOrderRemark4}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                 or ico.unionKey like concat('%', #{backupOrderRemark5}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                 or ico.unionKey like concat('%', #{backupOrderRemark6}, '%')) | 
			
		
	
		
			
				
					|  |  |  |  |                 AND ( | 
			
		
	
		
			
				
					|  |  |  |  |                         ico.billNo like concat('%', #{unionKey}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                         or ico.fromCorp like concat('%', #{unionKey}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                         or ico.fromCorpName like concat('%', #{unionKey}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                         or ico.backupOrderRemark1 like concat('%', #{unionKey}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                         or ico.backupOrderRemark2 like concat('%', #{unionKey}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                         or ico.backupOrderRemark3 like concat('%', #{unionKey}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                         or ico.backupOrderRemark4 like concat('%', #{unionKey}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                         or ico.backupOrderRemark5 like concat('%', #{unionKey}, '%') | 
			
		
	
		
			
				
					|  |  |  |  |                         or ico.backupOrderRemark6 like concat('%', #{unionKey}, '%')) | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -81,6 +93,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | -- 清除拆零,原始单据等 | 
			
		
	
		
			
				
					|  |  |  |  |         TRUNCATE io_collect_code; | 
			
		
	
		
			
				
					|  |  |  |  |         TRUNCATE io_collect_order; | 
			
		
	
		
			
				
					|  |  |  |  |         TRUNCATE io_collect_order_biz; | 
			
		
	
		
			
				
					|  |  |  |  |         TRUNCATE io_collect_order_code_auto; | 
			
		
	
	
		
			
				
					|  |  |  | @ -92,5 +105,4 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         SET invAlert = #{invAlert} | 
			
		
	
		
			
				
					|  |  |  |  |         WHERE id = #{id} | 
			
		
	
		
			
				
					|  |  |  |  |     </update> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | </mapper> | 
			
		
	
	
		
			
				
					|  |  |  | 
 |