| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -113,6 +113,10 @@ public class FactIndexServiceImpl implements FactIndexService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(String.format("能力指数查询,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(djList.size()!=zlList.size()||djList.size()!=fwList.size()){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(String.format("能力指数查询,查询出来的三大能力数据条数不一致,orgId:%s,orgType:%s,monthId:%s", formDTO.getOrgId(), formDTO.getOrgType(), formDTO.getMonthId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //6.遍历计算每个月能力指数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        LinkedList<AblityIndexResultDTO.ScoreListResultDTO> nlList = new LinkedList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        for (int i = 0; i < djList.size(); i++) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -357,11 +361,9 @@ public class FactIndexServiceImpl implements FactIndexService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //4.查询指标字典表数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<IndexDictResultDTO> list = indexDictDao.selectList(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //5.遍历数据,判断数据类型并处理
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        /*NumberFormat nf = NumberFormat.getPercentInstance(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        nf.setMaximumFractionDigits(1);*/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        resultList.forEach(result -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            list.forEach(l -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (result.getKey().equals(l.getIndexCode())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            list.stream().filter(dto -> dto.getIndexCode().equals(result.getKey())).forEach(l -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    result.setShowType(l.getValueType()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    //小数类型,四舍五入保留小数点后一位
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    if (FactConstant.DECIMAL.equals(l.getValueType())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        BigDecimal num = new BigDecimal(result.getValue()).setScale(1, BigDecimal.ROUND_HALF_UP); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -372,7 +374,6 @@ public class FactIndexServiceImpl implements FactIndexService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        BigDecimal num = new BigDecimal(result.getValue()).setScale(1, BigDecimal.ROUND_HALF_UP); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        result.setValue(num+"%"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -422,22 +423,13 @@ public class FactIndexServiceImpl implements FactIndexService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //7.遍历数据,判断数据类型并处理
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        /*NumberFormat nf = NumberFormat.getPercentInstance(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        nf.setMaximumFractionDigits(1);*/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //小数类型,四舍五入保留小数点后一位
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (FactConstant.DECIMAL.equals(dictDTO.getValueType())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //小数或百分数类型,四舍五入保留小数点后一位
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (FactConstant.DECIMAL.equals(dictDTO.getValueType()) || FactConstant.PERCENT.equals(dictDTO.getValueType())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            resultList.forEach(result -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                BigDecimal num = new BigDecimal(result.getAblity()).setScale(1, BigDecimal.ROUND_HALF_UP); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                result.setAblity(num.toString()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //百分数类型,四舍五入保留小数点后一位并转成百分比
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (FactConstant.PERCENT.equals(dictDTO.getValueType())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            resultList.forEach(result -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                BigDecimal num = new BigDecimal(result.getAblity()).setScale(1, BigDecimal.ROUND_HALF_UP); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                result.setAblity(num+"%"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return resultList; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |