ソースを参照

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

tags/v1.0.0^2
chengwang 1年前
コミット
24517477c2
18個のファイルの変更719行の追加95行の削除
  1. +52
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirportController.java
  2. +9
    -6
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java
  3. +136
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Tenant.java
  4. +4
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AriportCodeEnum.java
  5. +6
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/DeptMapper.java
  6. +11
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java
  7. +16
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/TenantMapper.java
  8. +0
    -67
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/QueryInspectionRequest.java
  9. +66
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspection/QueryInspectionPageListRequest.java
  10. +11
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airport/AirportService.java
  11. +70
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airport/AirportServiceImpl.java
  12. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/query/QueryListTreeService.java
  13. +12
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/IInspectionService.java
  14. +18
    -6
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/InspectionServiceImpl.java
  15. +74
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java
  16. +111
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/AirLineVO.java
  17. +111
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/AirPortVO.java
  18. +11
    -2
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml

+ 52
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirportController.java ファイルの表示

@@ -0,0 +1,52 @@
package com.tuoheng.admin.controller;

import com.alibaba.fastjson.JSON;
import com.tuoheng.admin.request.dept.AddDeptRequest;
import com.tuoheng.admin.request.dept.EditDeptRequest;
import com.tuoheng.admin.request.dept.QueryDeptChildPageListRequest;
import com.tuoheng.admin.service.airport.AirportService;
import com.tuoheng.admin.service.dept.IDeptService;
import com.tuoheng.admin.vo.AirLineVO;
import com.tuoheng.admin.vo.AirPortVO;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
* 机场前端控制器
*
* @author wanjing
* @team tuoheng
* @date 2022-11-23
*/
@Slf4j
@RestController
@RequestMapping("/airport")
public class AirportController {

@Autowired
AirportService airportService;

/**
* 获取巡检机场
*/
@GetMapping("/airport")
public JsonResult getAirportList() {
return airportService.getAirportList();
}

/**
* 获取巡检线路
* @param droneId 机场列表里面的droneId
* @return
*/
@GetMapping("/airport/line/{droneId}")
public JsonResult getAirLineList(@PathVariable("droneId") Integer droneId) {
return airportService.getAirLineList(droneId);
}

}

+ 9
- 6
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java ファイルの表示

@@ -1,9 +1,10 @@
package com.tuoheng.admin.controller;

import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.request.QueryInspectionRequest;
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
import com.tuoheng.admin.service.inspection.IInspectionService;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
* @team tuoheng
* @date 2022-11-16
*/
@Slf4j
@RestController
@RequestMapping("/inspection")
public class InspectionController {
@@ -22,18 +24,19 @@ public class InspectionController {
private IInspectionService iInspectionService;

/**
* 查询巡检任务列表
* 查询巡检任务分页列表
*/
@GetMapping("/list")
public JsonResult list(QueryInspectionRequest request) {
return iInspectionService.selectList(request);
@GetMapping("/page/list")
public JsonResult list(QueryInspectionPageListRequest request) {
log.info("进入查询巡检任务分页列表");
return iInspectionService.selectPageList(request);
}

/**
* 获取巡检任务详细信息
*/
@GetMapping(value = "/{id}")
public JsonResult getInfo(QueryInspectionRequest request) {
public JsonResult getInfo(QueryInspectionPageListRequest request) {
return iInspectionService.selectOneById(request);
}


+ 136
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Tenant.java ファイルの表示

@@ -0,0 +1,136 @@
package com.tuoheng.admin.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.core.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
* <p>
* 企业管理表
* </p>
*
* @author 拓恒
* @since 2022-07-15
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_tenant")
public class Tenant extends BaseEntity implements Serializable {

private static final long serialVersionUID = 1L;

/**
* 租户名称
*/
private String name;

/**
* 租户编号
*/
private String code;

/**
* 租户账号
*/
private String username;

/**
* 租户LOGO
*/
private String logo;

/**
* 上级ID
*/
private Integer pid;

/**
* 租户类型:1政府 2企业 3组织
*/
private Integer type;

/**
* 租户电话
*/
private String phone;

/**
* 租户邮箱
*/
private String email;

/**
* 省份编号
*/
private String provinceCode;

/**
* 省份名称
*/
private String provinceName;

/**
* 市区编号
*/
private String cityCode;

/**
* 市区名称
*/
private String cityName;

/**
* 区县编号
*/
private String districtCode;

/**
* 区县名称
*/
private String districtName;

/**
* 平台名称
*/
private String platformName;

/**
* 机场平台url
*/
private String airportUrl;

/**
* 详细地址
*/
private String address;

/**
* 租户简介
*/
private String intro;

/**
* 状态:1正常 2禁用
*/
private Integer status;

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

/**
* 排序号
*/
private Integer sort;
/**
* 租户头像url
*/
private String portraitUrl;

}

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/CodeEnum.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AriportCodeEnum.java ファイルの表示

@@ -1,9 +1,9 @@
package com.tuoheng.admin.enums;

public enum CodeEnum {
public enum AriportCodeEnum {

// 部门列表为空
SUCCESS(0, "操作成功");
GET_NO_TENANT(1000, "获取租户信息失败!"),
BAD_REQUEST(1000, "获取机场信息失败,请重试!");

/**
* 错误码
@@ -15,7 +15,7 @@ public enum CodeEnum {
*/
private String msg;

CodeEnum(Integer code, String msg){
AriportCodeEnum(Integer code, String msg){
this.code = code;
this.msg = msg;
}

+ 6
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/DeptMapper.java ファイルの表示

@@ -14,6 +14,12 @@ import java.util.List;
*/
public interface DeptMapper extends BaseMapper<Dept> {

/**
* 通过部门id,查找该部门下子孙部门id
*
* @param id 部门
* @return 结果
*/
List<String> selectAllChildListById(String id);

/**

+ 11
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java ファイルの表示

@@ -4,7 +4,7 @@ import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.request.QueryInspectionRequest;
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
import org.apache.ibatis.annotations.Param;

/**
@@ -21,16 +21,23 @@ public interface InspectionMapper {
* @param request 巡检任务查询实体
* @return 巡检任务
*/
Inspection selectOneById(QueryInspectionRequest request);
Inspection selectOneById(QueryInspectionPageListRequest request);

/**
* 查询巡检任务分页列表
*
* @param request 巡检任务查询实体
* @return 巡检任务集合
*/
Page<Inspection> selectPageList(@Param("page") Page<Inspection> page, @Param("request") QueryInspectionPageListRequest request);

/**
* 查询巡检任务列表
*
* @param page 分页信息
* @param request 巡检任务查询实体
* @return 巡检任务集合
*/
List<Inspection> selectList(@Param("page") Page<Inspection> page, @Param("request") QueryInspectionRequest request);
List<Inspection> selectList(QueryInspectionPageListRequest request);

/**
* 新增巡检任务

+ 16
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/TenantMapper.java ファイルの表示

@@ -0,0 +1,16 @@
package com.tuoheng.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tuoheng.admin.entity.Tenant;

/**
* <p>
* 企业管理表 Mapper 接口
* </p>
*
* @author 拓恒
* @since 2022-11-23
*/
public interface TenantMapper extends BaseMapper<Tenant> {

}

+ 0
- 67
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/QueryInspectionRequest.java ファイルの表示

@@ -1,67 +0,0 @@
package com.tuoheng.admin.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.core.common.BaseQuery;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* 查询巡检任务请求实体
*
* @author wanjing
* @team tuoheng
* @date 2022-11-17
*/
@Data
public class QueryInspectionRequest extends BaseQuery {

private Integer id;

/**
* 任务名称
*/
private String name;

/**
* 任务状态
*/
private Integer status;

/**
* 任务编号
*/
private String code;

/**
* 河流
*/
private Integer streamId;

/**
* 巡检时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date inspectionTime;
/**
* 用户ID
*/
private Integer userId;

/**
* 为1时,查询信息录入列表数据
*/
private Integer inputFlag;

/**
* 算法处理状态:1待处理 2处理中 3已处理
*/
private Integer analyseStatus;

/**
* 租户id
*/
private Integer tenantId;
}

+ 66
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspection/QueryInspectionPageListRequest.java ファイルの表示

@@ -0,0 +1,66 @@
package com.tuoheng.admin.request.inspection;

import com.tuoheng.common.core.common.BaseQuery;
import lombok.Data;

/**
* 查询巡检任务请求实体
*
* @author wanjing
* @team tuoheng
* @date 2022-11-17
*/
@Data
public class QueryInspectionPageListRequest extends BaseQuery {

/**
* 用户ID
*/
private Integer userId;

/**
* 租户id
*/
private Integer tenantId;

/**
* 任务编号
*/
private String code;

/**
* 任务名称
*/
private String name;

/**
* 巡检机场id
*/
private Integer airportId;

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

/**
* 巡检任务类型: 1 临时巡检(目前只有该一种类型)
*/
private Integer type;

/**
* 任务状态
*/
private Integer status;

/**
* 巡检方式类型: 1 无人机 2机场
*/
private Integer inspectionType;

/**
* 部门Id
*/
private Integer deptId;

}

+ 11
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airport/AirportService.java ファイルの表示

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

import com.tuoheng.common.core.utils.JsonResult;

public interface AirportService {

JsonResult getAirportList();

JsonResult getAirLineList(Integer droneId);

}

+ 70
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airport/AirportServiceImpl.java ファイルの表示

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

import cn.hutool.core.util.ObjectUtil;
import com.tuoheng.admin.entity.Tenant;
import com.tuoheng.admin.enums.AriportCodeEnum;
import com.tuoheng.admin.mapper.TenantMapper;
import com.tuoheng.admin.utils.ShiroUtils;
import com.tuoheng.admin.vo.AirLineVO;
import com.tuoheng.common.core.utils.HttpUtils;
import com.tuoheng.common.core.utils.JacksonUtil;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Objects;

@Service
public class AirportServiceImpl implements AirportService {

@Autowired
private TenantMapper tenantMapper;

@Override
public JsonResult getAirportList() {
//读取不同租户的机场平台url
Tenant tenant = tenantMapper.selectById(ShiroUtils.getTenantId());

if (ObjectUtil.isEmpty(tenant)) {
return JsonResult.error(AriportCodeEnum.GET_NO_TENANT.getCode(), AriportCodeEnum.GET_NO_TENANT.getMsg());
}

if (StringUtils.isEmpty(tenant.getAirportUrl())) {
return JsonResult.error(AriportCodeEnum.GET_NO_TENANT.getCode(), AriportCodeEnum.GET_NO_TENANT.getMsg());
}

String url = tenant.getAirportUrl() + "/api/airportInterface/airportList";
String param = "page=1&limit=10";
String airPortStr = HttpUtils.sendGet(url, param);

JsonResult jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class);

if (ObjectUtil.isEmpty(jsonResult) || (!ObjectUtil.isEmpty(jsonResult.getData()) && jsonResult.getCode() != 0)) {
return JsonResult.error(AriportCodeEnum.BAD_REQUEST.getCode(), AriportCodeEnum.BAD_REQUEST.getMsg());
}
return jsonResult;
}

@Override
public JsonResult getAirLineList(Integer droneId) {
//读取不同租户的机场平台url
Tenant tenant = tenantMapper.selectById(ShiroUtils.getTenantId());
if (ObjectUtil.isEmpty(tenant)) {
return JsonResult.error(AriportCodeEnum.GET_NO_TENANT.getCode(), AriportCodeEnum.GET_NO_TENANT.getMsg());
}
if (StringUtils.isEmpty(tenant.getAirportUrl())) {
return JsonResult.error(AriportCodeEnum.GET_NO_TENANT.getCode(), AriportCodeEnum.GET_NO_TENANT.getMsg());
}

String url = tenant.getAirportUrl() + "/api/airportInterface/taskByDroneId";
String param = "page=1&limit=100&droneId=" + droneId;
String airPortStr = HttpUtils.sendGet(url, param);
JsonResult<AirLineVO> jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class);

if (ObjectUtil.isEmpty(jsonResult) || (!ObjectUtil.isEmpty(Objects.requireNonNull(jsonResult).getData()) && jsonResult.getCode() != 0)) {
return JsonResult.error(AriportCodeEnum.BAD_REQUEST.getCode(), AriportCodeEnum.BAD_REQUEST.getMsg());
}
return jsonResult;
}
}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/query/QueryListTreeService.java ファイルの表示

@@ -60,7 +60,7 @@ public class QueryListTreeService {
deptTreeVoList.add(deptTreeVo);
} else {
DeptTreeVo parent = deptVoMap.get(child.getPid());
deptTreeVo.setPName(parent.getName());
deptTreeVo.setPname(parent.getName());
parent.getChildren().add(child);
}
}

+ 12
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/IInspectionService.java ファイルの表示

@@ -1,9 +1,7 @@
package com.tuoheng.admin.service.inspection;
import java.util.List;
import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.request.QueryInspectionRequest;
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
import com.tuoheng.common.core.utils.JsonResult;
/**
@@ -14,13 +12,22 @@ import com.tuoheng.common.core.utils.JsonResult;
* @date 2022-11-16
*/
public interface IInspectionService {
/**
* 查询巡检任务列表(分页)
*
* @param queryInspectionRequest 巡检任务查询实体
* @return 巡检任务集合
*/
JsonResult selectPageList(QueryInspectionPageListRequest queryInspectionRequest);
/**
* 查询巡检任务
*
* @param queryInspectionRequest 巡检任务查询实体
* @return 巡检任务
*/
JsonResult selectOneById(QueryInspectionRequest queryInspectionRequest);
JsonResult selectOneById(QueryInspectionPageListRequest queryInspectionRequest);
/**
* 查询巡检任务列表
@@ -28,7 +35,7 @@ public interface IInspectionService {
* @param queryInspectionRequest 巡检任务查询实体
* @return 巡检任务集合
*/
JsonResult selectList(QueryInspectionRequest queryInspectionRequest);
JsonResult selectList(QueryInspectionPageListRequest queryInspectionRequest);
/**
* 新增巡检任务

+ 18
- 6
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/InspectionServiceImpl.java ファイルの表示

@@ -1,16 +1,14 @@
package com.tuoheng.admin.service.inspection;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.request.QueryInspectionRequest;
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
import com.tuoheng.admin.service.inspection.query.QueryInspectionPageListService;
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 java.util.List;
/**
* 巡检任务Service业务层处理
*
@@ -24,6 +22,20 @@ public class InspectionServiceImpl implements IInspectionService {
@Autowired
private InspectionMapper inspectionMapper;
@Autowired
QueryInspectionPageListService queryInspectionPageListService;
/**
* 查询巡检任务分页列表
*
* @param queryInspectionRequest 巡检任务查询实体
* @return
*/
@Override
public JsonResult selectPageList(QueryInspectionPageListRequest queryInspectionRequest) {
return queryInspectionPageListService.getPageList(queryInspectionRequest);
}
/**
* 查询巡检任务
*
@@ -31,7 +43,7 @@ public class InspectionServiceImpl implements IInspectionService {
* @return 巡检任务
*/
@Override
public JsonResult selectOneById(QueryInspectionRequest request) {
public JsonResult selectOneById(QueryInspectionPageListRequest request) {
// request.setTenantId(ShiroUtils.getTenantId());
Inspection inspection = inspectionMapper.selectOneById(request);
@@ -50,7 +62,7 @@ public class InspectionServiceImpl implements IInspectionService {
* @return 巡检任务
*/
@Override
public JsonResult selectList(QueryInspectionRequest request) {
public JsonResult selectList(QueryInspectionPageListRequest request) {
log.info("进入查询巡检任务列表业务");
// Page<Inspection> page = new Page<>(request.getPage(), request.getLimit());
// request.setUserId(ShiroUtils.getUserId());

+ 74
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java ファイルの表示

@@ -0,0 +1,74 @@
package com.tuoheng.admin.service.inspection.query;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
import com.tuoheng.admin.utils.ShiroUtils;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* 查询巡检任务分页列表业务层处理
*
* @author wanjing
* @team tuoheng
* @date 2022-11-22
*/
@Slf4j
@Service
public class QueryInspectionPageListService {

@Autowired
private InspectionMapper inspectionMapper;

public JsonResult getPageList(QueryInspectionPageListRequest queryInspectionRequest) {
log.info("进入查询巡检任务分页列表业务");
String tenantId = ShiroUtils.getTenantId();

JsonResult result = this.check(tenantId, queryInspectionRequest);
if (0 != result.getCode()) {
log.info("进入查询巡检任务分页列表业务:校验失败:{}", result.getMsg());
return result;
}

Page<Inspection> page = new Page(queryInspectionRequest.getPage(), queryInspectionRequest.getLimit());
Page<Inspection> pageList = inspectionMapper.selectPageList(page, queryInspectionRequest);

// 查询所有有效的子部门数据
// IPage<Inspection> page = new Page<>(queryInspectionRequest.getPage(), queryInspectionRequest.getLimit());
// IPage<Inspection> pageData = inspectionMapper.selectList(page, queryInspectionRequest);
// List<Inspection> inspectionList = pageData.getRecords();
// List<Inspection> list = new ArrayList<>();
// for (Inspection inspection : inspectionList) {
// list.add(inspection);
// }
// pageData.setRecords(list);
//
// if (CollectionUtil.isEmpty(inspectionList)) {
// log.info("获取子部门列表为空");
// return JsonResult.error(QueryDeptChildListCodeEnum.DEPT_LIST_IS_NULL.getCode(), QueryDeptChildListCodeEnum.DEPT_LIST_IS_NULL.getMsg());
// }

return JsonResult.success();
}

/**
* 检查参数
* @param tenantId
* @param queryInspectionRequest
* @return
*/
private JsonResult check(String tenantId, QueryInspectionPageListRequest queryInspectionRequest) {
// 判断id是否为空
// if (StringUtils.isEmpty(id)) {
// return JsonResult.error(QueryDeptChildListCodeEnum.DEPT_ID_IS_NULL.getCode(), QueryDeptChildListCodeEnum.DEPT_ID_IS_NULL.getMsg());
// }


return JsonResult.success();
}

}

+ 111
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/AirLineVO.java ファイルの表示

@@ -0,0 +1,111 @@
package com.tuoheng.admin.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* 机场线路视图Vo
*
* @author wanjing
* @team tuoheng
* @date 2022-11-23
*/
@Data
@NoArgsConstructor
public class AirLineVO implements Serializable {

private static final long serialVersionUID = 1L;

/**
* 任务id
*/
private Integer id;

/**
* 任务编号
*/
private String code;

/**
* 任务名称
*/
private String name;

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


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

/**
* 无人机直播播流地址
*/
private String liveUrl;

/**
* 航线id
*/
private Integer airlineFileId;

/**
* 航线名称
*/
private String airlineFileName;

/**
* 航线文件地址路径
*/
private String airlineFileUrl;

/**
* 执行类型,1单次2每天
*/
private Integer type;

/**
* 单次执行时间
*/
private String singleTime;

/**
* 每天执行时间
*/
private Object everydayTime;

/**
* 任务备注
*/
private Object note;

/**
* 任务状态1待执行 2执行中
*/
private Integer status;

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

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

/**
* 修改用户
*/
private Integer updateUser;

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

+ 111
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/AirPortVO.java ファイルの表示

@@ -0,0 +1,111 @@
package com.tuoheng.admin.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* 机场视图Vo
*
* @author wanjing
* @team tuoheng
* @date 2022-11-23
*/
@Data
@NoArgsConstructor
public class AirPortVO implements Serializable {

private static final long serialVersionUID = 1L;

/**
* 机场id
*/
private Integer 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 longitude;

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

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

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

/**
* 设备id
*/
private String edgeId;

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

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

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

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

}

+ 11
- 2
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml ファイルの表示

@@ -65,14 +65,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, tenant_id, dept_id, code, name, type, road_id, road_name, section_id, section_name, inspection_type, airport_id, airport_name, inspection_line, inspection_line_name, equipment_id, equipment_name, equipment_mount_id, 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, status, analyse_status, progressbar, note, weather, fly_height, srt_name, heartbeat_time, execution_status, start_longitude, start_latitude, end_longitude, end_latitude, mobile, patrol_location, create_user, create_time, update_user, update_time, mark from th_inspection
</sql>

<select id="selectOneById" parameterType="com.tuoheng.admin.request.QueryInspectionRequest" resultMap="InspectionResult">
<select id="selectOneById" parameterType="com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest" resultMap="InspectionResult">
<include refid="selectInspectionVo"/>
where id = #{id}
and mark = 1
and tenant_id = #{tenantId}
</select>

<select id="selectList" parameterType="com.tuoheng.admin.request.QueryInspectionRequest" resultMap="InspectionResult">
<select id="selectPageList" parameterType="com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest" resultMap="InspectionResult">
<include refid="selectInspectionVo"/>
<where>
<if test="1 == 1"> and mark = 1 </if>
<if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
</where>
</select>

<select id="selectList" parameterType="com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest" resultMap="InspectionResult">
<include refid="selectInspectionVo"/>
<where>
<if test="tenantId != null and tenantId != ''"> and tenant_id = #{tenantId}</if>

読み込み中…
キャンセル
保存