|
@@ -14,6 +14,8 @@ import com.taais.biz.constant.BizConstant;
|
|
|
import com.taais.biz.domain.*;
|
|
|
import com.taais.biz.domain.ToInfrared;
|
|
|
import com.taais.biz.domain.bo.ToInfraredBo;
|
|
|
+import com.taais.biz.domain.vo.AlgorithmConfigTrackVo;
|
|
|
+import com.taais.biz.domain.vo.AlgorithmModelTrackVo;
|
|
|
import com.taais.biz.domain.vo.StartToInfraredTask;
|
|
|
import com.taais.biz.domain.vo.ToInfraredVo;
|
|
|
import com.taais.biz.mapper.ToInfraredMapper;
|
|
@@ -133,6 +135,15 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
|
|
|
public PageResult<ToInfraredVo> selectPage(ToInfraredBo toInfraredBo) {
|
|
|
QueryWrapper queryWrapper = buildQueryWrapper(toInfraredBo);
|
|
|
Page<ToInfraredVo> page = this.pageAs(PageQuery.build(), queryWrapper, ToInfraredVo.class);
|
|
|
+ page.getRecords().forEach(entity -> {
|
|
|
+ Long modelId = entity.getAlgorithmModelId();
|
|
|
+ AlgorithmModelTrackVo model = algorithmModelTrackService.selectById(modelId);
|
|
|
+ AlgorithmConfigTrackVo config = algorithmConfigTrackService.selectById(model.getAlgorithmId());
|
|
|
+ entity.setType(config.getType());
|
|
|
+ entity.setSubsystem(config.getSubsystem());
|
|
|
+ entity.setAlgorithmName(config.getAlgorithmName());
|
|
|
+ entity.setModelName(model.getModelName());
|
|
|
+ });
|
|
|
return PageResult.build(page);
|
|
|
}
|
|
|
|
|
@@ -224,8 +235,8 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
|
|
|
String fileName_without_suffix = removeFileExtension(fileName);
|
|
|
|
|
|
Path path = Paths.get(resourcePath);
|
|
|
- Path inputPath = path.resolveSibling(fileName_without_suffix + "_images");
|
|
|
- Path outputPath = path.resolveSibling(fileName_without_suffix + "_to_infrared");
|
|
|
+ Path inputPath = path.resolveSibling(fileName_without_suffix + BizConstant.UNZIP_SUFFIX);
|
|
|
+ Path outputPath = path.resolveSibling(fileName_without_suffix + BizConstant.TO_INFRARED_SUFFIX);
|
|
|
|
|
|
makeDir(inputPath.toString());
|
|
|
makeDir(outputPath.toString());
|
|
@@ -241,17 +252,17 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
|
|
|
AlgorithmConfigTrack algorithmConfigTrack = algorithmConfigTrackService.getById(algorithmModelTrack.getAlgorithmId());
|
|
|
|
|
|
StartToInfraredTask startToInfraredTask = new StartToInfraredTask();
|
|
|
+ startToInfraredTask.setBizType(BizConstant.BizType.TO_INFRARED);
|
|
|
startToInfraredTask.setBizId(toInfrared.getId());
|
|
|
|
|
|
- // if (algorithmConfigTrack.getType() == AlgorithmType.TRAIN) {
|
|
|
- startToInfraredTask.setModel_path(algorithmModelTrack.getModelAddress());
|
|
|
- // }
|
|
|
-
|
|
|
startToInfraredTask.setOtherParams(algorithmConfigTrack.getParameterConfig());
|
|
|
startToInfraredTask.setSource_dir(toInfrared.getInputPath());
|
|
|
startToInfraredTask.setResult_dir(toInfrared.getOutputPath());
|
|
|
|
|
|
- startToInfraredTask.setBizType(BizConstant.BizType.TO_INFRARED);
|
|
|
+ if (algorithmConfigTrack.getType() == BizConstant.AlgorithmType.REASONING) {
|
|
|
+ startToInfraredTask.setModel_path(algorithmModelTrack.getModelAddress());
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
HttpResponseEntity responseEntity = sendPostMsg(algorithmConfigTrack.getAlgorithmAddress(), startToInfraredTask);
|
|
|
if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
|