diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientPageReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientPageReqVO.java index 1772a69..d73342d 100644 --- a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientPageReqVO.java +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientPageReqVO.java @@ -91,4 +91,7 @@ public class InspectPatientPageReqVO extends PageParam { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss ", timezone = "GMT+8") private LocalDateTime chargetime; + @Schema(description = "总检状态") + private Integer inspectionStatus; + } \ No newline at end of file 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 1c12236..d11c286 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 @@ -20,8 +20,17 @@ import cn.iocoder.yudao.module.inspect.controller.admin.inspectpatient.vo.*; public interface InspectPatientMapper extends BaseMapperX { default PageResult selectPage(InspectPatientPageReqVO reqVO) { - return selectPage(reqVO, new LambdaQueryWrapperX() - .eqIfPresent(InspectPatientDO::getMedicalSn, reqVO.getMedicalSn()) + 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()) .eqIfPresent(InspectPatientDO::getBirthday, reqVO.getBirthday()) @@ -39,8 +48,12 @@ public interface InspectPatientMapper extends BaseMapperX { .eqIfPresent(InspectPatientDO::getHeadPicUrl, reqVO.getHeadPicUrl()) .eqIfPresent(InspectPatientDO::getSummaryResult, reqVO.getSummaryResult()) .eqIfPresent(InspectPatientDO::getAuditor, reqVO.getAuditor()) + .eqIfPresent(InspectPatientDO::getAuditStatus, reqVO.getAuditStatus()) + .eqIfPresent(InspectPatientDO::getInspectionOpinion, reqVO.getInspectionOpinion()) .betweenIfPresent(InspectPatientDO::getAuditorTime, reqVO.getAuditorTime()) - .orderByDesc(InspectPatientDO::getId)); + .orderByDesc(InspectPatientDO::getId); + + return selectPage(reqVO, queryWrapper); } } \ No newline at end of file