lvhao 2 dni temu
rodzic
commit
9e94d5d6a4
1 zmienionych plików z 26 dodań i 0 usunięć
  1. 26 0
      core/CoreApp/controllers/Fullordersmt.php

+ 26 - 0
core/CoreApp/controllers/Fullordersmt.php

@@ -2300,6 +2300,32 @@ class Fullordersmt extends Start_Controller {
 					{
 						if(isset($result_t['result_success']) && $result_t['result_success'] == "true"){
 							$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_t = $this->apismt->get_out($msg,'all',$v['orderinfo'],$ex['aecode'],$shop['code']);
+									
+									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']);
+									}
+									
+									
+									
+									$i++;
+									if($i > 10)
+									{
+										break;
+									}
+								}
+							}
 							echo json_encode(array('msg'=>'操作成功','success'=>false));exit;
 						}else{
 							$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>2),$id);