longyi 4 tháng trước cách đây
mục cha
commit
57f44e4b3d
2 tập tin đã thay đổi với 11 bổ sung10 xóa
  1. 8 6
      core/CoreApp/controllers/Aac.php
  2. 3 4
      core/CoreApp/controllers/Api.php

+ 8 - 6
core/CoreApp/controllers/Aac.php

@@ -58,14 +58,15 @@ class Aac extends Start_Controller {
 	}
 
 	public function tj(){
+	    echo "<pre>";
 		$info = $this->zzrecord_logs->read(1);
 		if($info['sku'] == 1){
 			return ;
 		}
 		$qty = $info['qty'];
 		$start = (int)$info['number'];
-		$pre_num = 100;
-		$list = $this->fullorder->find_all(" 1 = 1 ","*",'id asc',$start,$pre_num);
+		$pre_num = 300000;
+		$list = $this->fullorder->find_all(" shop in (1,2,3,4,5,6) ","*",'id asc',$start,$pre_num);
 		if(empty($list)){
 			$this->zzrecord_logs->save([
 				'sku'=>1,
@@ -74,6 +75,7 @@ class Aac extends Start_Controller {
 		}
 		$tmp_num = 0;
 		foreach($list as $k=>$v){
+		   // var_dump($v);
 			$tmp_q = 0; 
 			$v['issku'] = strtolower($v['issku']);
 			if(stripos($v['issku'],',') !== false){
@@ -92,20 +94,20 @@ class Aac extends Start_Controller {
 				}else{
 					
 					if(isset($quantity[$index])){
-						$tmp_q += $quantity[$index];
+						$tmp_q += (int)$quantity[$index];
 					}else{
 						$tmp_q += 1;
 					}
-					var_dump($tmp_q);
+					//var_dump($tmp_q);
 				}
 
 			}
-			if($tmp_q >= 3){
+			if($tmp_q >= 4){
 				$tmp_num = $tmp_num+1;
 			}
 			 
 		}
-		//var_dump($tmp_num);
+		var_dump($tmp_num);
 		$qty = $qty*1 + $tmp_num;
 
 		$this->zzrecord_logs->save([

+ 3 - 4
core/CoreApp/controllers/Api.php

@@ -2529,6 +2529,7 @@ class Api extends Start_Controller {
 	
 	public function _dhl()//DHL
 	{
+	    die;
 		$data = $this->dhl->find_all("type != 1 and time > '".(time()-24*3600)."'");
 		foreach ($data as $v) 
 		{
@@ -2546,14 +2547,12 @@ class Api extends Start_Controller {
 				}
 			}
 			//获取dhl规格
-			$dhl_gg_info = $this->customsdeclaration->get_ename(trim($y['ename']));
+			$dhl_gg_info = $this->customsdeclaration->get_ename($y['sbpm']);
 			if(empty($dhl_gg_info)){
 				continue;
 			}else{
-				$y['dhl_ggbm'] = $dhl_gg_info['dglcode'];
+				$y['dhl_ggbm'] = $dhl_gg_info['dhlcode'];
 			}
-			var_dump($dhl_gg_info);
-			die;
 			$this->dhl->get_data_c($y,$v['id']);
 		}
 	}