Commit a71b987e by huangjy

fix:停留时间,区域定位问题,设备写入

parent 8f777483
......@@ -64,5 +64,14 @@ public class PlatElderSleepController {
return ApiResponseUtils.success();
}
@ApiOperation("读设备属性")
@PostMapping("rearDeviceProperties")
@AuthIgnore
@TenantIdIgnore
public ApiResponseEntity<?> rearDeviceProperties(@RequestBody PlatDeviceAttrWechatDTO dto) {
platDeviceService.readDeviceProperties(dto);
return ApiResponseUtils.success();
}
}
......@@ -31,5 +31,7 @@ public class PlatDeviceAttrWechatDTO {
private Integer radarHight;
private String readProperties;
@ApiModelProperty(value = "服务信息")
private String usrServerInfo;
}
......@@ -110,6 +110,7 @@ public class BehaviorAlarm implements IAlarm {
if(duration1 != 0) {
alarmRedisDTO.setAlarm(CommonEnum.YES.getValue());
RedisUtil.set(RedisConst.ALARM_DEVICE_BEHAVIOR_ID + deviceId, alarmRedisDTO);
platAlarmCheckDTO.setAbnormalValue(String.valueOf(count));
notice(platAlarmCheckDTO);
}
}
......
......@@ -9,10 +9,10 @@ import com.makeit.entity.platform.elder.PlatElderBreatheAnalysis;
import com.makeit.entity.platform.elder.PlatElderSleep;
import com.makeit.entity.platform.elder.PlatElderSleepAnalysis;
import com.makeit.enums.platform.alarm.PlatAlarmConfigEnum;
import com.makeit.module.iot.enums.DeviceInfoContentFallEnum;
import com.makeit.module.iot.service.IotProductDeviceService;
import com.makeit.module.iot.vo.breathe.DeviceInfoContentBreathe;
import com.makeit.module.iot.vo.fall.DeviceInfoContentFall;
import com.makeit.module.iot.vo.space.DeviceInfoContentSpace;
import com.makeit.service.platform.alarm.PlatAlarmRecordService;
import com.makeit.service.platform.alarm.PlatDayDurationRecordService;
import com.makeit.service.platform.elder.*;
......@@ -374,38 +374,6 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
@Override
public List<PlatElderCoordinateVO> coordinateList(String elderId, String deviceId, LocalDateTime start, LocalDateTime end) {
List<PlatDevice> platDeviceList = platElderRealTimeService.getSpaceDevice(elderId, deviceId);
if (CollectionUtils.isEmpty(platDeviceList)) {
return new ArrayList<>(10);
}
List<PlatElderCoordinateVO> voList = new ArrayList<>(10);
// TODO 暂时为假数据
int count = 20;
for (PlatDevice platDevice : platDeviceList) {
for (int i = 0; i < count; i++) {
PlatElderCoordinateVO vo = new PlatElderCoordinateVO();
int distance = RandomUtils.nextInt(1, 1000);
int angle = RandomUtils.nextInt(1,180) -120;
// vo.setX(new BigDecimal(distance).multiply(new BigDecimal(Math.cos(angle) + "")).setScale(2, RoundingMode.HALF_UP));
// vo.setY(new BigDecimal(distance).multiply(new BigDecimal(Math.sin(angle) + "")).setScale(2, RoundingMode.HALF_UP));
vo.setDistance(distance);
vo.setAngle(angle);
vo.setDeviceId(platDevice.getId());
vo.setOriDeviceId(platDevice.getOriDeviceId());
voList.add(vo);
}
}
return voList;
/*
List<PlatDevice> platDeviceListSpace = platElderRealTimeService.getSpaceDevice(elderId, deviceId);
List<PlatDevice> platDeviceListFall = platElderRealTimeService.getFallDevice(elderId, deviceId);
......@@ -447,7 +415,6 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
PlatElderCoordinateVO vo = new PlatElderCoordinateVO();
vo.setTrack(i.getProperties().getTrack());
vo.setDeviceId(e.getId());
vo.setOriDeviceId(e.getOriDeviceId());
......@@ -455,11 +422,9 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
})
);
});
return voList;
*/
}
@Override
......
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