代码提交

This commit is contained in:
hzj
2024-05-13 15:43:20 +08:00
parent 9fbb5b0bb9
commit 2638679df3

View File

@@ -198,7 +198,31 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
1、每个附件需要返回文件名称以及可以预览的url
todo...by黄正剑
*/
userReportVO.setUserReportProjectPO(new UserReportProjectPO());
if (
CollectionUtil.newArrayList(
UserNatureEnum.BUILD_POWER_GRID.getCode(),
UserNatureEnum.EXTEND_POWER_GRID.getCode()
).contains(userReportPO.getUserType())) {
//电网工程类用户额外数据
UserReportProjectPO byId = userReportProjectPOService.getById(id);
userReportVO.setUserReportProjectPO(byId);
} 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(userReportPO.getUserType())) {
//非线性负荷用户 & 新能源发电站用户
UserReportSubstationPO byId= userReportSubstationPOService.getById(id);
userReportSubstationPOService.saveOrUpdate(byId);
userReportVO.setUserReportSubstationPO(byId);
} else if (UserNatureEnum.SENSITIVE_USER.getCode().equals(userReportPO.getUserType())) {
// 敏感及重要用户
UserReportSensitivePO byId = userReportSensitivePOService.getById(id);
userReportVO.setUserReportSensitivePO(byId);
}
return userReportVO;
}