chendayu 2 years ago
parent
commit
764a6304eb

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

@@ -73,8 +73,8 @@ public class PatentController {
 
     @GetMapping("patentNo")
     @Operation(summary = "根据专利号获取专利所有信息")
-    public String getPatentIdByPatentNo(String patentNo,Integer projectId) {
-        PatentDTO patentDTO =patentService.getPatentDTOById(patentNo,projectId);
+    public String getPatentIdByPatentNo(String patentNo, Integer projectId) {
+        PatentDTO patentDTO = patentService.getPatentDTOById(patentNo, projectId);
         return Response.success(patentDTO);
     }
 
@@ -132,7 +132,7 @@ public class PatentController {
     }
 
     @checkAuth(FunId = "/workspace/folder/batchOperation/batchIndexing")
-    @Permission(roles = {1,2})
+    @Permission(roles = {1, 2})
     @PostMapping("/batch/index")
     @Operation(summary = "批量批量专利标引")
     public String patentBatchIndex(@RequestBody PatentBatchIndexVO params) {
@@ -153,7 +153,7 @@ public class PatentController {
     }
 
     @checkAuth(FunId = "/workspace/details/indexing")
-    @Permission(roles = {1,2})
+    @Permission(roles = {1, 2})
     @PostMapping("/index/setting")
     @Operation(summary = "修改专利标引")
     public String updatePatentIndexSetting(@RequestBody PatentIndexSettingVO params) {
@@ -170,28 +170,28 @@ public class PatentController {
     @GetMapping("right")
     @Operation(summary = "根据专利号获得专利的权要")
     public String getRightList(String patentNo) {
-        List<PatentRight> patentRights =patentRightService.getPatentRightByPatentNo(patentNo);
+        List<PatentRight> patentRights = patentRightService.getPatentRightByPatentNo(patentNo);
         return Response.success(patentRights);
     }
 
     @GetMapping("getPatentNos")
     @Operation(summary = "根据专题库号获得专利号")
     public String getPatentNos(Integer projectId) {
-      String res =patentService.getPatentNos(projectId);
+        String res = patentService.getPatentNos(projectId);
         return res;
     }
 
     @PostMapping("getPagination")
     @Operation(summary = "分页获取专利")
-    public String getPagination(@RequestBody PatentVO patentVO){
-       return patentService.getPagination(patentVO.getPatentNos(),patentVO.getStartNumber());
+    public String getPagination(@RequestBody PatentVO patentVO) {
+        return patentService.getPagination(patentVO.getPatentNos(), patentVO.getStartNumber());
     }
 
     @Operation(summary = "查询专利价值曲线")
     @PostMapping("/showTrend")
     public String showTrend(@RequestBody PatentMarketDataDTO dto) {
         List<PatentTrendVO> queryResult = patentMarketDataService.showTrend(dto);
-        if (queryResult != null){
+        if (queryResult != null) {
             return Response.success(queryResult);
         } else {
             return Response.error("查询失败");

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

@@ -1,6 +1,5 @@
 package cn.cslg.pas.controller;
 
-import cn.cslg.pas.common.core.annotation.Permission;
 import cn.cslg.pas.common.core.base.Constants;
 import cn.cslg.pas.common.utils.Response;
 import cn.cslg.pas.common.utils.auth.checkAuth;

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

@@ -55,6 +55,7 @@ public class PatentImageService extends ServiceImpl<PatentImageMapper, PatentIma
         return this.list(queryWrapper);
     }
 
+    //TODO 可删除
     public PatentImage getPatentImageByPatentIdAndStatus(Integer patentId, Integer status) {
         LambdaQueryWrapper<PatentImage> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(PatentImage::getPatentId, patentId);

+ 4 - 5
PAS/src/main/java/cn/cslg/pas/service/PatentInstructionService.java

@@ -154,11 +154,10 @@ public class PatentInstructionService extends ServiceImpl<PatentInstructionMappe
     }
 
     /**
-     * 说明书pdf数据入库
+     * 说明书pdf数据入库
      *
-     * @param patentNo
-     * @param pdf
-     * @return
+     * @param patentNo 专利号
+     * @param pdf      装载pdf数据对象
      */
     @Transactional
     public String edit(String patentNo, UploadFileDTO pdf) {
@@ -192,7 +191,7 @@ public class PatentInstructionService extends ServiceImpl<PatentInstructionMappe
         patentInstruction.setPatentNo(patentNo);
         patentInstruction.setType(2);
 
-        //根据专利号和pdf类型(1公开 2授权)查询该专利号是否已有公开的pdf
+        //根据专利号和pdf类型(1公开 2授权)查询该专利号是否已有授权的pdf
         List<PatentInstruction> patentInstructions = this.list(new LambdaQueryWrapper<PatentInstruction>().eq(PatentInstruction::getPatentNo, patentNo).eq(PatentInstruction::getType, 2));
         //若有则更新
         if (patentInstructions != null && patentInstructions.size() > 0) {

+ 6 - 0
PAS/src/main/java/cn/cslg/pas/service/upLoadPatent/ExcutePatentDataStar.java

@@ -1027,6 +1027,12 @@ public class ExcutePatentDataStar implements IExcutePatentData {
 
     }
 
+    /**
+     * 根据文件网络url地址下载文件到本地,并返回文件对象
+     *
+     * @param pdfUrl 文件网络url地址(http://....)
+     * @return 返回文件对象fileDTO
+     */
     public UploadFileDTO downLoadPdf(String pdfUrl) throws IOException {
         URL url = new URL(pdfUrl);  //想要读取的url地址
         InputStream in = url.openStream();

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

@@ -393,7 +393,7 @@ public class PantentQueueService {
                         importTaskPatent.setPatentNo(queueData.getUploadParamsVO().getPatent().getPatentNo());
                         importTaskPatent.setReportId(queueData.getTask().getReportId());
                         importTaskPatent.insert();
-                     outInterfaceService.importAssoReportPatentNo(queueData.getTask().getReportId(), queueData.getUploadParamsVO().getPatent().getPatentNo(), queueData.getUploadParamsVO().getPatent().getName(),queueData.getTask().getAsCompare());
+                        outInterfaceService.importAssoReportPatentNo(queueData.getTask().getReportId(), queueData.getUploadParamsVO().getPatent().getPatentNo(), queueData.getUploadParamsVO().getPatent().getName(), queueData.getTask().getAsCompare());
                     }
                     if (queueData.getTask().getPramJson() != null && !queueData.getTask().getPramJson().equals("")) {
                         ProjectImportPatentVO projectImportPatentVO = JsonUtils.jsonToPojo(queueData.getTask().getPramJson(), ProjectImportPatentVO.class);