diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java index 9c19a304e..86b0f6756 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java @@ -64,7 +64,8 @@ public interface PatientexamlistMapper extends BaseMapperX { .eqIfPresent(PatientexamlistDO::getReportstatus, reqVO.getReportstatus()) .betweenIfPresent(PatientexamlistDO::getUploadDate, reqVO.getUploadDate()) .likeIfPresent(PatientexamlistDO::getOrgName, reqVO.getOrgName()) - .eqIfPresent(PatientexamlistDO::getOrgId, reqVO.getOrgId()) + // .eqIfPresent(PatientexamlistDO::getOrgId, reqVO.getOrgId()) + // .eqIfPresent(PatientexamlistDO::getHighLevelOrgId, reqVO.getHighLevelOrgId()) .betweenIfPresent(PatientexamlistDO::getCreateDate, reqVO.getCreateDate()) .eqIfPresent(PatientexamlistDO::getExamDescription, reqVO.getExamDescription()) @@ -74,6 +75,12 @@ public interface PatientexamlistMapper extends BaseMapperX { .betweenIfPresent(PatientexamlistDO::getCreateTime, reqVO.getCreateTime()) .eqIfPresent(PatientexamlistDO::getOrgId, reqVO.getHighLevelOrgId()) .eqIfPresent(PatientexamlistDO::getIsFavourite,reqVO.getIsFavourite()) + .eq(PatientexamlistDO::getOrgId, reqVO.getOrgId()) // 始终添加orgId条件 + .or(wrapper -> { + if (reqVO.getHighLevelOrgId() != null) { + wrapper.eq(PatientexamlistDO::getOrgId, reqVO.getHighLevelOrgId()); + } + }) .orderByDesc(PatientexamlistDO::getId)); }