|
@ -29,6 +29,7 @@ import com.yihu.wlyy.service.app.disease.PatientDiseaseService;
|
|
|
import com.yihu.wlyy.service.app.label.SignPatientLabelInfoService;
|
|
|
import com.yihu.wlyy.task.SignUploadTask;
|
|
|
import com.yihu.wlyy.util.MD5;
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
@ -1668,7 +1669,8 @@ public class FamilyContractService extends BaseService {
|
|
|
return signFamilyDao.findNoHealthSignFamilyNum(doctor);
|
|
|
}
|
|
|
|
|
|
public List<Patient> findNoHealthSignFamilyHealth(String doctor, Integer page, Integer pagesize,String patientName,String patientAddr) {
|
|
|
public Map<String,Object> findNoHealthSignFamilyHealth(String doctor, Integer page, Integer pagesize,String patientName,String patientAddr) {
|
|
|
Map<String,Object> returnMap=new HashedMap();
|
|
|
if (pagesize == null || pagesize <= 0) {
|
|
|
pagesize = 10;
|
|
|
}
|
|
@ -1676,21 +1678,33 @@ public class FamilyContractService extends BaseService {
|
|
|
page =1;
|
|
|
}
|
|
|
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 ) ");
|
|
|
|
|
|
StringBuffer countSql=new StringBuffer("" +
|
|
|
" select count(*) 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+"%'");
|
|
|
countSql.append(" and name like '"+patientName+"%'");
|
|
|
}
|
|
|
if(!org.springframework.util.StringUtils.isEmpty(patientAddr)){
|
|
|
sql.append(" and address like '"+patientAddr+"%'");
|
|
|
countSql.append(" and address like '"+patientAddr+"%'");
|
|
|
}
|
|
|
sql.append(" limit "+start+","+end+"");
|
|
|
sql.append(" limit "+start+","+pagesize+"");
|
|
|
List<Patient> returnList= jdbcTemplate.query(sql.toString(),new BeanPropertyRowMapper(Patient.class));
|
|
|
|
|
|
return returnList;
|
|
|
Integer allCount= jdbcTemplate.queryForObject(countSql.toString(),Integer.class);
|
|
|
if(allCount%pagesize==0){
|
|
|
returnMap.put("count",allCount/pagesize);
|
|
|
}else{
|
|
|
returnMap.put("count",(allCount/pagesize)+1);
|
|
|
}
|
|
|
returnMap.put("returnList",returnList);
|
|
|
return returnMap;
|
|
|
}
|
|
|
|
|
|
/**
|