青羊经侦大队-数据平台
baizonghao
2023-03-21 885f3fae53b158660ff0fe239b352850dfa4c61e
src/main/java/com/example/jz/service/impl/ReportServiceImpl.java
@@ -19,12 +19,14 @@
import com.example.jz.modle.entity.*;
import com.example.jz.modle.vo.ExportExcelReportVo;
import com.example.jz.modle.vo.ReportListVo;
import com.example.jz.modle.vo.ReportVXVO;
import com.example.jz.service.MinIOService;
import com.example.jz.service.ReportService;
import com.example.jz.service.UserService;
import lombok.SneakyThrows;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -257,4 +259,18 @@
        reportDao.updateById(report);
        return true;
    }
    @Override
    public ReportVXVO getRejectReportById(Integer id) {
        ReportVXVO reportVXVO = new ReportVXVO();
        Report report = reportDao.selectOne(new LambdaQueryWrapper<Report>().eq(Report::getId, id));
        User user = userDao.selectOne(new LambdaQueryWrapper<User>().eq(User::getId, report.getUserId()));
        BeanUtils.copyProperties(reportVXVO, report);
        reportVXVO.setLocation(user.getLocation());
        reportVXVO.setWorkingLocation(user.getWorkingLocation());
        reportVXVO.setSex(user.getSex());
        reportVXVO.setRealName(user.getRealName());
        reportVXVO.setUserIdCard(user.getUserIdcard());
        return reportVXVO;
    }
}