Quellcode durchsuchen

解决无法删除报告问题,增加近10张外键关联表的数据删除

chendayu vor 2 Jahren
Ursprung
Commit
e5e4abec78

+ 2 - 0
RMS/src/main/java/cn/cslg/report/controller/FeatureController.java

@@ -62,11 +62,13 @@ public class FeatureController {
     public String querySimFeaturePatent(@RequestBody PatentVO patentVO) throws IOException {
         return Response.success(featureService.querySimFeaturePatent(patentVO));
     }
+
     @RequestMapping(value = "/querySimFeaturePatentByPatentNo", method = RequestMethod.POST)
     @Operation(summary = "根据专利号获得相似特征的专利")
     public String querySimFeaturePatentByPatentNo(@RequestBody QueryRecordsDTO queryRecordsDTO) throws IOException {
         return Response.success(featureService.querySimFeaturePatentByPatentNo(queryRecordsDTO));
     }
+
     @RequestMapping(value = "/getSplitMessage", method = RequestMethod.GET)
     @Operation(summary = "根据专利号和任务Id获得拆分信息")
     public String getSplitMessage(Integer taskId, String patentNo, Integer reportId) throws IOException {

+ 1 - 1
RMS/src/main/java/cn/cslg/report/service/business/FeatureService.java

@@ -97,7 +97,7 @@ public class FeatureService extends ServiceImpl<FeatureMapper, Features> {
      * @throws IOException
      * @function 从PAS系统上获得权要并拆分
      */
-    @Transactional(rollbackFor = Exception.class, timeout = 10)
+    @Transactional(rollbackFor = Exception.class)
     public String splitPatentRight(SplitVO splitVO) throws IOException {
         String patentNo = splitVO.getPatentNo();
         Integer reportId = splitVO.getReportId();

+ 6 - 1
RMS/src/main/java/cn/cslg/report/service/business/ReportService.java

@@ -82,6 +82,8 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
     private final AssoProofGroupStrService assoProofGroupStrService;
     private final InvalidProcessService invalidProcessService;
     private final ProofStrService proofStrService;
+    private final ArgumentsScenarioService argumentsScenarioService;
+    private final ScratchService scratchService;
 
     private Report loadReport(ReportDTO reportDto) {
         Report report = new Report();
@@ -560,7 +562,10 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
         invalidProcessService.remove(new LambdaQueryWrapper<InvalidProcess>().eq(InvalidProcess::getReportId, id));
         //删除无效理由证据表数据
         proofStrService.remove(new LambdaQueryWrapper<ProofStr>().eq(ProofStr::getReportId, id));
-
+        //删除陈述意见方案表数据
+        argumentsScenarioService.remove(new LambdaQueryWrapper<ArgumentsScenarios>().eq(ArgumentsScenarios::getReportId, id));
+        //删除"SCRATCH"表数据
+        scratchService.remove(new LambdaQueryWrapper<Scratch>().eq(Scratch::getReportId, id));
 
         Boolean dele = this.removeById(id);
         if (dele == true) {