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