mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 17:38:48 +08:00
增加客户端id及wifi名称
This commit is contained in:
parent
1f97673101
commit
a1b3d69ff1
@ -31,5 +31,9 @@ public class DeviceClientMsgDto implements Serializable {
|
||||
* MCU版本
|
||||
*/
|
||||
private String mcuVersion;
|
||||
/**
|
||||
* wifi名称
|
||||
*/
|
||||
private String wifiName;
|
||||
}
|
||||
|
||||
|
||||
@ -159,6 +159,11 @@ public class EqEquipmentDetailVo implements Serializable {
|
||||
*/
|
||||
private String mcuVersion;
|
||||
|
||||
/**
|
||||
* wifi名称
|
||||
*/
|
||||
private String wifiName;
|
||||
|
||||
|
||||
/**
|
||||
* 设备状态
|
||||
|
||||
@ -151,7 +151,7 @@ public class IotService {
|
||||
map.put("entityType","DEVICE");
|
||||
map.put("entityId",deviceCode);
|
||||
map.put("scope","CLIENT_SCOPE");
|
||||
String send = getSend(CommonYmlConfig.URL_IOT_SCOPE_ATTRIBUTE + "?keys=equipmentType,serializableNum,modelVersion,mcuVersion", map);
|
||||
String send = getSend(CommonYmlConfig.URL_IOT_SCOPE_ATTRIBUTE + "?keys=equipmentType,serializableNum,modelVersion,mcuVersion,ssid", map);
|
||||
// String send = getSend(CommonYmlConfig.URL_IOT_SCOPE_ATTRIBUTE + "?keys=", map);
|
||||
log.info("客户端属性获取:设备信息获取成功,设备编号:{},IOT接口返回:{}", deviceCode, send);
|
||||
if (send.startsWith("{")) throw new RuntimeException(MessageUtils.message("message.fault.device.notfound"));
|
||||
@ -177,6 +177,8 @@ public class IotService {
|
||||
result.setModelVersion(JSON.parseObject(resultString).getString("value"));
|
||||
}else if (key.equals("mcuVersion")){
|
||||
result.setMcuVersion(JSON.parseObject(resultString).getString("value"));
|
||||
}else if (key.equals("ssid")){
|
||||
result.setWifiName(JSON.parseObject(resultString).getString("value"));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@ -239,7 +241,9 @@ public class IotService {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("deviceProfileId",deviceProfileId);
|
||||
String send = getSend(CommonYmlConfig.URL_IOT_ota_otaPackages, map);
|
||||
List<DeviceOtaPackages> deviceOtaPackages = JSON.parseArray(send, DeviceOtaPackages.class);
|
||||
JSONObject jsonObject = JSONObject.parseObject(send);
|
||||
String data = jsonObject.getString("data");
|
||||
List<DeviceOtaPackages> deviceOtaPackages = JSON.parseArray(data, DeviceOtaPackages.class);
|
||||
return deviceOtaPackages;
|
||||
}
|
||||
|
||||
|
||||
@ -275,6 +275,7 @@ public class EqEquipmentServiceImpl implements IEqEquipmentService {
|
||||
result.setSerializableNum(clientMsg.getSerializableNum());
|
||||
result.setModelVersion(clientMsg.getModelVersion());
|
||||
result.setMcuVersion(clientMsg.getMcuVersion());
|
||||
result.setWifiName(clientMsg.getWifiName());
|
||||
|
||||
|
||||
//获取遥测数据
|
||||
@ -420,6 +421,7 @@ public class EqEquipmentServiceImpl implements IEqEquipmentService {
|
||||
DeviceOtaPackages lastOtaPackage = list.get(0);
|
||||
DeviceOtaPackages currentOtaPackage = null;
|
||||
//设备包版本id
|
||||
if (deviceDto.getFirmwareId()==null) throw new RuntimeException("设备未绑定OTA版本");
|
||||
String currentPackageId = deviceDto.getFirmwareId().getId();
|
||||
String lastPackageId = lastOtaPackage.getId().getId();
|
||||
for (DeviceOtaPackages deviceOtaPackages : list) {
|
||||
|
||||
@ -97,7 +97,7 @@ spring.data:
|
||||
# 数据库索引
|
||||
database: 2
|
||||
# redis 密码必须配置
|
||||
password: ruoyi123
|
||||
# password: ruoyi123
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
# 是否开启ssl
|
||||
|
||||
Loading…
Reference in New Issue
Block a user