Bläddra i källkod

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

tags/v1.0.2
chengwang 1 år sedan
förälder
incheckning
fd208387e6
3 ändrade filer med 105 tillägg och 0 borttagningar
  1. +7
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/AirportDetailDto.java
  2. +83
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/MountEquipment.java
  3. +15
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetAirportDetailService.java

+ 7
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/AirportDetailDto.java Visa fil

@@ -5,6 +5,8 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
* @author chenjiandong
* @description: TODO
@@ -56,6 +58,11 @@ public class AirportDetailDto {
*/
private String mountName;

/**
* 挂载
*/
private List<MountEquipment> mountEquipmentList;

/**
* 降雨量
*/

+ 83
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/MountEquipment.java Visa fil

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

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
* @Author ChengWang
* @Date 2023/7/17
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class MountEquipment {
/**
* id
*/
private Integer id;
/**
* 创建时间
*/
private String createTime;
/**
* 创建人
*/
private Integer createUser;
/**
* 更新人
*/
private Integer updateUser;
/**
* 更新时间
*/
private String updateTime;
/**
* 标识
*/
private Integer mark;
/**
* 租户id
*/
private Integer tenantId;
/**
* 类型
*/
private Integer type;
/**
*
*/
private Integer series;
/**
* 编码
*/
private String code;
/**
* 名称
*/
private String name;
/**
* 图片
*/
private String image;
/**
*
*/
private String zoomFactor;
/**
*
*/
private String imaging;
/**
*
*/
private String manufacturer;
/**
* 状态
*/
private Integer status;


}

+ 15
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetAirportDetailService.java Visa fil

@@ -1,14 +1,19 @@
package com.tuoheng.admin.service.third.airport;

import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.tuoheng.admin.entity.dto.AirportDetailDto;
import com.tuoheng.admin.entity.dto.MountEquipment;
import com.tuoheng.common.core.config.common.CommonConfig;
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 lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


import java.util.List;
import java.util.Objects;

/**
@@ -53,6 +58,16 @@ public class GetAirportDetailService {
mountJson.getString("searchlightName")
);
}
JSONObject metJson = dataObject.getJSONObject("mountEquipmentList");
if(ObjectUtil.isNotNull(metJson)){
//json-->string
String mountEquipmentList = metJson.toJSONString();
if(StringUtils.isNotEmpty(mountEquipmentList)){
List<MountEquipment> mountEquipments = JSONObject.parseArray(mountEquipmentList, MountEquipment.class);
vo.setMountEquipmentList(mountEquipments);
}

}
vo.setStatus(dataObject.getString("status"));
return JsonResult.success(vo);
}

Laddar…
Avbryt
Spara