|  | @ -171,47 +171,66 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             object.put("data",array);
 | 
	
		
			
				|  |  |             JSONArray array1 = dateTotalStatistics2(startDate,endDate,area,level,"5","1",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("specialistData",array1);
 | 
	
		
			
				|  |  |             JSONArray array2 = dateTotalStatistics2(startDate,endDate,area,level,"12",null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             JSONArray array2 = dateTotalStatistics2(startDate,endDate,area,level,"12","9",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("topicData",array2);
 | 
	
		
			
				|  |  |             JSONArray array3 = dateTotalStatistics2(startDate,endDate,area,level,"14",null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             JSONArray array3 = dateTotalStatistics2(startDate,endDate,area,level,"14","12",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("synergyData",array3);
 | 
	
		
			
				|  |  |             JSONArray array4 = dateTotalStatistics2(startDate,endDate,area,level,"16",null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             JSONArray array4 = dateTotalStatistics2(startDate,endDate,area,level,"16","16",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("vedioData",array4);
 | 
	
		
			
				|  |  |             JSONArray array5 = dateTotalStatistics2(startDate,endDate,area,level,"12","1",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("twzxData",array5);
 | 
	
		
			
				|  |  |             JSONArray array6 = dateTotalStatistics2(startDate,endDate,area,level,"16","17",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("spzxData",array6);
 | 
	
		
			
				|  |  |         }else if (interval==2){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             JSONArray array = weekTotalStatistics7(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             object.put("data",array);
 | 
	
		
			
				|  |  |             JSONArray array1 = weekTotalStatistics7(startDate,endDate,area,level,"5","1",SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             object.put("specialistData",array1);
 | 
	
		
			
				|  |  |             JSONArray array2 = weekTotalStatistics7(startDate,endDate,area,level,"12",null,SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             JSONArray array2 = weekTotalStatistics7(startDate,endDate,area,level,"12","9",SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             object.put("topicData",array2);
 | 
	
		
			
				|  |  |             JSONArray array3 = weekTotalStatistics7(startDate,endDate,area,level,"14",null,SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             JSONArray array3 = weekTotalStatistics7(startDate,endDate,area,level,"14","12",SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             object.put("synergyData",array3);
 | 
	
		
			
				|  |  |             JSONArray array4 = weekTotalStatistics7(startDate,endDate,area,level,"16",null,SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             JSONArray array4 = weekTotalStatistics7(startDate,endDate,area,level,"16","16",SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             object.put("vedioData",array4);
 | 
	
		
			
				|  |  |             JSONArray array5 = weekTotalStatistics7(startDate,endDate,area,level,"12","1",SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             object.put("twzxData",array5);
 | 
	
		
			
				|  |  |             JSONArray array6 = weekTotalStatistics7(startDate,endDate,area,level,"16","17",SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             object.put("spzxData",array6);
 | 
	
		
			
				|  |  |         }else if (interval==3){
 | 
	
		
			
				|  |  |             JSONArray array = monthTotalStatistics2(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("data",array);
 | 
	
		
			
				|  |  |             JSONArray array1 = monthTotalStatistics2(startDate,endDate,area,level,"5","1",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("specialistData",array1);
 | 
	
		
			
				|  |  |             JSONArray array2 = monthTotalStatistics2(startDate,endDate,area,level,"12",null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             JSONArray array2 = monthTotalStatistics2(startDate,endDate,area,level,"12","9",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("topicData",array2);
 | 
	
		
			
				|  |  |             JSONArray array3 = monthTotalStatistics2(startDate,endDate,area,level,"14",null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             JSONArray array3 = monthTotalStatistics2(startDate,endDate,area,level,"14","12",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("synergyData",array3);
 | 
	
		
			
				|  |  |             JSONArray array4 = monthTotalStatistics2(startDate,endDate,area,level,"16",null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             JSONArray array4 = monthTotalStatistics2(startDate,endDate,area,level,"16","16",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("vedioData",array4);
 | 
	
		
			
				|  |  |             JSONArray array5 = monthTotalStatistics2(startDate,endDate,area,level,"12","1",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("twzxData",array5);
 | 
	
		
			
				|  |  |             JSONArray array6 = monthTotalStatistics2(startDate,endDate,area,level,"16","17",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("spzxData",array6);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (StringUtils.isNoneBlank(level2_type)){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //问诊量表格
 | 
	
		
			
				|  |  |             //专家咨询数量
 | 
	
		
			
				|  |  | /*
 | 
	
		
			
				|  |  |             List<SaveModel> specialistSaveModels = elasticsearchUtil.findDateQuotaLevel0(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL,null,level2_type);
 | 
	
		
			
				|  |  | */
 | 
	
		
			
				|  |  |             //协同门诊
 | 
	
		
			
				|  |  |             List<SaveModel> syngySaveModels = elasticsearchUtil.findDateQuotaLevel0(startDate, endDate, area, level, "14", SaveModel.timeLevel_ZL,null,level2_type);
 | 
	
		
			
				|  |  |             List<SaveModel> syngySaveModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, "14", SaveModel.timeLevel_ZL,"12",null,level2_type);
 | 
	
		
			
				|  |  |             //图文复诊
 | 
	
		
			
				|  |  |             List<SaveModel> topicSaveModels = elasticsearchUtil.findDateQuotaLevel0(startDate, endDate, area, level, "12", SaveModel.timeLevel_ZL,null,level2_type);
 | 
	
		
			
				|  |  |             List<SaveModel> topicSaveModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, "12", SaveModel.timeLevel_ZL,"9",null,level2_type);
 | 
	
		
			
				|  |  |             ///视频复诊
 | 
	
		
			
				|  |  |             List<SaveModel> vedioSaveModels = elasticsearchUtil.findDateQuotaLevel0(startDate, endDate, area, level, "16", SaveModel.timeLevel_ZL,null,level2_type);
 | 
	
		
			
				|  |  |             List<SaveModel> vedioSaveModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, "16", SaveModel.timeLevel_ZL,"16",null,level2_type);
 | 
	
		
			
				|  |  |             ///图文咨询
 | 
	
		
			
				|  |  |             List<SaveModel> twzxSaveModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, "12", SaveModel.timeLevel_ZL,"1",null,level2_type);
 | 
	
		
			
				|  |  |             ///视频咨询
 | 
	
		
			
				|  |  |             List<SaveModel> spzxSaveModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, "16", SaveModel.timeLevel_ZL,"17",null,level2_type);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             JSONArray array = new JSONArray();
 | 
	
		
			
				|  |  |             List<String> list = new ArrayList<>();
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -240,9 +259,11 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                 Double topic = 0.0;
 | 
	
		
			
				|  |  |                 Double vedio =0.0;
 | 
	
		
			
				|  |  |                 Double synegy =0.0;
 | 
	
		
			
				|  |  |                 Double topicZJ =0.0;
 | 
	
		
			
				|  |  |                 Double vedioZJ = 0.0;
 | 
	
		
			
				|  |  |                 if (index.equalsIgnoreCase("3")){
 | 
	
		
			
				|  |  |                     specialist = 0.0;
 | 
	
		
			
				|  |  |                 }else if (index.equalsIgnoreCase("5")){
 | 
	
		
			
				|  |  |                 }/*else if (index.equalsIgnoreCase("5")){
 | 
	
		
			
				|  |  |                     for (SaveModel saveModel:specialistSaveModels){
 | 
	
		
			
				|  |  |                         if (level2_type.equals(SaveModel.OrgLevel)){
 | 
	
		
			
				|  |  |                             if (StringUtils.isNoneBlank(saveModel.getHospital())&&code.equalsIgnoreCase(saveModel.getHospital())){
 | 
	
	
		
			
				|  | @ -290,7 +311,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 }*/
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 for (SaveModel saveModel:syngySaveModels){
 | 
	
		
			
				|  |  |                     if (level2_type.equals(SaveModel.OrgLevel)){
 | 
	
	
		
			
				|  | @ -428,10 +449,102 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 for (SaveModel saveModel:twzxSaveModels){
 | 
	
		
			
				|  |  |                     if (level2_type.equals(SaveModel.OrgLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getHospital())&&code.equalsIgnoreCase(saveModel.getHospital())){
 | 
	
		
			
				|  |  |                             jsonObject.put("code",code);
 | 
	
		
			
				|  |  |                             jsonObject.put("name",saveModel.getHospitalName());
 | 
	
		
			
				|  |  |                             jsonObject.put("topicZJ",saveModel.getResult1());
 | 
	
		
			
				|  |  |                             topicZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }else if (level2_type.equals(SaveModel.deptLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getDept())&&code.equalsIgnoreCase(saveModel.getDept())){
 | 
	
		
			
				|  |  |                             jsonObject.put("code",code);
 | 
	
		
			
				|  |  |                             jsonObject.put("name",saveModel.getDeptName());
 | 
	
		
			
				|  |  |                             jsonObject.put("topicZJ",saveModel.getResult1());
 | 
	
		
			
				|  |  |                             topicZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }else if (level2_type.equals(SaveModel.doctorLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getDoctor())&&code.equalsIgnoreCase(saveModel.getDoctor())){
 | 
	
		
			
				|  |  |                             if (level==6){
 | 
	
		
			
				|  |  |                                 List<BaseDoctorHospitalDO> doctorHospitalDOS = doctorHospitalDao.findByDoctorCode(area);
 | 
	
		
			
				|  |  |                                 if (doctorHospitalDOS!=null&&doctorHospitalDOS.size()!=0){
 | 
	
		
			
				|  |  |                                     BaseDoctorHospitalDO doctorHospitalDO = doctorHospitalDOS.get(0);
 | 
	
		
			
				|  |  |                                     jsonObject.put("code",doctorHospitalDO.getDeptCode());
 | 
	
		
			
				|  |  |                                     jsonObject.put("name",doctorHospitalDO.getDeptName());
 | 
	
		
			
				|  |  |                                 }
 | 
	
		
			
				|  |  |                             }else {
 | 
	
		
			
				|  |  |                                 DictHospitalDeptDO dictHospitalDeptDO =  hospitalDeptDao.findByCode(area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("code",area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("name",dictHospitalDeptDO.getName());
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                             jsonObject.put("doctorCode",code);
 | 
	
		
			
				|  |  |                             BaseDoctorDO doctorDO = doctorDao.findById(code);
 | 
	
		
			
				|  |  |                             if (doctorDO!=null){
 | 
	
		
			
				|  |  |                                 jsonObject.put("doctorJob",doctorDO.getJobTitleName());
 | 
	
		
			
				|  |  |                             }else {
 | 
	
		
			
				|  |  |                                 jsonObject.put("doctorJob",null);
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                             jsonObject.put("doctorName",saveModel.getDoctorName());
 | 
	
		
			
				|  |  |                             jsonObject.put("topicZJ",saveModel.getResult1());
 | 
	
		
			
				|  |  |                             topicZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 for (SaveModel saveModel:spzxSaveModels){
 | 
	
		
			
				|  |  |                     if (level2_type.equals(SaveModel.OrgLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getHospital())&&code.equalsIgnoreCase(saveModel.getHospital())){
 | 
	
		
			
				|  |  |                             jsonObject.put("code",code);
 | 
	
		
			
				|  |  |                             jsonObject.put("name",saveModel.getHospitalName());
 | 
	
		
			
				|  |  |                             jsonObject.put("vedioZJ",saveModel.getResult1());
 | 
	
		
			
				|  |  |                             vedioZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }else if (level2_type.equals(SaveModel.deptLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getDept())&&code.equalsIgnoreCase(saveModel.getDept())){
 | 
	
		
			
				|  |  |                             jsonObject.put("code",code);
 | 
	
		
			
				|  |  |                             jsonObject.put("name",saveModel.getDeptName());
 | 
	
		
			
				|  |  |                             jsonObject.put("vedioZJ",saveModel.getResult1());
 | 
	
		
			
				|  |  |                             vedioZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }else if (level2_type.equals(SaveModel.doctorLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getDoctor())&&code.equalsIgnoreCase(saveModel.getDoctor())){
 | 
	
		
			
				|  |  |                             if (level==6){
 | 
	
		
			
				|  |  |                                 List<BaseDoctorHospitalDO> doctorHospitalDOS = doctorHospitalDao.findByDoctorCode(area);
 | 
	
		
			
				|  |  |                                 if (doctorHospitalDOS!=null&&doctorHospitalDOS.size()!=0){
 | 
	
		
			
				|  |  |                                     BaseDoctorHospitalDO doctorHospitalDO = doctorHospitalDOS.get(0);
 | 
	
		
			
				|  |  |                                     jsonObject.put("code",doctorHospitalDO.getDeptCode());
 | 
	
		
			
				|  |  |                                     jsonObject.put("name",doctorHospitalDO.getDeptName());
 | 
	
		
			
				|  |  |                                 }
 | 
	
		
			
				|  |  |                             }else {
 | 
	
		
			
				|  |  |                                 DictHospitalDeptDO dictHospitalDeptDO =  hospitalDeptDao.findByCode(area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("code",area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("name",dictHospitalDeptDO.getName());
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                             jsonObject.put("doctorCode",code);
 | 
	
		
			
				|  |  |                             BaseDoctorDO doctorDO = doctorDao.findById(code);
 | 
	
		
			
				|  |  |                             if (doctorDO!=null){
 | 
	
		
			
				|  |  |                                 jsonObject.put("doctorJob",doctorDO.getJobTitleName());
 | 
	
		
			
				|  |  |                             }else {
 | 
	
		
			
				|  |  |                                 jsonObject.put("doctorJob",null);
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                             jsonObject.put("doctorName",saveModel.getDoctorName());
 | 
	
		
			
				|  |  |                             jsonObject.put("vedioZJ",saveModel.getResult1());
 | 
	
		
			
				|  |  |                             vedioZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 Double total1 = topic+vedio ;//图文和视频总和
 | 
	
		
			
				|  |  |                 Double total = topic+vedio+synegy+specialist;//总和
 | 
	
		
			
				|  |  |                 Double total = topic+vedio+synegy+specialist+topicZJ+vedioZJ;//总和
 | 
	
		
			
				|  |  |                 Double total2 = topicZJ+vedioZJ ;//图文咨询和视频咨询总和
 | 
	
		
			
				|  |  |                 jsonObject.put("total1",total1);//图文和视频总和
 | 
	
		
			
				|  |  |                 jsonObject.put("total",total);//总和
 | 
	
		
			
				|  |  |                 jsonObject.put("total2",total2);//图文咨询和视频咨询总和
 | 
	
		
			
				|  |  |                 array.add(jsonObject);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             object.put("excelData",array);
 | 
	
	
		
			
				|  | @ -455,6 +568,10 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             object.put("synergyData",array3);
 | 
	
		
			
				|  |  |             JSONArray array4 = dateTotalStatistics3(startDate,endDate,area,level,index,"1",SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("vedioData",array4);
 | 
	
		
			
				|  |  |             JSONArray array5 = dateTotalStatistics3(startDate,endDate,area,level,index,"3",SaveModel.timeLevel_ZL,"1");
 | 
	
		
			
				|  |  |             object.put("twzxData",array5);
 | 
	
		
			
				|  |  |             JSONArray array6 = dateTotalStatistics3(startDate,endDate,area,level,index,"3",SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("spzxData",array6);
 | 
	
		
			
				|  |  |         }else if (interval==2){
 | 
	
		
			
				|  |  |             JSONArray array = weekTotalStatistics7(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             object.put("data",array);
 | 
	
	
		
			
				|  | @ -466,6 +583,10 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             object.put("synergyData",array3);
 | 
	
		
			
				|  |  |             JSONArray array4 = weekTotalStatistics8(startDate,endDate,area,level,index,"1",SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("vedioData",array4);
 | 
	
		
			
				|  |  |             JSONArray array5 = weekTotalStatistics8(startDate,endDate,area,level,index,"3",SaveModel.timeLevel_ZL,"1");
 | 
	
		
			
				|  |  |             object.put("twzxData",array5);
 | 
	
		
			
				|  |  |             JSONArray array6 = weekTotalStatistics8(startDate,endDate,area,level,index,"3",SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("spzxData",array6);
 | 
	
		
			
				|  |  |         }else if (interval==3){
 | 
	
		
			
				|  |  |             JSONArray array = monthTotalStatistics3(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             object.put("data",array);
 | 
	
	
		
			
				|  | @ -477,6 +598,10 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             object.put("synergyData",array3);
 | 
	
		
			
				|  |  |             JSONArray array4 = monthTotalStatistics3(startDate,endDate,area,level,index,"1",SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("vedioData",array4);
 | 
	
		
			
				|  |  |             JSONArray array5 = monthTotalStatistics3(startDate,endDate,area,level,index,"3",SaveModel.timeLevel_ZL,"1");
 | 
	
		
			
				|  |  |             object.put("twzxData",array5);
 | 
	
		
			
				|  |  |             JSONArray array6 = monthTotalStatistics3(startDate,endDate,area,level,index,"3",SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("spzxData",array6);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         DecimalFormat decimalFormat = new DecimalFormat("0.00");
 | 
	
		
			
				|  |  |         if (StringUtils.isNoneBlank(level2_type)){
 | 
	
	
		
			
				|  | @ -490,6 +615,10 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             List<SaveModel> topicSaveModels = elasticsearchUtil.findDateQuotaLevel2(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL,"1","1",null,level2_type);
 | 
	
		
			
				|  |  |             ///视频复诊
 | 
	
		
			
				|  |  |             List<SaveModel> vedioSaveModels = elasticsearchUtil.findDateQuotaLevel2(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL,"1","2",null,level2_type);
 | 
	
		
			
				|  |  |             ///图文咨询
 | 
	
		
			
				|  |  |             List<SaveModel> twzxSaveModels = elasticsearchUtil.findDateQuotaLevel2(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL,"3","1",null,level2_type);
 | 
	
		
			
				|  |  |             ///视频咨询
 | 
	
		
			
				|  |  |             List<SaveModel> spzxSaveModels = elasticsearchUtil.findDateQuotaLevel2(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL,"3","2",null,level2_type);
 | 
	
		
			
				|  |  |             JSONArray array = new JSONArray();
 | 
	
		
			
				|  |  |             List<String> list = new ArrayList<>();
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -518,11 +647,13 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                 Double topic = 0.0;
 | 
	
		
			
				|  |  |                 Double vedio =0.0;
 | 
	
		
			
				|  |  |                 Double synegy =0.0;
 | 
	
		
			
				|  |  |                 Double topicZJ  =0.0;
 | 
	
		
			
				|  |  |                 Double vedioZJ = 0.0;
 | 
	
		
			
				|  |  |                 if (index.equalsIgnoreCase("3")){
 | 
	
		
			
				|  |  |                     specialist = 0.0;
 | 
	
		
			
				|  |  |                     jsonObject.put("specialist",specialist);
 | 
	
		
			
				|  |  |                 }else if (index.equalsIgnoreCase("5")){
 | 
	
		
			
				|  |  |                     for (SaveModel saveModel:specialistSaveModels){
 | 
	
		
			
				|  |  |                    /* for (SaveModel saveModel:specialistSaveModels){
 | 
	
		
			
				|  |  |                         if (level2_type.equals(SaveModel.OrgLevel)){
 | 
	
		
			
				|  |  |                             if (StringUtils.isNoneBlank(saveModel.getHospital())&&code.equalsIgnoreCase(saveModel.getHospital())){
 | 
	
		
			
				|  |  |                                 jsonObject.put("code",code);
 | 
	
	
		
			
				|  | @ -575,7 +706,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                                 break;
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     }*/
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 for (SaveModel saveModel:syngySaveModels){
 | 
	
	
		
			
				|  | @ -735,10 +866,118 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 for (SaveModel saveModel:twzxSaveModels){
 | 
	
		
			
				|  |  |                     if (level2_type.equals(SaveModel.OrgLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getHospital())&&code.equalsIgnoreCase(saveModel.getHospital())){
 | 
	
		
			
				|  |  |                             jsonObject.put("code",code);
 | 
	
		
			
				|  |  |                             jsonObject.put("name",saveModel.getHospitalName());
 | 
	
		
			
				|  |  |                             jsonObject.put("topicZJ",decimalFormat.format(saveModel.getResult1()));
 | 
	
		
			
				|  |  |                             topicZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }else if (level2_type.equals(SaveModel.deptLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getDept())&&code.equalsIgnoreCase(saveModel.getDept())){
 | 
	
		
			
				|  |  |                             jsonObject.put("code",code);
 | 
	
		
			
				|  |  |                             jsonObject.put("name",saveModel.getDeptName());
 | 
	
		
			
				|  |  |                             jsonObject.put("topicZJ",decimalFormat.format(saveModel.getResult1()));
 | 
	
		
			
				|  |  |                             topicZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }else if (level2_type.equals(SaveModel.doctorLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getDoctor())&&code.equalsIgnoreCase(saveModel.getDoctor())){
 | 
	
		
			
				|  |  |                             if (level==6){
 | 
	
		
			
				|  |  |                                 List<BaseDoctorHospitalDO> doctorHospitalDOS = doctorHospitalDao.findByDoctorCode(area);
 | 
	
		
			
				|  |  |                                 if (doctorHospitalDOS!=null&&doctorHospitalDOS.size()!=0){
 | 
	
		
			
				|  |  |                                     BaseDoctorHospitalDO doctorHospitalDO = doctorHospitalDOS.get(0);
 | 
	
		
			
				|  |  |                                     jsonObject.put("code",doctorHospitalDO.getDeptCode());
 | 
	
		
			
				|  |  |                                     jsonObject.put("name",doctorHospitalDO.getDeptName());
 | 
	
		
			
				|  |  |                                 }
 | 
	
		
			
				|  |  |                             }else if (level==4){
 | 
	
		
			
				|  |  |                                 BaseOrgDO orgDO = orgDao.findByCode(area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("code",area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("name",orgDO.getName());
 | 
	
		
			
				|  |  |                             }else if (level==2){
 | 
	
		
			
				|  |  |                                 jsonObject.put("code",area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("name","厦门市");
 | 
	
		
			
				|  |  |                             }else {
 | 
	
		
			
				|  |  |                                 DictHospitalDeptDO dictHospitalDeptDO =  hospitalDeptDao.findByCode(area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("code",area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("name",dictHospitalDeptDO.getName());
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                             BaseDoctorDO doctorDO = doctorDao.findById(code);
 | 
	
		
			
				|  |  |                             if (doctorDO!=null){
 | 
	
		
			
				|  |  |                                 jsonObject.put("doctorJob",doctorDO.getJobTitleName());
 | 
	
		
			
				|  |  |                             }else {
 | 
	
		
			
				|  |  |                                 jsonObject.put("doctorJob",null);
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                             jsonObject.put("doctorCode",code);
 | 
	
		
			
				|  |  |                             jsonObject.put("doctorName",saveModel.getDoctorName());
 | 
	
		
			
				|  |  |                             jsonObject.put("topicZJ",decimalFormat.format(saveModel.getResult1()));
 | 
	
		
			
				|  |  |                             topicZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 for (SaveModel saveModel:spzxSaveModels){
 | 
	
		
			
				|  |  |                     if (level2_type.equals(SaveModel.OrgLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getHospital())&&code.equalsIgnoreCase(saveModel.getHospital())){
 | 
	
		
			
				|  |  |                             jsonObject.put("code",code);
 | 
	
		
			
				|  |  |                             jsonObject.put("name",saveModel.getHospitalName());
 | 
	
		
			
				|  |  |                             jsonObject.put("vedioZJ",decimalFormat.format(saveModel.getResult1()));
 | 
	
		
			
				|  |  |                             vedioZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }else if (level2_type.equals(SaveModel.deptLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getDept())&&code.equalsIgnoreCase(saveModel.getDept())){
 | 
	
		
			
				|  |  |                             jsonObject.put("code",code);
 | 
	
		
			
				|  |  |                             jsonObject.put("name",saveModel.getDeptName());
 | 
	
		
			
				|  |  |                             jsonObject.put("vedioZJ",decimalFormat.format(saveModel.getResult1()));
 | 
	
		
			
				|  |  |                             vedioZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }else if (level2_type.equals(SaveModel.doctorLevel)){
 | 
	
		
			
				|  |  |                         if (StringUtils.isNoneBlank(saveModel.getDoctor())&&code.equalsIgnoreCase(saveModel.getDoctor())){
 | 
	
		
			
				|  |  |                             if (level==6){
 | 
	
		
			
				|  |  |                                 List<BaseDoctorHospitalDO> doctorHospitalDOS = doctorHospitalDao.findByDoctorCode(area);
 | 
	
		
			
				|  |  |                                 if (doctorHospitalDOS!=null&&doctorHospitalDOS.size()!=0){
 | 
	
		
			
				|  |  |                                     BaseDoctorHospitalDO doctorHospitalDO = doctorHospitalDOS.get(0);
 | 
	
		
			
				|  |  |                                     jsonObject.put("code",doctorHospitalDO.getDeptCode());
 | 
	
		
			
				|  |  |                                     jsonObject.put("name",doctorHospitalDO.getDeptName());
 | 
	
		
			
				|  |  |                                 }
 | 
	
		
			
				|  |  |                             }else if (level==4){
 | 
	
		
			
				|  |  |                                 BaseOrgDO orgDO = orgDao.findByCode(area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("code",area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("name",orgDO.getName());
 | 
	
		
			
				|  |  |                             }else if (level==2){
 | 
	
		
			
				|  |  |                                 jsonObject.put("code",area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("name","厦门市");
 | 
	
		
			
				|  |  |                             }else {
 | 
	
		
			
				|  |  |                                 DictHospitalDeptDO dictHospitalDeptDO =  hospitalDeptDao.findByCode(area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("code",area);
 | 
	
		
			
				|  |  |                                 jsonObject.put("name",dictHospitalDeptDO.getName());
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                             BaseDoctorDO doctorDO = doctorDao.findById(code);
 | 
	
		
			
				|  |  |                             if (doctorDO!=null){
 | 
	
		
			
				|  |  |                                 jsonObject.put("doctorJob",doctorDO.getJobTitleName());
 | 
	
		
			
				|  |  |                             }else {
 | 
	
		
			
				|  |  |                                 jsonObject.put("doctorJob",null);
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                             jsonObject.put("doctorCode",code);
 | 
	
		
			
				|  |  |                             jsonObject.put("doctorName",saveModel.getDoctorName());
 | 
	
		
			
				|  |  |                             jsonObject.put("vedioZJ",decimalFormat.format(saveModel.getResult1()));
 | 
	
		
			
				|  |  |                             vedioZJ = saveModel.getResult1();
 | 
	
		
			
				|  |  |                             break;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 Double total1 = topic+vedio ;//图文和视频总和
 | 
	
		
			
				|  |  |                 Double total = topic+vedio+synegy+specialist;//总和
 | 
	
		
			
				|  |  |                 Double total = topic+vedio+synegy+specialist+topicZJ+vedioZJ;//总和
 | 
	
		
			
				|  |  |                 Double total2 = topicZJ+vedioZJ ;//图文咨询和视频咨询总和
 | 
	
		
			
				|  |  |                 jsonObject.put("total1",decimalFormat.format(total1));//图文和视频总和
 | 
	
		
			
				|  |  |                 jsonObject.put("total",decimalFormat.format(total));//总和
 | 
	
		
			
				|  |  |                 jsonObject.put("total2",decimalFormat.format(total2));//咨询总和
 | 
	
		
			
				|  |  |                 jsonObject.put("topicZJ",decimalFormat.format(topicZJ));//咨询总和
 | 
	
		
			
				|  |  |                 jsonObject.put("vedioZJ",decimalFormat.format(vedioZJ));//咨询总和
 | 
	
		
			
				|  |  |                 array.add(jsonObject);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             List<JSONObject> bindArrayResult = JSONArray.parseArray(array.toJSONString(), JSONObject.class);
 | 
	
	
		
			
				|  | @ -818,16 +1057,22 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             Double specialistCount =0.0;
 | 
	
		
			
				|  |  |             //专科咨询
 | 
	
		
			
				|  |  |             SaveModel saveModel4 = null;
 | 
	
		
			
				|  |  |             saveModel4 = elasticsearchUtil.findOneDateQuotaLevel1(endDate, endDate, area, level, index+",21", SaveModel.timeLevel_DDL, "3");
 | 
	
		
			
				|  |  |             saveModel4 = elasticsearchUtil.findOneDateQuotaLevel2(endDate, endDate, area, level, index+",21", SaveModel.timeLevel_DDL, "3","1");
 | 
	
		
			
				|  |  |             specialistCount = saveModel4.getResult1();//专家咨询数量
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //专科视频咨询
 | 
	
		
			
				|  |  |             Double specialistSPCount =0.0;
 | 
	
		
			
				|  |  |             SaveModel saveModel5 = null;
 | 
	
		
			
				|  |  |             saveModel5 = elasticsearchUtil.findOneDateQuotaLevel2(endDate, endDate, area, level, index+",21", SaveModel.timeLevel_DDL, "3","2");
 | 
	
		
			
				|  |  |             specialistSPCount = saveModel5.getResult1();//专家咨询视频数量
 | 
	
		
			
				|  |  |             Double synergyCount = saveModel1.getResult1();//协同门诊数量
 | 
	
		
			
				|  |  |             Double topicCount = saveModel2.getResult1();//图文复诊数量
 | 
	
		
			
				|  |  |             Double videoCount = saveModel3.getResult1();//视频复诊数量
 | 
	
		
			
				|  |  |             Double total = specialistCount+synergyCount+topicCount+videoCount;//总量
 | 
	
		
			
				|  |  |             Double total = specialistCount+synergyCount+topicCount+videoCount+specialistSPCount;//总量
 | 
	
		
			
				|  |  |             DecimalFormat decimalFormat = new DecimalFormat("0.00");
 | 
	
		
			
				|  |  |             object.put("specialistCount",decimalFormat.format(specialistCount));//专家咨询数
 | 
	
		
			
				|  |  |             object.put("specialistRate",getRange(specialistCount.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |             object.put("specialistSPCount",decimalFormat.format(specialistSPCount));//专家咨询数
 | 
	
		
			
				|  |  |             object.put("specialistSPRate",getRange(specialistSPCount.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |             object.put("synergyCount",decimalFormat.format(synergyCount));//专家咨询数
 | 
	
		
			
				|  |  |             object.put("synergyRate",getRange(synergyCount.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |             object.put("topicCount",decimalFormat.format(topicCount));//图文复诊数量
 | 
	
	
		
			
				|  | @ -851,17 +1096,24 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  | */
 | 
	
		
			
				|  |  |             saveModel3 = elasticsearchUtil.findOneDateQuotaLevel1(endDate, endDate, area, level, index, SaveModel.timeLevel_DDL, "16");
 | 
	
		
			
				|  |  |             Double specialistCount =0.0;
 | 
	
		
			
				|  |  |             //专科咨询
 | 
	
		
			
				|  |  |             //专科咨询图文
 | 
	
		
			
				|  |  |             SaveModel saveModel4 = null;
 | 
	
		
			
				|  |  |             saveModel4 = elasticsearchUtil.findOneDateQuotaLevel1(endDate, endDate, area, level, index, SaveModel.timeLevel_DDL, "1");
 | 
	
		
			
				|  |  |             specialistCount = saveModel4.getResult1();//专家咨询数量
 | 
	
		
			
				|  |  |             specialistCount = saveModel4.getResult1();
 | 
	
		
			
				|  |  |             //专科咨询视频
 | 
	
		
			
				|  |  |             Double specialistCountSP =0.0;
 | 
	
		
			
				|  |  |             SaveModel saveModel5 = null;
 | 
	
		
			
				|  |  |             saveModel5 = elasticsearchUtil.findOneDateQuotaLevel1(endDate, endDate, area, level, index, SaveModel.timeLevel_DDL, "17");
 | 
	
		
			
				|  |  |             specialistCountSP = saveModel5.getResult1();//专家咨询数量
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             Double synergyCount = saveModel1.getResult1();//协同门诊数量
 | 
	
		
			
				|  |  |             Double topicCount = saveModel2.getResult1();//图文复诊数量
 | 
	
		
			
				|  |  |             Double videoCount = saveModel3.getResult1();//视频复诊数量
 | 
	
		
			
				|  |  |             Double total = specialistCount+synergyCount+topicCount+videoCount;//总量
 | 
	
		
			
				|  |  |             Double total = specialistCount+synergyCount+topicCount+videoCount+specialistCountSP;//总量
 | 
	
		
			
				|  |  |             object.put("specialistCount",specialistCount);//专家咨询数
 | 
	
		
			
				|  |  |             object.put("specialistRate",getRange(specialistCount.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |             object.put("specialistSPCount",specialistCountSP);//专家咨询视频数
 | 
	
		
			
				|  |  |             object.put("specialistSPRate",getRange(specialistCountSP.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |             object.put("synergyCount",synergyCount);//专家咨询数
 | 
	
		
			
				|  |  |             object.put("synergyRate",getRange(synergyCount.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |             object.put("topicCount",topicCount);//图文复诊数量
 | 
	
	
		
			
				|  | @ -957,6 +1209,9 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |         //专家咨询
 | 
	
		
			
				|  |  |         JSONArray specialistArray = dateTotalStatistics2(startDate,endDate,area,level,index,"1",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |         object.put("specialistArray",specialistArray);
 | 
	
		
			
				|  |  |         //专家咨询
 | 
	
		
			
				|  |  |         JSONArray specialistSPArray = dateTotalStatistics2(startDate,endDate,area,level,index,"17",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |         object.put("specialistSPArray",specialistSPArray);
 | 
	
		
			
				|  |  |         //协同复诊
 | 
	
		
			
				|  |  |         JSONArray syngeryArray = dateTotalStatistics2(startDate,endDate,area,level,index,"12",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |         object.put("syngeryArray",syngeryArray);
 | 
	
	
		
			
				|  | @ -1147,7 +1402,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                     "AND bd.DEL = 1 " +
 | 
	
		
			
				|  |  |                     "AND bdh.DEL = 1 " +
 | 
	
		
			
				|  |  |                     "AND bd.OUTPATIENT_TYPE IS NOT NULL " +
 | 
	
		
			
				|  |  |                     " AND dhd.CONSULT_DEPT_FLAG='1' AND bd.job_title_code IN('1201','1301','1401','1101','066','067','061','1310','061','065')";
 | 
	
		
			
				|  |  |                     " AND dhd.CONSULT_DEPT_FLAG='1' AND bd.job_title_code IN('1201','1301','1401','1101','066','067','061','1310','061','065','1','2','3','4')";
 | 
	
		
			
				|  |  |             String deptSql = "select hd.CODE as \"CODE\",hd.NAME as \"NAME\" from DICT_HOSPITAL_DEPT hd where CONSULT_DEPT_FLAG=1";
 | 
	
		
			
				|  |  |             if (level==4){//科室
 | 
	
		
			
				|  |  |                 sql+=" AND dhd.ORG_CODE = '"+area+"'";
 | 
	
	
		
			
				|  | @ -1169,6 +1424,8 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                     Long synegy = 0L;
 | 
	
		
			
				|  |  |                     Long specialist =0L;
 | 
	
		
			
				|  |  |                     Long other =0L;
 | 
	
		
			
				|  |  |                     Long topicZJ = 0L;
 | 
	
		
			
				|  |  |                     Long vedioZJ =0L;
 | 
	
		
			
				|  |  |                     for (Map<String,Object> map:mapList){
 | 
	
		
			
				|  |  |                         if (map.get("dept_code").toString().equalsIgnoreCase(map1.get("code").toString())){
 | 
	
		
			
				|  |  |                             String outpatientType = map.get("outpatient_type").toString();
 | 
	
	
		
			
				|  | @ -1181,7 +1438,9 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                                 }else if (str[i].contains("xt")){
 | 
	
		
			
				|  |  |                                     synegy+=1;
 | 
	
		
			
				|  |  |                                 }else if (str[i].contains("zj")){
 | 
	
		
			
				|  |  |                                     specialist+=1;
 | 
	
		
			
				|  |  |                                     topicZJ+=1;
 | 
	
		
			
				|  |  |                                 } else if (str[i].contains("zxsp")){
 | 
	
		
			
				|  |  |                                     vedioZJ+=1;
 | 
	
		
			
				|  |  |                                 }else {
 | 
	
		
			
				|  |  |                                     other+=1;
 | 
	
		
			
				|  |  |                                 }
 | 
	
	
		
			
				|  | @ -1190,6 +1449,8 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     object1.put("topic",topic);//图文
 | 
	
		
			
				|  |  |                     object1.put("vedio",vedio);//视频
 | 
	
		
			
				|  |  |                     object1.put("topicZJ",topicZJ);//图文
 | 
	
		
			
				|  |  |                     object1.put("vedioZJ",vedioZJ);//视频
 | 
	
		
			
				|  |  |                     object1.put("synegy",synegy);//协同
 | 
	
		
			
				|  |  |                     object1.put("specialist",specialist);//专家
 | 
	
		
			
				|  |  |                     object1.put("other",other);//其他
 | 
	
	
		
			
				|  | @ -1207,6 +1468,8 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                     Long synegy = 0L;
 | 
	
		
			
				|  |  |                     Long specialist =0L;
 | 
	
		
			
				|  |  |                     Long other =0L;
 | 
	
		
			
				|  |  |                     Long topicZJ = 0L;
 | 
	
		
			
				|  |  |                     Long vedioZJ =0L;
 | 
	
		
			
				|  |  |                     String outpatientType = map.get("outpatient_type").toString();
 | 
	
		
			
				|  |  |                     String str[]=outpatientType.split(",");
 | 
	
		
			
				|  |  |                     for (int i=0;i<str.length;i++){
 | 
	
	
		
			
				|  | @ -1217,13 +1480,17 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                         }else if (str[i].contains("xt")){
 | 
	
		
			
				|  |  |                             synegy+=1;
 | 
	
		
			
				|  |  |                         }else if (str[i].contains("zj")){
 | 
	
		
			
				|  |  |                             specialist+=1;
 | 
	
		
			
				|  |  |                             topicZJ+=1;
 | 
	
		
			
				|  |  |                         } else if (str[i].contains("zxsp")){
 | 
	
		
			
				|  |  |                             vedioZJ+=1;
 | 
	
		
			
				|  |  |                         }else {
 | 
	
		
			
				|  |  |                             other+=1;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     object1.put("topic",topic);//图文
 | 
	
		
			
				|  |  |                     object1.put("vedio",vedio);//视频
 | 
	
		
			
				|  |  |                     object1.put("topicZJ",topicZJ);//图文
 | 
	
		
			
				|  |  |                     object1.put("vedioZJ",vedioZJ);//视频
 | 
	
		
			
				|  |  |                     object1.put("synegy",synegy);//协同
 | 
	
		
			
				|  |  |                     object1.put("specialist",specialist);//专家
 | 
	
		
			
				|  |  |                     object1.put("other",other);//其他
 | 
	
	
		
			
				|  | @ -1241,8 +1508,10 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             List<SaveModel> vedioModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL, "16",null, "6");
 | 
	
		
			
				|  |  |             //协同
 | 
	
		
			
				|  |  |             List<SaveModel> synegyModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL, "12",null, "6");
 | 
	
		
			
				|  |  |             //专科
 | 
	
		
			
				|  |  |             //专科图文
 | 
	
		
			
				|  |  |             List<SaveModel> specialistModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level,index, SaveModel.timeLevel_ZL,"1",null, "6");
 | 
	
		
			
				|  |  |             //专科视频
 | 
	
		
			
				|  |  |             List<SaveModel> specialistSPModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level,index, SaveModel.timeLevel_ZL,"17",null, "6");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             String deptSql = "select hd.CODE as \"CODE\",hd.NAME as \"NAME\" from DICT_HOSPITAL_DEPT hd where CONSULT_DEPT_FLAG=1";
 | 
	
		
			
				|  |  |             if (level==4){//科室
 | 
	
	
		
			
				|  | @ -1257,7 +1526,8 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                     Long topic = 0L;
 | 
	
		
			
				|  |  |                     Long vedio =0L;
 | 
	
		
			
				|  |  |                     Long synegy = 0L;
 | 
	
		
			
				|  |  |                     Long specialist =0L;
 | 
	
		
			
				|  |  |                     Long topicZJ =0L;
 | 
	
		
			
				|  |  |                     Long vedioZJ =0L;
 | 
	
		
			
				|  |  |                     Long other =0L;
 | 
	
		
			
				|  |  |                     JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |                     for(SaveModel saveModel:topicModels){
 | 
	
	
		
			
				|  | @ -1305,14 +1575,27 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                                 saveModel.setDeptName(doctorHospitalDOs.get(0).getDeptName());
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                             if(map.get("code").toString().equalsIgnoreCase(saveModel.getDept())){
 | 
	
		
			
				|  |  |                                     specialist+=1;
 | 
	
		
			
				|  |  |                                 topicZJ+=1;
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     for(SaveModel saveModel:specialistSPModels){
 | 
	
		
			
				|  |  |                         if (saveModel.getResult1()>0){
 | 
	
		
			
				|  |  |                             List<BaseDoctorHospitalDO> doctorHospitalDOs = doctorHospitalDao.findByDoctorCode(saveModel.getDoctor());
 | 
	
		
			
				|  |  |                             if (doctorHospitalDOs!=null&&doctorHospitalDOs.size()!=0){
 | 
	
		
			
				|  |  |                                 saveModel.setDept(doctorHospitalDOs.get(0).getDeptCode());
 | 
	
		
			
				|  |  |                                 saveModel.setDeptName(doctorHospitalDOs.get(0).getDeptName());
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                             if(map.get("code").toString().equalsIgnoreCase(saveModel.getDept())){
 | 
	
		
			
				|  |  |                                 vedioZJ+=1;
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     jsonObject.put("topic",topic);//图文
 | 
	
		
			
				|  |  |                     jsonObject.put("vedio",vedio);//视频
 | 
	
		
			
				|  |  |                     jsonObject.put("synegy",synegy);//协同
 | 
	
		
			
				|  |  |                     jsonObject.put("specialist",specialist);//专家
 | 
	
		
			
				|  |  |                     jsonObject.put("topicZJ",topicZJ);//专家
 | 
	
		
			
				|  |  |                     jsonObject.put("vedioZJ",vedioZJ);//视频
 | 
	
		
			
				|  |  |                     jsonObject.put("other",other);//其他
 | 
	
		
			
				|  |  |                     jsonObject.put("doctorName","-");//医生名字
 | 
	
		
			
				|  |  |                     jsonObject.put("doctorJob","-");//医生职称
 | 
	
	
		
			
				|  | @ -1343,7 +1626,8 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                     Long topic = 0L;
 | 
	
		
			
				|  |  |                     Long vedio =0L;
 | 
	
		
			
				|  |  |                     Long synegy = 0L;
 | 
	
		
			
				|  |  |                     Long specialist =0L;
 | 
	
		
			
				|  |  |                     Long topicZJ = 0L;
 | 
	
		
			
				|  |  |                     Long vedioZJ =0L;
 | 
	
		
			
				|  |  |                     Long other =0L;
 | 
	
		
			
				|  |  |                     for(SaveModel saveModel:topicModels){
 | 
	
		
			
				|  |  |                         if(jsonObject.getString("doctor").equalsIgnoreCase(saveModel.getDoctor())){
 | 
	
	
		
			
				|  | @ -1369,14 +1653,22 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                     for(SaveModel saveModel:specialistModels) {
 | 
	
		
			
				|  |  |                         if (jsonObject.getString("doctor").equalsIgnoreCase(saveModel.getDoctor())) {
 | 
	
		
			
				|  |  |                             if (saveModel.getResult1()>0){
 | 
	
		
			
				|  |  |                                 specialist+=1;
 | 
	
		
			
				|  |  |                                 topicZJ+=1;
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     for(SaveModel saveModel:specialistSPModels) {
 | 
	
		
			
				|  |  |                         if (jsonObject.getString("doctor").equalsIgnoreCase(saveModel.getDoctor())) {
 | 
	
		
			
				|  |  |                             if (saveModel.getResult1()>0){
 | 
	
		
			
				|  |  |                                 vedioZJ+=1;
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     jsonObject.put("topic",topic);//图文
 | 
	
		
			
				|  |  |                     jsonObject.put("vedio",vedio);//视频
 | 
	
		
			
				|  |  |                     jsonObject.put("topicZJ",topicZJ);//图文
 | 
	
		
			
				|  |  |                     jsonObject.put("vedioZJ",vedioZJ);//视频
 | 
	
		
			
				|  |  |                     jsonObject.put("synegy",synegy);//协同
 | 
	
		
			
				|  |  |                     jsonObject.put("specialist",specialist);//专家
 | 
	
		
			
				|  |  |                     jsonObject.put("other",other);//其他
 | 
	
		
			
				|  |  |                     array.add(jsonObject);
 | 
	
		
			
				|  |  |                 }
 | 
	
	
		
			
				|  | @ -1468,11 +1760,11 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             JSONObject json = new JSONObject();
 | 
	
		
			
				|  |  |             json.put("range", one.get("date"));
 | 
	
		
			
				|  |  |             json.put("amount", 0);
 | 
	
		
			
				|  |  |             json.put("num",0.0);
 | 
	
		
			
				|  |  |             json.put("num",0.00);
 | 
	
		
			
				|  |  |             result.add(json);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | //        }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         DecimalFormat decimalFormat = new DecimalFormat("0.00");
 | 
	
		
			
				|  |  |         if (saveModels != null) {
 | 
	
		
			
				|  |  |             // 计算结果
 | 
	
		
			
				|  |  |             for (SaveModel saveModel : saveModels) {
 | 
	
	
		
			
				|  | @ -1486,7 +1778,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                 for(JSONObject obj : result){
 | 
	
		
			
				|  |  |                     if((obj.get("range")+"").equals(range)){
 | 
	
		
			
				|  |  |                         obj.put("amount", amount);
 | 
	
		
			
				|  |  |                         obj.put("num",num);
 | 
	
		
			
				|  |  |                         obj.put("num",decimalFormat.format(num));
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -1581,7 +1873,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             JSONObject json = new JSONObject();
 | 
	
		
			
				|  |  |             json.put("range", one.get("date"));
 | 
	
		
			
				|  |  |             json.put("amount", 0);
 | 
	
		
			
				|  |  |             json.put("num",0.0);
 | 
	
		
			
				|  |  |             json.put("num",0.00);
 | 
	
		
			
				|  |  |             result.add(json);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | //        }
 | 
	
	
		
			
				|  | @ -1753,7 +2045,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             JSONObject range = new JSONObject();
 | 
	
		
			
				|  |  |             range.put("range", endStr);
 | 
	
		
			
				|  |  |             range.put("amount", 0);
 | 
	
		
			
				|  |  |             range.put("num",0.0);
 | 
	
		
			
				|  |  |             range.put("num",0.00);
 | 
	
		
			
				|  |  |             countResult.put(endStr, range);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -1797,13 +2089,14 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  | //                if (range.equals(df.format(temp.getTime()))) {
 | 
	
		
			
				|  |  | //                    json.put("range", endDate);
 | 
	
		
			
				|  |  | //                }
 | 
	
		
			
				|  |  |                 DecimalFormat decimalFormat = new DecimalFormat("0.00");
 | 
	
		
			
				|  |  |                 if (json != null) {
 | 
	
		
			
				|  |  |                     long amount = saveModel.getResult2().longValue();
 | 
	
		
			
				|  |  |                     double num = saveModel.getResult1();
 | 
	
		
			
				|  |  |                     long previousAmount = Long.valueOf(json.get("amount").toString());
 | 
	
		
			
				|  |  |                     double previousNum = Double.parseDouble(json.get("num").toString());
 | 
	
		
			
				|  |  |                     json.put("amount", amount+previousAmount);
 | 
	
		
			
				|  |  |                     json.put("num",num+previousNum);
 | 
	
		
			
				|  |  |                     json.put("num",decimalFormat.format(num+previousNum));
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -1927,7 +2220,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             JSONObject range = new JSONObject();
 | 
	
		
			
				|  |  |             range.put("range", endStr);
 | 
	
		
			
				|  |  |             range.put("amount", 0);
 | 
	
		
			
				|  |  |             range.put("num",0.0);
 | 
	
		
			
				|  |  |             range.put("num",0.00);
 | 
	
		
			
				|  |  |             countResult.put(endStr, range);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -2087,7 +2380,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             JSONObject range = new JSONObject();
 | 
	
		
			
				|  |  |             range.put("range", endStr);
 | 
	
		
			
				|  |  |             range.put("amount", 0);
 | 
	
		
			
				|  |  |             range.put("num",0.0);
 | 
	
		
			
				|  |  |             range.put("num",0.00);
 | 
	
		
			
				|  |  |             countResult.put(endStr, range);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -2122,7 +2415,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |         else {
 | 
	
		
			
				|  |  |             saveModels = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, area, level, index, timelevel, SaveModel.interval_week);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         DecimalFormat decimalFormat = new DecimalFormat("0.00");
 | 
	
		
			
				|  |  |         if (saveModels != null) {
 | 
	
		
			
				|  |  |             // 计算结果
 | 
	
		
			
				|  |  |             for (SaveModel saveModel : saveModels) {
 | 
	
	
		
			
				|  | @ -2139,11 +2432,12 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  | //                if (range.equals(df.format(temp.getTime()))) {
 | 
	
		
			
				|  |  | //                    json.put("range", endDate);
 | 
	
		
			
				|  |  | //                }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 if (json != null) {
 | 
	
		
			
				|  |  |                     long amount = saveModel.getResult2().longValue();
 | 
	
		
			
				|  |  |                     double num = saveModel.getResult1();
 | 
	
		
			
				|  |  |                     json.put("amount", amount);
 | 
	
		
			
				|  |  |                     json.put("num",num);
 | 
	
		
			
				|  |  |                     json.put("num",decimalFormat.format(num));
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -2269,7 +2563,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             JSONObject range = new JSONObject();
 | 
	
		
			
				|  |  |             range.put("range", endStr);
 | 
	
		
			
				|  |  |             range.put("amount", 0);
 | 
	
		
			
				|  |  |             range.put("num",0.0);
 | 
	
		
			
				|  |  |             range.put("num",0.00);
 | 
	
		
			
				|  |  |             countResult.put(endStr, range);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -2427,7 +2721,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             range.put("range", endStr);
 | 
	
		
			
				|  |  |             range.put("amount", 0);
 | 
	
		
			
				|  |  |             range.put("num",0.0);
 | 
	
		
			
				|  |  |             range.put("num",0.00);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             countResult.put(endStr, range);
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -2464,11 +2758,12 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                 /*if (range.equals(df.format(temp.getTime()))) {
 | 
	
		
			
				|  |  |                     json.put("range", endDate);
 | 
	
		
			
				|  |  |                 }*/
 | 
	
		
			
				|  |  |                 DecimalFormat decimalFormat = new DecimalFormat("0.00");
 | 
	
		
			
				|  |  |                 if (json != null) {
 | 
	
		
			
				|  |  |                     long amount = saveModel.getResult2().longValue();
 | 
	
		
			
				|  |  |                     double num = saveModel.getResult1();
 | 
	
		
			
				|  |  |                     json.put("amount", amount);
 | 
	
		
			
				|  |  |                     json.put("num",num);
 | 
	
		
			
				|  |  |                     json.put("num",decimalFormat.format(num));
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -2569,7 +2864,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             range.put("range", endStr);
 | 
	
		
			
				|  |  |             range.put("amount", 0);
 | 
	
		
			
				|  |  |             range.put("num",0.0);
 | 
	
		
			
				|  |  |             range.put("num",0.00);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             countResult.put(endStr, range);
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -2713,7 +3008,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             range.put("range", endStr);
 | 
	
		
			
				|  |  |             range.put("amount", 0);
 | 
	
		
			
				|  |  |             range.put("num",0.0);
 | 
	
		
			
				|  |  |             range.put("num",0.00);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             countResult.put(endStr, range);
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -2730,7 +3025,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |         } else {
 | 
	
		
			
				|  |  |             saveModels = elasticsearchUtil.findDateQuotaLevel0AndPaibanLine(startDate, endDate, area, level, index, timelevel, SaveModel.interval_month,null);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         DecimalFormat decimalFormat = new DecimalFormat("0.00");
 | 
	
		
			
				|  |  |         if (saveModels != null) {
 | 
	
		
			
				|  |  |             // 计算结果
 | 
	
		
			
				|  |  |             for (SaveModel saveModel : saveModels) {
 | 
	
	
		
			
				|  | @ -2747,7 +3042,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                     long amount = saveModel.getResult2().longValue();
 | 
	
		
			
				|  |  |                     double num = saveModel.getResult1();
 | 
	
		
			
				|  |  |                     json.put("amount", amount);
 | 
	
		
			
				|  |  |                     json.put("num",num);
 | 
	
		
			
				|  |  |                     json.put("num",decimalFormat.format(num));
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -3571,25 +3866,32 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |         JSONObject object = new JSONObject();
 | 
	
		
			
				|  |  |         //协同门诊
 | 
	
		
			
				|  |  |         SaveModel saveModel1 = null;
 | 
	
		
			
				|  |  |         saveModel1 = elasticsearchUtil.findOneDateQuotaLevel0(startDate, endDate, area, level, "14", SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |         saveModel1 = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, "14", SaveModel.timeLevel_ZL,"12");
 | 
	
		
			
				|  |  |         //图文复诊
 | 
	
		
			
				|  |  |         SaveModel saveModel2 = null;
 | 
	
		
			
				|  |  |         saveModel2 = elasticsearchUtil.findOneDateQuotaLevel0(startDate, endDate, area, level, "12", SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |         saveModel2 = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, "12", SaveModel.timeLevel_ZL,"9");
 | 
	
		
			
				|  |  |         //视频复诊
 | 
	
		
			
				|  |  |         SaveModel saveModel3 = null;
 | 
	
		
			
				|  |  |         saveModel3 = elasticsearchUtil.findOneDateQuotaLevel0(startDate, endDate, area, level, "16", SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |         saveModel3 = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, "16", SaveModel.timeLevel_ZL,"16");
 | 
	
		
			
				|  |  |         Double specialistCount =0.0;
 | 
	
		
			
				|  |  |         //专科咨询
 | 
	
		
			
				|  |  |         SaveModel saveModel4 = null;
 | 
	
		
			
				|  |  |         saveModel4 = elasticsearchUtil.findOneDateQuotaLevel0(startDate, endDate, area, level, "7", SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |         saveModel4 = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, "12", SaveModel.timeLevel_ZL,"1");
 | 
	
		
			
				|  |  |         specialistCount = saveModel4.getResult1();//专家咨询数量
 | 
	
		
			
				|  |  |         Double specialistSPCount =0.0;
 | 
	
		
			
				|  |  |         //专科咨询
 | 
	
		
			
				|  |  |         SaveModel saveModel5 = null;
 | 
	
		
			
				|  |  |         saveModel5 = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, "16", SaveModel.timeLevel_ZL,"17");
 | 
	
		
			
				|  |  |         specialistSPCount = saveModel5.getResult1();//专家咨询数量
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Double synergyCount = saveModel1.getResult1();//协同门诊数量
 | 
	
		
			
				|  |  |         Double topicCount = saveModel2.getResult1();//图文复诊数量
 | 
	
		
			
				|  |  |         Double videoCount = saveModel3.getResult1();//视频复诊数量
 | 
	
		
			
				|  |  |         Double total = specialistCount+synergyCount+topicCount+videoCount;//总量
 | 
	
		
			
				|  |  |         Double total = specialistCount+synergyCount+topicCount+videoCount+specialistSPCount;//总量
 | 
	
		
			
				|  |  |         object.put("specialistCount",specialistCount);//专家咨询数
 | 
	
		
			
				|  |  |         object.put("specialistRate",getRange(specialistCount.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |         object.put("specialistSPCount",specialistSPCount);//专家咨询sp数
 | 
	
		
			
				|  |  |         object.put("specialistSPRate",getRange(specialistSPCount.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |         object.put("synergyCount",synergyCount);//专家咨询数
 | 
	
		
			
				|  |  |         object.put("synergyRate",getRange(synergyCount.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |         object.put("topicCount",topicCount);//图文复诊数量
 | 
	
	
		
			
				|  | @ -3709,7 +4011,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONObject getConsultLinePC(String startDate, String endDate, String area, int level, String index,int interval, String level2_type) throws Exception {
 | 
	
		
			
				|  |  |     public JSONObject getConsultLinePC(String startDate, String endDate, String area, int level, String index,int interval, String level2_type,String lowCode) throws Exception {
 | 
	
		
			
				|  |  |         String index1= (Integer.parseInt(index)+1)+"";
 | 
	
		
			
				|  |  |         //问诊量
 | 
	
		
			
				|  |  |         JSONObject object = new JSONObject();
 | 
	
	
		
			
				|  | @ -3726,21 +4028,21 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                 JSONArray array4 = dateTotalStatistics2(startDate,endDate,area,level,index1,"1",SaveModel.timeLevel_ZL,null);//已完成
 | 
	
		
			
				|  |  |                 object.put("endData",array4);//已完成
 | 
	
		
			
				|  |  |             }else {
 | 
	
		
			
				|  |  |                 JSONArray array = dateTotalStatistics2(startDate,endDate,area,level,index1,null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |                 JSONArray array = dateTotalStatistics2(startDate,endDate,area,level,index1,lowCode,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |                 object.put("totalData",array);//新增量
 | 
	
		
			
				|  |  |                 JSONArray array1 = dateTotalStatistics2(startDate,endDate,area,level,index1,"0",SaveModel.timeLevel_ZL,null);//未接诊
 | 
	
		
			
				|  |  |                 JSONArray array1 = dateTotalStatistics2(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"0");//未接诊
 | 
	
		
			
				|  |  |                 object.put("noReceiveData",array1);//未接诊
 | 
	
		
			
				|  |  |                 JSONArray array2 = dateTotalStatistics2(startDate,endDate,area,level,index,"1,2,3",SaveModel.timeLevel_ZL,null);//已接诊
 | 
	
		
			
				|  |  |                 JSONArray array2 = dateTotalStatistics2(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"1,2,3");//已接诊
 | 
	
		
			
				|  |  |                 object.put("haveReceiveData",array2);//已接诊
 | 
	
		
			
				|  |  |                 JSONArray array3 = dateTotalStatistics2(startDate,endDate,area,level,index,"-1",SaveModel.timeLevel_ZL,null);//患者取消
 | 
	
		
			
				|  |  |                 JSONArray array3 = dateTotalStatistics2(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"-1");//患者取消
 | 
	
		
			
				|  |  |                 object.put("concleData",array3);//患者取消
 | 
	
		
			
				|  |  |                 JSONArray array4 = dateTotalStatistics2(startDate,endDate,area,level,index,"3",SaveModel.timeLevel_ZL,null);//已结束
 | 
	
		
			
				|  |  |                 JSONArray array4 = dateTotalStatistics2(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"3");//已结束
 | 
	
		
			
				|  |  |                 object.put("endData",array4);//已结束
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         }else if (interval==2){
 | 
	
		
			
				|  |  |             if (index.equalsIgnoreCase("6")){
 | 
	
		
			
				|  |  |                 JSONArray array = weekTotalStatistics7(startDate,endDate,area,level,index1,null,SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |                 JSONArray array = weekTotalStatistics8(startDate,endDate,area,level,index1,null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |                 object.put("totalData",array);//新增量
 | 
	
		
			
				|  |  |                 JSONArray array1 = weekTotalStatistics7(startDate,endDate,area,level,index,"0",SaveModel.timeLevel_ZL);//未回复
 | 
	
		
			
				|  |  |                 object.put("noReplyData",array1);;//未回复
 | 
	
	
		
			
				|  | @ -3751,15 +4053,15 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                 JSONArray array4 = weekTotalStatistics7(startDate,endDate,area,level,index1,"1",SaveModel.timeLevel_ZL);//已完成
 | 
	
		
			
				|  |  |                 object.put("endData",array3);//进行中
 | 
	
		
			
				|  |  |             }else {
 | 
	
		
			
				|  |  |                 JSONArray array = weekTotalStatistics7(startDate,endDate,area,level,index1,null,SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |                 JSONArray array = weekTotalStatistics8(startDate,endDate,area,level,index1,lowCode,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |                 object.put("totalData",array);//新增量
 | 
	
		
			
				|  |  |                 JSONArray array1 = weekTotalStatistics7(startDate,endDate,area,level,index1,"0",SaveModel.timeLevel_ZL);//未接诊
 | 
	
		
			
				|  |  |                 JSONArray array1 = weekTotalStatistics8(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"0");//未接诊
 | 
	
		
			
				|  |  |                 object.put("noReceiveData",array1);;//未接诊
 | 
	
		
			
				|  |  |                 JSONArray array2 = weekTotalStatistics7(startDate,endDate,area,level,index,"1,2,3",SaveModel.timeLevel_ZL);//已接诊
 | 
	
		
			
				|  |  |                 JSONArray array2 = weekTotalStatistics8(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"1,2,3");//已接诊
 | 
	
		
			
				|  |  |                 object.put("haveReceiveData",array2);//已接诊
 | 
	
		
			
				|  |  |                 JSONArray array3 = weekTotalStatistics7(startDate,endDate,area,level,index,"-1",SaveModel.timeLevel_ZL);//患者取消
 | 
	
		
			
				|  |  |                 JSONArray array3 = weekTotalStatistics8(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"-1");//患者取消
 | 
	
		
			
				|  |  |                 object.put("concleData",array3);//患者取消
 | 
	
		
			
				|  |  |                 JSONArray array4 = weekTotalStatistics7(startDate,endDate,area,level,index,"3",SaveModel.timeLevel_ZL);//已结束
 | 
	
		
			
				|  |  |                 JSONArray array4 = weekTotalStatistics8(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"3");//已结束
 | 
	
		
			
				|  |  |                 object.put("endData",array4);//已结束
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -3776,15 +4078,15 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                 JSONArray array4 = monthTotalStatistics2(startDate,endDate,area,level,index1,"1",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |                 object.put("endData",array4);
 | 
	
		
			
				|  |  |             }else {
 | 
	
		
			
				|  |  |                 JSONArray array = monthTotalStatistics2(startDate,endDate,area,level,index1,null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |                 JSONArray array = monthTotalStatistics2(startDate,endDate,area,level,index1,lowCode,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |                 object.put("totalData",array);
 | 
	
		
			
				|  |  |                 JSONArray array1 = monthTotalStatistics2(startDate,endDate,area,level,index1,"0",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |                 JSONArray array1 = monthTotalStatistics2(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"0");
 | 
	
		
			
				|  |  |                 object.put("noReceiveData",array1);
 | 
	
		
			
				|  |  |                 JSONArray array2 = monthTotalStatistics2(startDate,endDate,area,level,index,"1,2,3",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |                 JSONArray array2 = monthTotalStatistics2(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"1,2,3");
 | 
	
		
			
				|  |  |                 object.put("haveReceiveData",array2);
 | 
	
		
			
				|  |  |                 JSONArray array3 = monthTotalStatistics2(startDate,endDate,area,level,index,"-1",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |                 JSONArray array3 = monthTotalStatistics2(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"-1");
 | 
	
		
			
				|  |  |                 object.put("concleData",array3);
 | 
	
		
			
				|  |  |                 JSONArray array4 = monthTotalStatistics2(startDate,endDate,area,level,index,"3",SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |                 JSONArray array4 = monthTotalStatistics2(startDate,endDate,area,level,index,lowCode,SaveModel.timeLevel_ZL,"3");
 | 
	
		
			
				|  |  |                 object.put("endData",array4);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -3804,13 +4106,13 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONObject getConsultingListPC(String startTime,String endTime,int level, String area, String lowLevel,String index) throws Exception {
 | 
	
		
			
				|  |  |     public JSONObject getConsultingListPC(String startTime,String endTime,int level, String area, String lowLevel,String index,String lowCode) throws Exception {
 | 
	
		
			
				|  |  |         JSONObject result = new JSONObject();
 | 
	
		
			
				|  |  |         String index1= (Integer.parseInt(index)+1)+"";
 | 
	
		
			
				|  |  | //        timeKey= "2017-11-01 00:00:00";
 | 
	
		
			
				|  |  |         if(index.equalsIgnoreCase("6")){
 | 
	
		
			
				|  |  |             //已结束
 | 
	
		
			
				|  |  |             List<SaveModel> endTotal = elasticsearchUtil.findListDateQuotaLevel1(startTime, endTime, area, level, index1, SaveModel.timeLevel_ZL, lowLevel,"1");
 | 
	
		
			
				|  |  |             List<SaveModel> endTotal = elasticsearchUtil.findListDateQuotaLevel2(startTime, endTime, area, level, index1, SaveModel.timeLevel_ZL, lowLevel,lowCode,"1");
 | 
	
		
			
				|  |  |             //进行中
 | 
	
		
			
				|  |  |             List<SaveModel> comingTotal = elasticsearchUtil.findListDateQuotaLevel1(startTime, endTime, area, level, index1, SaveModel.timeLevel_ZL, lowLevel,"0");
 | 
	
		
			
				|  |  |             //咨询总数
 | 
	
	
		
			
				|  | @ -3822,18 +4124,18 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             result.put("resultList", getCoutListPC(level, lowLevel, endTotal, total, noRelyTotal,relyTotal,comingTotal));
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             //已结束
 | 
	
		
			
				|  |  |             List<SaveModel> endTotal = elasticsearchUtil.findListDateQuotaLevel1(startTime, endTime, area, level, index, SaveModel.timeLevel_ZL, lowLevel,"3");
 | 
	
		
			
				|  |  |             List<SaveModel> endTotal = elasticsearchUtil.findListDateQuotaLevel2(startTime, endTime, area, level, index, SaveModel.timeLevel_ZL, lowLevel,lowCode,"3");
 | 
	
		
			
				|  |  |             //居民取消
 | 
	
		
			
				|  |  |             List<SaveModel> concleTotal = elasticsearchUtil.findListDateQuotaLevel1(startTime, endTime, area, level, index, SaveModel.timeLevel_ZL, lowLevel,"-1");
 | 
	
		
			
				|  |  |             List<SaveModel> concleTotal = elasticsearchUtil.findListDateQuotaLevel2(startTime, endTime, area, level, index, SaveModel.timeLevel_ZL, lowLevel,lowCode,"-1");
 | 
	
		
			
				|  |  |             //咨询总数
 | 
	
		
			
				|  |  |             List<SaveModel> total = elasticsearchUtil.findListDateQuotaLevel0(startTime, endTime, area, level, index1, SaveModel.timeLevel_ZL, lowLevel);
 | 
	
		
			
				|  |  |             List<SaveModel> total = elasticsearchUtil.findListDateQuotaLevel1(startTime, endTime, area, level, index1, SaveModel.timeLevel_ZL, lowLevel,lowCode);
 | 
	
		
			
				|  |  |             logger.info("total"+total==null?"0":String.valueOf(total.size())+";"+total.get(0).getResult1());
 | 
	
		
			
				|  |  |             //已接诊
 | 
	
		
			
				|  |  |             List<SaveModel> haveReceiveTotal = elasticsearchUtil.findListDateQuotaLevel1(startTime, endTime, area, level, index, SaveModel.timeLevel_ZL, lowLevel,"1,2,3");
 | 
	
		
			
				|  |  |             List<SaveModel> haveReceiveTotal = elasticsearchUtil.findListDateQuotaLevel2(startTime, endTime, area, level, index, SaveModel.timeLevel_ZL, lowLevel,lowCode,"1,2,3");
 | 
	
		
			
				|  |  |             //未接诊
 | 
	
		
			
				|  |  |             List<SaveModel> noReceiveTotal = elasticsearchUtil.findListDateQuotaLevel1(startTime, endTime, area, level, index, SaveModel.timeLevel_ZL, lowLevel,"0");
 | 
	
		
			
				|  |  |             List<SaveModel> noReceiveTotal = elasticsearchUtil.findListDateQuotaLevel2(startTime, endTime, area, level, index, SaveModel.timeLevel_ZL, lowLevel,lowCode,"0");
 | 
	
		
			
				|  |  |             logger.info("noReceiveTotal"+noReceiveTotal==null?"0":String.valueOf(noReceiveTotal.size())+";"+noReceiveTotal.get(0).getResult1());
 | 
	
		
			
				|  |  |             result.put("resultList", getCoutListPC1(level, lowLevel, endTotal, total, haveReceiveTotal,noReceiveTotal,concleTotal));
 | 
	
		
			
				|  |  |                 result.put("resultList", getCoutListPC1(level, lowLevel, endTotal, total, haveReceiveTotal,noReceiveTotal,concleTotal));
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -4126,11 +4428,11 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                 SaveModel saveModel1 = null;//图文
 | 
	
		
			
				|  |  |                 SaveModel saveModel2 = null;//视频
 | 
	
		
			
				|  |  |                 if (timeLevel.equalsIgnoreCase(SaveModel.timeLevel_ZL)){
 | 
	
		
			
				|  |  |                     saveModel1 = elasticsearchUtil.findOneDateQuotaLevel0(startDate, endDate, area, level,"12" , SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |                     saveModel2 = elasticsearchUtil.findOneDateQuotaLevel0(startDate, endDate, area, level,"16" , SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |                     saveModel1 = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level,"12" , SaveModel.timeLevel_ZL,"9");
 | 
	
		
			
				|  |  |                     saveModel2 = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level,"16" , SaveModel.timeLevel_ZL,"16");
 | 
	
		
			
				|  |  |                 }else if (timeLevel.equalsIgnoreCase(SaveModel.timeLevel_DDL)){
 | 
	
		
			
				|  |  |                     saveModel1 = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, area, level,"12" , SaveModel.timeLevel_DDL);
 | 
	
		
			
				|  |  |                     saveModel2 = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, area, level,"16" , SaveModel.timeLevel_DDL);
 | 
	
		
			
				|  |  |                     saveModel1 = elasticsearchUtil.findOneDateQuotaLevel1(endDate, endDate, area, level,"12" , SaveModel.timeLevel_DDL,"9");
 | 
	
		
			
				|  |  |                     saveModel2 = elasticsearchUtil.findOneDateQuotaLevel1(endDate, endDate, area, level,"16" , SaveModel.timeLevel_DDL,"16");
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 Double topicTotal = saveModel1.getResult1();
 | 
	
		
			
				|  |  |                 Double vedioTotal = saveModel2.getResult1();
 | 
	
	
		
			
				|  | @ -4541,16 +4843,19 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |     public  JSONObject appIndexCenter(String startDate, String endDate, String area, int level, String index) throws Exception {
 | 
	
		
			
				|  |  |         JSONObject object = new JSONObject();
 | 
	
		
			
				|  |  |         //图文复诊
 | 
	
		
			
				|  |  |         SaveModel topicTotal = elasticsearchUtil.findOneDateQuotaLevel0(startDate, endDate, area, level, "12", SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |         SaveModel topicTotal = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, "12", SaveModel.timeLevel_ZL,"9");
 | 
	
		
			
				|  |  |         object.put("topicTotal",topicTotal.getResult1());
 | 
	
		
			
				|  |  |         //视频复诊
 | 
	
		
			
				|  |  |         SaveModel videoTotal = elasticsearchUtil.findOneDateQuotaLevel0(startDate, endDate, area, level, "16", SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |         SaveModel videoTotal = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, "16", SaveModel.timeLevel_ZL,"16");
 | 
	
		
			
				|  |  |         object.put("videoTotal",videoTotal.getResult1());
 | 
	
		
			
				|  |  |         //专家咨询
 | 
	
		
			
				|  |  |         SaveModel specialistTotal = elasticsearchUtil.findOneDateQuotaLevel0(startDate, endDate, area, level, "6", SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |         object.put("specialistTotal",specialistTotal.getResult1());
 | 
	
		
			
				|  |  |         //专家咨询twzxData
 | 
	
		
			
				|  |  |         SaveModel specialistTotal = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, "12", SaveModel.timeLevel_ZL,"1");
 | 
	
		
			
				|  |  |         object.put("twzxTotal",specialistTotal.getResult1());
 | 
	
		
			
				|  |  |         //专家咨询twzxData
 | 
	
		
			
				|  |  |         SaveModel specialistSPTotal = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, "16", SaveModel.timeLevel_ZL,"17");
 | 
	
		
			
				|  |  |         object.put("spzxTotal",specialistSPTotal.getResult1());
 | 
	
		
			
				|  |  |         //专科协同
 | 
	
		
			
				|  |  |         SaveModel synergyTotal = elasticsearchUtil.findOneDateQuotaLevel0(startDate, endDate, area, level, "14", SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |         SaveModel synergyTotal = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, "14", SaveModel.timeLevel_ZL,"12");
 | 
	
		
			
				|  |  |         object.put("synergyTotal",synergyTotal.getResult1());
 | 
	
		
			
				|  |  |         return object;
 | 
	
		
			
				|  |  |     }
 | 
	
	
		
			
				|  | @ -4564,9 +4869,16 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |         //视频复诊
 | 
	
		
			
				|  |  |         SaveModel videoTotal = elasticsearchUtil.findOneDateQuotaLevel2(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL,"1","2");
 | 
	
		
			
				|  |  |         object.put("videoTotal",decimalFormat.format(videoTotal.getResult1()));
 | 
	
		
			
				|  |  |         //专家咨询
 | 
	
		
			
				|  |  |         /*//专家咨询
 | 
	
		
			
				|  |  |         SaveModel specialistTotal = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL,"3");
 | 
	
		
			
				|  |  |         object.put("specialistTotal",decimalFormat.format(specialistTotal.getResult1()));
 | 
	
		
			
				|  |  |         object.put("specialistTotal",decimalFormat.format(specialistTotal.getResult1()));*/
 | 
	
		
			
				|  |  |         //专家图文
 | 
	
		
			
				|  |  |         SaveModel specialistTW = elasticsearchUtil.findOneDateQuotaLevel2(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL,"3","1");
 | 
	
		
			
				|  |  |         object.put("specialistTW",decimalFormat.format(specialistTW.getResult1()));
 | 
	
		
			
				|  |  |         //专家视频
 | 
	
		
			
				|  |  |         SaveModel specialistSP = elasticsearchUtil.findOneDateQuotaLevel2(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL,"3","2");
 | 
	
		
			
				|  |  |         object.put("specialistSP",decimalFormat.format(specialistSP.getResult1()));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //专科协同
 | 
	
		
			
				|  |  |         SaveModel synergyTotal = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |         object.put("synergyTotal",decimalFormat.format(synergyTotal.getResult1()));
 | 
	
	
		
			
				|  | @ -4617,8 +4929,14 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             Double specialistCount =0.0;
 | 
	
		
			
				|  |  |             //专科咨询
 | 
	
		
			
				|  |  |             SaveModel saveModel4 = null;
 | 
	
		
			
				|  |  |             saveModel4 = elasticsearchUtil.findOneDateQuotaLevel1(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL, "3");
 | 
	
		
			
				|  |  |             specialistCount = saveModel4.getResult1();//专家咨询数量
 | 
	
		
			
				|  |  |             saveModel4 = elasticsearchUtil.findOneDateQuotaLevel2(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL, "3","1");
 | 
	
		
			
				|  |  |             specialistCount = saveModel4.getResult1();//专家咨询TW数量
 | 
	
		
			
				|  |  |             Double specialistCountSP =0.0;
 | 
	
		
			
				|  |  |             //专科咨询
 | 
	
		
			
				|  |  |             SaveModel saveModel6 = null;
 | 
	
		
			
				|  |  |             saveModel6 = elasticsearchUtil.findOneDateQuotaLevel2(startDate, endDate, area, level, index, SaveModel.timeLevel_ZL, "3","2");
 | 
	
		
			
				|  |  |             specialistCountSP = saveModel6.getResult1();//专家咨询SP数量
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //总量
 | 
	
		
			
				|  |  |             SaveModel saveModel5 = null;
 | 
	
	
		
			
				|  | @ -4631,7 +4949,9 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             Double total = saveModel5.getResult1();//总量
 | 
	
		
			
				|  |  |             DecimalFormat decimalFormat = new DecimalFormat("0.00");
 | 
	
		
			
				|  |  |             object.put("specialistCount",decimalFormat.format(specialistCount));//专家咨询数
 | 
	
		
			
				|  |  |             object.put("specialistSPCount",decimalFormat.format(specialistCountSP));//专家咨询视频数
 | 
	
		
			
				|  |  |             object.put("specialistRate",getRange(specialistCount.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |             object.put("specialistSPRate",getRange(specialistCountSP.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |             object.put("synergyCount",decimalFormat.format(synergyCount));//专家咨询数
 | 
	
		
			
				|  |  |             object.put("synergyRate",getRange(synergyCount.intValue(),total.intValue(),0));
 | 
	
		
			
				|  |  |             object.put("topicCount",decimalFormat.format(topicCount));//图文复诊数量
 | 
	
	
		
			
				|  | @ -4778,7 +5098,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             JSONObject range = new JSONObject();
 | 
	
		
			
				|  |  |             range.put("range", endStr);
 | 
	
		
			
				|  |  |             range.put("amount", 0);
 | 
	
		
			
				|  |  |             range.put("num",0.0);
 | 
	
		
			
				|  |  |             range.put("num",0.00);
 | 
	
		
			
				|  |  |             countResult.put(endStr, range);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -4804,6 +5124,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |         } else {
 | 
	
		
			
				|  |  |             saveModels = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, area, level, index, timelevel, SaveModel.interval_day);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         DecimalFormat decimalFormat = new DecimalFormat("0.00");
 | 
	
		
			
				|  |  |         if (saveModels != null) {
 | 
	
		
			
				|  |  |             // 计算结果
 | 
	
		
			
				|  |  |             for (SaveModel saveModel : saveModels) {
 | 
	
	
		
			
				|  | @ -4856,7 +5177,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                     long previousAmount = Long.valueOf(json.get("amount").toString());
 | 
	
		
			
				|  |  |                     double previousNum = Double.parseDouble(json.get("num").toString());
 | 
	
		
			
				|  |  |                     json.put("amount", amount+previousAmount);
 | 
	
		
			
				|  |  |                     json.put("num",num+previousNum);
 | 
	
		
			
				|  |  |                     json.put("num",decimalFormat.format(num+previousNum));
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -4981,7 +5302,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             JSONObject range = new JSONObject();
 | 
	
		
			
				|  |  |             range.put("range", endStr);
 | 
	
		
			
				|  |  |             range.put("amount", 0);
 | 
	
		
			
				|  |  |             range.put("num",0.0);
 | 
	
		
			
				|  |  |             range.put("num",0.00);
 | 
	
		
			
				|  |  |             countResult.put(endStr, range);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -5069,7 +5390,7 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                     long previousAmount = Long.valueOf(json.get("amount").toString());
 | 
	
		
			
				|  |  |                     double previousNum = Double.parseDouble(json.get("num").toString());
 | 
	
		
			
				|  |  |                     json.put("amount", amount+previousAmount);
 | 
	
		
			
				|  |  |                     json.put("num",num+previousNum);
 | 
	
		
			
				|  |  |                     json.put("num",decimalFormat.format(num+previousNum));
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 |