|
|
|
|
|
|
|
|
package com.tuoheng.admin.service.impl; |
|
|
package com.tuoheng.admin.service.impl; |
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
|
|
|
|
airportDetailDto.setTmp(tmp + "℃"); |
|
|
airportDetailDto.setTmp(tmp + "℃"); |
|
|
} |
|
|
} |
|
|
JSONObject mountJson = dataObject.getJSONObject("mount"); |
|
|
JSONObject mountJson = dataObject.getJSONObject("mount"); |
|
|
if(Objects.nonNull(mountJson)){ |
|
|
|
|
|
airportDetailDto.setMountName(mountJson.getString("cameraName") + "、" + |
|
|
|
|
|
mountJson.getString("megaphoneName") + "、" + |
|
|
|
|
|
mountJson.getString("searchlightName") |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
JSONArray mountEquipmentList = mountJson.getJSONArray("mountEquipmentList"); |
|
|
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
|
|
if (Objects.nonNull(mountEquipmentList)) { |
|
|
|
|
|
for(int i = 0; i < mountEquipmentList.size(); i++){ |
|
|
|
|
|
JSONObject equipment = mountEquipmentList.getJSONObject(i); |
|
|
|
|
|
String name = equipment.getString("name"); |
|
|
|
|
|
sb.append(name); |
|
|
|
|
|
if(i < mountEquipmentList.size()-1){ |
|
|
|
|
|
sb.append("、"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
vo.setMountName(sb.toString()); |
|
|
} |
|
|
} |
|
|
airportDetailDto.setStatus(dataObject.getString("status")); |
|
|
airportDetailDto.setStatus(dataObject.getString("status")); |
|
|
return JsonResult.success(airportDetailDto); |
|
|
return JsonResult.success(airportDetailDto); |