Bladeren bron

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

tags/v1.3.1
wanjing 1 jaar geleden
bovenliggende
commit
3da67f3262
2 gewijzigde bestanden met toevoegingen van 7 en 3 verwijderingen
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/tzhl/service/fly/data/FlyDataService.java
  2. +2
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/tzhl/task/FlyDataTask.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/tzhl/service/fly/data/FlyDataService.java Bestand weergeven

@@ -45,6 +45,7 @@ public class FlyDataService {
public void getFlyData(Inspection inspection) {

String apiPath = TZHLConstant.TIAN_YI_API_FLIGHT_DATA;
log.info("请求机场平台获取飞行数据url,apiPath={}",apiPath);

JSONObject jsonObject = this.jsonObjectRequest(inspection);
log.info("封装的请求参数信息,jsonObject:{}", jsonObject.toString());
@@ -128,6 +129,10 @@ public class FlyDataService {
.orderByDesc(FlightDataHl::getCreateTime)
.last("limit 1"));

if(CollectionUtil.isEmpty(flightDataHl) && flightDataHl.size() == 0){
//查出的数据为空,直接结束返回
return;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

if(ObjectUtil.isNotNull(flightDataHl.get(0))){

+ 2
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/tzhl/task/FlyDataTask.java Bestand weergeven

@@ -42,7 +42,8 @@ public class FlyDataTask {
log.info("执行定时执行飞行任务:" + LocalDateTime.now());
List<Inspection> inspectionList = inspectionMapper.selectList(new LambdaQueryWrapper<Inspection>()
.eq(Inspection::getMark, MarkEnum.VALID.getCode())
.between(Inspection::getInspectionTime, startTime, endTime)
//是查询任务表中所有正在执行中的任务(暂时注释掉,没问题删除)
//.between(Inspection::getInspectionTime, startTime, endTime)
//查询巡检方式为机场的任务
.eq(Inspection::getInspectionType, InspectionTypeEnum.AIRPORT.getCode())
//查询未执行任务
@@ -56,9 +57,7 @@ public class FlyDataTask {
//遍历任务列表中正在执行的任务进行飞行数据入库
for (Inspection inspection : inspectionList) {
log.info("执行定时,获取飞行数据: inspectionId:{}", inspection.getId());

flyDataService.getFlyData(inspection);

log.info("执行定时,获取飞行数据结束: inspectionId:{}");
}
}

Laden…
Annuleren
Opslaan