| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -86,4 +86,45 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </foreach> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    </select> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    <!-- 查询议题审核列表 --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    <select id="auditList" resultType="com.epmet.dto.result.AuditListResultDTO"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        SELECT * FROM ( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                          SELECT | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                              h.CREATED_TIME, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                              ia.ID AS issueApplicationId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                              ia.ISSUE_TITLE, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                              ia.SUGGESTION, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                              ia.APPLY_STATUS, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                              (CASE WHEN ia.APPLY_STATUS = 'under_auditing' THEN '待审核' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    WHEN ia.APPLY_STATUS = 'rejected' THEN '已驳回' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    ELSE '已驳回' END) AS applyStatusName, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                              ia.GRID_ID | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                          FROM issue_application ia | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                          LEFT JOIN issue_application_history h ON h.ISSUE_APPLICATION_ID = ia.ID AND h.DEL_FLAG = '0' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                          WHERE ia.DEL_FLAG = '0' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <if test='null == applyStatus or applyStatus == "" '> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    AND ia.apply_status in ('rejected','under_auditing') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <if test='null != applyStatus or applyStatus != "" '> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    AND ia.apply_status = #{applyStatus} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <if test='null != startTime and startTime = "" '> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    AND DATE_FORMAT(h.CREATED_TIME,'%Y%m%d') <![CDATA[ >= ]]> #{startTime} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <if test='null != endTime and endTime = "" '> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    AND DATE_FORMAT(h.CREATED_TIME,'%Y%m%d') <![CDATA[ <= ]]> #{endTime} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <if test='null != issueTitle and issueTitle = "" '></if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <choose> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    <when test='orgType == "agency"'> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                        AND ia.ORG_ID_PATH LIKE CONCAT('%',#{orgId},'%') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    </when> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    <otherwise> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                        AND ia.GRID_ID = #{orgId} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    </otherwise> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                </choose> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                          ORDER BY h.CREATED_TIME DESC)t | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        GROUP BY issueApplicationId | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    </select> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					</mapper> |