患者管理列表仅查看本人数据权限。
This commit is contained in:
parent
26810e2990
commit
789580b15d
@ -97,7 +97,7 @@ public class DataScopeAspect {
|
|||||||
sqlString.append(StringUtils.format(" OR {}.hospital_agency_id = {} ", agencyAlias, user.getHospitalAgencyId()));
|
sqlString.append(StringUtils.format(" OR {}.hospital_agency_id = {} ", agencyAlias, user.getHospitalAgencyId()));
|
||||||
} else if (DATA_SCOPE_DEPT.equals(dataScope)) { // 部门数据权限
|
} else if (DATA_SCOPE_DEPT.equals(dataScope)) { // 部门数据权限
|
||||||
sqlString.append(StringUtils.format(" OR {}.department_id = {} ", deptAlias, user.getDepartmentId()));
|
sqlString.append(StringUtils.format(" OR {}.department_id = {} ", deptAlias, user.getDepartmentId()));
|
||||||
} else if (DATA_SCOPE_SELF.equals(dataScope)) { // 部门数据权限
|
} else if (StringUtils.equals(dataScope, DATA_SCOPE_SELF) && StringUtils.isNotBlank(userAlias)) { // 本人数据权限
|
||||||
sqlString.append(StringUtils.format(" OR {} = {} ", userAlias, user.getUserId()));
|
sqlString.append(StringUtils.format(" OR {} = {} ", userAlias, user.getUserId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,7 +50,7 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService {
|
|||||||
* @return 患者-黑明单关系
|
* @return 患者-黑明单关系
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@DataScope(agencyAlias = "b")
|
@DataScope(agencyAlias = "b", deptAlias = "b", userAlias = "p.attending_physician_id")
|
||||||
public List<PatientBlacklistVo> selectPatientBlacklistList(PatientBlacklistDto patientBlacklist) {
|
public List<PatientBlacklistVo> selectPatientBlacklistList(PatientBlacklistDto patientBlacklist) {
|
||||||
return patientBlacklistMapper.selectPatientBlacklistList(patientBlacklist);
|
return patientBlacklistMapper.selectPatientBlacklistList(patientBlacklist);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,6 +28,14 @@ public interface IPatientInfoService {
|
|||||||
*/
|
*/
|
||||||
List<PatientInfo> selectPatientInfoList(PatientInfoDto patientInfo);
|
List<PatientInfo> selectPatientInfoList(PatientInfoDto patientInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询患者信息列表
|
||||||
|
*
|
||||||
|
* @param patientInfo 患者信息
|
||||||
|
* @return 患者信息集合
|
||||||
|
*/
|
||||||
|
List<PatientInfo> selectAllPatientList(PatientInfoDto patientInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增患者信息
|
* 新增患者信息
|
||||||
*
|
*
|
||||||
|
|||||||
@ -65,11 +65,22 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
|
|||||||
* @return 患者信息
|
* @return 患者信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@DataScope(agencyAlias = "p")
|
@DataScope(agencyAlias = "p", userAlias = "p.attending_physician_id")
|
||||||
public List<PatientInfo> selectPatientInfoList(PatientInfoDto patientInfo) {
|
public List<PatientInfo> selectPatientInfoList(PatientInfoDto patientInfo) {
|
||||||
return patientInfoMapper.selectPatientInfoList(patientInfo);
|
return patientInfoMapper.selectPatientInfoList(patientInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询患者信息列表
|
||||||
|
*
|
||||||
|
* @param patientInfo 患者信息
|
||||||
|
* @return 患者信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PatientInfo> selectAllPatientList(PatientInfoDto patientInfo) {
|
||||||
|
return patientInfoMapper.selectPatientInfoList(patientInfo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增患者信息
|
* 新增患者信息
|
||||||
*
|
*
|
||||||
|
|||||||
@ -80,7 +80,7 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
|
|||||||
PatientInfoDto patientInfoDto = new PatientInfoDto();
|
PatientInfoDto patientInfoDto = new PatientInfoDto();
|
||||||
patientInfoDto.setCardNo(preHospitalization.getCardNo());
|
patientInfoDto.setCardNo(preHospitalization.getCardNo());
|
||||||
patientInfoDto.setHospitalAgencyId(preHospitalization.getHospitalAgencyId());
|
patientInfoDto.setHospitalAgencyId(preHospitalization.getHospitalAgencyId());
|
||||||
List<PatientInfo> patientList = patientInfoService.selectPatientInfoList(patientInfoDto);
|
List<PatientInfo> patientList = patientInfoService.selectAllPatientList(patientInfoDto);
|
||||||
PatientInfo patientInfo = new PatientInfo();
|
PatientInfo patientInfo = new PatientInfo();
|
||||||
if (CollectionUtils.isEmpty(patientList)) {
|
if (CollectionUtils.isEmpty(patientList)) {
|
||||||
// 保存患者信息
|
// 保存患者信息
|
||||||
@ -228,7 +228,7 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
|
|||||||
PatientInfoDto patientQuery = new PatientInfoDto();
|
PatientInfoDto patientQuery = new PatientInfoDto();
|
||||||
patientQuery.setCardNo(item.getCardNo());
|
patientQuery.setCardNo(item.getCardNo());
|
||||||
patientQuery.setHospitalAgencyId(preHospitalization.getHospitalAgencyId());
|
patientQuery.setHospitalAgencyId(preHospitalization.getHospitalAgencyId());
|
||||||
List<PatientInfo> patientInfoList = patientInfoService.selectPatientInfoList(patientQuery);
|
List<PatientInfo> patientInfoList = patientInfoService.selectAllPatientList(patientQuery);
|
||||||
if (CollectionUtils.isNotEmpty(patientInfoList)) {
|
if (CollectionUtils.isNotEmpty(patientInfoList)) {
|
||||||
// 修改居民信息
|
// 修改居民信息
|
||||||
PatientInfo updInfo = patientInfoList.get(0);
|
PatientInfo updInfo = patientInfoList.get(0);
|
||||||
|
|||||||
@ -122,7 +122,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
|
|||||||
PatientInfoDto patientInfoDto = new PatientInfoDto();
|
PatientInfoDto patientInfoDto = new PatientInfoDto();
|
||||||
patientInfoDto.setHospitalAgencyId(saveBody.getHospitalAgencyId());
|
patientInfoDto.setHospitalAgencyId(saveBody.getHospitalAgencyId());
|
||||||
patientInfoDto.setCardNo(saveBody.getCardNo());
|
patientInfoDto.setCardNo(saveBody.getCardNo());
|
||||||
List<PatientInfo> patientInfoList = patientInfoService.selectPatientInfoList(patientInfoDto);
|
List<PatientInfo> patientInfoList = patientInfoService.selectAllPatientList(patientInfoDto);
|
||||||
// 患者档案信息新增/修改
|
// 患者档案信息新增/修改
|
||||||
PatientInfo patientInfo = new PatientInfo();
|
PatientInfo patientInfo = new PatientInfo();
|
||||||
if(CollectionUtils.isEmpty(patientInfoList)) {
|
if(CollectionUtils.isEmpty(patientInfoList)) {
|
||||||
|
|||||||
@ -107,7 +107,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
|||||||
private ILabelFieldContentService labelFieldContentService;
|
private ILabelFieldContentService labelFieldContentService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DataScope(agencyAlias = "sign")
|
@DataScope(agencyAlias = "sign", deptAlias = "sign", userAlias = "sign.billing_doctor_id")
|
||||||
public List<SignPatientListVo> selectList(SignPatientListDto signPatientRecord) {
|
public List<SignPatientListVo> selectList(SignPatientListDto signPatientRecord) {
|
||||||
return signPatientRecordMapper.selectList(signPatientRecord);
|
return signPatientRecordMapper.selectList(signPatientRecord);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,7 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@DataScope(deptAlias = "d", userAlias = "u", agencyAlias = "u")
|
@DataScope(deptAlias = "d", userAlias = "u.user_id", agencyAlias = "u")
|
||||||
public List<SysUser> selectUserList(SysUser user) {
|
public List<SysUser> selectUserList(SysUser user) {
|
||||||
return userMapper.selectUserList(user);
|
return userMapper.selectUserList(user);
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@DataScope(deptAlias = "d", userAlias = "u")
|
@DataScope(deptAlias = "d", userAlias = "u.user_id")
|
||||||
public List<SysUser> selectAllocatedList(SysUser user) {
|
public List<SysUser> selectAllocatedList(SysUser user) {
|
||||||
return userMapper.selectAllocatedList(user);
|
return userMapper.selectAllocatedList(user);
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@DataScope(deptAlias = "d", userAlias = "u")
|
@DataScope(deptAlias = "d", userAlias = "u.user_id")
|
||||||
public List<SysUser> selectUnallocatedList(SysUser user) {
|
public List<SysUser> selectUnallocatedList(SysUser user) {
|
||||||
return userMapper.selectUnallocatedList(user);
|
return userMapper.selectUnallocatedList(user);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user