| 
						
						
							
								
							
						
						
					 | 
					@ -199,18 +199,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ON ps.facility_code = dgsd.gantry_code | 
					 | 
					 | 
					        ON ps.facility_code = dgsd.gantry_code | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        AND | 
					 | 
					 | 
					        AND | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        <if test="periodType == 1"> | 
					 | 
					 | 
					        <if test="periodType == 1"> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            YEAR(dgsd.statistical_date) = #{startDate} | 
					 | 
					 | 
					            YEAR(dgsd.statistical_date) = #{startDate} AND | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        </if> | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        <if test="periodType == 3"> | 
					 | 
					 | 
					        <if test="periodType == 3"> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            DATE_FORMAT(dgsd.statistical_date, '%Y-%m') = #{startDate} | 
					 | 
					 | 
					            DATE_FORMAT(dgsd.statistical_date, '%Y-%m') = #{startDate} AND | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        </if> | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        <if test="periodType == 4"> | 
					 | 
					 | 
					        <if test="periodType == 4 and startDate !=null and endDate !=null" > | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            DATE(dgsd.statistical_date) = DATE(#{startDate}) | 
					 | 
					 | 
					            dgsd.statistical_date BETWEEN DATE(#{startDate}) and DATE(#{endDate}) AND | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <if test="periodType == 4 and startDate !=null and endDate ==null" > | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            DATE(dgsd.statistical_date) = DATE(#{startDate}) AND | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        </if> | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        <if test="periodType == 5"> | 
					 | 
					 | 
					        <if test="periodType == 5"> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            DATE(dgsd.statistical_date) = DATE(#{startDate}) | 
					 | 
					 | 
					            DATE(dgsd.statistical_date) = DATE(#{startDate}) AND | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        </if> | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        AND dgsd.period_type = #{periodType} | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					         dgsd.period_type = #{periodType} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ORDER BY | 
					 | 
					 | 
					        ORDER BY | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        dgsd.statistical_date DESC | 
					 | 
					 | 
					        dgsd.statistical_date DESC | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |