Parcourir la source

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

pull/101/head
wanjing il y a 10 mois
Parent
révision
b24a44bf59
18 fichiers modifiés avec 265 ajouts et 53 suppressions
  1. +4
    -0
      tuoheng-service/tuoheng-admin/sql/sql_change_v1.0.5.sql
  2. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java
  3. +0
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirportLineController.java
  4. +0
    -10
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Inspection.java
  5. +0
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/inspection/AddInspectionRequest.java
  6. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/airport/AirPortStatusVo.java
  7. +109
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/airport/AirportInfoVo.java
  8. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/airport/AirportLineVo.java
  9. +1
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/AirportLineServiceImpl.java
  10. +0
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/query/inspection/QueryAirportLineByAirportService.java
  11. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/add/AddInspectionService.java
  12. +7
    -7
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionAndAirportStatusService.java
  13. +44
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java
  14. +4
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportService.java
  15. +10
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportServiceImpl.java
  16. +1
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetAirLineListService.java
  17. +75
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetAirportListByAirportIds.java
  18. +2
    -12
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml

+ 4
- 0
tuoheng-service/tuoheng-admin/sql/sql_change_v1.0.5.sql Voir le fichier

@@ -5,3 +5,7 @@ use tuoheng_airmonitor;

-- 任务表
alter table tuoheng_airmonitor.th_inspection add airport_task_id int default 0 not null comment '机场任务ID' after inspection_type;

alter table tuoheng_airmonitor.th_inspection drop column airport_name;
alter table tuoheng_airmonitor.th_inspection drop column inspection_line_name;


+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java Voir le fichier

@@ -95,6 +95,11 @@ public interface SystemConstant {
*/
String API_AIRPORT_STATUS = "/airportInterface/getAirportStatus";

/**
* 机场平台:根据id获取机场信息
*/
String API_AIRPORT_MSG_BY_AIRPORT_ID = "/airportInterface/queryAirportList";

/**
* 机场平台:周期性任务创建/修改
*/

+ 0
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirportLineController.java Voir le fichier

@@ -1,15 +1,11 @@
package com.tuoheng.admin.controller;

import com.tuoheng.admin.entity.request.inspection.AirportLineRequest;
import com.tuoheng.admin.entity.vo.AirportLineVo;
import com.tuoheng.admin.service.airportline.IAirportLineService;
import com.tuoheng.admin.service.third.airport.AirportService;
import com.tuoheng.common.core.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
* 航线前端控制器
*

+ 0
- 10
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Inspection.java Voir le fichier

@@ -68,21 +68,11 @@ public class Inspection extends BaseEntity {
*/
private Integer droneId;

/**
* 巡检机场名称
*/
private String airportName;

/**
* 巡检线路id
*/
private Integer inspectionLine;

/**
* 巡检线路名称
*/
private String inspectionLineName;

/**
* 飞行设备
*/

+ 0
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/inspection/AddInspectionRequest.java Voir le fichier

@@ -46,11 +46,6 @@ public class AddInspectionRequest {
*/
private Integer inspectionLine;

/**
* 巡检线路名称
*/
private String inspectionLineName;

/**
* 巡检方式类型: 1 无人机 2机场巡逻 3 飞手值飞
*/

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/airport/AirPortStatusVO.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/airport/AirPortStatusVo.java Voir le fichier

@@ -14,7 +14,7 @@ import java.io.Serializable;
*/
@NoArgsConstructor
@Data
public class AirPortStatusVO implements Serializable {
public class AirPortStatusVo implements Serializable {

private static final long serialVersionUID = 1L;


+ 109
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/airport/AirportInfoVo.java Voir le fichier

@@ -0,0 +1,109 @@
package com.tuoheng.admin.entity.vo.airport;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* @Author ChengWang
* @Date 2023/7/27
*/
@Data
@NoArgsConstructor
public class AirportInfoVo implements Serializable {

private static final long serialVersionUID = 1L;


/**
* 机场id
*/
private String id;

/**
* 机场代码
*/
private String code;

/**
* 机场名称
*/
private String name;

/**
* 机场图片
*/
private String image;

/**
* 机场外部监控地址
*/
private String externalMonitorUrl;

/**
* 机场外部监控FLV地址
*/
private String flvExternalMonitorUrl;

/**
* 机场内部监控地址
*/
private String internalMonitorUrl;

/**
* 覆盖范围(km)
*/
private String coverage;

/**
* 排序
*/
private Integer sort;

/**
* 备注
*/
private String note;

/**
* 经度
*/
private String longitude;

/**
* 纬度
*/
private String latitude;

/**
* 无人机id
*/
private Integer droneId;

/**
* 无人机名称
*/
private String groundStationUrl;

/**
* 创建人
*/
private String createUser;

/**
* 创建时间
*/
private String createTime;

/**
* 修改人
*/
private String updateUser;

/**
* 修改时间
*/
private String updateTime;

}

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/AirportLineVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/airport/AirportLineVo.java Voir le fichier

@@ -1,4 +1,4 @@
package com.tuoheng.admin.entity.vo;
package com.tuoheng.admin.entity.vo.airport;

import lombok.Data;
import lombok.NoArgsConstructor;

+ 1
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/AirportLineServiceImpl.java Voir le fichier

@@ -2,7 +2,7 @@ package com.tuoheng.admin.service.airportline;

import com.tuoheng.admin.entity.domain.AirportLine;
import com.tuoheng.admin.entity.request.inspection.AirportLineRequest;
import com.tuoheng.admin.entity.vo.AirportLineVo;
import com.tuoheng.admin.entity.vo.airport.AirportLineVo;
import com.tuoheng.admin.mapper.AirportLineMapper;
import com.tuoheng.admin.service.airportline.add.AddAirportLineService;
import com.tuoheng.admin.service.airportline.query.inspection.QueryAirportLineByInspectionIdFactory;
@@ -12,7 +12,6 @@ import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;


+ 0
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/query/inspection/QueryAirportLineByAirportService.java Voir le fichier

@@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONObject;
import com.tuoheng.admin.constant.SystemConstant;
import com.tuoheng.admin.entity.domain.Inspection;
import com.tuoheng.admin.entity.vo.airport.AirPortLineLocationVo;
import com.tuoheng.admin.entity.vo.airport.AirPortStatusVO;
import com.tuoheng.admin.enums.InspectionTypeEnum;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.exception.ServiceException;

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/add/AddInspectionService.java Voir le fichier

@@ -123,7 +123,7 @@ public class AddInspectionService {
return JsonResult.error(AddInspectionCodeEnum.AIRPORT_IS_NULL.getCode(), AddInspectionCodeEnum.AIRPORT_IS_NULL.getMsg());
}

if (null == addInspectionRequest.getInspectionLine() || StringUtils.isEmpty(addInspectionRequest.getInspectionLineName())) {
if (null == addInspectionRequest.getInspectionLine()) {
return JsonResult.error(AddInspectionCodeEnum.INSPECTION_LINE_IS_NULL.getCode(), AddInspectionCodeEnum.INSPECTION_LINE_IS_NULL.getMsg());
}
if(StringUtils.isEmpty(addInspectionRequest.getFlyHeight())){

+ 7
- 7
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionAndAirportStatusService.java Voir le fichier

@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.admin.constant.SystemConstant;
import com.tuoheng.admin.entity.domain.Inspection;
import com.tuoheng.admin.entity.domain.User;
import com.tuoheng.admin.entity.vo.airport.AirPortStatusVO;
import com.tuoheng.admin.entity.vo.airport.AirPortStatusVo;
import com.tuoheng.admin.entity.vo.inspection.InspectionScrollbarVo;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.enums.InspectionTypeEnum;
@@ -63,8 +63,8 @@ public class QueryInspectionAndAirportStatusService {
inspectionVoList.add(vo);
}
//机场状态
Map<Integer, AirPortStatusVO> airPortStatusVOMap = this.getAirPortStatusMap(inspectionList);
AirPortStatusVO airPortStatusVO;
Map<Integer, AirPortStatusVo> airPortStatusVOMap = this.getAirPortStatusMap(inspectionList);
AirPortStatusVo airPortStatusVO;
for (InspectionScrollbarVo inspectionScrollbarVo : inspectionVoList) {
if(ObjectUtil.isNotNull(airPortStatusVOMap)){
airPortStatusVO = airPortStatusVOMap.get(inspectionScrollbarVo.getAirportId());
@@ -78,7 +78,7 @@ public class QueryInspectionAndAirportStatusService {
return JsonResult.success(inspectionVoList);
}

private Map<Integer, AirPortStatusVO> getAirPortStatusMap(List<Inspection> inspectionList) {
private Map<Integer, AirPortStatusVo> getAirPortStatusMap(List<Inspection> inspectionList) {
StringBuffer ids = new StringBuffer();
String airportIds;
Set<Integer> set = new HashSet<>();
@@ -103,9 +103,9 @@ public class QueryInspectionAndAirportStatusService {
}

//List<AirPortStatusVO> airPortStatusVOList = (List<AirPortStatusVO>) jsonResult.getData();
List<AirPortStatusVO> airPortStatusVOList = com.alibaba.fastjson.JSONObject.parseArray(JSONObject.toJSONString(jsonResult.getData()), AirPortStatusVO.class);
Map<Integer,AirPortStatusVO> map = new HashMap<>();
for (AirPortStatusVO airPortStatusVO : airPortStatusVOList) {
List<AirPortStatusVo> airPortStatusVOList = com.alibaba.fastjson.JSONObject.parseArray(JSONObject.toJSONString(jsonResult.getData()), AirPortStatusVo.class);
Map<Integer, AirPortStatusVo> map = new HashMap<>();
for (AirPortStatusVo airPortStatusVO : airPortStatusVOList) {
map.put(airPortStatusVO.getAirportId(),airPortStatusVO);
}
return map;

+ 44
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java Voir le fichier

@@ -1,14 +1,19 @@
package com.tuoheng.admin.service.inspection.query;

import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tuoheng.admin.conver.InspectionConverMapper;
import com.tuoheng.admin.entity.domain.Inspection;
import com.tuoheng.admin.entity.domain.User;
import com.tuoheng.admin.entity.vo.airport.AirportInfoVo;
import com.tuoheng.admin.entity.vo.airport.AirportLineVo;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.mapper.UserMapper;
import com.tuoheng.admin.entity.request.inspection.QueryInspectionPageListRequest;
import com.tuoheng.admin.service.third.airport.AirportService;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.entity.vo.inspection.InspectionVo;
import com.tuoheng.common.core.config.common.CommonConfig;
@@ -19,6 +24,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
* 查询巡检任务分页列表业务层处理
@@ -37,6 +45,8 @@ public class QueryInspectionPageListService {
@Autowired
private InspectionMapper inspectionMapper;

@Autowired
private AirportService airportService;

public JsonResult getPageList(QueryInspectionPageListRequest request) {
// log.info("进入查询巡检任务分页列表业务");
@@ -106,16 +116,27 @@ public class QueryInspectionPageListService {
}

/**
* 1)、查找已确认问题数、发现问题数字段
* 2)、判断是否有操作权限:立即执行、直播、回放、问题详情、问题核实、重新提交
*
* @param user
* @param inspectionList
* @return
*/
private List<InspectionVo> buildIspectionVoList(User user, List<Inspection> inspectionList) {
List<InspectionVo> inspectionVoList = InspectionConverMapper.INSTANCE.fromInspectionListToInspectionVoList(inspectionList);
Map<String, AirportInfoVo> airportMap = this.getAirportMap(inspectionList);
Map<Integer, AirportLineVo> airportLineMap = this.getAirportLineMap(inspectionList);
for (InspectionVo inspectionVo : inspectionVoList) {
//机场名称
if (CollectionUtil.isNotEmpty(airportMap)) {
if (ObjectUtil.isNotEmpty(airportMap.get(String.valueOf(inspectionVo.getAirportId())))) {
inspectionVo.setAirportName(airportMap.get(String.valueOf(inspectionVo.getAirportId())).getName());
}
}
//航线名称
if (CollectionUtil.isNotEmpty(airportLineMap)) {
if (ObjectUtil.isNotEmpty(airportLineMap.get(inspectionVo.getInspectionLine()))) {
inspectionVo.setInspectionLineName(airportLineMap.get(inspectionVo.getInspectionLine()).getFileName());
}
}
if (StringUtils.isNotEmpty(inspectionVo.getAiVideoUrl())) {
inspectionVo.setAiVideoUrl(CommonConfig.videoURL + inspectionVo.getAiVideoUrl());
}
@@ -123,4 +144,24 @@ public class QueryInspectionPageListService {
return inspectionVoList;
}

private Map<String, AirportInfoVo> getAirportMap(List<Inspection> inspectionList) {
List<Integer> airportIdList = inspectionList.stream().map(o -> o.getAirportId()).collect(Collectors.toList());
String airportIds = airportIdList.stream().distinct().map(x -> String.valueOf(x)).collect(Collectors.joining(",", "", ""));
List<AirportInfoVo> airportInfoVoList = airportService.getAirportInfoList(airportIds);
if (CollectionUtil.isEmpty(airportInfoVoList)) {
return null;
}
Map<String, AirportInfoVo> airportMap = airportInfoVoList.stream().collect(Collectors.toMap(AirportInfoVo::getId, Function.identity()));
return airportMap;
}

private Map<Integer, AirportLineVo> getAirportLineMap(List<Inspection> inspectionList) {
List<Integer> airportLineIdList = inspectionList.stream().map(o -> o.getInspectionLine()).collect(Collectors.toList());
List<AirportLineVo> airportLineVoList = airportService.getAirportLineListByAirportIdAndLineIdList(null, airportLineIdList);
if (CollectionUtil.isEmpty(airportLineVoList)) {
return null;
}
Map<Integer, AirportLineVo> airportLineMap = airportLineVoList.stream().collect(Collectors.toMap(AirportLineVo::getId, Function.identity()));
return airportLineMap;
}
}

+ 4
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportService.java Voir le fichier

@@ -3,13 +3,16 @@ package com.tuoheng.admin.service.third.airport;
import com.tuoheng.admin.entity.domain.Inspection;
import com.tuoheng.admin.entity.request.airport.DroneHoverRequest;
import com.tuoheng.admin.entity.request.airport.ReversalFlightRequest;
import com.tuoheng.admin.entity.vo.AirportLineVo;
import com.tuoheng.admin.entity.vo.airport.AirportInfoVo;
import com.tuoheng.admin.entity.vo.airport.AirportLineVo;
import com.tuoheng.common.core.utils.JsonResult;

import java.util.List;

public interface AirportService {

List<AirportInfoVo> getAirportInfoList(String airportIds);

List<AirportLineVo> getAirportLineListByAirportIdAndLineIdList(String airportId, List<Integer> airportLineIdList);

JsonResult getAirportList();

+ 10
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportServiceImpl.java Voir le fichier

@@ -3,7 +3,8 @@ package com.tuoheng.admin.service.third.airport;
import com.tuoheng.admin.entity.domain.Inspection;
import com.tuoheng.admin.entity.request.airport.DroneHoverRequest;
import com.tuoheng.admin.entity.request.airport.ReversalFlightRequest;
import com.tuoheng.admin.entity.vo.AirportLineVo;
import com.tuoheng.admin.entity.vo.airport.AirportInfoVo;
import com.tuoheng.admin.entity.vo.airport.AirportLineVo;
import com.tuoheng.admin.service.third.airport.drone.DroneService;
import com.tuoheng.admin.service.third.airport.reversal.ReversalFlightService;
import com.tuoheng.common.core.utils.JsonResult;
@@ -15,6 +16,9 @@ import java.util.List;
@Service
public class AirportServiceImpl implements AirportService {

@Autowired
private GetAirportListByAirportIds getAirportListByAirportIds;

@Autowired
private GetAirportListService getAirportListService;

@@ -36,6 +40,11 @@ public class AirportServiceImpl implements AirportService {
@Autowired
private ReversalFlightService reversalFlightService;

@Override
public List<AirportInfoVo> getAirportInfoList(String airportIds) {
return getAirportListByAirportIds.getAirportInfo(airportIds);
}

@Override
public List<AirportLineVo> getAirportLineListByAirportIdAndLineIdList(String airportId, List<Integer> airportLineIdList) {
return getAirLineListService.getList(airportId, airportLineIdList);

+ 1
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetAirLineListService.java Voir le fichier

@@ -5,15 +5,12 @@ import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.tuoheng.admin.constant.SystemConstant;
import com.tuoheng.admin.entity.domain.Tenant;
import com.tuoheng.admin.entity.vo.AirportLineVo;
import com.tuoheng.admin.entity.vo.airport.AirportLineVo;
import com.tuoheng.admin.enums.code.AriportCodeEnum;
import com.tuoheng.admin.mapper.TenantMapper;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.entity.vo.AirLineVO;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.HttpUtils;
import com.tuoheng.common.core.utils.JacksonUtil;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

+ 75
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetAirportListByAirportIds.java Voir le fichier

@@ -0,0 +1,75 @@
package com.tuoheng.admin.service.third.airport;

import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.tuoheng.admin.constant.SystemConstant;
import com.tuoheng.admin.entity.domain.Tenant;
import com.tuoheng.admin.entity.vo.airport.AirPortStatusVo;
import com.tuoheng.admin.entity.vo.airport.AirportInfoVo;
import com.tuoheng.admin.mapper.TenantMapper;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;

import java.util.List;

@Slf4j
@Service
public class GetAirportListByAirportIds {

@Autowired
private TenantMapper tenantMapper;

@Autowired
@Qualifier("restTemplate")
private RestTemplate restTemplate;

public List<AirPortStatusVo> getList(String airportIds) {
String url = UriComponentsBuilder.fromHttpUrl(CommonConfig.airportURL + SystemConstant.API_AIRPORT_STATUS_BY_AIRPORT_ID)
.queryParam("airportIds", airportIds)
.toUriString();
JsonResult jsonResult;
try {
jsonResult = restTemplate.getForObject(url, JsonResult.class);
} catch (Exception e) {
log.info("调用机场平台,查询飞行状态异常, url:{}", url);
return null;
}
List<AirPortStatusVo> airPortStatusVOList = JSONObject.parseArray(JSONObject.toJSONString(jsonResult.getData()), AirPortStatusVo.class);
return airPortStatusVOList;

}

public List<AirportInfoVo> getAirportInfo(String airportIds) {
//读取不同租户的机场平台url
Tenant tenant = tenantMapper.selectById(CurrentUserUtil.getTenantId());
if (ObjectUtil.isEmpty(tenant) && StringUtils.isEmpty(tenant.getCode())) {
return null;
}
String tenantCode = tenant.getCode();
String url = UriComponentsBuilder.fromHttpUrl(CommonConfig.airportURL + SystemConstant.API_AIRPORT_MSG_BY_AIRPORT_ID)
.queryParam("airportIds", airportIds)
.queryParam("tenantCode", tenantCode)
.toUriString();
JsonResult jsonResult;
try {
jsonResult = restTemplate.getForObject(url, JsonResult.class);
} catch (Exception e) {
log.info("调用机场平台,查询机场信息异常,url:{}", url);
return null;
}
if (jsonResult.getCode() != 0) {
log.info("调用机场平台,查询机场信息,失败,jsonResult:{}", jsonResult.getMsg());
return null;
}
List<AirportInfoVo> airPortStatusVOList = JSONObject.parseArray(JSONObject.toJSONString(jsonResult.getData()), AirportInfoVo.class);
return airPortStatusVOList;
}
}

+ 2
- 12
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml Voir le fichier

@@ -13,10 +13,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="inspectionType" column="inspection_type" />
<result property="airportTaskId" column="airport_task_id" />
<result property="airportId" column="airport_id" />
<result property="airportName" column="airport_name" />
<result property="droneId" column="drone_id" />
<result property="inspectionLine" column="inspection_line" />
<result property="inspectionLineName" column="inspection_line_name" />
<result property="equipmentId" column="equipment_id" />
<result property="equipmentName" column="equipment_name" />
<result property="equipmentMountId" column="equipment_mount_id" />
@@ -63,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"

<sql id="Base_Column_list">
id, tenant_id, code, name, type, inspection_type,
airport_task_id, airport_id, airport_name, drone_id, inspection_line, inspection_line_name, equipment_id,
airport_task_id, airport_id, drone_id, inspection_line, equipment_id,
equipment_name, equipment_mount_id, equipment_mount_type, equipment_mount_code
equipment_mount_name, cloud_box_id, cloud_box_name, box_sn, flight_hand, flight_hand_name, inspection_time,
execution_start_time, execution_end_time, is_live, is_taken, is_tilt, video_url, ai_video_url, report_url, srt_url,
@@ -74,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"

<sql id="selectInspectionVo">
select id, tenant_id, code, name, type, inspection_type,
airport_task_id, airport_id, airport_name, drone_id, inspection_line, inspection_line_name, equipment_id, equipment_name, equipment_mount_id,
airport_task_id, airport_id, drone_id, inspection_line, equipment_id, equipment_name, equipment_mount_id,
equipment_mount_name, equipment_mount_type,equipment_mount_code,cloud_box_id, cloud_box_name, box_sn, flight_hand, flight_hand_name, inspection_time,
execution_start_time, execution_end_time, is_live, is_taken, is_tilt, video_url, ai_video_url, report_url, srt_url,
status, analyse_status, progressbar, note, weather, fly_height, srt_name, heartbeat_time, execution_status,
@@ -131,10 +129,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inspectionType != null">inspection_type = #{inspectionType},</if>
<if test="airportTaskId != null">airport_task_id = #{airportTaskId},</if>
<if test="airportId != null">airport_id = #{airportId},</if>
<if test="airportName != null">airport_name = #{airportName},</if>
<if test="droneId != null"> drone_id = #{droneId},</if>
<if test="inspectionLine != null">inspection_line = #{inspectionLine},</if>
<if test="inspectionLineName != null">inspection_line_name = #{inspectionLineName},</if>
<if test="equipmentId != null">equipment_id = #{equipmentId},</if>
<if test="equipmentName != null">equipment_name = #{equipmentName},</if>
<if test="equipmentMountId != null">equipment_mount_id = #{equipmentMountId},</if>
@@ -266,15 +262,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="airportId != null">
airport_id = #{airportId},
</if>
<if test="airportName != null">
airport_name = #{airportName},
</if>
<if test="inspectionLine != null">
inspection_line = #{inspectionLine},
</if>
<if test="inspectionLineName != null">
inspection_line_name = #{inspectionLineName},
</if>
<if test="progressbar != null">
progressbar = #{progressbar},
</if>

Chargement…
Annuler
Enregistrer