| 
					
				 | 
			
			
				@ -477,14 +477,21 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param searchTask 快速查找任务(1、我的任务,2、随访,3、复诊,4、健康教育) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param status 任务状态(0未完成,1已完成,2已预约) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param doctorCode 登陆医生 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param taskExecutor 任务执行者 0全部;1我的任务 2他人任务 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop calendarPlanDetailList(String planId,Integer searchTask,Integer status,String doctorCode,String executeStartTime,String executeEndTime){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop calendarPlanDetailList(String planId,Integer searchTask,Integer status,String doctorCode,String executeStartTime,String executeEndTime,String taskExecutor){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String[] planIdlist = planId.split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        StringBuilder planCondition = new StringBuilder(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        planCondition .append("'"+planIdlist[0]+"'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (int i=1;i<planIdlist.length;i++){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            planCondition .append(",'"+planIdlist[i]+"'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select d.*,DATE_FORMAT(d.execute_time,'%Y/%m/%d %H:%i') as executeTime ,i.code,i.name from wlyy_specialist.wlyy_rehabilitation_plan_detail d " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " LEFT JOIN wlyy_rehabilitation_service_item i on i.code = d.hospital_service_item_id  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " where  d.plan_id='"+planId+"' AND  d.execute_time IS NOT NULL  and d.execute_time <>'' " ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " where  d.plan_id in ("+planCondition+" )AND  d.execute_time IS NOT NULL  and d.execute_time <>'' " ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(searchTask!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(searchTask==8){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(searchTask==8){// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql+="and d.doctor='"+doctorCode+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql+=" and i.code="+searchTask+" " ; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -492,6 +499,12 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql+=" and i.reserve=1 " ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(taskExecutor.equals("1")){ //我的任务 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+="and d.doctor='"+doctorCode+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(taskExecutor.equals("2")){//他人任务 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+="and d.doctor <>'"+doctorCode+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(executeEndTime)&&StringUtils.isNoneBlank(executeStartTime)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+="and d.execute_time>='"+executeStartTime+"' and d.execute_time<='"+executeEndTime+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1217,7 +1230,7 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop appCalendarPlanDetailList(String planId,Integer searchTask,Integer status,String executeStartTime,String executeEndTime){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,Object> resultMap = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        ObjEnvelop objEnvelop = calendarPlanDetailList(planId,searchTask,status,null,executeStartTime,executeEndTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        ObjEnvelop objEnvelop = calendarPlanDetailList(planId,searchTask,status,null,executeStartTime,executeEndTime,"0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer finishCount = rehabilitationDetailDao.findByStatusAndPlanId(1,planId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer allCount = rehabilitationDetailDao.findAllByPlanId(planId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        resultMap.put("planDetailList",objEnvelop.getObj()); 
			 |