|
@@ -2,6 +2,7 @@
|
|
|
#include "CMessagePush.h"
|
|
#include "CMessagePush.h"
|
|
|
|
|
|
|
|
#include "../tool/CPosPrinter.h"
|
|
#include "../tool/CPosPrinter.h"
|
|
|
|
|
+#include "../order/CWaimaiOrder.h"
|
|
|
|
|
|
|
|
#include "mmsystem.h"
|
|
#include "mmsystem.h"
|
|
|
|
|
|
|
@@ -113,8 +114,41 @@ void CMessagePush::HandleMessage(std::string msg)
|
|
|
mciSendString(Close.c_str(), NULL, 0, 0);
|
|
mciSendString(Close.c_str(), NULL, 0, 0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- CPosPrinter printer;
|
|
|
|
|
- printer.PrintWaimaiOrder(order_id, order_no);
|
|
|
|
|
|
|
+ //判断是否要自动确认
|
|
|
|
|
+ if (CSetting::GetParam("setting_is_new_waimai_autoconfirm") == "1")
|
|
|
|
|
+ {
|
|
|
|
|
+ CWaimaiOrder newOrder;
|
|
|
|
|
+ newOrder.ConfirmeOrder(order_id);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //判断是否右下角弹框提醒
|
|
|
|
|
+ if (CSetting::GetParam("setting_is_new_waimai_dialog") == "1")
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //判断是否自动打印
|
|
|
|
|
+ if (CSetting::GetParam("setting_is_new_waimai_printer") == "1")
|
|
|
|
|
+ {
|
|
|
|
|
+ CPosPrinter printer;
|
|
|
|
|
+
|
|
|
|
|
+ //判断打印规格和联数
|
|
|
|
|
+ std::string guige = CSetting::GetParam("setting_printer_guige");
|
|
|
|
|
+ std::string lianshu = CSetting::GetParam("setting_printer_lianshu");
|
|
|
|
|
+
|
|
|
|
|
+ int n_lianshu = atoi(lianshu.c_str());
|
|
|
|
|
+ for (int i = 0; i < n_lianshu; i++)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (guige == "58")
|
|
|
|
|
+ {
|
|
|
|
|
+ printer.PrintWaimaiOrder(order_id, order_no, 1);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ printer.PrintWaimaiOrder(order_id, order_no, 2);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
catch (std::exception& e)
|
|
catch (std::exception& e)
|