|
@ -2093,26 +2093,26 @@ public class FamilyContractService extends BaseService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
public Map<String, List<Patient>> getPatientByLevel(String doctorCode) {
|
|
|
public Map<String, List<Patient>> getPatientByLevel(String doctorCode,Long team) {
|
|
|
Map<String, List<Patient>> returnMap = new HashMap<>();
|
|
|
Doctor doctor = doctorDao.findByCode(doctorCode);
|
|
|
//判断当前用户是健康管理师还是全科
|
|
|
if (doctor.getLevel() == 3) {
|
|
|
//健康管理师
|
|
|
List<Patient> jkgl = signFamilyDao.findByDoctorHealthPatient(doctorCode);
|
|
|
List<Patient> jkgl = signFamilyDao.findByDoctorHealthPatient(doctorCode,team);
|
|
|
returnMap.put("jk", jkgl);
|
|
|
} else if (doctor.getLevel() == 2) {
|
|
|
//全科医生
|
|
|
List<Patient> qkys = signFamilyDao.findByDoctorPatient(doctorCode);
|
|
|
List<Patient> qkys = signFamilyDao.findByDoctorPatient(doctorCode,team);
|
|
|
returnMap.put("qk", qkys);
|
|
|
//健康管理师
|
|
|
List<Patient> jkgl = signFamilyDao.findByDoctorHealthPatient(doctorCode);
|
|
|
List<Patient> jkgl = signFamilyDao.findByDoctorHealthPatient(doctorCode,team);
|
|
|
returnMap.put("jk", jkgl);
|
|
|
}
|
|
|
return returnMap;
|
|
|
}
|
|
|
|
|
|
public JSONObject getPatientByLable(String doctorCode, String labelType, String level) throws Exception {
|
|
|
public JSONObject getPatientByLable(String doctorCode, String labelType, String level,Long team) throws Exception {
|
|
|
JSONObject returnMap = new JSONObject();
|
|
|
Doctor doctor = doctorDao.findByCode(doctorCode);
|
|
|
//判断当前用户是健康管理师还是全科
|
|
@ -2136,10 +2136,11 @@ public class FamilyContractService extends BaseService {
|
|
|
" WHERE " +
|
|
|
" sf.type = 2 " +
|
|
|
" AND sf. STATUS >= 0 " +
|
|
|
" and sf.doctor_health = ? ";
|
|
|
" and sf.doctor_health = ? "+
|
|
|
" and sf.admin_team_code = ? ";
|
|
|
|
|
|
//查找居民
|
|
|
datas = jdbcTemplate.queryForList(sql, labelType, doctorCode);
|
|
|
datas = jdbcTemplate.queryForList(sql, labelType, doctorCode,team);
|
|
|
} else if (level.equals("2")) {
|
|
|
//全科
|
|
|
String sql = "SELECT " +
|
|
@ -2159,10 +2160,11 @@ public class FamilyContractService extends BaseService {
|
|
|
" WHERE " +
|
|
|
" sf.type = 2 " +
|
|
|
" AND sf. STATUS >= 0 " +
|
|
|
" and sf.doctor = ? ";
|
|
|
" and sf.doctor = ? "+
|
|
|
" and sf.admin_team_code = ? ";
|
|
|
|
|
|
//查找居民
|
|
|
datas = jdbcTemplate.queryForList(sql, labelType, doctorCode, doctorCode);
|
|
|
datas = jdbcTemplate.queryForList(sql, labelType, doctorCode, doctorCode,team);
|
|
|
|
|
|
} else {
|
|
|
throw new Exception("参数错误!");
|