diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterpriseinspections/vo/EnterpriseInspectionsPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterpriseinspections/vo/EnterpriseInspectionsPageReqVO.java index e57c842..bf8a840 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterpriseinspections/vo/EnterpriseInspectionsPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterpriseinspections/vo/EnterpriseInspectionsPageReqVO.java @@ -24,6 +24,18 @@ public class EnterpriseInspectionsPageReqVO extends PageParam { @Schema(description = "用户id", example = "1") private Long userId; + @Schema(description = "企业名称", example = "27002") + private String enterpriseName; + + @Schema(description = "任务名称", example = "1") + private String taskName ; + + @Schema(description = "企业名称", example = "27002") + private List enterpriseList; + + @Schema(description = "任务名称", example = "1") + private List taskList; + @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterpriseinspections/EnterpriseInspectionsMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterpriseinspections/EnterpriseInspectionsMapper.java index 4590141..fbb307e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterpriseinspections/EnterpriseInspectionsMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterpriseinspections/EnterpriseInspectionsMapper.java @@ -22,6 +22,8 @@ public interface EnterpriseInspectionsMapper extends BaseMapperX getEnterpriseInspectionsPage(EnterpriseInspectionsPageReqVO pageReqVO) { + if (pageReqVO.getEnterpriseName() != null) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.like(EnterpriseDO::getEnterprisesName, pageReqVO.getEnterpriseName()); + final List enterpriseDOS = enterpriseMapper.selectList(wrapper); + if (enterpriseDOS != null || enterpriseDOS.size() > 0) { + final List collect = enterpriseDOS.stream().map(item -> item.getId()).collect(Collectors.toList()); + pageReqVO.setEnterpriseList(collect); + } + } + + if (pageReqVO.getTaskName() != null) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.like(TaskInfoDO::getTitle, pageReqVO.getTaskName()); + final List taskInfoDOS = taskInfoMapper.selectList(wrapper); + if (taskInfoDOS != null || taskInfoDOS.size() > 0) { + final List collect = taskInfoDOS.stream().map(item -> item.getId()).collect(Collectors.toList()); + pageReqVO.setTaskList(collect); + } + } + final PageResult enterpriseInspectionsDOPageResult = enterpriseInspectionsMapper.selectPage(pageReqVO); if ( enterpriseInspectionsDOPageResult.getList() != null && enterpriseInspectionsDOPageResult.getList().size() > 0 ) { enterpriseInspectionsDOPageResult.getList().forEach(item->{