|  | @ -248,7 +248,8 @@ public class DeviceController {
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     @ApiOperation("爱牵挂设备睡眠接收")
 |  | 
 | 
												
													
														
															|  | 
 |  |     /*******************************************睡眠带begin****************************************************************/
 | 
												
													
														
															|  | 
 |  |     @ApiOperation("爱牵挂-睡眠带睡眠接收")
 | 
												
													
														
															|  |     @RequestMapping(value = "bySleep", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
 |  |     @RequestMapping(value = "bySleep", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
 | 
												
													
														
															|  |     public String bySleep(
 |  |     public String bySleep(
 | 
												
													
														
															|  |             @ApiParam(name="device",required = false,value="睡眠带MAC地址",defaultValue = "")
 |  |             @ApiParam(name="device",required = false,value="睡眠带MAC地址",defaultValue = "")
 | 
												
											
												
													
														
															|  | @ -269,7 +270,7 @@ public class DeviceController {
 | 
												
													
														
															|  |         try {
 |  |         try {
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             String paraString = JSON.toJSONString(request.getParameterMap());
 |  |             String paraString = JSON.toJSONString(request.getParameterMap());
 | 
												
													
														
															|  |             logger.info("爱牵挂睡眠接收,请求参数:"+paraString);
 |  | 
 | 
												
													
														
															|  | 
 |  |             logger.info("爱牵挂-睡眠带接收,请求参数:"+paraString);
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             deviceService.bySleep(device,time_begin,heartrate,breath,turn_over,is_warn);
 |  |             deviceService.bySleep(device,time_begin,heartrate,breath,turn_over,is_warn);
 | 
												
													
														
															|  |             return success();
 |  |             return success();
 | 
												
											
												
													
														
															|  | @ -279,7 +280,7 @@ public class DeviceController {
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     @ApiOperation("爱牵挂设备睡眠报告接收")
 |  | 
 | 
												
													
														
															|  | 
 |  |     @ApiOperation("爱牵挂-睡眠带睡眠报告接收")
 | 
												
													
														
															|  |     @RequestMapping(value = "bySleepReport", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
 |  |     @RequestMapping(value = "bySleepReport", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
 | 
												
													
														
															|  |     public String bySleep(
 |  |     public String bySleep(
 | 
												
													
														
															|  |             @ApiParam(name="device",required = false,value="睡眠带MAC地址",defaultValue = "")
 |  |             @ApiParam(name="device",required = false,value="睡眠带MAC地址",defaultValue = "")
 | 
												
											
												
													
														
															|  | @ -325,7 +326,7 @@ public class DeviceController {
 | 
												
													
														
															|  |         try {
 |  |         try {
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             String paraString = JSON.toJSONString(request.getParameterMap());
 |  |             String paraString = JSON.toJSONString(request.getParameterMap());
 | 
												
													
														
															|  |             logger.info("爱牵挂睡眠接收,请求参数:"+paraString);
 |  | 
 | 
												
													
														
															|  | 
 |  |             logger.info("爱牵挂-睡眠带睡眠报考,请求参数:"+paraString);
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             deviceService.bySleepReport(device,date,fallasleep,sleepTime,restTime,awakeTime,lightTime,remTime,deepTime,bucket,
 |  |             deviceService.bySleepReport(device,date,fallasleep,sleepTime,restTime,awakeTime,lightTime,remTime,deepTime,bucket,
 | 
												
													
														
															|  |                     avghr,avgbr,awakePer,remPer,lightPer,efficiency,score);
 |  |                     avghr,avgbr,awakePer,remPer,lightPer,efficiency,score);
 | 
												
											
												
													
														
															|  | @ -336,7 +337,31 @@ public class DeviceController {
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |     @ApiOperation("爱牵挂-睡眠带wifi在线状态接收")
 | 
												
													
														
															|  | 
 |  |     @RequestMapping(value = "byOnlineStatus", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
 | 
												
													
														
															|  | 
 |  |     public String byOnlineStatus(
 | 
												
													
														
															|  | 
 |  |             @ApiParam(name="device",required = false,value="睡眠带MAC地址",defaultValue = "")
 | 
												
													
														
															|  | 
 |  |             @RequestParam(value = "device",required = true) String device,
 | 
												
													
														
															|  | 
 |  |             @ApiParam(name="onlinestatu",required = false,value="在线状态(0不在线,1在线)")
 | 
												
													
														
															|  | 
 |  |             @RequestParam(value = "onlinestatu",required = false) String onlinestatu,
 | 
												
													
														
															|  | 
 |  |             @ApiParam(name="time_begin",required = false,value="发生时间YYYY-MM-DD HH:mm:SS")
 | 
												
													
														
															|  | 
 |  |             @RequestParam(value = "time_begin",required = false) String time_begin,
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |             HttpServletRequest request) {
 | 
												
													
														
															|  | 
 |  |         try {
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |             String paraString = JSON.toJSONString(request.getParameterMap());
 | 
												
													
														
															|  | 
 |  |             logger.info("爱牵挂-睡眠带wifi在线状态接收:"+paraString);
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |             deviceService.byOnlineStatus(device,onlinestatu,time_begin);
 | 
												
													
														
															|  | 
 |  |             return success();
 | 
												
													
														
															|  | 
 |  |         } catch (Exception e) {
 | 
												
													
														
															|  | 
 |  |             e.printStackTrace();
 | 
												
													
														
															|  | 
 |  |             return error(-1,"Device data incoming failure");
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |     /*******************************************睡眠带end****************************************************************/
 | 
												
													
														
															|  |     /**
 |  |     /**
 | 
												
													
														
															|  |      * 返回接口处理结果
 |  |      * 返回接口处理结果
 | 
												
													
														
															|  |      *
 |  |      *
 |