|  | @ -145,7 +145,7 @@ public class CustomerService extends BaseService{
 | 
	
		
			
				|  |  | 	public Map<String, Object> sendMsg(Doctor doctor,String msg,String type) {
 | 
	
		
			
				|  |  | 		Map<String, Object> resp = new HashMap<String, Object>();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 		//发送微信消息啦
 | 
	
		
			
				|  |  | 		//发送微信消息
 | 
	
		
			
				|  |  | 		String openId = doctor.getOpenid();
 | 
	
		
			
				|  |  | 		if(!StringUtils.isBlank(openId)&&!"1".equals(type)){
 | 
	
		
			
				|  |  | 			List<NameValuePair> par = new ArrayList<NameValuePair>();
 | 
	
	
		
			
				|  | @ -189,6 +189,31 @@ public class CustomerService extends BaseService{
 | 
	
		
			
				|  |  | 		return resp;
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 	public Map<String,Object> sendCallServiceWXMes(String openid,String doctorName,String patientName,String typeName,String mobile,String remark){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 		Map<String, Object> resp = new HashMap<String, Object>();
 | 
	
		
			
				|  |  | 		List<NameValuePair> par = new ArrayList<NameValuePair>();
 | 
	
		
			
				|  |  | 		par.add(new BasicNameValuePair("openIds", openid));
 | 
	
		
			
				|  |  | 		par.add(new BasicNameValuePair("doctorName", doctorName));
 | 
	
		
			
				|  |  | 		par.add(new BasicNameValuePair("patientName", patientName));
 | 
	
		
			
				|  |  | 		par.add(new BasicNameValuePair("typeName", typeName));
 | 
	
		
			
				|  |  | 		par.add(new BasicNameValuePair("mobile", mobile));
 | 
	
		
			
				|  |  | 		par.add(new BasicNameValuePair("remark", remark));
 | 
	
		
			
				|  |  | 		try {
 | 
	
		
			
				|  |  | 			logger.info("====================================================================");
 | 
	
		
			
				|  |  | 			String result = HttpClientUtil.post(messageApi+"/sendCallServerWechatMessage", par,"UTF-8");
 | 
	
		
			
				|  |  | 			logger.info("微信发送消息返回结果:"+result);
 | 
	
		
			
				|  |  | 			logger.info("====================================================================");
 | 
	
		
			
				|  |  | 			JSONObject resultJson = new JSONObject(result);
 | 
	
		
			
				|  |  | 			if(1!=resultJson.getInt("successNum")){
 | 
	
		
			
				|  |  | 				resp.put("wechat","-1");//-1代表发送失败
 | 
	
		
			
				|  |  | 			}
 | 
	
		
			
				|  |  | 		}catch (Exception e){
 | 
	
		
			
				|  |  | 			resp.put("wechat","-1");//-1代表发送失败
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		return resp;
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 	public Map<String,Object> addCallRecord(String user,Integer type,String callerNumber,String recipientNumber,Integer status){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -440,7 +465,7 @@ public class CustomerService extends BaseService{
 | 
	
		
			
				|  |  | 		//待处理发送消息给医生
 | 
	
		
			
				|  |  | 		sendCallServiceMes(callService);
 | 
	
		
			
				|  |  | 		//发送消息
 | 
	
		
			
				|  |  | 		sendWxMes(callService,u);
 | 
	
		
			
				|  |  | 		sendWxMes(callService);
 | 
	
		
			
				|  |  | 		return "1";
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -468,20 +493,18 @@ public class CustomerService extends BaseService{
 | 
	
		
			
				|  |  | 		//待处理发送消息给医生
 | 
	
		
			
				|  |  | 		sendCallServiceMes(callService);
 | 
	
		
			
				|  |  | 		//发送消息
 | 
	
		
			
				|  |  | 		sendWxMes(callService,u);
 | 
	
		
			
				|  |  | 		sendWxMes(callService);
 | 
	
		
			
				|  |  | 		return "1";
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 	public void sendWxMes(CallService callService,User u){
 | 
	
		
			
				|  |  | 	public void sendWxMes(CallService callService){
 | 
	
		
			
				|  |  | 		Doctor d = doctorDao.findByCode(callService.getDoctor());
 | 
	
		
			
				|  |  | 		String mes = u.getName()+"(工号:"+u.getJobNo()+")代居民("+callService.getPatientName()+")发:" ;
 | 
	
		
			
				|  |  | 		if(callService.getType()==1){
 | 
	
		
			
				|  |  | 			mes += callService.getPatientName()+"需要预约挂号";
 | 
	
		
			
				|  |  | 		CallRecord r = callRecordDao.findByCode(callService.getCallCode());
 | 
	
		
			
				|  |  | 		if("0".equals(callService.getType())){
 | 
	
		
			
				|  |  | 			sendCallServiceWXMes(d.getOpenid(),callService.getDoctorName(),callService.getPatientName(),"咨询",r.getCallerNumber(),callService.getServerContent());
 | 
	
		
			
				|  |  | 		}else{
 | 
	
		
			
				|  |  | 			mes += callService.getPatientName()+"发起咨询";
 | 
	
		
			
				|  |  | 			sendCallServiceWXMes(d.getOpenid(),callService.getDoctorName(),callService.getPatientName(),"待预约",r.getCallerNumber(),callService.getServerContent());
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		mes +="\n请您登录i健康app,进入协同服务管理进行查看处理。";
 | 
	
		
			
				|  |  | 		sendMsg(d,mes,"2");
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 	public void sendCallServiceMes(CallService callService){
 |