lvhao 6 months ago
parent
commit
f6bae5e09b
2 changed files with 51 additions and 9 deletions
  1. 3 3
      core/CoreApp/controllers/Ac.php
  2. 48 6
      core/CoreApp/controllers/Apt.php

+ 3 - 3
core/CoreApp/controllers/Ac.php

@@ -222,10 +222,10 @@ class Ac extends Start_Controller {
 // 		$b  = $this->cne->get_data($fullorder);
 		//$b = $this->fedexv1->get_data($fullorder);
 		echo $fullorder['zzl'];
-		$b = $this->usps->get_data_new($fullorder);
+		// $b = $this->usps->get_data_new($fullorder);
 	
-		echo "<pre>";
-		print_r($b);
+		// echo "<pre>";
+		// print_r($b);
 	}
 	
 	public function get_data($data)

+ 48 - 6
core/CoreApp/controllers/Apt.php

@@ -30,6 +30,7 @@ class Apt extends Start_Controller {
 		$this->load->_model('Model_user','user');
 		$this->load->_model('Model_whlabel','whlabel');
 		$this->load->helper('url');
+		$this->load->_model("Model_fedexv1",'fedexv1');
 	}
 	//定义方法的调用规则 获取URI第二段值
     public function _remap($arg,$arg_array)
@@ -1324,7 +1325,8 @@ class Apt extends Start_Controller {
 				else if($fullorder['printcode'] == "FEDEXGF")//官方FEDEX接口
 				{
 					sleep(10);
-				    $barcode = $this->fedex->get_data($fullorder);//获取联邦快递信息
+				    //$barcode = $this->fedex->get_data($fullorder);//获取联邦快递信息
+					$barcode = $this->fedexv1->get_data($fullorder);//获取联邦快递信息
 					if($barcode['x'] == 1)
 					{
 						$bctime = date('Ymd',$time);
@@ -2319,7 +2321,8 @@ $fullorder['printnumber'] = $fullorder['printnumber'] +1;//不能删
 			$time = time();
 			if($express['printcode'] == "FEDEXGF")
 			{
-			    $barcode = $this->fedex->get_data($fullorder);//获取联邦快递信息
+			    //$barcode = $this->fedex->get_data($fullorder);//获取联邦快递信息
+				$barcode = $this->fedexv1->get_data($fullorder);//获取联邦快递信息
 			    if($barcode['x'] == 1)
 			    {
 				    $bctime = date('Ymd',$time);
@@ -2392,13 +2395,15 @@ $fullorder['printnumber'] = $fullorder['printnumber'] +1;//不能删
 			}
 		}
 	}
-	//扫描发货单出运单开始
+
 	public function _number()
     {
-		$post = $this->input->post(NULL, TRUE);
+		$post = [
+			'order'=>'Alipearl-71211-018'
+		];
 		if(isset($post['order']))  
 		{
-			$order = $this->input->post('order',true);
+			$order = 'Alipearl-71211-018';
 			$fullorder_name = 'fullorder';
 			$y = $this->fullorder->get_number($order);
 			if(!$y)
@@ -2410,6 +2415,8 @@ $fullorder['printnumber'] = $fullorder['printnumber'] +1;//不能删
 					echo json_encode(array('msg'=>'无此发货单数据!','success'=>false));exit;		
 				}
 			}
+			var_dump(123);
+			die;
 			if($y['express'] != '24')
 			{
 				echo json_encode(array('msg'=>'物流方式不正确!','success'=>false));exit;		
@@ -2426,6 +2433,40 @@ $fullorder['printnumber'] = $fullorder['printnumber'] +1;//不能删
 			}
 		}
 	}
+	//扫描发货单出运单开始
+	// public function _number()
+    // {
+	// 	$post = $this->input->post(NULL, TRUE);
+	// 	if(isset($post['order']))  
+	// 	{
+	// 		$order = $this->input->post('order',true);
+	// 		$fullorder_name = 'fullorder';
+	// 		$y = $this->fullorder->get_number($order);
+	// 		if(!$y)
+	// 		{
+	// 			$fullorder_name = 'fullordersmt';
+	// 			$y = $this->fullordersmt->get_number($order);
+	// 			if(!$y)
+	// 			{
+	// 				echo json_encode(array('msg'=>'无此发货单数据!','success'=>false));exit;		
+	// 			}
+	// 		}
+	// 		if($y['express'] != '24')
+	// 		{
+	// 			echo json_encode(array('msg'=>'物流方式不正确!','success'=>false));exit;		
+	// 		}
+	//         $data = $this->get_fedex_hz_number($y,$fullorder_name);
+	// 		$warehouse = $this->warehouse->read($y['type']);
+	// 		if(isset($data['yd']))
+	// 		{
+	// 			echo json_encode(array('numberyd'=>$data['yd'],'printer1'=>$warehouse['printer1'],'success'=>true));exit;
+	// 		}
+	// 		else
+	// 		{
+	// 			echo json_encode(array('msg'=>$data,'cw'=>$data,'success'=>false));exit;
+	// 		}
+	// 	}
+	// }
 	public function get_fedex_hz_number($fullorder,$fullorder_name)
     {
 		$time = time();
@@ -2433,7 +2474,8 @@ $fullorder['printnumber'] = $fullorder['printnumber'] +1;//不能删
 		$oldprinttime = ($fullorder['printtime'] > 0)?$fullorder['oldprinttime'].$fullorder['printtime'].'-':'';
 		$fullorder['printtime'] = date('m-d H:i',$time);//打印用时间、发货单用,不能删
 		$time = time();
-		$barcode = $this->fedex->get_data($fullorder);//获取联邦快递信息
+		//$barcode = $this->fedex->get_data($fullorder);//获取联邦快递信息
+		$barcode = $this->fedexv1->get_data($fullorder);//获取联邦快递信息
 		if($barcode['x'] == 1)
 		{
 			$bctime = date('Ymd',$time);