Browse Source

增加信创调用接口创建任务;修改配置信息,使用mongo获取部分配置项信息

郭超 4 năm trước cách đây
mục cha
commit
d45cff6db4

+ 5 - 1
pom.xml

@@ -191,7 +191,11 @@
             <version>2.1.7</version>
         </dependency>
         <!-- OSS END -->
-
+        <dependency>
+            <groupId>io.github.yedaxia</groupId>
+            <artifactId>japidocs</artifactId>
+            <version>1.4.4</version>
+        </dependency>
 
     </dependencies>
 

+ 21 - 0
src/main/java/com/mooctest/CrowdReviewApplication.java

@@ -1,6 +1,9 @@
 package com.mooctest;
 
 import com.mooctest.util.Doc2VecUtil;
+import io.github.yedaxia.apidocs.Docs;
+import io.github.yedaxia.apidocs.DocsConfig;
+import io.github.yedaxia.apidocs.plugin.markdown.MarkdownDocPlugin;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.builder.SpringApplicationBuilder;
@@ -13,6 +16,24 @@ import org.springframework.scheduling.annotation.EnableAsync;
 @EnableAsync
 public class CrowdReviewApplication extends SpringBootServletInitializer {
     public static void main(String[] args) {
+        String relativelyPath = System.getProperty("user.dir");
+        System.out.println(relativelyPath);
+        // 1. 创建生成文档的配置
+        DocsConfig config= new DocsConfig();
+        // 项目根目录
+        config.setProjectPath(relativelyPath);
+        // 项目名称
+        config.setProjectName("融合系统");
+        // 声明该API的版本
+        config.setApiVersion("V1.0");
+        // 生成API 文档所在目录
+        config.setDocsPath(relativelyPath + "/src/main/resources/apidoc");
+        // 配置自动生成
+        config.setAutoGenerate(Boolean.TRUE);
+        // 使用 MD 插件,额外生成 MD 格式的接口文档
+        config.addPlugin(new MarkdownDocPlugin());
+        // 2. 执行生成 HTML 接口文档
+        Docs.buildHtmlDocs(config);
         SpringApplication.run(CrowdReviewApplication.class, args);
         Doc2VecUtil.loadModel();
     }

+ 14 - 8
src/main/java/com/mooctest/controller/AnalyzeController.java

@@ -1,14 +1,12 @@
 package com.mooctest.controller;
 
 import com.mooctest.service.AnalyzeService;
+import io.github.yedaxia.apidocs.ApiDoc;
 import org.json.JSONArray;
 import org.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.CrossOrigin;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.PrintWriter;
@@ -18,7 +16,10 @@ import java.util.Map;
 
 //import com.mooctest.service.ReportService;
 
-@Controller
+/**
+ * 分析相关接口  /analyze
+ */
+@RestController
 @RequestMapping(value = "/analyze")
 @CrossOrigin(origins = "*", maxAge = 3600, allowCredentials = "true")
 public class AnalyzeController {
@@ -28,9 +29,14 @@ public class AnalyzeController {
 	
 //	@Autowired
 //	ReportService rservice;
-	
-	//根据用例获取所有有效bug
-	@RequestMapping(value = "/valid")
+
+	/**
+	 * 根据用例获取所有有效bug /valid
+	 * @param case_take_id
+	 * @param response
+	 */
+	@ApiDoc
+	@GetMapping(value = "/valid")
 	@ResponseBody
 	public void getValid(String case_take_id, HttpServletResponse response) {
 		try {

+ 48 - 6
src/main/java/com/mooctest/controller/TaskController.java

@@ -5,10 +5,9 @@ import com.alibaba.fastjson.JSONObject;
 import com.mooctest.data.BugDTO;
 import com.mooctest.data.SimpleResponse;
 import com.mooctest.data.TaskDTO;
-import com.mooctest.model.BugData;
-import com.mooctest.model.MasterReport;
-import com.mooctest.model.Task;
+import com.mooctest.model.*;
 import com.mooctest.service.*;
+import com.mooctest.service.impl.ConfigurationService;
 import com.mooctest.util.ImportDataMap;
 import com.mooctest.util.ReportUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,6 +30,9 @@ import java.util.stream.Collectors;
 
 import static java.util.stream.Collectors.toMap;
 
+/**
+ * 任务相关接口
+ */
 @Controller
 public class TaskController {
 
@@ -48,9 +50,13 @@ public class TaskController {
 
     @Autowired
     BugDataService bugDataService;
+
     @Autowired
     JobService jobService;
 
+    @Autowired
+    ConfigurationService configurationService;
+
     @Value("${report.host}")
     String reportHost;
 
@@ -59,6 +65,11 @@ public class TaskController {
     @Value("${urlPath}")
     String urlPrefix;
 
+    /**
+     * 获取任务列表 /crowdTask
+     * @param model
+     * @return
+     */
     @GetMapping("/crowdTask")
     public String home(Model model) {
         // 获得所有taskDTO,包括本地和慕测端
@@ -155,7 +166,9 @@ public class TaskController {
 
         // 从json中获得的task数据保存到TaskDTO中返回
         TaskDTO task = taskService.getByExamIdAndCaseId(examId, caseId);
+        // 返回服务序列号
         String encodedUrl = taskService.getEncodeTaskReportUrl(examId, caseId) ;
+        // 返回大图信息
         model.addAttribute("dtUrl",taskService.getTaskDaPanUrl(examId,caseId));
         model.addAttribute("aggregated", aggregated);
         // allReport是ButDTO集合
@@ -183,7 +196,15 @@ public class TaskController {
     }
 
 
-
+    /**
+     * 添加任务 /addCrowdTask
+     * @param name  任务名称
+     * @param description   任务描述
+     * @param os    任务的操作系统
+     * @param threePage 测试大纲表格
+     * @param model
+     * @return
+     */
     @PostMapping("/addCrowdTask")
     @ResponseBody
     public SimpleResponse addCrowdTask2(@RequestParam("name")String name, @RequestParam("description")String description,
@@ -191,7 +212,28 @@ public class TaskController {
                                         Model model){
         return taskService.addCrowdTask(name, description, os, threePage);
     }
-    
-
 
+    @PostMapping("/addCrowdTaskDefault")
+    @ResponseBody
+    public SimpleResponse addCrowdTaskDefault(@RequestParam("name")String name, @RequestParam("description")String description,
+                                        @RequestParam("threePage") MultipartFile threePage){
+        Map<String, String> configurationMap = configurationService.getConfigurationMap();
+        String os = configurationMap.get("os");
+        // 后边generatePaperType方法中会根据;进行split
+        os = os.replaceAll(",", ";");
+
+        if(threePage ==null || threePage.isEmpty()) {
+            return new SimpleResponse(400,"请提交三级页面");
+        }
+        long caseId = taskService.addCrowdTaskDefault(name, description, os, threePage);
+        long examId = caseId;
+        // 返回服务序列号
+        String encodedUrl = taskService.getEncodeTaskReportUrl(examId, caseId);
+        encodedUrl = encodedUrl.replaceAll("%3D", "=");
+        // 返回大图url
+        String taskDaPanUrl = taskService.getTaskDaPanUrl(examId, caseId);
+        taskDaPanUrl = taskDaPanUrl.replaceAll("%3D", "=");
+        TaskExtend taskExtend = new TaskExtend(examId, caseId, encodedUrl, taskDaPanUrl);
+        return caseId != -1 ? new SimpleResponse(200,"创建成功", taskExtend) : new SimpleResponse(400,"创建失败");
+    }
 }

+ 20 - 65
src/main/java/com/mooctest/controller/advice/ExceptionAdvice.java

@@ -1,7 +1,6 @@
-package com.mooctest.crowd.site.controller.advice;
+package com.mooctest.controller.advice;
 
-import com.mooctest.crowd.domain.exception.*;
-import com.mooctest.crowd.site.constants.ResponseConstant;
+import com.mooctest.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.HttpRequestMethodNotSupportedException;
@@ -23,63 +22,20 @@ public class ExceptionAdvice {
     @ResponseStatus(HttpStatus.BAD_REQUEST)
     public String handleException(Exception e){
         log.error("访问出错:"+e.getMessage(), e);
-        if (e instanceof AccountNotExistException){
-            return ResponseConstant.USER_NOT_EXISTS;
-        } else if (e instanceof NullPointerException){
-            return "操作失败";
-        } else if (e instanceof CrowdTestProjectNotExistException){
-            return "项目不存在";
-        } else if (e instanceof CrowdTestTaskNotExistException){
-            return "任务不存在";
-        } else if (e instanceof CrowdTestReportNotExistException){
-            return "报告不存在";
-        } else if (e instanceof CrowdTestTaskNoPriceException){
-            return "项目未设置价格";
-        } else if (e instanceof PasswordErrorException){
-            return "密码错误";
-        } else if (e instanceof ApplicationTypeNoExistException){
-            return "应用类型不存在";
-        } else if (e instanceof TestTypeNoExistException){
-            return "服务类型不存在";
-        } else if (e instanceof ApplicationTypeToTestTypeNoExistException){
-            return "应用类型对应的测试类型不存在";
-        } else if (e instanceof FieldNoExistException){
-            return "领域不存在";
-        } else if (e instanceof ResourceNoExistException){
-            return "资源不存在";
-        } else if (e instanceof UserTaskCountNoExistException) {
-            return "当前用户没有参与接包";
-        } else if (e instanceof HaveNotAgencyAuthException){
-            return "您未认证为接包用户,请认证后操作。";
-        } else if (e instanceof HaveNotPartAuthException){
-            return "您未认证为发包用户,请认证后操作。";
-        } else if(e instanceof CrowdTestEndPointException){
-            return "任务的服务序列号输入有误,不是base64加密后的序列号。";
-        } else if(e instanceof ExportTaskFileNotExistException){
-            return "导出的任务文件不存在。";
-        } else if(e instanceof ExportTaskFileDirectoryNotExistException){
-            return "导出的任务文件所在的文件夹不存在。";
-        } else if(e instanceof FileIsEmptyException){
-            return "文件不存在或文件是空文件,请重新上传。";
-        } else if(e instanceof FileCopyException){
-            return "复制文件错误。";
-        } else if(e instanceof FileDownloadException){
-            return "文件下载失败。";
-        } else if(e instanceof FileUploadFailureException){
-            return "文件上传失败。";
-        } else if(e instanceof IllegalStateUploadException){
-            return "文件上传失败,由于存在部分分片未上传完成。";
-        } else {
-            return e.getMessage();
-        }
+//        if (e instanceof ConfigurationNotExistException){
+//            return "";
+//        } else {
+//            return e.getMessage();
+//        }
+        return "";
     }
 
-    @ExceptionHandler(UnauthorizedException.class)
-    @ResponseStatus(HttpStatus.UNAUTHORIZED)
-    public String handleUnauthorized(UnauthorizedException e){
-        log.info("401:未经认证的请求");
-        return e.getMessage();
-    }
+//    @ExceptionHandler(UnauthorizedException.class)
+//    @ResponseStatus(HttpStatus.UNAUTHORIZED)
+//    public String handleUnauthorized(UnauthorizedException e){
+//        log.info("401:未经认证的请求");
+//        return e.getMessage();
+//    }
 
     @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
     @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)
@@ -93,14 +49,13 @@ public class ExceptionAdvice {
     @ResponseBody
     public String handleSystemException(Exception e){
         log.error("System Error: "+e.getMessage(), e);
-//        return "系统异常 " + e.getMessage();
         return e.getMessage();
     }
 
-    @ExceptionHandler(Excel2ProjectException.class)
-    @ResponseStatus(HttpStatus.BAD_REQUEST)
-    public String handleExcel2ProjectException(Excel2ProjectException e){
-        log.error("Excel表中存在错误:"+e.getErrorLogs());
-        return "Excel表中存在错误:"+ e.getErrorLogs();
-    }
+//    @ExceptionHandler(Excel2ProjectException.class)
+//    @ResponseStatus(HttpStatus.BAD_REQUEST)
+//    public String handleExcel2ProjectException(Excel2ProjectException e){
+//        log.error("Excel表中存在错误:"+e.getErrorLogs());
+//        return "Excel表中存在错误:"+ e.getErrorLogs();
+//    }
 }

+ 9 - 2
src/main/java/com/mooctest/dao/ConfigurationDao.java

@@ -1,9 +1,16 @@
 package com.mooctest.dao;
 
-import com.mooctest.model.ExtendBug;
+import com.mooctest.model.Configuration;
 import com.mooctest.model.Task;
 import org.springframework.data.mongodb.repository.MongoRepository;
 
-public interface TaskDao extends MongoRepository<Task, Long> {
+import java.util.List;
+import java.util.Optional;
+
+public interface ConfigurationDao extends MongoRepository<Configuration, Long> {
+	@Override
+	List<Configuration> findAll();
+
+	Optional<Configuration> findByName(String name);
 }
 

+ 25 - 1
src/main/java/com/mooctest/data/SimpleResponse.java

@@ -1,5 +1,6 @@
 package com.mooctest.data;
 
+import com.mooctest.exception.ServerException;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
@@ -9,7 +10,30 @@ import lombok.NoArgsConstructor;
 @AllArgsConstructor
 @Builder
 @NoArgsConstructor
-public class SimpleResponse {
+public class SimpleResponse<T> {
     private int status;
     private String message;
+    private T data;
+
+
+    public SimpleResponse(int status, String message){
+        this.status = status;
+        this.message = message;
+    }
+
+    public SimpleResponse(int status,T data){
+        this.status = status;
+        this.data = data;
+    }
+
+    public SimpleResponse(ServerException e) {
+        this.status = e.getErrorCode();
+        this.message = e.getError();
+    }
+
+    public SimpleResponse(ServerException e, T data) {
+        this.status = e.getErrorCode();
+        this.message = e.getError();
+        this.data = data;
+    }
 }

+ 7 - 1
src/main/java/com/mooctest/exception/BaseException.java

@@ -1,8 +1,14 @@
 package com.mooctest.exception;
 
+import lombok.NoArgsConstructor;
+
 /**
  * @author guochao
  * @date 2021-05-11 15:48
  */
-public class BaseException {
+@NoArgsConstructor
+public class BaseException extends RuntimeException {
+	public BaseException(String msg) {
+		super(msg);
+	}
 }

+ 1 - 1
src/main/java/com/mooctest/exception/ConfigurationNotExistException.java

@@ -4,5 +4,5 @@ package com.mooctest.exception;
  * @author guochao
  * @date 2021-05-11 15:51
  */
-public class ConfigurationNotExistException {
+public class ConfigurationNotExistException extends BaseException{
 }

+ 1 - 7
src/main/java/com/mooctest/exception/ServerException.java

@@ -1,6 +1,5 @@
-package com.mooctest.crowd.site.exception;
+package com.mooctest.exception;
 
-import com.mooctest.crowd.site.data.response.ServerCode;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -11,9 +10,4 @@ import lombok.NoArgsConstructor;
 public class ServerException extends RuntimeException {
     private int errorCode;
     private String error;
-
-    public ServerException(ServerCode serverCode){
-        this.errorCode = serverCode.getCode();
-        this.error = serverCode.getMsg();
-    }
 }

+ 11 - 29
src/main/java/com/mooctest/model/Configuration.java

@@ -1,5 +1,6 @@
 package com.mooctest.model;
 
+import com.mooctest.annotation.AutoValue;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
@@ -8,42 +9,23 @@ import org.springframework.data.annotation.Id;
 import org.springframework.data.mongodb.core.mapping.Document;
 import org.springframework.data.mongodb.core.mapping.Field;
 
+/**
+ * @author guochao
+ */
 @Data
 @Builder
 @NoArgsConstructor
 @AllArgsConstructor
-@Document(collection = "bug")
-public class Bug {
+@Document(collection = "configuration")
+public class Configuration {
 
     @Id
+    @AutoValue
     private String id;
 
-    @Field("case_take_id")
-    private String caseTakeId;
+    @Field("name")
+    private String name;
 
-    @Field("report_id")
-    private String reportId;
-
-    private String title;
-/**/
-    private String description;
-
-    @Field("img_url")
-    private String imgUrls;
-
-    private short severity;
-
-    private short recurrent;
-
-    @Field("bug_category")
-    private String bugCategory;
-
-    @Field("create_time_millis")
-    private String createTimeMillis;
-
-    @Field("bug_page")
-    private String bugPage;
-
-    @Field("case_id")
-    private String caseId;
+    @Field("value")
+    private String value;
 }

+ 3 - 16
src/main/java/com/mooctest/model/TaskExtend.java

@@ -8,23 +8,10 @@ import org.springframework.data.mongodb.core.mapping.Document;
 @Data
 @AllArgsConstructor
 @NoArgsConstructor
-@Document(collection = "Task")
-public class Task {
+public class TaskExtend {
 
     private long taskId;
     private long caseId;
-    private String name;
-    private String icon;
-    private String version;
-    private int status;
-    private String startTime;
-    private String endTime;
-
-    public Task(long taskId, long caseId, String name) {
-        this.taskId = taskId;
-        this.caseId = caseId;
-        this.name = name;
-    }
-
-
+    private String encodedUrl;
+    private String taskDaPanUrl;
 }

+ 24 - 7
src/main/java/com/mooctest/service/TaskService.java

@@ -10,6 +10,7 @@ import com.mooctest.data.SimpleResponse;
 import com.mooctest.data.TaskDTO;
 import com.mooctest.model.CrowdTask;
 import com.mooctest.model.Task;
+import com.mooctest.service.impl.ConfigurationService;
 import com.mooctest.util.EncodeUtil;
 import com.mooctest.util.TaskUtil;
 import com.mooctest.util.TimeUtil;
@@ -69,8 +70,8 @@ public class TaskService {
     @Autowired
     FileService fileService;
 
-    @Value("${task.info.addr}")
-    String taskInfoAddr;
+    @Autowired
+    ConfigurationService configurationService;
 
     @Value("${task.distribute.url}")
     String distributeUrl;
@@ -80,7 +81,10 @@ public class TaskService {
     private final String HTTP = "http://";
 
 
-    // 获得所有任务
+    /**
+     * 获得所有任务
+     * @return
+     */
     public List<TaskDTO> getAllTasks() {
         // 传统情况下在java代码里访问restful服务,一般使用Apache的HttpClient。不过此种方法使用起来太过繁琐。
         // spring提供了一种简单便捷的模板类来进行操作,这就是RestTemplate。
@@ -90,8 +94,9 @@ public class TaskService {
         List<HttpMessageConverter<?>> list=new ArrayList<HttpMessageConverter<?>>();
         list.add(stringHttpMessageConverter);
         rt.setMessageConverters(list);
-        // 将获得task字符船以json格式解析
-        System.out.println("taskInfoAddr " + taskInfoAddr);
+        // 将获得task字符串以json格式解析
+        String taskInfoAddr = HTTP + reportHost + "/Bug/api/extra/getExamList";
+        System.out.println("taskInfoAddr:" + taskInfoAddr);
         JSONObject tasksJson = JSON.parseObject(rt.getForObject(taskInfoAddr, String.class));
         // 获得tasksJson中的“data”字段的迭代器
         ListIterator<Object> tasksIter = tasksJson.getJSONArray("data").listIterator();
@@ -110,7 +115,6 @@ public class TaskService {
             dtos.add(dto);
         }
 
-
         // return中是给taskDTO各个属性赋值的过程
         return dtos.stream()
                 .map(taskDTO -> {
@@ -286,6 +290,17 @@ public class TaskService {
         }
     }
 
+    public long addCrowdTaskDefault(String name, String description, String os, MultipartFile threePage){
+        String threePageUrl = fileService.uploadFile(threePage);
+        try {
+            long caseId = createCrowdTest(threePageUrl,threePage.getOriginalFilename(),generatePaperType(os),getMaxCaseId()+1,"",description,name);
+            return caseId;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return -1;
+        }
+    }
+
     public long createCrowdTest(String file, String fileName, String paperType, Long caseId, String testType, String description, String appName) throws Exception {
         MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
         params.add("file", file);
@@ -303,7 +318,9 @@ public class TaskService {
         if (responseEntity.getStatusCode().equals(HttpStatus.OK)){
             fileService.uploadJson(responseEntity.getBody(),caseId);
             return caseId;
-        }else return -1;
+        }else {
+            return -1;
+        }
     }
 
     public String getEncodeTaskReportUrl(long examId,long caseId){

+ 10 - 0
src/main/java/com/mooctest/service/impl/ConfigurationService.java

@@ -1,8 +1,18 @@
 package com.mooctest.service.impl;
 
+import com.mooctest.model.Configuration;
+
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author guochao
  * @date 2021-05-11 11:39
  */
 public interface ConfigurationService {
+	List<Configuration> getConfigurationList();
+
+	Map<String, String> getConfigurationMap();
+
+	String getConfigurationByName(String name);
 }

+ 33 - 2
src/main/java/com/mooctest/service/impl/ConfigurationServiceImpl.java

@@ -1,13 +1,44 @@
 package com.mooctest.service.impl;
 
+import com.mooctest.annotation.AutoValue;
+import com.mooctest.dao.ConfigurationDao;
 import com.mooctest.model.Configuration;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.dao.ConcurrencyFailureException;
+import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.stream.Collectors;
 
 /**
  * @author guochao
  * @date 2021-05-11 11:39
  */
-public interface ConfigurationService {
-	List<Configuration> getAllConfiguration();
+@Service
+public class ConfigurationServiceImpl implements ConfigurationService{
+	@Autowired
+	private ConfigurationDao configurationDao;
+
+	@Override
+	public List<Configuration> getConfigurationList() {
+		return configurationDao.findAll();
+	}
+
+	@Override
+	public Map<String, String> getConfigurationMap() {
+		return configurationDao.findAll().stream().collect(Collectors.toMap(configuration -> configuration.getName(), configuration -> configuration.getValue()));
+	}
+
+	@Override
+	public String getConfigurationByName(String name) {
+		Optional<Configuration> configurationOptional = configurationDao.findByName(name);
+		if(!configurationOptional.isPresent()){
+			throw new ConcurrencyFailureException(name + "配置不存在");
+		}else{
+			return configurationOptional.get().getValue();
+		}
+	}
+
 }

+ 6 - 1
src/main/java/com/mooctest/service/impl/OssFileService.java

@@ -31,7 +31,12 @@ public class OssFileService implements FileService {
             write.write(content);
             write.flush();
             write.close();
-            return OSSClientUtil.uploadSingleFile(saveFile);
+            String fileOssUrl = OSSClientUtil.uploadSingleFile(saveFile);
+            if(fileOssUrl != null && !fileOssUrl.equals("")){
+                saveFile.delete();
+            }
+
+            return fileOssUrl;
         } catch (IOException e) {
             e.printStackTrace();
             return null;

+ 2 - 2
src/main/java/com/mooctest/util/Doc2VecUtil.java

@@ -16,8 +16,8 @@ public class Doc2VecUtil {
                 if (docVectorModel == null) {
                     try {
 //                        docVectorModel = new DocVectorModel(new WordVectorModel("D:\\work\\project\\yanbaoronghe\\data\\sgns.wiki.word"));
-//                        docVectorModel = new DocVectorModel(new  WordVectorModel("/Users/insomnialee/Desktop/sgns.wiki.word"));
-                        docVectorModel = new DocVectorModel(new  WordVectorModel("/project/sgns.wiki.word"));
+                        docVectorModel = new DocVectorModel(new  WordVectorModel("/Users/guochao/Desktop/project/data/sgns.wiki.word"));
+//                        docVectorModel = new DocVectorModel(new  WordVectorModel("/project/sgns.wiki.word"));
                     } catch (IOException e) {
                         e.printStackTrace();
                     }

+ 1 - 1
src/main/resources/templates/task_list.html

@@ -94,7 +94,7 @@
                         <td><b><a th:href="'/task_detail?examId=' + ${task.examId} + '&amp;caseId=' + ${task.caseId}" id="task-name" th:text="${task.name}">{{ task.name }}</a></b></td>
                         <!--<td th:text="${task.version}"></td>-->
                         <td th:if="${task.numOfUndeal > 0}"><span  class="label label-info">审核中</span></td>
-                        <td th:if="${task.numOfUndeal == 0}"><span  class="label label-success">审核结束</span></td>
+                        <td th:if="${task.numOfUndeal == 0}"><span  class="label label-success">未开始</span></td>
                         <!--<td th:text="${task.startTime}">{{ task.print_start_time }}</td>-->
                         <!--<td th:text="${task.endTime}">{{ task.print_end_time }}</td>-->
                         <td style="width: 200px;">