| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -116,7 +116,6 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private void calculateSelfSubScore(CalculateCommonFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //todo 指标添加缓存
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<IndexGroupDetailEntity> indexList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                IndexCodeEnum.QU_ZHI_BU_MEN.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (CollectionUtils.isEmpty(indexList)) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -143,7 +142,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            Map<String, BigDecimal> weightMap = new HashMap<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            selfSubIndexList.forEach(o -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //找出自身 和下级的指标
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (o.getAllIndexCodePath().contains(ProjectConstant.XIA_JI)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    weightMap.put(ProjectConstant.XIA_JI, weightMap.getOrDefault(ProjectConstant.XIA_JI, new BigDecimal(0)).add(o.getWeight())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } else { | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -153,7 +152,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            Map<String, DeptSelfSubScoreEntity> insertMap = new HashMap<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            subScore.forEach(score -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                String key = score.getAgencyId().concat(index.getIndexCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                String key = score.getDeptId().concat(index.getIndexCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                DeptSelfSubScoreEntity scoreEntity = insertMap.get(key); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (scoreEntity == null) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    scoreEntity = ConvertUtils.sourceToTarget(score, DeptSelfSubScoreEntity.class); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -182,7 +181,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void deleteAndInsertSelfSubScore(CalculateCommonFormDTO formDTO, String indexCode, Map<String, DeptSelfSubScoreEntity> insertMap) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        int effectRow = 0; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        do { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            deptSelfSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            effectRow = deptSelfSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } while (effectRow > 0); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        deptSelfSubScoreDao.insertBatch(new ArrayList<>(insertMap.values())); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -465,4 +464,4 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return map; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					
  |