Selaa lähdekoodia

测试获取3pe的信息

lvhao 1 kuukausi sitten
vanhempi
commit
7973208408
1 muutettua tiedostoa jossa 41 lisäystä ja 12 poistoa
  1. 41 12
      core/CoreApp/controllers/Aatest.php

+ 41 - 12
core/CoreApp/controllers/Aatest.php

@@ -105,23 +105,52 @@ class Aatest extends Start_Controller {
 		// 	//$this->_mdedit($arg_array);
 		// }
 		//$this->_print();
-		$this->_plcl();
+		$time = time() - 10 * 3600 * 24;
+        //快递为3pe  76  出库时间十天前   waybillid 不能为空
+        $where = "express = 76 and librarytime >= ".$time ." and waybillid is not null";
+		$list = $this->fullorder->find_all($where,"number,waybill,waybillid,express,librarytime");
+		echo "<pre>";
+		print_r($list);
     }
 
 	public function _plcl(){
-		$list = $this->fullorder->find_all('state = 207 and express = 76 and  library = 2 and librarytime < 1749484816','id,state,express,number');
-		// echo "<pre>";
-		// print_r($list);
-		echo "<pre>";
-		print_r(count($list));
-		var_dump($list[0]['number']);
-		if(!empty($list)){
-		    	$this->fullorder->save(['state'=>216],$list[0]['id']);
-		}
-// 		var_dump($list[0]['id']);
-// 		die;
 	
+		$typeclass = [];
+		$classid = $this->classid->sku();
+		$tcall = $this->typeclass->find_all();
 		
+		foreach ($tcall as $v)
+		{
+			//$tcjm[$v['id']] = array($v['jm'],$v['classid']);
+			$typeclass[$v['id']] = array('zh'=>$v['zh'],'classid'=>$v['classid'],'bm'=>$v['bm'],'title'=>$v['title'],'jm'=>$v['jm']);
+		}
+		$dtctitle = [];
+		foreach($tcall as $v){
+			$dtctitle[$v['id']] = $v['title'];
+		}
+		$dtc = [];
+		foreach ($tcall as $v) {
+			if (stripos($v['spare'], '|') !== false) //如果有多个值
+			{
+				$v['spare'] = explode('|', $v['spare']);
+				foreach ($v['spare'] as $k => $vs) {
+					if (stripos($v['zh'], '|') !== false) {
+						$vzh = explode('|', $v['zh']);
+						$dtc[strtolower($vs)] = array('classid' => $v['classid'], 'zh' => $vzh[$k], 'id' => $v['id'], 'jm' => $v['jm'], 'spare' => $vs);
+					} else {
+						$dtc[strtolower($vs)] = array('classid' => $v['classid'], 'zh' => $v['zh'], 'id' => $v['id'], 'jm' => $v['jm'], 'spare' => $vs);
+					}
+				}
+			} else {
+				$dtc[strtolower($v['spare'])] = array('classid' => $v['classid'], 'zh' => $v['zh'], 'id' => $v['id'], 'jm' => $v['jm'], 'spare' => $v['spare']);
+			}
+		}
+		$tmp_sku ="RTG-A033-STW-13*4BobWig-250%-10";
+		$u9_info = $this->logic_order->skuTransferFeatures($tmp_sku,$typeclass,$dtc,$dtctitle,$classid);
+		echo "<pre>";
+		var_dump($tmp_sku);
+		var_dump($u9_info);
+		die;
 
 	}
 	public function _print(){