|
@@ -4,6 +4,7 @@ import java.io.File;
|
|
|
import java.util.*;
|
|
|
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.taais.biz.constant.BizConstant;
|
|
|
import com.taais.biz.domain.ObjectTraceMerge;
|
|
@@ -125,9 +126,10 @@ public class ObjectTraceMergeController extends BaseController {
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
params.put("bizType", TYPE_OBJ_TRACE);
|
|
|
params.put("bizId", String.valueOf(vo.getId()));
|
|
|
- params.put("logPath", vo.getResultPath() + "/log.log");
|
|
|
+ params.put("logPath", vo.getResultPath());
|
|
|
params.put("sourcePath", vo.getPreprocessPath());
|
|
|
params.put("resultPath", vo.getResultPath());
|
|
|
+ params.put("otherParams", new JSONObject().toString());
|
|
|
|
|
|
try {
|
|
|
String res = HttpUtil.post(MULTI_OBJ_TRACE_URL, JSONUtil.toJsonStr(params));
|
|
@@ -150,17 +152,24 @@ public class ObjectTraceMergeController extends BaseController {
|
|
|
if (bo == null) {
|
|
|
return CommonResult.fail("无法查找到任务!", new ArrayList<>());
|
|
|
}
|
|
|
- if (!TASK_STATUS_SUCCEED.equals(bo.getStatus())) {
|
|
|
- return CommonResult.fail("任务未成功执行!", new ArrayList<>());
|
|
|
- }
|
|
|
+// if (!TASK_STATUS_SUCCEED.equals(bo.getStatus())) {
|
|
|
+// return CommonResult.fail("任务未成功执行!", new ArrayList<>());
|
|
|
+// }
|
|
|
try {
|
|
|
String res = bo.getResultPath();
|
|
|
File dir = new File(res);
|
|
|
File[] files = dir.listFiles();
|
|
|
List<String> resList = new ArrayList<>();
|
|
|
+ int maxNum = -1;
|
|
|
for (File _file: files) {
|
|
|
- resList.add(_file.getName());
|
|
|
+ if (_file.getName().contains("number")) {
|
|
|
+ maxNum = Math.max(maxNum, Integer.parseInt(_file.getName()
|
|
|
+ .replace("number", "")
|
|
|
+ .replace(".png", "")
|
|
|
+ ));
|
|
|
+ }
|
|
|
}
|
|
|
+ resList.add(String.valueOf(maxNum));
|
|
|
return CommonResult.success(resList);
|
|
|
} catch (Exception e) {
|
|
|
return CommonResult.fail("查找结果失败!", new ArrayList<>());
|