| 
					
				 | 
			
			
				@ -1,6 +1,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				package com.yihu.jw.care.endpoint.third.platForm; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.alibaba.fastjson.JSONObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.fasterxml.jackson.databind.ObjectMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.endpoint.BaseController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.assistance.EmergencyAssistanceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.doorCoach.DoctorDoorCoachOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.care.service.doorCoach.PatientDoorCoachOrderService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -10,18 +12,23 @@ import com.yihu.jw.care.service.third.PatientInfoPlatFormService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.ResponseContant; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.Envelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.ObjEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.lang.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.json.JSONArray; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				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 java.util.HashMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.Map; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * Created by Bing on 2021/6/16. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * 管理端pc端 居民详情大屏 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -97,21 +104,21 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = "getHealthIndexInfo") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiParam("获取居民体征信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop getHealthIndexInfo(@ApiParam(name="patient",value="患者代码",defaultValue = "eb0b478fbe9245428ecf63cd7517206f") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String getHealthIndexInfo(@ApiParam(name="patient",value="患者代码",defaultValue = "eb0b478fbe9245428ecf63cd7517206f") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @RequestParam(value="patient",required = true) String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name="type",value="指标类型",defaultValue = "1") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @ApiParam(name="type",value="指标类型",defaultValue = "1") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @RequestParam(value="type",required = true) int type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name="gi_type",value="就餐类型",defaultValue = "1") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @ApiParam(name="gi_type",value="就餐类型",defaultValue = "0") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @RequestParam(value = "gi_type",required = false) int gi_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @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, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @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){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return ObjEnvelop.getSuccess("查询成功",patientInfoPlatFormService.getHealthIndexInfo(patient,type,gi_type,begin,end)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write (200,"查询成功","data",patientInfoPlatFormService.getHealthIndexInfo(patient,type,gi_type,begin,end)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return ObjEnvelop.getError("获取失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return error(-1,"查询失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -193,4 +200,30 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String write(int code, String msg, String key, JSONArray value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            org.json.JSONObject json = new org.json.JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            json.put("status", code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            json.put("msg", msg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            json.put(key, value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return json.toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return error(-1, "服务器异常,请稍候再试!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String error(int code, String msg) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<Object, Object> map = new HashMap<Object, Object>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ObjectMapper mapper = new ObjectMapper(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            map.put("status", code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            map.put("msg", msg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return mapper.writeValueAsString(map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |