Browse Source

筛选 2022/12/7

lwhhszx 2 years ago
parent
commit
7e8f5e9435

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

@@ -24,4 +24,6 @@ public class PatentQueryFieldSourceVO extends BaseVO {
     private Integer customFieldTreeType;
     private Integer customFieldTreeType;
     @Schema(description = "专利号")
     @Schema(description = "专利号")
     private String patentNo;
     private String patentNo;
+    @Schema(description = "任务ID")
+    private Integer taskId;
 }
 }

+ 48 - 0
RMS/src/main/java/cn/cslg/report/common/model/vo/PatentVO.java

@@ -18,15 +18,63 @@ import java.util.List;
 public class PatentVO extends BaseVO {
 public class PatentVO extends BaseVO {
     @Schema(description = "报告Id",required = true)
     @Schema(description = "报告Id",required = true)
     private Integer reportId;
     private Integer reportId;
+
     @Schema(description = "起始条数")
     @Schema(description = "起始条数")
     private Integer startNumber;
     private Integer startNumber;
+
     @Schema(description = "结束条数")
     @Schema(description = "结束条数")
     private Integer endNumber;
     private Integer endNumber;
+
     @Schema(description = "专利号列表")
     @Schema(description = "专利号列表")
     private List<String> patentNos;
     private List<String> patentNos;
+
     private List<String> notInPatentNos;
     private List<String> notInPatentNos;
+
     @Schema(description = "状态")
     @Schema(description = "状态")
     private Integer state;
     private Integer state;
+
     @Schema(description = "当前专利位置")
     @Schema(description = "当前专利位置")
     private Integer locPosition;
     private Integer locPosition;
+
+    @Schema(description = "任务状态 0未完成 1已完成")
+    private Integer taskStatus;
+
+    @Schema(description = "任务Id")
+    private String taskId;
+
+    @Schema(description = "自定义字段选项列表")
+    private List<SourceVO> filedOptions;
+    //专题库ID
+    private Integer projectId;
+    //RMS导入ID
+    private List<Integer> importTaskId;
+    //条件专利号
+    private List<String> conPatentNos;
+
+    //申请人名字
+    @Schema(description = "申请人名字")
+    private String applicationName;
+    //权利人名字
+    @Schema(description = "权利人名字")
+    private String obligeeName;
+
+    @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;
 }
 }

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

