Browse Source

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

# Conflicts:
#	src/main/java/com/example/demo/controller/AssoTaskPersonelController.java
#	src/main/java/com/example/demo/service/UploadFromWebService.java
lwhhszx 2 years ago
parent
commit
2973a2ad81

+ 15 - 22
src/main/java/com/example/demo/controller/AssoTaskPersonelController.java

@@ -1,35 +1,24 @@
 package com.example.demo.controller;
 
-import com.alibaba.fastjson.JSONObject;
 import com.example.demo.base.Constants;
 import com.example.demo.domain.PatentCell;
-import com.example.demo.domain.UploadFileDTO;
-import com.example.demo.service.OutInterfaceService;
 import com.example.demo.service.UploadFromWebService;
 import com.example.demo.util.FileUtils;
-import com.example.demo.util.Response;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.RequiredArgsConstructor;
-import org.openqa.selenium.By;
 import org.openqa.selenium.JavascriptExecutor;
 import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
 import org.openqa.selenium.chrome.ChromeDriver;
-import org.openqa.selenium.chrome.ChromeOptions;
-import org.openqa.selenium.interactions.Actions;
-import org.openqa.selenium.support.ui.ExpectedConditions;
-import org.openqa.selenium.support.ui.WebDriverWait;
-import org.quartz.SchedulerException;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Set;
-import java.util.concurrent.TimeUnit;
 
 @Tag(name = "任务人员操作")
 @RestController
@@ -38,16 +27,20 @@ import java.util.concurrent.TimeUnit;
 public class AssoTaskPersonelController {
     private final FileUtils fileUtils;
     private final UploadFromWebService uploadFromWebService;
+
     @GetMapping("/getStar")
-    public List<PatentCell> getPatentStar(String conditions,Integer id) throws Exception {
-        return uploadFromWebService.getPatentStar(conditions,id);
+    public List<PatentCell> getPatentStar(String conditions, Integer id) throws Exception {
+        List<PatentCell> patentData = null;
+        if (id == 1) {
+            patentData = uploadFromWebService.getPatentStar(conditions, id);
+        } else if (id == 2) {
+            patentData = uploadFromWebService.getHeXiang(conditions, id);
+        } else if (id == 3) {
+            //patentData = uploadFromWebService.getPatentya();
+        }
+        return patentData;
     }
 
-    @GetMapping("/format")
-    public String format(String  condition) throws InterruptedException, SchedulerException, IOException {
-       return uploadFromWebService.formatConditions(condition);
-
-    }
 
     @GetMapping("/getPartClient")
     @Operation(summary = "分页获取对比专利")

+ 12 - 13
src/main/java/com/example/demo/service/WebConfigService.java

@@ -9,20 +9,19 @@ import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
 /**
-* @author admin
-* @description 针对表【web_config(网站配置)】的数据库操作Service实现
-* @createDate 2023-03-08 18:51:17
-*/
+ * @author admin
+ * @description 针对表【web_config(网站配置)】的数据库操作Service实现
+ * @createDate 2023-03-08 18:51:17
+ */
 @Service
 @RequiredArgsConstructor(onConstructor_ = {@Lazy})
-public class WebConfigService extends ServiceImpl<WebConfigMapper, WebConfig>
-  {
-     public WebConfig getConfigById(Integer id){
-       WebConfig webConfig = this.getById(id);
-       if(webConfig !=null){
-         return webConfig;
-       }
-       return new WebConfig();
-  }
+public class WebConfigService extends ServiceImpl<WebConfigMapper, WebConfig> {
+    public WebConfig getConfigById(Integer id) {
+        WebConfig webConfig = this.getById(id);
+        if (webConfig != null) {
+            return webConfig;
+        }
+        return new WebConfig();
+    }
 
 }