| 
						
						
							
								
							
						
						
					 | 
					@ -1402,23 +1402,15 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								 i.LAST_HANDLE_TIME, | 
					 | 
					 | 
								 i.LAST_HANDLE_TIME, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								 i.CREATED_TIME | 
					 | 
					 | 
								 i.CREATED_TIME | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        from epdc_item i | 
					 | 
					 | 
					        from epdc_item i | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        left join ( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                select b.ID,b.ITEM_ID,b.CREATED_TIME,b.state,b.CLOSE_CHECK_ID | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                from epdc_item_handle_process b where  b.CREATED_TIME = ( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                SELECT max(CREATED_TIME) from epdc_item_handle_process where b.ITEM_ID = ITEM_ID | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                ) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                ) process on process.ITEM_ID = i.ID | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        where i.DEL_FLAG='0' | 
					 | 
					 | 
					        where i.DEL_FLAG='0' | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    and i.id in ( | 
					 | 
					 | 
					                and process.STATE=11 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                                 SELECT | 
					 | 
					 | 
					                and process.CLOSE_CHECK_ID=#{deptId} | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					                        temp.ITEM_ID | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        FROM | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        ( select it.* | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                                from epdc_item_handle_process it | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                                inner join (select *,max(CREATED_TIME) as maxTime | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                                from epdc_item_handle_process | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                                where DEL_FLAG='0' | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                                group by ITEM_ID | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        )max_it on it.ITEM_ID=max_it.ITEM_ID | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                                                and it.CREATED_TIME=max_it.maxTime | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        where it.DEL_FLAG='0' | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                                        and it.CLOSE_CHECK_ID=#{deptId} | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                                        and it.STATE=11 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        ) temp) | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        <if test="itemContent != null and itemContent != ''"> | 
					 | 
					 | 
					        <if test="itemContent != null and itemContent != ''"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            and i.ITEM_CONTENT like '%${itemContent}%' | 
					 | 
					 | 
					            and i.ITEM_CONTENT like '%${itemContent}%' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        </if> | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |