| 
					
				 | 
			
			
				@ -589,14 +589,19 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param taskExecutor 任务执行者 0全部;1我的任务 2他人任务 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop calendarPlanDetail(String executeStartTime, String executeEndTime, String planId, Integer searchTask, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         Integer status, String doctorCode, String taskExecutor) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        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.* from base_service_item_plan d  where d.plan_id in (" + planCondition + " ) "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         Integer status, String doctorCode, String taskExecutor,String patient) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select d.* from base_service_item_plan d  where "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isNotBlank(patient)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += "  d.patient = '" + patient + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String[] planIdlist = planId.split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            StringBuilder planCondition = new StringBuilder(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            planCondition.append("'" + planIdlist[0] + "'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (int i = 1; i < planIdlist.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                planCondition.append(",'" + planIdlist[i] + "'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += "  d.plan_id in (" + planCondition + " ) "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(executeStartTime)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and d.plan_time>='" + executeStartTime + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -676,12 +681,6 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            map.put(executeTime, m); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        /*List list = new ArrayList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for(String key : map.keySet()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String,Object> result = map.get(key); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            result.put("executeTime", key); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            list.add(result); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return ObjEnvelop.getSuccess(SpecialistMapping.api_success, map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -695,14 +694,21 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param taskExecutor 任务执行者 0全部;1我的任务 2他人任务 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    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.* from base_service_item_plan d  where d.plan_id in (" + planCondition + " ) "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             String executeStartTime, String executeEndTime, String taskExecutor,String patient) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select d.* from base_service_item_plan d  where "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isNotBlank(patient)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += "  d.patient = '" + patient + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String[] planIdlist = planId.split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            StringBuilder planCondition = new StringBuilder(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            planCondition.append("'" + planIdlist[0] + "'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (int i = 1; i < planIdlist.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                planCondition.append(",'" + planIdlist[i] + "'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += "  d.plan_id in (" + planCondition + " ) "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (searchTask != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (searchTask == 8) {// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (StringUtils.isNotBlank(doctorCode)) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1618,7 +1624,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, "0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        ObjEnvelop objEnvelop = calendarPlanDetailList(planId, searchTask, status, null, executeStartTime, executeEndTime, "0",null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer finishCount = rehabilitationDetailDao.findByStatusAndPlanId(1, planId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer allCount = rehabilitationDetailDao.findAllByPlanId(planId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        resultMap.put("planDetailList", objEnvelop.getObj()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2680,7 +2686,7 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        param.put("taskExecutor", taskExecutor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        ObjEnvelop objEnvelop = calendarPlanDetailList(planIds.toString(), searchTask, status, doctorCode, executeStartTime, executeEndTime, taskExecutor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        ObjEnvelop objEnvelop = calendarPlanDetailList(planIds.toString(), searchTask, status, doctorCode, executeStartTime, executeEndTime, taskExecutor,null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        org.json.JSONObject result = new org.json.JSONObject(objEnvelop); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (result.getInt("status") == 200) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2936,33 +2942,4 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return medicalRecordsDOS; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 康复管理-康复计划按列表展示(区分我的任务他人任务) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param executeStartTime 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param executeEndTime 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param planId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param searchTask 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param status 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param doctorCode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONArray calendarPlanDetailListWithTaskExecutor(String executeStartTime, String executeEndTime, String planId, Integer searchTask, Integer status, String doctorCode, String taskExecutor) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String, Object> param = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        param.put("executeStartTime", executeStartTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        param.put("executeEndTime", executeEndTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        param.put("planId", planId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        param.put("searchTask", searchTask); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        param.put("status", status); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        param.put("doctorCode", doctorCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        param.put("taskExecutor", taskExecutor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        ObjEnvelop objEnvelop = calendarPlanDetailList(planId, searchTask, status, doctorCode, executeStartTime, executeEndTime, taskExecutor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        org.json.JSONObject result = new org.json.JSONObject(objEnvelop); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (result.getInt("status") == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return result.getJSONArray("obj"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        throw new Exception("请求失败!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |