Просмотр исходного кода

修改dhl超过30秒打印记录

lvhao 3 месяцев назад
Родитель
Сommit
d265e16f10
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      core/CoreApp/models/Model_dhl.php

+ 5 - 1
core/CoreApp/models/Model_dhl.php

@@ -309,6 +309,7 @@ function __construct(){
         
         
         $this->logic_ding->sendToDing("dhl发货单请求的报文".$xml);
+		$start_time = time();
 		$ch = curl_init(); 
 		curl_setopt($ch, CURLOPT_URL,'https://xml-api.dhl.com/XMLShippingServlet'); 
 		curl_setopt($ch, CURLOPT_POST, 1);
@@ -325,7 +326,10 @@ function __construct(){
         libxml_disable_entity_loader(true);
         @$values = json_decode(json_encode(simplexml_load_string($data, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
 		
-		
+		$end_time = time();
+		if( $end_time - $start_time  > 30){
+			$this->logic_ding->addJobs('outtime_order',['number'=>$data['number']]);
+		}
 		
 	/**
 		$ch = curl_init();