|
@ -928,7 +928,7 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
|
|
try {
|
|
try {
|
|
JSONObject json = new JSONObject();
|
|
JSONObject json = new JSONObject();
|
|
String endDate = getNewDate(date,day);
|
|
String endDate = getNewDate(date,day);
|
|
if (type.equals("hear")){
|
|
|
|
|
|
if (type.equals("hear") || type.equals("all")){
|
|
//心率
|
|
//心率
|
|
List<Map<String,Object>> hearDo = monitorPlatformService.getHeartByPatient(patient,date,endDate);
|
|
List<Map<String,Object>> hearDo = monitorPlatformService.getHeartByPatient(patient,date,endDate);
|
|
if (hearDo.size() > 0){
|
|
if (hearDo.size() > 0){
|
|
@ -937,7 +937,7 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
|
|
json.put("hear",0);//心率
|
|
json.put("hear",0);//心率
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (type.equals("score")){
|
|
|
|
|
|
if (type.equals("score") || type.equals("all")){
|
|
//健康分 retWeekTime("week"); 周的健康分
|
|
//健康分 retWeekTime("week"); 周的健康分
|
|
List<Map<String, Object>> scoreDO = monitorPlatformService.getHealthScoreByPatient(patient,date,endDate);
|
|
List<Map<String, Object>> scoreDO = monitorPlatformService.getHealthScoreByPatient(patient,date,endDate);
|
|
if (scoreDO.size() > 0){
|
|
if (scoreDO.size() > 0){
|
|
@ -949,7 +949,7 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
|
|
json.put("total",0); //健康分值总分
|
|
json.put("total",0); //健康分值总分
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (type.equals("realtime")){
|
|
|
|
|
|
if (type.equals("realtime") || type.equals("all")){
|
|
// 实时数据
|
|
// 实时数据
|
|
List<Map<String, Object>> realtimeDateDo = monitorPlatformService.getRealtimeDateByPatient(patient,date);
|
|
List<Map<String, Object>> realtimeDateDo = monitorPlatformService.getRealtimeDateByPatient(patient,date);
|
|
if (realtimeDateDo.size() > 0){
|
|
if (realtimeDateDo.size() > 0){
|
|
@ -963,7 +963,7 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
|
|
json.put("realtimecal",0); //实时卡路里,累积卡路里
|
|
json.put("realtimecal",0); //实时卡路里,累积卡路里
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (type.equals("runData")){
|
|
|
|
|
|
if (type.equals("runData") || type.equals("all")){
|
|
//运动数据 runDate
|
|
//运动数据 runDate
|
|
List<Map<String , Object>> rundateDo = monitorPlatformService.getRundatePatient(patient,date);
|
|
List<Map<String , Object>> rundateDo = monitorPlatformService.getRundatePatient(patient,date);
|
|
if (rundateDo.size() > 0){
|
|
if (rundateDo.size() > 0){
|
|
@ -985,7 +985,7 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
|
|
json.put("runCalories",0); //跑步消耗卡路里
|
|
json.put("runCalories",0); //跑步消耗卡路里
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (type.equals("pai")){
|
|
|
|
|
|
if (type.equals("pai") || type.equals("all")){
|
|
//PAI数据
|
|
//PAI数据
|
|
List<Map<String,Object>> paiDo = monitorPlatformService.getPaiPatient(patient,date);
|
|
List<Map<String,Object>> paiDo = monitorPlatformService.getPaiPatient(patient,date);
|
|
if (paiDo.size() > 0){
|
|
if (paiDo.size() > 0){
|
|
@ -997,7 +997,7 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
|
|
json.put("dailyPai",0); //总距离
|
|
json.put("dailyPai",0); //总距离
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (type.equals("sleepData")){
|
|
|
|
|
|
if (type.equals("sleepData") || type.equals("all")){
|
|
//睡眠数据
|
|
//睡眠数据
|
|
List<Map<String , Object>> sleepDo = monitorPlatformService.getSleepByPatient(patient,date);
|
|
List<Map<String , Object>> sleepDo = monitorPlatformService.getSleepByPatient(patient,date);
|
|
if (sleepDo.size() > 0){
|
|
if (sleepDo.size() > 0){
|