|
@@ -0,0 +1,48 @@
|
|
|
+package cn.cslg.report.controller;
|
|
|
+
|
|
|
+import cn.cslg.report.common.core.base.Constants;
|
|
|
+import cn.cslg.report.entity.InvalidRecord;
|
|
|
+import cn.cslg.report.entity.ReviewHistory;
|
|
|
+import cn.cslg.report.service.business.InvalidRecordService;
|
|
|
+import cn.cslg.report.service.business.ReviewHistoryService;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import org.springframework.context.annotation.Lazy;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.io.IOException;
|
|
|
+
|
|
|
+@Tag(name = "无效记录")
|
|
|
+@RestController
|
|
|
+@RequestMapping(Constants.REPORT_API + "/reviewHistory")
|
|
|
+@RequiredArgsConstructor(onConstructor_ = {@Lazy})
|
|
|
+public class ReviewHistoryController {
|
|
|
+ public final ReviewHistoryService reviewHistoryService;
|
|
|
+ @RequestMapping(value = "/addReviewHistory", method = RequestMethod.POST)
|
|
|
+ @Operation(summary = "增加审查历史")
|
|
|
+ public String addInvalidRecord(ReviewHistory reviewHistory) throws IOException{
|
|
|
+ return reviewHistoryService.addReviewHistory(reviewHistory);
|
|
|
+ }
|
|
|
+ @RequestMapping(value = "/updateReviewHistory", method = RequestMethod.POST)
|
|
|
+ @Operation(summary = "修改审查历史")
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public String updateInvalidRecord(ReviewHistory reviewHistory)throws IOException{
|
|
|
+ return reviewHistoryService.updateReviewHistory(reviewHistory);
|
|
|
+
|
|
|
+ }
|
|
|
+ @GetMapping(value = "/deleReviewHistory")
|
|
|
+ @Operation(summary = "删除审查历史")
|
|
|
+ public String deleInvalidRecord(int id)throws IOException{
|
|
|
+ return reviewHistoryService.deleteReviewHistory(id);
|
|
|
+ }
|
|
|
+ @PostMapping(value = "/queryReviewHistory")
|
|
|
+ @Operation(summary = "查询审查历史")
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public String queryInvalidRecord(@RequestBody ReviewHistory reviewHistory)throws IOException{
|
|
|
+ return reviewHistoryService.queryReviewHistory(reviewHistory);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|