|  | @ -29,6 +29,8 @@ import com.yihu.jw.im.util.ImUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.im.util.ImageCompress;
 | 
	
		
			
				|  |  | import com.yihu.jw.patient.dao.BasePatientDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.hospital.consult.WlyyHospitalSysDictVO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionDiagnosisVO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionInfoVO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.im.ConsultVO;
 | 
	
		
			
				|  |  | import com.yihu.jw.rm.base.BaseRequestMapping;
 | 
	
	
		
			
				|  | @ -37,6 +39,7 @@ import com.yihu.jw.util.date.DateUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.wechat.service.WxAccessTokenService;
 | 
	
		
			
				|  |  | import org.apache.http.NameValuePair;
 | 
	
		
			
				|  |  | import org.apache.http.message.BasicNameValuePair;
 | 
	
		
			
				|  |  | import org.slf4j.LoggerFactory;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Value;
 | 
	
		
			
				|  |  | import org.springframework.data.domain.Page;
 | 
	
	
		
			
				|  | @ -55,6 +58,7 @@ import java.io.InputStream;
 | 
	
		
			
				|  |  | import java.net.HttpURLConnection;
 | 
	
		
			
				|  |  | import java.net.URL;
 | 
	
		
			
				|  |  | import java.util.*;
 | 
	
		
			
				|  |  | import java.util.logging.Logger;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | /**
 | 
	
		
			
				|  |  |  * IM接口业务类
 | 
	
	
		
			
				|  | @ -62,6 +66,9 @@ import java.util.*;
 | 
	
		
			
				|  |  |  */
 | 
	
		
			
				|  |  | @Service
 | 
	
		
			
				|  |  | public class ImService {
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	private org.slf4j.Logger logger = LoggerFactory.getLogger(ImService.class);
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@Autowired
 | 
	
		
			
				|  |  | 	public ConsultDao consultDao;
 | 
	
		
			
				|  |  | 	
 | 
	
	
		
			
				|  | @ -1325,4 +1332,26 @@ public class ImService {
 | 
	
		
			
				|  |  | 	public Integer sessionCountByType(String userid,Integer type,Integer status){
 | 
	
		
			
				|  |  | 		return imUtil.sessionCountByType(userid,type,status);
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	/**
 | 
	
		
			
				|  |  | 	 * 发送复诊诊断和药品消息
 | 
	
		
			
				|  |  | 	 * @param wlyyPrescriptionVO
 | 
	
		
			
				|  |  | 	 * @return
 | 
	
		
			
				|  |  | 	 */
 | 
	
		
			
				|  |  | 	public void pushPrescriptionImMessage(WlyyPrescriptionVO wlyyPrescriptionVO) throws Exception {
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//获取诊断
 | 
	
		
			
				|  |  | 		List<WlyyPrescriptionDiagnosisVO> wlyyPrescriptionDiagnosisVOS = wlyyPrescriptionVO.getDiagnosisVOs();
 | 
	
		
			
				|  |  | 		if(!wlyyPrescriptionDiagnosisVOS.isEmpty()){
 | 
	
		
			
				|  |  | 			String response = imUtil.sendImMsg(wlyyPrescriptionVO.getDoctor(), wlyyPrescriptionVO.getDoctorName(), wlyyPrescriptionVO.getPatientCode()+"_"+wlyyPrescriptionVO.getOutpatientId()+"_9", "28", JSON.toJSONString(wlyyPrescriptionDiagnosisVOS),"1");
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//获取药品
 | 
	
		
			
				|  |  | 		List<WlyyPrescriptionInfoVO> infoVOs = wlyyPrescriptionVO.getInfoVOs();
 | 
	
		
			
				|  |  | 		if(!infoVOs.isEmpty()){
 | 
	
		
			
				|  |  | 			String response = imUtil.sendImMsg(wlyyPrescriptionVO.getDoctor(), wlyyPrescriptionVO.getDoctorName(), wlyyPrescriptionVO.getPatientCode()+"_"+wlyyPrescriptionVO.getOutpatientId()+"_9", "28", JSON.toJSONString(infoVOs),"1");
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | }
 |