| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 报案表(Report)表控制层 |
| | |
| | | @PostMapping |
| | | @ApiOperation(value = "报案") |
| | | public R<Boolean> insert(@RequestBody AddReportDto addReportDto) { |
| | | |
| | | return R.ok(reportService.addReport(addReportDto)); |
| | | } |
| | | |
| | |
| | | @ApiResponse(message = "执行成功", code = 200) |
| | | public void exportReport(@RequestParam(value = "id") Integer id, HttpServletResponse response) { |
| | | reportService.exportReporter(id, response); |
| | | } |
| | | |
| | | @ApiOperation(httpMethod = "POST", value = "案件台-报案人员-报案人员导入") |
| | | @PostMapping("/upload") |
| | | @ApiResponse(message = "执行成功", code = 200) |
| | | @SneakyThrows |
| | | public R upload(@RequestParam(value = "multipartFile") MultipartFile multipartFile) { |
| | | reportService.loadFile(multipartFile); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |