Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
762a21e46f
2
a_th_web
2
a_th_web
|
|
@ -1 +1 @@
|
||||||
Subproject commit 27c444605579bcca708df367d71cd171558a0dd2
|
Subproject commit b3c50f6011df27cf3993ddf8a56cb1638b6abb04
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.ruoyi.device.api;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||||
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.device.api.domain.StatisticsVO;
|
||||||
|
import com.ruoyi.device.api.factory.RemoteStatisticsFallbackFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计服务
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-23
|
||||||
|
*/
|
||||||
|
@FeignClient(contextId = "remoteStatisticsService", value = ServiceNameConstants.DEVICE_SERVICE, fallbackFactory = RemoteStatisticsFallbackFactory.class)
|
||||||
|
public interface RemoteStatisticsService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 获取系统统计信息
|
||||||
|
*
|
||||||
|
* @param source 请求来源
|
||||||
|
* @return 统计信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/statistics")
|
||||||
|
R<StatisticsVO> getStatistics(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
}
|
||||||
|
|
@ -180,11 +180,11 @@ public class DockDetailVO extends DockVO {
|
||||||
/**
|
/**
|
||||||
*纬度
|
*纬度
|
||||||
*/
|
*/
|
||||||
private String latitude;
|
private Double latitude;
|
||||||
/**
|
/**
|
||||||
* 经度
|
* 经度
|
||||||
*/
|
*/
|
||||||
private String longitude;
|
private Double longitude;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.ruoyi.device.api.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机场VO对象
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DockWithGPSVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 机场ID */
|
||||||
|
@Excel(name = "机场ID")
|
||||||
|
private Long dockId;
|
||||||
|
|
||||||
|
/** 机场IOT ID */
|
||||||
|
@Excel(name = "机场IOT ID")
|
||||||
|
private String dockIotId;
|
||||||
|
|
||||||
|
/** 机场名称 */
|
||||||
|
@Excel(name = "机场名称")
|
||||||
|
private String dockName;
|
||||||
|
|
||||||
|
/** 机场位置 */
|
||||||
|
@Excel(name = "机场位置")
|
||||||
|
private String dockLocation;
|
||||||
|
|
||||||
|
/** 机场厂商 */
|
||||||
|
@Excel(name = "机场厂商")
|
||||||
|
private String dockManufacturer;
|
||||||
|
|
||||||
|
/** 机场型号 */
|
||||||
|
@Excel(name = "机场型号")
|
||||||
|
private String dockModel;
|
||||||
|
|
||||||
|
/** 机场状态 */
|
||||||
|
@Excel(name = "机场状态")
|
||||||
|
private String dockStatus;
|
||||||
|
|
||||||
|
/** 无人机ID */
|
||||||
|
@Excel(name = "无人机ID")
|
||||||
|
private Long aircraftId;
|
||||||
|
|
||||||
|
/** 无人机IOT ID */
|
||||||
|
@Excel(name = "无人机IOT ID")
|
||||||
|
private String aircraftIotId;
|
||||||
|
|
||||||
|
/** 无人机名称 */
|
||||||
|
@Excel(name = "无人机名称")
|
||||||
|
private String aircraftName;
|
||||||
|
|
||||||
|
/** 无人机厂商 */
|
||||||
|
@Excel(name = "无人机厂商")
|
||||||
|
private String aircraftManufacturer;
|
||||||
|
|
||||||
|
/** 无人机型号 */
|
||||||
|
@Excel(name = "无人机型号")
|
||||||
|
private String aircraftModel;
|
||||||
|
|
||||||
|
/** 无人机状态 */
|
||||||
|
@Excel(name = "无人机状态")
|
||||||
|
private String aircraftStatus;
|
||||||
|
|
||||||
|
/** 挂载列表 */
|
||||||
|
private List<PayloadVO> payloadList;
|
||||||
|
|
||||||
|
/** 纬度 */
|
||||||
|
private Double latitude;
|
||||||
|
|
||||||
|
/** 经度 */
|
||||||
|
private Double longitude;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.ruoyi.device.api.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计信息VO对象
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StatisticsVO implements Serializable
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// ========== 机场统计 ==========
|
||||||
|
/** 机场个数 */
|
||||||
|
private Integer dockCount;
|
||||||
|
|
||||||
|
/** 空闲机场个数 */
|
||||||
|
private Integer idleDockCount;
|
||||||
|
|
||||||
|
/** 任务中机场个数 */
|
||||||
|
private Integer workingDockCount;
|
||||||
|
|
||||||
|
/** 调试机场个数 */
|
||||||
|
private Integer debuggingDockCount;
|
||||||
|
|
||||||
|
/** 离线机场个数 */
|
||||||
|
private Integer offlineDockCount;
|
||||||
|
|
||||||
|
// ========== 无人机统计 ==========
|
||||||
|
/** 无人机个数 */
|
||||||
|
private Integer aircraftCount;
|
||||||
|
|
||||||
|
/** 舱内开机个数 */
|
||||||
|
private Integer powerOnInCabinCount;
|
||||||
|
|
||||||
|
/** 舱内关机个数 */
|
||||||
|
private Integer powerOffInCabinCount;
|
||||||
|
|
||||||
|
/** 任务中个数 */
|
||||||
|
private Integer inMissionCount;
|
||||||
|
|
||||||
|
/** 调试中个数 */
|
||||||
|
private Integer debuggingAircraftCount;
|
||||||
|
|
||||||
|
/** 离线个数 */
|
||||||
|
private Integer offlineAircraftCount;
|
||||||
|
|
||||||
|
// ========== 挂载统计 ==========
|
||||||
|
/** 全部挂载个数 */
|
||||||
|
private Integer payloadCount;
|
||||||
|
|
||||||
|
/** 离线个数 */
|
||||||
|
private Integer offlinePayloadCount;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.ruoyi.device.api.factory;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.device.api.RemoteStatisticsService;
|
||||||
|
import com.ruoyi.device.api.domain.StatisticsVO;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计服务降级处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-23
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class RemoteStatisticsFallbackFactory implements FallbackFactory<RemoteStatisticsService>
|
||||||
|
{
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(RemoteStatisticsFallbackFactory.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RemoteStatisticsService create(Throwable throwable)
|
||||||
|
{
|
||||||
|
log.error("统计服务调用失败:{}", throwable.getMessage());
|
||||||
|
return new RemoteStatisticsService()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public R<StatisticsVO> getStatistics(String source)
|
||||||
|
{
|
||||||
|
return R.fail("获取统计信息失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9bee1836ddf0a93952c8ecc5910661b99e32a5fa
|
Subproject commit 8daf7a6d842dad1070246129f0629d7090ab1787
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 76c8d32da0ed0702750688e79f43d34db44d1e58
|
Subproject commit 4304f00f2f730f58ac86734ce31f214715be1f08
|
||||||
2
use.md
2
use.md
|
|
@ -11,7 +11,7 @@ cd a-cloud-all
|
||||||
# 更新主仓库和所有子模块到主仓库记录的版本
|
# 更新主仓库和所有子模块到主仓库记录的版本
|
||||||
#git pull && git submodule update --init --recursive
|
#git pull && git submodule update --init --recursive
|
||||||
git submodule foreach 'git checkout main && git pull'
|
git submodule foreach 'git checkout main && git pull'
|
||||||
|
git submodule foreach 'git checkout dev && git pull'
|
||||||
```
|
```
|
||||||
|
|
||||||
## 其他更新方式
|
## 其他更新方式
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue