| 
					
				 | 
			
			
				@ -28,6 +28,7 @@ import com.yihu.jw.patient.service.BasePatientService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.date.DateUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.http.HttpClientUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.idcard.IdCardUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.utils.StringUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.collections.map.HashedMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.http.NameValuePair; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1505,13 +1506,17 @@ public class FollowUpService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    //============================上门访视相关接口================================================ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Map<String, Object> findFollowupByMonth(String doctor, String patient, String followupClass, String patientName, String startTime, String endTime, String flag, Integer type1, String status) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Map<String, Object> findFollowupByMonth( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String doctor, String patient, String followupClass, String patientName, String startTime, String endTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String flag, Integer type1, String status,String disease) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sqlList = "select  wf.id as id,wf.followup_no as followupNo,wf.followup_date as followupDate,wf.followup_plan_date as followupPlanDate,wf.followup_next_date as followupNextDate," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " wf.followup_type as followupType,wf.followup_class as followupClass,wf.followup_manager_status as followupManagerStatus,wf.doctor_code as doctorCode,wf.doctor_name as doctorName," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "wf.jwdoctor_code as jwdoctorCode,wf.org_code as orgCode,wf.org_name as orgName,wf.jworg_code as jworgCode,wf.patient_code as patientCode,wf.patient_name as patientName,wf.idcard," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "wf.data_from as dataFrom,wf.status,wf.followup_content_phone as followupContentPhone,wf.creater,wf.sign_type as signType,wf.admin_team_code as adminTeamCode,wf.sign_code as signCode," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "wf.data_from as dataFrom,wf.status,wf.followup_cont ent_phone as followupContentPhone,wf.creater,wf.sign_type as signType,wf.admin_team_code as adminTeamCode,wf.sign_code as signCode," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "wf.prescription_code as prescriptionCode,wf.type, q.plan_id as planId ,q.plan_detail_id  as planDetailId,q.id as planItemId "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " from wlyy_followup wf inner join base_service_item_plan q on wf.id=q.relation_code"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " from wlyy_followup wf " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  inner join base_service_item_plan q on wf.id=q.relation_code  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  inner join wlyy_patient_rehabilitation_plan p on q.plan_id=p.id "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql += " where 1=1 and wf.status !=0"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (!org.apache.commons.lang.StringUtils.isEmpty(doctor)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and wf.doctor_code = '" + doctor + "'"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1531,6 +1536,9 @@ public class FollowUpService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(status)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and wf.status ='" + status + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(disease)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and p.disease ='" + disease + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (!org.apache.commons.lang.StringUtils.isEmpty(endTime)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Date currentTime = DateUtil.strToDate(endTime + " 23:59:59"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
			 |