|
@@ -48,6 +48,8 @@ class Aatest extends Start_Controller {
|
|
$this->load->_model("Model_usps",'usps');
|
|
$this->load->_model("Model_usps",'usps');
|
|
$this->load->_model('Model_emaildata','emaildata');
|
|
$this->load->_model('Model_emaildata','emaildata');
|
|
$this->load->_model('Model_logic_tools','logic_tools');
|
|
$this->load->_model('Model_logic_tools','logic_tools');
|
|
|
|
+ $this->load->_model('Model_returngoods','returngoods');
|
|
|
|
+ $this->load->_model('Model_returnlogs','returnlogs');
|
|
}
|
|
}
|
|
|
|
|
|
//定义方法的调用规则 获取URI第二段值
|
|
//定义方法的调用规则 获取URI第二段值
|
|
@@ -59,12 +61,57 @@ class Aatest extends Start_Controller {
|
|
$this->_fout();
|
|
$this->_fout();
|
|
}else if($arg == 'waybillemail'){
|
|
}else if($arg == 'waybillemail'){
|
|
$this->_waybillemail();
|
|
$this->_waybillemail();
|
|
|
|
+ }else if($arg == 'getorder'){
|
|
|
|
+ $this->_getorder();
|
|
|
|
+ }elseif($arg == 'upadtel'){
|
|
|
|
+ $this->upadtel();
|
|
}else{
|
|
}else{
|
|
$this->_a($arg_array);
|
|
$this->_a($arg_array);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function _getorder(){
|
|
|
|
+
|
|
|
|
+ $name = 'SuperNova';
|
|
|
|
+ $userKey = array(
|
|
|
|
+ 'Alipearl' => array('username'=>'huchunmei','api_key'=>'huchunmei126_alipearl_erp888','url'=>'https://www.alipearlhair.com'),
|
|
|
|
+ 'Asteria' => array('username'=>'huchunmei','api_key'=>'huchunmei126_asteria_erp888','url'=>'https://www.asteriahair.com'),
|
|
|
|
+ 'WestKiss' => array('username'=>'huchunmei','api_key'=>'huchunmei126_westkiss_erp868','url'=>'https://www.westkiss.com'),
|
|
|
|
+ 'SuperNova' => array('username'=>'huchunmei','api_key'=>'huchunmei126_supernova_erp6898','url'=>'https://www.supernovahair.com'),
|
|
|
|
+ 'Wiggins' => array('username'=>'huchunmei','api_key'=>'huchunmei126_wiggins_erp652','url'=>'https://www.wigginshair.com'),
|
|
|
|
+ 'Yolissa' => array('username'=>'huchunmei','api_key'=>'huchunmei126_yolissa_688','url'=>'https://www.yolissahair.com'),
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ $proxy = new SoapClient($userKey[$name]['url'].'/api/soap/?wsdl');
|
|
|
|
+ try {
|
|
|
|
+ $sessionId = $proxy->login($userKey[$name]['username'], $userKey[$name]['api_key']);
|
|
|
|
+ }
|
|
|
|
+ catch (Exception $e) {
|
|
|
|
+ echo $e->getMessage();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $data = array('proxy'=>$proxy,'sessionId'=>$sessionId,'url'=>$userKey[$name]['url']);
|
|
|
|
+
|
|
|
|
+ $fromTime = date('Y-m-d H:i:s',time()- 3600*24*6);
|
|
|
|
+ $toTime = date('Y-m-d H:i:s',time());
|
|
|
|
+ $filters = array(array('created_at'=>array('from'=>$fromTime,'to'=>$toTime)));
|
|
|
|
+ $result = $data['proxy']->call($data['sessionId'],'sales_order.list',$filters);
|
|
|
|
+ echo "<pre>";
|
|
|
|
+
|
|
|
|
+ // print_r($result[0]);
|
|
|
|
+ foreach($result as $item)
|
|
|
|
+ {
|
|
|
|
+ // print_r($item);exit;
|
|
|
|
+ $iteminfo= $data['proxy']->call($data['sessionId'], 'sales_order.info', $item['increment_id']);
|
|
|
|
+ print_r($iteminfo['items']);
|
|
|
|
+ die;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
public function _a($arg_array){
|
|
public function _a($arg_array){
|
|
|
|
+ $str = "420191079200190327908717115969";
|
|
|
|
+ echo substr($str,8);
|
|
|
|
+ die;
|
|
$time = time();
|
|
$time = time();
|
|
$jiami = "alipearlhair+".(string)$time;
|
|
$jiami = "alipearlhair+".(string)$time;
|
|
echo json_encode([
|
|
echo json_encode([
|
|
@@ -162,6 +209,28 @@ class Aatest extends Start_Controller {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public function upadtel(){
|
|
|
|
+
|
|
|
|
+ $returngoods_id = $data['rid'];
|
|
|
|
+ $insert_flag = $data['bid'];
|
|
|
|
+ $number = $data['bnum'];
|
|
|
|
+
|
|
|
|
+ $returngoods_info = $this->returngoods->read($returngoods_id);
|
|
|
|
+ $this->returngoods->save([
|
|
|
|
+ 'status'=>80,
|
|
|
|
+ 'back_no'=>$number,
|
|
|
|
+ 'back_id'=>$insert_flag,
|
|
|
|
+ 'update_time'=>date('Y-m-d H:i:s'),
|
|
|
|
+ ],$returngoods_id);
|
|
|
|
+ $this->returnlogs->insert([
|
|
|
|
+ 'rg_id'=>(int)$returngoods_id,
|
|
|
|
+ 'operat_id'=>10,
|
|
|
|
+ 'operat_name'=>'admin',
|
|
|
|
+ 'remark'=>"订单号:".$returngoods_info['orderinfo']."重新换货-换货新订单编码".$number,
|
|
|
|
+ 'create_time'=>date('Y-m-d H:i:s'),
|
|
|
|
+ ]);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
public function _waybillfs($data)
|
|
public function _waybillfs($data)
|
|
@@ -255,4 +324,7 @@ class Aatest extends Start_Controller {
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|