| 
						
						
						
					 | 
					@ -1,5 +1,6 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 package com.epmet.dataaggre.service.datastats.impl; | 
					 | 
					 | 
					 package com.epmet.dataaggre.service.datastats.impl; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					 import com.alibaba.fastjson.JSON; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 import com.epmet.commons.dynamic.datasource.annotation.DataSource; | 
					 | 
					 | 
					 import com.epmet.commons.dynamic.datasource.annotation.DataSource; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 import com.epmet.commons.tools.constant.StrConstant; | 
					 | 
					 | 
					 import com.epmet.commons.tools.constant.StrConstant; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1489,26 +1490,25 @@ public class DataStatsServiceImpl implements DataStatsService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String startDate = null; | 
					 | 
					 | 
					        String startDate = null; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String actulStartDate = null; | 
					 | 
					 | 
					        String actulStartDate = null; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        String endDate = null; | 
					 | 
					 | 
					        String endDate = formDTO.getDateId(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        Date dateIdDate = DateUtils.parse(formDTO.getDateId(), DateUtils.DATE_PATTERN_YYYYMMDD); | 
					 | 
					 | 
					        Date dateIdDate = DateUtils.parse(formDTO.getDateId(), DateUtils.DATE_PATTERN_YYYYMMDD); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        boolean isYesterday = DateUtils.getBeforeNDay(1,DateUtils.DATE_PATTERN_YYYYMMDD).equals(formDTO.getDateId()); | 
					 | 
					 | 
					        boolean isYesterday = DateUtils.getBeforeNDay(1,DateUtils.DATE_PATTERN_YYYYMMDD).equals(formDTO.getDateId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        switch (formDTO.getType()){ | 
					 | 
					 | 
					        switch (formDTO.getType()){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            case "yesterday": | 
					 | 
					 | 
					            case "yesterday": | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                startDate = DateUtils.getBeforeNDay(formDTO.getDateId(),1); | 
					 | 
					 | 
					                startDate = DateUtils.getBeforeNDay(formDTO.getDateId(),1); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                endDate = formDTO.getDateId(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                actulStartDate = formDTO.getDateId(); | 
					 | 
					 | 
					                actulStartDate = formDTO.getDateId(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                break; | 
					 | 
					 | 
					                break; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            case "thisWeek": | 
					 | 
					 | 
					            case "thisWeek": | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                actulStartDate = DateUtils.getWeekStart(formDTO.getDateId()); | 
					 | 
					 | 
					                startDate = DateUtils.getWeekStart(formDTO.getDateId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                startDate = DateUtils.getBeforeNDay(actulStartDate,1); | 
					 | 
					 | 
					                //startDate = DateUtils.getBeforeNDay(actulStartDate,1);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                DateUtils.format(DateUtils.addDateDays(yesterday, -1),DateUtils.DATE_PATTERN_YYYYMMDD); | 
					 | 
					 | 
					                //DateUtils.format(DateUtils.addDateDays(yesterday, -1),DateUtils.DATE_PATTERN_YYYYMMDD);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                if (!isYesterday){ | 
					 | 
					 | 
					                if (!isYesterday){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    endDate = DateUtils.getWeekEnd(formDTO.getDateId()); | 
					 | 
					 | 
					                    endDate = DateUtils.getWeekEnd(formDTO.getDateId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                break; | 
					 | 
					 | 
					                break; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            case "thisMonth": | 
					 | 
					 | 
					            case "thisMonth": | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                actulStartDate = DateUtils.format(DateUtils.getMonthStart(dateIdDate),DateUtils.DATE_PATTERN_YYYYMMDD); | 
					 | 
					 | 
					                startDate = DateUtils.format(DateUtils.getMonthStart(dateIdDate),DateUtils.DATE_PATTERN_YYYYMMDD); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                startDate = DateUtils.getBeforeNDay(actulStartDate,1); | 
					 | 
					 | 
					                //startDate = DateUtils.getBeforeNDay(actulStartDate,1);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                if (!isYesterday) { | 
					 | 
					 | 
					                if (!isYesterday) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    endDate = DateUtils.format(DateUtils.getMonthEnd(dateIdDate), DateUtils.DATE_PATTERN_YYYYMMDD); | 
					 | 
					 | 
					                    endDate = DateUtils.format(DateUtils.getMonthEnd(dateIdDate), DateUtils.DATE_PATTERN_YYYYMMDD); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -1518,6 +1518,7 @@ public class DataStatsServiceImpl implements DataStatsService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        formDTO.setStartDateId(startDate); | 
					 | 
					 | 
					        formDTO.setStartDateId(startDate); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        formDTO.setEndDateId(endDate); | 
					 | 
					 | 
					        formDTO.setEndDateId(endDate); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        log.info("getSubWorkFact do select param:{}", JSON.toJSONString(formDTO)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<WorkFactResultDTO> result = new ArrayList<>(); | 
					 | 
					 | 
					        List<WorkFactResultDTO> result = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //如果是社区 则下级是网格 查询网格的数据
 | 
					 | 
					 | 
					        //如果是社区 则下级是网格 查询网格的数据
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (OrgLevelEnum.COMMUNITY.getCode().equals(formDTO.getAgencyLevel())){ | 
					 | 
					 | 
					        if (OrgLevelEnum.COMMUNITY.getCode().equals(formDTO.getAgencyLevel())){ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |