Commit b0c8159e by huangjy

fix:修复bug

parent ac42e957
......@@ -206,7 +206,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if (StringUtils.isNotEmpty(dto.getAttribute())) {
PlatDeviceOther other = platDeviceOtherService.getOne(new QueryWrapper<PlatDeviceOther>().lambda()
.eq(PlatDeviceOther::getDeviceId, db.getId()));
.eq(PlatDeviceOther::getOriDeviceId, db.getOriDeviceId()));
if (other != null) {
other.setAttribute(dto.getAttribute());
platDeviceOtherService.updateById(other);
......@@ -382,6 +382,13 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
other.setOriDeviceId(db.getOriDeviceId());
platDeviceOtherService.saveOrUpdate(other);
if (StringUtils.isNotEmpty(dto.getAttribute())) {
// 写入设备
PlatDeviceAttrWechatDTO platDeviceAttrWechatDTO = JSON.parseObject(dto.getAttribute(), PlatDeviceAttrWechatDTO.class);
platDeviceAttrWechatDTO.setDeviceId(db.getOriDeviceId());
editDeviceProperties(platDeviceAttrWechatDTO);
}
}
/**
......
......@@ -463,6 +463,7 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
platDeviceList.forEach(e -> {
List<PlatDayDurationRecord> recordList = platDayDurationRecordService.list(new QueryWrapper<PlatDayDurationRecord>().lambda()
.eq(PlatDayDurationRecord::getDeviceId, e.getId())
.eq(StringUtils.isNotEmpty(platElderIdDTO.getElderId()),PlatDayDurationRecord::getElderIds,platElderIdDTO.getElderId())
.in(PlatDayDurationRecord::getDay, StreamUtil.map(nowList, dateTimeFormatter::format))
);
......
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