|  | @ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.im.ConsultTeamDo;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.patient.BasePatientDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.wx.WxWechatDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.prescription.service.PrescriptionService;
 | 
	
		
			
				|  |  | import com.yihu.jw.im.service.ImService;
 | 
	
		
			
				|  |  | import com.yihu.jw.patient.service.BasePatientService;
 | 
	
	
		
			
				|  | @ -14,6 +15,7 @@ import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
 | 
	
		
			
				|  |  | import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
 | 
	
		
			
				|  |  | import com.yihu.jw.rm.patient.PatientRequestMapping;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.date.DateUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.wechat.dao.WechatDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.wechat.service.WechatInfoService;
 | 
	
		
			
				|  |  | import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiOperation;
 | 
	
	
		
			
				|  | @ -46,6 +48,9 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 	@Autowired
 | 
	
		
			
				|  |  | 	private WechatInfoService wechatInfoService;
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@Autowired
 | 
	
		
			
				|  |  | 	private WechatDao wechatDao;
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@GetMapping(value = BaseHospitalRequestMapping.PatientIM.records)
 | 
	
		
			
				|  |  | 	@ApiOperation(value = "患者咨询记录查询")
 | 
	
		
			
				|  |  | 	public ListEnvelop records(
 | 
	
	
		
			
				|  | @ -314,7 +319,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@GetMapping(value = BaseHospitalRequestMapping.PatientIM.getEvaluationByConsultCode)
 | 
	
		
			
				|  |  | 	@ApiOperation(value = "评价咨询", notes = "评价咨询")
 | 
	
		
			
				|  |  | 	@ApiOperation(value = "根据咨询CODE获取评价", notes = "根据咨询CODE获取评价")
 | 
	
		
			
				|  |  | 	public ListEnvelop getEvaluationByConsultCode(
 | 
	
		
			
				|  |  | 			@ApiParam(name = "consult", value = "咨询CODE")
 | 
	
		
			
				|  |  | 			@RequestParam(value = "consult",required = true) String consult)throws Exception{
 | 
	
	
		
			
				|  | @ -333,6 +338,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 	                       @RequestParam(value = "wxId", required = true)String wxId) throws Exception {
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		String ticket = wechatInfoService.getJsapi_ticketByToken(wxId);
 | 
	
		
			
				|  |  | 		WxWechatDO wxWechatDO = wechatDao.findById(wxId);
 | 
	
		
			
				|  |  | 		Map<Object, Object> map = new HashMap<Object, Object>();
 | 
	
		
			
				|  |  | 		if (ticket != null) {
 | 
	
		
			
				|  |  | 			String noncestr = UUID.randomUUID().toString();
 | 
	
	
		
			
				|  | @ -344,6 +350,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 			map.put("noncestr", noncestr);
 | 
	
		
			
				|  |  | 			map.put("timestamp", timestamp);
 | 
	
		
			
				|  |  | 			map.put("signature", signature);
 | 
	
		
			
				|  |  | 			map.put("appid", wxWechatDO.getAppId());
 | 
	
		
			
				|  |  | 			return success(PatientRequestMapping.Wechat.api_success,map);
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		return failed(PatientRequestMapping.Wechat.api_error);
 |