diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/web/AreaMonthlyDetailsController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/web/AreaMonthlyDetailsController.java index 79e2618..9f85d7d 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/web/AreaMonthlyDetailsController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/web/AreaMonthlyDetailsController.java @@ -47,6 +47,7 @@ import org.springframework.web.bind.annotation.*; import java.util.Date; import java.util.List; +import java.util.stream.Collectors; /** * 水电生成报告详情数据 @@ -179,7 +180,7 @@ public class AreaMonthlyDetailsController { @ApiParam(name = "page", value = "当前页", required = true) @PathVariable("page") Long page, @ApiParam(name = "size", value = "每页记录数", required = true) @PathVariable("size") Long size, TaskListQuery task) { - BladePage taskVoIPage = areaMonthlyDetailsService.queryCheckTaskPageList(task, page,size); + BladePage taskVoIPage = areaMonthlyDetailsService.queryCheckTaskPageList(task, page, size); return R.data(taskVoIPage); } @@ -207,7 +208,7 @@ public class AreaMonthlyDetailsController { @ApiParam(name = "size", value = "每页记录数", required = true) @PathVariable("size") Long size, OperPhenomenonEntity entity, String taskIds, Date findTimeEnd) { Page operDefectEntityPage = new Page<>(page, size); - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); if (StringUtil.isNotBlank(taskIds)) { queryWrapper.in(OperPhenomenonEntity::getId, Lists.newArrayList(taskIds.split(","))); } @@ -230,13 +231,25 @@ public class AreaMonthlyDetailsController { + entity.getYearMonth() + "'"); } // 是否为缺陷 已定论1 - if (Func.isNotEmpty(entity.getDefect()) && Func.isNotEmpty(entity.getConclusionStatusNum())) { - queryWrapper.eq(OperPhenomenonEntity::getIsDefect, entity.getDefect()); - queryWrapper.or().eq(OperPhenomenonEntity::getConclusionStatus, entity.getConclusionStatusNum()); - } + // if (Func.isNotEmpty(entity.getDefect()) && Func.isNotEmpty(entity.getConclusionStatusNum())) { + // queryWrapper.eq(OperPhenomenonEntity::getIsDefect, entity.getDefect()); + // queryWrapper.or().eq(OperPhenomenonEntity::getConclusionStatus, entity.getConclusionStatusNum()); + // } queryWrapper.orderByDesc(OperPhenomenonEntity::getUpdateTime); IPage pages = phenomenonService.page(operDefectEntityPage, queryWrapper); + + Integer defect = entity.getDefect() == null ? 0 : entity.getDefect(); + Integer conclusionStatusNum = entity.getConclusionStatusNum() == null ? 1 : entity.getConclusionStatusNum(); + //过滤 + List collect = + pages.getRecords().stream().filter(item -> (defect.equals(item.getIsDefect()) || + conclusionStatusNum.equals(item.getDiscriminateStatus() != null ? + Integer.parseInt(item.getDiscriminateStatus()) : null))) + .collect(Collectors.toList()); + pages.setRecords(collect); + pages.setTotal(collect.size()); + IPage vos = OperPhenomenonWrapper.build().pageVO(pages); return R.data(vos); } diff --git a/hzims-service/ticket/src/main/resources/template/大隆水电站电气第一种工作票模板.xlsx b/hzims-service/ticket/src/main/resources/template/大隆水电站电气第一种工作票模板.xlsx index 72bf064..bc095f4 100644 Binary files a/hzims-service/ticket/src/main/resources/template/大隆水电站电气第一种工作票模板.xlsx and b/hzims-service/ticket/src/main/resources/template/大隆水电站电气第一种工作票模板.xlsx differ