Browse Source

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

# Conflicts:
#	RMS/target/classes/cn/cslg/report/service/business/CompareMessageService.class
#	RMS/target/classes/cn/cslg/report/service/business/ReportService.class
#	RMS/target/classes/cn/cslg/report/service/business/TaskService.class
chenyi 2 năm trước cách đây
mục cha
commit
029ebcc466
20 tập tin đã thay đổi với 68 bổ sung42 xóa
  1. 2 0
      RMS/src/main/java/cn/cslg/report/common/model/vo/SyneryVO.java
  2. 1 1
      RMS/src/main/java/cn/cslg/report/controller/ProductController.java
  3. 1 1
      RMS/src/main/java/cn/cslg/report/service/IProductService.java
  4. 7 15
      RMS/src/main/java/cn/cslg/report/service/business/CompareMessageService.java
  5. 5 5
      RMS/src/main/java/cn/cslg/report/service/business/FeatureService.java
  6. 4 2
      RMS/src/main/java/cn/cslg/report/service/business/ReportDocumentService.java
  7. 2 2
      RMS/src/main/java/cn/cslg/report/service/business/ReportService.java
  8. 32 10
      RMS/src/main/java/cn/cslg/report/service/business/TaskService.java
  9. 5 1
      RMS/src/main/java/cn/cslg/report/service/impl/ProductServiceImpl.java
  10. 2 1
      RMS/src/main/resources/application-dev.yml
  11. 2 1
      RMS/src/main/resources/application-test.yml
  12. 1 1
      RMS/src/main/resources/application.yml
  13. 2 1
      RMS/target/classes/application-dev.yml
  14. 2 1
      RMS/target/classes/application-test.yml
  15. BIN
      RMS/target/classes/cn/cslg/report/controller/ProductController.class
  16. BIN
      RMS/target/classes/cn/cslg/report/service/IProductService.class
  17. BIN
      RMS/target/classes/cn/cslg/report/service/business/CompareMessageService.class
  18. BIN
      RMS/target/classes/cn/cslg/report/service/business/FeatureService.class
  19. BIN
      RMS/target/classes/cn/cslg/report/service/business/ReportDocumentService.class
  20. BIN
      RMS/target/classes/cn/cslg/report/service/business/TaskService.class

+ 2 - 0
RMS/src/main/java/cn/cslg/report/common/model/vo/SyneryVO.java

@@ -94,4 +94,6 @@ public class SyneryVO extends BaseVO {
     @Schema(description = "筛选条件")
     private PatentVO patentVO;
 
+    @Schema (description = "是否是全部专利 0,否 1,是")
+    private Integer isAll;
 }

+ 1 - 1
RMS/src/main/java/cn/cslg/report/controller/ProductController.java

