| 
						
						
						
					 | 
				
				 | 
				
					@ -1,9 +1,11 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					package com.epmet.service.indexcal.impl; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.dynamic.datasource.annotation.DataSource; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.StrConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.RenException; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.DateUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.constant.DataSourceConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.constant.IndexCalConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -68,6 +70,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @description 网格相关,分值计算 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Date 2020/8/26 10:51 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     **/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        boolean resultFlag = false; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -127,7 +130,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //查询总记录数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (NumConstant.ZERO == total) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            logger.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //总页数,进行批量查询,批量计算
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -155,6 +158,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            recordList.forEach(recordMap -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //遍历所有的指标
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                indexMap.forEach((key, value) -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    logger.info("index_code :{}",key); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    //列名不为空
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        //对应的数值
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -371,7 +375,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    continue; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					//                logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -409,7 +413,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //查询总记录数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (NumConstant.ZERO == total) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            logger.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //总页数,进行批量查询,批量计算
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -473,7 +477,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //查询总记录数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (NumConstant.ZERO == total) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            logger.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //总页数,进行批量查询,批量计算
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |