|
@@ -17,9 +17,9 @@ class Model_job_get3pewaybillid extends Lin_Model {
|
|
|
$fields = "id,number,waybill,waybillid,librarytime,express";
|
|
|
|
|
|
$this->do_dlz($where,$fields);
|
|
|
- $this->do_tt();
|
|
|
- $this->do_amz();
|
|
|
- $this->do_smt();
|
|
|
+ $this->do_tt($where,$fields);
|
|
|
+ $this->do_amz($where,$fields);
|
|
|
+ $this->do_smt($where,$fields);
|
|
|
}
|
|
|
//执行对立站的代码
|
|
|
private function do_dlz($where,$fields){
|
|
@@ -34,29 +34,52 @@ class Model_job_get3pewaybillid extends Lin_Model {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private function do_tt(){
|
|
|
-
|
|
|
+ private function do_tt($where,$fields){
|
|
|
+ $list = $this->fullordertt->find_all($where,$fields);
|
|
|
+
|
|
|
+ foreach($list as $item){
|
|
|
+ if(empty($item['waybillid'])){
|
|
|
+ $this->do_final($item,"fullorder");
|
|
|
+ }else{
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- private function do_amz(){
|
|
|
-
|
|
|
+ private function do_amz($where,$fields){
|
|
|
+ $list = $this->fullorderamz->find_all($where,$fields);
|
|
|
+
|
|
|
+ foreach($list as $item){
|
|
|
+ if(empty($item['waybillid'])){
|
|
|
+ $this->do_final($item,"fullorder");
|
|
|
+ }else{
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- private function do_smt(){
|
|
|
-
|
|
|
+ private function do_smt($where,$fields){
|
|
|
+ $list = $this->fullordersmt->find_all($where,$fields);
|
|
|
+
|
|
|
+ foreach($list as $item){
|
|
|
+ if(empty($item['waybillid'])){
|
|
|
+ $this->do_final($item,"fullorder");
|
|
|
+ }else{
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private function do_final($info,$table_name){
|
|
|
- echo "<pre>";
|
|
|
print_r($info);
|
|
|
sleep(1);
|
|
|
$res = $this->itsxb->getDetail($info['number']);
|
|
|
$res = json_decode($res,true);
|
|
|
- print_r($res);
|
|
|
- die;
|
|
|
+
|
|
|
if(isset($res['code'])){
|
|
|
- if($info['waybill'] == $res['data']['deliveryNo']){
|
|
|
-
|
|
|
+ if($info['waybill'] != $res['data']['deliveryNo']){
|
|
|
+ $this->$table_name->save(['waybillid' => $res['data']['deliveryNo']],$info['id']);
|
|
|
}
|
|
|
}
|
|
|
+ die;
|
|
|
}
|
|
|
}
|