|  |  | @ -11,21 +11,23 @@ import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.evaluationindex.screen.ScreenCustomerAgencyDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.evaluationindex.screen.ScreenIndexDataMonthlyDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.stats.DimCustomerDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.stats.DimDateDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.stats.DimMonthDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.AgencySubTreeDto; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.extract.form.ExtractOriginFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.extract.form.ExtractScreenFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.extract.form.ScreenExtractFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.indexcal.CalculateCommonFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.evaluationindex.screen.ScreenIndexDataMonthlyEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.stats.DimAgencyEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.stats.DimCustomerEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.stats.DimDateEntity; | 
			
		
	
	
		
			
				
					|  |  | @ -37,8 +39,6 @@ import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollCommunityS | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollStreetService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.evaluationindex.extract.todata.GroupExtractService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.evaluationindex.extract.todata.ProjectExtractService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.evaluationindex.extract.toscreen.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.evaluationindex.indexcal.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.stats.DimAgencyService; | 
			
		
	
	
		
			
				
					|  |  | @ -718,5 +718,42 @@ public class DemoController { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private ScreenCustomerAgencyDao screenCustomerAgencyDao; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |      * @return com.epmet.commons.tools.utils.Result | 
			
		
	
		
			
				
					|  |  |  |      * @param  | 
			
		
	
		
			
				
					|  |  |  |      * @author yinzuomei | 
			
		
	
		
			
				
					|  |  |  |      * @description screen_index_data_monthly 赋值ALL_PARENT_IDS | 
			
		
	
		
			
				
					|  |  |  |      * @Date 2020/10/10 17:59  | 
			
		
	
		
			
				
					|  |  |  |      **/ | 
			
		
	
		
			
				
					|  |  |  |     @DataSource(DataSourceConstant.EVALUATION_INDEX) | 
			
		
	
		
			
				
					|  |  |  |     @PostMapping("updateDeptIndexMonthly") | 
			
		
	
		
			
				
					|  |  |  |     public Result updateDeptIndexMonthly(){ | 
			
		
	
		
			
				
					|  |  |  |         QueryWrapper<ScreenIndexDataMonthlyEntity> wrapper = new QueryWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  |         wrapper.eq("ORG_TYPE", "department"); | 
			
		
	
		
			
				
					|  |  |  |         List<ScreenIndexDataMonthlyEntity> list=screenIndexDataMonthlyDao.selectList(wrapper); | 
			
		
	
		
			
				
					|  |  |  |         int updateNum=0; | 
			
		
	
		
			
				
					|  |  |  |         for(ScreenIndexDataMonthlyEntity entity:list){ | 
			
		
	
		
			
				
					|  |  |  |             if(StringUtils.isNotBlank(entity.getParentId())){ | 
			
		
	
		
			
				
					|  |  |  |                 ScreenCustomerAgencyEntity agencyEntity=screenCustomerAgencyDao.selectByAgencyId(entity.getParentId()); | 
			
		
	
		
			
				
					|  |  |  |                 if(null!=agencyEntity){ | 
			
		
	
		
			
				
					|  |  |  |                     //根组织下的部门
 | 
			
		
	
		
			
				
					|  |  |  |                     if("0".equals(agencyEntity.getPid())){ | 
			
		
	
		
			
				
					|  |  |  |                         log.info("根组织下的部门"); | 
			
		
	
		
			
				
					|  |  |  |                         entity.setAllParentIds(agencyEntity.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  |                     }else{ | 
			
		
	
		
			
				
					|  |  |  |                         entity.setAllParentIds(agencyEntity.getPids().concat(",").concat(agencyEntity.getAgencyId())); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                      updateNum+=screenIndexDataMonthlyDao.updateParentIdsById(entity.getId(),entity.getAllParentIds()); | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         log.info("影响行数="+updateNum); | 
			
		
	
		
			
				
					|  |  |  |         return new Result(); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
	
		
			
				
					|  |  | 
 |