|
@@ -141,7 +141,51 @@ class QueueCbt extends Start_Controller {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ public function _preGetService(){
|
|
|
|
|
+ $where_arr = [
|
|
|
|
|
+ //"shop"=>35,//当前店铺为tt-wk
|
|
|
|
|
+ //"express"=>83,//快递为tt-cbt
|
|
|
|
|
+ "print"=>2,//未打印
|
|
|
|
|
+ 'printtype'=>1,//打运单
|
|
|
|
|
+ "printnumber"=>0,//打印次数
|
|
|
|
|
+ 'library'=>1,//未出库
|
|
|
|
|
+ //'libraryconfirm'=>2,//允许出库
|
|
|
|
|
+ "review >"=>4,//审核通过或自动审核
|
|
|
|
|
+ "ttsp_status"=>0,//未同步 快递承运商
|
|
|
|
|
+ ];
|
|
|
|
|
+ //$shop_info = $this->shop->read(35);
|
|
|
|
|
+ $shop_list = $this->shop->find_all('1 = 1');
|
|
|
|
|
+ $shop_list = array_column($shop_list,null,'id');
|
|
|
|
|
+ // if(empty($shop_info)){
|
|
|
|
|
+ // exit("当前店铺不存在");
|
|
|
|
|
+ // }
|
|
|
|
|
+ $list = $this->db->from("fullordertt")
|
|
|
|
|
+ ->select("id,orderinfo,shop,express,print,printnumber,library,review,state")
|
|
|
|
|
+ ->where($where_arr)
|
|
|
|
|
+ ->where_in("express",[83,85])
|
|
|
|
|
+ ->where_not_in('state',[214,217])
|
|
|
|
|
+ ->get()->result_array();
|
|
|
|
|
+ if(empty($list)){
|
|
|
|
|
+ exit("没有符合条件的订单");
|
|
|
|
|
+ }
|
|
|
|
|
+ foreach($list as $k=>$v){
|
|
|
|
|
+ $info = $this->fullordertt->read($v['id']);
|
|
|
|
|
+ if(empty($info['extra_text'])){
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ $extra_text = json_decode($info['extra_text'],true);
|
|
|
|
|
+ if(isset($extra_text['server_info'])){
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(isset($shop_list[$info['shop']])){
|
|
|
|
|
+ $r = $this->express_tt->getExpressInfo($info,$shop_list[$info['shop']]);
|
|
|
|
|
+ print_r($info['orderinfo']);
|
|
|
|
|
+ print_r("|");
|
|
|
|
|
+ usleep(10);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|