|
@@ -19,9 +19,14 @@ function __construct(){
|
|
|
$data['province'] = trim($data['province'],' ');
|
|
|
$dataprovince = strlen($data['province'])==2?$data['province']:$ToState[strtolower($data['province'])];
|
|
|
$ordertype = 4;
|
|
|
- // if($data['printcode'] == 'FedEx_GD'){
|
|
|
- // $ordertype = 2;
|
|
|
- // }
|
|
|
+ if($data['printcode'] == 'FedEx_GD'){
|
|
|
+ $zipcode_first = substr($data['zipcode'],0,1);
|
|
|
+ if($zipcode_first*1 < 7){
|
|
|
+ $printcode = [
|
|
|
+ 'FK','FK','80-86'
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ }
|
|
|
//创建并预报订单
|
|
|
|
|
|
$count = array(
|
|
@@ -131,7 +136,6 @@ function __construct(){
|
|
|
else
|
|
|
{
|
|
|
$yd = $this->get_yd($res['returnDatas'][0]['corpBillid'],$printcode[2],$ordertype);
|
|
|
- //$fp = $this->get_fp($res['returnDatas'][0]['corpBillid']);
|
|
|
if($yd != 'c')// && $fp != 'c'
|
|
|
{
|
|
|
$waybill = $res['returnDatas'][0]['trackNumber']."";
|
|
@@ -209,6 +213,39 @@ function __construct(){
|
|
|
return 'c';
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public function get_zdh($number,$info_number,$ordertype = 2){
|
|
|
+
|
|
|
+ $url = "http://zzys.kingtrans.net/PostInterfaceService?method=searchOrderTracknumber";
|
|
|
+ $Clientid = '007';
|
|
|
+ $Token = 'WlpZUw==zRKOlUNdWs9J8Qp136Mj';
|
|
|
+
|
|
|
+ $post = [
|
|
|
+ "OrderType"=>$ordertype,
|
|
|
+ "Verify"=>[
|
|
|
+ "Clientid"=>$Clientid,
|
|
|
+ "Token"=>$Token
|
|
|
+ ],
|
|
|
+ "CorpBillidDatas"=>[
|
|
|
+ [
|
|
|
+ "CorpBillid"=> $number,
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ $post = json_encode($post);
|
|
|
+ $ch = curl_init();
|
|
|
+ curl_setopt($ch,CURLOPT_URL,$url);
|
|
|
+ curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
|
|
|
+ curl_setopt($ch,CURLOPT_HEADER,0);
|
|
|
+ curl_setopt($ch,CURLOPT_POST, 1);
|
|
|
+ curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,600);
|
|
|
+ curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query(array('json'=>$post)));
|
|
|
+ $res = curl_exec($ch);
|
|
|
+ curl_close($ch);
|
|
|
+ $this->logic_ding->sendToDing("云尚快递转单号".$info_number."【".$post."】返回参数[".$res."]");
|
|
|
+ $res = json_decode($res,true);
|
|
|
+ return $res;
|
|
|
+ }
|
|
|
|
|
|
public function get_data_gn($data)//国内
|
|
|
{
|