소스 검색

修改惠城的快递信息

lvhao 2 달 전
부모
커밋
d82833d185
1개의 변경된 파일8개의 추가작업 그리고 4개의 파일을 삭제
  1. 8 4
      core/CoreApp/models/Model_hualei.php

+ 8 - 4
core/CoreApp/models/Model_hualei.php

@@ -171,10 +171,7 @@ function __construct(){
 		$start_time = time();
 		$result = $this->curlRequest('http://123.207.33.169:8082/createOrderApi.htm',$link.json_encode($count));
 		$this->logic_ding->sendToDing("hualei发货单回执的报文result".json_encode($result,JSON_UNESCAPED_UNICODE));
-		$end_time = time();
-		if( $end_time - $start_time  > 15){
-			$this->logic_ding->addJobs('outtime_order',['number'=>$data['number']]);
-		}
+		
 		$resultData = json_decode($result['result'], true);
 		
 		if(isset($resultData['message'])){
@@ -213,6 +210,13 @@ function __construct(){
 			$resultData['message'] = urldecode($resultData['message']);
 			$g = array('x'=>'0','Description'=>json_encode($resultData ,JSON_UNESCAPED_UNICODE));
 		}
+		$end_time = time();
+		if($g['x'] == 1){
+			if( $end_time - $start_time  > 60){
+				$this->logic_ding->addJobs('outtime_order',['number'=>$data['number']]);
+			}
+		}
+		
 		$this->logic_ding->sendToDing("hualei发货单回执的pdf报文".json_encode($g,JSON_UNESCAPED_UNICODE));
 		return $g;exit;
 	}