Bladeren bron

对接机场修改获取机场信息挂载设备接口

tags/v1.0.2
chengwang 1 jaar geleden
bovenliggende
commit
4161317d9e
2 gewijzigde bestanden met toevoegingen van 14 en 17 verwijderingen
  1. +3
    -9
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/MountEquipment.java
  2. +11
    -8
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetAirportDetailService.java

+ 3
- 9
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/MountEquipment.java Bestand weergeven

@@ -1,18 +1,12 @@
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
@@ -45,9 +39,9 @@ public class MountEquipment {
/**
* 类型
*/
private Integer type;
private String type;
/**
*
*序号
*/
private Integer series;
/**
@@ -71,7 +65,7 @@ public class MountEquipment {
*/
private String imaging;
/**
*
*制造商
*/
private String manufacturer;
/**

+ 11
- 8
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetAirportDetailService.java Bestand weergeven

@@ -58,15 +58,18 @@ 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);
}
if(Objects.nonNull(mountJson)){
String strJson = mountJson.getString("mountEquipmentList");

log.info("参数信息,strJson={}",strJson);
if(StringUtils.isNotEmpty(strJson)){
String mountEquipmentList = strJson;
if(StringUtils.isNotEmpty(mountEquipmentList)){
List<MountEquipment> mountEquipments = JSONObject.parseArray(mountEquipmentList, MountEquipment.class);
vo.setMountEquipmentList(mountEquipments);
}

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

Laden…
Annuleren
Opslaan