|  | @ -200,7 +200,7 @@ public class RehabilitationManageService {
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public ObjEnvelop findRehabilitationPlanDetailList(String currentDoctorCode,String patientCode) throws Exception{
 | 
	
		
			
				|  |  |         String sql = " select DISTINCT r.* from wlyy_specialist.wlyy_specialist_patient_relation r join wlyy_patient_rehabilitation_plan p on r.patient=p.patient where r.sign_status ='1' and r.status in('0','1') and r.patient='"+patientCode+"' ";
 | 
	
		
			
				|  |  |         sql = TransforSqlUtl.specialistPatientRelationAll(sql);
 | 
	
		
			
				|  |  |         sql = TransforSqlUtl.specialistPatientRelationAll2(sql);
 | 
	
		
			
				|  |  |         List<Map<String,Object>> specialistPatientRelationList = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  |         List<Map<String,Object>> resultList = new ArrayList<>();
 | 
	
		
			
				|  |  |         for(Map<String,Object> temp: specialistPatientRelationList){
 | 
	
	
		
			
				|  | @ -216,7 +216,7 @@ public class RehabilitationManageService {
 | 
	
		
			
				|  |  |             resultMap.put("healthyConditionType",healthyConditionType);
 | 
	
		
			
				|  |  |             //专科医生
 | 
	
		
			
				|  |  |             String specialistRelationSql = "select r.*,t.name as teamName,h.name as specialistHospitalName from wlyy_specialist.wlyy_specialist_patient_relation r left join "+basedb+".wlyy_admin_team t on r.team_code=t.id left join "+basedb+".dm_hospital h on t.org_code=h.code where r.sign_status ='1' and r.status in('0','1') and r.patient='"+patientCode+"' and r.doctor='"+doctorCode+"'";
 | 
	
		
			
				|  |  |             specialistRelationSql = TransforSqlUtl.specialistPatientRelationAll(specialistRelationSql);
 | 
	
		
			
				|  |  |             specialistRelationSql = TransforSqlUtl.specialistPatientRelationAll2(specialistRelationSql);
 | 
	
		
			
				|  |  |             List<Map<String,Object>> specialistRelationList = jdbcTemplate.queryForList(specialistRelationSql);
 | 
	
		
			
				|  |  |             Map<String,Object> specialistMap = specialistRelationList.get(0);
 | 
	
		
			
				|  |  |             resultMap.put("specialistAdminTeamName",specialistMap.get("teamName"));
 | 
	
	
		
			
				|  | @ -507,7 +507,7 @@ public class RehabilitationManageService {
 | 
	
		
			
				|  |  |             sql+= "and d.status="+status;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         sql +="  order by d.execute_time desc ";
 | 
	
		
			
				|  |  |         sql = TransforSqlUtl.wlyy_rehabilitation_plan_detailAll(sql);
 | 
	
		
			
				|  |  |         sql = TransforSqlUtl.wlyy_rehabilitation_plan_detailAll2(sql);
 | 
	
		
			
				|  |  |         List<Map<String,Object>> rehabilitationDetailList = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  |         return ObjEnvelop.getSuccess(SpecialistMapping.api_success,rehabilitationDetailList);
 | 
	
		
			
				|  |  |     }
 | 
	
	
		
			
				|  | @ -632,9 +632,9 @@ public class RehabilitationManageService {
 | 
	
		
			
				|  |  |                 " LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id " +
 | 
	
		
			
				|  |  |                 " LEFT JOIN wlyy_specialist.wlyy_plan_detail_appointment a on d.id=.a.rehabilitation_plan_detail_id " +
 | 
	
		
			
				|  |  |                 " where d.id = '"+planDetailId+"'";
 | 
	
		
			
				|  |  |         sql = TransforSqlUtl.wlyy_patient_rehabilitation_planName(sql);
 | 
	
		
			
				|  |  |         sql = TransforSqlUtl.wlyy_patient_rehabilitation_planName2(sql);
 | 
	
		
			
				|  |  |         sql = TransforSqlUtl.wlyy_patient_rehabilitation_planCreateName(sql);
 | 
	
		
			
				|  |  |         sql = TransforSqlUtl.wlyy_plan_detail_appointmentAll(sql);
 | 
	
		
			
				|  |  |         sql = TransforSqlUtl.wlyy_plan_detail_appointmentAppDoctorName(sql);
 | 
	
		
			
				|  |  |         sql = TransforSqlUtl.wlyy_rehabilitation_plan_detailDoctorName(sql);
 | 
	
		
			
				|  |  |         List<Map<String,Object>> serviceItemList = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  |         if (serviceItemList.size()==0){
 | 
	
	
		
			
				|  | @ -730,10 +730,13 @@ public class RehabilitationManageService {
 | 
	
		
			
				|  |  |             resultMap.put("recordFlag",temp.getFlag());
 | 
	
		
			
				|  |  |             resultMap.put("recordId",temp.getId());
 | 
	
		
			
				|  |  |             JSONArray imgs = new JSONArray();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             if (temp.getRelationRecordImg()!=null&&StringUtils.isNotEmpty(temp.getRelationRecordImg())){
 | 
	
		
			
				|  |  |                 imgs.put(temp.getRelationRecordImg());
 | 
	
		
			
				|  |  |                 resultMap.put("relationRecordImg",(temp.getRelationRecordImg()!=null&&StringUtils.isNotEmpty(temp.getRelationRecordImg()))?(new JSONArray(temp.getRelationRecordImg())):null);//json格式
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             else{
 | 
	
		
			
				|  |  |                 resultMap.put("relationRecordImg",imgs);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             resultMap.put("relationRecordImg",imgs);
 | 
	
		
			
				|  |  |          /*   if(itemType!=1&&itemType!=0){*/
 | 
	
		
			
				|  |  |                 resultMap.put("relationRecordCode",temp.getRelationRecordCode());
 | 
	
		
			
				|  |  |                 resultMap.put("completeTimeShort",DateUtil.dateToStr(completeTime,"yyyy/MM/dd"));
 |