chendayu 2 年之前
父节点
当前提交
88df69bef3
共有 35 个文件被更改,包括 396 次插入831 次删除
  1. 2 1
      PAS/src/main/java/cn/cslg/pas/common/model/QueryPatentVO.java
  2. 23 0
      PAS/src/main/java/cn/cslg/pas/common/model/dto/AssoStructurePatentQueryDTO.java
  3. 40 0
      PAS/src/main/java/cn/cslg/pas/common/model/dto/AssoStructurePatentUpdateDTO.java
  4. 0 47
      PAS/src/main/java/cn/cslg/pas/common/model/dto/ProductPatentDTO.java
  5. 26 0
      PAS/src/main/java/cn/cslg/pas/common/model/dto/QueryPathStructureNameDTO.java
  6. 36 0
      PAS/src/main/java/cn/cslg/pas/common/model/vo/AssoStructurePatentVO.java
  7. 1 1
      PAS/src/main/java/cn/cslg/pas/common/model/vo/ProductCategoryTrendVO.java
  8. 26 0
      PAS/src/main/java/cn/cslg/pas/common/model/vo/ProductPatentVO.java
  9. 35 0
      PAS/src/main/java/cn/cslg/pas/common/model/vo/StructurePatentVO.java
  10. 1 1
      PAS/src/main/java/cn/cslg/pas/common/model/vo/TaskParams.java
  11. 0 1
      PAS/src/main/java/cn/cslg/pas/common/model/vo/TaskVO.java
  12. 0 10
      PAS/src/main/java/cn/cslg/pas/controller/PatentController.java
  13. 2 2
      PAS/src/main/java/cn/cslg/pas/controller/ProductCategoryController.java
  14. 0 72
      PAS/src/main/java/cn/cslg/pas/controller/ProductPatentController.java
  15. 55 0
      PAS/src/main/java/cn/cslg/pas/controller/ProductStructurePatentIndexController.java
  16. 0 1
      PAS/src/main/java/cn/cslg/pas/controller/ProjectFieldOptionController.java
  17. 1 0
      PAS/src/main/java/cn/cslg/pas/controller/ProjectImportController.java
  18. 3 3
      PAS/src/main/java/cn/cslg/pas/controller/TaskController.java
  19. 0 2
      PAS/src/main/java/cn/cslg/pas/domain/Task.java
  20. 9 4
      PAS/src/main/java/cn/cslg/pas/domain/asso/AssoStructurePatent.java
  21. 0 28
      PAS/src/main/java/cn/cslg/pas/mapper/asso/AssoProductPatentMapper.java
  22. 1 1
      PAS/src/main/java/cn/cslg/pas/service/IProductCategoryService.java
  23. 31 0
      PAS/src/main/java/cn/cslg/pas/service/IStructurePatentService.java
  24. 0 101
      PAS/src/main/java/cn/cslg/pas/service/PatentService.java
  25. 0 2
      PAS/src/main/java/cn/cslg/pas/service/ProjectImportService.java
  26. 2 5
      PAS/src/main/java/cn/cslg/pas/service/ProjectService.java
  27. 5 14
      PAS/src/main/java/cn/cslg/pas/service/TaskService.java
  28. 1 80
      PAS/src/main/java/cn/cslg/pas/service/UploadPatentBatchService.java
  29. 0 175
      PAS/src/main/java/cn/cslg/pas/service/asso/AssoProductPatentService.java
  30. 0 41
      PAS/src/main/java/cn/cslg/pas/service/asso/AssoStructurePatentService.java
  31. 15 57
      PAS/src/main/java/cn/cslg/pas/service/impl/ProductCategoryServiceImpl.java
  32. 1 1
      PAS/src/main/java/cn/cslg/pas/service/impl/ProductMarketDataIServicempl.java
  33. 80 0
      PAS/src/main/java/cn/cslg/pas/service/impl/StructurePatentServiceImpl.java
  34. 0 178
      PAS/src/main/resources/mapper/AssoProductPatentMapper.xml
  35. 0 3
      PAS/src/main/resources/mapper/TaskMapper.xml

+ 2 - 1
PAS/src/main/java/cn/cslg/pas/common/model/QueryPatentVO.java

