From 885f3fae53b158660ff0fe239b352850dfa4c61e Mon Sep 17 00:00:00 2001
From: baizonghao <1719256278@qq.com>
Date: 星期二, 21 三月 2023 14:58:23 +0800
Subject: [PATCH] 被拒绝返回数据接口

---
 src/main/java/com/example/jz/service/impl/ReportServiceImpl.java |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/example/jz/service/impl/ReportServiceImpl.java b/src/main/java/com/example/jz/service/impl/ReportServiceImpl.java
index 5bf28a8..36555b4 100644
--- a/src/main/java/com/example/jz/service/impl/ReportServiceImpl.java
+++ b/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;
+    }
 }
\ No newline at end of file

--
Gitblit v1.8.0