Explorar el Código

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into develop

tags/v1.0.1^2
chengwang hace 1 año
padre
commit
b6c1b7fa1a
Se han modificado 4 ficheros con 41 adiciones y 26 borrados
  1. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspectionfile/QueryInspectionFileDistributionListRequest.java
  2. +10
    -7
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/LiveHandle.java
  3. +28
    -16
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java
  4. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionFileMapper.xml

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspectionfile/QueryInspectionFileDistributionListRequest.java Ver fichero

@@ -15,9 +15,9 @@ import java.util.List;
public class QueryInspectionFileDistributionListRequest {

/**
* 任务名称
* 关键字,匹配任务编号和任务名称
*/
private String inspectionName;
private String key;

/**
* 问题编号

+ 10
- 7
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/LiveHandle.java Ver fichero

@@ -23,7 +23,9 @@ public class LiveHandle implements GenerateInspectionFieldHander {
*
* 直播:
* 1)、处于任务飞行中状态时显示直播
* 1)、飞手值飞,创建任务时选择不直播的任务,无此按钮
* 2)、机场巡逻,飞行中的任务,显示【直播】按钮
* 3)、飞手值飞,创建任务时选择不直播的任务,无【直播】按钮
*
*
* @param inspectionVo
*/
@@ -36,17 +38,18 @@ public class LiveHandle implements GenerateInspectionFieldHander {
}
return;
}
if (InspectionTypeEnum.MABNNEDFLIGHT.getCode() != inspectionVo.getInspectionType()) {
if (InspectionTypeEnum.AIRPORT.getCode() == inspectionVo.getInspectionType()) {
inspectionVo.setLive(true);
} else if (InspectionTypeEnum.MABNNEDFLIGHT.getCode() == inspectionVo.getInspectionType()) {
if (null != inspectionVo.getIsLive() && 1 == inspectionVo.getIsLive()) {
inspectionVo.setLive(true);
}
} else {
if (null != handler) {
handler.handler(user, dept, inspectionVo);
}
return;
}

if (null != inspectionVo.getIsLive() && 1 == inspectionVo.getIsLive()) {
inspectionVo.setLive(true);
}

if (null != handler) {
handler.handler(user, dept, inspectionVo);
}

+ 28
- 16
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java Ver fichero

@@ -7,7 +7,10 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.admin.entity.*;
import com.tuoheng.admin.enums.*;
import com.tuoheng.admin.enums.AiAnalyseTypeEnum;
import com.tuoheng.admin.enums.FileTypeEnum;
import com.tuoheng.admin.enums.InspectionFileStatusEnum;
import com.tuoheng.admin.enums.SourceEnum;
import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.request.third.DspCallbackRequest;
import com.tuoheng.admin.request.third.QuestionFile;
@@ -163,7 +166,7 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
inspectionFile.setQuestionCode(questionFile.getQuestionCode());
//问题id
//根据questionCode查询问题类型表出对应的id值
if(StringUtils.isNotEmpty(questionFile.getQuestionCode())){
if (StringUtils.isNotEmpty(questionFile.getQuestionCode())) {
QuestionType questionType = questionTypeMapper.selectOne(Wrappers.<QuestionType>lambdaQuery()
.eq(QuestionType::getCode, questionFile.getQuestionCode())
.eq(QuestionType::getMark, 1));
@@ -211,15 +214,20 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
int second = Integer.parseInt(startFrame) / 25;
long shootTime = inspection.getExecutionStartTime().getTime() + second;
FlightData flightData_off = getFlightDataByTime(flightDataList, shootTime);
if (ObjectUtil.isNotNull(flightData_off)) {
inspectionFile.setLongitude(flightData_off.getLng());
inspectionFile.setLatitude(flightData_off.getLat());
}
JSONObject gaodeCoordinateOff = GaodeUtil.getGaodeCoordinate(flightData_off.getLng(), flightData_off.getLat());
inspectionFile.setLongitude(flightData_off.getLng());
inspectionFile.setLatitude(flightData_off.getLat());
inspectionFile.setGaodeLongitude(gaodeCoordinateOff.getString("longitude"));
inspectionFile.setGaodeLatitude(gaodeCoordinateOff.getString("latitude"));
if (ObjectUtil.isNotNull(gaodeCoordinateOff)) {
inspectionFile.setGaodeLongitude(gaodeCoordinateOff.getString("longitude"));
inspectionFile.setGaodeLatitude(gaodeCoordinateOff.getString("latitude"));
}
String gaodeAddressOff = GaodeUtil.getGaodeAddress(gaodeCoordinateOff.getString("longitude"), gaodeCoordinateOff.getString("latitude"));
inspectionFile.setLocation(gaodeAddressOff);
inspectionFile.setGaodeAddress(gaodeAddressOff);

if (ObjectUtil.isNotNull(gaodeAddressOff)) {
inspectionFile.setLocation(gaodeAddressOff);
inspectionFile.setGaodeAddress(gaodeAddressOff);
}
}
if (online_condition) {
// 实时直播处理
@@ -227,13 +235,17 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
// long time = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, questionFile.getAnalyseTime()).getTime();
FlightData flightData_live = getFlightDataByTime(flightDataList, questionFile.getAnalyseTime().getTime());
log.info("实时坐标:{}", JacksonUtil.obj2StringPretty(flightData_live));
inspectionFile.setLatitude(flightData_live.getLat());
inspectionFile.setLongitude(flightData_live.getLng());
inspectionFile.setGaodeLatitude(flightData_live.getLat());
inspectionFile.setGaodeLongitude(flightData_live.getLng());
if (ObjectUtil.isNotNull(flightData_live)) {
inspectionFile.setLatitude(flightData_live.getLat());
inspectionFile.setLongitude(flightData_live.getLng());
inspectionFile.setGaodeLatitude(flightData_live.getLat());
inspectionFile.setGaodeLongitude(flightData_live.getLng());
}
String gaodeAddress_live = GaodeUtil.getGaodeAddress(flightData_live.getLng(), flightData_live.getLat());
inspectionFile.setLocation(gaodeAddress_live);
inspectionFile.setGaodeAddress(gaodeAddress_live);
if (ObjectUtil.isNotNull(gaodeAddress_live)) {
inspectionFile.setLocation(gaodeAddress_live);
inspectionFile.setGaodeAddress(gaodeAddress_live);
}
}
return inspectionFile;
}).collect(Collectors.toList());
@@ -255,7 +267,6 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
if (CollectionUtils.isEmpty(flightDataList)) {
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "获取无人机飞行坐标失败!");
}

List<FlightData> flightData = flightDataList.stream().filter(data -> {
try {
return Long.valueOf(data.getTimestamp()) <= time;
@@ -270,4 +281,5 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
}
return flightData.get(0);
}

}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionFileMapper.xml Ver fichero

@@ -234,7 +234,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join th_inspection ti on tif.inspection_id = ti.id
<where>
<if test="1 == 1"> and tif.mark = 1 </if>
<if test="request.inspectionName != null and request.inspectionName != ''"> and ti.name like concat('%', #{request.inspectionName}, '%') </if>
<if test="request.key != null and request.key != ''"> and (ti.code like concat('%', #{request.key}, '%') or ti.name like concat('%', #{request.key}, '%')) </if>
<if test="request.tenantId != null and request.tenantId != ''"> and tif.tenant_id = #{request.tenantId} </if>
<if test="request.questionCode != null and request.questionCode != ''"> and tif.question_code = #{request.questionCode} </if>
<if test="request.status != null">

Cargando…
Cancelar
Guardar