|  | @ -486,6 +486,57 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 解析顺丰推送过来的路由信息,和本地数据匹配并进行增量更新)
 | 
	
		
			
				|  |  |      * @param waybillRoute
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public void SFRoutePushServiceNew(String waybillRoute) throws Exception{
 | 
	
		
			
				|  |  |         JSONObject object = JSONObject.parseObject(waybillRoute);
 | 
	
		
			
				|  |  |         Map<String,List<WlyyPrescriptionExpressageLogDO>> wayroutlsit = new HashMap<>();
 | 
	
		
			
				|  |  |         logger.info("顺丰入参:"+object);
 | 
	
		
			
				|  |  |         WlyyPrescriptionExpressageLogDO sflog = new WlyyPrescriptionExpressageLogDO();
 | 
	
		
			
				|  |  |         String accept_time = object.getString("acceptTime");
 | 
	
		
			
				|  |  |         String accept_address = object.getString("acceptAddress");
 | 
	
		
			
				|  |  |         String accept_remark = object.getString("remark");
 | 
	
		
			
				|  |  |         String opcode = object.getString("opCode");
 | 
	
		
			
				|  |  |         String mailno = object.getString("mailNo");
 | 
	
		
			
				|  |  |         String orderid = object.getString("orderId");
 | 
	
		
			
				|  |  |         String id = object.getString("id");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String signStr = "id="+id+"&mailNo="+mailno+"&orderId="+orderid+"&opCode="+opcode+"&secretKey="+sf_check_word;
 | 
	
		
			
				|  |  |         String signLocal = SHAUtils.SHA512(signStr);
 | 
	
		
			
				|  |  |         logger.info("signStr"+signLocal);
 | 
	
		
			
				|  |  |         String sign = object.getString("sign");
 | 
	
		
			
				|  |  |         if (signLocal.equalsIgnoreCase(sign)){
 | 
	
		
			
				|  |  |             sflog.setAcceptTime(DateUtil.strToDate(accept_time));
 | 
	
		
			
				|  |  |             sflog.setAcceptAddress(accept_address);
 | 
	
		
			
				|  |  |             sflog.setAcceptRemark(accept_remark);
 | 
	
		
			
				|  |  |             sflog.setOpCode(opcode);
 | 
	
		
			
				|  |  |             sflog.setExpressageId(orderid);
 | 
	
		
			
				|  |  |             sflog.setId(UUID.randomUUID().toString());
 | 
	
		
			
				|  |  |             sflog.setCreateTime(new Date());
 | 
	
		
			
				|  |  |             if(wayroutlsit.keySet().contains(mailno)){
 | 
	
		
			
				|  |  |                 wayroutlsit.get(mailno).add(sflog);
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |                 List<WlyyPrescriptionExpressageLogDO> newsflogs = new ArrayList<>();
 | 
	
		
			
				|  |  |                 newsflogs.add(sflog);
 | 
	
		
			
				|  |  |                 wayroutlsit.put(mailno,newsflogs);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             if(!wayroutlsit.keySet().isEmpty()){
 | 
	
		
			
				|  |  |                 for (String mailNo1:wayroutlsit.keySet()) {
 | 
	
		
			
				|  |  |                     List<WlyyPrescriptionExpressageLogDO> pushSFLogs = wayroutlsit.get(mailNo1);
 | 
	
		
			
				|  |  |                     //同一个快递单号的执行一个事务操作
 | 
	
		
			
				|  |  |                     this.saveSFPushRoutInfos(mailNo1,pushSFLogs);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             throw new Exception("签名无效");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 同一个快递单号的执行一个事务操作
 | 
	
		
			
				|  |  |      * @param mailno
 | 
	
	
		
			
				|  | @ -770,7 +821,8 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     private String SFExpressPostV2(JSONObject params)throws Exception{
 | 
	
		
			
				|  |  |         params.put("version","1.0");
 | 
	
		
			
				|  |  |         params.put("timestamp",new Date().getTime());
 | 
	
		
			
				|  |  |         params.put("timestamp","4070916000000");
 | 
	
		
			
				|  |  |         logger.info("timestamp"+params.getString("timestamp"));
 | 
	
		
			
				|  |  |         String sign = SHAUtils.SHA512(params.toJSONString()+sf_check_word);
 | 
	
		
			
				|  |  |         String url =sf_url+"/api/open/api/addOrder?hospitalCode="+sf_code+"&sign="+sign;
 | 
	
		
			
				|  |  |     
 | 
	
	
		
			
				|  | @ -793,7 +845,7 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
 | 
	
		
			
				|  |  |       /*  params.put("version","1.0");
 | 
	
		
			
				|  |  |         params.put("timestamp",new Date().getTime());*/
 | 
	
		
			
				|  |  |         String sign = SHAUtils.SHA512(params+sf_check_word);
 | 
	
		
			
				|  |  |         String url =sf_url+"/api/open/api/listSelfPrintDO?hospitalCode="+sf_code+"&sign="+sign+"&version=1.0"+"×tamp="+new Date().getTime()+"&orderNo="+params;
 | 
	
		
			
				|  |  |         String url =sf_url+"/api/open/api/listSelfPrintDO?hospitalCode="+sf_code+"&sign="+sign+"&version=1.0"+"×tamp=4070916000000&orderNo="+params;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         logger.info("顺丰快递面单查询:sf_url"+url);
 | 
	
		
			
				|  |  |         logger.info("顺丰快递面单查询:params"+params.toString());
 |