| 
					
				 | 
			
			
				@ -39,28 +39,32 @@ public class ComputeHelper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param endTime 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<SaveModel> compute(List<DataModel> dataModels, List<BaseDimensionQuota> dimensionQuotas, String wlyyJobCongId, String endTime, String timeLevel) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<SaveModel> compute(List<DataModel> dataModels, List<BaseDimensionQuota> dimensionQuotas, String wlyyJobCongId, String endTime, String timeLevel,String areaLevel) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //得到机构类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String orgType = findOrgType(wlyyJobCongId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (StringUtils.isBlank(areaLevel)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                areaLevel="6"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //计算数据 返回map key 根据团队和维度拼凑在map中的key   1-2-1  如果维度是长度是0返回团队id 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String, List<DataModel>> computeMap = computeDataModel(dimensionQuotas, dataModels,wlyyJobCongId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String, List<DataModel>> computeMap = computeDataModel(dimensionQuotas, dataModels,wlyyJobCongId,areaLevel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<SaveModel> savemodels = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if ("45".equals(wlyyJobCongId)||"47".equals(wlyyJobCongId)||"50".equals(wlyyJobCongId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                savemodels = initAndSetResultCity( dimensionQuotas, computeMap, wlyyJobCongId, endTime, timeLevel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else if("42".equals(wlyyJobCongId)||"41".equals(wlyyJobCongId)||"43".equals(wlyyJobCongId)||"46".equals(wlyyJobCongId)||"48".equals(wlyyJobCongId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ||"49".equals(wlyyJobCongId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //新生儿入学只到机构级别 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                List<BaseOrgDO> orgDOs = findAllOrg(orgType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                savemodels = initAndSetResultOrg(orgDOs, dimensionQuotas, computeMap, wlyyJobCongId, endTime, timeLevel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //得到全部团队 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                List<BaseDoctorDO> doctors = findAllDoctor(orgType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //初始化map并且设置统计出来的数目 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                savemodels = initAndSetResult(doctors, dimensionQuotas, computeMap, wlyyJobCongId, endTime, timeLevel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            switch (areaLevel){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                case "2": 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    savemodels = initAndSetResultCity( dimensionQuotas, computeMap, wlyyJobCongId, endTime, timeLevel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                case "4": 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    List<BaseOrgDO> orgDOs = findAllOrg(orgType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    savemodels = initAndSetResultOrg(orgDOs, dimensionQuotas, computeMap, wlyyJobCongId, endTime, timeLevel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                default: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //得到全部团队 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    List<BaseDoctorDO> doctors = findAllDoctor(orgType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //初始化map并且设置统计出来的数目 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    savemodels = initAndSetResult(doctors, dimensionQuotas, computeMap, wlyyJobCongId, endTime, timeLevel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return savemodels; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -75,19 +79,30 @@ public class ComputeHelper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param dimensionQuotas 该指标的维度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private Map<String, List<DataModel>> computeDataModel(List<BaseDimensionQuota> dimensionQuotas, List<DataModel> dataModels,String wlyyJobCongId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private Map<String, List<DataModel>> computeDataModel(List<BaseDimensionQuota> dimensionQuotas, List<DataModel> dataModels,String wlyyJobCongId,String areaLevel) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String, List<DataModel>> returnMap = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        dataModels.stream().forEach(one -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String key; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if ("45".equals(wlyyJobCongId)||"47".equals(wlyyJobCongId)||"50".equals(wlyyJobCongId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                key = getCityKey(one,dimensionQuotas.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            else if("42".equals(wlyyJobCongId)||"41".equals(wlyyJobCongId)||"43".equals(wlyyJobCongId)||"46".equals(wlyyJobCongId)||"48".equals(wlyyJobCongId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ||"49".equals(wlyyJobCongId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                key = getOrgKey(one, dimensionQuotas.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                key = getKey(one, dimensionQuotas.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            switch (areaLevel){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                case "2": 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    key = getCityKey(one,dimensionQuotas.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                case "4": 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    key = getOrgKey(one, dimensionQuotas.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                default: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    key = getKey(one, dimensionQuotas.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if ("45".equals(wlyyJobCongId)||"47".equals(wlyyJobCongId)||"50".equals(wlyyJobCongId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                key = getCityKey(one,dimensionQuotas.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            else if("42".equals(wlyyJobCongId)||"41".equals(wlyyJobCongId)||"43".equals(wlyyJobCongId)||"46".equals(wlyyJobCongId)||"48".equals(wlyyJobCongId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            ||"49".equals(wlyyJobCongId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                key = getOrgKey(one, dimensionQuotas.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                key = getKey(one, dimensionQuotas.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<DataModel> sms = new ArrayList<DataModel>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (returnMap.containsKey(key)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sms = returnMap.get(key); 
			 |