| 
					
				 | 
			
			
				@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.dao.device.DeviceDetailDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.DeviceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.YsDeviceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.util.DeviceDataPushLogUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.care.device.DeviceDetail; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiOperation; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -44,6 +45,8 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private DeviceDetailDao deviceDetailDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private YsDeviceService ysDeviceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private DeviceDataPushLogUtil dataPushLogUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "/importDeviceFromExcel", produces = "application/json;charset=UTF-8",method = RequestMethod.POST) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ResponseBody 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -182,7 +185,7 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String paraString = JSON.toJSONString(request.getParameterMap()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceService.aqgsos(imei, label_mac, time_begin,request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            long endTime=System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            dataPushLogUtil.savePushLog(imei,paraString,"爱牵挂SOS数据接收"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂设备sos数据接收,请求参数:\n"+paraString+"\n"+(endTime-startTime)+"ms"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -206,7 +209,7 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String paraString = JSON.toJSONString(request.getParameterMap()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂设备开关机数据接收,请求参数:\n"+paraString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            dataPushLogUtil.savePushLog(imei,paraString,"爱牵挂开关机数据接收"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceService.aqgSwitch(imei, time_begin, remaining_power, type,request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -230,6 +233,7 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String paraString = JSON.toJSONString(request.getParameterMap()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceService.pushdata(type, deviceid, communityid, request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            long endTime=System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            dataPushLogUtil.savePushLog(deviceid,paraString,"爱牵挂消息通知接收"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂设备消息通知数据接收,请求参数:\n"+paraString+"\n"+(endTime-startTime)+"ms"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -264,7 +268,7 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String paraString = JSON.toJSONString(request.getParameterMap()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂位置接收,请求参数:\n"+paraString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            dataPushLogUtil.savePushLog(imei,paraString,"爱牵挂位置数据接收"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceService.byLocation(imei,time_begin,is_reply,is_track,city,address,lon,lat,type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -291,7 +295,7 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String paraString = JSON.toJSONString(request.getParameterMap()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂心率数据接收,请求参数: \n"+paraString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            dataPushLogUtil.savePushLog(imei,paraString,"爱牵挂心率数据接收"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceService.byHeartRate(imei,time_begin,heartrate,theshold_heartrate_h,theshold_heartrate_l); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -319,7 +323,7 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String paraString = JSON.toJSONString(request.getParameterMap()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂血压数据,接收请求参数:\n"+paraString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            dataPushLogUtil.savePushLog(imei,paraString,"爱牵挂血压数据接收"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceService.byBloodPressure(imei,time_begin,dbp,dbp_l,sbp,sbp_h); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -349,7 +353,7 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String paraString = JSON.toJSONString(request.getParameterMap()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂跌倒数据接收,请求参数: \n"+paraString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            dataPushLogUtil.savePushLog(imei,paraString,"爱牵挂跌倒数据接收"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceService.byFall(imei,time_begin,city,address,lon,lat,type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -371,7 +375,7 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String paraString = JSON.toJSONString(request.getParameterMap()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂步数接收,请求参数:\n"+paraString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            dataPushLogUtil.savePushLog(imei,paraString,"爱牵挂设备步数数据接收"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceService.bySteps(imei,time_begin,value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -405,7 +409,7 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceService.bySleep(device,time_begin,heartrate,breath,bed_status,turn_over,is_warn); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            long endTime=System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂-睡眠带接收,请求参数:"+paraString+"\n"+(endTime-startTime)+"ms"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            dataPushLogUtil.savePushLog(device,paraString,"睡眠带数据接收"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -459,8 +463,8 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String paraString = JSON.toJSONString(request.getParameterMap()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂-睡眠带睡眠报考,请求参数:"+paraString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂-睡眠带睡眠报告,请求参数:"+paraString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            dataPushLogUtil.savePushLog(device,paraString,"睡眠带报告数据接收"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceService.bySleepReport(device,date,fallasleep,sleepTime,restTime,awakeTime,lightTime,remTime,deepTime,bucket, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    avghr,avgbr,awakePer,remPer,lightPer,efficiency,score); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -485,7 +489,7 @@ public class DeviceController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String paraString = JSON.toJSONString(request.getParameterMap()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("爱牵挂-睡眠带wifi在线状态接收:"+paraString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            dataPushLogUtil.savePushLog(device,paraString,"睡眠带在线状态数据接收"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceService.byOnlineStatus(device,onlinestatu,time_begin); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 |