|  |  | @ -17,6 +17,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                sys_workplace_queue.name queueName |  |  |  |                sys_workplace_queue.name queueName | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         FROM io_collect_order_biz icob |  |  |  |         FROM io_collect_order_biz icob | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 left join io_collect_order ico on ico.billNo = icob.orderIdFk | 
			
		
	
		
		
			
				
					
					|  |  |  |                  left join basic_udirel bu on icob.relId = bu.id |  |  |  |                  left join basic_udirel bu on icob.relId = bu.id | 
			
		
	
		
		
			
				
					
					|  |  |  |                  left join basic_products bp on bu.uuid = bp.uuid |  |  |  |                  left join basic_products bp on bu.uuid = bp.uuid | 
			
		
	
		
		
			
				
					
					|  |  |  |                  left join sys_workplace_queue on sys_workplace_queue.relId = bu.id |  |  |  |                  left join sys_workplace_queue on sys_workplace_queue.relId = bu.id | 
			
		
	
	
		
		
			
				
					|  |  | @ -24,27 +25,40 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                  left join sys_workplace_freight swf on swf.code = sys_workplace_queue.freightCode |  |  |  |                  left join sys_workplace_freight swf on swf.code = sys_workplace_queue.freightCode | 
			
		
	
		
		
			
				
					
					|  |  |  |                  left join sys_workplace_region swr on swr.regionCode = swf.freightRow |  |  |  |                  left join sys_workplace_region swr on swr.regionCode = swf.freightRow | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="thrCode != '' and thrCode != null"> |  |  |  |             <!-- 当汇总单号存在时,仅用汇总单号查询 --> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 AND icob.thrCode LIKE concat('%', #{thrCode}, '%') |  |  |  |             <choose> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |                 <when test="summaryNo != null and summaryNo != ''"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="orderIdFk != null and orderIdFk != ''"> |  |  |  |                     AND ico.summaryNo = #{summaryNo} | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 AND icob.orderIdFk = #{orderIdFk} |  |  |  |                 </when> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |                 <otherwise> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="relId != null"> |  |  |  |                     <!-- 无汇总单号时,组合查询条件 --> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 AND icob.relId = #{relId} |  |  |  |                     <trim prefixOverrides="AND"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |                         <if test="thrCode != null and thrCode != ''"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="cpmctymc != null and cpmctymc != ''"> |  |  |  |                             AND icob.thrCode LIKE CONCAT('%', #{thrCode}, '%') | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 AND icob.cpmctymc LIKE concat('%', #{cpmctymc}, '%') |  |  |  |                         </if> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |                         <if test="orderIdFk != null and orderIdFk != ''"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="unionCode != '' and unionCode != null"> |  |  |  |                             AND icob.orderIdFk = #{orderIdFk} | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 and ( |  |  |  |                         </if> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         bp.nameCode LIKE concat( #{unionCode}, '%') |  |  |  |                         <if test="relId != null"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         or bp.ybbm LIKE concat( #{unionCode}, '%') |  |  |  |                             AND icob.relId = #{relId} | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         or bp.sptm LIKE concat(#{unionCode}, '%')) |  |  |  |                         </if> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |                         <if test="cpmctymc != null and cpmctymc != ''"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="ggxh != '' and ggxh != null"> |  |  |  |                             AND icob.cpmctymc LIKE CONCAT('%', #{cpmctymc}, '%') | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 AND ggxh LIKE concat( #{ggxh}, '%') |  |  |  |                         </if> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |                         <!-- 联合编码查询 --> | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         <if test="unionCode != null and unionCode != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             AND ( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             bp.nameCode LIKE CONCAT(#{unionCode}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             OR bp.ybbm LIKE CONCAT(#{unionCode}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             OR bp.sptm LIKE CONCAT(#{unionCode}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         <if test="ggxh != null and ggxh != ''"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             AND ggxh LIKE CONCAT(#{ggxh}, '%') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     </trim> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </otherwise> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </choose> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  |         group by icob.id |  |  |  |         group by icob.id | 
			
		
	
		
		
			
				
					
					|  |  |  |         ORDER BY icob.getConfirm, icob.id desc |  |  |  |         ORDER BY icob.getConfirm, icob.id desc | 
			
		
	
	
		
		
			
				
					|  |  | 
 |