|
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
+
|
|
|
import java.io.IOException;
|
|
|
import java.text.ParseException;
|
|
|
import java.util.*;
|
|
@@ -34,8 +35,8 @@ public class TaskController {
|
|
|
|
|
|
@RequestMapping(value = "/addTask", method = RequestMethod.POST)
|
|
|
@Operation(summary = "新增审核任务")
|
|
|
- public String addTask( String taskVO,List<MultipartFile> files) throws ParseException, IOException {
|
|
|
- return taskService.addTask(taskVO,files);
|
|
|
+ public String addTask(String taskVO, List<MultipartFile> files) throws ParseException, IOException {
|
|
|
+ return taskService.addTask(taskVO, files);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/deleteTask", method = RequestMethod.POST)
|
|
@@ -78,20 +79,20 @@ public class TaskController {
|
|
|
@RequestMapping(value = "/reTaskPatents", method = RequestMethod.POST)
|
|
|
@Operation(summary = "返回任务专利清单")
|
|
|
public String reTaskPatents(@RequestBody PatentVO patentVO) throws ParseException, IOException {
|
|
|
- return taskService.reTaskPatents1(patentVO);
|
|
|
+ return taskService.reTaskPatents1(patentVO);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/reTaskStateCount", method = RequestMethod.GET)
|
|
|
@Operation(summary = "返回任务专利状态的数量")
|
|
|
- public String reTaskStateCount(Integer reportId,Integer taskId) throws ParseException, IOException {
|
|
|
- return Response.success(taskService.reTaskStateCount(reportId,taskId));
|
|
|
+ public String reTaskStateCount(Integer reportId, Integer taskId) throws ParseException, IOException {
|
|
|
+ return Response.success(taskService.reTaskStateCount(reportId, taskId));
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/import", method = RequestMethod.POST)
|
|
|
@Operation(summary = "导入")
|
|
|
- public String importPatent(MultipartFile file, Integer reportId,Boolean asCompare) throws ParseException, IOException {
|
|
|
- ImportTask importTask =baseService.getImportPatentTaskParamsBro(file, reportId);
|
|
|
- baseService.uploadToPCS(importTask,asCompare);
|
|
|
+ public String importPatent(MultipartFile file, Integer reportId, Boolean asCompare) throws ParseException, IOException {
|
|
|
+ ImportTask importTask = baseService.getImportPatentTaskParamsBro(file, reportId);
|
|
|
+ baseService.uploadToPCS(importTask, asCompare);
|
|
|
//解析file装载数据
|
|
|
return Response.success(importTask);
|
|
|
}
|
|
@@ -99,17 +100,16 @@ public class TaskController {
|
|
|
@RequestMapping(value = "/import/delete", method = RequestMethod.GET)
|
|
|
@Operation(summary = "删除导入记录")
|
|
|
public String importPatent(int id) throws ParseException, IOException {
|
|
|
- Boolean flag = importTaskService.delImportTask(id);
|
|
|
- if(flag) {
|
|
|
- return Response.success();
|
|
|
- }
|
|
|
+ Boolean flag = importTaskService.delImportTask(id);
|
|
|
+ if (flag) {
|
|
|
+ return Response.success();
|
|
|
+ }
|
|
|
return Response.error();
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/reImportTask", method = RequestMethod.POST)
|
|
|
@Operation(summary = "根据报告Id和状态返回导入任务列表")
|
|
|
public String reImportTask(@RequestBody ImportTask importTask) {
|
|
|
-
|
|
|
return importTaskService.reImportTask(importTask);
|
|
|
}
|
|
|
|
|
@@ -122,25 +122,25 @@ public class TaskController {
|
|
|
@RequestMapping(value = "/reviewTheTasks", method = RequestMethod.POST)
|
|
|
@Operation(summary = "查看任务")
|
|
|
public String ReviewTheTasks(@RequestBody TaskTDO taskVO) throws IOException {
|
|
|
- return taskService.ReviewTheTasks(taskVO) ;
|
|
|
+ return taskService.ReviewTheTasks(taskVO);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/progress", method = RequestMethod.GET)
|
|
|
@Operation(summary = "任务进度")
|
|
|
- public String progress(int id){
|
|
|
- return Response.success (taskService.reCount(id));
|
|
|
+ public String progress(int id) {
|
|
|
+ return Response.success(taskService.reCount(id));
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/read", method = RequestMethod.GET)
|
|
|
@Operation(summary = "未读变成已读")
|
|
|
- public String read(int taskID,String patentNo ,Integer reportId){
|
|
|
- return taskService.read(taskID,patentNo, reportId);
|
|
|
+ public String read(int taskID, String patentNo, Integer reportId) {
|
|
|
+ return taskService.read(taskID, patentNo, reportId);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/look", method = RequestMethod.GET)
|
|
|
@Operation(summary = "查看某个专利的状态")
|
|
|
- public String look(int taskID,String patentNo,Integer reportId){
|
|
|
- return taskService.look(taskID,patentNo,reportId);
|
|
|
+ public String look(int taskID, String patentNo, Integer reportId) {
|
|
|
+ return taskService.look(taskID, patentNo, reportId);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/addSyneryTask", method = RequestMethod.POST)
|
|
@@ -151,7 +151,7 @@ public class TaskController {
|
|
|
|
|
|
@RequestMapping(value = "/getTaskSources", method = RequestMethod.GET)
|
|
|
@Operation(summary = "获得任务过滤条件列表")
|
|
|
- public String getTaskSources(Integer reportId) throws IOException {
|
|
|
+ public String getTaskSources(Integer reportId) throws IOException {
|
|
|
return Response.success(taskService.getTaskSources(reportId));
|
|
|
}
|
|
|
}
|