xiexiang 1 年之前
父节点
当前提交
5ce9fbe75a

+ 0 - 1
src/main/java/cn/cslg/pas/common/dto/business/OtherPatentInfoDTO.java

@@ -12,5 +12,4 @@ public class OtherPatentInfoDTO {
     private Integer projectId;
     private Integer current;
     private Integer size;
-
 }

+ 3 - 0
src/main/java/cn/cslg/pas/common/vo/business/InvalidRecordVO.java

@@ -8,6 +8,7 @@ import java.util.Date;
 import java.util.List;
 
 /**
+ * 被无效历史VO
  * @Author xiexiang
  * @Date 2024/1/19
  */
@@ -68,4 +69,6 @@ public class InvalidRecordVO {
     private List<SystemFile> systemFileList;
 
     private Boolean ifAdd;
+
+    private ReportVO reportVO;
 }

+ 30 - 0
src/main/java/cn/cslg/pas/common/vo/business/ReportVO.java

@@ -0,0 +1,30 @@
+package cn.cslg.pas.common.vo.business;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+
+/**
+ * @Author xiexiang
+ * @Date 2024/2/23
+ */
+@Data
+public class ReportVO {
+    /**
+     * 项目id
+     */
+    private Integer projectId;
+
+    /**
+     *标的专利号
+     */
+    private String signPatentNo;
+
+    /**
+     *类型
+     */
+    private Integer reportType;
+    /**
+     * 状态
+     */
+    private Integer status;
+}

+ 6 - 0
src/main/java/cn/cslg/pas/domain/business/InvalidRecord.java

@@ -62,4 +62,10 @@ public class InvalidRecord extends BaseEntity<InvalidRecord> {
      */
     @TableField(value = "create_time")
     private Date createTime;
+
+    /**
+     * 租户id
+     */
+    @TableField(value = "tenant_id")
+    private Integer tenantId;
 }

+ 6 - 0
src/main/java/cn/cslg/pas/domain/business/LitigationHistory.java

@@ -93,4 +93,10 @@ public class LitigationHistory extends BaseEntity<LitigationHistory> {
      */
     @TableField(value = "create_time")
     private Date createTime;
+
+    /**
+     * 租户id
+     */
+    @TableField(value = "tenant_id")
+    private Integer tenantId;
 }

+ 6 - 0
src/main/java/cn/cslg/pas/domain/business/OtherReferences.java

@@ -50,4 +50,10 @@ public class OtherReferences extends BaseEntity<OtherReferences> {
      */
     @TableField(value = "create_time")
     private Date createTime;
+
+    /**
+     * 租户id
+     */
+    @TableField(value = "tenant_id")
+    private Integer tenantId;
 }

+ 7 - 1
src/main/java/cn/cslg/pas/service/business/AsInvalidReasonHistoryService.java

@@ -126,9 +126,15 @@ public class AsInvalidReasonHistoryService extends ServiceImpl<AsInvalidReasonHi
         if (patentNo == null || StringUtils.isEmpty(patentNo)) {
             throw new XiaoShiException("入参为空");
         }
-
+        PersonnelVO personnelVO = new PersonnelVO();
+        try {
+            personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
+        } catch (Exception e) {
+            throw new XiaoShiException("未查询到当前登陆人");
+        }
         LambdaQueryWrapper<AsInvalidReasonHistory> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(AsInvalidReasonHistory::getPatentNo, patentNo)
+                .eq(AsInvalidReasonHistory::getTenantId, personnelVO.getTenantId())
                 .orderByDesc(AsInvalidReasonHistory::getInvalidTime);
         List<AsInvalidReasonHistory> asInvalidReasonHistories = this.list(queryWrapper);
 

+ 18 - 2
src/main/java/cn/cslg/pas/service/business/InvalidRecordService.java

@@ -9,6 +9,7 @@ import cn.cslg.pas.common.utils.CacheUtils;
 import cn.cslg.pas.common.utils.LoginUtils;
 import cn.cslg.pas.common.utils.StringUtils;
 import cn.cslg.pas.common.vo.business.InvalidRecordVO;
+import cn.cslg.pas.common.vo.business.ReportVO;
 import cn.cslg.pas.domain.business.*;
 import cn.cslg.pas.exception.XiaoShiException;
 import cn.cslg.pas.mapper.InvalidRecordMapper;
@@ -105,6 +106,7 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
                 throw new XiaoShiException("未查询到当前登陆人");
             }
             invalidRecord.setCreateId(personnelVO.getId());
+            invalidRecord.setTenantId(personnelVO.getTenantId());
             invalidRecord.insert();
             if (fileGuids != null && !fileGuids.isEmpty()) {
                 //先删除 后添加
@@ -125,9 +127,15 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
         if (patentNo == null || StringUtils.isEmpty(patentNo)) {
             throw new XiaoShiException("入参为空");
         }
-
+        PersonnelVO personnelVO = new PersonnelVO();
+        try {
+            personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
+        } catch (Exception e) {
+            throw new XiaoShiException("未查询到当前登陆人");
+        }
         LambdaQueryWrapper<InvalidRecord> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.eq(InvalidRecord::getPatentNo, patentNo);
+        queryWrapper.eq(InvalidRecord::getPatentNo, patentNo)
+                .eq(InvalidRecord::getTenantId, personnelVO.getTenantId());
         List<InvalidRecord> invalidRecords = this.list(queryWrapper);
 
         if (!invalidRecords.isEmpty()) {
@@ -230,6 +238,10 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
                     List<String> fileGuids = this.loadFileGuids(item.getProjectId());
                     invalidRecordVO.setFileGuids(fileGuids);
                     invalidRecordVO.setIfAdd(false);
+                    //带出报告信息
+                    ReportVO reportVO = new ReportVO();
+                    BeanUtils.copyProperties(item, reportVO);
+                    invalidRecordVO.setReportVO(reportVO);
                     finalVOS.add(invalidRecordVO);
                 } else if (type.equals(7)) {
                     //报告类型为官方无效  查询行政判决诉讼书
@@ -247,6 +259,10 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
                     List<String> fileGuids = this.loadFileGuids(item.getProjectId());
                     invalidRecordVO.setFileGuids(fileGuids);
                     invalidRecordVO.setIfAdd(false);
+                    //带出报告信息
+                    ReportVO reportVO = new ReportVO();
+                    BeanUtils.copyProperties(item, reportVO);
+                    invalidRecordVO.setReportVO(reportVO);
                     finalVOS.add(invalidRecordVO);
                 }
             });

+ 10 - 3
src/main/java/cn/cslg/pas/service/business/LitigationHistoryService.java

@@ -92,6 +92,7 @@ public class LitigationHistoryService extends ServiceImpl<LitigationHistoryMappe
                 throw new XiaoShiException("未查询到当前登陆人");
             }
             litigationHistory.setCreateId(personnelVO.getId());
