| 
					
				 | 
			
			
				@ -1,8 +1,13 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				package com.yihu.jw.care.endpoint.statistics; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.alibaba.fastjson.JSON; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.alibaba.fastjson.JSONArray; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.alibaba.fastjson.JSONObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.endpoint.BaseController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.device.PatientDeviceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.statistics.DetectionPlatformService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.ResponseContant; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.Envelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.ListEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.ObjEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.PageEnvelop; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -11,10 +16,7 @@ import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.GetMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.RequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.RequestParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.RestController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				/*** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * @ClassName: DetectionPlatformEndpoint 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -30,6 +32,8 @@ public class DetectionPlatformEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private DetectionPlatformService platformService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private PatientDeviceService patientDeviceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = "getHealthMonitoringListNew") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "体征监测/安防监护") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -109,4 +113,43 @@ public class DetectionPlatformEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation("获取设备详情信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "getPatientDeviceDetail",method = RequestMethod.GET) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop getPatientDeviceDetail(@ApiParam(name="patient") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "patient")String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @ApiParam(name="deviceSN") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "deviceSN")String deviceSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @ApiParam(name="day",value = "yyyy-mm-dd") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "day",required = false)String day){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            org.json.JSONObject result = patientDeviceService.getPatientDeviceDetail(patient,deviceSn,day); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (result.getInt(ResponseContant.resultFlag)==ResponseContant.success){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return success(JSON.parseObject(result.getString(ResponseContant.resultMsg))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return success(result.getString(ResponseContant.resultMsg), -1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return failedObjEnvelopException(e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation("获取设备详情数据 --设备可多人绑定查询数据时与patient无关") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "getPatientDeviceData",method = RequestMethod.GET) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop getPatientDeviceData(@ApiParam(name="patient") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "patient")String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @ApiParam(name="deviceSN") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "deviceSN")String deviceSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @ApiParam(name="page") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "page")Integer page, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @ApiParam(name="pageSize") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "pageSize")Integer pageSize){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(patientDeviceService.getPatientDeviceData(patient,deviceSn,page,pageSize)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return failedObjEnvelopException(e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |