Ver código fonte

提交测试

lvhao 1 dia atrás
pai
commit
14181212c7
1 arquivos alterados com 35 adições e 2 exclusões
  1. 35 2
      core/CoreApp/controllers/Systemprint.php

+ 35 - 2
core/CoreApp/controllers/Systemprint.php

@@ -52,6 +52,7 @@ class Systemprint extends Start_Controller {
 		$this->load->_model("Model_zxyuntu","zxyuntu");
 		$this->load->_model("Model_logic_order","logic_order");
 		$this->load->_model("Model_itsxb","itsxb");
+		$this->load->_model("Model_express_tt","express_tt");
 	}
 	//定义方法的调用规则 获取URI第二段值
     public function _remap($arg,$arg_array)
@@ -1738,8 +1739,40 @@ class Systemprint extends Start_Controller {
 						$failed = $barcode['Description'];//错误提示
 						$this->$fullorder_name->save(array('print'=>1,'failed'=>$failed),$va[$n]);
 					}
-				}
-				else
+				}elseif(($fullorder['printcode'] == "TTUK")){
+					$barcode = $this->express_tt->get_data($fullorder,"FBT");
+					if($barcode['x'] == 1)
+					{
+						$bctime = date('Ymd',$time);
+						$Hwaybill = $barcode['waybill'];
+						$Hyd = $this->_pdfurl($barcode['label'],'y-'.$Hwaybill,$bctime);
+						//$Hfp = $this->_pdfurl($barcode['fp'],'f-'.$Hwaybill,$bctime);//保留PDF,不需要打印
+						if(isset($barcode['label']) && isset($Hwaybill))
+						{
+						    if($fullorder['waybill'] != "")
+							{
+								$oldwaybill = $fullorder['oldwaybill'].'-'.date('Ymd',$time).'/'.$fullorder['waybill'];
+							}
+							else
+							{
+								$oldwaybill = $fullorder['oldwaybill'];
+							}
+							$oldwaybill .= '-'.$bctime.'/'.$Hwaybill;
+							$fullorder['printnumber'] = $fullorder['printnumber'] +1;//不能删
+							if($this->$fullorder_name->save(array('waybill'=>$Hwaybill,'waybill2'=>$barcode['waybill2'],'libraryconfirm'=>2,'librarynot'=>'','printtime'=>$time,'printnumber'=>$fullorder['printnumber'],'print'=>3,'oldwaybill'=>$oldwaybill,'oldprinttime'=>$oldprinttime),$va[$n]))
+				   		 	{
+								$type = 1;
+								$pdfnum = 1;
+								$text = array('yd'=>base_url().'data/pdf/'.$bctime.'/y-'.$Hwaybill.'.pdf','mode'=>100);
+							}
+						}
+					}
+					else
+					{
+						$failed = $barcode['Description'];//错误提示
+						$this->$fullorder_name->save(array('print'=>1,'failed'=>$failed),$va[$n]);
+					}
+				}else
 				{
 					$this->$fullorder_name->save(array('print'=>1,'failed'=>'未找到此快递运单接口'),$va[$n]);
 				}