@@ -14,7 +14,6 @@ import java.util.List;
  */
 @Data
 public class QueryPatentVO extends BaseVO {
-    private Integer productId;
     //专题库ID
     private Integer projectId;
     //RMS导入ID
@@ -23,6 +22,8 @@ public class QueryPatentVO extends BaseVO {
     private List<String> patentNos;
     // 去除的专利号
     private List<String> notInPatentNos;
+    //条件专利号
+    private List<String> conPatentNos;
     //申请人名字
     private String applicationName;
     //权利人名字

+ 23 - 0
PAS/src/main/java/cn/cslg/pas/common/model/dto/AssoStructurePatentQueryDTO.java

@@ -0,0 +1,23 @@
+package cn.cslg.pas.common.model.dto;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * 专题库产品架构专利号标引的查询DTO类
+ */
+@Accessors(chain = true)
+@Data
+public class AssoStructurePatentQueryDTO implements Serializable {
+    /**
+     * 专利号
+     */
+    private String patentNo;
+    /**
+     * 专题库id
+     */
+    private Integer projectId;
+
+}

+ 40 - 0
PAS/src/main/java/cn/cslg/pas/common/model/dto/AssoStructurePatentUpdateDTO.java

@@ -0,0 +1,40 @@
+package cn.cslg.pas.common.model.dto;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+import org.apache.xpath.operations.Bool;
+
+import java.io.Serializable;
+
+/**
+ * 专题库产品架构专利号标引的修改DTO类
+ */
+@Accessors(chain = true)
+@Data
+public class AssoStructurePatentUpdateDTO implements Serializable {
+    /**
+     * ID
+     */
+    private Integer id;
+    /**
+     * 架构id
+     */
+    private Integer structureId;
+    /**
+     * 专利号
+     */
+    private String patentNo;
+    /**
+     * 产品id
+     */
+    private Integer productId;
+    /**
+     * 专题库id
+     */
+    private Integer projectId;
+    /**
+     * 更新类型(1新增 0删除)
+     */
+    private Boolean updateType;
+
+}

+ 0 - 47
PAS/src/main/java/cn/cslg/pas/common/model/dto/ProductPatentDTO.java

@@ -1,47 +0,0 @@
-package cn.cslg.pas.common.model.dto;
-
-import cn.cslg.pas.common.model.vo.BaseVO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.util.List;
-
-@Data
-public class ProductPatentDTO extends BaseVO {
-
-    private Integer productId;
-    //专利号
-    private List<String> patentNos;
-    // 去除的专利号
-    private List<String> notInPatentNos;
-    //申请人名字
-    private String applicationName;
-    //权利人名字
-    private String obligeeName;
-
-    private Integer startNumber;
-
-    private Integer endNumber;
-
-    private String orderType;
-
-    private String orderItem;
-
-    @Schema(description = "专利号")
-    private String patentNo;
-
-    @Schema(description = "申请号")
-    private String applicationNo;
-
-    @Schema(description = "IPC分类号")
-    private String numberIpc;
-    @Schema(description = "CPC分类号")
-    private String numberCpc;
-    @Schema(description = "UPC分类号")
-    private String numberUpc;
-    @Schema(description = "摘要")
-    private String abstractStr;
-    @Schema(description = "标题")
-    private String patentName;
-    private Integer isIn;
-}

+ 26 - 0
PAS/src/main/java/cn/cslg/pas/common/model/dto/QueryPathStructureNameDTO.java

@@ -0,0 +1,26 @@
+package cn.cslg.pas.common.model.dto;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * 查询所有架构的路径和路径拼接成的架构名称
+ *
+ * @Author chenyu
+ * @Date 2023/3/16
+ */
+@Accessors(chain = true)
+@Data
+public class QueryPathStructureNameDTO implements Serializable {
+    /**
+     * 产品id
+     */
+    private Integer productId;
+    /**
+     * 架构id
+     */
+    private Integer structureId;
+
+}

+ 36 - 0
PAS/src/main/java/cn/cslg/pas/common/model/vo/AssoStructurePatentVO.java

@@ -0,0 +1,36 @@
+package cn.cslg.pas.common.model.vo;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * 专题库产品架构专利号标引的标准查询VO类
+ */
+@Accessors(chain = true)
+@Data
+public class AssoStructurePatentVO implements Serializable {
+    /**
+     * ID
+     */
+    private Integer id;
+    /**
+     * 架构id
+     */
+    private Integer structureId;
+    /**
+     * 专利号
+     */
+    private String patentNo;
+    /**
+     * 产品id
+     */
+    private Integer productId;
+    /**
+     * 专题库id
+     */
+    private Integer projectId;
+
+}

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/common/model/vo/ProductCategoryTrendVO.java

@@ -27,7 +27,7 @@ public class ProductCategoryTrendVO implements Serializable {
         /**
          * 时间(季度或者月份)
          */
-        private String marketDate;
+        private String marketData;
 
         /**
          * 销售额

+ 26 - 0
PAS/src/main/java/cn/cslg/pas/common/model/vo/ProductPatentVO.java

@@ -0,0 +1,26 @@
+package cn.cslg.pas.common.model.vo;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * 产品和专利标准查询VO类
+ */
+@Accessors(chain = true)
+@Data
+public class ProductPatentVO implements Serializable {
+    /**
+     * ID
+     */
+    private Integer id;
+    /**
+     * 专利号
+     */
+    private String patentNo;
+    /**
+     * 产品id
+     */
+    private Integer productId;
+}

+ 35 - 0
PAS/src/main/java/cn/cslg/pas/common/model/vo/StructurePatentVO.java

@@ -0,0 +1,35 @@
+package cn.cslg.pas.common.model.vo;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * 架构和专利标准查询VO类
+ */
+@Accessors(chain = true)
+@Data
+public class StructurePatentVO implements Serializable {
+    /**
+     * ID
+     */
+    private Integer id;
+    /**
+     * 专利号
+     */
+    private String patentNo;
+    /**
+     * 架构id
+     */
+    private Integer structureId;
+    /**
+     * 产品id
+     */
+    private Integer productId;
+    /**
+     * 专题库id
+     */
+    private Integer projectId;
+
+}

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/common/model/vo/TaskParams.java

@@ -23,7 +23,7 @@ public class TaskParams implements Serializable {
     private String oldName;
     private Integer total;
     private Integer index;
-    private Integer productId;
+
     public TaskParams() {
 
     }

+ 0 - 1
PAS/src/main/java/cn/cslg/pas/common/model/vo/TaskVO.java

@@ -9,5 +9,4 @@ public class TaskVO extends BaseVO {
     private Integer type;
     private String createName;
     private String projectName;
-    private Integer productId;
 }

+ 0 - 10
PAS/src/main/java/cn/cslg/pas/controller/PatentController.java

@@ -28,7 +28,6 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile;
 import java.io.*;
 import java.net.HttpURLConnection;
 import java.net.URL;
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
@@ -204,14 +203,5 @@ public class PatentController {
         return fileDTO;
     }
 
-    @GetMapping("getPatentsDTOById")
-    @Operation(summary = "根据专利号获得专利")
-    public String getPatentsDTOById(String patentNos){
-        String[] strs =patentNos.split("\\|");
-        List<String> list2 = new ArrayList<>();
-        Collections.addAll(list2, strs);
-        return Response.success(patentService.getPatentsDTOById(list2));
-    }
-
 
 }

+ 2 - 2
PAS/src/main/java/cn/cslg/pas/controller/ProductCategoryController.java

@@ -92,8 +92,8 @@ public class ProductCategoryController {
     }
     @Operation(summary = "获得架构的地区集合")
     @GetMapping("/getAreaList")
-    public String getAreaList(Integer id,Integer productId) {
-        return Response.success( productCategoryService.getAreaList(id,productId));
+    public String getAreaList(Integer id) {
+        return Response.success( productCategoryService.getAreaList(id));
     }
     @Operation(summary = "获得架构的公司集合")
     @GetMapping("/getCompanyList")

+ 0 - 72
PAS/src/main/java/cn/cslg/pas/controller/ProductPatentController.java

@@ -1,72 +0,0 @@
-package cn.cslg.pas.controller;
-
-import cn.cslg.pas.common.core.base.Constants;
-import cn.cslg.pas.common.model.QueryPatentVO;
-import cn.cslg.pas.common.model.dto.ProductPatentDTO;
-import cn.cslg.pas.common.model.vo.TaskParams;
-import cn.cslg.pas.common.model.vo.TaskVO;
-import cn.cslg.pas.common.utils.Response;
-import cn.cslg.pas.common.utils.StringUtils;
-import cn.cslg.pas.common.utils.auth.checkAuth;
-import cn.cslg.pas.domain.Task;
-import cn.cslg.pas.service.ProjectService;
-import cn.cslg.pas.service.TaskService;
-import cn.cslg.pas.service.UploadPatentBatchService;
-import cn.cslg.pas.service.asso.AssoProductPatentService;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.List;
-
-/**
- * <p>
- * 任务 前端控制器
- * </p>
- *
- * @author 王岩
- * @since 2022-02-17
- */
-@Tag(name = "产品相关专利管理")
-@RestController
-@RequestMapping(Constants.API_VERSION_V2 + "/proPatent")
-@RequiredArgsConstructor(onConstructor_ = {@Lazy})
-public class ProductPatentController {
-    private final AssoProductPatentService assoProductPatentService;
-    private final UploadPatentBatchService uploadPatentBatchService;
-    private final ProjectService projectService;
-    @PostMapping("/add")
-    @Operation(summary = "添加产品相关专利")
-    public String addPatents(@RequestBody ProductPatentDTO patentDTO) {
-        assoProductPatentService.addPatents(patentDTO);
-        return Response.success(true);
-    }
-
-    @PostMapping("/delete")
-    @Operation(summary = "删除产品相关专利")
-    public String deletePatents(@RequestBody ProductPatentDTO patentDTO) {
-      List<String> patentNos =  assoProductPatentService.deletePatents(patentDTO);
-        if(patentNos.size()==0){
-            return Response.success("删除成功");
-        }
-    return  Response.successBut(patentNos);
-    }
-
-    @PostMapping("/importPatents")
-    @Operation(summary = "导入专利")
-    public String importSysPatent(MultipartFile file, Integer productId) {
-        TaskParams taskParams = projectService.getImportPatentTaskParamsBro(file,productId);
-        uploadPatentBatchService.uploadPatentForProduct(taskParams,productId);
-        return Response.success();
-    }
-
-    @PostMapping("/queryPatents")
-    @Operation(summary = "查询产品相关专利")
-    public String queryPatents(@RequestBody QueryPatentVO params) {
-        return Response.success(assoProductPatentService.getPageList(params));
-    }
-}
-

+ 55 - 0
PAS/src/main/java/cn/cslg/pas/controller/ProductStructurePatentIndexController.java

@@ -0,0 +1,55 @@
+package cn.cslg.pas.controller;
+
+import cn.cslg.pas.common.core.base.Constants;
+import cn.cslg.pas.common.model.dto.AssoStructurePatentQueryDTO;
+import cn.cslg.pas.common.model.dto.AssoStructurePatentUpdateDTO;
+import cn.cslg.pas.common.model.vo.AssoStructurePatentVO;
+import cn.cslg.pas.common.utils.Response;
+import cn.cslg.pas.exception.XiaoShiException;
+import cn.cslg.pas.service.IStructurePatentService;
+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 java.util.List;
+
+/**
+ * 产品架构专利号标引的Controller层
+ *
+ * @Author chenyu
+ * @Date 2023/3/15
+ */
+@Tag(name = "专题库标引管理模块")
+@RequiredArgsConstructor
+@Slf4j
+@RequestMapping(Constants.API_VERSION_V2 + "/productStructurePatentIndex")
+@RestController
+public class ProductStructurePatentIndexController {
+    private final IStructurePatentService structurePatentService;
+
+    @Operation(summary = "更新标引")
+    @PostMapping("/update")
+    public String update(@RequestBody AssoStructurePatentUpdateDTO assoStructurePatentUpdateDTO) {
+        log.info("开始处理【更新标引】的请求,请求参数为:{}", assoStructurePatentUpdateDTO);
+        try {
+            structurePatentService.update(assoStructurePatentUpdateDTO);
+        } catch (XiaoShiException e) {
+            return Response.error(e.getMessage());
+        }
+        return Response.success("更新标引");
+    }
+
+    @Operation(summary = "查询标引")
+    @PostMapping("/query")
+    public String query(@RequestBody AssoStructurePatentQueryDTO assoStructurePatentQueryDTO) {
+        log.info("开始处理【查询标引】的业务,参数为:{}", assoStructurePatentQueryDTO);
+        List<AssoStructurePatentVO> query = structurePatentService.query(assoStructurePatentQueryDTO);
+        return Response.success(query);
+    }
+
+}

+ 0 - 1
PAS/src/main/java/cn/cslg/pas/controller/ProjectFieldOptionController.java

@@ -90,7 +90,6 @@ public class ProjectFieldOptionController {
     @Operation(summary = "删除选项")
     public String delete(Integer type, Integer id) {
         if (type == 6) {
-
             projectFieldTreeService.delete(id);
         } else {
             projectFieldOptionService.delete(id);

+ 1 - 0
PAS/src/main/java/cn/cslg/pas/controller/ProjectImportController.java

@@ -63,6 +63,7 @@ public class ProjectImportController {
     public String importSysPatent(@RequestBody TaskParams taskParams) {
         return uploadPatentBatchService.uploadPatentBatchBro(taskParams);
     }
+
     @GetMapping("list")
     @Operation(summary = "导入任务列表")
     public String getPageList(ProjectImportVO params) {

+ 3 - 3
PAS/src/main/java/cn/cslg/pas/controller/TaskController.java

@@ -30,7 +30,7 @@ public class TaskController {
     @GetMapping("list")
     @Operation(summary = "任务列表")
     public String getPageList(TaskVO params) {
-      return Response.success(taskService.getPageList(params));
+        return Response.success(taskService.getPageList(params));
     }
 
     @PostMapping("delete")
@@ -41,8 +41,8 @@ public class TaskController {
 
     @GetMapping("queue")
     @Operation(summary = "获取进行中的任务")
-    public String getQueueList(Integer type, Integer projectId,Integer productId) {
-        return Response.success(taskService.getQueueList(type, projectId,productId));
+    public String getQueueList(Integer type, Integer projectId) {
+        return Response.success(taskService.getQueueList(type, projectId));
     }
 
     @PostMapping("update")

+ 0 - 2
PAS/src/main/java/cn/cslg/pas/domain/Task.java

@@ -84,8 +84,6 @@ public class Task extends BaseEntity<Task> {
     @TableField("downexcel")
     private String url;
 
-    @TableField("product_id")
-    private Integer productId;
     private String oldName;
 
     @TableField(exist = false)

+ 9 - 4
PAS/src/main/java/cn/cslg/pas/domain/asso/AssoStructurePatent.java

@@ -1,6 +1,5 @@
 package cn.cslg.pas.domain.asso;
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 import lombok.experimental.Accessors;
@@ -8,12 +7,12 @@ import lombok.experimental.Accessors;
 import java.io.Serializable;
 
 /**
- * 专利架构关联表实体类
+ * 专题库产品架构专利号标引表实体类
  */
 @Accessors(chain = true)
 @Data
 @TableName(value = "asso_structure_patent")
-public class AssoPatentStructure implements Serializable {
+public class AssoStructurePatent implements Serializable {
     /**
      * ID
      */
@@ -26,7 +25,13 @@ public class AssoPatentStructure implements Serializable {
      * 专利号
      */
     private String patentNo;
-    @TableField(value = "product_Id")
+    /**
+     * 产品id
+     */
+    private Integer productId;
+    /**
+     * 专题库id
+     */
     private Integer projectId;
 
 }

+ 0 - 28
PAS/src/main/java/cn/cslg/pas/mapper/asso/AssoProductPatentMapper.java

@@ -1,28 +0,0 @@
-package cn.cslg.pas.mapper.asso;
-
-import cn.cslg.pas.common.model.QueryPatentVO;
-import cn.cslg.pas.common.model.dto.ProductPatentDTO;
-import cn.cslg.pas.domain.AdminUser;
-import cn.cslg.pas.domain.Patent;
-import cn.cslg.pas.domain.asso.AssoProductPatent;
-import cn.cslg.pas.domain.asso.AssoProductPicture;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * <p>
- * 管理员表 Mapper 接口
- * </p>
- *
- * @author 王岩
- * @since 2022-03-25
- */
-public interface AssoProductPatentMapper extends BaseMapper<AssoProductPatent> {
-    int insertBatch(List<String> patentNos, Integer productId);
-    IPage<Patent> getPageList(Page<Patent> page, @Param("params") QueryPatentVO params);
-    List<String> getPatentNos( @Param("params") ProductPatentDTO params);
-}

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/service/IProductCategoryService.java

@@ -59,7 +59,7 @@ public interface IProductCategoryService {
     @Transactional
     List<ProductCategoryTrendVO> showTrend(ProductCategoryDTO dto);
 
-    List<String>  getAreaList(Integer id,Integer productId);
+    List<String>  getAreaList(Integer id);
 
     List<String> getCompanyList(Integer id);
 }

+ 31 - 0
PAS/src/main/java/cn/cslg/pas/service/IStructurePatentService.java

@@ -0,0 +1,31 @@
+package cn.cslg.pas.service;
+
+import cn.cslg.pas.common.model.dto.AssoStructurePatentQueryDTO;
+import cn.cslg.pas.common.model.dto.AssoStructurePatentUpdateDTO;
+import cn.cslg.pas.common.model.vo.AssoStructurePatentVO;
+
+import java.util.List;
+
+/**
+ * 专题库产品架构专利号标引的Service层接口
+ *
+ * @Author chenyu
+ * @Date 2023/3/15
+ */
+public interface IStructurePatentService {
+    /**
+     * 更新标引(新增或删除)
+     *
+     * @param assoStructurePatentUpdateDTO 专题库产品架构专利号标引的修改DTO类对象
+     */
+    void update(AssoStructurePatentUpdateDTO assoStructurePatentUpdateDTO);
+
+    /**
+     * 查询标引
+     *
+     * @param assoStructurePatentQueryDTO 专题库产品架构专利号标引的查询DTO类
+     * @return 返回查询到的数据
+     */
+    List<AssoStructurePatentVO> query(AssoStructurePatentQueryDTO assoStructurePatentQueryDTO);
+
+}

+ 0 - 101
PAS/src/main/java/cn/cslg/pas/service/PatentService.java

@@ -1521,108 +1521,7 @@ public String getConPantentNos(QueryPatentVO params){
     }
 
 
-    public List<PatentDTO> getPatentsDTOById(List<String> patentNos) {
-        LambdaQueryWrapper<Patent> wrapper = new LambdaQueryWrapper<>();
-        wrapper.in(Patent::getPatentNo, patentNos);
-        List<Patent> patents =this.list(wrapper);
-        List<PatentDTO> patentDTOs =new ArrayList<>();
-        for(Patent patent: patents) {
-            PatentDTO patentDTO = new PatentDTO();
-            BeanUtils.copyProperties(patent, patentDTO);
-            List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Arrays.asList(Constants.PATENT_TYPE, Constants.PATENT_SIMPLE_STATUS, Constants.COUNTRIES));
-            List<PatentClassNumberLink> patentClassNumberLinkList = patentClassNumberLinkService.getPatentClassNumberLinkByPatentIds(Collections.singletonList(patent.getId()));
-
-            if (patent.getPriorityNo() != null) {
-                patentDTO.setPriorityNo(patent.getPriorityNo());
-            } else {
-                patentDTO.setPriorityNo("");
-            }
 
-            if (patent.getPriorityCountry() != null) {
-                if (patent.getPriorityCountry().contains("\\|")) {
-                    List<String> countryList = StringUtils.changeStringToString(patent.getPriorityCountry().replaceAll(" ", ""), "\\|");
-                    patentDTO.setPriorityCountry(countryList);
-                } else if (patent.getPriorityCountry().contains(",")) {
-                    List<String> countryList = StringUtils.changeStringToString(patent.getPriorityCountry().replaceAll(" ", ""), ",");
-                    patentDTO.setPriorityCountry(countryList);
-                } else if (patent.getPriorityCountry().contains(";")) {
-                    List<String> countryList = StringUtils.changeStringToString(patent.getPriorityCountry().replaceAll(" ", ""), ";");
-                    patentDTO.setPriorityCountry(countryList);
-                }
-            } else {
-                patentDTO.setPriorityCountry(Collections.singletonList(""));
-            }
-
-            patentDTO.setQuote("");
-            if (patent.getQuote() != null) {
-                patentDTO.setQuote(patent.getQuote());
-            }
-            patentDTO.setQuoted("");
-            if (patent.getQuoted() != null) {
-                patentDTO.setQuoted(patent.getQuoted());
-            }
-            //根据同族号,获得所有同族专利(三种同族)
-            List<Integer> familyIds = new ArrayList<>();
-            if (patent.getSimpleFamily() != null) {
-                familyIds.add(patent.getSimpleFamily());
-            }
-            if (patent.getInpadocFamily() != null) {
-
-                familyIds.add(patent.getInpadocFamily());
-            }
-            if (patent.getPatSnapFamily() != null) {
-                familyIds.add(patent.getPatSnapFamily());
-            }
-            if (familyIds.size() != 0) {
-                LambdaQueryWrapper<PatentSimpleFamilyLink> queryWrapper = new LambdaQueryWrapper<>();
-                queryWrapper.in(PatentSimpleFamilyLink::getFamilyId, familyIds);
-                List<PatentSimpleFamilyLink> patentSimpleFamilyLinks = patentSimpleFamilyLinkService.list(queryWrapper);
-                List<String> familyPatentNos = patentSimpleFamilyLinks.stream().map(PatentSimpleFamilyLink::getPatentNo).collect(Collectors.toList());
-                PatentDTO.PatentFamily patentFamily = new PatentDTO.PatentFamily();
-                patentFamily.setSimple(familyPatentNos);
-                patentDTO.setFamily(patentFamily);
-            }
-            patentDTO.setApplicationDate(DateUtils.formatDate(patent.getApplicationDate(), DateUtils.YYYY_MM_DD));
-            patentDTO.setPriorityDate(DateUtils.formatDate(patent.getPriorityDate(), DateUtils.YYYY_MM_DD));
-            patentDTO.setPublicDate(DateUtils.formatDate(patent.getPublicDate(), DateUtils.YYYY_MM_DD));
-            patentDTO.setPublicAccreditDate(DateUtils.formatDate(patent.getPublicAccreditDate(), DateUtils.YYYY_MM_DD));
-            patentDTO.setFirstPublicDate(DateUtils.formatDate(patent.getFirstPublicDate(), DateUtils.YYYY_MM_DD));
-            patentDTO.setSimpleStatus(systemDictList.stream().filter(systemDict -> systemDict.getType().equals(Constants.PATENT_SIMPLE_STATUS) && systemDict.getValue().equals(String.valueOf(patent.getSimpleStatus()))).findFirst().orElse(new SystemDict()).getLabel());
-            patentDTO.setSimpleStatusInt(patent.getSimpleStatus());
-            patentDTO.setType(systemDictList.stream().filter(systemDict -> systemDict.getType().equals(Constants.PATENT_TYPE) && systemDict.getValue().equals(String.valueOf(patent.getType()))).findFirst().orElse(new SystemDict()).getLabel());
-            patentDTO.setApplicant(patentApplicantService.getPatentApplicantByPatentId(patent.getId()));
-            patentDTO.setInventor(patentInventorService.getPatentInventorByPatentId(patent.getId()));
-            if (StringUtils.isNotEmpty(patent.getAgencyId())) {
-                patentDTO.setAgency(patentAgencyService.getPatentAgencyById(Integer.parseInt(patent.getAgencyId())));
-            } else {
-                PatentAgency patentAgency = new PatentAgency();
-                patentAgency.setName("");
-                patentDTO.setAgency(patentAgency);
-            }
-            patentDTO.setAgent(patentAgentService.getPatentAgentByPatentId(patent.getId()));
-            patentDTO.setAffair(patentAffairService.getPatentAffairByPatentId(patent.getId()));
-            if (StringUtils.isNotEmpty(patent.getPriorityCountry())) {
-                List<String> priorityList = PatentUtils.formatValue(patent.getPriorityCountry());
-                List<String> priorityCountryList = new ArrayList<>();
-                for (String priorityCountry : priorityList) {
-                    priorityCountryList.add(systemDictList.stream().filter(systemDict -> systemDict.getType().equals(Constants.COUNTRIES) && systemDict.getValue().equals(priorityCountry)).findFirst().orElse(new SystemDict()).getLabel());
-                }
-                patentDTO.setPriorityCountry(priorityCountryList);
-            }
-            patentDTO.setInstruction(patentInstructionTextService.getPatentInstructionTextByPatentId(patent.getId()));
-            patentDTO.setRights(patentRightService.getPatentRightByPatentId(patent.getId()));
-            patentDTO.setImage(patentImageService.getPatentImageByPatentId(patent.getId()));
-            patentDTO.setPdf(patentInstructionService.getPatentInstructionByPatentNo(patent.getPatentNo()));
-            patentDTO.setIpc(patentClassNumberLinkList.stream().filter(patentClassNumberLink -> patentClassNumberLink.getType().equals(Constants.PATENT_CLASS_NUMBER_IPC) && patentClassNumberLink.getMain().equals(1)).findFirst().orElse(new PatentClassNumberLink()).getCode());
-            patentDTO.setUpc(patentClassNumberLinkList.stream().filter(patentClassNumberLink -> patentClassNumberLink.getType().equals(Constants.PATENT_CLASS_NUMBER_UPC) && patentClassNumberLink.getMain().equals(1)).findFirst().orElse(new PatentClassNumberLink()).getCode());
-            patentDTO.setIpcList(patentClassNumberLinkList.stream().filter(patentClassNumber -> patentClassNumber.getType().equals(Constants.PATENT_CLASS_NUMBER_IPC)).map(PatentClassNumberLink::getCode).distinct().collect(Collectors.toList()));
-            patentDTO.setCpcList(patentClassNumberLinkList.stream().filter(patentClassNumber -> patentClassNumber.getType().equals(Constants.PATENT_CLASS_NUMBER_CPC)).map(PatentClassNumberLink::getCode).distinct().collect(Collectors.toList()));
-            patentDTO.setUpcList(patentClassNumberLinkList.stream().filter(patentClassNumber -> patentClassNumber.getType().equals(Constants.PATENT_CLASS_NUMBER_UPC)).map(PatentClassNumberLink::getCode).distinct().collect(Collectors.toList()));
-            patentDTO.setLocList(patentClassNumberLinkList.stream().filter(patentClassNumber -> patentClassNumber.getType().equals(Constants.PATENT_CLASS_NUMBER_LOC)).map(PatentClassNumberLink::getCode).distinct().collect(Collectors.toList()));
-            patentDTOs.add(patentDTO);
-        }
-        return patentDTOs;
-    }
 
 
 }

+ 0 - 2
PAS/src/main/java/cn/cslg/pas/service/ProjectImportService.java

@@ -60,6 +60,4 @@ public class ProjectImportService extends ServiceImpl<ProjectImportMapper, Proje
         projectImport.insert();
         return projectImport.getId();
     }
-
-
 }

+ 2 - 5
PAS/src/main/java/cn/cslg/pas/service/ProjectService.java

@@ -607,7 +607,7 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
         for (int i = 1; i < rowList.size(); i++) {
             mapList.add(IterUtil.toMap(rowList.get(0), rowList.get(i)));
         }
-        Integer taskId = taskService.add(fileDTO, projectId, null,rowList.size() - 1, 1, 0, file.getOriginalFilename());
+        Integer taskId = taskService.add(fileDTO, projectId, rowList.size() - 1, 1, 0, file.getOriginalFilename());
         TaskParams taskParams = new TaskParams();
         taskParams.setTaskId(taskId);
         taskParams.setPath(path);
@@ -619,7 +619,7 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
     }
 
     //获得
-    public TaskParams getImportPatentTaskParamsBro(MultipartFile file,Integer productId) {
+    public TaskParams getImportPatentTaskParamsBro(MultipartFile file) {
         //上传文档
         UploadFileDTO fileDTO = fileUtils.uploadFile(file);
         //获得文档保存的路径
@@ -631,15 +631,12 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
         for (int i = 1; i < rowList.size(); i++) {
             mapList.add(IterUtil.toMap(rowList.get(0), rowList.get(i)));
         }
-        Integer taskId = taskService.add(fileDTO, null,productId, rowList.size() - 1, 1, 0, file.getOriginalFilename());
         TaskParams taskParams = new TaskParams();
         taskParams.setPath(path);
-        taskParams.setTaskId(taskId);
         taskParams.setTaskType(1);
         taskParams.setRowList(mapList);
         taskParams.setUserId(String.valueOf(loginUtils.getId()));
         taskParams.setOldName(file.getOriginalFilename());
-        taskParams.setProductId(productId);
         return taskParams;
     }
 

+ 5 - 14
PAS/src/main/java/cn/cslg/pas/service/TaskService.java

@@ -42,16 +42,11 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
         return fileUtils.getSystemPath() + task.getUrl();
     }
 
-    public Integer add(UploadFileDTO fileDTO, Integer projectId,Integer productId, Integer total, Integer type, Integer fieldNum, String oldName) {
+    public Integer add(UploadFileDTO fileDTO, Integer projectId, Integer total, Integer type, Integer fieldNum, String oldName) {
         Task task = new Task();
         task.setStartTime(DateUtils.getDateTime());
         task.setStatus(0);
-        if(projectId!=null) {
-            task.setProjectId(projectId);
-        }
-        if(productId!=null){
-            task.setProductId(productId);
-        }
+        task.setProjectId(projectId);
         task.setFileName(fileDTO.getFileName());
         task.setUrl(fileDTO.getPath());
         task.setTotal(total);
@@ -86,16 +81,12 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
         return pageList;
     }
 
-    public List<Task> getQueueList(Integer type, Integer projectId,Integer productId) {
+    public List<Task> getQueueList(Integer type, Integer projectId) {
         LambdaQueryWrapper<Task> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(Task::getCreateBy, loginUtils.getId());
         queryWrapper.eq(Task::getType, type);
-        queryWrapper.in(Task::getStatus, new ArrayList<Integer>() {{ add(0); add(1);}});
-        if(projectId!=null){
-        queryWrapper.eq(Task::getProjectId, projectId);}
-        if(productId!=null){
-            queryWrapper.eq(Task::getProductId,productId);
-        }
+        queryWrapper.in(Task::getStatus, new ArrayList<Integer>() {{ add(0); add(1); }});
+        queryWrapper.eq(Task::getProjectId, projectId);
         queryWrapper.orderByAsc(Task::getStartTime);
         return this.list(queryWrapper);
     }

+ 1 - 80
PAS/src/main/java/cn/cslg/pas/service/UploadPatentBatchService.java

@@ -10,7 +10,6 @@ import cn.cslg.pas.common.model.vo.UploadSettingVO;
 import cn.cslg.pas.common.utils.*;
 import cn.cslg.pas.domain.*;
 import cn.cslg.pas.mapper.ImportErrorLogMapper;
-import cn.cslg.pas.service.asso.AssoProductPatentService;
 import cn.hutool.extra.spring.SpringUtil;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
@@ -49,7 +48,6 @@ public class UploadPatentBatchService {
     private final PatentClassNumberLinkService patentClassNumberLinkService;
     private final PatentAffairService patentAffairService;
     private final ImportErrorLogMapper importErrorLogMapper;
-    private final AssoProductPatentService assoProductPatentService;
     private static int FLAG = 0;
 
     @Async("singleThreadAsyncTaskExecutor")
@@ -325,6 +323,7 @@ public class UploadPatentBatchService {
                 patentApplicationBusiness(uploadParamsVO);
             //申请人地址 OS_PATENT_APPLICATION
             patentApplicationAddressBusiness(uploadParamsVO);
+
             //分类号关联 OS_PATENT_TYPENO
             patentTypeNoBusiness(uploadParamsVO);
             //事务信息 OS_PATENT_AFFAIR
@@ -581,82 +580,4 @@ public class UploadPatentBatchService {
         patentService.updatePatentCustomField(patentCustomFieldParams);
     }
 
-
-
-    @Async("singleThreadAsyncTaskExecutor")
-    public void uploadPatentForProduct(TaskParams params,Integer productId) {
-        Integer total = params.getRowList().size();
-        try {
-            //先解析Json文件 获得配置文件的Json串
-            String getSettingJson = fileUtils.analysisJsonFile();
-            //查找需求数据源的对应配置
-            List<UploadSettingVO.Column> jsonData = UploadPatentBatchUtil.parsingConfigurationFilesBro(getSettingJson);
-
-            Map<String, PictureData> pictureDataMap = ExcelUtils.getDataFromExcel(params.getPath());
-
-            //将数据进行装配并进行数据库操作
-            for (int i = 0; i < params.getRowList().size(); i++) {
-                //获取每一行的数据
-                Map<Object, Object> row = params.getRowList().get(i);
-                //基础数据装配
-                UploadParamsVO uploadParamsVO = UploadPatentBatchUtil.processData(row, jsonData);
-
-                //查询数据是否存在 如果存在 返回该条数据 如果不存在 新增一条数据
-                getOneOrInsertOne(uploadParamsVO);
-
-                //专利信息需要特殊处理部分
-                //专利信息(摘要附图)数据装配
-                PictureData pictureData = pictureDataMap.get(String.valueOf(i + 1));
-                if (uploadParamsVO.getPatent() != null) {
-                    if (uploadParamsVO.getPatent().getId() != null && pictureData != null) {
-                        uploadParamsVO.getPatent().setAbstractPath(patentImageService.updatePatentImage(uploadParamsVO.getPatent().getId(), pictureData));
-                    }
-                }
-                //专利信息(代理机构)数据装配
-                if (uploadParamsVO.getPatent() != null) {
-                    if (uploadParamsVO.getPatent().getAgencyId() != null) {
-                        uploadParamsVO.getPatent().setAgencyId(patentAgencyService.getAgencyStringIdByName(uploadParamsVO.getPatent().getAgencyId()));
-                    }
-
-                }
-                //将装配对象中的数据保存到数据库
-                dataToDBBro(params, uploadParamsVO);
-                //添加关联关系
-                List<String> list = new ArrayList<>();
-                Collections.addAll(list, uploadParamsVO.getPatent().getPatentNo());
-                assoProductPatentService.addPatents(list,productId);
-                //通过WebSocket 在每一次循环结束后 向前端发送完成进度
-                WebSocketServer.sendInfo(Response.websocket(new TaskWebSocketDTO()
-                        .setTaskId(params.getTaskId())
-                        .setComplete(false)
-                        .setIndex(i)
-                        .setTaskType(Constants.TASK_IMPORT_PATENT)
-                        .setPercentage(total == 0 ? 0 : Math.round((total.equals(i) ? (i * 1D) : (i + 1D)) / total * 100D))
-                        .setFileName("")
-                        .setOldName(params.getOldName())
-                        .setUrl("")
-                        .setTotal(total), ResponseEnum.PATENT_IMPORT_TASK_SUCCESS), params.getUserId());
-            }
-
-            SpringUtil.getBean(ProjectService.class).setImportPatentTaskStatus(2, params.getTaskId());
-            WebSocketServer.sendInfo(Response.websocket(new TaskWebSocketDTO()
-                    .setTaskId(params.getTaskId())
-                    .setComplete(true)
-                    .setIndex(total)
-                    .setTaskType(Constants.TASK_IMPORT_PATENT)
-                    .setPercentage(100L)
-                    .setFileName("")
-                    .setOldName(params.getOldName())
-                    .setUrl("")
-                    .setTotal(total), ResponseEnum.PATENT_IMPORT_TASK_SUCCESS), params.getUserId());
-        } catch (Exception e) {
-            e.printStackTrace();
-            SpringUtil.getBean(ProjectService.class).setImportPatentTaskStatus(3, params.getTaskId());
-            if (FLAG > 0) {
-                int successCount = total - FLAG;
-                WebSocketServer.sendInfo(Response.error("部分数据上传成功" + "\n" + "成功条数:" + successCount + "失败条数:" + FLAG), params.getUserId());
-            }
-            FLAG = 0;
-        }
-    }
 }

+ 0 - 175
PAS/src/main/java/cn/cslg/pas/service/asso/AssoProductPatentService.java

@@ -1,175 +0,0 @@
-package cn.cslg.pas.service.asso;
-
-import cn.cslg.pas.common.core.base.Constants;
-import cn.cslg.pas.common.model.QueryPatentVO;
-import cn.cslg.pas.common.model.dto.PatentDTO;
-import cn.cslg.pas.common.model.dto.ProductPatentDTO;
-import cn.cslg.pas.common.utils.*;
-import cn.cslg.pas.domain.*;
-import cn.cslg.pas.domain.asso.AssoPatentStructure;
-import cn.cslg.pas.domain.asso.AssoProductPatent;
-import cn.cslg.pas.mapper.DepartmentMapper;
-import cn.cslg.pas.mapper.PatentMapper;
-import cn.cslg.pas.mapper.asso.AssoProductPatentMapper;
-import cn.cslg.pas.service.*;
-import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.lang.tree.Tree;
-import cn.hutool.core.lang.tree.TreeNode;
-import cn.hutool.core.lang.tree.TreeNodeConfig;
-import cn.hutool.core.lang.tree.TreeUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.graphbuilder.math.func.Function;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.BeanUtils;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * <p>
- * 后台部门表 服务类
- * </p>
- *
- * @author 王岩
- * @since 2022-03-25
- */
-@Service
-@RequiredArgsConstructor(onConstructor_ = {@Lazy})
-public class AssoProductPatentService extends ServiceImpl<AssoProductPatentMapper, AssoProductPatent> {
-    private final PatentApplicantService patentApplicantService;
-    private final PatentAffairService patentAffairService;
-    private final PatentLabelService patentLabelService;
-    private final ProjectFieldService projectFieldService;
-    private final PatentInventorService patentInventorService;
-    private final PatentAgencyService patentAgencyService;
-    private final PatentAgentService patentAgentService;
-    private final PatentClassNumberLinkService patentClassNumberLinkService;
-    private final SystemDictService systemDictService;
-    private final PatentSimpleFamilyLinkService patentSimpleFamilyLinkService;
-    private final AssoStructurePatentService assoStructurePatentService;
-
-    /**
-     * 给产品添加相关专利
-     */
-    public int addPatents(ProductPatentDTO patentDTO) {
-        patentDTO.setIsIn(0);
-        List<String> patentNos = this.baseMapper.getPatentNos(patentDTO);
-        if (patentNos.size() == 0) {
-            return -1;
-        }
-        return this.baseMapper.insertBatch(patentNos, patentDTO.getProductId());
-    }
-
-
-    public int addPatents(List<String> patentNos, Integer productId) {
-        LambdaQueryWrapper<AssoProductPatent> wrapper = new LambdaQueryWrapper<>();
-        wrapper.select(AssoProductPatent::getPatentNo);
-        wrapper.eq(AssoProductPatent::getProductId, productId);
-        wrapper.in(AssoProductPatent::getPatentNo, patentNos);
-        List<String> patentNo = this.listObjs(wrapper, Object::toString);
-        patentNos.removeAll(patentNo);
-        if (patentNos.size() == 0) {
-            return -1;
-        }
-        return this.baseMapper.insertBatch(patentNos, productId);
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    public List<String> deletePatents(ProductPatentDTO patentDTO) {
-        patentDTO.setIsIn(1);
-        List<String> patentNos= new ArrayList<>();
-        if (patentDTO.getStartNumber() != null && patentDTO.getEndNumber() != null&&patentDTO.getEndNumber() >patentDTO.getStartNumber()) {
-            patentDTO.setEndNumber(patentDTO.getEndNumber() - patentDTO.getStartNumber()+1);
-            patentNos = this.baseMapper.getPatentNos(patentDTO);
-        }
-        if(patentDTO.getPatentNos()!=null&&patentDTO.getPatentNos().size()>0){
-          for(String item:patentDTO.getPatentNos()){
-                if(!patentNos.contains(item)){
-                    patentNos.add(item);
-                }
-            }
-        }
-        if(patentDTO.getNotInPatentNos()!=null) {
-            patentNos.removeAll(patentDTO.getNotInPatentNos());
-        }
-
-
-        List<String> assoPatents = new ArrayList<>();
-        if (patentNos.size() != 0) {
-            LambdaQueryWrapper<AssoPatentStructure> assoWrapper = new LambdaQueryWrapper<>();
-            assoWrapper.select(AssoPatentStructure::getPatentNo);
-            assoWrapper.eq(AssoPatentStructure::getProjectId, patentDTO.getProductId())
-                    .in(AssoPatentStructure::getPatentNo, patentNos);
-            assoPatents = assoStructurePatentService.listObjs(assoWrapper, Object::toString);
-            LambdaQueryWrapper<AssoProductPatent> wrapper = new LambdaQueryWrapper<>();
-            wrapper.eq(AssoProductPatent::getProductId, patentDTO.getProductId());
-            wrapper.in(AssoProductPatent::getPatentNo, patentNos);
-            this.remove(wrapper);
-            return assoPatents;
-        }
-        return assoPatents;
-    }
-
-    public IPage<PatentDTO> getPageList(QueryPatentVO params) {
-        IPage<Patent> dataPage = baseMapper.getPageList(new Page<>(params.getCurrent(), params.getSize()), params);
-        IPage<PatentDTO> pageList = new Page<>();
-        List<PatentDTO> records = new ArrayList<>();
-        List<Integer> patentIds = dataPage.getRecords().stream().map(Patent::getId).collect(Collectors.toList());
-        List<PatentApplicant> patentApplicantList = patentApplicantService.getPatentApplicantByPatentIds(patentIds);
-        List<PatentInventor> patentInventorList = patentInventorService.getPatentInventorByPatentIds(patentIds);
-        List<PatentLabel> patentLabelList = patentLabelService.getPatentLabelByPatentIdsAndProjectId(patentIds, params.getProjectId());
-        List<PatentClassNumberLink> patentClassNumberLinkList = patentClassNumberLinkService.getPatentClassNumberLinkByPatentIds(patentIds);
-        List<PatentAgent> patentAgentList = patentAgentService.getPatentAgentByPatentIds(patentIds);
-        List<PatentAgency> patentAgencyList = patentAgencyService.getPatentAgencyByIds(dataPage.getRecords().stream().filter(item -> StringUtils.isNotEmpty(item.getAgencyId())).map(item -> Integer.parseInt(item.getAgencyId())).distinct().collect(Collectors.toList()));
-        List<PatentSimpleFamilyLink> patentSimpleFamilyLinkList = patentSimpleFamilyLinkService.getPatentSimpleFamilyLinkByFamilyIds(dataPage.getRecords().stream().map(Patent::getSimpleFamily).collect(Collectors.toList()));
-        List<PatentSimpleFamilyLink> patentInpadocFamilyLinkList = patentSimpleFamilyLinkService.getPatentSimpleFamilyLinkByFamilyIds(dataPage.getRecords().stream().map(Patent::getInpadocFamily).collect(Collectors.toList()));
-        List<PatentSimpleFamilyLink> patentPatSnapFamilyLinkList = patentSimpleFamilyLinkService.getPatentSimpleFamilyLinkByFamilyIds(dataPage.getRecords().stream().map(Patent::getPatSnapFamily).collect(Collectors.toList()));
-        List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Arrays.asList(Constants.PATENT_TYPE, Constants.PATENT_SIMPLE_STATUS));
-        dataPage.getRecords().forEach(item -> {
-            PatentDTO patentDTO = new PatentDTO();
-            BeanUtils.copyProperties(item, patentDTO);
-            patentDTO.setApplicationDate(DateUtils.formatDate(item.getApplicationDate(), DateUtils.YYYY_MM_DD));
-            patentDTO.setPriorityDate(DateUtils.formatDate(item.getPriorityDate(), DateUtils.YYYY_MM_DD));
-            patentDTO.setPublicDate(DateUtils.formatDate(item.getPublicDate(), DateUtils.YYYY_MM_DD));
-            patentDTO.setPublicAccreditDate(DateUtils.formatDate(item.getPublicAccreditDate(), DateUtils.YYYY_MM_DD));
-            patentDTO.setFirstPublicDate(DateUtils.formatDate(item.getFirstPublicDate(), DateUtils.YYYY_MM_DD));
-            patentDTO.setSimpleStatus(systemDictList.stream().filter(systemDict -> systemDict.getType().equals(Constants.PATENT_SIMPLE_STATUS) && systemDict.getValue().equals(String.valueOf(item.getSimpleStatus()))).findFirst().orElse(new SystemDict()).getLabel());
-            patentDTO.setType(systemDictList.stream().filter(systemDict -> systemDict.getType().equals(Constants.PATENT_TYPE) && systemDict.getValue().equals(String.valueOf(item.getType()))).findFirst().orElse(new SystemDict()).getLabel());
-            patentDTO.setApplicant(patentApplicantList.stream().filter(patentApplicant -> patentApplicant.getPatentId().equals(item.getId())).collect(Collectors.toList()));
-            patentDTO.setInventor(patentInventorList.stream().filter(patentInventor -> patentInventor.getPatentId().equals(item.getId())).collect(Collectors.toList()));
-            patentDTO.setLabel(patentLabelList.stream().filter(patentLabel -> patentLabel.getPatentId().equals(item.getId())).collect(Collectors.toList()));
-            patentDTO.setIpcList(patentClassNumberLinkList.stream().filter(patentClassNumber -> patentClassNumber.getPatentId().equals(item.getId()) && patentClassNumber.getType().equals(Constants.PATENT_CLASS_NUMBER_IPC)).map(PatentClassNumberLink::getCode).distinct().collect(Collectors.toList()));
-            patentDTO.setCpcList(patentClassNumberLinkList.stream().filter(patentClassNumber -> patentClassNumber.getPatentId().equals(item.getId()) && patentClassNumber.getType().equals(Constants.PATENT_CLASS_NUMBER_CPC)).map(PatentClassNumberLink::getCode).distinct().collect(Collectors.toList()));
-            patentDTO.setUpcList(patentClassNumberLinkList.stream().filter(patentClassNumber -> patentClassNumber.getPatentId().equals(item.getId()) && patentClassNumber.getType().equals(Constants.PATENT_CLASS_NUMBER_UPC)).map(PatentClassNumberLink::getCode).distinct().collect(Collectors.toList()));
-            patentDTO.setLocList(patentClassNumberLinkList.stream().filter(patentClassNumber -> patentClassNumber.getPatentId().equals(item.getId()) && patentClassNumber.getType().equals(Constants.PATENT_CLASS_NUMBER_LOC)).map(PatentClassNumberLink::getCode).distinct().collect(Collectors.toList()));
-            patentDTO.setAffair(patentAffairService.getPatentAffairByPatentId(item.getId()));
-            if (StringUtils.isNotEmpty(item.getAgencyId())) {
-                patentDTO.setAgency(patentAgencyList.stream().filter(patentAgency -> patentAgency.getId().equals(Integer.parseInt(item.getAgencyId()))).findFirst().orElse(null));
-            }
-            PatentDTO.PatentFamily patentFamily = new PatentDTO.PatentFamily();
-            patentFamily.setSimple(patentSimpleFamilyLinkList.stream().filter(patentSimpleFamilyLink -> patentSimpleFamilyLink.getFamilyId().equals(item.getSimpleFamily())).map(PatentSimpleFamilyLink::getPatentNo).collect(Collectors.toList()));
-            patentFamily.setInpadoc(patentInpadocFamilyLinkList.stream().filter(patentSimpleFamilyLink -> patentSimpleFamilyLink.getFamilyId().equals(item.getInpadocFamily())).map(PatentSimpleFamilyLink::getPatentNo).collect(Collectors.toList()));
-            patentFamily.setPatSnap(patentPatSnapFamilyLinkList.stream().filter(patentSimpleFamilyLink -> patentSimpleFamilyLink.getFamilyId().equals(item.getPatSnapFamily())).map(PatentSimpleFamilyLink::getPatentNo).collect(Collectors.toList()));
-            patentDTO.setFamily(patentFamily);
-            patentDTO.setAgent(patentAgentList.stream().filter(patentAgent -> patentAgent.getPatentId().equals(item.getId())).collect(Collectors.toList()));
-            // TODO 性能优化
-            patentDTO.setField(projectFieldService.getPatentFieldByPatentIdAndProjectId(params.getProjectId(), item.getId()));
-            records.add(patentDTO);
-        });
-        pageList.setTotal(dataPage.getTotal());
-        pageList.setRecords(records);
-        pageList.setPages(dataPage.getPages());
-        pageList.setSize(dataPage.getSize());
-        pageList.setCurrent(dataPage.getCurrent());
-        Map<String, Object> map = new HashMap<>();
-        return pageList;
-    }
-
-
-}

+ 0 - 41
PAS/src/main/java/cn/cslg/pas/service/asso/AssoStructurePatentService.java

@@ -1,41 +0,0 @@
-package cn.cslg.pas.service.asso;
-
-import cn.cslg.pas.common.core.base.Constants;
-import cn.cslg.pas.common.model.QueryPatentVO;
-import cn.cslg.pas.common.model.dto.PatentDTO;
-import cn.cslg.pas.common.model.dto.ProductPatentDTO;
-import cn.cslg.pas.common.utils.DateUtils;
-import cn.cslg.pas.common.utils.StringUtils;
-import cn.cslg.pas.domain.*;
-import cn.cslg.pas.domain.asso.AssoPatentStructure;
-import cn.cslg.pas.domain.asso.AssoProductPatent;
-import cn.cslg.pas.mapper.AssoStructurePatentMapper;
-import cn.cslg.pas.mapper.asso.AssoProductPatentMapper;
-import cn.cslg.pas.service.*;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.BeanUtils;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * <p>
- * 后台部门表 服务类
- * </p>
- *
- * @author 王岩
- * @since 2022-03-25
- */
-@Service
-@RequiredArgsConstructor(onConstructor_ = {@Lazy})
-public class AssoStructurePatentService extends ServiceImpl<AssoStructurePatentMapper, AssoPatentStructure> {
-
-
-}

+ 15 - 57
PAS/src/main/java/cn/cslg/pas/service/impl/ProductCategoryServiceImpl.java

@@ -256,16 +256,9 @@ public class ProductCategoryServiceImpl implements IProductCategoryService {
         List<ProductCategoryTrendVO> trendVOS = new ArrayList<>();
         //存储所有产品的营销数据
         List<ProductMarketData> marketData = new ArrayList<>();
-        //存储所有
-        ProductCategoryTrendVO trendAllVO = new ProductCategoryTrendVO();
-        trendAllVO.setProductId(0);
-        trendAllVO.setProductName("总产品");
-        Map<String, Object> allMarketDataMap = new HashMap<>();
         //根据产品类别ID获得产品id和产品名称
         LambdaQueryWrapper<Product> productWrapper = new LambdaQueryWrapper<>();
         productWrapper.eq(Product::getProductCategoryId, dto.getCategoryId());
-        if(dto.getCompanyName()!=null&&dto.getCompanyName()!=""){
-        productWrapper.eq(Product::getCompanyName,dto.getCompanyName());}
         List<Product> products = productService.list(productWrapper);
         if (products.size() != 0) {
             List<Integer> productIds = products.stream().map(Product::getId).collect(Collectors.toList());
@@ -293,94 +286,58 @@ public class ProductCategoryServiceImpl implements IProductCategoryService {
             temMarketData.forEach(item -> {
                         //获得营销数据的时间
                         String date = item.getSaleTime();
-                        double saleCount = item.getSaleMoney();
+                        double saleCount = item.getSaleCount() * item.getSaleMoney();
                         if (dto.getTimeUnit() == 1) {
                             try {
                                 Date dateForm = new SimpleDateFormat("yyyy-MM").parse(date);
-                                Calendar ca = Calendar.getInstance();
-                                ca.setTime(dateForm);
-                                int month = ca.get(Calendar.MONTH);//第几个月
-                                int year = ca.get(Calendar.YEAR);//年份数值
-                                int season = (month - 1) / 3+1;
+                                int month = dateForm.getMonth();
+                                int year = dateForm.getYear();
+                                int season = (month - 1) / 3;
                                 date = year + "-" + season;
                             } catch (ParseException e) {
                                 e.printStackTrace();
                             }
                         }
-                        else if(dto.getTimeUnit() == 2){
-                            try {
-                                Date dateForm = new SimpleDateFormat("yyyy-MM").parse(date);
-                                Calendar ca = Calendar.getInstance();
-                                ca.setTime(dateForm);
-                                int year = ca.get(Calendar.YEAR);//年份数值
-                                date = year+"";
-                            } catch (ParseException e) {
-                                e.printStackTrace();
-                            }
-                        }
                         //计算销售额
                         if (marketDataMap.get(date) != null) {
                             saleCount += Double.parseDouble(marketDataMap.get(date).toString());
                         }
                         marketDataMap.put(date, saleCount);
-
-                        //产品总体部分
-                if (allMarketDataMap.get(date) != null) {
-                    saleCount += Double.parseDouble(allMarketDataMap.get(date).toString());
-                }
-                allMarketDataMap.put(date, saleCount);
                     }
             );
             Set keyset = marketDataMap.keySet();
             List<ProductCategoryTrendVO.saleVO> saleVOS = new ArrayList<>();
             for (Object key : keyset) {
                 ProductCategoryTrendVO.saleVO saleVO = new ProductCategoryTrendVO.saleVO();
-                saleVO.setMarketDate(key.toString());
+                saleVO.setMarketData(key.toString());
                 saleVO.setSaleTotalMoney(Double.parseDouble(marketDataMap.get(key).toString()));
                 saleVOS.add(saleVO);
             }
             trendVO.setSaleVOS(saleVOS);
             trendVOS.add(trendVO);
         }
-        Set keyset = allMarketDataMap.keySet();
-        List<ProductCategoryTrendVO.saleVO> saleVOS = new ArrayList<>();
-        for (Object key : keyset) {
-            ProductCategoryTrendVO.saleVO saleVO = new ProductCategoryTrendVO.saleVO();
-            saleVO.setMarketDate(key.toString());
-            saleVO.setSaleTotalMoney(Double.parseDouble(allMarketDataMap.get(key).toString()));
-            saleVOS.add(saleVO);
-        }
-        trendAllVO.setSaleVOS(saleVOS);
-        trendVOS.add(trendAllVO);
+
         return trendVOS;
     }
 
     @Override
-    public List<String> getAreaList(Integer id,Integer productId) {
+    public List<String> getAreaList(Integer id) {
         //存储所有产品的营销数据
         List<ProductMarketData> marketData = new ArrayList<>();
         List<String> areaList = new ArrayList<>();
-        List<Integer> productIds = new ArrayList<>();
-        if(productId==null) {
-            //根据架构id获得产品
-            LambdaQueryWrapper<Product> productWrapper = new LambdaQueryWrapper<>();
-            productWrapper.eq(Product::getProductCategoryId, id);
-            List<Product> products = productService.list(productWrapper);
-
-            if (products.size() != 0) {
-                productIds = products.stream().map(Product::getId).collect(Collectors.toList());
-            }
-        }
-        else {
-            productIds=Arrays.asList(productId);
-        }
+        //根据架构id获得产品
+        LambdaQueryWrapper<Product> productWrapper = new LambdaQueryWrapper<>();
+        productWrapper.eq(Product::getProductCategoryId, id);
+        List<Product> products = productService.list(productWrapper);
+        if (products.size() != 0) {
+            List<Integer> productIds = products.stream().map(Product::getId).collect(Collectors.toList());
             if (productIds.size() > 0) {
                 //根据产品Id获得产品营销数据
                 LambdaQueryWrapper<ProductMarketData> market = new LambdaQueryWrapper<>();
                 market.in(ProductMarketData::getProductId, productIds);
                 marketData = productMarketDataIService.list(market);
             }
-
+        }
         marketData.forEach(
                 item -> {
                     if (!areaList.contains(item.getSaleArea())) {
@@ -393,6 +350,7 @@ public class ProductCategoryServiceImpl implements IProductCategoryService {
 
 
     public List<String> getCompanyList(Integer id) {
+
         List<String> areaList = new ArrayList<>();
         //根据架构id获得产品
         LambdaQueryWrapper<Product> productWrapper = new LambdaQueryWrapper<>();

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/service/impl/ProductMarketDataIServicempl.java

@@ -35,7 +35,7 @@ import java.util.regex.Pattern;
 @RequiredArgsConstructor
 @Slf4j
 @Service
-public class ProductMarketDataIServicempl extends ServiceImpl<ProductMarketDataMapper, ProductMarketData> implements IProductMarketDataService {
+public class ProductMarketDataServiceImpl extends ServiceImpl<ProductMarketDataMapper, ProductMarketData> implements IProductMarketDataService {
     private final ProductMarketDataMapper productMarketDataMapper;
     private final CacheUtils cacheUtils;
     private final LoginUtils loginUtils;

+ 80 - 0
PAS/src/main/java/cn/cslg/pas/service/impl/StructurePatentServiceImpl.java

@@ -0,0 +1,80 @@
+package cn.cslg.pas.service.impl;
+
+import cn.cslg.pas.common.model.dto.AssoStructurePatentQueryDTO;
+import cn.cslg.pas.common.model.dto.AssoStructurePatentUpdateDTO;
+import cn.cslg.pas.common.model.vo.AssoStructurePatentVO;
+import cn.cslg.pas.domain.asso.AssoStructurePatent;
+import cn.cslg.pas.exception.XiaoShiException;
+import cn.cslg.pas.mapper.AssoStructurePatentMapper;
+import cn.cslg.pas.service.IStructurePatentService;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 专题库产品架构专利号标引的Service层接口实现类
+ *
+ * @Author chenyu
+ * @Date 2023/3/15
+ */
+@RequiredArgsConstructor
+@Slf4j
+@Service
+public class StructurePatentServiceImpl implements IStructurePatentService {
+    private final AssoStructurePatentMapper assoStructurePatentMapper;
+
+    /**
+     * 更新标引(新增或删除)
+     *
+     * @param assoStructurePatentUpdateDTO 专题库产品架构专利号标引的修改DTO类对象
+     */
+    @Override
+    public void update(AssoStructurePatentUpdateDTO assoStructurePatentUpdateDTO) {
+        log.info("开始处理【更新标引】的业务,参数为:{}", assoStructurePatentUpdateDTO);
+
+        //获取DTO中的updateType类型,true则为新增标引,false则为删除标引
+        Boolean updateType = assoStructurePatentUpdateDTO.getUpdateType();
+        //DTO对象赋值给实体类
+        AssoStructurePatent assoStructurePatent = new AssoStructurePatent();
+        BeanUtils.copyProperties(assoStructurePatentUpdateDTO, assoStructurePatent);
+        //true则新增标引,false则删除标引
+        if (updateType) {
+            log.info("架构专利关联表新增数据");
+            int rows = assoStructurePatentMapper.insert(assoStructurePatent);
+            if (rows != 1) {
+                String message = "新增标引失败,服务器忙请稍后再次尝试";
+                log.info("{}", message);
+                throw new XiaoShiException(message);
+            }
+        } else {
+            log.info("架构专利关联表删除数据");
+            int rows = assoStructurePatentMapper.delete(assoStructurePatent);
+            if (rows != 1) {
+                String message = "删除标引失败,服务器忙请稍后再次尝试";
+                log.info("{}", message);
+                throw new XiaoShiException(message);
+            }
+        }
+
+        log.info("更新标引完成");
+
+    }
+
+    /**
+     * 查询标引
+     *
+     * @param assoStructurePatentQueryDTO 专题库产品架构专利号标引的查询DTO类
+     * @return 返回查询到的数据
+     */
+    @Override
+    public List<AssoStructurePatentVO> query(AssoStructurePatentQueryDTO assoStructurePatentQueryDTO) {
+        log.info("开始处理【查询标引】的业务,参数为:{}", assoStructurePatentQueryDTO);
+        List<AssoStructurePatentVO> queryResult = assoStructurePatentMapper.selectByProjectIdPatentNo(assoStructurePatentQueryDTO);
+        return queryResult;
+    }
+
+
+}

+ 0 - 178
PAS/src/main/resources/mapper/AssoProductPatentMapper.xml

@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="cn.cslg.pas.mapper.asso.AssoProductPatentMapper">
-    <!--批量插入数据-->
-    <!--int insertBatch(List<AssoProductPicture> assoProductPictures);-->
-    <insert id="insertBatch">
-        insert into asso_product_patent (product_id,patent_no)
-        values
-        <foreach collection="patentNos" item="item" separator=",">
-            (#{productId},#{item})
-        </foreach>
-    </insert>
-
-
-    <select id="getPageList" parameterType="cn.cslg.pas.common.model.vo.PatentVO"
-            resultType="cn.cslg.pas.domain.Patent">
-        select DISTINCT a.id, a.`name` as name, a.nameout as name_out, a.patentno as patent_no, a.abstract_path,
-        a.abstract as
-        abstract_str, a.abstractout as abstract_out,
-        a.publicno as public_no, a.publicdate as public_date, a.simple_family, a.inpadoc_family, a.applicationno as
-        application_no, a.appdate as application_date,
-        a.`status` as simple_status, a.type, a.publictodate as public_accredit_date, a.fpublicdate as first_public_date,
-        a.prioritydate as priority_date,
-        a.agencyid as agency_id, a.num2 as right_num, a.quoteno as quote_num, a.quotedno as quoted_num,
-        a.patsnap_family as patSnapFamily, a.patsnapfamilynum as patSnapFamilyNum
-        from os_patent a
-        left join asso_product_patent i on i.patent_no=a.patentno
-            left join asso_structure_patent t on t.patent_no =a.patentno
-        <if test="params.applicationName !=null ">
-            left join os_applicant_attr b on a.id=b.pid and b.type =1
-            left join os_patent_applicant c on c.id=b.applicantid
-        </if>
-        <if test=" params.obligeeName !=null">
-            left join os_applicant_attr d on a.id=d.pid and d.type =2
-            left join os_patent_applicant e on e.id=d.applicantid
-        </if>
-        <if test="params.numberIpc!=null ">
-            left join os_patent_typeno f on f.pid =a.id and f.type =1
-        </if>
-        <if test=" params.numberCpc!=null ">
-            left join os_patent_typeno g on g.pid =a.id and g.type =2
-        </if>
-        <if test=" params.numberUpc!=null">
-            left join os_patent_typeno h on h.pid =a.id and h.type =3
-        </if>
-        <where>
-          ( i.product_id =#{params.productId}
-            or t.product_id =#{params.productId} )
-                    <if test="params.applicationName !=null and params.applicationName !=''  ">
-                        and c.name  REGEXP #{params.applicationName}
-                    </if>
-                    <if test="params.obligeeName !=null and params.obligeeName!=''">
-                        and e.name  REGEXP #{params.obligeeName}
-                    </if>
-                    <if test="params.numberIpc !=null and params.numberIpc!=''">
-                        and f.code like concat("%", #{params.numberIpc}, "%")
-                    </if>
-                    <if test="params.numberCpc !=null and params.numberCpc!=''">
-                        and g.code like concat("%", #{params.numberCpc}, "%")
-                    </if>
-                    <if test="params.numberUpc !=null and params.numberUpc!=''">
-                        and h.code like concat("%", #{params.numberUpc}, "%")
-                    </if>
-                    <if test="params.patentNo !=null and params.patentNo !=''">
-                        and a.patentNo REGEXP  #{params.patentNo}
-                    </if>
-                    <if test="params.applicationNo !=null and params.applicationNo !=''">
-                        and a.applicationNo like concat("%", #{params.applicationNo}, "%")
-                    </if>
-                    <if test="params.abstractStr !=null and params.abstractStr !=''">
-                        and a.abstract like concat("%", #{params.abstractStr}, "%")
-                    </if>
-                    <if test="params.patentName !=null and params.patentName !=''">
-                        and a.`name` like concat("%", #{params.patentName}, "%")
-                    </if>
-                    <if test="params.orderItem!=null and params.orderItem!='SysOrder'">
-                        order by #{params.orderItem}
-                        <if test="params.orderType!=null">
-                            #{params.orderType}
-                        </if>
-                    </if>
-                    <if test="params.orderItem==null">
-                        order by a.patentno
-                    </if>
-                    <if test="params.orderItem=='SysOrder' and params.patentNos != null and params.patentNos.size()!=0">
-                        order by field (a.patentno,
-                        <foreach item="item" collection="params.patentNos" index="index" open="" separator=","
-                                 close=")">
-                            #{item}
-                        </foreach>
-                    </if>
-
-        </where>
-    </select>
-
-    <select id="getPatentNos" resultType="java.lang.String">
-        select DISTINCT a.patentno as patent_no
-        from os_patent a
-        left join asso_product_patent i on i.patent_no=a.patentno
-        left join asso_structure_patent t on t.patent_no =a.patentno
-        <if test="params.applicationName !=null ">
-            left join os_applicant_attr b on a.id=b.pid and b.type =1
-            left join os_patent_applicant c on c.id=b.applicantid
-        </if>
-        <if test=" params.obligeeName !=null">
-            left join os_applicant_attr d on a.id=d.pid and d.type =2
-            left join os_patent_applicant e on e.id=d.applicantid
-        </if>
-        <if test="params.numberIpc!=null ">
-            left join os_patent_typeno f on f.pid =a.id and f.type =1
-        </if>
-        <if test=" params.numberCpc!=null ">
-            left join os_patent_typeno g on g.pid =a.id and g.type =2
-        </if>
-        <if test=" params.numberUpc!=null">
-            left join os_patent_typeno h on h.pid =a.id and h.type =3
-        </if>
-        <where>
-
-            <if test="params.applicationName !=null and params.applicationName !=''  ">
-                and c.name  REGEXP #{params.applicationName}
-            </if>
-            <if test="params.obligeeName !=null and params.obligeeName!=''">
-                and e.name  REGEXP #{params.obligeeName}
-            </if>
-            <if test="params.numberIpc !=null and params.numberIpc!=''">
-                and f.code like concat("%", #{params.numberIpc}, "%")
-            </if>
-            <if test="params.numberCpc !=null and params.numberCpc!=''">
-                and g.code like concat("%", #{params.numberCpc}, "%")
-            </if>
-            <if test="params.numberUpc !=null and params.numberUpc!=''">
-                and h.code like concat("%", #{params.numberUpc}, "%")
-            </if>
-            <if test="params.patentNo !=null and params.patentNo !=''">
-                and a.patentNo REGEXP  #{params.patentNo}
-            </if>
-            <if test="params.applicationNo !=null and params.applicationNo !=''">
-                and a.applicationNo like concat("%", #{params.applicationNo}, "%")
-            </if>
-            <if test="params.abstractStr !=null and params.abstractStr !=''">
-                and a.abstract like concat("%", #{params.abstractStr}, "%")
-            </if>
-            <if test="params.patentName !=null and params.patentName !=''">
-                and a.`name` like concat("%", #{params.patentName}, "%")
-            </if>
-            <if test="params.isIn ==0">
-             and   (i.product_id !=#{params.productId} or i.product_id is null)
-                and (t.product_id !=#{params.productId} or t.product_id is null)
-            </if>
-            <if test="params.isIn !=0">
-             and (i.product_id =#{params.productId} or t.product_id =#{params.productId})
-            </if>
-            <if test="params.orderItem!=null and params.orderItem!='SysOrder'">
-                order by #{params.orderItem}
-                <if test="params.orderType!=null">
-                    #{params.orderType}
-                </if>
-            </if>
-            <if test="params.orderItem==null">
-                order by a.patentno
-            </if>
-            <if test="params.orderItem=='SysOrder' and params.patentNos != null and params.patentNos.size()!=0">
-                order by field (a.patentno,
-                <foreach item="item" collection="params.patentNos" index="index" open="" separator=","
-                         close=")">
-                    #{item}
-                </foreach>
-            </if>
-            <if test=" params.endNumber &gt; 0">
-                limit #{params.startNumber},#{params.endNumber}
-            </if>
-        </where>
-
-    </select>
-
-</mapper>

+ 0 - 3
PAS/src/main/resources/mapper/TaskMapper.xml

@@ -21,9 +21,6 @@
             <if test="params.projectId != null">
                 and a.tid = #{params.projectId}
             </if>
-            <if test="params.productId != null">
-                and a.product_id = #{params.productId}
-            </if>
             <if test="params.projectName != '' and params.projectName != null">
                 and c.name like concat('%', #{params.projectName}, '%')
             </if>