|
@ -39,6 +39,7 @@ import org.springframework.data.domain.Sort;
|
|
|
import org.springframework.data.domain.Sort.Direction;
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Component;
|
|
@ -1667,17 +1668,29 @@ public class FamilyContractService extends BaseService {
|
|
|
return signFamilyDao.findNoHealthSignFamilyNum(doctor);
|
|
|
}
|
|
|
|
|
|
public Page<SignFamily> findNoHealthSignFamilyHealth(String doctor, Integer page, Integer pagesize) {
|
|
|
public List<Patient> findNoHealthSignFamilyHealth(String doctor, Integer page, Integer pagesize,String patientName,String patientAddr) {
|
|
|
if (pagesize == null || pagesize <= 0) {
|
|
|
pagesize = 10;
|
|
|
}
|
|
|
if (page == null || page < 0) {
|
|
|
page = 0;
|
|
|
if (page == null || page <=0) {
|
|
|
page =1;
|
|
|
}
|
|
|
// 分页信息
|
|
|
PageRequest pageRequest = new PageRequest(page, pagesize);
|
|
|
int start =(page-1)*pagesize;
|
|
|
int end=page*pagesize-1;
|
|
|
//先找出该医生下面没有健康管理师的患者 然后在去患者表找出该患者
|
|
|
StringBuffer sql=new StringBuffer("" +
|
|
|
" select p.* from wlyy_patient p where p.code in " +
|
|
|
" (select a.patient code from wlyy_sign_family a where a.type = 2 and a.status >= 1 and a.doctor_health is null and a.doctor='"+doctor+"' order by a.czrq desc ) ");
|
|
|
if(!org.springframework.util.StringUtils.isEmpty(patientName)){
|
|
|
sql.append(" and name like '"+patientName+"%'");
|
|
|
}
|
|
|
if(!org.springframework.util.StringUtils.isEmpty(patientAddr)){
|
|
|
sql.append(" and address like '"+patientAddr+"%'");
|
|
|
}
|
|
|
sql.append(" limit "+start+","+end+"");
|
|
|
List<Patient> returnList= jdbcTemplate.query(sql.toString(),new BeanPropertyRowMapper(Patient.class));
|
|
|
|
|
|
return signFamilyDao.findNoHealthSignFamilyHealth(doctor, pageRequest);
|
|
|
return returnList;
|
|
|
}
|
|
|
|
|
|
/**
|