|  | @ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 | 
												
													
														
															|  | import com.yihu.jw.care.endpoint.BaseController;
 |  | import com.yihu.jw.care.endpoint.BaseController;
 | 
												
													
														
															|  | import com.yihu.jw.care.service.assistance.EmergencyAssistanceService;
 |  | import com.yihu.jw.care.service.assistance.EmergencyAssistanceService;
 | 
												
													
														
															|  | import com.yihu.jw.care.service.common.DictService;
 |  | import com.yihu.jw.care.service.common.DictService;
 | 
												
													
														
															|  | 
 |  | import com.yihu.jw.care.service.device.PatientHealthIndexService;
 | 
												
													
														
															|  | import com.yihu.jw.care.service.doorCoach.DoctorDoorCoachOrderService;
 |  | import com.yihu.jw.care.service.doorCoach.DoctorDoorCoachOrderService;
 | 
												
													
														
															|  | import com.yihu.jw.care.service.doorCoach.PatientDoorCoachOrderService;
 |  | import com.yihu.jw.care.service.doorCoach.PatientDoorCoachOrderService;
 | 
												
													
														
															|  | import com.yihu.jw.care.service.lifeCare.LifeCareOrderService;
 |  | import com.yihu.jw.care.service.lifeCare.LifeCareOrderService;
 | 
												
											
												
													
														
															|  | @ -58,6 +59,8 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
 | 
												
													
														
															|  |     private BaseServiceNewsService baseServiceNewsService;
 |  |     private BaseServiceNewsService baseServiceNewsService;
 | 
												
													
														
															|  |     @Autowired
 |  |     @Autowired
 | 
												
													
														
															|  |     private DictService dictService;
 |  |     private DictService dictService;
 | 
												
													
														
															|  | 
 |  |     @Autowired
 | 
												
													
														
															|  | 
 |  |     private PatientHealthIndexService healthIndexService;
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     private BaseController baseController = new BaseController();
 |  |     private BaseController baseController = new BaseController();
 | 
												
													
														
															|  | 
 |  | 
 | 
												
											
												
													
														
															|  | @ -162,10 +165,32 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |     @GetMapping(value = "getHealthIndexInfoWithAvg")
 | 
												
													
														
															|  | 
 |  |     @ApiOperation("获取居民体征信息--带体征平均值")
 | 
												
													
														
															|  | 
 |  |     public String getHealthIndexInfoWithAvg(@ApiParam(name="patient",value="患者代码",defaultValue = "eb0b478fbe9245428ecf63cd7517206f")
 | 
												
													
														
															|  | 
 |  |                                      @RequestParam(value="patient",required = false) String patient,
 | 
												
													
														
															|  | 
 |  |                                      @ApiParam(name="type",value="指标类型",defaultValue = "1")
 | 
												
													
														
															|  | 
 |  |                                      @RequestParam(value="type",required = true) Integer type,
 | 
												
													
														
															|  | 
 |  |                                      @ApiParam(name="gi_type",value="就餐类型",defaultValue = "0")
 | 
												
													
														
															|  | 
 |  |                                      @RequestParam(value = "gi_type",required = false) Integer gi_type,
 | 
												
													
														
															|  | 
 |  |                                      @ApiParam(name="begin",value="开始时间",defaultValue = "2017-05-22 00:00:00")
 | 
												
													
														
															|  | 
 |  |                                      @RequestParam(value="begin",required = true) String begin,
 | 
												
													
														
															|  | 
 |  |                                      @ApiParam(name="end",value="结束时间",defaultValue = "2017-06-02 00:00:00")
 | 
												
													
														
															|  | 
 |  |                                      @RequestParam(value="end",required = true) String end,
 | 
												
													
														
															|  | 
 |  |                                      @ApiParam(name = "deviceSn",required = false)
 | 
												
													
														
															|  | 
 |  |                                      @RequestParam(value = "deviceSn",required = false) String deviceSn){
 | 
												
													
														
															|  | 
 |  |         try {
 | 
												
													
														
															|  | 
 |  |             return baseController.write(200,"查询成功","data",healthIndexService.findChartByPatientWithAvg(patient,type,gi_type,begin,end,deviceSn));
 | 
												
													
														
															|  | 
 |  |         }catch (Exception e){
 | 
												
													
														
															|  | 
 |  |             return baseController.errorResult(e);
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     @GetMapping(value = "getHealthIndexInfo")
 |  |     @GetMapping(value = "getHealthIndexInfo")
 | 
												
													
														
															|  |     @ApiOperation("获取居民体征信息")
 |  |     @ApiOperation("获取居民体征信息")
 | 
												
													
														
															|  |     public String getHealthIndexInfo(@ApiParam(name="patient",value="患者代码",defaultValue = "eb0b478fbe9245428ecf63cd7517206f")
 |  |     public String getHealthIndexInfo(@ApiParam(name="patient",value="患者代码",defaultValue = "eb0b478fbe9245428ecf63cd7517206f")
 | 
												
													
														
															|  |                                      @RequestParam(value="patient",required = true) String patient,
 |  | 
 | 
												
													
														
															|  | 
 |  |                                      @RequestParam(value="patient",required = false) String patient,
 | 
												
													
														
															|  |                                      @ApiParam(name="type",value="指标类型",defaultValue = "1")
 |  |                                      @ApiParam(name="type",value="指标类型",defaultValue = "1")
 | 
												
													
														
															|  |                                      @RequestParam(value="type",required = true) Integer type,
 |  |                                      @RequestParam(value="type",required = true) Integer type,
 | 
												
													
														
															|  |                                      @ApiParam(name="gi_type",value="就餐类型",defaultValue = "0")
 |  |                                      @ApiParam(name="gi_type",value="就餐类型",defaultValue = "0")
 | 
												
											
												
													
														
															|  | @ -173,9 +198,11 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
 | 
												
													
														
															|  |                                      @ApiParam(name="begin",value="开始时间",defaultValue = "2017-05-22 00:00:00")
 |  |                                      @ApiParam(name="begin",value="开始时间",defaultValue = "2017-05-22 00:00:00")
 | 
												
													
														
															|  |                                      @RequestParam(value="begin",required = true) String begin,
 |  |                                      @RequestParam(value="begin",required = true) String begin,
 | 
												
													
														
															|  |                                      @ApiParam(name="end",value="结束时间",defaultValue = "2017-06-02 00:00:00")
 |  |                                      @ApiParam(name="end",value="结束时间",defaultValue = "2017-06-02 00:00:00")
 | 
												
													
														
															|  |                                      @RequestParam(value="end",required = true) String end){
 |  | 
 | 
												
													
														
															|  | 
 |  |                                      @RequestParam(value="end",required = true) String end,
 | 
												
													
														
															|  | 
 |  |                                      @ApiParam(name = "deviceSn",required = false)
 | 
												
													
														
															|  | 
 |  |                                      @RequestParam(value = "deviceSn",required = false) String deviceSn){
 | 
												
													
														
															|  |         try {
 |  |         try {
 | 
												
													
														
															|  |             return baseController.write (200,"查询成功","data",patientInfoPlatFormService.getHealthIndexInfo(patient,type,gi_type,begin,end));
 |  | 
 | 
												
													
														
															|  | 
 |  |             return baseController.write (200,"查询成功","data",patientInfoPlatFormService.getHealthIndexInfo(patient,type,gi_type,begin,end,deviceSn));
 | 
												
													
														
															|  |         }catch (Exception e){
 |  |         }catch (Exception e){
 | 
												
													
														
															|  |             return baseController.errorResult(e);
 |  |             return baseController.errorResult(e);
 | 
												
													
														
															|  |         }
 |  |         }
 |