|
|
@@ -514,10 +514,15 @@ bool CSqlite3::InitPosFood()
|
|
|
"stockvalid CHAR(100) NOT NULL," \
|
|
|
"stock_warning CHAR(100) NOT NULL," \
|
|
|
"is_shouyinji_show CHAR(20) NOT NULL," \
|
|
|
+ "is_waimai_show CHAR(20) NOT NULL," \
|
|
|
+ "is_tangshi_show CHAR(20) NOT NULL," \
|
|
|
+ "is_zhengcan_show CHAR(20) NOT NULL," \
|
|
|
"expiration_date CHAR(100) NOT NULL," \
|
|
|
"is_weight CHAR(20) NOT NULL," \
|
|
|
"weight_plu_code CHAR(20) NOT NULL," \
|
|
|
"weight_food_code CHAR(20) NOT NULL," \
|
|
|
+ "jiagong_type CHAR(20) NOT NULL," \
|
|
|
+ "cost_mode CHAR(20) NOT NULL," \
|
|
|
"member_price_json CHAR(100) NOT NULL);";
|
|
|
|
|
|
if (sqlite3_prepare_v2(m_db, sql.c_str(), -1, &stmt, NULL) == SQLITE_OK)
|
|
|
@@ -847,6 +852,12 @@ bool CSqlite3::InitFoodData(rapidjson::Value& foodrows)
|
|
|
std::string is_weight = foodinfo["is_weight"].GetString();
|
|
|
std::string member_price_json = foodinfo["member_price_json"].GetString();
|
|
|
|
|
|
+ std::string is_waimai_show = foodinfo["is_waimai_show"].GetString();
|
|
|
+ std::string is_tangshi_show = foodinfo["is_tangshi_show"].GetString();
|
|
|
+ std::string is_zhengcan_show = foodinfo["is_zhengcan_show"].GetString();
|
|
|
+ std::string jiagong_type = foodinfo["jiagong_type"].GetString();
|
|
|
+ std::string cost_mode = foodinfo["cost_mode"].GetString();
|
|
|
+
|
|
|
std::string weight_plu_code;
|
|
|
if (foodinfo["weight_plu_code"].IsString())
|
|
|
{
|
|
|
@@ -869,10 +880,10 @@ bool CSqlite3::InitFoodData(rapidjson::Value& foodrows)
|
|
|
|
|
|
//²åÈëÒ»¸öÉÌÆ·Êý¾Ý
|
|
|
std::string sql = "INSERT INTO pos_food (id,shop_id,name,price,tag,status,type_id,is_dabao,dabao_money,is_nature,nature,autostocknum,goods_img,unit,barcode,member_price_used,member_price, \
|
|
|
- buying_price,stock,stockvalid,stock_warning,is_shouyinji_show,expiration_date,is_weight,member_price_json,weight_plu_code,weight_food_code) VALUES ('" + id + "' ,'" + shop_id + "','" \
|
|
|
+ buying_price,stock,stockvalid,stock_warning,is_shouyinji_show,is_waimai_show,is_tangshi_show,is_zhengcan_show,expiration_date,is_weight,member_price_json,weight_plu_code,weight_food_code,jiagong_type,cost_mode) VALUES ('" + id + "' ,'" + shop_id + "','" \
|
|
|
+ name + "', '" + price + "', '" + tag + "', '" + status + "', '" + type_id + "', '" + is_dabao + "', '" + dabao_money + "', '" + is_nature + "', '" + nature + "', '" \
|
|
|
+ autostocknum + "', '" + goods_img + "', '" + unit + "', '" + barcode + "', '" + member_price_used + "', '" + member_price + "', '" + buying_price + "', '" + stock + "', '" \
|
|
|
- + stockvalid + "', '" + stock_warning + "', '" + is_shouyinji_show + "', '" + expiration_date + "','" + is_weight + "','" + member_price_json + "','" + weight_plu_code + "','" + weight_food_code + "')";
|
|
|
+ + stockvalid + "', '" + stock_warning + "', '" + is_shouyinji_show + "', '" + is_waimai_show + "', '" + is_tangshi_show + "', '" + is_zhengcan_show + "', '" + expiration_date + "','" + is_weight + "','" + member_price_json + "','" + weight_plu_code + "','" + weight_food_code + "','" + jiagong_type + "','" + cost_mode + "')";
|
|
|
|
|
|
bool ret = this->ExeSQl(sql);
|
|
|
if (!ret)
|
|
|
@@ -1012,6 +1023,12 @@ bool CSqlite3::UpdateOneFood(rapidjson::Value& foodrows)
|
|
|
std::string is_weight = foodinfo["is_weight"].GetString();
|
|
|
std::string member_price_json = foodinfo["member_price_json"].GetString();
|
|
|
|
|
|
+ std::string is_waimai_show = foodinfo["is_waimai_show"].GetString();
|
|
|
+ std::string is_tangshi_show = foodinfo["is_tangshi_show"].GetString();
|
|
|
+ std::string is_zhengcan_show = foodinfo["is_zhengcan_show"].GetString();
|
|
|
+ std::string jiagong_type = foodinfo["jiagong_type"].GetString();
|
|
|
+ std::string cost_mode = foodinfo["cost_mode"].GetString();
|
|
|
+
|
|
|
std::string weight_plu_code;
|
|
|
if (foodinfo["weight_plu_code"].IsString())
|
|
|
{
|