|
@ -160,9 +160,19 @@ public class PermissionService {
|
|
|
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
|
|
}
|
|
|
|
|
|
//判断社工/助老员是否为患者的服务医生 true是 false否
|
|
|
//判断社工/助老员是否为患者的服务医生
|
|
|
public boolean isOlderServerDoctor(String doctor,String patient){
|
|
|
try {
|
|
|
WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("noPermission");
|
|
|
if(wlyyHospitalSysDictDO==null||"0".equals(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
return false;
|
|
|
}
|
|
|
//先判断医生信息是否有问题
|
|
|
JSONObject param = new JSONObject();
|
|
|
param.put("doctorId",doctor);
|
|
|
if (noPermission(1,param)){
|
|
|
return true;
|
|
|
}
|
|
|
String sql = " SELECT sum(total) from ( " +
|
|
|
"select count(id) as total from base_patient_helper ph where ph.doctor = '"+doctor+"' and patient='"+patient+"' and del=1 " +
|
|
|
"UNION all " +
|
|
@ -170,10 +180,10 @@ public class PermissionService {
|
|
|
" WHERE sr.status=1 and m.team_code = r.team_code and sr.id=r.sign_id and m.doctor_code = d.id " +
|
|
|
"and m.del = '1' and sr.patient = '"+patient+"' and d.id='"+doctor+"' and d.del=1)A ";
|
|
|
Integer total = jdbcTemplate.queryForObject(sql,Integer.class);
|
|
|
return total>0?true:false;
|
|
|
return total>0?false:true;
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return false;
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|