iot设备code字符问题修改

This commit is contained in:
liang.chao 2024-08-22 11:01:08 +08:00
parent 52f40b3acd
commit 4f2454d7dd
5 changed files with 7 additions and 3 deletions

View File

@ -40,4 +40,7 @@ public class IotLocationVo {
/** 报警内容 */ /** 报警内容 */
@ApiModelProperty(value = "报警内容") @ApiModelProperty(value = "报警内容")
private String startAlarm; private String startAlarm;
/** 电量百分比 */
@ApiModelProperty(value = "电量百分比")
private Double voltagepercent;
} }

View File

@ -413,6 +413,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
for (int i = 0; i < jsonArray.size(); i++) { for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = JSONObject.from(jsonArray.getJSONObject(i)); JSONObject jsonObject = JSONObject.from(jsonArray.getJSONObject(i));
iotLocationVo.setIotId(jsonObject.getString("deviceid")); iotLocationVo.setIotId(jsonObject.getString("deviceid"));
iotLocationVo.setVoltagepercent(Double.valueOf(jsonObject.getString("voltagepercent")));
iotLocationVo.setCallat(StringHelper.conversionBigDecimal(jsonObject.getString("callat"))); iotLocationVo.setCallat(StringHelper.conversionBigDecimal(jsonObject.getString("callat")));
iotLocationVo.setCallon(StringHelper.conversionBigDecimal(jsonObject.getString("callon"))); iotLocationVo.setCallon(StringHelper.conversionBigDecimal(jsonObject.getString("callon")));
} }

View File

@ -19,7 +19,7 @@ public class IotDto {
/** iot设备ID */ /** iot设备ID */
@ApiModelProperty(value = "iot设备ID") @ApiModelProperty(value = "iot设备ID")
private Long iotId; private String iotId;
/** 类型id */ /** 类型id */
@ApiModelProperty(value = "类型id") @ApiModelProperty(value = "类型id")

View File

@ -17,7 +17,7 @@ public class IotVo {
/** iot设备ID */ /** iot设备ID */
@ApiModelProperty(value = "iot设备ID") @ApiModelProperty(value = "iot设备ID")
private Long iotId; private String iotId;
/** iot设备类型 */ /** iot设备类型 */
@ApiModelProperty(value = "iot设备类型") @ApiModelProperty(value = "iot设备类型")

View File

@ -301,7 +301,7 @@ public class IotMachineServiceImpl implements IotMachineService {
redisService.setCacheObject(TokenConstants.TOKEN_LOCATION,redisCode,23L, TimeUnit.HOURS); redisService.setCacheObject(TokenConstants.TOKEN_LOCATION,redisCode,23L, TimeUnit.HOURS);
} }
map.clear(); map.clear();
list.add(iotDto.getIotId().toString()); list.add(iotDto.getIotId());
map.put("deviceids",list); map.put("deviceids",list);
String param = JSON.toJSONString(map); String param = JSON.toJSONString(map);
String res = HttpHelper.doPost(HttpStatus.LAST_POSITION_URL+redisCode,param); String res = HttpHelper.doPost(HttpStatus.LAST_POSITION_URL+redisCode,param);