|
@@ -2082,58 +2082,58 @@ class WholeController extends Curd
|
|
|
Db::commit();
|
|
|
|
|
|
// 打小票
|
|
|
-// if (!empty($premises) && isset($params['submit_goods_classify']) && $params['submit_goods_classify'] == 'MEALS') {
|
|
|
-// dump("insert 打小票");
|
|
|
-// if ($premises->dept_category != '餐厅') {
|
|
|
-// $restaurant = SysDept::where('dept_super_id', $premises->dept_id)->where('dept_category', '餐厅')->first();
|
|
|
-// } else {
|
|
|
-// $restaurant = $premises;
|
|
|
-// }
|
|
|
-//
|
|
|
-// if (!empty($restaurant->dept_extend_json)) {
|
|
|
-// $deptExtendJson = json_decode($restaurant->dept_extend_json, true);
|
|
|
-// if (isset($deptExtendJson['printer'])) {
|
|
|
-// foreach ($deptExtendJson['printer'] as $key => $item) {
|
|
|
-// if (strpos($key, '结算') !== false && $params['order_status_payment'] == 'SUCCESS') {
|
|
|
-// $voteData = [
|
|
|
-// 'func' => 'procActionToPrinter',
|
|
|
-// 'sign' => '',
|
|
|
-// 'data' => [
|
|
|
-// 'printer_premises' => $restaurant->dept_id,
|
|
|
-// 'printer_device' => [
|
|
|
-// $key
|
|
|
-// ],
|
|
|
-// 'printer_action' => 'ExecPrintOrder',
|
|
|
-// 'printer_data' => [
|
|
|
-// 'order_id' => $params['orderId'],
|
|
|
-// 'order_batch' => ''
|
|
|
-// ]
|
|
|
-// ]
|
|
|
-// ];
|
|
|
-// http_post_json(getenv('VOTE_MENU_URL'), $voteData);
|
|
|
-// }
|
|
|
-// if ((strpos($key, '前台') !== false || strpos($key, '后厨') !== false)) {
|
|
|
-// $voteData = [
|
|
|
-// 'func' => 'procActionToPrinter',
|
|
|
-// 'sign' => '',
|
|
|
-// 'data' => [
|
|
|
-// 'printer_premises' => $restaurant->dept_id,
|
|
|
-// 'printer_device' => [
|
|
|
-// $key
|
|
|
-// ],
|
|
|
-// 'printer_action' => 'ExecPrintOrder',
|
|
|
-// 'printer_data' => [
|
|
|
-// 'order_id' => $params['orderId'],
|
|
|
-// 'order_batch' => ''
|
|
|
-// ]
|
|
|
-// ]
|
|
|
-// ];
|
|
|
-// http_post_json(getenv('VOTE_MENU_URL'), $voteData);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if (!empty($premises) && isset($params['submit_goods_classify']) && $params['submit_goods_classify'] == 'MEALS') {
|
|
|
+ dump("insert 打小票");
|
|
|
+ if ($premises->dept_category != '餐厅') {
|
|
|
+ $restaurant = SysDept::where('dept_super_id', $premises->dept_id)->where('dept_category', '餐厅')->first();
|
|
|
+ } else {
|
|
|
+ $restaurant = $premises;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!empty($restaurant->dept_extend_json)) {
|
|
|
+ $deptExtendJson = json_decode($restaurant->dept_extend_json, true);
|
|
|
+ if (isset($deptExtendJson['printer'])) {
|
|
|
+ foreach ($deptExtendJson['printer'] as $key => $item) {
|
|
|
+ if (strpos($key, '结算') !== false && $params['order_status_payment'] == 'SUCCESS') {
|
|
|
+ $voteData = [
|
|
|
+ 'func' => 'procActionToPrinter',
|
|
|
+ 'sign' => '',
|
|
|
+ 'data' => [
|
|
|
+ 'printer_premises' => $restaurant->dept_id,
|
|
|
+ 'printer_device' => [
|
|
|
+ $key
|
|
|
+ ],
|
|
|
+ 'printer_action' => 'ExecPrintOrder',
|
|
|
+ 'printer_data' => [
|
|
|
+ 'order_id' => $params['orderId'],
|
|
|
+ 'order_batch' => ''
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ http_post_json(getenv('VOTE_MENU_URL'), $voteData);
|
|
|
+ }
|
|
|
+ if ((strpos($key, '前台') !== false || strpos($key, '后厨') !== false)) {
|
|
|
+ $voteData = [
|
|
|
+ 'func' => 'procActionToPrinter',
|
|
|
+ 'sign' => '',
|
|
|
+ 'data' => [
|
|
|
+ 'printer_premises' => $restaurant->dept_id,
|
|
|
+ 'printer_device' => [
|
|
|
+ $key
|
|
|
+ ],
|
|
|
+ 'printer_action' => 'ExecPrintOrder',
|
|
|
+ 'printer_data' => [
|
|
|
+ 'order_id' => $params['orderId'],
|
|
|
+ 'order_batch' => ''
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ http_post_json(getenv('VOTE_MENU_URL'), $voteData);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if ($params['settlement_now'] == 'Y' && $params['order_status_payment'] != 'SUCCESS') {
|
|
|
_syslog("订单", "支付异常,检查是否有轮询");
|
|
@@ -2418,8 +2418,6 @@ class WholeController extends Curd
|
|
|
// 账户支付的金额
|
|
|
$params['order_amount_pay'] = $orderAmountPay;
|
|
|
}
|
|
|
-// $params['order_status_system'] = $systemStatus;
|
|
|
-// $params['order_status_payment'] = 'SUCCESS';
|
|
|
}
|
|
|
|
|
|
$orderConfigJson = [];
|
|
@@ -2560,58 +2558,57 @@ class WholeController extends Curd
|
|
|
Db::commit();
|
|
|
|
|
|
// 打小票
|
|
|
-// if (!empty($premises) && isset($params['submit_goods_classify']) && $params['submit_goods_classify'] == 'MEALS') {
|
|
|
-// dump("insertCons 打小票");
|
|
|
-//// if (!empty($premises)){
|
|
|
-// if ($premises->dept_category != '餐厅') {
|
|
|
-// $restaurant = SysDept::where('dept_super_id', $premises->dept_id)->where('dept_category', '餐厅')->first();
|
|
|
-// } else {
|
|
|
-// $restaurant = $premises;
|
|
|
-// }
|
|
|
-// if (!empty($restaurant->dept_extend_json)) {
|
|
|
-// $deptExtendJson = json_decode($restaurant->dept_extend_json, true);
|
|
|
-// if (isset($deptExtendJson['printer'])) {
|
|
|
-// foreach ($deptExtendJson['printer'] as $key => $item) {
|
|
|
-// if (strpos($key, '结算') !== false && $params['order_status_payment'] == 'SUCCESS') {
|
|
|
-// $voteData = [
|
|
|
-// 'func' => 'procActionToPrinter',
|
|
|
-// 'sign' => '',
|
|
|
-// 'data' => [
|
|
|
-// 'printer_premises' => $restaurant->dept_id,
|
|
|
-// 'printer_device' => [
|
|
|
-// $key
|
|
|
-// ],
|
|
|
-// 'printer_action' => 'ExecPrintOrder',
|
|
|
-// 'printer_data' => [
|
|
|
-// 'order_id' => $params['orderId'],
|
|
|
-// 'order_batch' => ''
|
|
|
-// ]
|
|
|
-// ]
|
|
|
-// ];
|
|
|
-// http_post_json(getenv('VOTE_MENU_URL'), $voteData);
|
|
|
-// }
|
|
|
-// if ((strpos($key, '前台') !== false || strpos($key, '后厨') !== false)) {
|
|
|
-// $voteData = [
|
|
|
-// 'func' => 'procActionToPrinter',
|
|
|
-// 'sign' => '',
|
|
|
-// 'data' => [
|
|
|
-// 'printer_premises' => $restaurant->dept_id,
|
|
|
-// 'printer_device' => [
|
|
|
-// $key
|
|
|
-// ],
|
|
|
-// 'printer_action' => 'ExecPrintOrder',
|
|
|
-// 'printer_data' => [
|
|
|
-// 'order_id' => $params['orderId'],
|
|
|
-// 'order_batch' => ''
|
|
|
-// ]
|
|
|
-// ]
|
|
|
-// ];
|
|
|
-// http_post_json(getenv('VOTE_MENU_URL'), $voteData);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if (!empty($premises) && isset($params['submit_goods_classify']) && $params['submit_goods_classify'] == 'MEALS') {
|
|
|
+// if (!empty($premises)){
|
|
|
+ if ($premises->dept_category != '餐厅') {
|
|
|
+ $restaurant = SysDept::where('dept_super_id', $premises->dept_id)->where('dept_category', '餐厅')->first();
|
|
|
+ } else {
|
|
|
+ $restaurant = $premises;
|
|
|
+ }
|
|
|
+ if (!empty($restaurant->dept_extend_json)) {
|
|
|
+ $deptExtendJson = json_decode($restaurant->dept_extend_json, true);
|
|
|
+ if (isset($deptExtendJson['printer'])) {
|
|
|
+ foreach ($deptExtendJson['printer'] as $key => $item) {
|
|
|
+ if (strpos($key, '结算') !== false && $params['order_status_payment'] == 'SUCCESS') {
|
|
|
+ $voteData = [
|
|
|
+ 'func' => 'procActionToPrinter',
|
|
|
+ 'sign' => '',
|
|
|
+ 'data' => [
|
|
|
+ 'printer_premises' => $restaurant->dept_id,
|
|
|
+ 'printer_device' => [
|
|
|
+ $key
|
|
|
+ ],
|
|
|
+ 'printer_action' => 'ExecPrintOrder',
|
|
|
+ 'printer_data' => [
|
|
|
+ 'order_id' => $params['orderId'],
|
|
|
+ 'order_batch' => ''
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ http_post_json(getenv('VOTE_MENU_URL'), $voteData);
|
|
|
+ }
|
|
|
+ if ((strpos($key, '前台') !== false || strpos($key, '后厨') !== false)) {
|
|
|
+ $voteData = [
|
|
|
+ 'func' => 'procActionToPrinter',
|
|
|
+ 'sign' => '',
|
|
|
+ 'data' => [
|
|
|
+ 'printer_premises' => $restaurant->dept_id,
|
|
|
+ 'printer_device' => [
|
|
|
+ $key
|
|
|
+ ],
|
|
|
+ 'printer_action' => 'ExecPrintOrder',
|
|
|
+ 'printer_data' => [
|
|
|
+ 'order_id' => $params['orderId'],
|
|
|
+ 'order_batch' => ''
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ http_post_json(getenv('VOTE_MENU_URL'), $voteData);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if ($params['settlement_now'] == 'Y' && $params['order_status_payment'] != 'SUCCESS') {
|
|
|
_syslog("订单", "支付异常,检查是否有轮询");
|