Commit 9a060bbb by 宁斌

1、细项颜色可配 2、沽清分页码样式调整

parent b0548d5f
...@@ -24,9 +24,9 @@ public class MealStyleUtils { ...@@ -24,9 +24,9 @@ public class MealStyleUtils {
public static List<Modifier> assemblyModifiersColor(List<Modifier> modifierList) { public static List<Modifier> assemblyModifiersColor(List<Modifier> modifierList) {
for (Modifier modifier : modifierList) { // for (Modifier modifier : modifierList) {
modifier.getColorBean(); // modifier.getColorBean();
} // }
return modifierList; return modifierList;
} }
} }
...@@ -244,7 +244,7 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent ...@@ -244,7 +244,7 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
public void initFoodGroupView(List<Food> foodGroupList) { public void initFoodGroupView(List<Food> foodGroupList) {
//总的页数向上取整 //总的页数向上取整
totalPage = (int) Math.ceil(foodGroupList.size() * 1.0 / GoldConstants.foodGriupPageSize); totalPage = (int) Math.ceil(foodGroupList.size() * 1.0 / (foodGroupColumn * foodGroupRow));
int Rows = foodGroupRow; int Rows = foodGroupRow;
if (foodGroupList.size() <= foodGroupColumn) { if (foodGroupList.size() <= foodGroupColumn) {
...@@ -315,19 +315,17 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent ...@@ -315,19 +315,17 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
//循坏加入点点图片组 //循坏加入点点图片组
ivPoints[i] = new ImageView(this); ivPoints[i] = new ImageView(this);
if (i == 0) { if (i == 0) {
ivPoints[i].setImageResource(R.drawable.base_red_point); ivPoints[i].setImageResource(R.drawable.meal_food_group_point_focuese);
} else { } else {
ivPoints[i].setImageResource(R.drawable.base_grey_point); ivPoints[i].setImageResource(R.drawable.meal_food_group_point_unfocused);
} }
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(ArmsUtils.dip2px(this, 20), ArmsUtils.dip2px(this, 12));
lp.leftMargin = ArmsUtils.dip2px(this, 5);
ivPoints[i].setLayoutParams(lp);
ivPoints[i].setPadding(0, 0, 0, 0); ivPoints[i].setPadding(0, 0, 0, 0);
ll_food_group_point.addView(ivPoints[i]); ll_food_group_point.addView(ivPoints[i]);
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) ivPoints[i].getLayoutParams();
layoutParams.height = ll_food_group_point.getLayoutParams().height;
layoutParams.width = ArmsUtils.getScreenWidth(this) / totalPage;
ivPoints[i].setLayoutParams(layoutParams);
} }
if (foodGroupList.size() > 10) { if (foodGroupList.size() > (Rows * foodGroupColumn)) {
ll_food_group_point.setVisibility(View.VISIBLE); ll_food_group_point.setVisibility(View.VISIBLE);
} else { } else {
ll_food_group_point.setVisibility(View.GONE); ll_food_group_point.setVisibility(View.GONE);
...@@ -714,9 +712,9 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent ...@@ -714,9 +712,9 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
mPageIndex = pageIndex; mPageIndex = pageIndex;
for (int i = 0; i < totalPage; i++) { for (int i = 0; i < totalPage; i++) {
if (i == pageIndex) { if (i == pageIndex) {
ivPoints[i].setImageResource(R.drawable.base_red_point); ivPoints[i].setImageResource(R.drawable.meal_food_group_point_focuese);
} else { } else {
ivPoints[i].setImageResource(R.drawable.base_grey_point); ivPoints[i].setImageResource(R.drawable.meal_food_group_point_unfocused);
} }
} }
} }
......
...@@ -149,10 +149,9 @@ public class FineItemOneAdapter extends DefaultAdapter<Modifier> { ...@@ -149,10 +149,9 @@ public class FineItemOneAdapter extends DefaultAdapter<Modifier> {
/** /**
* 设置字体颜色以及块颜色 * 设置字体颜色以及块颜色
*/ */
ColorBean colorBean = datasBean.getColorBean(); if (datasBean.getBgColor() != -1) {
if (colorBean != null) { tv_food_name.setBackgroundColor(datasBean.getBgColor());
tv_food_name.setBackgroundColor(Color.parseColor(colorBean.getAndroidColor())); tv_food_name.setTextColor(datasBean.getFontColor());
tv_food_name.setTextColor(Color.parseColor(colorBean.getAndroidFontColor()));
} else { } else {
tv_food_name.setBackgroundColor(ArmsUtils.getColor(mContext, R.color.Grass_green)); tv_food_name.setBackgroundColor(ArmsUtils.getColor(mContext, R.color.Grass_green));
tv_food_name.setTextColor(ArmsUtils.getColor(mContext, R.color.theme_white_color)); tv_food_name.setTextColor(ArmsUtils.getColor(mContext, R.color.theme_white_color));
......
...@@ -180,10 +180,9 @@ public class FineItemTwoAdapter extends DefaultAdapter<Modifier> { ...@@ -180,10 +180,9 @@ public class FineItemTwoAdapter extends DefaultAdapter<Modifier> {
/** /**
* 设置字体颜色以及块颜色 * 设置字体颜色以及块颜色
*/ */
ColorBean colorBean = datasBean.getColorBean(); if (datasBean.getBgColor() != -1) {
if (colorBean != null) { tv_food_name.setBackgroundColor(datasBean.getBgColor());
tv_food_name.setBackgroundColor(Color.parseColor(colorBean.getAndroidColor())); tv_food_name.setTextColor(datasBean.getFontColor());
tv_food_name.setTextColor(Color.parseColor(colorBean.getAndroidFontColor()));
} else { } else {
tv_food_name.setBackgroundColor(ArmsUtils.getColor(mContext, R.color.Grass_green)); tv_food_name.setBackgroundColor(ArmsUtils.getColor(mContext, R.color.Grass_green));
tv_food_name.setTextColor(ArmsUtils.getColor(mContext, R.color.theme_white_color)); tv_food_name.setTextColor(ArmsUtils.getColor(mContext, R.color.theme_white_color));
...@@ -255,11 +254,6 @@ public class FineItemTwoAdapter extends DefaultAdapter<Modifier> { ...@@ -255,11 +254,6 @@ public class FineItemTwoAdapter extends DefaultAdapter<Modifier> {
} }
} }
//
public void setCurrentSlodoutFoodList_Full(List<SoldoutCtrFood> currentSlodoutFoodList_Full) {
this.mCurrentSlodoutFoodList_Full = currentSlodoutFoodList_Full;
}
public int getUser_qty() { public int getUser_qty() {
return user_qty; return user_qty;
} }
......
...@@ -106,10 +106,9 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> { ...@@ -106,10 +106,9 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
private void initModifierName(Modifier datasBean) { private void initModifierName(Modifier datasBean) {
String desc = datasBean.getModifierName(); String desc = datasBean.getModifierName();
ColorBean colorBean = datasBean.getColorBean(); if (datasBean.getBgColor() != -1) {
if (colorBean != null) { tv_name.setBackgroundColor(datasBean.getBgColor());
tv_name.setBackgroundColor(Color.parseColor(colorBean.getAndroidColor())); tv_name.setTextColor(datasBean.getFontColor());
tv_name.setTextColor(Color.parseColor(colorBean.getAndroidFontColor()));
} else { } else {
tv_name.setBackgroundColor(ArmsUtils.getColor(mContext, R.color.keyboard_paybill_normal)); tv_name.setBackgroundColor(ArmsUtils.getColor(mContext, R.color.keyboard_paybill_normal));
tv_name.setTextColor(ArmsUtils.getColor(mContext, R.color.theme_white_color)); tv_name.setTextColor(ArmsUtils.getColor(mContext, R.color.theme_white_color));
......
...@@ -72,15 +72,18 @@ ...@@ -72,15 +72,18 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycle_food_group" android:id="@+id/recycle_food_group"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:divider="@null"
android:fadeScrollbars="false"
android:orientation="vertical" />
<LinearLayout <LinearLayout
android:id="@+id/ll_food_group_point" android:id="@+id/ll_food_group_point"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="@dimen/dp_5" android:layout_height="wrap_content"
android:background="@color/theme_grey_color" android:layout_gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
android:visibility="invisible" /> android:visibility="visible" />
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
......
...@@ -120,7 +120,7 @@ public class GsaCloudApplication extends BaseApplication { ...@@ -120,7 +120,7 @@ public class GsaCloudApplication extends BaseApplication {
//初始化服務器地址 //初始化服務器地址
initDomainUrl(); initDomainUrl();
//初始化Http请求响应进度监听器 //初始化Http请求响应进度监听器
initHttpProgressListener(); // initHttpProgressListener();
//初始化QMUI相关 //初始化QMUI相关
initQMUI(); initQMUI();
//初始化哆啦A夢 //初始化哆啦A夢
......
...@@ -19,19 +19,9 @@ public class MyRetrofitConfiguration implements ClientModule.RetrofitConfigurati ...@@ -19,19 +19,9 @@ public class MyRetrofitConfiguration implements ClientModule.RetrofitConfigurati
@Override @Override
public void configRetrofit(Context context, Retrofit.Builder builder) { public void configRetrofit(Context context, Retrofit.Builder builder) {
// 配置多BaseUrl支持 // 配置多BaseUrl支持
OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder(); // OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder();
if (BuildConfig.DEBUG) { // if (BuildConfig.DEBUG) {
// clientBuilder.addInterceptor(new LoggingInterceptor());//使用自定义的Log拦截器 //// clientBuilder.addInterceptor(new LoggingInterceptor());//使用自定义的Log拦截器
} // }
clientBuilder.connectTimeout(OkHttpConfig.CONNECT_TIMEOUT, TimeUnit.SECONDS);
clientBuilder.writeTimeout(OkHttpConfig.REQUEST_TIMEOUT, TimeUnit.SECONDS);
clientBuilder.readTimeout(OkHttpConfig.REQUEST_TIMEOUT, TimeUnit.SECONDS);
clientBuilder.cache(new Cache(new File(OkHttpConfig.CACHE_DIRECTORY), OkHttpConfig.CACHE_MAXSIZE));
//使用一行代码监听 Retrofit/Okhttp 上传下载进度监听,以及 Glide 加载进度监听 详细使用方法查看 https://github.com/JessYanCoding/ProgressManager
ProgressManager.getInstance().with(clientBuilder);
//让 Retrofit 同时支持多个 BaseUrl 以及动态改变 BaseUrl. 详细使用请方法查看 https://github.com/JessYanCoding/RetrofitUrlManager
RetrofitUrlManager.getInstance().with(clientBuilder).build();
builder.client(clientBuilder.build());
} }
} }
...@@ -2,6 +2,7 @@ package com.gingersoft.gsa.cloud.database.utils; ...@@ -2,6 +2,7 @@ package com.gingersoft.gsa.cloud.database.utils;
import android.content.Context; import android.content.Context;
import android.database.Cursor; import android.database.Cursor;
import android.graphics.Color;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
...@@ -196,13 +197,10 @@ public class ModifierDaoUtils { ...@@ -196,13 +197,10 @@ public class ModifierDaoUtils {
ArrayList<Modifier> fms = new ArrayList<>(); ArrayList<Modifier> fms = new ArrayList<>();
// QueryBuilder<Modifier> queryBuilder = mManager.getDaoSession().queryBuilder(Modifier.class); String parentSql = "SELECT m.*,col.ANDROID_COLOR,col.ANDROID_FONT_COLOR FROM MODIFIER m join COLOR_BEAN col on m.COLOR_ID=col._id where MOD_MSG=1 and IS_PARENT=1";
// String parentSql = "SELECT * FROM MODIFIER WHERE MOD_MSG=1 and VISIBLE=0 and IS_PARENT=1";
String parentSql = "SELECT * FROM MODIFIER WHERE MOD_MSG=1 and IS_PARENT=1";
List<Modifier> parentModifiers = query_modifier_Child_new(parentSql, 0); List<Modifier> parentModifiers = query_modifier_Child_new(parentSql, 0);
// String childSql = "SELECT * FROM MODIFIER WHERE MOD_MSG=1 and VISIBLE=0 and IS_PARENT=0"; String childSql = "SELECT m.*,col.ANDROID_COLOR,col.ANDROID_FONT_COLOR FROM MODIFIER m join COLOR_BEAN col on m.COLOR_ID=col._id where MOD_MSG=1 and IS_PARENT=0";
String childSql = "SELECT * FROM MODIFIER WHERE MOD_MSG=1 and IS_PARENT=0";
List<Modifier> childModifiers = query_modifier_Child_new(childSql, 0); List<Modifier> childModifiers = query_modifier_Child_new(childSql, 0);
fms.addAll(parentModifiers); fms.addAll(parentModifiers);
...@@ -233,11 +231,12 @@ public class ModifierDaoUtils { ...@@ -233,11 +231,12 @@ public class ModifierDaoUtils {
// ModifierDao.Properties.IsParent.eq(0))).orderAsc(ModifierDao.Properties.SeqNo).list(); // ModifierDao.Properties.IsParent.eq(0))).orderAsc(ModifierDao.Properties.SeqNo).list();
// String parentSql = "SELECT * FROM MODIFIER WHERE MOD_TASTE=1 and VISIBLE=0 and IS_PARENT=1"; // String parentSql = "SELECT * FROM MODIFIER WHERE MOD_TASTE=1 and VISIBLE=0 and IS_PARENT=1";
String parentSql = "SELECT * FROM MODIFIER WHERE MOD_TASTE=1 and IS_PARENT=1"; String parentSql = "SELECT m.*,col.ANDROID_COLOR,col.ANDROID_FONT_COLOR FROM MODIFIER m join COLOR_BEAN col on m.COLOR_ID=col._id where MOD_TASTE=1 and IS_PARENT=1";
List<Modifier> parentModifiers = query_modifier_Child_new(parentSql, 0); List<Modifier> parentModifiers = query_modifier_Child_new(parentSql, 0);
// String childSql = "SELECT * FROM MODIFIER WHERE MOD_TASTE=1 and VISIBLE=0 and IS_PARENT=0"; // String childSql = "SELECT * FROM MODIFIER WHERE MOD_TASTE=1 and VISIBLE=0 and IS_PARENT=0";
String childSql = "SELECT * FROM MODIFIER WHERE MOD_TASTE=1 and IS_PARENT=0"; String childSql = "SELECT m.*,col.ANDROID_COLOR,col.ANDROID_FONT_COLOR FROM MODIFIER m join COLOR_BEAN col on m.COLOR_ID=col._id where MOD_TASTE=1 and IS_PARENT=0";
// String childSql = "SELECT * FROM MODIFIER WHERE MOD_TASTE=1 and IS_PARENT=0";
List<Modifier> childModifiers = query_modifier_Child_new(childSql, 0); List<Modifier> childModifiers = query_modifier_Child_new(childSql, 0);
fms.addAll(parentModifiers); fms.addAll(parentModifiers);
...@@ -268,11 +267,14 @@ public class ModifierDaoUtils { ...@@ -268,11 +267,14 @@ public class ModifierDaoUtils {
// ModifierDao.Properties.IsParent.eq(0))).orderAsc(ModifierDao.Properties.SeqNo).list(); // ModifierDao.Properties.IsParent.eq(0))).orderAsc(ModifierDao.Properties.SeqNo).list();
// String parentSql = "SELECT * FROM MODIFIER WHERE MOD_COMM=1 and VISIBLE=0 and IS_PARENT=1"; // String parentSql = "SELECT * FROM MODIFIER WHERE MOD_COMM=1 and VISIBLE=0 and IS_PARENT=1";
String parentSql = "SELECT * FROM MODIFIER WHERE MOD_COMM=1 and IS_PARENT=1"; // String parentSql = "SELECT * FROM MODIFIER WHERE MOD_COMM=1 and IS_PARENT=1";
String parentSql = "SELECT m.*,col.ANDROID_COLOR,col.ANDROID_FONT_COLOR FROM MODIFIER m join COLOR_BEAN col on m.COLOR_ID=col._id where MOD_COMM=1 and IS_PARENT=1";
List<Modifier> parentModifiers = query_modifier_Child_new(parentSql, 0); List<Modifier> parentModifiers = query_modifier_Child_new(parentSql, 0);
// String childSql = "SELECT * FROM MODIFIER WHERE MOD_COMM=1 and VISIBLE=0 and IS_PARENT=0"; // String childSql = "SELECT * FROM MODIFIER WHERE MOD_COMM=1 and VISIBLE=0 and IS_PARENT=0";
String childSql = "SELECT * FROM MODIFIER WHERE MOD_COMM=1 and IS_PARENT=0"; // String childSql = "SELECT * FROM MODIFIER WHERE MOD_COMM=1 and IS_PARENT=0";
String childSql = "SELECT m.*,col.ANDROID_COLOR,col.ANDROID_FONT_COLOR FROM MODIFIER m join COLOR_BEAN col on m.COLOR_ID=col._id where MOD_COMM=1 and IS_PARENT=0";
List<Modifier> childModifiers = query_modifier_Child_new(childSql, 0); List<Modifier> childModifiers = query_modifier_Child_new(childSql, 0);
fms.addAll(parentModifiers); fms.addAll(parentModifiers);
...@@ -303,10 +305,12 @@ public class ModifierDaoUtils { ...@@ -303,10 +305,12 @@ public class ModifierDaoUtils {
// ModifierDao.Properties.Visible.eq(0), // ModifierDao.Properties.Visible.eq(0),
// ModifierDao.Properties.IsParent.eq(0))).orderAsc(ModifierDao.Properties.SeqNo).list(); // ModifierDao.Properties.IsParent.eq(0))).orderAsc(ModifierDao.Properties.SeqNo).list();
String parentSql = "SELECT * FROM MODIFIER WHERE TOP_ID='" + topid + "' and VISIBLE=0 and IS_PARENT=1"; // String parentSql = "SELECT * FROM MODIFIER WHERE TOP_ID='" + topid + "' and VISIBLE=0 and IS_PARENT=1";
String parentSql = "SELECT m.*,col.ANDROID_COLOR,col.ANDROID_FONT_COLOR FROM MODIFIER m join COLOR_BEAN col on m.COLOR_ID=col._id where TOP_ID='" + topid + "' and VISIBLE=0 and IS_PARENT=1";
List<Modifier> parentModifiers = query_modifier_Child_new(parentSql, 0); List<Modifier> parentModifiers = query_modifier_Child_new(parentSql, 0);
String childSql = "SELECT * FROM MODIFIER WHERE TOP_ID='" + topid + "' and VISIBLE=0 and IS_PARENT=0"; // String childSql = "SELECT * FROM MODIFIER WHERE TOP_ID='" + topid + "' and VISIBLE=0 and IS_PARENT=0";
String childSql = "SELECT m.*,col.ANDROID_COLOR,col.ANDROID_FONT_COLOR FROM MODIFIER m join COLOR_BEAN col on m.COLOR_ID=col._id where TOP_ID='" + topid + "' and VISIBLE=0 and IS_PARENT=0";
List<Modifier> childModifiers = query_modifier_Child_new(childSql, 0); List<Modifier> childModifiers = query_modifier_Child_new(childSql, 0);
fms.addAll(parentModifiers); fms.addAll(parentModifiers);
...@@ -321,8 +325,8 @@ public class ModifierDaoUtils { ...@@ -321,8 +325,8 @@ public class ModifierDaoUtils {
// String sql = " SELECT MODIFIER.mid,MODIFIER_NAME,MODIFIER_NAME1,MODIFIER_NAME2,TOP_ID,PRICE,MOD_COMM,MOD_TASTE,MOD_MSG,VISIBLE,MULTIPLE,IS_PARENT" + // String sql = " SELECT MODIFIER.mid,MODIFIER_NAME,MODIFIER_NAME1,MODIFIER_NAME2,TOP_ID,PRICE,MOD_COMM,MOD_TASTE,MOD_MSG,VISIBLE,MULTIPLE,IS_PARENT" +
// " FROM MODIFIER join FOOD_MODIFIER on MODIFIER.MID=FOOD_MODIFIER.MID where MODIFIER.VISIBLE=0 and FOOD_MODIFIER.FID='" + fid + "' order by FOOD_MODIFIER.seq,MODIFIER.SEQ_NO"; // " FROM MODIFIER join FOOD_MODIFIER on MODIFIER.MID=FOOD_MODIFIER.MID where MODIFIER.VISIBLE=0 and FOOD_MODIFIER.FID='" + fid + "' order by FOOD_MODIFIER.seq,MODIFIER.SEQ_NO";
String sql = " SELECT MODIFIER.MID,MODIFIER_NAME,MODIFIER_NAME1,MODIFIER_NAME2,TOP_ID,PRICE,MOD_COMM,MOD_TASTE,MOD_MSG,INVISIBLE,VISIBLE,MULTIPLE,IS_PARENT,MAX_QTY,MIN_QTY,ABLE_DIS_COUNT,PRINT_SET,COST" + String sql = " SELECT MODIFIER.MID,MODIFIER_NAME,MODIFIER_NAME1,MODIFIER_NAME2,TOP_ID,PRICE,MOD_COMM,MOD_TASTE,MOD_MSG,INVISIBLE,VISIBLE,MULTIPLE,IS_PARENT,MAX_QTY,MIN_QTY,ABLE_DIS_COUNT,PRINT_SET,COST,col.ANDROID_COLOR,col.ANDROID_FONT_COLOR" +
" FROM MODIFIER join FOOD_MODIFIER fm on MODIFIER.MID=FOOD_MODIFIER.MID where MODIFIER.INVISIBLE!=1 and FOOD_MODIFIER.FID='" + fid + "' order by FOOD_MODIFIER.SEQ_NO,MODIFIER.TOP_ID,MODIFIER.SEQ_NO"; " FROM MODIFIER join FOOD_MODIFIER fm on MODIFIER.MID=FOOD_MODIFIER.MID join COLOR_BEAN col on m.COLOR_ID=col._id where MODIFIER.INVISIBLE!=1 and FOOD_MODIFIER.FID='" + fid + "' order by FOOD_MODIFIER.SEQ_NO,MODIFIER.TOP_ID,MODIFIER.SEQ_NO";
List<Modifier> mfs_child = new ArrayList<>(); List<Modifier> mfs_child = new ArrayList<>();
...@@ -334,15 +338,15 @@ public class ModifierDaoUtils { ...@@ -334,15 +338,15 @@ public class ModifierDaoUtils {
switch (mode) { switch (mode) {
case modifierMode_All: case modifierMode_All:
sqlstr = " SELECT m.MID,MODIFIER_NAME,MODIFIER_NAME1,MODIFIER_NAME2,TOP_ID,PRICE,MOD_COMM,MOD_TASTE,MOD_MSG,INVISIBLE,VISIBLE,MULTIPLE,IS_PARENT,DEFMODIFIER,MAX_QTY,MIN_QTY,ABLE_DIS_COUNT,PRINT_SET,KT_SETTING,COST" + sqlstr = " SELECT m.MID,MODIFIER_NAME,MODIFIER_NAME1,MODIFIER_NAME2,TOP_ID,PRICE,MOD_COMM,MOD_TASTE,MOD_MSG,INVISIBLE,VISIBLE,MULTIPLE,IS_PARENT,DEFMODIFIER,MAX_QTY,MIN_QTY,ABLE_DIS_COUNT,PRINT_SET,KT_SETTING,COST,col.ANDROID_COLOR,col.ANDROID_FONT_COLOR" +
" FROM MODIFIER m join FOOD_MODIFIER fm on m.TOP_ID=fm.MID where m.INVISIBLE!=1 and m.IS_PARENT=1 and fm.FID='" + fid + "' order by fm.SEQ_NO,m.TOP_ID,m.SEQ_NO"; " FROM MODIFIER m join FOOD_MODIFIER fm on m.TOP_ID=fm.MID join COLOR_BEAN col on m.COLOR_ID=col._id where m.INVISIBLE!=1 and m.IS_PARENT=1 and fm.FID='" + fid + "' order by fm.SEQ_NO,m.TOP_ID,m.SEQ_NO";
mfs_child1 = query_modifier_Child_new(sqlstr, fid); mfs_child1 = query_modifier_Child_new(sqlstr, fid);
List<Modifier> mfs_child2 = new ArrayList<>(); List<Modifier> mfs_child2 = new ArrayList<>();
sqlstr = " SELECT m.MID,MODIFIER_NAME,MODIFIER_NAME1,MODIFIER_NAME2,TOP_ID,PRICE,MOD_COMM,MOD_TASTE,MOD_MSG,INVISIBLE,VISIBLE,MULTIPLE,IS_PARENT,DEFMODIFIER,MAX_QTY,MIN_QTY,ABLE_DIS_COUNT,PRINT_SET,KT_SETTING,COST" + sqlstr = " SELECT m.MID,MODIFIER_NAME,MODIFIER_NAME1,MODIFIER_NAME2,TOP_ID,PRICE,MOD_COMM,MOD_TASTE,MOD_MSG,INVISIBLE,VISIBLE,MULTIPLE,IS_PARENT,DEFMODIFIER,MAX_QTY,MIN_QTY,ABLE_DIS_COUNT,PRINT_SET,KT_SETTING,COST,col.ANDROID_COLOR,col.ANDROID_FONT_COLOR" +
" FROM MODIFIER m join FOOD_MODIFIER fm on m.TOP_ID=fm.MID where m.INVISIBLE!=1 and m.IS_PARENT=0 and fm.FID='" + fid + "' order by fm.SEQ_NO,m.TOP_ID,m.SEQ_NO"; " FROM MODIFIER m join FOOD_MODIFIER fm on m.TOP_ID=fm.MID join COLOR_BEAN col on m.COLOR_ID=col._id where m.INVISIBLE!=1 and m.IS_PARENT=0 and fm.FID='" + fid + "' order by fm.SEQ_NO,m.TOP_ID,m.SEQ_NO";
mfs_child2 = query_modifier_Child_new(sqlstr, fid); mfs_child2 = query_modifier_Child_new(sqlstr, fid);
mfs_child1.addAll(mfs_child2); mfs_child1.addAll(mfs_child2);
...@@ -407,6 +411,15 @@ public class ModifierDaoUtils { ...@@ -407,6 +411,15 @@ public class ModifierDaoUtils {
modifier.setDefmodifier(defmodifier); modifier.setDefmodifier(defmodifier);
} }
} }
String backgroupColor = c.getString(c.getColumnIndex("ANDROID_COLOR"));
String fontColor = c.getString(c.getColumnIndex("ANDROID_FONT_COLOR"));
if (!TextUtils.isEmpty(backgroupColor)) {
modifier.setBgColor(Color.parseColor(backgroupColor));
}
if (!TextUtils.isEmpty(fontColor)) {
modifier.setFontColor(Color.parseColor(fontColor));
}
// if (order.isVisible()) { // if (order.isVisible()) {
modifiers.add(modifier); modifiers.add(modifier);
// } // }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment