src/main/java/com/example/jz/controller/ReportController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/example/jz/controller/WxAppController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/example/jz/service/ReportService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/example/jz/service/impl/ReportServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/example/jz/controller/ReportController.java
@@ -14,6 +14,7 @@ import com.example.jz.modle.entity.Report; import com.example.jz.modle.entity.User; import com.example.jz.modle.vo.ReportListVo; import com.example.jz.modle.vo.ReportVXVO; import com.example.jz.service.GroupUserService; import com.example.jz.service.MessageService; import com.example.jz.service.ReportService; @@ -79,6 +80,12 @@ return R.ok(reportService.getReportListVoById(id)); } @GetMapping("/rejectReport/{id}") public R<ReportVXVO> getOne(@PathVariable Integer id){ ReportVXVO res = reportService.getRejectReportById(id); return R.ok(res); } /** * 报案 * src/main/java/com/example/jz/controller/WxAppController.java
@@ -366,6 +366,7 @@ messageMap.put("name", item.getReportName()); messageMap.put("mobile", user.getUserMobile()); messageMap.put("idcard", user.getUserIdcard()); messageMap.put("sex", user.getSex()); messageMap.put("pic", user.getPic()); messageMap.put("role", 0); } else { @@ -373,6 +374,7 @@ User user = userService.getOne(new QueryWrapper<User>().eq("id", item.getCopId())); messageMap.put("name", user.getRealName()); messageMap.put("mobile", user.getUserMobile()); messageMap.put("sex", user.getSex()); messageMap.put("role", 1); } message.add(messageMap); src/main/java/com/example/jz/service/ReportService.java
@@ -6,6 +6,7 @@ import com.example.jz.modle.dto.ReportParamDto; import com.example.jz.modle.entity.Report; import com.example.jz.modle.vo.ReportListVo; import com.example.jz.modle.vo.ReportVXVO; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; @@ -45,5 +46,7 @@ void loadFileReport(MultipartFile multipartFile, Integer causeId); Boolean reject(Integer id, String reason); ReportVXVO getRejectReportById(Integer id); } 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; } }