其他订单打印
This commit is contained in:
@@ -42,19 +42,12 @@ try {
|
|||||||
// 如果是数字。则打印订单
|
// 如果是数字。则打印订单
|
||||||
$is_log = false;
|
$is_log = false;
|
||||||
$curl_error = '';
|
$curl_error = '';
|
||||||
$order_id_t = strpos($data, '_');
|
$data = json_decode($data, true);
|
||||||
if($order_id_t !== false) {
|
|
||||||
$order_id = substr($data, 0, $order_id_t);
|
|
||||||
}else {
|
|
||||||
$order_id = $data;
|
|
||||||
}
|
|
||||||
$order = Db::table('tb_order_info')->where(['id' => $order_id])->find();
|
|
||||||
if($order) {
|
|
||||||
$rand = 'cashier_order' . Random::build();
|
$rand = 'cashier_order' . Random::build();
|
||||||
$send_id = 'cashier_'. $order['shop_id'];
|
$send_id = 'cashier_'. $data['shopId'];
|
||||||
// 收银机打印订单
|
// 收银机打印订单
|
||||||
$snd_data = [
|
$snd_data = [
|
||||||
'msg' => '收银机其他订单打印',
|
'msg' => '收银机其他打印',
|
||||||
'type' => 'cashier',
|
'type' => 'cashier',
|
||||||
'operate_type' => 'other_print',
|
'operate_type' => 'other_print',
|
||||||
'data_type' => 'other_print',
|
'data_type' => 'other_print',
|
||||||
@@ -80,10 +73,7 @@ try {
|
|||||||
$params_arr_n[] = $snd_data;
|
$params_arr_n[] = $snd_data;
|
||||||
Base::setredis_new(json_encode($params_arr_n), $snd_data['send_id']);
|
Base::setredis_new(json_encode($params_arr_n), $snd_data['send_id']);
|
||||||
}
|
}
|
||||||
}else {
|
|
||||||
$curl_error = 'order Data is empty';
|
|
||||||
$is_log = true;
|
|
||||||
}
|
|
||||||
if($is_log) {
|
if($is_log) {
|
||||||
Db::table('tb_mq_log')->insert([
|
Db::table('tb_mq_log')->insert([
|
||||||
'queue' => $queue,
|
'queue' => $queue,
|
||||||
|
|||||||
Reference in New Issue
Block a user