Bladeren bron

Merge remote-tracking branch 'origin/dev2' into dev2

# Conflicts:
#	RMS/src/main/java/cn/cslg/report/controller/InvalidReReport/ProofController.java
lwhhszx 2 jaren geleden
bovenliggende
commit
9e6c92f92a

+ 0 - 14
RMS/src/main/java/cn/cslg/report/common/model/dto/ReportDeDTO.java

@@ -1,14 +0,0 @@
-package cn.cslg.report.common.model.dto;
-
-import cn.cslg.report.entity.ReportFiles;
-import com.baomidou.mybatisplus.annotation.TableField;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.util.Date;
-import java.util.List;
-
-@Data
-public class ReportDeDTO extends ReportDTO {
-
-}

+ 236 - 0
RMS/src/main/java/cn/cslg/report/common/model/vo/ReportDeVO.java

@@ -0,0 +1,236 @@
+package cn.cslg.report.common.model.vo;
+
+import cn.cslg.report.entity.ReportFiles;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+@Accessors(chain = true)
+public class ReportDeVO {
+    /**
+     * 标的专利/产品号
+     */
+    @Schema(description = "标的专利号", required = true)
+    @TableField(value = "SIGN_PATENT_NO")
+    private String signPatentNo;
+
+    /**
+     * 报告名称
+     */
+    @Schema(description = "报告名称", required = true)
+    @TableField(value = "NAME")
+    private String name;
+
+    /**
+     * 产品/技术
+     */
+    @Schema(description = "产品/技术")
+    @TableField(value = "PRO_TEC")
+    private String proTec;
+
+    /**
+     * 报告类别
+     */
+    @Schema(description = "报告类别(0无效分析1第三方意见2稳定性分析3FTO调查4侵权分析5回避设计6图表分析7无效应对)")
+    @TableField(value = "TYPE")
+    private Integer type;
+
+    /**
+     * 报告状态
+     */
+    @Schema(description = "报告状态")
+    @TableField(value = "STATUS")
+    private Integer status;
+
+    /**
+     * 报告生成时间
+     */
+    @Schema(description = "报告生成时间")
+    @TableField(value = "CREATE_TIME")
+    private Date createTime;
+
+    /**
+     * 报告生成文件ID
+     */
+    @Schema(description = "报告生成文件ID")
+    @TableField(value = "REPORT_FILE_ID")
+    private Integer reportFileId;
+
+    /**
+     * 负责人ID
+     */
+    @Schema(description = "负责人ID")
+    @TableField(value = "PERSON_ID")
+    private Integer personId;
+    /**
+     * 负责人ID
+     */
+    @Schema(description = "负责人姓名")
+    @TableField(value = "PERSON_NAME")
+    private String personName;
+
+    /**
+     * 委托人ID
+     */
+    @Schema(description = "委托人ID")
+    @TableField(value = "CLIENT_ID")
+    private Integer clientId;
+
+    /**
+     * 委托人姓名
+     */
+    @Schema(description = "委托人姓名")
+    @TableField(value = "CLIENT_NAME")
+    private String clientName;
+
+    /**
+     * 承担部门ID
+     */
+    @Schema(description = "承担部门ID")
+    @TableField(value = "DEPARTMENT_ID")
+    private Integer departmentId;
+
+    /**
+     * 承担部门名称
+     */
+    @Schema(description = "承担部门名称")
+    @TableField(value = "DEPARTMENT_NAME")
+    private String departmentName;
+
+    /**
+     * 关联报告ID
+     */
+    @Schema(description = "关联报告ID")
+    @TableField(value = "ASSOCIATE_REPORT_ID")
+    private Integer associateReportId;
+
+    /**
+     * 关联报告名称
+     */
+    @Schema(description = "关联报告名称")
+    @TableField(value = "ASSOCIATE_REPORT_NAME")
+    private String associateReportName;
+
+    /**
+     * 应用场景
+     */
+    @Schema(description = "应用场景")
+
+    @TableField("SCENARIO_ID")
+    private String scenarioId;
+    /**
+     * 调查类型
+     */
+    @Schema(description = "调查类型")
+    @TableField(value = "IT_FLAG")
+    private Integer itFlag;
+
+    /**
+     * 专题库ID
+     */
+    @Schema(description = "专题库ID")
+    @TableField(value = "PROJECT_ID")
+    private Integer projectId;
+
+    /**
+     * 卷号
+     */
+    @Schema(description = "卷号")
+    @TableField(value = "VOLUME_NUMBER")
+    private String volumeNumber;
+    /**
+     * 拆分根据
+     */
+    @Schema(description = "拆分根据")
+    @TableField(value = "SPLIT_BY")
+    private Integer splitBy;
+    /**
+     * 拆分类型
+     */
+    @Schema(description = "拆分类型")
+    @TableField(value = "SPLIT_TYPE")
+    private Integer splitType;
+
+    /**
+     * 创建人ID
+     */
+    @Schema(description = "创建人ID")
+    @TableField(value = "CREATE_PERSON_ID")
+    private Integer createPersonId;
+    /**
+     * 创建人姓名
+     */
+    @Schema(description = "创建人姓名")
+    @TableField(value = "CREATE_PERSON_NAME")
+    private String createPersonName;
+    /**
+     * 备注
+     */
+    @Schema(description = "REMARK")
+    @TableField(value = "REMARK")
+    private String remark;
+
+    /**
+     * 结论id
+     */
+    @Schema(description = "结论id")
+    @TableField(value = "CONCLUSION_ID")
+    private String conclusionId;
+
+
+    /**
+     * 核心结论
+     */
+    @Schema(description = "核心结论")
+    @TableField(value = "CRON_CONCLUSION")
+    private String cronConclusion;
+
+    @Schema(description = "登录人在报告中的角色 0创建人,1负责人,2分享人")
+    @TableField(exist = false)
+    private List<Integer> loginRole;
+    /**
+     * 文件
+     */
+    @TableField(exist = false)
+    private List<ReportFiles> reportFiles;
+    /**
+     * 场景列表
+     */
+    @TableField(exist = false)
+    private List<String> scenarioList;
+
+    @TableField(exist = false)
+    private List<String> scenarioNames;
+
+    @TableField(exist = false)
+    private List<String> conclusionIds;
+    @TableField(exist = false )
+    private List<String> conclusions;
+
+    //以下是无效应对报告使用的字段 ↓
+    /**
+     * 案件编号
+     */
+    private String caseNumber;
+    /**
+     * 发文序号
+     */
+    private String issueNumber;
+    /**
+     * 发明创造名称
+     */
+    private String inventionName;
+    /**
+     * 专利权人
+     */
+    private String currentApplication;
+    /**
+     * 无效宣告请求人
+     */
+    private String invalidApplication;
+}

+ 22 - 22
RMS/src/main/java/cn/cslg/report/controller/InvalidReReport/ProofController.java

@@ -30,27 +30,27 @@ import java.io.IOException;
 public class ProofController {
     private final ProofService proofService;
 
-    @Operation(summary = "上传专利文献证据(文件)")
-    @PostMapping("/addPatentProofByFile")
-    public String addPatentProofByFile(@RequestBody ShareReportDTO shareReportDTO) {
-
-        return Response.success();
-    }
-
-
-    @Operation(summary = "上传非专利文献证据")
-    @PostMapping("/addProofByFile")
-    public String addProofByFile(@RequestBody ShareReportDTO shareReportDTO) {
-
-        return Response.success();
-    }
-
-
-    @Operation(summary = "上传专利文献证据(专利号)")
-    @PostMapping("/addPatentFile")
-    public String addPatentFile(@RequestBody ShareReportDTO shareReportDTO) throws IOException {
-
-        return Response.success();
-    }
+//    @Operation(summary = "上传专利文献证据(文件)")
+//    @PostMapping("/addPatentProofByFile")
+//    public String addPatentProofByFile(@RequestBody ShareReportDTO shareReportDTO) {
+//        proofService.
+//        return Response.success(flag);
+//    }
+//
+//
+//    @Operation(summary = "上传非专利文献证据")
+//    @PostMapping("/addProofByFile")
+//    public String addProofByFile(@RequestBody ShareReportDTO shareReportDTO) {
+//        proofService
+//        return Response.success();
+//    }
+//
+//
+//    @Operation(summary = "上传专利文献证据(专利号)")
+//    @PostMapping("/addPatentFile")
+//    public String addPatentFile(@RequestBody ShareReportDTO shareReportDTO) throws IOException {
+//
+//        return Response.success(assoReportPersonService.showShare(shareReportDTO));
+//    }
 
 }