@@ -107,11 +107,7 @@ public class PatentFiledController {
     public String getPatentQuerySourcePageList(@RequestBody PatentQueryFieldSourceVO params) {
     public String getPatentQuerySourcePageList(@RequestBody PatentQueryFieldSourceVO params) {
         return Response.success(reportFieldService.getPatentQuerySourcePageList(params));
         return Response.success(reportFieldService.getPatentQuerySourcePageList(params));
     }
     }
-//    @PostMapping("/query/PatentQueryFieldSourceVO")
-//    @Operation(summary ="查询相关的报告交集和并集")
-//    public String getPatent(@RequestBody List<PatentQueryFieldSourceVO> params ) throws IOException {
-//       return reportFieldService.getPatent(params);
-//    }
+
     @GetMapping("/getPatentField")
     @GetMapping("/getPatentField")
     @Operation(summary ="模糊查询自定义字段")
     @Operation(summary ="模糊查询自定义字段")
     public String getPatentField( int filedId ,String name)throws IOException{
     public String getPatentField( int filedId ,String name)throws IOException{

+ 3 - 2
RMS/src/main/java/cn/cslg/report/controller/TaskController.java

@@ -53,6 +53,7 @@ public class TaskController {
     private final TaskService taskService;
     private final TaskService taskService;
     private final BaseService baseService;
     private final BaseService baseService;
     private final ImportTaskService importTaskService;
     private final ImportTaskService importTaskService;
+    private final ReportFieldService reportFieldService;
 
 
     @RequestMapping(value = "/deleteTask", method = RequestMethod.POST)
     @RequestMapping(value = "/deleteTask", method = RequestMethod.POST)
     @Operation(summary = "删除任务")
     @Operation(summary = "删除任务")
@@ -105,8 +106,8 @@ public class TaskController {
 
 
     @RequestMapping(value = "/reTaskPatents", method = RequestMethod.POST)
     @RequestMapping(value = "/reTaskPatents", method = RequestMethod.POST)
     @Operation(summary = "返回任务专利清单")
     @Operation(summary = "返回任务专利清单")
-    public String reTaskPatents(@RequestBody TaskVO taskVO) throws ParseException, IOException {
-        return taskService.reTaskPatents(taskVO);
+    public String reTaskPatents(@RequestBody PatentVO patentVO) throws ParseException, IOException {
+        return taskService.reTaskPatents(patentVO);
     }
     }
 
 
     @RequestMapping(value = "/import", method = RequestMethod.POST)
     @RequestMapping(value = "/import", method = RequestMethod.POST)

+ 9 - 3
RMS/src/main/java/cn/cslg/report/service/BaseService.java

@@ -153,9 +153,9 @@ public class BaseService {
     public String getPartDepartment() {
     public String getPartDepartment() {
         try {
         try {
             String resBody = outInterfaceService.getPartDepartmentFromPCS();
             String resBody = outInterfaceService.getPartDepartmentFromPCS();
-            JSONObject jsonObject = JSONObject.parseObject(resBody);
-            return Response.success(jsonObject.get("data"));
-        } catch (Exception ex) {
+            return resBody;
+        }
+        catch (Exception ex) {
             ex.printStackTrace();
             ex.printStackTrace();
             log.error("权限系统获取部门列表失败,错误信息:" + LogExceptionUtil.getMessage(ex));
             log.error("权限系统获取部门列表失败,错误信息:" + LogExceptionUtil.getMessage(ex));
             return Response.error(Constants.NET_ERROR);
             return Response.error(Constants.NET_ERROR);
@@ -242,6 +242,11 @@ public class BaseService {
 
 
     //获得
     //获得
     public ImportTask getImportPatentTaskParamsBro(MultipartFile file,Integer reportId) throws IOException {
     public ImportTask getImportPatentTaskParamsBro(MultipartFile file,Integer reportId) throws IOException {
+        Integer type =0;
+        if(reportId==null){
+            reportId =0;
+            type=1;
+        }
         //上传文档
         //上传文档
         UploadFileDTO fileDTO = fileUtils.uploadFile(file);
         UploadFileDTO fileDTO = fileUtils.uploadFile(file);
         //获得文档保存的路径
         //获得文档保存的路径
@@ -268,6 +273,7 @@ public class BaseService {
         importTask.setCreateUserName(personnelVO.getName());
         importTask.setCreateUserName(personnelVO.getName());
         importTask.setFilePath(fileDTO.getPath());
         importTask.setFilePath(fileDTO.getPath());
         importTask.setTaskName(file.getOriginalFilename());
         importTask.setTaskName(file.getOriginalFilename());
+        importTask.setImportType(type);
         importTask.insert();
         importTask.insert();
         return importTask;
         return importTask;
     }
     }

+ 16 - 0
RMS/src/main/java/cn/cslg/report/service/OutInterfaceService.java

@@ -340,10 +340,26 @@ public class OutInterfaceService {
             map.put("startNumber", patentVO.getStartNumber());
             map.put("startNumber", patentVO.getStartNumber());
             map.put("endNumber", patentVO.getEndNumber());
             map.put("endNumber", patentVO.getEndNumber());
         }
         }
+        //专利名称
+        map.put("patentName",patentVO.getPatentName());
+        //专利摘要
+        map.put("abstractStr",patentVO.getAbstractStr());
         map.put("size", patentVO.getSize());
         map.put("size", patentVO.getSize());
         map.put("current", patentVO.getCurrent());
         map.put("current", patentVO.getCurrent());
         map.put("patentNos", patentVO.getPatentNos());
         map.put("patentNos", patentVO.getPatentNos());
+        //申请人名字
+        map.put("applicationName",patentVO.getApplicationName());
+        //申请号
+        map.put("applicationNo",patentVO.getApplicationNo());
+        //专利号
+        map.put("patentNo",patentVO.getPatentNo());
+        //权利人名字
+        map.put("obligeeName" ,patentVO.getObligeeName());
         map.put("notInPatentNos", patentVO.getNotInPatentNos());
         map.put("notInPatentNos", patentVO.getNotInPatentNos());
+        //分类号(IPC,UPC,CPC)
+        map.put("numberCpc",patentVO.getNumberCpc());
+        map.put("numberIpc",patentVO.getNumberIpc());
+        map.put("numberUpc",patentVO.getNumberUpc());
         JSONObject json = new JSONObject(map);
         JSONObject json = new JSONObject(map);
         RequestBody requestBody = RequestBody.create(JSON, String.valueOf(json));
         RequestBody requestBody = RequestBody.create(JSON, String.valueOf(json));
         OkHttpClient okHttpClient = new OkHttpClient();
         OkHttpClient okHttpClient = new OkHttpClient();

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

@@ -19,6 +19,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
@@ -261,24 +262,38 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
 
 
     //返回任务专利清单
     //返回任务专利清单
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
-    public String  reTaskPatents(TaskVO taskVo) throws ParseException, IOException {
+    public String  reTaskPatents(PatentVO patentVO) throws ParseException, IOException {
+
         //根据任务Id和类型获得任务的清单
         //根据任务Id和类型获得任务的清单
         LambdaQueryWrapper<AssoTaskPersonel> queryWrapper = new LambdaQueryWrapper<>();
         LambdaQueryWrapper<AssoTaskPersonel> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.eq(AssoTaskPersonel::getTaskId, taskVo.getTaskId());
-        queryWrapper.eq(AssoTaskPersonel::getState,taskVo.getTaskStatus());
+        queryWrapper.eq(AssoTaskPersonel::getTaskId, patentVO.getTaskId());
+        if(patentVO.getTaskStatus()!=3){
+            queryWrapper.eq(AssoTaskPersonel::getState, patentVO.getTaskStatus());}
         List<AssoTaskPersonel> assoTaskPersonels = assoTaskPersonelService.list(queryWrapper);
         List<AssoTaskPersonel> assoTaskPersonels = assoTaskPersonelService.list(queryWrapper);
-        List<String> PatentNos =assoTaskPersonels.stream().filter(item->item.getState()==taskVo.getTaskStatus()).map(AssoTaskPersonel::getPatentNo).collect(Collectors.toList());
-        //根据清单获得获得专利详情
-        PatentVO patentVO =new PatentVO();
-        patentVO.setPatentNos(PatentNos);
-        patentVO.setSize(taskVo.getSize());
-        patentVO.setCurrent(taskVo.getCurrent());
+        List<String> taskPatentNos =new ArrayList<>();
+        if(patentVO.getTaskStatus()!=3){
+            taskPatentNos = assoTaskPersonels.stream().filter(item -> item.getState() == patentVO.getTaskStatus()).map(AssoTaskPersonel::getPatentNo).collect(Collectors.toList());
+        }
+        else {
+            taskPatentNos = assoTaskPersonels.stream().map(AssoTaskPersonel::getPatentNo).collect(Collectors.toList());
+        }
+        //无查询条件
+        if(patentVO.getFiledOptions().size()==0|| patentVO.getFiledOptions()==null) {
+            patentVO.setPatentNos(taskPatentNos);
+        }
+        //有查询条件时,自定义字段的专利号和任务的专利号取交集
+        else {
+            List<String>  patentNos=  reportFieldService.getPatentNo(patentVO.getFiledOptions());
+            List<String>  jiaoList = new ArrayList<>(taskPatentNos);
+            jiaoList.retainAll(patentNos);
+            patentVO.setPatentNos(jiaoList);
+        }
         String res = outInterfaceService.getPatentFromPAS(patentVO, 1);
         String res = outInterfaceService.getPatentFromPAS(patentVO, 1);
         JSONObject jsonObject = JSONObject.parseObject(res);
         JSONObject jsonObject = JSONObject.parseObject(res);
         JSONObject jsonObject1= JSONObject.parseObject(jsonObject.get("data").toString()) ;
         JSONObject jsonObject1= JSONObject.parseObject(jsonObject.get("data").toString()) ;
         List<JSONObject> jsonObjects = JSONArray.parseArray(jsonObject1.get("records").toString(), JSONObject.class);
         List<JSONObject> jsonObjects = JSONArray.parseArray(jsonObject1.get("records").toString(), JSONObject.class);
         for (int i =0;i<jsonObjects.size();i++)
         for (int i =0;i<jsonObjects.size();i++)
-        { jsonObjects.get(i).put("field", reportFieldService.getPatentFieldByPatentIdAndProjectId(taskVo.getReportId(), jsonObjects.get(i).getString("patentNo")));
+        { jsonObjects.get(i).put("field", reportFieldService.getPatentFieldByPatentIdAndProjectId(patentVO.getReportId(), jsonObjects.get(i).getString("patentNo")));
         }
         }
         jsonObject1.put("records",jsonObjects);
         jsonObject1.put("records",jsonObjects);
         jsonObject.put("data",jsonObject1);
         jsonObject.put("data",jsonObject1);

File diff suppressed because it is too large
+ 0 - 8155
logs/rms/rms-debug.2022-11-30.0.log


+ 0 - 0
logs/rms/rms-debug.2022-12-07.0.log


File diff suppressed because it is too large
+ 0 - 485
logs/rms/rms-info.2022-11-30.0.log


+ 0 - 0
logs/rms/rms-info.2022-12-07.0.log