Commit bfc6e8d0 by huangjy

fix:修改设备属性问题

parent ee3d59e7
......@@ -220,7 +220,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
// 写入设备
PlatDeviceAttrWechatDTO platDeviceAttrWechatDTO = JSON.parseObject(dto.getAttribute(), PlatDeviceAttrWechatDTO.class);
platDeviceAttrWechatDTO.setDeviceId(db.getOriDeviceId());
platDeviceAttrWechatDTO.setDeviceId(db.getId());
editDeviceProperties(platDeviceAttrWechatDTO);
}
......@@ -343,10 +343,11 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if (StringUtils.isNotEmpty(other.getAttribute())) {
PlatDeviceAttrWechatDTO deviceAttrWechatDTO = JsonUtil.toObj(other.getAttribute(), PlatDeviceAttrWechatDTO.class);
//更新区域设置设备安装方式
platRegionSettingService.update(new UpdateWrapper<PlatRegionSetting>().lambda()
.set(PlatRegionSetting::getInstallType, deviceAttrWechatDTO.getRadarMount())
.eq(PlatRegionSetting::getDeviceId, other.getDeviceId()));
if (deviceAttrWechatDTO != null) {
deviceAttrWechatDTO.setDeviceId(db.getId());
//更新区域设置设备安装方式
editDeviceProperties(deviceAttrWechatDTO);
}
}
}
......@@ -393,7 +394,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if (StringUtils.isNotEmpty(dto.getAttribute())) {
// 写入设备
PlatDeviceAttrWechatDTO platDeviceAttrWechatDTO = JSON.parseObject(dto.getAttribute(), PlatDeviceAttrWechatDTO.class);
platDeviceAttrWechatDTO.setDeviceId(db.getOriDeviceId());
platDeviceAttrWechatDTO.setDeviceId(db.getId());
editDeviceProperties(platDeviceAttrWechatDTO);
}
}
......
......@@ -502,7 +502,8 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
JSONObject jsonObject = JSON.parseObject(fallResult);
vo.setDeviceId(platDevice.getId());
vo.setOriDeviceId(platDevice.getOriDeviceId());
vo.setTrack((List<Integer>) jsonObject.get("track"));
Object track = jsonObject.get("track");
vo.setTrack((track == null ? Lists.newArrayList() : (List<Integer>) track));
vo.setPersonState(Integer.valueOf(jsonObject.getString("personState")));
vo.setMount(Integer.valueOf(jsonObject.getString("mount")));
vo.setType(2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment