Kaynağa Gözat

删掉厨房打印机分类打印相关的设置

zhangyang 6 yıl önce
ebeveyn
işleme
82b53c6c94

BIN
bin/Win32/Debug/lewaimai_pos_windows/db/pos.db


BIN
bin/Win32/Debug/lewaimai_pos_windows/lewaimai_pos_windows.exe


+ 0 - 12
bin/Win32/Debug/lewaimai_pos_windows/skin/chufang_printer_setting.xml

@@ -32,18 +32,6 @@
 				<Label text="分单打印" width="160" />
 				<CheckBox name="chufang_setting_fendan" padding="0,5,0,5" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
 			</HorizontalLayout>
-
-			<HorizontalLayout height="56" valign="center">
-				<Label text="分类打印" width="160" />
-				<CheckBox name="chufang_setting_fenlei" padding="0,5,0,5" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-			</HorizontalLayout>
-			
-			<VerticalLayout name="chufang_setting_fenlei_xuanze">
-				<Label text="请在下面勾选需要打印的商品分类" height="30"/>
-				<VerticalLayout name="chufang_setting_fenlei_xuanze_area">
-					
-				</VerticalLayout>
-			</VerticalLayout>
 		</VerticalLayout>
 		
 		<HorizontalLayout height="56" valign="center" padding="0,30,0,20">

+ 0 - 2
bin/Win32/Debug/lewaimai_pos_windows/skin/setting.xml

@@ -67,8 +67,6 @@
 						<ListHeaderItem text="IP地址" width="200" align="center" />
 						<ListHeaderItem text="打印机规格" width="100" align="center" />
 						<ListHeaderItem text="商品分单打印" width="100" align="center" />
-						<ListHeaderItem text="按商品分类打印" width="200" align="center" />
-						<ListHeaderItem text="关联商品分类" width="200" align="center" />
 						<ListHeaderItem text="操作" align="center" />
 					</List> 
 				</VerticalLayout>

+ 1 - 5
bin/Win32/Debug/lewaimai_pos_windows/skin/setting_chufang_printer_item.xml

@@ -6,11 +6,7 @@
 			<Label name="setting_chufang_printer_item_name" width="200" align="center"/> 
 			<Label name="setting_chufang_printer_item_ip" width="200" align="center"/> 
 			<Label name="setting_chufang_printer_guige" width="100" align="center"/>
-			<Label name="setting_chufang_printer_fendan" width="100" align="center"/> 
-			<Label name="setting_chufang_printer_item_fenlei" width="200" align="center"/> 
-			<HorizontalLayout height="80" valign="center">
-				<Label name="setting_chufang_printer_item_fenlei_ids" width="300" multiline="true" align="center" valign="center"/> 
-			</HorizontalLayout>
+			<Label name="setting_chufang_printer_fendan" width="100" align="center"/>
 			<HorizontalLayout name="setting_chufang_printer_caozuo" align="center">
 				<Button name="setting_chufang_printer_item_update_btn" align="center" width="26" height="27" normalimage="file='Setting_Btn.png'" hotimage="file='Setting_Btn_Hover.png'" pushedimage="file='Setting_Btn_Active.png'" />
 				<Button name="setting_chufang_printer_item_delete_btn" align="center" width="18" height="18" padding="20,4,0,0" normalimage="file='Delete_Members_Icon.png'" hotimage="file='Delete_Members_Icon_Hover.png'" pushedimage="file='Delete_Members_Icon_Click.png'" />

+ 2 - 1
bin/Win32/Debug/lewaimai_pos_windows/skin/waimaiorder_info.xml

@@ -10,7 +10,7 @@
 				<VerticalLayout name="waimai_order_info_page_layout_1" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
 					<HorizontalLayout height="50">
 						<Label float="true" name="waimai_order_info_page_liushuihao" text="#1" pos="10, 10, 60, 40" />
-						<Label float="true" name="waimai_order_info_page_order_no" text="订单号:" pos="80, 10, 500, 40" />
+						<Label float="true" name="waimai_order_info_page_order_num" text="订单号:" pos="80, 10, 500, 40" />
 					</HorizontalLayout>
 
 					<Control height="1" bkcolor="#FF708090" />
@@ -66,6 +66,7 @@
 					<Label name="waimai_order_info_page_delivery_type" height="30" text="配送方式:" />
 					<Label name="waimai_order_info_page_delivery_time" height="30" text="配送时间:" />
 					<Label name="waimai_order_info_page_refund_status" height="30" text="退款状态:" />
+					<Label name="waimai_order_info_page_configmemo" height="30" text="商家备注:" />
 				</VerticalLayout>
 			</VerticalLayout>
 

+ 39 - 4
lewaimai_pos_windows/control/CWaimaiOrderInfoUI.cpp

@@ -13,8 +13,8 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
 	std::wstring liushuihao_show = L"#" + CLewaimaiString::UTF8ToUnicode(order.m_restaurant_number);
 	this->FindSubControl(_T("waimai_order_info_page_liushuihao"))->SetText(liushuihao_show.c_str());
 
-	std::wstring order_no_show = L"订单号:" + CLewaimaiString::UTF8ToUnicode(order.m_order_no);
-	this->FindSubControl(_T("waimai_order_info_page_order_no"))->SetText(order_no_show.c_str());
+	std::wstring order_no_show = L"订单号:" + CLewaimaiString::UTF8ToUnicode(order.m_order_num);
+	this->FindSubControl(_T("waimai_order_info_page_order_num"))->SetText(order_no_show.c_str());
 
 	//商品详情的渲染
 	CListUI* pFoodList = static_cast<CListUI*>(this->FindSubControl(_T("waimai_order_info_page_foodlist")));
@@ -240,8 +240,18 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
 	}
 	else
 	{
+		std::wstring wsDeliveryMode;
+		if (order.m_delivery_mode == "1")
+		{
+			wsDeliveryMode = L"(平台专送)";
+		}
+		else if (order.m_delivery_mode == "2")
+		{
+			wsDeliveryMode = L"(商家自配送)";
+		}
+
 		CLabelUI *pDeliveryType = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_delivery_type")));
-		wstring wsDeliveryType = _T("配送方式:外卖配送");
+		wstring wsDeliveryType = _T("配送方式:外卖配送") + wsDeliveryMode;
 		pDeliveryType->SetText(wsDeliveryType.c_str());
 	}
 
@@ -438,5 +448,30 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
 		pRefundStatus->SetText(refund_status_text.c_str());
 	}
 
-	this->FindSubControl(_T("waimai_order_info_page_layout_3"))->SetFixedHeight(order_filed_height + refundHeight + 181);
+	//如果是平台专送模式,商家不能设为成功和失败
+	if (order.m_delivery_mode == "1")
+	{
+		success_button->SetVisible(false);
+		fail_button->SetVisible(false);
+	}
+
+	int configMemoHeight = 0;
+	CLabelUI *pConfigmemo = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_configmemo")));
+
+	if (m_order.m_configmemo != "")
+	{
+		configMemoHeight = 30;
+		
+		wstring configMemo = L"商家备注:" + CLewaimaiString::UTF8ToUnicode(order.m_configmemo);
+		pConfigmemo->SetText(configMemo.c_str());
+		pConfigmemo->SetVisible(true);
+	}
+	else
+	{
+		configMemoHeight = 0;
+
+		pConfigmemo->SetVisible(false);
+	}
+
+	this->FindSubControl(_T("waimai_order_info_page_layout_3"))->SetFixedHeight(order_filed_height + refundHeight + configMemoHeight + 181);
 }

+ 1 - 1
lewaimai_pos_windows/order/CWaimaiOrder.cpp

@@ -68,7 +68,7 @@ void CWaimaiOrder::InitData(std::string order_id, std::string order_no)
 			m_order_status = data["order_status"].GetString();
 			m_courier_id = data["courier_id"].GetString();
 			m_is_selftake = data["is_selftake"].GetString();
-			//m_addservice_text = data["addservice_text"].GetString();
+			m_delivery_mode = data["delivery_mode"].GetString();
 			m_is_dabao = data["is_dabao"].GetString();
 			m_dabao_money = data["dabao_money"].GetString();
 			//m_phone_customer_id = data["phone_customer_id"].GetString();

+ 1 - 0
lewaimai_pos_windows/order/CWaimaiOrder.h

@@ -59,6 +59,7 @@ public:
 	std::string m_order_status;
 	std::string m_courier_id;
 	std::string m_is_selftake;
+	std::string m_delivery_mode;
 	std::string m_addservice_text;
 	std::string m_is_dabao;
 	std::string m_dabao_money;

+ 1 - 26
lewaimai_pos_windows/tool/CPosPrinter.cpp

@@ -388,33 +388,8 @@ void CPosPrinter::PrintWaimaiOrderChufang(CWaimaiOrder& order)
 
         std::string guige = printer.guige;
         std::string fendan = printer.fendan;
-        std::string fenlei = printer.fenlei;
-        std::string fenlei_ids = printer.fenlei_ids;
 
-        std::vector<CWaimaiOrderItem> cur_printer_use;
-        if(fenlei == "0")
-        {
-            cur_printer_use = order.m_order_items;
-        }
-        else
-        {
-            //如果开启了分类打印,就要比对了
-            std::map<string, bool> ids_map;
-            std::vector<string> ids = CLewaimaiString::Split(fenlei_ids, ",");
-            for(std::vector<string>::iterator it = ids.begin(); it != ids.end(); it++)
-            {
-                ids_map[(*it)] = true;
-            }
-
-            for(std::vector<CWaimaiOrderItem>::iterator it = order.m_order_items.begin(); it != order.m_order_items.end(); it++)
-            {
-                //if(ids_map.find((*it).m_type_id) != ids_map.end())
-                //{
-                //    //如果当前商品的分类,在厨房打印机设置的分类里面,才加入
-                //    cur_printer_use.push_back(*it);
-                //}
-            }
-        }
+        std::vector<CWaimaiOrderItem> cur_printer_use = order.m_order_items;
 
         if(fendan == "0")
         {

+ 2 - 8
lewaimai_pos_windows/tool/CSetting.cpp

@@ -6,8 +6,6 @@
 std::map<std::string, std::string> CSetting::m_paramsMap;
 std::vector<ChufangPrinter> CSetting::m_chufang_printers;
 std::mutex CSetting::m_mutex;
-std::vector<FoodType> CSetting::m_foodtypes;
-std::map<std::string, std::string> CSetting::m_foodtype_id_name;
 std::map<string, string> CSetting::m_users;
 std::string CSetting::m_username;
 std::string CSetting::m_password;
@@ -46,7 +44,7 @@ std::string CSetting::GetParam(std::string name)
 	return value;
 }
 
-void CSetting::AddChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, std::string fenlei, std::string fenlei_ids, bool isSave)
+void CSetting::AddChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, bool isSave)
 {
 	ChufangPrinter newPrinter;
 
@@ -55,8 +53,6 @@ void CSetting::AddChufangPrinter(std::string date, std::string name, std::string
 	newPrinter.ip = ip;
 	newPrinter.guige = guige;
 	newPrinter.fendan = fendan;
-	newPrinter.fenlei = fenlei;
-	newPrinter.fenlei_ids = fenlei_ids;
 
 	m_chufang_printers.push_back(newPrinter);
 
@@ -66,7 +62,7 @@ void CSetting::AddChufangPrinter(std::string date, std::string name, std::string
 	}
 }
 
-void CSetting::UpdateChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, std::string fenlei, std::string fenlei_ids, bool isSave)
+void CSetting::UpdateChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, bool isSave)
 {
 	for (std::vector<ChufangPrinter>::iterator it = m_chufang_printers.begin(); it != m_chufang_printers.end(); it++)
 	{
@@ -76,8 +72,6 @@ void CSetting::UpdateChufangPrinter(std::string date, std::string name, std::str
 			(*it).ip = ip;
 			(*it).guige = guige;
 			(*it).fendan = fendan;
-			(*it).fenlei = fenlei;
-			(*it).fenlei_ids = fenlei_ids;
 
 			break;
 		}

+ 2 - 36
lewaimai_pos_windows/tool/CSetting.h

@@ -10,8 +10,6 @@ public:
 	std::string ip;
 	std::string guige;
 	std::string fendan;
-	std::string fenlei;
-	std::string fenlei_ids;
 };
 
 class FoodType
@@ -32,8 +30,8 @@ public:
 	static std::string GetParam(std::string name);
 
 	//厨房打印机相关的参数配置
-	static void AddChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, std::string fenlei, std::string fenlei_ids, bool isSave = true);
-	static void UpdateChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, std::string fenlei, std::string fenlei_ids, bool isSave = true);
+	static void AddChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, bool isSave = true);
+	static void UpdateChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, bool isSave = true);
 	static void DelChufangPrinter(std::string date);
 
 	static ChufangPrinter GetChufangPrinter(std::string date);
@@ -81,33 +79,6 @@ public:
 		return m_chufang_printers;
 	}
 
-	static void AddFoodtype(std::string name, std::string type_id)
-	{
-		FoodType newFoodType;
-		newFoodType.name = name;
-		newFoodType.type_id = type_id;
-
-		m_foodtypes.push_back(newFoodType);
-
-		m_foodtype_id_name[type_id] = name;
-	}
-
-	static std::vector<FoodType>& GetFoodtype()
-	{
-		return m_foodtypes;
-	}
-
-	static std::string getFoodtypeName(std::string type_id)
-	{
-		if (m_foodtype_id_name.find(type_id) != m_foodtype_id_name.end())
-		{
-			return m_foodtype_id_name[type_id];
-		}
-
-		//返回这个表示没找到这个分类
-		return "lewaimai_not_found_xxx";
-	}
-
 	static void SetLoginInfo(std::string username, std::string password)
 	{
 		m_username = username;
@@ -142,11 +113,6 @@ private:
 
 	static std::mutex m_mutex;
 
-	static std::vector<FoodType> m_foodtypes;
-
-	//从商品分类的id到name的映射
-	static std::map<std::string, std::string> m_foodtype_id_name;
-
 	static std::map<string, string> m_users;
 
 	static std::string m_username;

+ 3 - 9
lewaimai_pos_windows/tool/CSqlite3.cpp

@@ -152,9 +152,7 @@ bool CSqlite3::InitConfig()
                       "name       CHAR(100)        NOT NULL," \
                       "ip         CHAR(100)        NOT NULL," \
                       "guige      CHAR(100)        NOT NULL," \
-                      "fendan     CHAR(100)        NOT NULL," \
-                      "fenlei     CHAR(100)        NOT NULL," \
-                      "fenlei_ids CHAR(2000)              );";
+                      "fendan     CHAR(100)        NOT NULL);";
 
                 if(sqlite3_prepare_v2(m_db, sql.c_str(), -1, &stmt, NULL) == SQLITE_OK)
                 {
@@ -201,11 +199,9 @@ bool CSqlite3::InitConfig()
                     std::string ip = (char*)sqlite3_column_text(stmt, 3);
                     std::string guige = (char*)sqlite3_column_text(stmt, 4);
                     std::string fendan = (char*)sqlite3_column_text(stmt, 5);
-                    std::string fenlei = (char*)sqlite3_column_text(stmt, 6);
-                    std::string fenlei_ids = (char*)sqlite3_column_text(stmt, 7);
 
                     //这里仅仅是把数据库内容读到内存,所以之类用false
-                    CSetting::AddChufangPrinter(date, name, ip, guige, fendan, fenlei, fenlei_ids, false);
+                    CSetting::AddChufangPrinter(date, name, ip, guige, fendan, false);
                 }
 
                 sqlite3_finalize(stmt);
@@ -344,10 +340,8 @@ bool CSqlite3::SaveChufangPrinter(std::vector<ChufangPrinter>& printers)
         std::string ip = (*it).ip;
         std::string guige = (*it).guige;
         std::string fendan = (*it).fendan;
-        std::string fenlei = (*it).fenlei;
-        std::string fenlei_ids = (*it).fenlei_ids;
 
-        sql = "INSERT INTO pos_chufang_printer (date, name, ip, guige, fendan, fenlei, fenlei_ids) VALUES ('" + date + "' ,'" + name + "','" + ip + "','" + guige + "','" + fendan + "','" + fenlei + "','" + fenlei_ids + "')";
+        sql = "INSERT INTO pos_chufang_printer (date, name, ip, guige, fendan) VALUES ('" + date + "' ,'" + name + "','" + ip + "','" + guige + "','" + fendan + "')";
         result = sqlite3_exec(m_db, sql.c_str(), 0, 0, 0);
     }
 

+ 2 - 98
lewaimai_pos_windows/wnd/CChufangSettingWnd.h

@@ -109,71 +109,7 @@ public:
 			{
 				fendan->Selected(false, false);
 			}
-		}		
-
-		CCheckBoxUI* fenlei = static_cast<CCheckBoxUI*>(m_pm.FindControl(_T("chufang_setting_fenlei")));
-		if (m_mode == 1)
-		{
-			fenlei->Selected(false, false);
-		}
-		else
-		{
-			ChufangPrinter updatePrinter = CSetting::GetChufangPrinter(m_printer_date);
-			if (updatePrinter.fenlei == "1")
-			{
-				fenlei->Selected(true, false);
-			}
-			else
-			{
-				fenlei->Selected(false, false);
-			}
-		}
-
-		//把所有分类显示出来
-		CVerticalLayoutUI* pLayout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("chufang_setting_fenlei_xuanze_area")));
-		pLayout->RemoveAll();
-
-		ChufangPrinter updatePrinter;
-
-		//这个map用于后面判断每个分类ID是否被选中
-		std::map<string, bool> ids_map;
-
-		if (m_mode == 2)
-		{
-			updatePrinter = CSetting::GetChufangPrinter(m_printer_date);
-			std::string foodtype_ids = updatePrinter.fenlei_ids;
-			std::vector<string> ids = CLewaimaiString::Split(foodtype_ids, ",");
-			for (std::vector<string>::iterator it = ids.begin(); it != ids.end(); it++)
-			{
-				ids_map[(*it)] = true;
-			}
-		}
-
-		std::vector<FoodType> foodtypes = CSetting::GetFoodtype();
-		for (std::vector<FoodType>::iterator it = foodtypes.begin(); it != foodtypes.end(); it++)
-		{
-			CDialogBuilder builder;
-			CListContainerElementUI* pEle = static_cast<CListContainerElementUI*>(builder.Create(_T("chufang_printer_setting_fenlei_select.xml"), (UINT)0, NULL, &m_pm));
-
-			CCheckBoxUI* pCheck = static_cast<CCheckBoxUI*>(pEle->FindSubControl(_T("chufang_setting_fenleli_xuanze_checkbox")));
-			pCheck->AddCustomAttribute(L"type_id", CLewaimaiString::UTF8ToUnicode((*it).type_id).c_str());
-
-			if (m_mode == 2)
-			{
-				if (ids_map.find((*it).type_id) != ids_map.end())
-				{
-					pCheck->Selected(true, false);
-				}
-			}
-
-			CLabelUI* pName = static_cast<CLabelUI*>(pEle->FindSubControl(_T("chufang_setting_fenleli_xuanze_name")));
-			pName->SetText(CLewaimaiString::UTF8ToUnicode((*it).name).c_str());
-
-			pLayout->Add(pEle);
 		}
-
-		CVerticalLayoutUI* pOutLayout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("chufang_setting_fenlei_xuanze")));
-		pOutLayout->SetFixedHeight(foodtypes.size() * 30 + 30);
     }
 
     void Notify(TNotifyUI& msg)
@@ -228,37 +164,6 @@ public:
                     wsFendan = L"0";
                 }
 
-                CCheckBoxUI* pFenlei = static_cast<CCheckBoxUI*>(m_pm.FindControl(_T("chufang_setting_fenlei")));
-                wstring wsFenlei;
-                if(pFenlei->IsSelected())
-                {
-                    wsFenlei = L"1";
-                }
-                else
-                {
-                    wsFenlei = L"0";
-                }
-
-				std::string fenlei_ids = "";
-
-				CVerticalLayoutUI* pLayout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("chufang_setting_fenlei_xuanze_area")));
-				CDuiPtrArray* pArray = m_pm.FindSubControlsByClass(pLayout, _T("CheckBox"));
-				int size = pArray->GetSize();
-				for (int i = 0; i < size; i++)
-				{
-					CCheckBoxUI* pBox = static_cast<CCheckBoxUI*>(pArray->GetAt(i));
-
-					if (pBox->IsSelected())
-					{
-						std::wstring ws_type_id = pBox->GetCustomAttribute(_T("type_id"));
-						std::string type_id = CLewaimaiString::UnicodeToUTF8(ws_type_id);
-
-						fenlei_ids += type_id + ",";
-					}
-				}
-
-				fenlei_ids = fenlei_ids.substr(0, fenlei_ids.size() - 1);
-
                 //保存数据到数据库
 
 				std::string date = to_string(time(NULL));
@@ -267,15 +172,14 @@ public:
 				std::string ip = CLewaimaiString::UnicodeToUTF8(wsIP);
 				std::string guige = CLewaimaiString::UnicodeToUTF8(wsGuige);
 				std::string fendan = CLewaimaiString::UnicodeToUTF8(wsFendan);
-				std::string fenlei = CLewaimaiString::UnicodeToUTF8(wsFenlei);
 
 				if (m_mode == 1)
 				{
-					CSetting::AddChufangPrinter(date, name, ip, guige, fendan, fenlei, fenlei_ids, true);
+					CSetting::AddChufangPrinter(date, name, ip, guige, fendan, true);
 				}
 				else
 				{
-					CSetting::UpdateChufangPrinter(m_printer_date, name, ip, guige, fendan, fenlei, fenlei_ids, true);
+					CSetting::UpdateChufangPrinter(m_printer_date, name, ip, guige, fendan, true);
 				}
 
                 Close(IDOK);

+ 0 - 139
lewaimai_pos_windows/wnd/CMainWnd.cpp

@@ -554,17 +554,6 @@ void CMainWnd::HandleClickMsg(TNotifyUI& msg)
                     pFendan->SetText(L"否");
                 }
 
-                CLabelUI* pFenlei = static_cast<CLabelUI*>(pEle->FindSubControl(_T("setting_chufang_printer_item_fenlei")));
-
-                if(newPrinter.fenlei == "1")
-                {
-                    pFenlei->SetText(L"是");
-                }
-                else
-                {
-                    pFenlei->SetText(L"否");
-                }
-
                 pEle->AddCustomAttribute(L"date", CLewaimaiString::UTF8ToUnicode(newPrinter.date).c_str());
 
                 pPrinterList->Add(pEle);
@@ -671,41 +660,6 @@ void CMainWnd::HandleClickMsg(TNotifyUI& msg)
                 {
                     pFendan->SetText(L"否");
                 }
-
-                CLabelUI* pFenlei = static_cast<CLabelUI*>(pEle->FindSubControl(_T("setting_chufang_printer_item_fenlei")));
-
-                if(newPrinter.fenlei == "1")
-                {
-                    pFenlei->SetText(L"是");
-                }
-                else
-                {
-                    pFenlei->SetText(L"否");
-                }
-
-                std::string foodtypeNames = "";
-
-                std::string foodtype_ids = newPrinter.fenlei_ids;
-                std::vector<string> ids = CLewaimaiString::Split(foodtype_ids, ",");
-                for(std::vector<string>::iterator it = ids.begin(); it != ids.end(); it++)
-                {
-                    std::string name = CSetting::getFoodtypeName((*it));
-                    std::wstring ws_name = CLewaimaiString::UTF8ToUnicode(name);
-                    if(name == "lewaimai_not_found_xxx")
-                    {
-                        //这种情况是以前保存的分类后来被删掉了
-                    }
-                    else
-                    {
-                        foodtypeNames += name + "  ";
-                    }
-                }
-
-                foodtypeNames = foodtypeNames.substr(0, foodtypeNames.size() - 1);
-                std::wstring ws_foodtypeNames = CLewaimaiString::UTF8ToUnicode(foodtypeNames);
-
-                CLabelUI* pFenleiIds = static_cast<CLabelUI*>(pEle->FindSubControl(_T("setting_chufang_printer_item_fenlei_ids")));
-                pFenleiIds->SetText(ws_foodtypeNames.c_str());
             }
         }
     }
@@ -1399,52 +1353,6 @@ void CMainWnd::InitSettingStatus()
     //这里开始,初始化厨房打印机的设置
     CListUI* pPrinterList = static_cast<CListUI*>(m_pm.FindControl(_T("setting_chufang_printer_list")));
 
-    //获取当前店铺的商品分类信息,用于设置厨房打印机的分类打印
-    std::map<string, string> params;
-    std::string response;
-
-    std::string url = "/goodstype/getgoodstypelist";
-
-    CLewaimaiHttpClient::Request(url.c_str(), params, response);
-
-    rapidjson::Document document;
-    document.Parse(response.c_str());
-
-    if(document.HasParseError())
-    {
-        LOG_INFO("parse response error!");
-        return;
-    }
-
-    if(!document.HasMember("errcode") || !document.HasMember("errmsg") || !document.HasMember("data"))
-    {
-        LOG_INFO("json error!");
-        return;
-    }
-
-    rapidjson::Value& v_errcode = document["errcode"];
-    int errcode = v_errcode.GetInt();
-    if(errcode != 0)
-    {
-        LOG_INFO("response failed! message:" << document["errmsg"].GetString());
-        return;
-    }
-
-    //获得数据成功,把分类信息保存起来
-    rapidjson::Value& data = document["data"];
-
-    rapidjson::Value& v_rows = data["goods_types"];
-
-    for(rapidjson::SizeType i = 0; i < v_rows.Size(); ++i)
-    {
-        rapidjson::Value& v_row_i = v_rows[i];
-
-        std::string type_id = v_row_i["type_id"].GetString();
-        std::string name = v_row_i["name"].GetString();
-
-        CSetting::AddFoodtype(name, type_id);
-    }
-
     //获取厨房打印机的集合
     std::vector<ChufangPrinter> printers = CSetting::getChufangPrints();
 
@@ -1483,53 +1391,6 @@ void CMainWnd::InitSettingStatus()
             pFendan->SetText(L"否");
         }
 
-        CLabelUI* pFenlei = static_cast<CLabelUI*>(pEle->FindSubControl(_T("setting_chufang_printer_item_fenlei")));
-
-        if(newPrinter.fenlei == "1")
-        {
-            pFenlei->SetText(L"是");
-        }
-        else
-        {
-            pFenlei->SetText(L"否");
-        }
-
-        std::string foodtypeNames = "";
-
-        std::string foodtype_ids = newPrinter.fenlei_ids;
-
-        //这个是删除掉不存在的type_id之后的
-        std::string new_foodtype_ids = "";
-
-        std::vector<string> ids = CLewaimaiString::Split(foodtype_ids, ",");
-        for(std::vector<string>::iterator it = ids.begin(); it != ids.end(); it++)
-        {
-            std::string name = CSetting::getFoodtypeName((*it));
-            if(name == "lewaimai_not_found_xxx")
-            {
-                //这种情况是以前保存的分类后来被删掉了
-            }
-            else
-            {
-                foodtypeNames += name + "  ";
-
-                new_foodtype_ids += (*it) + ",";
-            }
-        }
-
-        //删掉不存在的type_id,更新内存和数据库
-        new_foodtype_ids = new_foodtype_ids.substr(0, new_foodtype_ids.length() - 1);
-        if(new_foodtype_ids.compare(foodtype_ids) != 0)
-        {
-            CSetting::UpdateChufangPrinter(newPrinter.date, newPrinter.name, newPrinter.ip, newPrinter.guige, newPrinter.fendan, newPrinter.fenlei, new_foodtype_ids, true);
-        }
-
-        foodtypeNames = foodtypeNames.substr(0, foodtypeNames.size() - 1);
-        std::wstring ws_foodtypeNames = CLewaimaiString::UTF8ToUnicode(foodtypeNames);
-
-        CLabelUI* pFenleiIds = static_cast<CLabelUI*>(pEle->FindSubControl(_T("setting_chufang_printer_item_fenlei_ids")));
-        pFenleiIds->SetText(ws_foodtypeNames.c_str());
-
         //设置标记属性,用于修改时候匹配
         pEle->AddCustomAttribute(L"date", CLewaimaiString::UTF8ToUnicode(newPrinter.date).c_str());