| 
					
				 | 
			
			
				@ -594,7 +594,7 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            planDetailList +=",'"+one+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String planDetailResult = StringUtils.isNotEmpty(planDetailList)?planDetailList.substring(1):""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "select i.name,i.code,d.execute_time,d.hospital_name,d.id,d.status,d.type as detailType,d.expense,d.doctor as executeDoctor," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "select i.name,i.code,i.content,d.execute_time,d.hospital_name,d.id,d.status,d.type as detailType,d.expense,d.doctor as executeDoctor," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " d.doctor_name as executeDoctorName,p.patient ,p.create_user as createDoctor,p.create_user_name as createDoctorName, p.status as planStatus  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " from wlyy_specialist.wlyy_rehabilitation_plan_detail d " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " LEFT JOIN wlyy_specialist.wlyy_rehabilitation_service_item i on i.code = d.hospital_service_item_id " + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -624,7 +624,7 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            resultMap.put("title",one.get("name"));//项目标题 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            resultMap.put("planDetaiId",one.get("id"));//计划服务项目id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            resultMap.put("shortExecuteTime",DateUtil.dateToStr((Date) one.get("execute_time"),DateUtil.HH_MM));//项目标题 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            resultMap.put("content",one.get("name"));//项目内容 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            resultMap.put("content",one.get("content"));//项目内容 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            resultMap.put("hospitalName",one.get("hospital_name"));//地点 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            resultMap.put("executeTime",one.get("execute_time"));//执行时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            DecimalFormat df = new DecimalFormat("0.00"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -691,7 +691,7 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop serviceItem(String planDetailId,String doctorCode) throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "select h.name as title,h.content as content,h.code as itemType,d.id,d.execute_time,d.hospital_name,d.status,d.type,d.expense,d.doctor as executeDoctor, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " d.doctor_name as executeDoctorName,p.patient ,p.name as patientName,p.create_user as createDoctor,p.create_user_name as createDoctorName, p.status as planStatus," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " p.disease,p.disease_name as diseaseName,p.title as planTitle,d.plan_id as planId "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " p.disease,p.disease_name as diseaseName,p.title as planTitle,d.plan_id as planId,d.relation_code as relationCode "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " from wlyy_specialist.wlyy_rehabilitation_plan_detail d " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " LEFT JOIN wlyy_specialist.wlyy_rehabilitation_service_item h on d.hospital_service_item_id = h.code "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id " + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -724,6 +724,7 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        resultMap.put("expense",one.get("expense")!=null?df.format(((Integer)one.get("expense")*1.00)/100.00):0);//收费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        resultMap.put("reserve",one.get("reserve"));//是否需要预约(1预约、0不预约) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        resultMap.put("planStatus",one.get("planStatus"));//计划的状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        resultMap.put("relationCode",one.get("relationCode"));//业务关联code 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer status = Integer.valueOf(one.get("status").toString());//状态(0未完成,1已完成,2已预约) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String statusName = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        switch (status){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1264,10 +1265,15 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param planDeatilId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Map<String,Object> updateNodeAndRelationRecordImg(String node,String image,String planDeatilId)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Map<String,Object> updateNodeAndRelationRecordImg(String node,String image,String planDeatilId,String relationCode)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,Object> resultMap = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int i = rehabilitationDetailDao.updateStatusById(1,planDeatilId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int i =0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (StringUtils.isNoneBlank(relationCode)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                i=rehabilitationDetailDao.updateStatusAndRelationCodeById(1,planDeatilId,relationCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                i=rehabilitationDetailDao.updateStatusById(1,planDeatilId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int j = rehabilitationOperateRecordsDao.updateNodeAndRelationRecordImg(node,image,planDeatilId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //如果整个计划的服务项都完成了,整个计划也完成了 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String allSql ="SELECT * FROM wlyy_rehabilitation_plan_detail where plan_id = (SELECT plan_id FROM `wlyy_rehabilitation_plan_detail` WHERE id='"+planDeatilId+"')"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1452,17 +1458,16 @@ public class RehabilitationManageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  d.plan_id," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  d.hospital," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  d.hospital_name," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  i.service_item_id," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  i.service_item_name," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  i.code as service_item_id," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  i.name as service_item_name," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  d.expense," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  r.doctor_code," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  r.doctor_name," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  r.complete_time, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  s.item_type " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  i.code as item_type " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  FROM" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  wlyy_rehabilitation_plan_detail d" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  LEFT JOIN wlyy_hospital_service_item i ON d.hospital_service_item_id = i.id  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  LEFT JOIN wlyy_service_item s ON i.service_item_id = s.id " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  LEFT JOIN wlyy_rehabilitation_service_item i ON d.hospital_service_item_id = i.code  "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  LEFT JOIN wlyy_rehabilitation_operate_records r ON d.id = r.rehabilitation_detail_id" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  WHERE" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  r.`status` = 1" + 
			 |