+            litigationHistory.setTenantId(personnelVO.getTenantId());
             litigationHistory.insert();
             if (fileGuids != null && !fileGuids.isEmpty()) {
                 //先删除 后添加
@@ -107,7 +108,7 @@ public class LitigationHistoryService extends ServiceImpl<LitigationHistoryMappe
      * @return
      * @throws IOException
      */
-    public Records getLitigationHistory( OtherPatentInfoDTO otherPatentInfoDTO) throws IOException {
+    public Records getLitigationHistory(OtherPatentInfoDTO otherPatentInfoDTO) throws IOException {
         List<LitigationHistoryVO> litigationHistoryVOS = new ArrayList<>();
         String patentNo = otherPatentInfoDTO.getPatentNo();
         if (patentNo == null || StringUtils.isEmpty(patentNo)) {
@@ -116,10 +117,16 @@ public class LitigationHistoryService extends ServiceImpl<LitigationHistoryMappe
         Integer current = otherPatentInfoDTO.getCurrent();
         Integer size = otherPatentInfoDTO.getSize();
         Page<LitigationHistory> page = new Page<>(current, size);
-
+        PersonnelVO personnelVO = new PersonnelVO();
+        try {
+            personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
+        } catch (Exception e) {
+            throw new XiaoShiException("未查询到当前登陆人");
+        }
         LambdaQueryWrapper<LitigationHistory> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(LitigationHistory::getPatentNo, patentNo)
-                    .orderByDesc(LitigationHistory::getCreateTime);
+                .eq(LitigationHistory::getTenantId, personnelVO.getTenantId())
+                .orderByDesc(LitigationHistory::getCreateTime);
         IPage<LitigationHistory> litigationHistoryPage = this.page(page, queryWrapper);
         List<LitigationHistory> litigationHistories = litigationHistoryPage.getRecords();
         long total = litigationHistoryPage.getTotal();

+ 10 - 2
src/main/java/cn/cslg/pas/service/business/OtherReferencesService.java

@@ -12,6 +12,7 @@ import cn.cslg.pas.common.utils.StringUtils;
 import cn.cslg.pas.common.vo.business.OtherReferencesVO;
 import cn.cslg.pas.domain.business.AssoOtherPatentInfoFile;
 import cn.cslg.pas.domain.business.OtherReferences;
+import cn.cslg.pas.domain.business.ReviewHistory;
 import cn.cslg.pas.exception.XiaoShiException;
 import cn.cslg.pas.mapper.OtherReferencesMapper;
 import cn.cslg.pas.service.common.FileManagerService;
@@ -89,6 +90,7 @@ public class OtherReferencesService extends ServiceImpl<OtherReferencesMapper, O
                 throw new XiaoShiException("未查询到当前登陆人");
             }
             otherReferences.setCreateId(personnelVO.getId());
+            otherReferences.setTenantId(personnelVO.getTenantId());
             otherReferences.insert();
             if (fileGuids != null && !fileGuids.isEmpty()) {
                 //先删除 后添加
@@ -137,9 +139,15 @@ public class OtherReferencesService extends ServiceImpl<OtherReferencesMapper, O
         Integer current = otherPatentInfoDTO.getCurrent();
         Integer size = otherPatentInfoDTO.getSize();
         Page<OtherReferences> page = new Page<>(current, size);
-
+        PersonnelVO personnelVO = new PersonnelVO();
+        try {
+            personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
+        } catch (Exception e) {
+            throw new XiaoShiException("未查询到当前登陆人");
+        }
         LambdaQueryWrapper<OtherReferences> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.eq(OtherReferences::getPatentNo, patentNo);
+        queryWrapper.eq(OtherReferences::getPatentNo, patentNo)
+                .eq(OtherReferences::getTenantId, personnelVO.getTenantId());
         IPage<OtherReferences> otherReferencesPage = this.page(page, queryWrapper);
         List<OtherReferences> otherReferencesList = otherReferencesPage.getRecords();
         long total = otherReferencesPage.getTotal();

+ 8 - 1
src/main/java/cn/cslg/pas/service/business/ReviewHistoryService.java

@@ -33,6 +33,7 @@ import java.util.List;
 import java.util.stream.Collectors;
 
 /**
+ * 审查历史
  * @Author xiexiang
  * @Date 2024/1/15
  */
@@ -118,9 +119,15 @@ public class ReviewHistoryService extends ServiceImpl<ReviewHistoryMapper, Revie
         Integer current = otherPatentInfoDTO.getCurrent();
         Integer size = otherPatentInfoDTO.getSize();
         Page<ReviewHistory> page = new Page<>(current, size);
-
+        PersonnelVO personnelVO = new PersonnelVO();
+        try {
+            personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
+        } catch (Exception e) {
+            throw new XiaoShiException("未查询到当前登陆人");
+        }
         LambdaQueryWrapper<ReviewHistory> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(ReviewHistory::getPatentNo, patentNo)
+                .eq(ReviewHistory::getTenantId, personnelVO.getTenantId())
                 .orderByDesc(ReviewHistory::getCreateTime);
         IPage<ReviewHistory> reviewHistoryPage = this.page(page, queryWrapper);
         List<ReviewHistory> reviewHistories = reviewHistoryPage.getRecords();