|  |  | @ -267,6 +267,57 @@ | 
			
		
	
		
			
				
					|  |  |  |          DESC | 
			
		
	
		
			
				
					|  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     <!--  工作端-数据:难点赌点列表查询V2,多客户版本  --> | 
			
		
	
		
			
				
					|  |  |  |     <select id="difficultyRankV2" parameterType="com.epmet.project.dto.form.DifficultyRankFormDTO" resultType="com.epmet.project.dto.result.ProjectDifficultRankResultDTO"> | 
			
		
	
		
			
				
					|  |  |  |         SELECT | 
			
		
	
		
			
				
					|  |  |  |         diff.EVENT_ID AS projectId, | 
			
		
	
		
			
				
					|  |  |  |         ifnull(diff.EVENT_CONTENT,diff.EVENT_TITLE) AS title, | 
			
		
	
		
			
				
					|  |  |  |         diff.EVENT_STATUS_CODE AS statusCode, | 
			
		
	
		
			
				
					|  |  |  |         diff.EVENT_SOURCE AS gridName, | 
			
		
	
		
			
				
					|  |  |  |         diff.EVENT_IMG_URL AS imgUrl, | 
			
		
	
		
			
				
					|  |  |  |         floor(diff.EVENT_COST_TIME/60) AS totalHours, | 
			
		
	
		
			
				
					|  |  |  |         diff.EVENT_RE_ORG AS reOrg, | 
			
		
	
		
			
				
					|  |  |  |         diff.EVENT_HANDLED_COUNT AS handledCount | 
			
		
	
		
			
				
					|  |  |  |         FROM | 
			
		
	
		
			
				
					|  |  |  |         ( | 
			
		
	
		
			
				
					|  |  |  |             select scg.AREA_CODE,sdd1.* from screen_difficulty_data sdd1 | 
			
		
	
		
			
				
					|  |  |  |             left join screen_customer_grid scg | 
			
		
	
		
			
				
					|  |  |  |             on(sdd1.ORG_ID=scg.GRID_ID) | 
			
		
	
		
			
				
					|  |  |  |             where sdd1.DEL_FLAG='0' | 
			
		
	
		
			
				
					|  |  |  |             and scg.DEL_FLAG='0' | 
			
		
	
		
			
				
					|  |  |  |             and sdd1.ORG_TYPE='grid' | 
			
		
	
		
			
				
					|  |  |  |             union | 
			
		
	
		
			
				
					|  |  |  |             select sca.AREA_CODE,sdd2.* from screen_difficulty_data sdd2 | 
			
		
	
		
			
				
					|  |  |  |             left join screen_customer_agency sca | 
			
		
	
		
			
				
					|  |  |  |             on(sdd2.ORG_ID=sca.AGENCY_ID) | 
			
		
	
		
			
				
					|  |  |  |             where sdd2.DEL_FLAG='0' | 
			
		
	
		
			
				
					|  |  |  |             and sca.DEL_FLAG='0' | 
			
		
	
		
			
				
					|  |  |  |             and sdd2.ORG_TYPE='agency' | 
			
		
	
		
			
				
					|  |  |  |         ) diff | 
			
		
	
		
			
				
					|  |  |  |         WHERE | 
			
		
	
		
			
				
					|  |  |  |             diff.DEL_FLAG = '0' | 
			
		
	
		
			
				
					|  |  |  |         <if test="agencyAreaCode != null and agencyAreaCode != ''"> | 
			
		
	
		
			
				
					|  |  |  |             and diff.AREA_CODE like concat(#{agencyAreaCode},'%') | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         <if test="agencyAreaCode == null || agencyAreaCode == ''"> | 
			
		
	
		
			
				
					|  |  |  |             <choose> | 
			
		
	
		
			
				
					|  |  |  |                 <when test="orgType != null and orgType == 'grid'"> | 
			
		
	
		
			
				
					|  |  |  |                     AND diff.ORG_ID = #{agencyId,jdbcType=VARCHAR} | 
			
		
	
		
			
				
					|  |  |  |                 </when> | 
			
		
	
		
			
				
					|  |  |  |                 <otherwise> | 
			
		
	
		
			
				
					|  |  |  |                     AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') | 
			
		
	
		
			
				
					|  |  |  |                 </otherwise> | 
			
		
	
		
			
				
					|  |  |  |             </choose> | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         <if test="status!= null and status != ''"> | 
			
		
	
		
			
				
					|  |  |  |             AND diff.EVENT_STATUS_CODE = #{status} | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |         ORDER BY | 
			
		
	
		
			
				
					|  |  |  |         CASE #{type}  WHEN 'timelongest' THEN diff.EVENT_COST_TIME | 
			
		
	
		
			
				
					|  |  |  |         WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT | 
			
		
	
		
			
				
					|  |  |  |         ELSE diff.EVENT_RE_ORG  END | 
			
		
	
		
			
				
					|  |  |  |         DESC | 
			
		
	
		
			
				
					|  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |     <!-- 查询难点赌点-耗时最长|涉及部门最多|处理次数 --> | 
			
		
	
		
			
				
					|  |  |  |     <select id="getDifficultyImgList" resultType="string"> | 
			
		
	
		
			
				
					|  |  |  |         select  EVENT_IMG_URL | 
			
		
	
	
		
			
				
					|  |  | 
 |