|  | @ -1379,7 +1379,9 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             }else {
 | 
	
		
			
				|  |  |                 saveModels = elasticsearchUtil.findLineChartDateQuotaLevel1(startDate, endDate, area, level, index, timelevel, SaveModel.interval_day, lowCode);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         } else {
 | 
	
		
			
				|  |  |         }else if(StringUtils.isNoneBlank(lowCode2)){
 | 
	
		
			
				|  |  |             saveModels = elasticsearchUtil.findLineChartDateQuotaLevel2(startDate, endDate, area, level, index, timelevel, SaveModel.interval_day, lowCode,lowCode2);
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             saveModels = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, area, level, index, timelevel, SaveModel.interval_day);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         List<JSONObject> result = new ArrayList<>();
 | 
	
	
		
			
				|  | @ -1752,7 +1754,10 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                 saveModels = elasticsearchUtil.findLineChartDateQuotaLevel1(startDate, endDate, area, level, index, timelevel, SaveModel.interval_week, lowCode);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         } else {
 | 
	
		
			
				|  |  |         }else if(StringUtils.isNoneBlank(lowCode2)){
 | 
	
		
			
				|  |  |             saveModels = elasticsearchUtil.findLineChartDateQuotaLevel2(startDate, endDate, area, level, index, timelevel, SaveModel.interval_week, lowCode,lowCode2);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         else {
 | 
	
		
			
				|  |  |             saveModels = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, area, level, index, timelevel, SaveModel.interval_week);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -1895,6 +1900,9 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |             }else {
 | 
	
		
			
				|  |  |                 saveModels = elasticsearchUtil.findLineChartDateQuotaLevel1(startDate, endDate, area, level, index, timelevel, SaveModel.interval_month, lowCode);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         } else if(StringUtils.isNoneBlank(lowCode2)){
 | 
	
		
			
				|  |  |             saveModels = elasticsearchUtil.findLineChartDateQuotaLevel2(startDate, endDate, area, level, index, timelevel, SaveModel.interval_month, lowCode,lowCode2);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         } else {
 | 
	
		
			
				|  |  |             saveModels = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate, endDate, area, level, index, timelevel, SaveModel.interval_month);
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -3461,31 +3469,36 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |     public JSONObject getPrescriptionLine(String startDate, String endDate, String area, int level, String index,int interval, String level2_type) throws Exception {
 | 
	
		
			
				|  |  |         logger.info("service index:"+index+" and level2_type:"+level2_type+" and level:"+level);
 | 
	
		
			
				|  |  |         String[] indexes = index.split(",");
 | 
	
		
			
				|  |  |         JSONArray array = new JSONArray();
 | 
	
		
			
				|  |  |         JSONArray resultArray = new JSONArray();
 | 
	
		
			
				|  |  |         //问诊量
 | 
	
		
			
				|  |  |         JSONObject object = new JSONObject();
 | 
	
		
			
				|  |  |         if (interval==1){
 | 
	
		
			
				|  |  |              array = dateTotalStatistics2(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             //图文
 | 
	
		
			
				|  |  |             JSONArray array = dateTotalStatistics2(startDate,endDate,area,level,indexes[1],null,SaveModel.timeLevel_ZL,"1");
 | 
	
		
			
				|  |  |             object.put("data",array);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //视频
 | 
	
		
			
				|  |  |             JSONArray array1 = dateTotalStatistics2(startDate,endDate,area,level,indexes[1],null,SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("data",array1);
 | 
	
		
			
				|  |  |         }else if (interval==2){
 | 
	
		
			
				|  |  |              array = weekTotalStatistics(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             JSONArray array = weekTotalStatistics2(startDate,endDate,area,level,indexes[1],null,SaveModel.timeLevel_ZL,"1");
 | 
	
		
			
				|  |  |             JSONArray array1 = weekTotalStatistics2(startDate,endDate,area,level,indexes[1],null,SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("data",array);
 | 
	
		
			
				|  |  |             object.put("data",array1);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         }else if (interval==3){
 | 
	
		
			
				|  |  |              array = monthTotalStatistics2(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             JSONArray array = monthTotalStatistics2(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL,"1");
 | 
	
		
			
				|  |  |             JSONArray array1 = monthTotalStatistics2(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("data",array);
 | 
	
		
			
				|  |  |             object.put("data",array1);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (StringUtils.isNoneBlank(level2_type)){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //问诊量表格
 | 
	
		
			
				|  |  |             List<SaveModel> specialistSaveModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[0], SaveModel.timeLevel_ZL,"",String.valueOf(interval),"6");
 | 
	
		
			
				|  |  |             List<SaveModel> outpatientList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[0], SaveModel.timeLevel_ZL,"",String.valueOf(interval),level2_type);
 | 
	
		
			
				|  |  |             //开具处方数量
 | 
	
		
			
				|  |  |             List<SaveModel> prescriptionSaveModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[1], SaveModel.timeLevel_ZL,"",String.valueOf(interval),"4");
 | 
	
		
			
				|  |  |             //每个医生根据传入时间查询开具处方数量
 | 
	
		
			
				|  |  |             List<SaveModel> doctorSaveModels = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[1], SaveModel.timeLevel_ZL,"",String.valueOf(interval),"6");
 | 
	
		
			
				|  |  |             for (int i=0;i<prescriptionSaveModels.size();i++){
 | 
	
		
			
				|  |  |             List<SaveModel> precriptionList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[1], SaveModel.timeLevel_ZL,"",String.valueOf(interval),level2_type);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             /*for (int i=0;i<prescriptionSaveModels.size();i++){
 | 
	
		
			
				|  |  |                 JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |                 Double specialist = 0.0;
 | 
	
		
			
				|  |  |                 Double totalOutpatient = 0.0;
 | 
	
	
		
			
				|  | @ -3504,9 +3517,8 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |                 String prescriptionRate = getRange(specialist.intValue(),totalOutpatient.intValue(),0);
 | 
	
		
			
				|  |  |                 jsonObject.put("prescriptionRate",prescriptionRate);
 | 
	
		
			
				|  |  |                 resultArray.add(jsonObject);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             }*/
 | 
	
		
			
				|  |  |             object.put("excelData",resultArray);
 | 
	
		
			
				|  |  |             object.put("detailList",prescriptionSaveModels);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         return object;
 | 
	
		
			
				|  |  |     }
 | 
	
	
		
			
				|  | @ -3526,21 +3538,27 @@ public class StatisticsEsService {
 | 
	
		
			
				|  |  |     public JSONObject getPrescriptionLineByType(String startDate, String endDate, String area, int level, String index,int interval, String level2_type) throws Exception {
 | 
	
		
			
				|  |  |         logger.info("service index:"+index+" and level2_type:"+level2_type+" and level:"+level);
 | 
	
		
			
				|  |  |         String[] indexes = index.split(",");
 | 
	
		
			
				|  |  |         JSONArray array = new JSONArray();
 | 
	
		
			
				|  |  |         JSONArray resultArray = new JSONArray();
 | 
	
		
			
				|  |  |         //问诊量
 | 
	
		
			
				|  |  |         JSONObject object = new JSONObject();
 | 
	
		
			
				|  |  |         if (interval==1){
 | 
	
		
			
				|  |  |             array = dateTotalStatistics2(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             //图文
 | 
	
		
			
				|  |  |             JSONArray array = dateTotalStatistics2(startDate,endDate,area,level,indexes[1],null,SaveModel.timeLevel_ZL,"1");
 | 
	
		
			
				|  |  |             object.put("data",array);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //视频
 | 
	
		
			
				|  |  |             JSONArray array1 = dateTotalStatistics2(startDate,endDate,area,level,indexes[1],null,SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("data",array1);
 | 
	
		
			
				|  |  |         }else if (interval==2){
 | 
	
		
			
				|  |  |             array = weekTotalStatistics(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL);
 | 
	
		
			
				|  |  |             JSONArray array = weekTotalStatistics2(startDate,endDate,area,level,indexes[1],null,SaveModel.timeLevel_ZL,"1");
 | 
	
		
			
				|  |  |             JSONArray array1 = weekTotalStatistics2(startDate,endDate,area,level,indexes[1],null,SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("data",array);
 | 
	
		
			
				|  |  |             object.put("data",array1);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         }else if (interval==3){
 | 
	
		
			
				|  |  |             array = monthTotalStatistics2(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL,null);
 | 
	
		
			
				|  |  |             JSONArray array = monthTotalStatistics2(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL,"1");
 | 
	
		
			
				|  |  |             JSONArray array1 = monthTotalStatistics2(startDate,endDate,area,level,index,null,SaveModel.timeLevel_ZL,"2");
 | 
	
		
			
				|  |  |             object.put("data",array);
 | 
	
		
			
				|  |  |             object.put("data",array1);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (StringUtils.isNoneBlank(level2_type)){
 | 
	
		
			
				|  |  | 
 |