فهرست منبع

修改boss出货 自动添加出货类别

lvhao 5 ماه پیش
والد
کامیت
c50892d887
1فایلهای تغییر یافته به همراه61 افزوده شده و 41 حذف شده
  1. 61 41
      core/CoreApp/controllers/Boss.php

+ 61 - 41
core/CoreApp/controllers/Boss.php

@@ -12,7 +12,9 @@ class Boss extends Start_Controller {
 		$this->load->_model('Model_fullorder_smt','fullorder_smt');
 		$this->load->_model('Model_fullordersmt','fullordersmt');
 		$this->load->_model('Model_fullorderxw','fullorderxw');
+		$this->load->_model('Model_fullorderamz','fullorderamz');
 		$this->load->_model('Model_customersmt','customersmt');
+		$this->load->_model('Model_logic_order','logic_order');
 		$this->load->_model('Model_country','country');
 		$this->load->_model('Model_hl','hl');
 		$this->load->_model('Model_is','is');
@@ -157,48 +159,66 @@ class Boss extends Start_Controller {
 			{
 				echo json_encode(array('msg'=>'出库信息不能为空!','success'=>false));exit;
 			}
-			$fullorder_name = 'fullorder';$outtype = 1;
-			$y = $this->fullorder->get_waybill($order);
-			if(!$y)
-			{
-				$y = $this->fullorder->get_number($order);
-				$outtype = 2;
-				if(!$y)
-				{
-					$fullorder_name = 'fullordersmt';$outtype = 1;
-					$y = $this->fullordersmt->get_waybill($order);
-					if(!$y)
-				    {
-						$y = $this->fullordersmt->get_number($order);
-						$outtype = 2;
-						if(!$y)
-						{
-							$fullorder_name = 'fullordertt';$outtype = 1;
-							$y = $this->fullordertt->get_waybill($order);
-							if(!$y)
-				    		{
-								$y = $this->fullordertt->get_number($order);
-								$outtype = 2;
-								if(!$y)
-								{
-									$fullorder_name = 'fullorderxw';$outtype = 1;
-									$y = $this->fullorderxw->get_waybill($order);
-									if(!$y)
-				    				{
-										$y = $this->fullorderxw->get_number($order);
-										$outtype = 2;
-										if(!$y)
-										{
-											echo json_encode(array('msg'=>'无此数据','success'=>false));exit;
-										}
-									}
-								}
-							}
-						}
+			// $fullorder_name = 'fullorder';$outtype = 1;
+			// $y = $this->fullorder->get_waybill($order);
+			// if(!$y)
+			// {
+			// 	$y = $this->fullorder->get_number($order);
+			// 	$outtype = 2;
+			// 	if(!$y)
+			// 	{
+			// 		$fullorder_name = 'fullordersmt';$outtype = 1;
+			// 		$y = $this->fullordersmt->get_waybill($order);
+			// 		if(!$y)
+			// 	    {
+			// 			$y = $this->fullordersmt->get_number($order);
+			// 			$outtype = 2;
+			// 			if(!$y)
+			// 			{
+			// 				$fullorder_name = 'fullordertt';$outtype = 1;
+			// 				$y = $this->fullordertt->get_waybill($order);
+			// 				if(!$y)
+			// 	    		{
+			// 					$y = $this->fullordertt->get_number($order);
+			// 					$outtype = 2;
+			// 					if(!$y)
+			// 					{
+
+			// 						$fullorder_name = 'fullorderamz';$outtype = 1;
+			// 						$y = $this->fullorderamz->get_waybill($order);
+			// 						if(!$y)
+			// 	    				{
+			// 							$y = $this->fullorderamz->get_number($order);
+			// 							$outtype = 2;
+			// 							if(!$y)
+			// 							{
+			// 								$fullorder_name = 'fullorderxw';$outtype = 1;
+			// 								$y = $this->fullorderxw->get_waybill($order);
+			// 								if(!$y)
+			// 								{
+			// 									$y = $this->fullorderxw->get_number($order);
+			// 									$outtype = 2;
+			// 									if(!$y)
+			// 									{
+			// 										echo json_encode(array('msg'=>'无此数据','success'=>false));exit;
+			// 									}
+			// 								}
+			// 							}
+			// 						}
+			// 					}
+			// 				}
+			// 			}
 						
-					}
-				}
+			// 		}
+			// 	}
+			// }
+			$outtype = 1;
+			$y = $this->logic_order->getInfo("waybill = '".$order."'");
+			if(empty($y)){
+				$outtype = 2;
+				$y = $this->logic_order->getInfo("number = '".$order."'");
 			}
+			$fullorder_name = $y['lv_platform'];
 			if($y['mergeid'] == '1')
 			{
 				$y = $this->$fullorder_name->read($y['merge']);
@@ -343,7 +363,7 @@ class Boss extends Start_Controller {
 				}
 				foreach ($wh['sj'] as $v)
 		        {
-					$this->$bdck->save(array('state'=>1,'orderinfo'=>$y['orderinfo'],'waybill'=>$y['waybill'],'outk'=>$time,'time'=>$time),$v['id']);
+					$this->$bdck->save(array('state'=>1,'cktype'=>1,'orderinfo'=>$y['orderinfo'],'waybill'=>$y['waybill'],'outk'=>$time,'time'=>$time),$v['id']);
 				}
 			}
 			if($fullorder_name == 'fullordersmt')