| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.dynamic.datasource.annotation.DataSource; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.RenException; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.DateUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.HttpClientManager; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.constant.DataSourceConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dto.indexcal.CalculateCommonFormDTO; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -78,30 +77,27 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        CalculateCommonFormDTO param = new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        flag = cpcIndexCalculateService.cpcIndexCalculate(param); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("indexCalculate cpcIndexCalculate return result:{}", flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("客户Id:{}【党员相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } catch (Exception e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.error("indexCalculate cpcIndexCalculate exception", e); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        throw new RenException("indexCalculate cpcIndexCalculate exception", e); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    //测试用
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【党员相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    //计算网格
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    start = System.currentTimeMillis(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        flag = gridCorreLationService.calculateGridCorreLation(calculateCommonFormDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("indexCalculate calculateGridCorreLation return result:{}", flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("客户Id:{}【网格相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } catch (Exception e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.error("indexCalculate calculateGridCorreLation exception", e); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        throw new RenException("indexCalculate calculateGridCorreLation exception", e); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【网格相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    //计算社区
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    start = System.currentTimeMillis(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        flag = indexCalculateCommunityService.calCommunityAll(customerId, formDTO.getMonthId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("indexCalculate calCommunityAll return result:{}", flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【社区相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("客户Id:{}【社区相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } catch (Exception e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.error("indexCalculate calCommunityAll exception", e); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        throw new RenException("indexCalculate calAll exception", e); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -111,8 +107,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    start = System.currentTimeMillis(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        flag = indexCalculateStreetService.calStreetAll(customerId, formDTO.getMonthId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("indexCalculate calStreetAll return result:{}", flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【街道相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("客户Id:{}【街道相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } catch (Exception e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.error("indexCalculate calStreetAll exception", e); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        throw new RenException("indexCalculate calStreetAll exception", e); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -122,8 +117,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    start = System.currentTimeMillis(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        flag = deptScoreService.calculateDeptCorreLation(calculateCommonFormDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("indexCalculate calculateDeptCorreLation return result:{}", flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【区直部门】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("客户Id:{}【区直部门】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } catch (Exception e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.error("indexCalculate calculateDeptCorreLation exception", e); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        throw new RenException("indexCalculate calculateDeptCorreLation exception", e); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -133,8 +127,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    start = System.currentTimeMillis(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        indexCalculateDistrictService.calDistrictAll(customerId, formDTO.getMonthId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("indexCalculate calDistrictAll return result:{}", flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【全区相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("客户Id:{}【全区相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } catch (Exception e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.error("indexCalculate calDistrictAll exception", e); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        throw new RenException("indexCalculate calDistrictAll exception", e); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -148,7 +141,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    start = System.currentTimeMillis(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        factIndexCollectService.insertScreenIndexDataMonthlyAndYearly(formDTO.getMonthId(), formDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 分数插入到大屏显示库完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.info("客户Id:{}分数插入到大屏显示库完毕,总耗时:{}秒", customerId, (System.currentTimeMillis() - start) / 1000); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } catch (Exception e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.error("indexCalculate insertScreenIndexDataMonthlyAndYearly exception", e); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        flag = false; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |