bug修改

This commit is contained in:
cdf
2024-06-05 19:59:21 +08:00
parent db5112e82b
commit 7491af7907
2 changed files with 20 additions and 25 deletions

View File

@@ -148,13 +148,6 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
DateUtil.endOfDay(DateUtil.parse(supervisionTempLineReportQuery.getSearchEndTime()))); DateUtil.endOfDay(DateUtil.parse(supervisionTempLineReportQuery.getSearchEndTime())));
queryWrapper.orderByDesc("supervision_temp_line_report.Update_Time"); queryWrapper.orderByDesc("supervision_temp_line_report.Update_Time");
Page<SupervisionTempLineReportVO> page = this.baseMapper.page(new Page<>(PageFactory.getPageNum(supervisionTempLineReportQuery), PageFactory.getPageSize(supervisionTempLineReportQuery)), queryWrapper); Page<SupervisionTempLineReportVO> page = this.baseMapper.page(new Page<>(PageFactory.getPageNum(supervisionTempLineReportQuery), PageFactory.getPageSize(supervisionTempLineReportQuery)), queryWrapper);
page.getRecords().stream().forEach(temp->{
// temp.setOrgName((deptFeignClient.getDeptById(temp.getOrgId()).getData().getName()));
//处理特殊字段,用户名、部门名
UserVO userVO = userFeignClient.getUserById(temp.getReporter()).getData();
temp.setReporter(userVO.getName());
temp.setOrgName(deptFeignClient.getDeptById(temp.getOrgId()).getData().getName());
});
return page; return page;
} }
@@ -186,7 +179,7 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
BeanUtils.copyProperties(byId,vo); BeanUtils.copyProperties(byId,vo);
//处理特殊字段,用户名、部门名 //处理特殊字段,用户名、部门名
UserVO userVO = userFeignClient.getUserById(vo.getReporter()).getData(); UserVO userVO = userFeignClient.getUserById(vo.getCreateBy()).getData();
vo.setReporter(userVO.getName()); vo.setReporter(userVO.getName());
vo.setOrgName(deptFeignClient.getDeptById(vo.getOrgId()).getData().getName()); vo.setOrgName(deptFeignClient.getDeptById(vo.getOrgId()).getData().getName());
vo.setLoadType(dictTreeFeignClient.queryById(vo.getLoadType()).getData().getName()); vo.setLoadType(dictTreeFeignClient.queryById(vo.getLoadType()).getData().getName());

View File

@@ -406,6 +406,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void updateUserStatus(String lineId, Integer userStatus) { public void updateUserStatus(String lineId, Integer userStatus) {
SupervisionTempLineReport supervisionTempLineReport = supervisionTempLineReportMapper.selectById(lineId); SupervisionTempLineReport supervisionTempLineReport = supervisionTempLineReportMapper.selectById(lineId);
if(Objects.nonNull(supervisionTempLineReport)) {
String userId = supervisionTempLineReport.getUserId(); String userId = supervisionTempLineReport.getUserId();
UserReportPO userReportPO = this.baseMapper.selectById(userId); UserReportPO userReportPO = this.baseMapper.selectById(userId);
//如果目前的干扰源用户状态>userStatus则不修改如果将干扰源用户状态改为3退运则必须其下的监测点都退运才能修改 //如果目前的干扰源用户状态>userStatus则不修改如果将干扰源用户状态改为3退运则必须其下的监测点都退运才能修改
@@ -428,6 +429,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
} }
this.updateById(userReportPO); this.updateById(userReportPO);
} }
}
@Override @Override
public Page<UserReportVO> getSensitiveUserPage(UserReportParam.UserReportQueryParam userReportQueryParam) { public Page<UserReportVO> getSensitiveUserPage(UserReportParam.UserReportQueryParam userReportQueryParam) {