|
@@ -2264,15 +2264,28 @@ class Fullordersmt extends Start_Controller {
|
|
|
foreach ($hdata as $v)
|
|
|
{
|
|
|
$result_t = $this->apismt->get_out($msg,'all',$v['orderinfo'],$ex['aecode'],$shop['code']);
|
|
|
- $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']);
|
|
|
+ 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']);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
$i++;
|
|
|
if($i > 10)
|
|
|
{
|