diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectpatient/InspectPatientMapper.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectpatient/InspectPatientMapper.java index d11c286..da36e09 100644 --- a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectpatient/InspectPatientMapper.java +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectpatient/InspectPatientMapper.java @@ -21,15 +21,6 @@ public interface InspectPatientMapper extends BaseMapperX { default PageResult selectPage(InspectPatientPageReqVO reqVO) { LambdaQueryWrapperX queryWrapper = new LambdaQueryWrapperX<>(); - if (reqVO.getInspectionStatus() != null) { - if (reqVO.getInspectionStatus() == 0) { - // 如果传过来的值为0,查询InspectionOpinion字段不为空 - queryWrapper.isNotNull(InspectPatientDO::getSummaryResult).ne(InspectPatientDO::getSummaryResult, ""); - } else if (reqVO.getInspectionStatus() == 1) { - // 如果传过来的值为1,查询InspectionOpinion字段为空 - queryWrapper.isNull(InspectPatientDO::getSummaryResult).or().eq(InspectPatientDO::getSummaryResult, ""); - } - } queryWrapper.eqIfPresent(InspectPatientDO::getMedicalSn, reqVO.getMedicalSn()) .likeIfPresent(InspectPatientDO::getPName, reqVO.getPName()) .eqIfPresent(InspectPatientDO::getGender, reqVO.getGender()) @@ -52,6 +43,15 @@ public interface InspectPatientMapper extends BaseMapperX { .eqIfPresent(InspectPatientDO::getInspectionOpinion, reqVO.getInspectionOpinion()) .betweenIfPresent(InspectPatientDO::getAuditorTime, reqVO.getAuditorTime()) .orderByDesc(InspectPatientDO::getId); + if (reqVO.getInspectionStatus() != null) { + if (reqVO.getInspectionStatus() == 0) { + // 如果传过来的值为0,查询InspectionOpinion字段不为空 + queryWrapper.isNotNull(InspectPatientDO::getSummaryResult).ne(InspectPatientDO::getSummaryResult, ""); + } else if (reqVO.getInspectionStatus() == 1) { + // 如果传过来的值为1,查询InspectionOpinion字段为空 + queryWrapper.isNull(InspectPatientDO::getSummaryResult).or().eq(InspectPatientDO::getSummaryResult, ""); + } + } return selectPage(reqVO, queryWrapper); }