|
@@ -2056,58 +2056,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);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
dump($params['settlement_now'], $params['order_status_payment']);
|
|
|
_syslog("订单", "创建订单成功");
|