| 
						
						
							
								
							
						
						
					 | 
					@ -14,7 +14,9 @@ import org.springframework.beans.BeanUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import java.math.BigDecimal; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.text.DecimalFormat; | 
					 | 
					 | 
					import java.text.DecimalFormat; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import java.text.NumberFormat; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.time.LocalDate; | 
					 | 
					 | 
					import java.time.LocalDate; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.*; | 
					 | 
					 | 
					import java.util.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.stream.Collectors; | 
					 | 
					 | 
					import java.util.stream.Collectors; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -187,12 +189,19 @@ public class TopicServiceImpl implements TopicService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        TopicShiftedCountResultDTO shiftedCount = topicDao.getShiftedCount(agencyId); | 
					 | 
					 | 
					        TopicShiftedCountResultDTO shiftedCount = topicDao.getShiftedCount(agencyId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (topicSummaryInfo.size() != NumConstant.ZERO && shiftedCount != null) { | 
					 | 
					 | 
					        if (topicSummaryInfo.size() != NumConstant.ZERO && shiftedCount != null) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            Integer collect = topicSummaryInfo.stream().collect(Collectors.summingInt(TopicSummaryInfoResultDTO::getValue)); | 
					 | 
					 | 
					            Integer collect = topicSummaryInfo.stream().collect(Collectors.summingInt(TopicSummaryInfoResultDTO::getValue)); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            DecimalFormat decimalFormat = new DecimalFormat(".00"); | 
					 | 
					 | 
					            topicSummaryInfo.forEach(topic -> { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            String ratio; | 
					 | 
					 | 
					                String s = topic.getPro().setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            ratio = collect == NumConstant.ZERO ? NumConstant.ZERO + TopicConstant.RATIO : decimalFormat.format(((float) shiftedCount.getShiftedIssueCount() / (float) collect) * NumConstant.ONE_HUNDRED) + TopicConstant.RATIO; | 
					 | 
					 | 
					                topic.setRatio(s.concat(TopicConstant.RATIO)); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            TopicSummaryInfoResultDTO result = new TopicSummaryInfoResultDTO(); | 
					 | 
					 | 
					            TopicSummaryInfoResultDTO result = new TopicSummaryInfoResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (collect == NumConstant.ZERO){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                result.setRatio(NumConstant.ZERO+TopicConstant.RATIO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            }else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                BigDecimal bigDecimal = new BigDecimal(((float) shiftedCount.getShiftedIssueCount() / (float) collect) * NumConstant.ONE_HUNDRED); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                String s = bigDecimal.setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                result.setRatio(s.concat(TopicConstant.RATIO)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            result.setName(TopicConstant.SHIFTED); | 
					 | 
					 | 
					            result.setName(TopicConstant.SHIFTED); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            result.setRatio(ratio); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            result.setValue(shiftedCount.getShiftedIssueCount()); | 
					 | 
					 | 
					            result.setValue(shiftedCount.getShiftedIssueCount()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            topicSummaryInfo.add(result); | 
					 | 
					 | 
					            topicSummaryInfo.add(result); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |