|
|
@@ -120,6 +120,54 @@ class QueueCbt extends Start_Controller {
|
|
|
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['label_info'])){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if(isset($shop_list[$info['shop']])){
|
|
|
+ $r = $this->express_tt->doCreateCBTLabel($info,$shop_list[$info['shop']]);
|
|
|
+ print_r($info['orderinfo']);
|
|
|
+ print_r("|");
|
|
|
+ usleep(500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var_dump(date("<br/>执行完成again<br/>"));
|
|
|
+ sleep(3);
|
|
|
+ $this->_cbtCreateLabelThree();
|
|
|
+ }
|
|
|
+
|
|
|
+ private function _cbtCreateLabelThree(){
|
|
|
+ $where_arr = [
|
|
|
+ //"shop"=>35,//当前店铺为tt-wk
|
|
|
+ // "express"=>83,//快递为tt-cbt
|
|
|
+ "print"=>2,//未打印
|
|
|
+ 'printtype'=>1,//打运单
|
|
|
+ "printnumber"=>0,//打印次数
|
|
|
+ 'library'=>1,//未出库
|
|
|
+ //'libraryconfirm'=>2,//允许出库
|
|
|
+ "review >"=>4,//审核通过或自动审核
|
|
|
+ ];
|
|
|
+ //$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'])){
|