患者管理列表仅查看本人数据权限。

This commit is contained in:
haown 2024-07-04 16:21:09 +08:00
parent 26810e2990
commit 789580b15d
8 changed files with 29 additions and 10 deletions

View File

@ -97,7 +97,7 @@ public class DataScopeAspect {
sqlString.append(StringUtils.format(" OR {}.hospital_agency_id = {} ", agencyAlias, user.getHospitalAgencyId()));
} else if (DATA_SCOPE_DEPT.equals(dataScope)) { // 部门数据权限
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()));
}
}

View File

@ -50,7 +50,7 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService {
* @return 患者-黑明单关系
*/
@Override
@DataScope(agencyAlias = "b")
@DataScope(agencyAlias = "b", deptAlias = "b", userAlias = "p.attending_physician_id")
public List<PatientBlacklistVo> selectPatientBlacklistList(PatientBlacklistDto patientBlacklist) {
return patientBlacklistMapper.selectPatientBlacklistList(patientBlacklist);
}

View File

@ -28,6 +28,14 @@ public interface IPatientInfoService {
*/
List<PatientInfo> selectPatientInfoList(PatientInfoDto patientInfo);
/**
* 查询患者信息列表
*
* @param patientInfo 患者信息
* @return 患者信息集合
*/
List<PatientInfo> selectAllPatientList(PatientInfoDto patientInfo);
/**
* 新增患者信息
*

View File

@ -65,11 +65,22 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
* @return 患者信息
*/
@Override
@DataScope(agencyAlias = "p")
@DataScope(agencyAlias = "p", userAlias = "p.attending_physician_id")
public List<PatientInfo> selectPatientInfoList(PatientInfoDto patientInfo) {
return patientInfoMapper.selectPatientInfoList(patientInfo);
}
/**
* 查询患者信息列表
*
* @param patientInfo 患者信息
* @return 患者信息
*/
@Override
public List<PatientInfo> selectAllPatientList(PatientInfoDto patientInfo) {
return patientInfoMapper.selectPatientInfoList(patientInfo);
}
/**
* 新增患者信息
*

View File

@ -80,7 +80,7 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
PatientInfoDto patientInfoDto = new PatientInfoDto();
patientInfoDto.setCardNo(preHospitalization.getCardNo());
patientInfoDto.setHospitalAgencyId(preHospitalization.getHospitalAgencyId());
List<PatientInfo> patientList = patientInfoService.selectPatientInfoList(patientInfoDto);
List<PatientInfo> patientList = patientInfoService.selectAllPatientList(patientInfoDto);
PatientInfo patientInfo = new PatientInfo();
if (CollectionUtils.isEmpty(patientList)) {
// 保存患者信息
@ -228,7 +228,7 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
PatientInfoDto patientQuery = new PatientInfoDto();
patientQuery.setCardNo(item.getCardNo());
patientQuery.setHospitalAgencyId(preHospitalization.getHospitalAgencyId());
List<PatientInfo> patientInfoList = patientInfoService.selectPatientInfoList(patientQuery);
List<PatientInfo> patientInfoList = patientInfoService.selectAllPatientList(patientQuery);
if (CollectionUtils.isNotEmpty(patientInfoList)) {
// 修改居民信息
PatientInfo updInfo = patientInfoList.get(0);

View File

@ -122,7 +122,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
PatientInfoDto patientInfoDto = new PatientInfoDto();
patientInfoDto.setHospitalAgencyId(saveBody.getHospitalAgencyId());
patientInfoDto.setCardNo(saveBody.getCardNo());
List<PatientInfo> patientInfoList = patientInfoService.selectPatientInfoList(patientInfoDto);
List<PatientInfo> patientInfoList = patientInfoService.selectAllPatientList(patientInfoDto);
// 患者档案信息新增/修改
PatientInfo patientInfo = new PatientInfo();
if(CollectionUtils.isEmpty(patientInfoList)) {

View File

@ -107,7 +107,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
private ILabelFieldContentService labelFieldContentService;
@Override
@DataScope(agencyAlias = "sign")
@DataScope(agencyAlias = "sign", deptAlias = "sign", userAlias = "sign.billing_doctor_id")
public List<SignPatientListVo> selectList(SignPatientListDto signPatientRecord) {
return signPatientRecordMapper.selectList(signPatientRecord);
}

View File

@ -71,7 +71,7 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 用户信息集合信息
*/
@Override
@DataScope(deptAlias = "d", userAlias = "u", agencyAlias = "u")
@DataScope(deptAlias = "d", userAlias = "u.user_id", agencyAlias = "u")
public List<SysUser> selectUserList(SysUser user) {
return userMapper.selectUserList(user);
}
@ -83,7 +83,7 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 用户信息集合信息
*/
@Override
@DataScope(deptAlias = "d", userAlias = "u")
@DataScope(deptAlias = "d", userAlias = "u.user_id")
public List<SysUser> selectAllocatedList(SysUser user) {
return userMapper.selectAllocatedList(user);
}
@ -95,7 +95,7 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 用户信息集合信息
*/
@Override
@DataScope(deptAlias = "d", userAlias = "u")
@DataScope(deptAlias = "d", userAlias = "u.user_id")
public List<SysUser> selectUnallocatedList(SysUser user) {
return userMapper.selectUnallocatedList(user);
}