|
|
@@ -50,6 +50,7 @@ class QueueCbt extends Start_Controller {
|
|
|
"print"=>2,//未打印
|
|
|
"printnumber"=>0,//打印次数
|
|
|
'library'=>1,//未出库
|
|
|
+ 'printtype'=>1,//打运单
|
|
|
//'libraryconfirm'=>2,//允许出库
|
|
|
"review >"=>4,//审核通过或自动审核
|
|
|
];
|
|
|
@@ -84,11 +85,64 @@ class QueueCbt extends Start_Controller {
|
|
|
usleep(10);
|
|
|
}
|
|
|
}
|
|
|
- echo "<br/>";
|
|
|
- exit("执行完成");
|
|
|
+ var_dump(date("<br/>执行完成<br/>"));
|
|
|
+ sleep(3);
|
|
|
+ $this->_cbtCreateLabelAgain();
|
|
|
|
|
|
}
|
|
|
|
|
|
+ private function _cbtCreateLabelAgain(){
|
|
|
+ $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_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_encode($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(10);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ echo "<br/>";
|
|
|
+ exit("执行完成again");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public function _getService(){
|
|
|
if(date("H") != 19){
|
|
|
exit("当前不是19点执行".date("H"));
|
|
|
@@ -100,6 +154,7 @@ class QueueCbt extends Start_Controller {
|
|
|
//"shop"=>35,//当前店铺为tt-wk
|
|
|
"express"=>83,//快递为tt-cbt
|
|
|
"print"=>2,//未打印
|
|
|
+ 'printtype'=>1,//打运单
|
|
|
"printnumber"=>0,//打印次数
|
|
|
'library'=>1,//未出库
|
|
|
//'libraryconfirm'=>2,//允许出库
|