| 
					
				 | 
			
			
				@ -2599,6 +2599,23 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    ins.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    ins.setPrescriptionId(prescription.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    ins.setOutpatientId(outPatientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        String code = ins.getCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        com.alibaba.fastjson.JSONArray jsonArray = ykyyEntranceService.findZlxm("",code,"","",""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if (jsonArray!=null&&jsonArray.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            com.alibaba.fastjson.JSONObject deptobject = jsonArray.getJSONObject(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            String deptNo = deptobject.getString("dept"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            ins.setDept(deptNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            String yqdm = deptobject.getString("yqdm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            if ("1001".equalsIgnoreCase(yqdm)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                ins.setOrgCode(yqdm); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                ins.setOrgName("思北院区"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                ins.setOrgCode(yqdm); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                ins.setOrgName("五缘院区"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    System.out.println("____outpatientId=="+outPatientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //保存检查检验。 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -5525,7 +5542,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql += " WHERE  1=1 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql += " WHERE  1=1 and h.del = '1' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(chargType)) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -11513,8 +11530,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("appKey"+appKey+"======"+"masterSecret"+masterSecret); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("addExtra++++"+extras.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JPushClient jPushClient = new JPushClient(masterSecret, appKey, null, ClientConfig.getInstance()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        PushPayload payload = PushPayload.newBuilder() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                .setPlatform(Platform.all()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                .setAudience(Audience.newBuilder() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -11543,6 +11561,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                .build()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        .build()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                .build(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (extras.get("outpatientId")!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            PushResult result = jPushClient.sendPush(payload); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("极光推送返回日志==="+result); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -11681,6 +11702,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    title=baseJpushTemplateDO.getPushHeader().replace("{{咨询类型}}","家医咨询"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            isDoctor="1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            userId = wlyyOutpatientDO.getConsumer(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            jsonObject.put("type",12); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            jsonObject.put("id",wlyyOutpatientDO.getId()); 
			 |