|
|
@@ -1051,10 +1051,10 @@ bool CSqlite3::UpdateOneFood(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)
|
|
|
@@ -1314,11 +1314,16 @@ std::vector<CFood> CSqlite3::GetFoodForTiaomacheng()
|
|
|
newFood.stockvalid = (char*)sqlite3_column_text(stmt, 19);
|
|
|
newFood.stock_warning = (char*)sqlite3_column_text(stmt, 20);
|
|
|
newFood.is_shouyinji_show = (char*)sqlite3_column_text(stmt, 21);
|
|
|
- newFood.expiration_date = (char*)sqlite3_column_text(stmt, 22);
|
|
|
- newFood.is_weight = (char*)sqlite3_column_text(stmt, 23);
|
|
|
- newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 24);
|
|
|
- newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 25);
|
|
|
- newFood.member_price_json = (char*)sqlite3_column_text(stmt, 26);
|
|
|
+ newFood.is_waimai_show = (char*)sqlite3_column_text(stmt, 22);
|
|
|
+ newFood.is_tangshi_show = (char*)sqlite3_column_text(stmt, 23);
|
|
|
+ newFood.is_zhengcan_show = (char*)sqlite3_column_text(stmt, 24);
|
|
|
+ newFood.expiration_date = (char*)sqlite3_column_text(stmt, 25);
|
|
|
+ newFood.is_weight = (char*)sqlite3_column_text(stmt, 26);
|
|
|
+ newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 27);
|
|
|
+ newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 28);
|
|
|
+ newFood.jiagong_type = (char*)sqlite3_column_text(stmt, 29);
|
|
|
+ newFood.cost_mode = (char*)sqlite3_column_text(stmt, 30);
|
|
|
+ newFood.member_price_json = (char*)sqlite3_column_text(stmt, 31);
|
|
|
|
|
|
data.push_back(newFood);
|
|
|
}
|
|
|
@@ -1381,11 +1386,16 @@ std::vector<CFood> CSqlite3::GetFoodByFoodname(std::string foodname, bool is_sho
|
|
|
newFood.stockvalid = (char*)sqlite3_column_text(stmt, 19);
|
|
|
newFood.stock_warning = (char*)sqlite3_column_text(stmt, 20);
|
|
|
newFood.is_shouyinji_show = (char*)sqlite3_column_text(stmt, 21);
|
|
|
- newFood.expiration_date = (char*)sqlite3_column_text(stmt, 22);
|
|
|
- newFood.is_weight = (char*)sqlite3_column_text(stmt, 23);
|
|
|
- newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 24);
|
|
|
- newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 25);
|
|
|
- newFood.member_price_json = (char*)sqlite3_column_text(stmt, 26);
|
|
|
+ newFood.is_waimai_show = (char*)sqlite3_column_text(stmt, 22);
|
|
|
+ newFood.is_tangshi_show = (char*)sqlite3_column_text(stmt, 23);
|
|
|
+ newFood.is_zhengcan_show = (char*)sqlite3_column_text(stmt, 24);
|
|
|
+ newFood.expiration_date = (char*)sqlite3_column_text(stmt, 25);
|
|
|
+ newFood.is_weight = (char*)sqlite3_column_text(stmt, 26);
|
|
|
+ newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 27);
|
|
|
+ newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 28);
|
|
|
+ newFood.jiagong_type = (char*)sqlite3_column_text(stmt, 29);
|
|
|
+ newFood.cost_mode = (char*)sqlite3_column_text(stmt, 30);
|
|
|
+ newFood.member_price_json = (char*)sqlite3_column_text(stmt, 31);
|
|
|
|
|
|
data.push_back(newFood);
|
|
|
}
|
|
|
@@ -1489,11 +1499,16 @@ bool CSqlite3::GetFoodById(std::string food_id, CFood& newFood)
|
|
|
newFood.stockvalid = (char*)sqlite3_column_text(stmt, 19);
|
|
|
newFood.stock_warning = (char*)sqlite3_column_text(stmt, 20);
|
|
|
newFood.is_shouyinji_show = (char*)sqlite3_column_text(stmt, 21);
|
|
|
- newFood.expiration_date = (char*)sqlite3_column_text(stmt, 22);
|
|
|
- newFood.is_weight = (char*)sqlite3_column_text(stmt, 23);
|
|
|
- newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 24);
|
|
|
- newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 25);
|
|
|
- newFood.member_price_json = (char*)sqlite3_column_text(stmt, 26);
|
|
|
+ newFood.is_waimai_show = (char*)sqlite3_column_text(stmt, 22);
|
|
|
+ newFood.is_tangshi_show = (char*)sqlite3_column_text(stmt, 23);
|
|
|
+ newFood.is_zhengcan_show = (char*)sqlite3_column_text(stmt, 24);
|
|
|
+ newFood.expiration_date = (char*)sqlite3_column_text(stmt, 25);
|
|
|
+ newFood.is_weight = (char*)sqlite3_column_text(stmt, 26);
|
|
|
+ newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 27);
|
|
|
+ newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 28);
|
|
|
+ newFood.jiagong_type = (char*)sqlite3_column_text(stmt, 29);
|
|
|
+ newFood.cost_mode = (char*)sqlite3_column_text(stmt, 30);
|
|
|
+ newFood.member_price_json = (char*)sqlite3_column_text(stmt, 31);
|
|
|
}
|
|
|
|
|
|
sqlite3_finalize(stmt);
|
|
|
@@ -1543,11 +1558,16 @@ bool CSqlite3::GetFoodByBarcode(std::string barcode, CFood& newFood)
|
|
|
newFood.stockvalid = (char*)sqlite3_column_text(stmt, 19);
|
|
|
newFood.stock_warning = (char*)sqlite3_column_text(stmt, 20);
|
|
|
newFood.is_shouyinji_show = (char*)sqlite3_column_text(stmt, 21);
|
|
|
- newFood.expiration_date = (char*)sqlite3_column_text(stmt, 22);
|
|
|
- newFood.is_weight = (char*)sqlite3_column_text(stmt, 23);
|
|
|
- newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 24);
|
|
|
- newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 25);
|
|
|
- newFood.member_price_json = (char*)sqlite3_column_text(stmt, 26);
|
|
|
+ newFood.is_waimai_show = (char*)sqlite3_column_text(stmt, 22);
|
|
|
+ newFood.is_tangshi_show = (char*)sqlite3_column_text(stmt, 23);
|
|
|
+ newFood.is_zhengcan_show = (char*)sqlite3_column_text(stmt, 24);
|
|
|
+ newFood.expiration_date = (char*)sqlite3_column_text(stmt, 25);
|
|
|
+ newFood.is_weight = (char*)sqlite3_column_text(stmt, 26);
|
|
|
+ newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 27);
|
|
|
+ newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 28);
|
|
|
+ newFood.jiagong_type = (char*)sqlite3_column_text(stmt, 29);
|
|
|
+ newFood.cost_mode = (char*)sqlite3_column_text(stmt, 30);
|
|
|
+ newFood.member_price_json = (char*)sqlite3_column_text(stmt, 31);
|
|
|
}
|
|
|
|
|
|
sqlite3_finalize(stmt);
|
|
|
@@ -1597,11 +1617,16 @@ bool CSqlite3::GetFoodByPluBianma(std::string barcode, CFood& newFood)
|
|
|
newFood.stockvalid = (char*)sqlite3_column_text(stmt, 19);
|
|
|
newFood.stock_warning = (char*)sqlite3_column_text(stmt, 20);
|
|
|
newFood.is_shouyinji_show = (char*)sqlite3_column_text(stmt, 21);
|
|
|
- newFood.expiration_date = (char*)sqlite3_column_text(stmt, 22);
|
|
|
- newFood.is_weight = (char*)sqlite3_column_text(stmt, 23);
|
|
|
- newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 24);
|
|
|
- newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 25);
|
|
|
- newFood.member_price_json = (char*)sqlite3_column_text(stmt, 26);
|
|
|
+ newFood.is_waimai_show = (char*)sqlite3_column_text(stmt, 22);
|
|
|
+ newFood.is_tangshi_show = (char*)sqlite3_column_text(stmt, 23);
|
|
|
+ newFood.is_zhengcan_show = (char*)sqlite3_column_text(stmt, 24);
|
|
|
+ newFood.expiration_date = (char*)sqlite3_column_text(stmt, 25);
|
|
|
+ newFood.is_weight = (char*)sqlite3_column_text(stmt, 26);
|
|
|
+ newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 27);
|
|
|
+ newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 28);
|
|
|
+ newFood.jiagong_type = (char*)sqlite3_column_text(stmt, 29);
|
|
|
+ newFood.cost_mode = (char*)sqlite3_column_text(stmt, 30);
|
|
|
+ newFood.member_price_json = (char*)sqlite3_column_text(stmt, 31);
|
|
|
}
|
|
|
|
|
|
sqlite3_finalize(stmt);
|