Ver Fonte

代码合并

lwhhszx há 2 anos atrás
pai
commit
cbda293f2a

+ 39 - 0
RMS/src/main/java/cn/cslg/report/common/model/dto/invalidReReport/ProofDetailDTO.java

@@ -0,0 +1,39 @@
+package cn.cslg.report.common.model.dto.invalidReReport;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class ProofDetailDTO {
+    /**
+     * 证据id
+     */
+    private Integer proofId;
+
+    /**
+     * 权要id
+     */
+    private Integer rightId;
+
+    /**
+     * 特征id
+     */
+    private Integer featureId;
+
+    /**
+     * 证据(无效请求人)
+     */
+    private String proofStr;
+
+    /**
+     * 证据(权利人)
+     */
+    private String argumentStr;
+    /**
+     * 自增唯一证据id
+      */
+    private Integer id;
+
+}

+ 27 - 0
RMS/src/main/java/cn/cslg/report/common/model/dto/invalidReReport/ProofGroupDTO.java

@@ -0,0 +1,27 @@
+package cn.cslg.report.common.model.dto.invalidReReport;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ProofGroupDTO {
+    /**
+     * 无效理由id
+     */
+    private Integer invalidReasonId;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 陈述意见
+     */
+    private String argument_str;
+
+    private List<Integer> proofIds;
+
+}

+ 26 - 0
RMS/src/main/java/cn/cslg/report/common/model/vo/invalidReReport/ProofGroupVO.java

@@ -0,0 +1,26 @@
+package cn.cslg.report.common.model.vo.invalidReReport;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ProofGroupVO {
+    /**
+     * 无效理由id
+     */
+    private Integer invalidReasonId;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 陈述意见
+     */
+    private String argument_str;
+
+    private List<Integer> proofIds;
+
+}

+ 17 - 11
RMS/src/main/java/cn/cslg/report/controller/InvalidReReport/ProofDetailController.java

@@ -3,17 +3,17 @@ package cn.cslg.report.controller.InvalidReReport;
 
 import cn.cslg.report.common.core.base.Constants;
 import cn.cslg.report.common.model.dto.ShareReportDTO;
+import cn.cslg.report.common.model.dto.invalidReReport.ProofDetailDTO;
 import cn.cslg.report.common.utils.Response;
+import cn.cslg.report.service.business.InvalidReReport.ProofDetailService;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.io.IOException;
+import java.util.List;
 
 @Tag(name = "无效应对证据详情管理")
 @Slf4j