+ 4 - 10
RMS/src/main/java/cn/cslg/report/controller/ReportController.java

@@ -3,19 +3,14 @@ package cn.cslg.report.controller;
 import cn.cslg.report.common.core.base.Constants;
 import cn.cslg.report.common.model.dto.ConclusionDTO;
 import cn.cslg.report.common.model.dto.ReportDTO;
-import cn.cslg.report.common.model.dto.ReportDeDTO;
-import cn.cslg.report.common.model.vo.FileVO;
+import cn.cslg.report.common.model.vo.ReportDeVO;
 import cn.cslg.report.common.model.vo.ReportVO;
 import cn.cslg.report.common.utils.Response;
 import cn.cslg.report.common.utils.StringUtils;
 import cn.cslg.report.common.utils.auth.checkAuth;
-import cn.cslg.report.entity.InvalidRecord;
-import cn.cslg.report.entity.LitigationHistory;
-import cn.cslg.report.entity.Report;
 import cn.cslg.report.entity.ReportReferences;
 import cn.cslg.report.service.business.*;
 import com.alibaba.fastjson.JSONObject;
-import com.google.gson.JsonObject;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.RequiredArgsConstructor;
@@ -153,14 +148,13 @@ public class ReportController {
     }
 
 
-    @GetMapping(value = "reReportDetail")
+    @GetMapping(value = "/reReportDetail")
     @Operation(summary = "返回报告详情")
     @Transactional(rollbackFor = Exception.class)
