|
@@ -7,6 +7,7 @@ import cn.sagacloud.server.algorithm.models.dataCheck.*
|
|
import cn.sagacloud.server.algorithm.models.entities.Project
|
|
import cn.sagacloud.server.algorithm.models.entities.Project
|
|
import cn.sagacloud.server.algorithm.models.modelFile.*
|
|
import cn.sagacloud.server.algorithm.models.modelFile.*
|
|
import cn.sagacloud.server.algorithm.services.endpoint.ReportService
|
|
import cn.sagacloud.server.algorithm.services.endpoint.ReportService
|
|
|
|
+import cn.sagacloud.service.TaskServiceRequest
|
|
import com.alibaba.fastjson.JSON
|
|
import com.alibaba.fastjson.JSON
|
|
import com.alibaba.fastjson.JSONArray
|
|
import com.alibaba.fastjson.JSONArray
|
|
import com.alibaba.fastjson.JSONObject
|
|
import com.alibaba.fastjson.JSONObject
|
|
@@ -30,7 +31,7 @@ class TaskService {
|
|
|
|
|
|
// var taskRequest = TaskRequest()
|
|
// var taskRequest = TaskRequest()
|
|
@Autowired
|
|
@Autowired
|
|
- private lateinit var taskRequest: TaskRequest
|
|
|
|
|
|
+ private lateinit var taskServiceRequest: TaskServiceRequest
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private lateinit var reportService: ReportService
|
|
private lateinit var reportService: ReportService
|
|
@@ -72,7 +73,7 @@ class TaskService {
|
|
}
|
|
}
|
|
sb.append("]")
|
|
sb.append("]")
|
|
request.filters = sb.toString()
|
|
request.filters = sb.toString()
|
|
- val response = taskRequest.queryTask(request)
|
|
|
|
|
|
+ val response = taskServiceRequest.queryTask(request)
|
|
if(response.result == "success"){
|
|
if(response.result == "success"){
|
|
return response.content
|
|
return response.content
|
|
}else
|
|
}else
|
|
@@ -87,7 +88,7 @@ class TaskService {
|
|
val sb = StringBuilder()
|
|
val sb = StringBuilder()
|
|
sb.append("TaskId in [\"${taskId}\"]")
|
|
sb.append("TaskId in [\"${taskId}\"]")
|
|
request.filters = sb.toString()
|
|
request.filters = sb.toString()
|
|
- val response = taskRequest.queryTaskResult(request)
|
|
|
|
|
|
+ val response = taskServiceRequest.queryTaskResult(request)
|
|
if(response.result == "success"){
|
|
if(response.result == "success"){
|
|
try {
|
|
try {
|
|
return response.content?.get(0)!!.content
|
|
return response.content?.get(0)!!.content
|
|
@@ -124,7 +125,7 @@ class TaskService {
|
|
request.content!!.add(download)
|
|
request.content!!.add(download)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- val response = taskRequest.createDownload(request)
|
|
|
|
|
|
+ val response = taskServiceRequest.createDownload(request)
|
|
return response.result == "success"
|
|
return response.result == "success"
|
|
}
|
|
}
|
|
|
|
|
|
@@ -167,7 +168,7 @@ class TaskService {
|
|
request.content = ArrayList()
|
|
request.content = ArrayList()
|
|
request.content!!.add(task)
|
|
request.content!!.add(task)
|
|
}
|
|
}
|
|
- val response = taskRequest.createTask(request)
|
|
|
|
|
|
+ val response = taskServiceRequest.createTask(request)
|
|
val map = HashMap<String, String>() // modelId --> 调度器taskId
|
|
val map = HashMap<String, String>() // modelId --> 调度器taskId
|
|
val resultMap = HashMap<String, TaskEntity>()
|
|
val resultMap = HashMap<String, TaskEntity>()
|
|
if(response!!.entityList != null && response.entityList!!.isNotEmpty()){
|
|
if(response!!.entityList != null && response.entityList!!.isNotEmpty()){
|