添加是否需要治理标志

This commit is contained in:
hzj
2024-06-24 15:23:52 +08:00
parent ec9f32d0ad
commit e140ba4fe3
2 changed files with 33 additions and 1 deletions

View File

@@ -141,6 +141,10 @@ public class UserReportVO {
private Integer dataType; private Integer dataType;
private String createBy; private String createBy;
/**
* 是否需要治理
*/
private Integer needGovernance;
/** /**
* 创建时间 * 创建时间

View File

@@ -420,7 +420,35 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
userReportVOQueryWrapper.orderByDesc("supervision_user_report.Update_Time"); userReportVOQueryWrapper.orderByDesc("supervision_user_report.Update_Time");
} }
userReportVOQueryWrapper.orderByDesc("supervision_user_report.create_time"); userReportVOQueryWrapper.orderByDesc("supervision_user_report.create_time");
return this.baseMapper.page(new Page<>(PageFactory.getPageNum(userReportQueryParam), PageFactory.getPageSize(userReportQueryParam)), userReportVOQueryWrapper); Page<UserReportVO> page = this.baseMapper.page(new Page<>(PageFactory.getPageNum(userReportQueryParam), PageFactory.getPageSize(userReportQueryParam)), userReportVOQueryWrapper);
page.getRecords().forEach(temp->{
Integer needGovernance = 0;
if (
CollectionUtil.newArrayList(
UserNatureEnum.BUILD_POWER_GRID.getCode(),
UserNatureEnum.EXTEND_POWER_GRID.getCode()
).contains(temp.getUserType())) {
//电网工程类用户额外数据
needGovernance = userReportProjectPOService.getById(temp.getId()).getNeedGovernance();
} else if (
CollectionUtil.newArrayList(
UserNatureEnum.BUILD_NON_LINEAR_LOAD.getCode(),
UserNatureEnum.EXTEND_NON_LINEAR_LOAD.getCode(),
UserNatureEnum.BUILD_NEW_ENERGY_POWER_STATION.getCode(),
UserNatureEnum.EXTEND_NEW_ENERGY_POWER_STATION.getCode()
).contains(temp.getUserType())) {
//非线性负荷用户 & 新能源发电站用户
needGovernance = userReportSubstationPOService.getById(temp.getId()).getNeedGovernance();
} else if (UserNatureEnum.SENSITIVE_USER.getCode().equals(temp.getUserType())) {
// 敏感及重要用户
needGovernance = userReportSensitivePOService.getById(temp.getId()).getNeedGovernance();
}
temp.setNeedGovernance(needGovernance);
});
return page;
} }
@Override @Override