| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | @ApiResponse(message = "执行成功", code = 200) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R updateReport(@RequestBody AddReportDto report) { |
| | | Integer causeId = report.getCauseId(); |
| | | if(causeId==null){ |
| | | return R.failed("关联案件不能为空"); |
| | | } |
| | | int imgIndexFirst = report.getPic().indexOf("/img"); |
| | | int imgIndexEnd = report.getPic().indexOf("?"); |
| | | String pic = report.getPic().substring(imgIndexFirst + 5, imgIndexEnd); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(httpMethod = "POST", value = "案件台-案件录入-报案人员-报案人元导入") |
| | | @PostMapping("/reporterUpload") |
| | | @ApiResponse(message = "执行成功", code = 200) |
| | | @SneakyThrows |
| | | public R uploadReporter(@RequestParam(value = "multipartFile") MultipartFile multipartFile, Integer causeId) { |
| | | reportService.loadFileReport(multipartFile,causeId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(httpMethod = "POST", value = "案件台-报案人员-报案材料导出") |
| | | @PostMapping("/exportReporter") |
| | | @ApiResponse(message = "执行成功", code = 200) |