| 
						
						
						
					 | 
				
				 | 
				
					@ -1,5 +1,6 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					package com.epmet.datareport.service.evaluationindex.screen.impl; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.alibaba.fastjson.JSON; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.dynamic.datasource.annotation.DataSource; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.enums.CommonOperateTypeEnum; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -12,6 +13,7 @@ import com.epmet.datareport.service.evaluationindex.screen.IndexService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.evaluationindex.screen.constant.ScreenConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.evaluationindex.screen.dto.form.*; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.evaluationindex.screen.dto.result.*; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import lombok.extern.slf4j.Slf4j; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.apache.commons.lang3.StringUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -31,6 +33,7 @@ import java.util.stream.Collectors; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * @author yinzuomei@elink-cn.com | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * @date 2020/8/18 10:21 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					@Slf4j | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					@Service | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					@DataSource(DataSourceConstant.EVALUATION_INDEX) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					public class IndexServiceImpl implements IndexService { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -118,6 +121,7 @@ public class IndexServiceImpl implements IndexService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<MonthBarchartResult> monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(monthBarchartFormDTO.getAgencyId(), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                                                                                       monthBarchartFormDTO.getMonthId(), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                                                                                        monthBarchartFormDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        log.info("monthBarchart selectMonthBarchart return:{}", JSON.toJSONString(monthBarchartFormDTO)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (monthBarchartResults.size() == NumConstant.ZERO){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -161,6 +165,7 @@ public class IndexServiceImpl implements IndexService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            _ymList=dateUtils.getXpro().keySet().stream().collect(Collectors.toList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        log.info("monthBarchart _ymList return:{}", _ymList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //针对集合collect的游标
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        int cursor = NumConstant.ZERO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //针对X轴,数据集合不全则进行数据填充
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -176,6 +181,7 @@ public class IndexServiceImpl implements IndexService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                continue ; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if(!StringUtils.equals(collect.get(cursor).getMonthId(),_ymList.get(i))){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                log.info("monthBarchart cursor not eq return:{}", _ymList.get(i)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //SET DEFAULT
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                partyDevAbilityData.add(NumConstant.ZERO_DOT_ZERO); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -192,6 +198,7 @@ public class IndexServiceImpl implements IndexService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //保持cursor不变
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                MonthBarchartResult data = collect.get(cursor); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                log.info("monthBarchart collect.get return:{}", JSON.toJSONString(data)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //SET DATA
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                serviceAbilityData.add(null == data.getServiceAbility() ? NumConstant.ZERO_DOT_ZERO : data.getServiceAbility()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                partyDevAbilityData.add(null == data.getPartyDevAbility() ? NumConstant.ZERO_DOT_ZERO : data.getPartyDevAbility()); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -231,6 +238,7 @@ public class IndexServiceImpl implements IndexService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        result.setServiceOriginScore(serviceOriginData); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        result.setPartyOriginScore(partyOriginData); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        result.setGovernOriginScore(governOriginData); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        log.info("monthBarchart final result:{}", JSON.toJSONString(result)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return result; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |