ソースを参照

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

pull/380/head
suqin 11ヶ月前
コミット
25d51edf6d
13個のファイルの変更243行の追加7行の削除
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java
  2. +34
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirportLineController.java
  3. +56
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/AirportLine.java
  4. +14
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/AirportLineMapper.java
  5. +33
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/AirportLineServiceImpl.java
  6. +21
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/IAirportLineService.java
  7. +55
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/info/QueryAirportLineInfoService.java
  8. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/IDeptService.java
  9. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/query/QueryListTreeService.java
  10. +0
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetAirportListService.java
  11. +11
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/cycle/InspectionCycleVo.java
  12. +7
    -0
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/AriportLineMapper.xml
  13. +3
    -1
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionCycleMapper.xml

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java ファイルの表示

@@ -14,6 +14,11 @@ public interface SystemConstant {
*/
String PLATFORM_CODE = "gs";

/**
* 机场平台:获取航点文件坐标
*/
String API_AIRPORT_LOCATION = "/airportInterface/getLocationById";

/**
* 高德url地址
*/

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

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

import com.tuoheng.admin.service.airportline.IAirportLineService;
import com.tuoheng.common.core.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* 航线前端控制器
*
* @Author ChengWang
* @Date 2023/3/2
*/
@RestController
@RequestMapping("/airportLine")
public class AirportLineController {

@Autowired
private IAirportLineService airportLineService;

/**
* 航线预览
* @param id
* @return
*/
@GetMapping("/{id}")
public JsonResult getInfoById(@PathVariable("id") Integer id) {
return airportLineService.getInfoById(id);
}

}

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

@@ -0,0 +1,56 @@
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;

/**
* @Author ChengWang
* @Date 2023/3/2
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_airport_line")
public class AirportLine extends BaseEntity {

private static final long serialVersionUID = 1L;

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

/**
* 事故ID
*/
private String accidentId;

/**
* 巡检任务ID
*/
private String inspectionId;

/**
* 事故范围
*/
private String accidentRegion;

/**
* 航线
*/
private String coordinates;

/**
* 航线类型:1:点;2:线;3:面
*/
private Integer lineType;

/**
* oss文件地址
*/
private String ossUrl;

}

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

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

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

/**
* @Author ChengWang
* @Date 2023/3/2
*/
public interface AirportLineMapper extends BaseMapper<AirportLine> {



}

+ 33
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/AirportLineServiceImpl.java ファイルの表示

@@ -0,0 +1,33 @@
package com.tuoheng.admin.service.airportline;

import com.tuoheng.admin.entity.AirportLine;
import com.tuoheng.admin.mapper.AirportLineMapper;
import com.tuoheng.admin.service.airportline.info.QueryAirportLineInfoService;
import com.tuoheng.common.core.common.BaseServiceImpl;
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 suqin
* @Date 2023/12/13
*/
@Service
@Slf4j
public class AirportLineServiceImpl extends BaseServiceImpl<AirportLineMapper, AirportLine> implements IAirportLineService {
@Autowired
private QueryAirportLineInfoService queryAirportLineInfoService;

/**
* 查询航线信息
*
* @param id 航线Id
* @return
*/
@Override
public JsonResult getInfoById(Integer id) {
return queryAirportLineInfoService.getInfo(id);
}

}

+ 21
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/IAirportLineService.java ファイルの表示

@@ -0,0 +1,21 @@
package com.tuoheng.admin.service.airportline;

import com.tuoheng.admin.entity.AirportLine;
import com.tuoheng.common.core.common.IBaseService;
import com.tuoheng.common.core.utils.JsonResult;

/**
* @Author ChengWang
* @Date 2022/11/17
*/
public interface IAirportLineService extends IBaseService<AirportLine> {

/**
* 查询航线信息
*
* @param id 航线Id
* @return
*/
JsonResult getInfoById(Integer id);

}

+ 55
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/info/QueryAirportLineInfoService.java ファイルの表示

@@ -0,0 +1,55 @@
package com.tuoheng.admin.service.airportline.info;

import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.tuoheng.admin.service.third.airport.AirportService;
import com.tuoheng.admin.vo.AirportLineVo;
import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Slf4j
@Service
public class QueryAirportLineInfoService {

@Autowired
private AirportService airportService;

public JsonResult getInfo(Integer id) {
JsonResult result = this.check(id);
if (0 != result.getCode()) {
log.info("根据id查询航线信息:校验失败:{}", result.getMsg());
return result;
}
List<Integer> airportLineIdList = new ArrayList<>();
airportLineIdList.add(id);
List<AirportLineVo> airportLineVoList = airportService.getAirportLineListByAirportIdAndLineIdList(null, airportLineIdList);

if (CollectionUtil.isEmpty(airportLineVoList)) {
log.info("该航线不存在,id={}", id);
return JsonResult.success();
}
AirportLineVo airportLineVo = airportLineVoList.get(0);
return JsonResult.success(airportLineVo);
}

/**
* 检查参数
*
* @param id
* @return
*/
private JsonResult check(Integer id) {
if (ObjectUtil.isEmpty(id)) {
log.info("参数ID为空");
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "参数ID为空");
}
return JsonResult.success();
}
}

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

@@ -76,4 +76,4 @@ public interface IDeptService {
JsonResult getListByTenantId();


}
}

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

@@ -45,8 +45,8 @@ public class QueryListTreeService {

// 查询所有有效的部门数据
List<Dept> deptList = deptMapper.selectList(new LambdaQueryWrapper<Dept>()
.eq(Dept::getTenantId, tenantId)
.eq(Dept::getMark, 1));
.eq(Dept::getTenantId, tenantId)
.eq(Dept::getMark, 1));

if (CollectionUtil.isEmpty(deptList)) {
log.info("获取部门列表为空");
@@ -72,4 +72,4 @@ public class QueryListTreeService {
return JsonResult.success(deptTreeVoList);
}

}
}

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

@@ -26,7 +26,6 @@ public class GetAirportListService {
@Autowired
@Qualifier("restTemplate")
private RestTemplate restTemplate;

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

+ 11
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/cycle/InspectionCycleVo.java ファイルの表示

@@ -10,7 +10,7 @@ import java.util.Date;
/**
* 周期任务
*
* @author wanjing
* @author suqin
* @team tuoheng
* @date 2023-08-25
*/
@@ -44,6 +44,16 @@ public class InspectionCycleVo extends BaseEntity {
*/
private String name;

/**
* 巡检公路id
*/
private String roadId;

/**
* 巡检路段id
*/
private String sectionId;

/**
* 巡检机场id
*/

+ 7
- 0
tuoheng-service/tuoheng-admin/src/main/resources/mapper/AriportLineMapper.xml ファイルの表示

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tuoheng.admin.mapper.AirportLineMapper">



</mapper>

+ 3
- 1
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionCycleMapper.xml ファイルの表示

@@ -11,6 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="code" column="code" />
<result property="name" column="name" />
<result property="type" column="type" />
<result property="roadId" column="road_id" />
<result property="sectionId" column="section_id" />
<result property="airportId" column="airport_id" />
<result property="droneId" column="drone_id" />
<result property="airportLineId" column="airport_line_id" />
@@ -36,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>

<sql id="Base_Column_List">
t.id, t.tenant_id, t.dept_id, t.code, t.name, t.airport_id, t.airport_line_id, t.airport_line_length, t.drone_id, t.type,
t.id, t.tenant_id, t.dept_id, t.code, t.name, t.road_id, t.section_id, t.airport_id, t.airport_line_id, t.airport_line_length, t.drone_id, t.type,
t.single_time, t.everyday_time, t.cycle_time, t.cycle_next_time, t.cycle_frequency, t.cycle_start_time, t.cycle_end_time,
t.is_enable, t.note, t.create_user, t.create_time, t.update_user, t.update_time, t.mark
</sql>

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