|
|
@@ -15,14 +15,15 @@ class Model_job_getcbtwaybillid extends Lin_Model {
|
|
|
$where = "cf = 1 and waybill = '' and type = '34' and state = '216' and shop = 42 ";
|
|
|
$where .= " and buytime > ".$start_time;
|
|
|
$list = $this->fullordertt->find_all($where,"id,orderinfo,number,shop,cf,waybill,type,state,buytime,extra_text");
|
|
|
+ echo "<pre>";
|
|
|
+ print_r($list);
|
|
|
if(empty($list)){
|
|
|
return ;
|
|
|
}
|
|
|
$shop_info = $this->shop->read(42);
|
|
|
foreach($list as $k => $v){
|
|
|
- if(!empty($v['waybill'])){
|
|
|
- $this->getWaybill($v['orderinfo'],$shop_info);
|
|
|
- die;
|
|
|
+ if(empty($v['waybill'])){
|
|
|
+ $this->getWaybill($v,$shop_info);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -42,6 +43,7 @@ class Model_job_getcbtwaybillid extends Lin_Model {
|
|
|
}
|
|
|
$packages_id = $extra_text['packages'][0]['id'];
|
|
|
}
|
|
|
+ var_dump($packages_id);
|
|
|
|
|
|
$waybill_info = $this->apitt->getWaybillInfo($packages_id,$shop);
|
|
|
if($waybill_info['code'] == 0){
|