@@ -62,7 +62,7 @@ public class ProductController {
     @Operation(summary = "根据报告id查询产品数据信息")
     @GetMapping("/getProduct")
     public String getProduct(Integer reportId) {
-        log.info("开始处理【根据报告id查询产品数据信息】的请求,参数为:{}", reportId);
+        log.info("开始处理【查询产品】的请求,参数为:{}", reportId);
         if (reportId != null) {
             ProductIncludeFilesVO queryResult = productService.getProduct(reportId);
             return Response.success(queryResult);

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

@@ -3,6 +3,7 @@ package cn.cslg.report.service;
 import cn.cslg.report.common.model.dto.ProductDTO;
 import cn.cslg.report.common.model.dto.ProductIncludeFilesDTO;
 import cn.cslg.report.common.model.vo.ProductIncludeFilesVO;
+import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -46,7 +47,6 @@ public interface IProductService {
      *
      * @param reportId 报告id
      */
-    @Transactional
     void deleteProduct(Integer reportId);
 
 }

+ 7 - 15
RMS/src/main/java/cn/cslg/report/service/business/CompareMessageService.java

@@ -107,22 +107,14 @@ public class CompareMessageService extends ServiceImpl<CompareMessageMapper, Com
     }
 
     public Boolean updateCompareMessage(List<CompareMessage> compareMessageList) {
-        List<Integer> ids =compareMessageList.stream().map(CompareMessage::getId).collect(Collectors.toList());
+        List<Integer> ids =compareMessageList.stream().map(CompareMessage::getFeatureId).collect(Collectors.toList());
         if(ids.size()!=0){
             LambdaQueryWrapper<CompareMessage> queryWrapper =new LambdaQueryWrapper<CompareMessage>();
-            queryWrapper.in(CompareMessage::getId,ids);
-            List<CompareMessage> compareMessages =this.list(queryWrapper);
-            compareMessages.forEach(item->{
-                compareMessageList.forEach(tem->{
-                    if(item.getId().equals(tem.getId())){
-                        item.setCompareResult(tem.getCompareResult());
-                        item.setCompareDescription(tem.getCompareDescription());
-                        item.setTargetDescription(tem.getTargetDescription());
-                    }
-                });
-            });
+            queryWrapper.in(CompareMessage::getFeatureId,ids).isNull(CompareMessage::getTaskType);
+  this.remove(queryWrapper);
 
-           return this.saveOrUpdateBatch(compareMessages);
+
+           return this.saveOrUpdateBatch(compareMessageList);
         }
         return true;
     }
@@ -161,7 +153,8 @@ public class CompareMessageService extends ServiceImpl<CompareMessageMapper, Com
         else {
             queryWrapper1.isNull(CompareMessage::getTaskType);
         }
-            compareMessages = this.list(queryWrapper1);}
+            compareMessages = this.list(queryWrapper1);
+        }
 
         List<CompareMessageVO> compareMessageVOS = new ArrayList<>();
         for (Features item: features){
@@ -182,7 +175,6 @@ public class CompareMessageService extends ServiceImpl<CompareMessageMapper, Com
         }
         //将拆解的权要和特征装载到对象PatentRightVo
         for (int i = 0; i < patentRights.size(); i++) {
-
             List<CompareMessageVO> featuresList = new ArrayList<>();
             //对需要拆解的权要进行拆解
             if (compareMessageVOS != null && compareMessageVOS.size() != 0) {

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

@@ -60,7 +60,7 @@ public class FeatureService extends ServiceImpl<FeatureMapper, Features> {
             String str = patentRights.get(i).getContent();
             str = str.replace(" ", "");
             str = str.replace("\r","");
-            Pattern p = Pattern.compile("^[0-9]+\\..*");
+            Pattern p = Pattern.compile("^[0-9]+(\\.||'、').*");
             Matcher m = p.matcher(str);
             if (m.matches()) {
                 retList.add(patentRights.get(i));
@@ -222,9 +222,9 @@ public class FeatureService extends ServiceImpl<FeatureMapper, Features> {
             //特征序号
             Integer order = 1;
             List<Features> featuresList = new ArrayList<>();
-            String[] tems = patentRights.get(i).getContent().split("\\.");
-            String name = "权要" + tems[0].replace(" ", "");
+
             int rightId = patentRights.get(i).getSort();
+            String name = "权要" + (patentRights.get(i).getSort()+1);
             //对需要拆解的权要进行拆解
             if (featureFromDb != null && featureFromDb.size() != 0) {
                 featuresList = featureFromDb.stream().filter(item -> item.getRightId().equals(rightId) && item.getSplitBy().equals(a) && item.getPartnerId().equals(personnelVO.getId()) && item.getSplitType().equals(b)).collect(Collectors.toList());
@@ -331,7 +331,7 @@ public class FeatureService extends ServiceImpl<FeatureMapper, Features> {
             }
             //装载到对象PatentRightVo
             PatentRightVo patentRightVo = new PatentRightVo();
-            String name = "权要" + (i + 1);
+            String name = "权要" + (patentRights.get(i).getSort()+1);
             patentRightVo.setPatentId(patentRights.get(i).getPatentId());
             patentRightVo.setFeatures(featuresList);
             patentRightVo.setContent(patentRights.get(i).getContent());
@@ -431,7 +431,7 @@ public class FeatureService extends ServiceImpl<FeatureMapper, Features> {
                     List<Features> tem = patentRightVo.getFeatures();
                     for (int t = 0; t < tem.size(); t++) {
                         tem.get(t).setFeaturesOrder(order);
-                        tem.get(t).setPartnerId(personnelVO.getId());
+                        tem.get(t).setPartnerId(feature.getPartnerId());
                         tem.get(t).setSplitBy(feature.getSplitBy());
                         tem.get(t).setSplitType(feature.getSplitType());
                         tem.get(t).setId(null);

+ 4 - 2
RMS/src/main/java/cn/cslg/report/service/business/ReportDocumentService.java

@@ -30,6 +30,7 @@ import org.apache.poi.poifs.filesystem.DocumentEntry;
 import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 import org.apache.poi.ss.formula.functions.T;
 import org.ddr.poi.html.HtmlRenderPolicy;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
@@ -61,7 +62,8 @@ public class ReportDocumentService extends ServiceImpl<ReportDocumentMapper, Rep
     private final TemplateConfigService templateConfigService;
     private final ReportFieldPatentLinkService reportFieldPatentLinkService;
     private final CompareMessageService compareMessageService;
-
+    @Value("${fileURL}")
+    private  String fileURL;
     public String reportDocument(ReportDocument reportDocument) {
 
         return Response.success();
@@ -236,7 +238,7 @@ public class ReportDocumentService extends ServiceImpl<ReportDocumentMapper, Rep
             patentListMap.put("abstractStr", item.get("abstractStr"));
             patentListMap.put("compareFileName", "对比文件" + (i + 1));
             patentListMap.put("applicationDate", item.get("applicationDate"));
-            patentListMap.put("abstractPath", "http://139.224.24.90:8081" + item.get("abstractPath"));
+            patentListMap.put("abstractPath", fileURL + item.get("abstractPath"));
             patentListMap.put("disclosures", disclosures);
             patentListMaps.add(patentListMap);
             //给出现的专利添加别名

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

@@ -275,8 +275,8 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
         //陈宇 ↓ 删除和报告有关的产品表数据、删除和产品有关的产品文件关联表数据、删除和产品有关的报告系统文件表数据
         productService.deleteProduct(id);
 
-        int dele = reportMapper.dele(id);
-        if (dele > 0) {
+        Boolean dele =this.removeById(id);
+        if (dele ==true) {
             return Response.success();
         }
         return Response.error("没有数据");

+ 32 - 10
RMS/src/main/java/cn/cslg/report/service/business/TaskService.java

@@ -754,21 +754,43 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
 
         QueryCMVO queryCMVO = new QueryCMVO();
         queryCMVO.setReportId(syneryVO.getReportId());
-        queryCMVO.setPatentNo(syneryVO.getPatentNo());
         queryCMVO.setCompareResult(syneryVO.getCompareResult());
-        List<String> AllpatentNos = compareMessageService.getBaseMapper().getComparedMessageAll(queryCMVO);
-        //无查询条件
-        if (patentVO == null || patentVO.getFiledOptions() == null || patentVO.getFiledOptions().size() == 0) {
-            patentVO.setPatentNos(AllpatentNos);
+        List<String> patentNos = new ArrayList<>();
+        //无查询条件,单个专利
+        if( syneryVO.getPatentNo()!=null){
+          patentNos =Arrays.asList(syneryVO.getPatentNo());
+        }
+        //无查询条件并且是对比过的专利
+      else  if ((patentVO == null || patentVO.getFiledOptions() == null || patentVO.getFiledOptions().size() == 0)&&syneryVO.getIsAll()==0) {
+            List<String> AllpatentNos = compareMessageService.getBaseMapper().getComparedMessageAll(queryCMVO);
+            patentNos=AllpatentNos;
+        }
+        //无查询条件并且是全部的专利
+      else if((patentVO == null || patentVO.getFiledOptions() == null || patentVO.getFiledOptions().size() == 0)&&syneryVO.getIsAll()==1){
+            LambdaQueryWrapper<CompareFiles> queryWrapper1 = new LambdaQueryWrapper<>();
+            queryWrapper1.eq(CompareFiles::getReportId, syneryVO.getReportId());
+            List<CompareFiles> compareFiles = compareFilesService.list(queryWrapper1);
+            List<String>  AllpatentNos = compareFiles.stream().map(CompareFiles::getPatentNo).collect(Collectors.toList());
+            patentNos=AllpatentNos;
+        }
+        //有查询条件并且是对比过的专利
+        else if(patentVO != null && patentVO.getFiledOptions() != null && patentVO.getFiledOptions().size() != 0&&syneryVO.getIsAll()==0){
+            List<String> AllpatentNos = compareMessageService.getBaseMapper().getComparedMessageAll(queryCMVO);
+            List<String> temPatentNos = reportFieldService.getPatentNo1(patentVO.getFiledOptions(), syneryVO.getReportId(), task.getId(), patentVO.getTaskStatus());
+            List<String> strings1 = new ArrayList<>(CollectionUtils.intersection(temPatentNos, AllpatentNos));
+            patentVO.setPatentNos(temPatentNos);
         }
-        //有查询条件时,自定义字段的专利号和任务的专利号取交集
-        else {
-            List<String> temPatentNos = reportFieldService.getPatentNo1(patentVO.getFiledOptions(), patentVO.getReportId(), patentVO.getTaskId(), patentVO.getTaskStatus());
+        //有查询条件并且是全部的专利
+        else if(patentVO != null && patentVO.getFiledOptions() != null && patentVO.getFiledOptions().size() != 0&&syneryVO.getIsAll()==1){
+            LambdaQueryWrapper<CompareFiles> queryWrapper1 = new LambdaQueryWrapper<>();
+            queryWrapper1.eq(CompareFiles::getReportId, syneryVO.getReportId());
+            List<CompareFiles> compareFiles = compareFilesService.list(queryWrapper1);
+            List<String>  AllpatentNos = compareFiles.stream().map(CompareFiles::getPatentNo).collect(Collectors.toList());
+            List<String> temPatentNos = reportFieldService.getPatentNo1(patentVO.getFiledOptions(), syneryVO.getReportId(), task.getId(), patentVO.getTaskStatus());
             List<String> strings1 = new ArrayList<>(CollectionUtils.intersection(temPatentNos, AllpatentNos));
             patentVO.setPatentNos(temPatentNos);
         }
-        List<String> patentNos = new ArrayList<>();
-        if (patentVO.getPatentNos().size() != 0) {
+        if (patentVO!=null&&patentVO.getPatentNos()!=null&&patentVO.getPatentNos().size() != 0) {
             String res = outInterfaceService.getConPantentNos(patentVO, 1);
             JSONObject jsonObject1 = JSONObject.parseObject(res);
             patentNos = JSONArray.parseArray(jsonObject1.get("data").toString(), String.class);

+ 5 - 1
RMS/src/main/java/cn/cslg/report/service/impl/ProductServiceImpl.java

@@ -132,7 +132,11 @@ public class ProductServiceImpl implements IProductService {
     @Override
     public ProductIncludeFilesVO getProduct(Integer reportId) {
         log.info("开始处理【查询产品】的业务,参数为:{}", reportId);
-        return productMapper.getWholeByReportId(reportId);
+        ProductIncludeFilesVO queryResult = productMapper.getWholeByReportId(reportId);
+        if (queryResult == null) {
+            log.info("查询成功,产品不存在");
+        }
+        return queryResult;
 
     }
 

+ 2 - 1
RMS/src/main/resources/application-dev.yml

@@ -36,4 +36,5 @@ spring:
         login-password: 123456
       web-stat-filter:
         exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
-queueName: mail.queue
+queueName: mail.queue
+fileURL:  http://139.224.24.90:8082

+ 2 - 1
RMS/src/main/resources/application-test.yml

@@ -36,4 +36,5 @@ spring:
         login-password: 123456
       web-stat-filter:
         exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
-queueName: mailTest.queue
+queueName: mailTest.queue
+fileURL:  http://139.224.24.90:8082

+ 1 - 1
RMS/src/main/resources/application.yml

@@ -43,7 +43,7 @@ spring:
       max-file-size: 1000MB
       max-request-size: 1000MB
   profiles:
-    active: test
+    active: dev
   jackson:
     default-property-inclusion: non_null
     serialization:

+ 2 - 1
RMS/target/classes/application-dev.yml

@@ -36,4 +36,5 @@ spring:
         login-password: 123456
       web-stat-filter:
         exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
-queueName: mail.queue
+queueName: mail.queue
+fileURL:  http://139.224.24.90:8082

+ 2 - 1
RMS/target/classes/application-test.yml

@@ -36,4 +36,5 @@ spring:
         login-password: 123456
       web-stat-filter:
         exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
-queueName: mailTest.queue
+queueName: mailTest.queue
+fileURL:  http://139.224.24.90:8082

BIN
RMS/target/classes/cn/cslg/report/controller/ProductController.class


BIN
RMS/target/classes/cn/cslg/report/service/IProductService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/CompareMessageService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/FeatureService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/ReportDocumentService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/TaskService.class