Browse Source

修改bug 水电生产运行报告

zhongwei
段飞宇 2 years ago
parent
commit
581d8d5b5e
  1. 21
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/web/AreaMonthlyDetailsController.java
  2. BIN
      hzims-service/ticket/src/main/resources/template/大隆水电站电气第一种工作票模板.xlsx

21
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.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* 水电生成报告详情数据 * 水电生成报告详情数据
@ -230,13 +231,25 @@ public class AreaMonthlyDetailsController {
+ entity.getYearMonth() + "'"); + entity.getYearMonth() + "'");
} }
// 是否为缺陷 已定论1 // 是否为缺陷 已定论1
if (Func.isNotEmpty(entity.getDefect()) && Func.isNotEmpty(entity.getConclusionStatusNum())) { // if (Func.isNotEmpty(entity.getDefect()) && Func.isNotEmpty(entity.getConclusionStatusNum())) {
queryWrapper.eq(OperPhenomenonEntity::getIsDefect, entity.getDefect()); // queryWrapper.eq(OperPhenomenonEntity::getIsDefect, entity.getDefect());
queryWrapper.or().eq(OperPhenomenonEntity::getConclusionStatus, entity.getConclusionStatusNum()); // queryWrapper.or().eq(OperPhenomenonEntity::getConclusionStatus, entity.getConclusionStatusNum());
} // }
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 conclusionStatusNum = entity.getConclusionStatusNum() == null ? 1 : entity.getConclusionStatusNum();
//过滤
List<OperPhenomenonEntity> 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<OperPhenomenonVO> vos = OperPhenomenonWrapper.build().pageVO(pages); IPage<OperPhenomenonVO> vos = OperPhenomenonWrapper.build().pageVO(pages);
return R.data(vos); return R.data(vos);
} }

BIN
hzims-service/ticket/src/main/resources/template/大隆水电站电气第一种工作票模板.xlsx

Binary file not shown.
Loading…
Cancel
Save