|  | @ -84,6 +84,7 @@ import com.yihu.jw.wechat.dao.BasePatientWechatDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.wechat.dao.WechatDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.wechat.dao.WxPushLogDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.wechat.dao.WxTemplateConfigDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.wechat.enterprise.EnterpriseService;
 | 
	
		
			
				|  |  | import com.yihu.jw.wechat.service.BaseSensitiveFilterWordsService;
 | 
	
		
			
				|  |  | import com.yihu.jw.wechat.service.WxAccessTokenService;
 | 
	
		
			
				|  |  | import com.yihu.mysql.query.BaseJpaService;
 | 
	
	
		
			
				|  | @ -255,6 +256,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |     private DoctorMappingDao doctorMappingDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private PrescriptionSignDao prescriptionSignDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private EnterpriseService enterpriseService;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -880,6 +883,31 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //3.创建候诊室
 | 
	
		
			
				|  |  |         createRoom(outpatient, chargeType);
 | 
	
		
			
				|  |  |         //发送企业模板消息给医生
 | 
	
		
			
				|  |  |         String msg = "";
 | 
	
		
			
				|  |  |         String name=outpatient.getPatientName();
 | 
	
		
			
				|  |  |         String sex = "";
 | 
	
		
			
				|  |  |         String age="";
 | 
	
		
			
				|  |  |         String date = "";
 | 
	
		
			
				|  |  |         String title = "";
 | 
	
		
			
				|  |  |         String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatient.getDescription()+"&type=3&id="+outpatient.getId();
 | 
	
		
			
				|  |  |         if (patientDO!=null){
 | 
	
		
			
				|  |  |             sex=IdCardUtil.getSexForIdcard(patientDO.getIdcard());
 | 
	
		
			
				|  |  |             age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (outpatient!=null){
 | 
	
		
			
				|  |  |             if (outpatient.getType().equalsIgnoreCase("1")){
 | 
	
		
			
				|  |  |                 title = "图文复诊";
 | 
	
		
			
				|  |  |                 msg = name+"("+sex+" "+age+"岁)向您发起了图文复诊,点击查看";
 | 
	
		
			
				|  |  |             }else if (outpatient.getType().equalsIgnoreCase("2")){
 | 
	
		
			
				|  |  |                 title = "视频复诊";
 | 
	
		
			
				|  |  |                 date = DateUtil.dateToStrLong(outpatient.getRegisterDate());
 | 
	
		
			
				|  |  |                 msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
 | 
	
		
			
				|  |  |         System.out.println("发送企业模板消息成功");
 | 
	
		
			
				|  |  |         String content = "向您发起了图文复诊,点击查看";
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return outpatient;
 | 
	
		
			
				|  |  |     }
 | 
	
	
		
			
				|  | @ -1656,8 +1684,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |                 return res;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //下载银医通
 | 
	
		
			
				|  |  |         net.sf.json.JSONObject object1 = entranceService.qutpatientBalance(outpatientDO.getCardNo(), demoFlag);
 | 
	
		
			
				|  |  |         logger.info("下载银医通");
 | 
	
		
			
				|  |  |         net.sf.json.JSONObject rs = entranceService.BS10111(outpatientDO.getCardNo(), doctorMappingDO.getMappingCode(), outpatientDO.getDept(), null, outpatientDO.getWinNo(), demoFlag);
 | 
	
		
			
				|  |  |         net.sf.json.JSONObject res = rs.getJSONObject("resquest");
 | 
	
		
			
				|  |  |         logger.info("挂号结果 res: " + res.toString());
 |