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