Browse Source

测试一下

lvhao 3 months ago
parent
commit
e1d0d11597
1 changed files with 11 additions and 6 deletions
  1. 11 6
      core/CoreApp/models/Model_cne.php

+ 11 - 6
core/CoreApp/models/Model_cne.php

@@ -92,10 +92,11 @@ function __construct(){
 		)))
 		)
 		);
-
-		// if($data['printcode'] == 'FEDEX_G'){
-		// 	$count['OrderType'] = 1;
-		// }
+		$ordertype = 0;
+		if($data['printcode'] == 'FEDEX_G'){
+			$count['OrderType'] = 1;
+			$ordertype = 1;
+		}
 
 		$count = json_encode($count,true);
 
@@ -117,7 +118,7 @@ function __construct(){
 		}
 		else
 		{
-			$yd = $this->get_yd($res['returnDatas'][0]['corpBillid'],$printcode[2]);
+			$yd = $this->get_yd($res['returnDatas'][0]['corpBillid'],$printcode[2],$ordertype);
 		    //$fp = $this->get_fp($res['returnDatas'][0]['corpBillid']);
 			if($yd != 'c')// && $fp != 'c'
 			{
@@ -136,7 +137,7 @@ function __construct(){
 		return $g;
 	}
 	
-	public function get_yd($waybill,$PrintPaper)
+	public function get_yd($waybill,$PrintPaper,$ordertype = 0)
 	{
 		$url = "http://zzys.kingtrans.net/PostInterfaceService?method=printOrderLabel";
 		$Clientid = '007';
@@ -152,6 +153,10 @@ function __construct(){
 		'PrintPaper'=> $PrintPaper,//打印纸张 快递制单只固定为:label 和 A4
 		'PrintContent'=> "1"//打印内容 1:地址标签 2:报关单 3:配货信息 可自由组合用“,”号隔开 如:1,2,3
 		);
+		if($ordertype == 1){
+			$count['OrderType'] = 1;
+			$count['PrintPaper'] = 'label';
+		}
 	    
 		$count = json_encode($count,true);