|  | @ -6606,7 +6606,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |             String str[] = realOrder.split(";");
 | 
	
		
			
				|  |  |             Object result = "";
 | 
	
		
			
				|  |  |             for (int i=0;i<str.length;i++){
 | 
	
		
			
				|  |  |                 WlyyPrescriptionDO wlyyPrescriptionDOS = prescriptionDao.findByAdmNoAndRealOrder(admNo,str[i]);
 | 
	
		
			
				|  |  |                 WlyyPrescriptionDO wlyyPrescriptionDOS = new WlyyPrescriptionDO();
 | 
	
		
			
				|  |  |                 if(StringUtils.isNoneBlank(admNo)){
 | 
	
		
			
				|  |  |                     wlyyPrescriptionDOS = prescriptionDao.findByAdmNoAndRealOrder(admNo,str[i]);
 | 
	
		
			
				|  |  |                 }else {
 | 
	
		
			
				|  |  |                     wlyyPrescriptionDOS = prescriptionDao.findByRealOrder(str[i]);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 System.out.println("获取顺丰物流面单信息:wlyyPrescriptionDOS != null=" + wlyyPrescriptionDOS != null);
 | 
	
		
			
				|  |  |                 if (wlyyPrescriptionDOS != null) {
 | 
	
		
			
				|  |  |                     List<WlyyPrescriptionExpressageDO> expressageDOList = sfexpressService.findByField("outpatientId", wlyyPrescriptionDOS.getOutpatientId());
 | 
	
	
		
			
				|  | @ -9668,6 +9673,56 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         String response = httpClientUtil.headerPost(url,nvps,"UTF-8",httpPost);
 | 
	
		
			
				|  |  |         logger.info("返回日志"+response);
 | 
	
		
			
				|  |  |         if(StringUtils.isNoneBlank(response)){
 | 
	
		
			
				|  |  |             com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(response);
 | 
	
		
			
				|  |  |             if (jsonObject.getString("code").equalsIgnoreCase("200")){
 | 
	
		
			
				|  |  |                 com.alibaba.fastjson.JSONObject jsonObject1 = com.alibaba.fastjson.JSONObject.parseObject(jsonObject.getString("info"));
 | 
	
		
			
				|  |  |                 if (StringUtils.isNoneBlank(jsonObject1.getString("token"))){
 | 
	
		
			
				|  |  |                     yxTokenMappingDO1.setAccid(userId);
 | 
	
		
			
				|  |  |                     yxTokenMappingDO1.setToken(jsonObject1.getString("token"));
 | 
	
		
			
				|  |  |                     yxTokenMappingDao.save(yxTokenMappingDO1);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 return jsonObject1.getString("token");
 | 
	
		
			
				|  |  |             }else if (jsonObject.getString("code").equalsIgnoreCase("414")&&jsonObject.getString("desc").contains("already")){
 | 
	
		
			
				|  |  |                 return  refreshToken(userId);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         return null;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 重置云信token
 | 
	
		
			
				|  |  |      * @param userId
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public String refreshToken(String userId){
 | 
	
		
			
				|  |  |         YxTokenMappingDO yxTokenMappingDO = yxTokenMappingDao.findMappingByAccid(userId);
 | 
	
		
			
				|  |  |         if (yxTokenMappingDO!=null){
 | 
	
		
			
				|  |  |             return yxTokenMappingDO.getToken();
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO sysDictDO = hospitalSysDictDao.findById("YXAPPKEY");
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO =  hospitalSysDictDao.findById("YXAPPSECRET");
 | 
	
		
			
				|  |  |         if (sysDictDO==null){
 | 
	
		
			
				|  |  |             return  "找不到对应的key";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         String appKey = sysDictDO.getDictValue();
 | 
	
		
			
				|  |  |         String appSecret = hospitalSysDictDO.getDictValue();
 | 
	
		
			
				|  |  |         String nonce =  randomInt(10);
 | 
	
		
			
				|  |  |         String curTime = String.valueOf((new Date()).getTime() / 1000L);
 | 
	
		
			
				|  |  |         String checkSum = CheckSumBuilder.getCheckSum(appSecret, nonce ,curTime);//参考 计算CheckSum的java代码
 | 
	
		
			
				|  |  |         String url = "https://api.netease.im/nimserver/user/refreshToken.action";
 | 
	
		
			
				|  |  |         Map<String,Object> httpPost = new HashedMap();
 | 
	
		
			
				|  |  |         // 设置请求的header
 | 
	
		
			
				|  |  |         httpPost.put("AppKey", appKey);
 | 
	
		
			
				|  |  |         httpPost.put("Nonce", nonce);
 | 
	
		
			
				|  |  |         httpPost.put("CurTime", curTime);
 | 
	
		
			
				|  |  |         httpPost.put("CheckSum", checkSum);
 | 
	
		
			
				|  |  |         httpPost.put("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
 | 
	
		
			
				|  |  |         List<NameValuePair> nvps = new ArrayList<NameValuePair>();
 | 
	
		
			
				|  |  |         nvps.add(new BasicNameValuePair("accid", userId));
 | 
	
		
			
				|  |  |         YxTokenMappingDO yxTokenMappingDO1 = new YxTokenMappingDO();
 | 
	
		
			
				|  |  |         String response = httpClientUtil.headerPost(url,nvps,"UTF-8",httpPost);
 | 
	
		
			
				|  |  |         logger.info("返回日志"+response);
 | 
	
		
			
				|  |  |         if(StringUtils.isNoneBlank(response)){
 | 
	
		
			
				|  |  |             com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(response);
 | 
	
		
			
				|  |  |             if (jsonObject.getString("code").equalsIgnoreCase("200")){
 | 
	
	
		
			
				|  | @ -9683,6 +9738,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         return null;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public static void main(String[] args) {
 | 
	
		
			
				|  |  |         String ss = DateUtil.getStringDateShort();
 | 
	
		
			
				|  |  |         System.out.println(ss);
 |