|  | @ -670,7 +670,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |      * @param dept
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public List<Map<String,Object>> findDoctorByHospitalAndDept(String orgCode,String dept,String chargeType,String doctorCode){
 | 
	
		
			
				|  |  |     public List<Map<String,Object>> findDoctorByHospitalAndDept(String orgCode,String dept,String chargeType,String doctorCode,String outpatientType){
 | 
	
		
			
				|  |  |         String sql ="SELECT " +
 | 
	
		
			
				|  |  |                 " d.id, " +
 | 
	
		
			
				|  |  |                 " d.photo, " +
 | 
	
	
		
			
				|  | @ -679,7 +679,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |                 " d.introduce," +
 | 
	
		
			
				|  |  |                 " d.job_title_code AS jobTitleCode, " +
 | 
	
		
			
				|  |  |                 " d.job_title_name AS jobTitleName," +
 | 
	
		
			
				|  |  |                 " d.charge_type AS chargeType" +
 | 
	
		
			
				|  |  |                 " d.charge_type AS chargeType," +
 | 
	
		
			
				|  |  |                 " d.outpatient_type AS outpatientType," +
 | 
	
		
			
				|  |  |                 " d.consult_status AS consultStatus" +
 | 
	
		
			
				|  |  |                 " FROM " +
 | 
	
		
			
				|  |  |                 " base_doctor d " +
 | 
	
		
			
				|  |  |                 " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
 | 
	
	
		
			
				|  | @ -689,6 +691,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(chargeType)){
 | 
	
		
			
				|  |  |             sql+=" AND d.charge_type ='"+chargeType+"'";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(outpatientType)){
 | 
	
		
			
				|  |  |             sql+=" AND d.outpatient_type like'%"+outpatientType+"%'";
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             sql+=" AND d.outpatient_type is not null ";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if(list!=null&&list.size()>0&&StringUtils.isNotBlank(doctorCode)){
 | 
	
	
		
			
				|  | @ -710,7 +717,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |      * @param dept
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public MixEnvelop findDoctorWithWork(String orgCode,String dept,String chargeType,String doctorCode,Integer page,Integer size){
 | 
	
		
			
				|  |  |     public MixEnvelop findDoctorWithWork(String orgCode,String dept,String chargeType,String doctorCode,String outpatientType,Integer page,Integer size){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String totalSql ="SELECT " +
 | 
	
		
			
				|  |  |                 " count(1) AS total " +
 | 
	
	
		
			
				|  | @ -723,6 +730,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(chargeType)){
 | 
	
		
			
				|  |  |             totalSql+=" AND d.charge_type ='"+chargeType+"'";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(outpatientType)){
 | 
	
		
			
				|  |  |             totalSql+=" AND d.outpatient_type like'%"+outpatientType+"%'";
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             totalSql+=" AND d.outpatient_type is not null ";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Long count = 0L;
 | 
	
	
		
			
				|  | @ -740,7 +752,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |                 " d.job_title_name AS jobTitleName," +
 | 
	
		
			
				|  |  |                 " d.charge_type AS chargeType," +
 | 
	
		
			
				|  |  |                 " h.dept_code AS deptCode," +
 | 
	
		
			
				|  |  |                 " h.dept_Name AS deptName" +
 | 
	
		
			
				|  |  |                 " h.dept_Name AS deptName," +
 | 
	
		
			
				|  |  |                 " d.outpatient_type AS outpatientType," +
 | 
	
		
			
				|  |  |                 " d.consult_status AS consultStatus" +
 | 
	
		
			
				|  |  |                 " FROM " +
 | 
	
		
			
				|  |  |                 " base_doctor d " +
 | 
	
		
			
				|  |  |                 " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
 | 
	
	
		
			
				|  | @ -750,6 +764,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(chargeType)){
 | 
	
		
			
				|  |  |             sql+=" AND d.charge_type ='"+chargeType+"'";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(outpatientType)){
 | 
	
		
			
				|  |  |             sql+=" AND d.outpatient_type like'%"+outpatientType+"%'";
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             sql+=" AND d.outpatient_type is not null ";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         sql += " LIMIT " + (page - 1) * size + "," + size + "";
 | 
	
		
			
				|  |  |         List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  |         if(list!=null&&list.size()>0){
 |