@@ -21,28 +21,34 @@ import java.io.IOException;
 @RestController
 @RequestMapping(Constants.REPORT_API + "/proofDetail")
 public class ProofDetailController {
+    private final ProofDetailService proofDetailService;
     @Operation(summary = "添加证据详情")
     @PostMapping("/addProofDetail")
-    public String addProofDetail() throws IOException {
-
+    public String addProofDetail(@RequestBody ProofDetailDTO proofDetailDTO) throws IOException {
+        proofDetailService.addProofDetail(proofDetailDTO);
         return Response.success();
     }
 
     @Operation(summary = "删除证据详情")
-    @PostMapping("/removeProofDetail")
-    public String removeProofDetail() throws IOException {
+    @PostMapping("/deleteProofDetail")
+    public String deleteProofDetail(@RequestBody List<Integer> ids) throws IOException {
+        proofDetailService.deleteProofDetail(ids);
         return Response.success();
     }
 
     @Operation(summary = "修改证据详情")
     @PostMapping("/updateProofDetail")
-    public String updateProofDetail() throws IOException {
+    public String updateProofDetail(@RequestBody ProofDetailDTO proofDetailDTO) throws IOException {
+        proofDetailService.updateProofDetail(proofDetailDTO);
+        //根据Dto的id查询出对应的证据
+        //更新证据的信息
         return Response.success();
     }
 
     @Operation(summary = "查找证据详情")
-    @PostMapping("/queryProofDetail")
-    public String queryProofDetail() throws IOException {
+    @GetMapping("/queryProofDetail")
+    public String queryProofDetail(Integer proofId) throws IOException {
+        proofDetailService.queryProofDetail(proofId);
         return Response.success();
     }
 }

+ 13 - 9
RMS/src/main/java/cn/cslg/report/controller/InvalidReReport/ProofGroupController.java

@@ -2,7 +2,9 @@ package cn.cslg.report.controller.InvalidReReport;
 
 import cn.cslg.report.common.core.base.Constants;
 import cn.cslg.report.common.model.dto.ShareReportDTO;
+import cn.cslg.report.common.model.dto.invalidReReport.ProofGroupDTO;
 import cn.cslg.report.common.utils.Response;
+import cn.cslg.report.service.business.InvalidReReport.ProofGroupService;
 import cn.cslg.report.service.business.asso.AssoReportPersonService;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -14,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.io.IOException;
+import java.util.List;
 
 /**
  * 报告分享管理的Controller层
@@ -27,31 +30,32 @@ import java.io.IOException;
 @RestController
 @RequestMapping(Constants.REPORT_API + "/proofGroup")
 public class ProofGroupController {
-    private final AssoReportPersonService assoReportPersonService;
+    private final ProofGroupService proofGroupService;
 
     @Operation(summary = "添加证据组合")
     @PostMapping("/add")
-    public String add(@RequestBody ShareReportDTO shareReportDTO) {
-        Integer flag = assoReportPersonService.shareReport(shareReportDTO);
-        return Response.success(flag);
+    public String add(@RequestBody ProofGroupDTO proofGroupDTO) {
+        proofGroupService.addProofGroup(proofGroupDTO);
+        return Response.success();
     }
 
     @Operation(summary = "删除证据组合")
     @PostMapping("/delete")
-    public String delete(@RequestBody ShareReportDTO shareReportDTO) {
-        assoReportPersonService.removeShare(shareReportDTO);
+    public String delete(@RequestBody List<Integer> ids) {
+        proofGroupService.deleteProofGroup(ids);
         return Response.success();
     }
 
     @Operation(summary = "修改证据组合")
     @PostMapping("/update")
-    public String addPatentFile(@RequestBody ShareReportDTO shareReportDTO) throws IOException {
-        return Response.success(assoReportPersonService.showShare(shareReportDTO));
+    public String addPatentFile(@RequestBody ProofGroupDTO proofGroupDTO) throws IOException {
+        proofGroupService.updateProofGroup(proofGroupDTO);
+        return Response.success();
     }
 
     @Operation(summary = "查询证据组合")
     @PostMapping("/query")
     public String query(@RequestBody ShareReportDTO shareReportDTO) throws IOException {
-        return Response.success(assoReportPersonService.showShare(shareReportDTO));
+        return Response.success();
     }
 }

+ 18 - 0
RMS/src/main/java/cn/cslg/report/mapper/InvalidReReport/ProofDetailMapper.java

@@ -0,0 +1,18 @@
+package cn.cslg.report.mapper.InvalidReReport;
+
+import cn.cslg.report.entity.invalidReReport.InvalidProcess;
+import cn.cslg.report.entity.invalidReReport.ProofDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ *
+ *证据详情Mapper层
+ * @Author 李仁杰
+ * @Date 2023/6/28
+ */
+@Repository
+public interface ProofDetailMapper extends BaseMapper<ProofDetail> {
+
+
+}

+ 19 - 0
RMS/src/main/java/cn/cslg/report/mapper/InvalidReReport/ProofGroupMapper.java

@@ -0,0 +1,19 @@
+package cn.cslg.report.mapper.InvalidReReport;
+
+import cn.cslg.report.entity.invalidReReport.ProofDetail;
+import cn.cslg.report.entity.invalidReReport.ProofGroup;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ *
+ *证据详情Mapper层
+ * @Author 李仁杰
+ * @Date 2023/6/28
+ */
+@Repository
+public interface ProofGroupMapper extends BaseMapper<ProofGroup> {
+
+
+}
+

+ 33 - 13
RMS/src/main/java/cn/cslg/report/service/business/InvalidReReport/ProofDetailService.java

@@ -1,7 +1,10 @@
 package cn.cslg.report.service.business.InvalidReReport;
 
+import cn.cslg.report.common.model.dto.invalidReReport.ProofDetailDTO;
 import cn.cslg.report.common.utils.Response;
 import cn.cslg.report.entity.Template;
+import cn.cslg.report.entity.invalidReReport.ProofDetail;
+import cn.cslg.report.mapper.InvalidReReport.ProofDetailMapper;
 import cn.cslg.report.mapper.TemplateMapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -12,28 +15,45 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 
 @Service
 @Slf4j
 @RequiredArgsConstructor(onConstructor_ = {@Lazy})
-public class ProofDetailService extends ServiceImpl<TemplateMapper, Template> {
-    //上传专利文献证据(文件)
-    public String addProofDetail(Template template) {
-
+public class ProofDetailService extends ServiceImpl<ProofDetailMapper,ProofDetail> {
+   //添加证据详情
+    public String addProofDetail(ProofDetailDTO proofDetailDTO) {
+        //检查证据id,权要id,特征id是否为null
+    //将DTO里的属性装载到ProofDetail里并插入
     return "";
     }
 
-    //上传非专利文献证据
-    public String deleteProofDetail(Template template) {
-          return  "";
+    //批量删除证据详情
+    public String deleteProofDetail(List<Integer> ids) {
+
+          //检测ids是否为null或size=0
+        //根据ids批量删除
+
+        return  "";
+    }
+
+    //更新证据详情
+    public String updateProofDetail(ProofDetailDTO proofDetailDTO) {
+        //检查证据id,权要id,特征id是否为null
+        //将DTO里的属性装载到ProofDetail里并插入
+
+        return Response.success();
+
     }
 
-    //上传专利文献证据(专利号)
-    public String addPatentFile(Template template) {
-        LambdaQueryWrapper<Template> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(Template::getReportType, template.getReportType());
-        IPage<Template> templateIPage = this.page(new Page<>(template.getCurrent(), template.getSize()), wrapper);
-        return Response.success(templateIPage);
+
+    //查询证据详情
+    public String queryProofDetail(int proofId) {
+        //若proofId 为null 或<=0,返回
+    //根据证据id查询证据详情
+
+        return Response.success();
 
     }
 }

+ 67 - 0
RMS/src/main/java/cn/cslg/report/service/business/InvalidReReport/ProofGroupService.java

@@ -0,0 +1,67 @@
+package cn.cslg.report.service.business.InvalidReReport;
+
+import cn.cslg.report.common.model.dto.invalidReReport.ProofDetailDTO;
+import cn.cslg.report.common.model.dto.invalidReReport.ProofGroupDTO;
+import cn.cslg.report.common.utils.Response;
+import cn.cslg.report.entity.invalidReReport.ProofDetail;
+import cn.cslg.report.entity.invalidReReport.ProofGroup;
+import cn.cslg.report.mapper.InvalidReReport.ProofDetailMapper;
+import cn.cslg.report.mapper.InvalidReReport.ProofGroupMapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+
+@Service
+@Slf4j
+@RequiredArgsConstructor(onConstructor_ = {@Lazy})
+public class ProofGroupService extends ServiceImpl<ProofGroupMapper,ProofGroup> {
+   //添加证据组合
+    public String addProofGroup(ProofGroupDTO ProofGroupDTO) {
+      //判断proofIds是否为空,若为空则返回
+        // 添加证据组合
+        //添加证据组合和证据关联
+
+    return "";
+    }
+
+
+    /**
+     *批量删除证据组合
+     * @param ids 证据组合ids
+     * @return
+     */
+    public String deleteProofGroup(List<Integer> ids) {
+          //检测ids是否为null或size=0
+        //根据ids批量删除证据组合
+        //根据证据组合id批量删除证据组合-证据关联
+
+        return  "";
+    }
+
+    //更新证据组合
+    public String updateProofGroup(ProofGroupDTO proofGroupDTO) {
+          //判断proofIds是否为空,若为空则返回
+        // 更新证据组合信息
+        // 根据证据组合id查找 证据组合和证据关联ids
+        // 寻找proofIds比关联ids多的id并插入到证据组合和证据关联表中
+        //寻找proofIds比关联ids少的id并从证据组合和证据关联表中删除
+        return Response.success();
+
+    }
+
+    //查询证据组合
+    public String queryProofGroupDetail(int id) {
+        //若proofId 为null 或<=0,返回
+    //根据证据组合id查询证据组合并装载到ProofGroupVO类里
+        //从
+        //
+        return Response.success();
+
+    }
+
+}