Browse Source

修改信息

lvhao 5 days ago
parent
commit
e8abdde0f2
1 changed files with 37 additions and 34 deletions
  1. 37 34
      core/CoreApp/controllers/Fullordersmt.php

+ 37 - 34
core/CoreApp/controllers/Fullordersmt.php

@@ -2253,48 +2253,51 @@ class Fullordersmt extends Start_Controller {
 				else if($d['dlz'] == '0')//未发货声明状态
 				{
 					$result_t = $this->apismt->get_out($msg,'all',$d['orderinfo'],$ex['aecode'],$shop['code']);
-					$result = $result_t['result'];
-					if(isset($result['success']) && $result['success'] == "true")
+					if(isset($result_t['result']))
 					{
-						$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>1),$id);
-						/** 合并信息处理开始-发货声明 **/
-						if($d['merge'] != '0')
-						{
-							$hdata = $this->fullordersmt->find_all("merge = '".$d['merge']."' and id != '".$d['id']."' and dlz = '0' and source != 1");$i=0;
-							foreach ($hdata as $v) 
+						$result = $result_t['result'];
+						if(isset($result['success']) && $result['success'] == "true"){
+							$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>1),$id);
+							/** 合并信息处理开始-发货声明 **/
+							if($d['merge'] != '0')
 							{
-								$result_t = $this->apismt->get_out($msg,'all',$v['orderinfo'],$ex['aecode'],$shop['code']);
-								if(isset($result_t['result'])){
-									$result = $result_t['result'];
-									if(isset($result['success']) && $result['success'] == "true")
-									{
-										$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>1),$v['id']);
-									}
-									else
-									{
-										$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>2),$v['id']);
-									}
-								}else{
-									if(isset($d['result_success']) && $d['result_success'] == "true")
-									{
-										$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>1),$v['id']);
+								$hdata = $this->fullordersmt->find_all("merge = '".$d['merge']."' and id != '".$d['id']."' and dlz = '0' and source != 1");$i=0;
+								foreach ($hdata as $v) 
+								{
+									$result_t = $this->apismt->get_out($msg,'all',$v['orderinfo'],$ex['aecode'],$shop['code']);
+									if(isset($result_t['result'])){
+										$result = $result_t['result'];
+										if(isset($result['success']) && $result['success'] == "true")
+										{
+											$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>1),$v['id']);
+										}
+										else
+										{
+											$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>2),$v['id']);
+										}
+									}else{
+										if(isset($d['result_success']) && $d['result_success'] == "true")
+										{
+											$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>1),$v['id']);
+										}
+										else
+										{
+											$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>2),$v['id']);
+										}
 									}
-									else
+									
+									
+									$i++;
+									if($i > 10)
 									{
-										$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>2),$v['id']);
+										break;
 									}
 								}
-								
-					            
-								$i++;
-								if($i > 10)
-								{
-									break;
-								}
 							}
+							/** 合并信息处理结束开始 **/
+							echo json_encode(array('msg'=>'操作成功','success'=>true));exit;
 						}
-						/** 合并信息处理结束开始 **/
-						echo json_encode(array('msg'=>'操作成功','success'=>true));exit;
+						
 					}
 					else
 					{