|
@@ -14,8 +14,6 @@ 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.bo.ToInfraredStartResultBo;
|
|
|
-import com.taais.biz.domain.bo.VideoStableStartResultBo;
|
|
|
import com.taais.biz.domain.vo.StartToInfraredTask;
|
|
|
import com.taais.biz.domain.vo.ToInfraredVo;
|
|
|
import com.taais.biz.mapper.ToInfraredMapper;
|
|
@@ -32,7 +30,6 @@ import com.taais.common.orm.core.service.impl.BaseServiceImpl;
|
|
|
import com.taais.system.domain.vo.SysOssVo;
|
|
|
import com.taais.system.service.ISysOssService;
|
|
|
import jakarta.annotation.Resource;
|
|
|
-import lombok.extern.log4j.Log4j;
|
|
|
import lombok.extern.log4j.Log4j2;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -46,7 +43,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import static com.taais.biz.constant.BizConstant.VideoStatus.NOT_START;
|
|
|
import static com.taais.biz.domain.table.ToInfraredTableDef.TO_INFRARED;
|
|
|
import static com.taais.biz.service.impl.VideoStableServiceImpl.*;
|
|
|
-import static com.taais.biz.constant.BizConstant.AlgorithmType;
|
|
|
|
|
|
/**
|
|
|
* 可见光转红外Service业务层处理
|
|
@@ -284,20 +280,20 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public CommonResult getResult(ToInfraredStartResultBo toInfraredStartResultBo) {
|
|
|
- Long id = toInfraredStartResultBo.getId();
|
|
|
- String status = toInfraredStartResultBo.getStatus();
|
|
|
- String msg = toInfraredStartResultBo.getMsg();
|
|
|
- ToInfrared toInfrared = getById(id);
|
|
|
- toInfrared.setLog(msg);
|
|
|
- toInfrared.setStatus("200".equals(status) ? BizConstant.VideoStatus.END : BizConstant.VideoStatus.FAILED);
|
|
|
- toInfrared.setEndTime(new Date());
|
|
|
+ public CommonResult getResult(TaskTrackResultBo taskTrackResultBo) {
|
|
|
+ Long id = taskTrackResultBo.getId();
|
|
|
+ String status = taskTrackResultBo.getStatus();
|
|
|
+ String msg = taskTrackResultBo.getMsg();
|
|
|
+ ToInfrared entity = getById(id);
|
|
|
+ entity.setLog(msg);
|
|
|
+ entity.setStatus("200".equals(status) ? BizConstant.VideoStatus.END : BizConstant.VideoStatus.FAILED);
|
|
|
+ entity.setEndTime(new Date());
|
|
|
try {
|
|
|
- toInfrared.setCostSecond((toInfrared.getEndTime().getTime() - toInfrared.getStartTime().getTime()) / 1000);
|
|
|
+ entity.setCostSecond((entity.getEndTime().getTime() - entity.getStartTime().getTime()) / 1000);
|
|
|
} catch (Exception e) {
|
|
|
- toInfrared.setCostSecond(null);
|
|
|
+ entity.setCostSecond(null);
|
|
|
}
|
|
|
- updateById(toInfrared);
|
|
|
+ updateById(entity);
|
|
|
return CommonResult.success();
|
|
|
}
|
|
|
|