|
@@ -259,8 +259,18 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
|
|
startToInfraredTask.setBizId(toInfrared.getId());
|
|
startToInfraredTask.setBizId(toInfrared.getId());
|
|
|
|
|
|
startToInfraredTask.setOtherParams(algorithmConfigTrack.getParameterConfig());
|
|
startToInfraredTask.setOtherParams(algorithmConfigTrack.getParameterConfig());
|
|
- startToInfraredTask.setSource_dir(toInfrared.getInputPath());
|
|
|
|
- startToInfraredTask.setResult_dir(toInfrared.getOutputPath());
|
|
|
|
|
|
+
|
|
|
|
+ String osName = System.getProperty("os.name");
|
|
|
|
+ if (osName.toLowerCase().contains("windows")) {
|
|
|
|
+ startToInfraredTask.setSource_dir("C://" + toInfrared.getInputPath());
|
|
|
|
+ startToInfraredTask.setResult_dir("C://" + toInfrared.getOutputPath());
|
|
|
|
+ } else {
|
|
|
|
+ startToInfraredTask.setSource_dir(toInfrared.getInputPath());
|
|
|
|
+ startToInfraredTask.setResult_dir(toInfrared.getOutputPath());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // startToInfraredTask.setSource_dir(toInfrared.getInputPath());
|
|
|
|
+ // startToInfraredTask.setResult_dir(toInfrared.getOutputPath());
|
|
|
|
|
|
if (algorithmConfigTrack.getType() == BizConstant.AlgorithmType.REASONING) {
|
|
if (algorithmConfigTrack.getType() == BizConstant.AlgorithmType.REASONING) {
|
|
startToInfraredTask.setModel_path(algorithmModelTrack.getModelAddress());
|
|
startToInfraredTask.setModel_path(algorithmModelTrack.getModelAddress());
|
|
@@ -287,7 +297,7 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
|
|
if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
|
|
if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
|
|
toInfrared.setStatus(BizConstant.VideoStatus.INTERRUPTED);
|
|
toInfrared.setStatus(BizConstant.VideoStatus.INTERRUPTED);
|
|
updateById(toInfrared);
|
|
updateById(toInfrared);
|
|
- return CommonResult.fail("终止任务成功");
|
|
|
|
|
|
+ return CommonResult.success("终止任务成功");
|
|
} else {
|
|
} else {
|
|
return CommonResult.fail("终止任务失败");
|
|
return CommonResult.fail("终止任务失败");
|
|
}
|
|
}
|
|
@@ -321,6 +331,11 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
|
|
String outputPath = toInfrared.getOutputPath();
|
|
String outputPath = toInfrared.getOutputPath();
|
|
String zipFilePath = outputPath + ".zip";
|
|
String zipFilePath = outputPath + ".zip";
|
|
|
|
|
|
|
|
+ String osName = System.getProperty("os.name");
|
|
|
|
+ if (osName.toLowerCase().contains("windows")) {
|
|
|
|
+ zipFilePath = "C://" + zipFilePath;
|
|
|
|
+ }
|
|
|
|
+
|
|
try {
|
|
try {
|
|
ZipUtils.zipFolderFiles(outputPath, zipFilePath);
|
|
ZipUtils.zipFolderFiles(outputPath, zipFilePath);
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|