From 789580b15d1c14cbb58fbcf2d516738892d970cf Mon Sep 17 00:00:00 2001 From: haown <454902499@qq.com> Date: Thu, 4 Jul 2024 16:21:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=82=A3=E8=80=85=E7=AE=A1=E7=90=86=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=BB=85=E6=9F=A5=E7=9C=8B=E6=9C=AC=E4=BA=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9D=83=E9=99=90=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xinelu/framework/aspectj/DataScopeAspect.java | 2 +- .../impl/PatientBlacklistServiceImpl.java | 2 +- .../service/patientinfo/IPatientInfoService.java | 8 ++++++++ .../patientinfo/impl/PatientInfoServiceImpl.java | 13 ++++++++++++- .../impl/PatientPreHospitalizationServiceImpl.java | 4 ++-- .../impl/PatientVisitRecordServiceImpl.java | 2 +- .../impl/SignPatientRecordServiceImpl.java | 2 +- .../system/service/impl/SysUserServiceImpl.java | 6 +++--- 8 files changed, 29 insertions(+), 10 deletions(-) diff --git a/postdischarge-framework/src/main/java/com/xinelu/framework/aspectj/DataScopeAspect.java b/postdischarge-framework/src/main/java/com/xinelu/framework/aspectj/DataScopeAspect.java index d2988775..42622925 100644 --- a/postdischarge-framework/src/main/java/com/xinelu/framework/aspectj/DataScopeAspect.java +++ b/postdischarge-framework/src/main/java/com/xinelu/framework/aspectj/DataScopeAspect.java @@ -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())); } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientblacklist/impl/PatientBlacklistServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientblacklist/impl/PatientBlacklistServiceImpl.java index 8194600a..8903951a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientblacklist/impl/PatientBlacklistServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientblacklist/impl/PatientBlacklistServiceImpl.java @@ -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 selectPatientBlacklistList(PatientBlacklistDto patientBlacklist) { return patientBlacklistMapper.selectPatientBlacklistList(patientBlacklist); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/IPatientInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/IPatientInfoService.java index b55a82f6..9c5d7403 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/IPatientInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/IPatientInfoService.java @@ -28,6 +28,14 @@ public interface IPatientInfoService { */ List selectPatientInfoList(PatientInfoDto patientInfo); + /** + * 查询患者信息列表 + * + * @param patientInfo 患者信息 + * @return 患者信息集合 + */ + List selectAllPatientList(PatientInfoDto patientInfo); + /** * 新增患者信息 * diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java index d5122b92..58f53fc9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java @@ -65,11 +65,22 @@ public class PatientInfoServiceImpl implements IPatientInfoService { * @return 患者信息 */ @Override - @DataScope(agencyAlias = "p") + @DataScope(agencyAlias = "p", userAlias = "p.attending_physician_id") public List selectPatientInfoList(PatientInfoDto patientInfo) { return patientInfoMapper.selectPatientInfoList(patientInfo); } + /** + * 查询患者信息列表 + * + * @param patientInfo 患者信息 + * @return 患者信息 + */ + @Override + public List selectAllPatientList(PatientInfoDto patientInfo) { + return patientInfoMapper.selectPatientInfoList(patientInfo); + } + /** * 新增患者信息 * diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/impl/PatientPreHospitalizationServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/impl/PatientPreHospitalizationServiceImpl.java index 678bb715..ca828c89 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/impl/PatientPreHospitalizationServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/impl/PatientPreHospitalizationServiceImpl.java @@ -80,7 +80,7 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital PatientInfoDto patientInfoDto = new PatientInfoDto(); patientInfoDto.setCardNo(preHospitalization.getCardNo()); patientInfoDto.setHospitalAgencyId(preHospitalization.getHospitalAgencyId()); - List patientList = patientInfoService.selectPatientInfoList(patientInfoDto); + List 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 patientInfoList = patientInfoService.selectPatientInfoList(patientQuery); + List patientInfoList = patientInfoService.selectAllPatientList(patientQuery); if (CollectionUtils.isNotEmpty(patientInfoList)) { // 修改居民信息 PatientInfo updInfo = patientInfoList.get(0); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java index 5ff4d49e..b9d6e1f6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java @@ -122,7 +122,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService PatientInfoDto patientInfoDto = new PatientInfoDto(); patientInfoDto.setHospitalAgencyId(saveBody.getHospitalAgencyId()); patientInfoDto.setCardNo(saveBody.getCardNo()); - List patientInfoList = patientInfoService.selectPatientInfoList(patientInfoDto); + List patientInfoList = patientInfoService.selectAllPatientList(patientInfoDto); // 患者档案信息新增/修改 PatientInfo patientInfo = new PatientInfo(); if(CollectionUtils.isEmpty(patientInfoList)) { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java index 56e0d92e..39eeadc1 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java @@ -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 selectList(SignPatientListDto signPatientRecord) { return signPatientRecordMapper.selectList(signPatientRecord); } diff --git a/postdischarge-system/src/main/java/com/xinelu/system/service/impl/SysUserServiceImpl.java b/postdischarge-system/src/main/java/com/xinelu/system/service/impl/SysUserServiceImpl.java index d61a1cf0..be888c96 100644 --- a/postdischarge-system/src/main/java/com/xinelu/system/service/impl/SysUserServiceImpl.java +++ b/postdischarge-system/src/main/java/com/xinelu/system/service/impl/SysUserServiceImpl.java @@ -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 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 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 selectUnallocatedList(SysUser user) { return userMapper.selectUnallocatedList(user); }