瀏覽代碼

修改其他地方 但是不知道为啥还要申报编码的东西

lvhao 5 月之前
父節點
當前提交
ac457ab606
共有 2 個文件被更改,包括 30 次插入2 次删除
  1. 15 1
      core/CoreApp/controllers/Boss.php
  2. 15 1
      core/CoreApp/controllers/Systemfout.php

+ 15 - 1
core/CoreApp/controllers/Boss.php

@@ -54,6 +54,7 @@ class Boss extends Start_Controller {
 		$this->load->_model('Model_weight','weight');
 		$this->load->_model('Model_country','country');
 		$this->load->_model("Model_zzquque_u9","zzquque_u9");
+		$this->load->_model("Model_customsdeclaration","customsdeclaration");
 	}
 	//定义方法的调用规则 获取URI第二段值
     public function _remap($arg,$arg_array)
@@ -1621,7 +1622,20 @@ class Boss extends Start_Controller {
 		$fullorder['printcode'] = $express['printcode'];
 		$fullorder['time'] = date('Y-m-d',time());
 		$fullorder['times'] = date('Y-m-d H:i',time());
-		$fullorder['sbbm']= ($fullorder['sbpm'] == 'Hair Sample') ? 67042000 : 67041100;
+		//$fullorder['sbbm']= ($fullorder['sbpm'] == 'Hair Sample') ? 67042000 : 67041100;
+
+		// 修复报关编码问题
+	    $declara_info = $this->customsdeclaration->find("ename like '%".trim($fullorder['sbpm'])."%' ","*");
+	
+		$sbbm = "";
+		if(empty($declara_info)){
+			$sbbm = "";
+		}else{
+		    $sbbm = $declara_info['bname'];
+		}
+	
+		$fullorder['sbbm']= $sbbm;
+
 		$fullorder['address'] = str_replace(array('&'),array('&'),$fullorder['address']);
 		$fullorder['address2'] = str_replace(array('&'),array('&'),$fullorder['address2']);
 		$fullorder['shipremarks'] = str_replace(array('<','>',';',';'),array('&lt','&gt',';<br>',';<br>'),$fullorder['shipremarks']);

+ 15 - 1
core/CoreApp/controllers/Systemfout.php

@@ -44,6 +44,7 @@ class Systemfout extends Start_Controller {
 		$this->load->_model("Model_logic_ding","logic_ding");
 		$this->load->_model("Model_fedexv1",'fedexv1');
 		$this->load->_model("Model_zzquque_u9","zzquque_u9");
+		$this->load->_model("Model_customsdeclaration","customsdeclaration");
 	}
 	//定义方法的调用规则 获取URI第二段值
     public function _remap($arg,$arg_array)
@@ -1194,7 +1195,20 @@ class Systemfout extends Start_Controller {
 		$fullorder['printcode'] = $express['printcode'];
 		$fullorder['time'] = date('Y-m-d',time());
 		$fullorder['times'] = date('Y-m-d H:i',time());
-		$fullorder['sbbm']= ($fullorder['sbpm'] == 'Hair Sample') ? 67042000 : 67041100;
+		//$fullorder['sbbm']= ($fullorder['sbpm'] == 'Hair Sample') ? 67042000 : 67041100;
+
+		//      修复报关编码问题
+	    $declara_info = $this->customsdeclaration->find("ename like '%".trim($fullorder['sbpm'])."%' ","*");
+	
+		$sbbm = "";
+		if(empty($declara_info)){
+			$sbbm = "";
+		}else{
+		    $sbbm = $declara_info['bname'];
+		}
+	
+		$fullorder['sbbm']= $sbbm;
+		
 		$fullorder['address'] = str_replace(array('&'),array('&#38;'),$fullorder['address']);
 		$fullorder['address2'] = str_replace(array('&'),array('&#38;'),$fullorder['address2']);
 		$shop = $this->shop->read($fullorder['shop']);