|  | @ -2,6 +2,7 @@ package com.yihu.jw.hospital.endpoint.consult;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONArray;
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | import com.thoughtworks.xstream.mapper.Mapper;
 | 
	
		
			
				|  |  | import com.yihu.jw.doctor.dao.BaseDoctorDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 | 
	
	
		
			
				|  | @ -32,6 +33,7 @@ import com.yihu.jw.wlyy.service.WlyyBusinessService;
 | 
	
		
			
				|  |  | import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiParam;
 | 
	
		
			
				|  |  | import org.apache.commons.collections.map.HashedMap;
 | 
	
		
			
				|  |  | import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | import org.slf4j.Logger;
 | 
	
		
			
				|  |  | import org.slf4j.LoggerFactory;
 | 
	
	
		
			
				|  | @ -463,8 +465,23 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 	                                   @RequestParam(value = "cancelValue", required = false)String cancelValue,
 | 
	
		
			
				|  |  | 	                                   @ApiParam(name = "cancelRemark", value = "取消原因详细说明")
 | 
	
		
			
				|  |  | 	                                   @RequestParam(value = "cancelRemark", required = false)String cancelRemark) {
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		return success(prescriptionService.cancelOutPatient(outPatientId,cancelType,cancelValue,cancelRemark,2,wxId));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 		Map<String,Object> map = new HashedMap();
 | 
	
		
			
				|  |  | 		try {
 | 
	
		
			
				|  |  | 			map = prescriptionService.cancelOutPatient(outPatientId,cancelType,cancelValue,cancelRemark,2,wxId);
 | 
	
		
			
				|  |  | 			if (map != null) {
 | 
	
		
			
				|  |  | 				if (map.get("code").toString().equalsIgnoreCase("1")){
 | 
	
		
			
				|  |  | 					String patientName = map.get("patientName").toString();
 | 
	
		
			
				|  |  | 					String doctor = map.get("doctor").toString();
 | 
	
		
			
				|  |  | 					String doctorName = map.get("doctorName").toString();
 | 
	
		
			
				|  |  | 					String immsg = imService.sendOutPatientCancle(patientName,doctor,doctorName,"system",cancelRemark,cancelValue);
 | 
	
		
			
				|  |  | 					System.out.println("发送拒绝接诊消息成功:"+immsg);
 | 
	
		
			
				|  |  | 				}
 | 
	
		
			
				|  |  | 			}
 | 
	
		
			
				|  |  | 		}catch (Exception e){
 | 
	
		
			
				|  |  | 			System.out.println("发送拒绝接诊消息失败:"+e.getMessage());
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		return success(map);
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	
 |