睡眠接口修改
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ public class ScreenAnimation implements Serializable {
|
||||
@Schema(title = "动画地址")
|
||||
private String videoUrl;
|
||||
/**
|
||||
* 简介
|
||||
* 简介 (目前没有启用该字段 20260105用此字段存储封面图)
|
||||
*/
|
||||
@Schema(title = "简介")
|
||||
private String description;
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.renkang.watch.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author TianZi
|
||||
* @date 2023/12/5 17:33
|
||||
*/
|
||||
@Data
|
||||
public class BigScreenSleepBaseVo {
|
||||
@Parameter(description = "人数")
|
||||
private Integer peopleSum;
|
||||
|
||||
@Parameter(description = "清醒时长")
|
||||
private List<BigScreenSleepVo> sleepInfo;
|
||||
}
|
||||
+7
-4
@@ -12,9 +12,7 @@ import com.renkang.watch.dto.BigScreenDTO;
|
||||
import com.renkang.watch.dto.XjScreenAbnormalParam;
|
||||
import com.renkang.watch.entity.*;
|
||||
import com.renkang.watch.service.*;
|
||||
import com.renkang.watch.vo.BigScreenSdcVo;
|
||||
import com.renkang.watch.vo.BigScreenSleepVo;
|
||||
import com.renkang.watch.vo.BigScreenVo;
|
||||
import com.renkang.watch.vo.*;
|
||||
import com.renkang.watch.vo.UserData.StatisticsReq;
|
||||
import com.renkang.watch.vo.UserData.res.Stress.WatchDataStressRes;
|
||||
import com.renkang.watch.vo.UserData.res.bloodOxygen.BloodOxygenStat;
|
||||
@@ -23,7 +21,6 @@ import com.renkang.watch.vo.UserData.res.heartRate.WatchDataHeartRateRes;
|
||||
import com.renkang.watch.vo.UserData.res.sleep.WatchDataSleepPageRes;
|
||||
import com.renkang.watch.vo.UserData.res.sleep.WatchDataSleepRes;
|
||||
import com.renkang.watch.vo.UserData.res.step.WatchDataStepRes;
|
||||
import com.renkang.watch.vo.XjScreenAbnormalVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -380,6 +377,12 @@ public class WatchDataController extends JeecgController<WatchData, IWatchDataSe
|
||||
return Result.OK(vo);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/getSleep/v2")
|
||||
@Operation(summary = "大屏副屏(睡眠20260105版本)", description = "大屏副屏(睡眠20260105版本)")
|
||||
public Result<BigScreenSleepBaseVo> getSleepV2(@RequestBody BigScreenDTO dto) {
|
||||
return Result.OK(watchDataService.getSleepV2(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 七天 活跃 跑数据
|
||||
* @return
|
||||
|
||||
+8
-4
@@ -8,10 +8,7 @@ import com.renkang.watch.bean.response.UserDataDetail;
|
||||
import com.renkang.watch.dto.BigScreenDTO;
|
||||
import com.renkang.watch.dto.XjScreenAbnormalParam;
|
||||
import com.renkang.watch.entity.WatchData;
|
||||
import com.renkang.watch.vo.BigScreenSdcVo;
|
||||
import com.renkang.watch.vo.BigScreenSleepVo;
|
||||
import com.renkang.watch.vo.BigScreenVo;
|
||||
import com.renkang.watch.vo.XjScreenAbnormalVO;
|
||||
import com.renkang.watch.vo.*;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -79,4 +76,11 @@ public interface IWatchDataService extends IService<WatchData> {
|
||||
* @return
|
||||
*/
|
||||
IPage<XjScreenAbnormalVO> abnormalPage(XjScreenAbnormalParam param);
|
||||
|
||||
/**
|
||||
* 大屏副屏(睡眠20260105版本)
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
BigScreenSleepBaseVo getSleepV2(BigScreenDTO dto);
|
||||
}
|
||||
|
||||
+18
@@ -27,6 +27,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.bean.request.ListUser;
|
||||
import org.jeecg.bean.response.BaseEmployeeInfo;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.exception.ExceptionAssertsUtil;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
@@ -1043,6 +1044,23 @@ public class WatchDataServiceImpl extends ServiceImpl<WatchDataMapper, WatchData
|
||||
return voList;
|
||||
}
|
||||
|
||||
/**
|
||||
*v2版本相较与同类中getSleep()方法目前只新统计了单位时间内的睡眠人数
|
||||
*/
|
||||
@Override
|
||||
public BigScreenSleepBaseVo getSleepV2(BigScreenDTO dto) {
|
||||
BigScreenSleepBaseVo vo = new BigScreenSleepBaseVo();
|
||||
if (!StrUtil.isNotBlank(dto.getType())) {
|
||||
ExceptionAssertsUtil.fail("时间不能为空");
|
||||
}
|
||||
//调用之前的接口查询柱状图数据
|
||||
List<BigScreenSleepVo> sleepInfo = getSleep(dto);
|
||||
//todo 查询存在睡眠数据的人数
|
||||
vo.setPeopleSum(0);
|
||||
vo.setSleepInfo(sleepInfo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, List<Integer>> userDataDayByMonth(String userId, Integer year) {
|
||||
//心率
|
||||
|
||||
Reference in New Issue
Block a user