| 
					
				 | 
			
			
				@@ -38,7 +38,7 @@ public class PosPrinterUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // "discountAmt":0.0,"wxAmt":0.01,"printCount":1,"oilType":"2"} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //推送要打印小票的信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public static void sendPosPrintDirectMessage(Map<String, Object> args){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public static String sendPosPrintDirectMessage(Map<String, Object> args){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         logger.info("开始推送消息:" +args.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String, Object> params = new Hashtable<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         params.put("messageTitle", "pos"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -52,6 +52,7 @@ public class PosPrinterUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //创建请求 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CloseableHttpClient httpClients = HttpClients.createDefault(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CloseableHttpResponse response = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String resultString =""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 创建Http Post请求 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             HttpPost httpPost = new HttpPost(SEND_POS_PRINT_MESSAGE_URL); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -60,7 +61,7 @@ public class PosPrinterUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             httpPost.setEntity(entity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 执行http请求 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             response = httpClients.execute(httpPost); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String resultString = EntityUtils.toString(response.getEntity(), "utf-8"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            resultString = EntityUtils.toString(response.getEntity(), "utf-8"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             logger.info("POS推送订单消息结果:" +resultString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             e.printStackTrace(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -71,5 +72,6 @@ public class PosPrinterUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return resultString; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |