|  |  | @ -17,6 +17,7 @@ import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.evaluationindex.indexcoll.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.evaluationindex.screen.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.ScreenCustomerGridDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.extract.result.AgencyMonthCountResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.indexcal.AgencyScoreDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.indexcal.CalculateCommonFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.indexcal.DeptScoreDTO; | 
			
		
	
	
		
			
				
					|  |  | @ -851,8 +852,41 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { | 
			
		
	
		
			
				
					|  |  |  |      **/ | 
			
		
	
		
			
				
					|  |  |  |     private void insertIndexDataYear(String monthId, String customerId){ | 
			
		
	
		
			
				
					|  |  |  |         // 查询今年,上报了几个月的指数统计
 | 
			
		
	
		
			
				
					|  |  |  |         List<AgencyMonthCountResultDTO> orgIds = screenCustomerAgencyDao.selectAllOrgByCustomerId(customerId); | 
			
		
	
		
			
				
					|  |  |  |         if (CollectionUtils.isEmpty(orgIds)){ | 
			
		
	
		
			
				
					|  |  |  |             throw new RenException("客户下没有查到agencyId,gridId,deptId"); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         List<AgencyMonthCountResultDTO> agencyMonthCount = screenIndexDataMonthlyDao.selectMonthCountByOrgId(getYearStr(monthId), orgIds); | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(agencyMonthCount)){ | 
			
		
	
		
			
				
					|  |  |  |             agencyMonthCount.forEach(a -> { | 
			
		
	
		
			
				
					|  |  |  |                 orgIds.forEach(o -> { | 
			
		
	
		
			
				
					|  |  |  |                     if (a.getOrgId().equals(o.getOrgId())){ | 
			
		
	
		
			
				
					|  |  |  |                         o.setMonthCount(a.getMonthCount()); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         Integer monthCount = screenIndexDataMonthlyDao.selectCountIndexDataMonthly(customerId, getYearStr(monthId)); | 
			
		
	
		
			
				
					|  |  |  |         List<IndexDataMonthlyFormDTO> monthlyFormList = screenIndexDataMonthlyDao.selectListIndexDataMonthlyByYear(customerId, getYearStr(monthId), monthCount); | 
			
		
	
		
			
				
					|  |  |  |         BigDecimal monthCountBd = new BigDecimal(monthCount); | 
			
		
	
		
			
				
					|  |  |  |         monthlyFormList.forEach(m -> { | 
			
		
	
		
			
				
					|  |  |  |             orgIds.forEach(o -> { | 
			
		
	
		
			
				
					|  |  |  |                 if (m.getOrgId().equals(o.getOrgId())){ | 
			
		
	
		
			
				
					|  |  |  |                     BigDecimal selfCount = new BigDecimal(o.getMonthCount()); | 
			
		
	
		
			
				
					|  |  |  |                     if (o.getMonthCount() == NumConstant.ZERO){ | 
			
		
	
		
			
				
					|  |  |  |                         m.setIndexTotal(monthCountBd.multiply(m.getIndexTotal())); | 
			
		
	
		
			
				
					|  |  |  |                         m.setPartyDevAblity(monthCountBd.multiply(m.getPartyDevAblity())); | 
			
		
	
		
			
				
					|  |  |  |                         m.setServiceAblity(monthCountBd.multiply(m.getServiceAblity())); | 
			
		
	
		
			
				
					|  |  |  |                         m.setGovernAblity(monthCountBd.multiply(m.getGovernAblity())); | 
			
		
	
		
			
				
					|  |  |  |                     }else { | 
			
		
	
		
			
				
					|  |  |  |                         m.setIndexTotal(monthCountBd.multiply(m.getIndexTotal()).divide(selfCount)); | 
			
		
	
		
			
				
					|  |  |  |                         m.setPartyDevAblity(monthCountBd.multiply(m.getPartyDevAblity()).divide(selfCount)); | 
			
		
	
		
			
				
					|  |  |  |                         m.setServiceAblity(monthCountBd.multiply(m.getServiceAblity()).divide(selfCount)); | 
			
		
	
		
			
				
					|  |  |  |                         m.setGovernAblity(monthCountBd.multiply(m.getGovernAblity()).divide(selfCount)); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |         if (monthlyFormList.size() > NumConstant.ZERO){ | 
			
		
	
		
			
				
					|  |  |  |             int deleteNum; | 
			
		
	
		
			
				
					|  |  |  |             do { | 
			
		
	
	
		
			
				
					|  |  | 
 |