|
|
@ -2,6 +2,7 @@ package com.hnac.hzims.operational.main.controller.web; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.google.common.collect.Lists; |
|
|
@ -38,6 +39,9 @@ import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
|
|
|
import org.springblade.core.mp.base.BaseEntity; |
|
|
|
import org.springblade.core.mp.support.BladePage; |
|
|
|
import org.springblade.core.mp.support.BladePage; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
@ -210,6 +214,29 @@ public class AreaMonthlyDetailsController { |
|
|
|
OperPhenomenonVo entity, String taskIds, Date findTimeEnd) { |
|
|
|
OperPhenomenonVo entity, String taskIds, Date findTimeEnd) { |
|
|
|
Page<OperPhenomenonEntity> operDefectEntityPage = new Page<>(page, size); |
|
|
|
Page<OperPhenomenonEntity> operDefectEntityPage = new Page<>(page, size); |
|
|
|
LambdaQueryWrapper<OperPhenomenonEntity> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
LambdaQueryWrapper<OperPhenomenonEntity> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
|
|
//部门
|
|
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(entity.getCreateDept())) { |
|
|
|
|
|
|
|
queryWrapper.in(BaseEntity::getCreateDept, entity.getCreateDept()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(entity.getDefectCode())) { |
|
|
|
|
|
|
|
queryWrapper.eq(OperPhenomenonEntity::getDefectCode, entity.getDefectCode()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(entity.getSourceCode())) { |
|
|
|
|
|
|
|
queryWrapper.eq(OperPhenomenonEntity::getSourceCode, entity.getSourceCode()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(entity.getFaultName())) { |
|
|
|
|
|
|
|
queryWrapper.eq(OperPhenomenonEntity::getFaultName, entity.getFaultName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ObjectUtils.isNotEmpty(entity.getDefectLevel())){ |
|
|
|
|
|
|
|
queryWrapper.eq(OperPhenomenonEntity::getDefectLevel, entity.getDefectLevel()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (StringUtil.isNotBlank(taskIds)) { |
|
|
|
if (StringUtil.isNotBlank(taskIds)) { |
|
|
|
queryWrapper.in(OperPhenomenonEntity::getId, Lists.newArrayList(taskIds.split(","))); |
|
|
|
queryWrapper.in(OperPhenomenonEntity::getId, Lists.newArrayList(taskIds.split(","))); |
|
|
|
} |
|
|
|
} |
|
|
@ -240,14 +267,14 @@ public class AreaMonthlyDetailsController { |
|
|
|
queryWrapper.orderByDesc(OperPhenomenonEntity::getUpdateTime); |
|
|
|
queryWrapper.orderByDesc(OperPhenomenonEntity::getUpdateTime); |
|
|
|
IPage<OperPhenomenonEntity> pages = phenomenonService.page(operDefectEntityPage, queryWrapper); |
|
|
|
IPage<OperPhenomenonEntity> pages = phenomenonService.page(operDefectEntityPage, queryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
Integer defect = entity.getDefect() == null ? 0 : entity.getDefect(); |
|
|
|
Integer defect = entity.getDefect() == null ? 0 : entity.getDefect(); |
|
|
|
Integer conclusionStatusNum = entity.getConclusionStatusNum() == null ? 1 : entity.getConclusionStatusNum(); |
|
|
|
Integer conclusionStatusNum = entity.getConclusionStatusNum() == null ? 1 : entity.getConclusionStatusNum(); |
|
|
|
//过滤
|
|
|
|
//过滤
|
|
|
|
List<OperPhenomenonEntity> collect = |
|
|
|
List<OperPhenomenonEntity> collect = |
|
|
|
pages.getRecords().stream().filter(item -> (defect.equals(item.getIsDefect()) || |
|
|
|
pages.getRecords().stream().filter(item -> (defect.equals(item.getIsDefect()) || |
|
|
|
conclusionStatusNum.equals(item.getDiscriminateStatus() != null ? |
|
|
|
conclusionStatusNum.equals(item.getDiscriminateStatus() != null ? |
|
|
|
Integer.parseInt(item.getDiscriminateStatus()) : null))) |
|
|
|
Integer.parseInt(item.getDiscriminateStatus()) : null))) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
.collect(Collectors.toList()); |
|
|
|
pages.setRecords(collect); |
|
|
|
pages.setRecords(collect); |
|
|
|
pages.setTotal(collect.size()); |
|
|
|
pages.setTotal(collect.size()); |
|
|
|
|
|
|
|
|
|
|
|