| 
					
				 | 
			
			
				@ -5,10 +5,13 @@ import com.fasterxml.jackson.databind.ObjectMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.dict.dao.DictHospitalDeptDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.doctor.dao.BaseDoctorDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.doctor.dao.BaseDoctorPatientDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.doctor.service.BaseDoctorInfoService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.dict.DictHospitalDeptDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.doctor.BaseDoctorDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.doctor.BaseDoctorPatientDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.doctor.BaseDoctorVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.org.BaseDoctorPatientFollowDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.org.BaseOrgDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.patient.BasePatientDO; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -41,6 +44,7 @@ import com.yihu.jw.hospital.message.service.SystemMessageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.prescription.dao.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.prescription.service.entrance.EntranceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.prescription.service.useragent.BaseUserAgent; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.ykyy.service.YkyyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.order.BusinessOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.order.dao.BusinessOrderDao; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -49,6 +53,7 @@ import com.yihu.jw.patient.dao.BaseDoctorPatientFollowDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.patient.dao.BasePatientDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.patient.dao.BasePatientMedicareCardDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.base.dict.DictHospitalDeptVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.base.doctor.BaseDoctorVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.base.org.BaseOrgVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.archive.ArchiveVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.consult.WlyyHospitalSysDictVO; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -56,7 +61,10 @@ import com.yihu.jw.restmodel.hospital.doctor.WlyyDoctorWorkTimeVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.Envelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.MixEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.ObjEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.PageEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.rm.iot.IotRequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.common.IdCardUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.date.DateUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.utils.WebserviceUtil; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -187,6 +195,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private PrescriptionEmrDao prescriptionEmrDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private WlyyConsultAdviceDao wlyyConsultAdviceDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private BaseDoctorPatientDao baseDoctorPatientDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private BaseUserAgent userAgent; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Value("${demo.flag}") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2944,9 +2957,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            //协同门诊量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            Integer coordinationCout = outpatientDao.countByDoctorAndStatusAndOutpatientType(doctor,"2","2"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            rs.put("coordinationCout",coordinationCout); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //医生关注 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<BaseDoctorPatientFollowDO> doctorPatientFollowDOS = baseOrgPatientDao.findByDoctor(doctor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (doctorPatientFollowDOS!=null&&doctorPatientFollowDOS.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                rs.put("attention","1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                rs.put("attention","0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //专家咨询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String zjCountsql = "SELECT id AS \"id\" FROM wlyy_consult_team WHERE doctor='"+doctor+"' AND (type=1 OR type=15)"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<Map<String,Object>> zjList = jdbcTemplate.queryForList(zjCountsql); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3575,7 +3594,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String,Object>> findDoctorByHospitalAndDiseaseAndDept(String iswork,String patientid,String orgCode, String dept, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                          String diseaseKey, String doctorNameKey, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                          String jobTitleNameKey, String outpatientType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                          String keyName, String workingTime, String consultStatus,String chargType,String consutlSort,Integer page,Integer pagesize) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                          String keyName, String workingTime, String consultStatus,String chargType,String consutlSort,String isAttention,Integer page,Integer pagesize) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      /*  if(page >=1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            page --; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3599,14 +3618,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " d.outpatient_type AS \"outpatientType\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " a.total AS \"consultTotal\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " h.org_name AS \"orgName\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " follow.patient AS \"followid\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " h.org_code AS \"orgCode\"" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " FROM " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " base_doctor d " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " JOIN base_doctor_hospital h ON h.doctor_code = d.id "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " Left join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient='"+patientid+"'"+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " Left join ( select count(id) as total,doctor from wlyy_outpatient where status = 2 GROUP BY doctor ) a on a.doctor = d.id "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (isAttention.equalsIgnoreCase("1")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+="Left join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient ='"+patientid+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (isAttention.equalsIgnoreCase("0")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += "Left join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient !='" + patientid + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isNotBlank(diseaseKey)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" left join wlyy_doctor_special_disease sp on d.id = sp.doctor_code "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -5675,7 +5698,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 保存排班规则 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param workRoleJsons 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param advicesJson 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Boolean sendOutPatientSuggest(String advicesJson){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -5692,4 +5715,203 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<WlyyConsultAdvice> getConsultSuggest(String consultcode) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return wlyyConsultAdviceDao.getByConsult(consultcode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 关注医生 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param doctorId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    public Envelop attentionDoctor(String doctorId){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctorId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        if (doctorDO==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            return Envelop.getError("医生不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        BaseDoctorPatientDO doctorPatientDO = new BaseDoctorPatientDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        doctorPatientDO.setDoctorCode(doctorId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        doctorPatientDO.setDoctorName(doctorDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        String uid = userAgent.getUID(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        BasePatientDO patientDO = basePatientDao.findById(uid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        if (patientDO==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            return ObjEnvelop.getError("患者不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        doctorPatientDO.setPatientCode(uid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        doctorPatientDO.setPatientName(patientDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        doctorPatientDO.setStatus(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        baseDoctorPatientDao.save(doctorPatientDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        return ObjEnvelop.getSuccess("关注成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     *查询患者关注的医生 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param keyWord 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param outPatient 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param jobTitleCode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param shift 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param page 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param pagesize 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    public PageEnvelop findAllAttentionDoctor(String keyWord, Integer outPatient, String jobTitleCode, Integer shift, Integer page, Integer pagesize) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        StringBuffer sql = new StringBuffer("SELECT DISTINCT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tc.*, e.org_name,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\te.dept_name,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tIFNULL(k.disease_name,NULL)\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tdisease_name\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "FROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tbase_doctor c\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "RIGHT JOIN (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tSELECT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\tdoctor_code\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tFROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\tbase_doctor_paitent\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tWHERE\n" + " patient_code = '"+userAgent.getUID()+"'\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                " ) d ON c.id = d.doctor_code\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "LEFT JOIN (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tSELECT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\t*\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tFROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\twlyy_doctor_special_disease\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                ") k ON k.doctor_code = c.id\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "LEFT JOIN (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tSELECT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\t*\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tFROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\tbase_doctor_hospital\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                ") e ON e.doctor_code = c.id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        StringBuffer countSql = new StringBuffer("SELECT DISTINCT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tc.*, e.org_name,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\te.dept_name,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tk.disease_name\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "FROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tbase_doctor c\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "RIGHT JOIN (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tSELECT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\tdoctor_code\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tFROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\tbase_doctor_paitent\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tWHERE\n" + " patient_code = '"+userAgent.getUID()+"'\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                " ) d ON c.id = d.doctor_code\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "LEFT JOIN (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tSELECT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\t*\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tFROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\twlyy_doctor_special_disease\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                ") k ON k.doctor_code = c.id\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "LEFT JOIN (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tSELECT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\t*\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\tFROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "\t\tbase_doctor_hospital\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                ") e ON e.doctor_code = c.id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        if (shift==1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            sql.append(" JOIN (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tSELECT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\t*\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tFROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\tbase_doctor_hospital\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tWHERE\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\tdept_name = '发热门诊'\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    ") h ON h.doctor_code = c.id "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            countSql.append(" JOIN (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tSELECT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\t*\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tFROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\tbase_doctor_hospital\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tWHERE\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\tdept_name = '发热门诊'\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    ") h ON h.doctor_code = c.id "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        if (StringUtils.isNotEmpty(jobTitleCode)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            sql.append(" AND c.job_title_code =").append(jobTitleCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            countSql.append(" AND c.job_title_code =").append(jobTitleCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        if (outPatient==1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            sql.append(" JOIN (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tSELECT DISTINCT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\t*\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tFROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\twlyy_doctor_work_time\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tGROUP BY\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\tdoctor\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    ") f ON f.doctor = c.id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            countSql.append(" JOIN (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tSELECT DISTINCT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\t*\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tFROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\twlyy_doctor_work_time\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\tGROUP BY\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t\tdoctor\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    ") f ON f.doctor = c.id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        if(StringUtils.isNotEmpty(keyWord)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            sql.append(" WHERE\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t(\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " c.`name` LIKE  '%"+keyWord+"%'" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " OR e.dept_name LIKE '%"+keyWord+"%' " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " OR e.org_name LIKE  '%"+keyWord+"%'" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " OR c.expertise LIKE  '%"+keyWord+"%'" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " OR c.introduce LIKE  '%"+keyWord+"%'" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " OR k.disease_name LIKE  '%"+keyWord+"%'" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    ") "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            countSql.append(" WHERE\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "\t(\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " c.`name` LIKE  '%"+keyWord+"%'" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " OR e.dept_name LIKE '%"+keyWord+"%' " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " OR e.org_name LIKE  '%"+keyWord+"%'" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " OR c.expertise LIKE  '%"+keyWord+"%'" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " OR c.introduce LIKE  '%"+keyWord+"%'" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    " OR k.disease_name LIKE  '%"+keyWord+"%'" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    ") "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        countSql.append(" GROUP BY c.id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        List<Map<String, Object>> countList = jdbcTemplate.queryForList(countSql.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        long count=countList.size(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        sql.append(" ORDER BY C.update_time LIMIT ").append((page-1)*pagesize).append(",").append(pagesize); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        List<Map<String, Object>> mapList = jdbcTemplate.queryForList(sql.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        List<BaseDoctorVO> list = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        mapList.forEach(one->{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            String json = com.alibaba.fastjson.JSONObject.toJSONString(one); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            BaseDoctorDO doctorDO = com.alibaba.fastjson.JSONObject.parseObject(json, BaseDoctorDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            BaseDoctorVO doctorVO = convertToModel(doctorDO, BaseDoctorVO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if (one.get("org_name")!=null&&StringUtils.isNotEmpty(one.get("org_name").toString())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                doctorVO.setHospital(one.get("org_name").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if(one.get("dept_name")!=null&&StringUtils.isNotEmpty(one.get("dept_name").toString())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                ArrayList<String> deptList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                deptList.add(one.get("dept_name").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                doctorVO.setDepartment(deptList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if (one.get("disease_name")!=null&&StringUtils.isNotEmpty(one.get("disease_name").toString())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                ArrayList<String> disList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                disList.add(one.get("disease_name").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                doctorVO.setDisease(disList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if (list!=null&&list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                list.forEach(tow->{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    if (doctorVO.getId().equalsIgnoreCase(tow.getId())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                        if (tow.getDepartment()!=null&&StringUtils.isNotEmpty(tow.getDepartment().get(0))){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            doctorVO.getDepartment().add(tow.getDepartment().get(0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                        if (tow.getDisease()!=null&&StringUtils.isNotEmpty(tow.getDisease().get(0))){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            doctorVO.getDisease().add(tow.getDisease().get(0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                        list.remove(tow); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            list.add(doctorVO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        return PageEnvelop.getSuccessListWithPage(IotRequestMapping.Common.message_success_find,list,page,pagesize,count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |