Browse Source

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
89b821c003
3 changed files with 5 additions and 3 deletions
  1. +3
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java
  2. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspServiceImpl.java
  3. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/StopAIService.java

+ 3
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java View File

@@ -1,5 +1,6 @@
package com.tuoheng.admin.service.third.dsp;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.RandomUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
@@ -79,7 +80,7 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>()
.eq(Inspection::getId, inspectionId)
.eq(Inspection::getTenantId, business.getTenantId()));
if (inspection == null) {
if (ObjectUtil.isNull(inspection)) {
log.info("巡检任务不存在");
throw new ServiceException(0, "巡检任务不存在");
}
@@ -137,6 +138,7 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
if (!CollectionUtils.isEmpty(questionFiles)) {
log.info("问题图片处理开始, 图片数量:{}", questionFiles.size());
// 坐标
log.info("任务是否实时, isLive:{}", inspection.getIsLive());
boolean online_condition = AiAnalyseTypeEnum.ONLINE.getCode() == inspection.getIsLive();
boolean offline_condition = AiAnalyseTypeEnum.OFFLINE.getCode() == inspection.getIsLive();
log.info("在线:{}, 离线:{}", online_condition, offline_condition);

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspServiceImpl.java View File

@@ -49,7 +49,7 @@ public class DspServiceImpl implements IDspService {

@Override
public JSONObject serviceStopApplication(JSONObject jsonObject) {
String url = dspDomainUrl + "api/web/serviceInst/"+jsonObject.getString("requestId")+"/stop";
String url = dspDomainUrl + "/api/web/serviceInst/"+jsonObject.getString("requestId")+"/stop";
String result = HttpUtils.doSend(url, jsonObject, null,"PUT");
return JSONObject.parseObject(result);
}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/StopAIService.java View File

@@ -61,7 +61,7 @@ public class StopAIService {
}

private JSONObject serviceStopApplication(JSONObject jsonObject) {
String url = dspDomainUrl + "api/web/serviceInst/" + jsonObject.getString("requestId") + "/stop";
String url = dspDomainUrl + "/api/web/serviceInst/" + jsonObject.getString("requestId") + "/stop";
log.info("硬件停止后,停止AI分析,调用dsp url:{}", url);
String result = HttpUtils.doSend(url, jsonObject, null, "PUT");
log.info("硬件停止后,停止AI分析,调用dsp result:{}", result);

Loading…
Cancel
Save