| 
					
				 | 
			
			
				@@ -11,17 +11,23 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LEFT JOIN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         contract c ON cpnr.contract_id = c.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            1=1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="role == 'ADMIN'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <!-- 当role为ADMIN时,不添加额外条件,查询所有 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="role != 'ADMIN'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                cpnr.contract_id = #{sysUser.contractId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND cpnr.contract_id = #{sysUser.contractId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="queryParams.contractName != null and queryParams.contractName != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                c.contract_name like concat('%', #{queryParams.contractName}, '%') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND c.contract_name like concat('%', #{queryParams.contractName}, '%') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="queryParams.startTimeBegin != null and queryParams.startTimeBegin != '' and queryParams.startTimeEnd != null and queryParams.startTimeEnd != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                cpnr.create_time between #{queryParams.startTimeBegin} and #{queryParams.startTimeEnd} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND cpnr.start_time <= #{queryParams.startTimeBegin} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND cpnr.end_time >= #{queryParams.startTimeEnd} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="queryParams.endTimeBegin != null and queryParams.endTimeBegin != '' and queryParams.endTimeEnd != null and queryParams.endTimeEnd != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND cpnr.create_time between #{queryParams.endTimeBegin} and #{queryParams.endTimeEnd} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         order by cpnr.update_time desc 
			 |