-    public String addConclusions(int reportId) throws IOException {
-        ReportDeDTO reportDeDTO = reportService.reReportDetail(reportId);
+    public String addConclusions(Integer reportId) throws IOException {
+        ReportDeVO reportDeDTO = reportService.reReportDetail(reportId);
         if (reportDeDTO == null) {
             return Response.error("报告不存在");
-
         }
         return Response.success(reportDeDTO);
     }

+ 1 - 1
RMS/src/main/java/cn/cslg/report/entity/Report.java

@@ -43,7 +43,7 @@ public class  Report extends BaseEntity<Report> {
     /**
      * 报告类别
      */
-    @Schema(description = "报告类别(0无效分析1第三方意见2稳定性分析3FTO调查4侵权分析5回避设计6图表分析)")
+    @Schema(description = "报告类别(0无效分析1第三方意见2稳定性分析3FTO调查4侵权分析5回避设计6图表分析7无效应对)")
     @TableField(value = "TYPE")
     private Integer type;
 

+ 19 - 0
RMS/src/main/java/cn/cslg/report/service/business/InvalidReReport/InvalidReReportService.java

@@ -0,0 +1,19 @@
+package cn.cslg.report.service.business.InvalidReReport;
+
+import cn.cslg.report.entity.invalidReReport.InvalidReReport;
+import cn.cslg.report.mapper.InvalidReReport.InvalidReReportMapper;
+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;
+
+/**
+ * @Author xiexiang
+ * @Date 2023/7/3
+ */
+@Service
+@Slf4j
+@RequiredArgsConstructor(onConstructor_ = {@Lazy})
+public class InvalidReReportService extends ServiceImpl<InvalidReReportMapper, InvalidReReport> {
+}

+ 41 - 39
RMS/src/main/java/cn/cslg/report/service/business/ReportService.java

@@ -11,10 +11,11 @@ import cn.cslg.report.entity.*;
 import cn.cslg.report.entity.asso.AssoReportFile;
 import cn.cslg.report.entity.asso.AssoReportPerson;
 import cn.cslg.report.entity.invalidReReport.InvalidReReport;
+import cn.cslg.report.exception.XiaoShiException;
 import cn.cslg.report.mapper.ReportMapper;
 import cn.cslg.report.service.*;
+import cn.cslg.report.service.business.InvalidReReport.InvalidReReportService;
 import cn.cslg.report.service.business.asso.AssoReportPersonService;
-import cn.cslg.report.service.impl.InvalidReReportServiceImpl;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -64,7 +65,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
     private final AssoReportPersonService assoReportPersonService;
     private final IAssoEventReportService assoEventReportService;
     private final IFollowUpService followUpService;
-    private final InvalidReReportServiceImpl invalidReReportService;
+    private final InvalidReReportService invalidReReportService;
 
     private Report loadReport(ReportDTO reportDto) {
         Report report = new Report();
@@ -139,19 +140,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
             report.setConclusionId(null);
         }
         report.insert();
-
-        //TODO 当是无效应对报告时,在无效应对报告表里插入信息
-        if (reportDto.getType().equals(7)) {
-            PersonnelVO personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
-            InvalidReReport invalidReReport = new InvalidReReport();
-            BeanUtils.copyProperties(reportDto, invalidReReport);
-            invalidReReport.setReportId(report.getId());
-            invalidReReport.setCreateId(personnelVO.getId());
-            //无效应对报告数据入库
-            log.info("无效应对报告表新增数据");
-            invalidReReportService.save(invalidReReport);
-        }
-
+        //TODO 当是无效应对报告时,在无效应对报告里插入信息
         if (files != null && files.size() != 0) {
             //当
             if (report.getStatus() != 3) {
@@ -445,22 +434,6 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
             List<Integer> fileIdList = reportFileService.uploadFiles(files);
             assoReportFileService.addAsso(reportDto.getId(), fileIdList);
         }
-        report.updateById();
-
-        //TODO 当是无效应对报告,修改无效应对报告表数据
-        if (reportDto.getType().equals(7)) {
-            List<InvalidReReport> invalidReReports = invalidReReportService.list(new LambdaQueryWrapper<InvalidReReport>().eq(InvalidReReport::getReportId, report.getId()));
-            if (invalidReReports != null && invalidReReports.size() > 0) {
-                InvalidReReport invalidReReport = invalidReReports.get(0);
-                InvalidReReport updateInvalidReReport = new InvalidReReport();
-                BeanUtils.copyProperties(reportDto, updateInvalidReReport);
-                updateInvalidReReport.setId(invalidReReport.getId());
-                //无效应对报告表修改数据
-                log.info("无效应对报告表修改数据");
-                invalidReReportService.updateById(updateInvalidReReport);
-            }
-        }
-
         return report.updateById();
 
     }
@@ -498,8 +471,8 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
         reportReferencesService.deleteByReportId(id);
         //删除对比信息
         compareMessageService.deleteByreportID(id);
-        //TODO 当是无效应对报告,删除无效应对报告表数据
-        invalidReReportService.remove(new LambdaQueryWrapper<InvalidReReport>().eq(InvalidReReport::getReportId, id));
+        //TODO 当时无效应对报告时
+
 
         Boolean dele = this.removeById(id);
         if (dele == true) {
@@ -734,16 +707,45 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
     }
 
     /**
+     * @autor 谢翔
      * @param ReportId
      * @return
-     * @autor 谢翔
      */
-    public ReportDeDTO reReportDetail(int ReportId) {
-        ReportDeDTO reportDeDTO = null;
+    public ReportDeVO reReportDetail(Integer reportId) {
+        ReportDeVO reportDeVO = new ReportDeVO();
+        //检测传入参数合法性
+        if(reportId == null && reportId <=0){
+            throw new XiaoShiException("传入参数异常");
+        }
         //根据报告id获得报告
+        Report report = this.getById(reportId);
         //若根据报告id未获取到报告返回空
-        //若报告为无效应对报告则从无效应对报告表中获得无效对应报告拓展信息
-        //装载报告信息,无效对应报告拓展信息到ReportDeDTO并返回
-        return reportDeDTO;
+        if(report == null){
+            return null;
+        }
+        List<Report> reports = new ArrayList<>();
+        reports.add(report);
+        try {
+            //调用this.reportData装载报告
+            List<Report> reports1 = this.reportData(reports);
+            Report report1 = reports1.get(0);
+            //若报告为无效应对报告则从无效应对报告表中获得无效对应报告拓展信息
+            if(report1.getType().equals(7)){
+                LambdaQueryWrapper<InvalidReReport> queryWrapper = new LambdaQueryWrapper<>();
+                queryWrapper.eq(InvalidReReport::getReportId, report1.getId());
+                InvalidReReport invalidReReport = invalidReReportService.getOne(queryWrapper);
+                if(invalidReReport == null){
+                    throw new XiaoShiException("未查询到无效应对报告信息");
+                }
+                //装载报告信息,无效对应报告拓展信息到ReportDeDTO并返回
+                BeanUtils.copyProperties(report1, reportDeVO);
+                BeanUtils.copyProperties(invalidReReport, reportDeVO);
+            } else {
+                BeanUtils.copyProperties(report1, reportDeVO);
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return reportDeVO;
     }
 }