Commit f947efa6 by Wyh

1、PRJ重印優化 2、餐牌一些頁面提交 3、在android 8.0設備上activity不能設置為透明且方向固定

Signed-off-by: Wyh <1239658231>
parent 9bcd4150
package com.gingersoft.gsa.cloud.print.bean;
import lombok.Data;
/**
* @author 宇航.
* User: admin
* Date: 2020/10/28
* Time: 18:18
* Use:
*/
@Data
public class UpdateBean {
// 1未打印 2打印中 3已打印
public static final int NO_PRINT = 1;
public static final int PRINTING = 2;
public static final int ALREADY_PRINT = 3;
public UpdateBean(String id, int printerType, Long printerTime) {
this.id = id;
this.printerType = printerType;
this.printerTime = printerTime;
}
private String id;
private int printerType;
private Long printerTime;
}
//package com.gingersoft.gsa.cloud.ui.recylcler.decorator;
//
//import android.content.Context;
//import android.graphics.Canvas;
//import android.graphics.Paint;
//import android.support.v7.widget.GridLayoutManager;
//import android.support.v7.widget.LinearLayoutManager;
//import android.support.v7.widget.RecyclerView;
//import android.text.TextUtils;
//import android.util.Log;
//import android.util.TypedValue;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.TextView;
//
//import java.util.List;
//
//
//public class ItemHeaderDecoration extends RecyclerView.ItemDecoration {
// private int mTitleHeight;
//// private List<RightBean> mDatas;
// private LayoutInflater mInflater;
// private CheckListener mCheckListener;
// public static String currentTag = "0";//标记当前左侧选中的position,因为有可能选中的item,右侧不能置顶,所以强制替换掉当前的tag
//
// void setCheckListener(CheckListener checkListener) {
// mCheckListener = checkListener;
// }
//
// ItemHeaderDecoration(Context context, List<RightBean> datas) {
//// this.mDatas = datas;
// Paint paint = new Paint();
// mTitleHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 30, context.getResources().getDisplayMetrics());
// int titleFontSize = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 16, context.getResources().getDisplayMetrics());
// paint.setTextSize(titleFontSize);
// paint.setAntiAlias(true);
// mInflater = LayoutInflater.from(context);
// }
//
//
// public ItemHeaderDecoration setData(List<RightBean> mDatas) {
// this.mDatas = mDatas;
// return this;
// }
//
// public static void setCurrentTag(String currentTag) {
// ItemHeaderDecoration.currentTag = currentTag;
// }
//
//
// @Override
// public void onDrawOver(Canvas canvas, final RecyclerView parent, RecyclerView.State state) {
// GridLayoutManager manager = (GridLayoutManager) parent.getLayoutManager();
// GridLayoutManager.SpanSizeLookup spanSizeLookup = manager.getSpanSizeLookup();
// int pos = ((LinearLayoutManager) (parent.getLayoutManager())).findFirstVisibleItemPosition();
// int spanSize = spanSizeLookup.getSpanSize(pos);
// Log.d("pos--->", String.valueOf(pos));
// String tag = mDatas.get(pos).getTag();
// View child = parent.findViewHolderForLayoutPosition(pos).itemView;
// boolean isTranslate = false;//canvas是否平移的标志
// if (!TextUtils.equals(mDatas.get(pos).getTag(), mDatas.get(pos + 1).getTag())
// || !TextUtils.equals(mDatas.get(pos).getTag(), mDatas.get(pos + 2).getTag())
// || !TextUtils.equals(mDatas.get(pos).getTag(), mDatas.get(pos + 3).getTag())
// ) {
// tag = mDatas.get(pos).getTag();
// int i = child.getHeight() + child.getTop();
// Log.d("i---->", String.valueOf(i));
// if (spanSize == 1) {
// //body 才平移
// if (child.getHeight() + child.getTop() < mTitleHeight) {
// canvas.save();
// isTranslate = true;
// int height = child.getHeight() + child.getTop() - mTitleHeight;
// canvas.translate(0, height);
// }
// }
//
//
// }
// drawHeader(parent, pos, canvas);
// if (isTranslate) {
// canvas.restore();
// }
// Log.d("tag--->", tag + "VS" + currentTag);
// if (!TextUtils.equals(tag, currentTag)) {
// currentTag = tag;
// Integer integer = Integer.valueOf(tag);
// mCheckListener.check(integer, false);
// }
// }
//
// /**
// * @param parent
// * @param pos
// */
// private void drawHeader(RecyclerView parent, int pos, Canvas canvas) {
// View topTitleView = mInflater.inflate(R.layout.item_title, parent, false);
// TextView tvTitle = (TextView) topTitleView.findViewById(R.id.tv_title);
// tvTitle.setText(mDatas.get(pos).getTitleName());
// //绘制title开始
// int toDrawWidthSpec;//用于测量的widthMeasureSpec
// int toDrawHeightSpec;//用于测量的heightMeasureSpec
// RecyclerView.LayoutParams lp = (RecyclerView.LayoutParams) topTitleView.getLayoutParams();
// if (lp == null) {
// lp = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);//这里是根据复杂布局layout的width height,new一个Lp
// topTitleView.setLayoutParams(lp);
// }
// topTitleView.setLayoutParams(lp);
// if (lp.width == ViewGroup.LayoutParams.MATCH_PARENT) {
// //如果是MATCH_PARENT,则用父控件能分配的最大宽度和EXACTLY构建MeasureSpec
// toDrawWidthSpec = View.MeasureSpec.makeMeasureSpec(parent.getWidth() - parent.getPaddingLeft() - parent.getPaddingRight(), View.MeasureSpec.EXACTLY);
// } else if (lp.width == ViewGroup.LayoutParams.WRAP_CONTENT) {
// //如果是WRAP_CONTENT,则用父控件能分配的最大宽度和AT_MOST构建MeasureSpec
// toDrawWidthSpec = View.MeasureSpec.makeMeasureSpec(parent.getWidth() - parent.getPaddingLeft() - parent.getPaddingRight(), View.MeasureSpec.AT_MOST);
// } else {
// //否则则是具体的宽度数值,则用这个宽度和EXACTLY构建MeasureSpec
// toDrawWidthSpec = View.MeasureSpec.makeMeasureSpec(lp.width, View.MeasureSpec.EXACTLY);
// }
// //高度同理
// if (lp.height == ViewGroup.LayoutParams.MATCH_PARENT) {
// toDrawHeightSpec = View.MeasureSpec.makeMeasureSpec(parent.getHeight() - parent.getPaddingTop() - parent.getPaddingBottom(), View.MeasureSpec.EXACTLY);
// } else if (lp.height == ViewGroup.LayoutParams.WRAP_CONTENT) {
// toDrawHeightSpec = View.MeasureSpec.makeMeasureSpec(parent.getHeight() - parent.getPaddingTop() - parent.getPaddingBottom(), View.MeasureSpec.AT_MOST);
// } else {
// toDrawHeightSpec = View.MeasureSpec.makeMeasureSpec(mTitleHeight, View.MeasureSpec.EXACTLY);
// }
// //依次调用 measure,layout,draw方法,将复杂头部显示在屏幕上
// topTitleView.measure(toDrawWidthSpec, toDrawHeightSpec);
// topTitleView.layout(parent.getPaddingLeft(), parent.getPaddingTop(), parent.getPaddingLeft() + topTitleView.getMeasuredWidth(), parent.getPaddingTop() + topTitleView.getMeasuredHeight());
// topTitleView.draw(canvas);//Canvas默认在视图顶部,无需平移,直接绘制
// //绘制title结束
//
// }
//}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/grey_100" />
<size android:height="@dimen/dp_1" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.qmuiteam.qmui.widget.QMUITopBar
android:id="@+id/topbar_list"
android:layout_width="match_parent"
android:layout_height="@dimen/head_height"
android:background="@color/theme_color"
android:fitsSystemWindows="true"
app:qmui_topbar_title_color="@color/theme_white_color" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/btn_save"
android:layout_below="@id/topbar_list" />
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id="@+id/btn_save"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_10"
android:background="@drawable/shape_app_btn"
android:gravity="center"
android:text="保存"
android:textColor="@color/white"
android:textSize="@dimen/dp_16" />
</RelativeLayout>
\ No newline at end of file
......@@ -469,6 +469,7 @@
<color name="color_e8">#e8e8e8</color>
<color name="color_ea">#EAEAEA</color>
<color name="color_4c">#4c4c4c</color>
<color name="color_f3">#F3F3F3</color>
<color name="tran_twenty_send_order_btn_bg_color">#331196DB</color>
<color name="tran_fifty_order_state0_color">#7F009788</color>
......@@ -511,4 +512,6 @@
<!-- 骨架屏加載時的顏色-->
<color name="skeleton_color">@color/color_f4</color>
<color name="required_color">#BE1C42</color>
</resources>
......@@ -21,6 +21,8 @@
<item name="iv_history" type="id"/>
<item name="topbar_right_change_button" type="id"/>
<item name="topbar_right_add_button" type="id"/>
<item name="topbar_right_edit_button" type="id"/>
<item name="layout_for_test" type="id"/>
<item name="topbar_heart_disconnect" type="id"/>
......
package com.gingersoft.gsa.delivery_pick_mode.mvp.contract;
import com.gingersoft.gsa.cloud.base.common.bean.BaseResult;
import com.gingersoft.gsa.delivery_pick_mode.mvp.bean.PrjQueryBean;
import com.jess.arms.mvp.IModel;
import com.jess.arms.mvp.IView;
import io.reactivex.Observable;
import okhttp3.RequestBody;
/**
......@@ -28,5 +30,7 @@ public interface PrjQueryContract {
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
Observable<PrjQueryBean> getKitchenPrint(String orderId);
Observable<BaseResult> updatePrjState(RequestBody requestBody);
}
}
......@@ -3,6 +3,7 @@ package com.gingersoft.gsa.delivery_pick_mode.mvp.model;
import android.app.Application;
import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication;
import com.gingersoft.gsa.cloud.base.common.bean.BaseResult;
import com.gingersoft.gsa.delivery_pick_mode.mvp.bean.PrjQueryBean;
import com.gingersoft.gsa.delivery_pick_mode.mvp.contract.PrjQueryContract;
import com.gingersoft.gsa.delivery_pick_mode.mvp.server.PrjQueryServer;
......@@ -14,6 +15,7 @@ import com.jess.arms.mvp.BaseModel;
import javax.inject.Inject;
import io.reactivex.Observable;
import okhttp3.RequestBody;
/**
......@@ -52,4 +54,10 @@ public class PrjQueryModel extends BaseModel implements PrjQueryContract.Model {
return mRepositoryManager.obtainRetrofitService(PrjQueryServer.class).
getKitchenPrint(orderId, GsaCloudApplication.getRestaurantId() + "");
}
@Override
public Observable<BaseResult> updatePrjState(RequestBody requestBody) {
return mRepositoryManager.obtainRetrofitService(PrjQueryServer.class).
updatePrjState(requestBody);
}
}
\ No newline at end of file
package com.gingersoft.gsa.delivery_pick_mode.mvp.presenter;
import android.app.Application;
import android.util.Log;
import com.gingersoft.gsa.cloud.base.common.bean.BaseResult;
import com.gingersoft.gsa.cloud.base.utils.JsonUtils;
import com.gingersoft.gsa.cloud.base.utils.other.TextUtil;
import com.gingersoft.gsa.cloud.base.utils.time.TimeUtils;
import com.gingersoft.gsa.cloud.print.bean.UpdateBean;
import com.gingersoft.gsa.delivery_pick_mode.mvp.bean.PrjQueryBean;
import com.gingersoft.gsa.delivery_pick_mode.mvp.contract.PrjQueryContract;
import com.jess.arms.di.scope.ActivityScope;
......@@ -11,6 +16,9 @@ import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import com.jess.arms.utils.RxLifecycleUtils;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import io.reactivex.android.schedulers.AndroidSchedulers;
......@@ -18,6 +26,8 @@ import io.reactivex.annotations.NonNull;
import io.reactivex.schedulers.Schedulers;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
import me.jessyan.rxerrorhandler.handler.ErrorHandleSubscriber;
import okhttp3.MediaType;
import okhttp3.RequestBody;
/**
......@@ -86,6 +96,42 @@ public class PrjQueryPresenter extends BasePresenter<PrjQueryContract.Model, Prj
super.onError(t);
}
});
}
public void updatePrjState(int printState, String ids, String orderNo) {
List<UpdateBean> updateBeans = new ArrayList<>();
String[] idArrays = ids.split(",");
long currentTimeInLong = TimeUtils.getCurrentTimeInLong();
for (String id : idArrays) {
updateBeans.add(new UpdateBean(id, printState, currentTimeInLong));
}
String json = JsonUtils.toJson(updateBeans);
Log.e(TAG, "" + json);
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), json);
mModel.updatePrjState(requestBody)
.subscribeOn(Schedulers.io())
.doOnSubscribe(disposable -> mRootView.showLoading("更新打印狀態 ..."))
.subscribeOn(AndroidSchedulers.mainThread())
.observeOn(AndroidSchedulers.mainThread())
.doAfterTerminate(() -> mRootView.hideLoading())
.compose(RxLifecycleUtils.bindToLifecycle(mRootView))
.subscribe(new ErrorHandleSubscriber<BaseResult>(mErrorHandler) {
@Override
public void onNext(@NonNull BaseResult info) {
if (info != null) {
if (info.getData() != null) {
getKitchenPrint(orderNo);
} else if (TextUtil.isNotEmptyOrNullOrUndefined(info.getErrMsg())) {
mRootView.showMessage(info.getErrMsg());
}
}
}
@Override
public void onError(Throwable t) {
super.onError(t);
}
});
}
}
package com.gingersoft.gsa.delivery_pick_mode.mvp.server;
import com.gingersoft.gsa.cloud.base.common.bean.BaseResult;
import com.gingersoft.gsa.delivery_pick_mode.mvp.bean.PrjQueryBean;
import io.reactivex.Observable;
import me.jessyan.retrofiturlmanager.RetrofitUrlManager;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
public interface PrjQueryServer {
......@@ -12,4 +16,7 @@ public interface PrjQueryServer {
@GET("printerRecording/getKitchenPrint" + RetrofitUrlManager.IDENTIFICATION_PATH_SIZE + 2)
Observable<PrjQueryBean> getKitchenPrint(@Query("orderNo") String orderId, @Query("restaurantId") String restaurantId);
@POST("printerRecording/update" + RetrofitUrlManager.IDENTIFICATION_PATH_SIZE + 2)
Observable<BaseResult> updatePrjState(@Body RequestBody requestBody);
}
......@@ -22,6 +22,8 @@ import com.gingersoft.gsa.cloud.base.utils.other.TextUtil;
import com.gingersoft.gsa.cloud.constans.AppConstans;
import com.gingersoft.gsa.cloud.constans.PrintConstans;
import com.gingersoft.gsa.cloud.print.bean.PrjBean;
import com.gingersoft.gsa.cloud.print.bean.UpdateBean;
import com.gingersoft.gsa.cloud.ui.utils.AppDialog;
import com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog;
import com.gingersoft.gsa.delivery_pick_mode.R;
import com.gingersoft.gsa.delivery_pick_mode.R2;
......@@ -178,62 +180,84 @@ public class PrjQueryActivity extends BaseActivity<PrjQueryPresenter> implements
}
}
private PrjStateAdapter prjStateAdapter;
@Override
public void loadPrjInfo(PrjQueryBean prjQueryBean) {
PrjStateAdapter prjStateAdapter = new PrjStateAdapter(mContext, prjQueryBean.getData());
rvPrjRecordList.setAdapter(prjStateAdapter);
prjStateAdapter.setOnItemChildClickListener((adapter, view, position) -> {
if (view.getId() == R.id.tv_prj_record_print_operation) {
//重印
List<PrjBean.DataBean.Bean> prjData = prjQueryBean.getData();
if (prjData.get(position).getParentId() == 0) {
//是主食品,判斷有沒有子食品,如果沒有子食品,直接打印主食品
if (position + 1 > prjData.size() ||
(position + 1 < prjData.size() && prjData.get(position + 1).getParentId() == 0)) {
//沒有子食品
//直接打印
List<PrjBean.DataBean.Bean> printDatas = new ArrayList<>();
printDatas.add(prjData.get(position));
printPrj(printDatas);
} else if (prjData.get(position).getProductId().equals(prjData.get(position + 1).getParentId() + "")) {
//有子食品
List<PrjBean.DataBean.Bean> printDatas = new ArrayList<>();
printDatas.add(prjData.get(position));
for (int i = position; i < prjData.size(); i++) {
if (prjData.get(position).getProductId().equals(prjData.get(i).getParentId() + "")) {
printDatas.add(prjData.get(i));
} else {
break;
}
}
printPrj(printDatas);
if (prjStateAdapter == null) {
prjStateAdapter = new PrjStateAdapter(mContext, prjQueryBean.getData());
rvPrjRecordList.setAdapter(prjStateAdapter);
prjStateAdapter.setOnItemChildClickListener((adapter, view, position) -> {
if (view.getId() == R.id.tv_prj_record_print_operation) {
//重印
List<PrjBean.DataBean.Bean> prjData = prjQueryBean.getData();
if (prjData.get(position).getType() == 3) {
//已打印的,提示是否重新打印
new AppDialog().showWaringDialog(mContext, "食品已打印,確認重印?", (view1, dialog) -> {
dialog.dismiss();
organizeData(position, prjData);
});
} else {
organizeData(position, prjData);
}
}
});
rvPrjRecordList.setLayoutManager(new LinearLayoutManager(mContext));
} else {
prjStateAdapter.setNewInstance(prjQueryBean.getData());
}
}
private void organizeData(int position, List<PrjBean.DataBean.Bean> prjData) {
if (prjData.get(position).getParentId() == 0) {
//是主食品,判斷有沒有子食品,如果沒有子食品,直接打印主食品
if (position + 1 > prjData.size() ||
(position + 1 < prjData.size() && prjData.get(position + 1).getParentId() == 0)) {
//沒有子食品
//直接打印
List<PrjBean.DataBean.Bean> printDatas = new ArrayList<>();
printDatas.add(prjData.get(position));
printPrj(printDatas);
} else if (prjData.get(position).getProductId().equals(prjData.get(position + 1).getParentId() + "")) {
//有子食品
List<PrjBean.DataBean.Bean> printDatas = new ArrayList<>();
printDatas.add(prjData.get(position));
for (int i = position; i < prjData.size(); i++) {
if (prjData.get(position).getProductId().equals(prjData.get(i).getParentId() + "")) {
printDatas.add(prjData.get(i));
} else {
break;
}
} else {
//是子食品,直接打印子食品
List<PrjBean.DataBean.Bean> printDatas = new ArrayList<>();
printDatas.add(prjData.get(position));
printPrj(printDatas);
}
//添加重印的報警推送
OkHttp3Utils.noticePersonnel(AppConstans.RP_REPRINT_CODE, "重印,訂單號:" + prjData.get(position).getOrderNo());
printPrj(printDatas);
}
});
rvPrjRecordList.setLayoutManager(new LinearLayoutManager(mContext));
} else {
//是子食品,直接打印子食品
List<PrjBean.DataBean.Bean> printDatas = new ArrayList<>();
printDatas.add(prjData.get(position));
printPrj(printDatas);
}
//添加重印的報警推送
OkHttp3Utils.noticePersonnel(AppConstans.RP_REPRINT_CODE, "重印,訂單號:" + prjData.get(position).getOrderNo());
}
private void printPrj(List<PrjBean.DataBean.Bean> printDatas) {
StringBuilder ids = new StringBuilder();
for (int i = 0; i < printDatas.size(); i++) {
printDatas.get(i).setTotalPrj(printDatas.size());
printDatas.get(i).setCurrentIndex(i);
ids.append(printDatas.get(i).getId());
}
String finalIds = ids.toString();
CC.obtainBuilder("Component.Print")
.addParam(PrintConstans.PRINT_TYPE, PrintConstans.PRINT_KITCHEN)
.addParam("prjBeans", printDatas)
.setActionName("printActivity")
.build()
.callAsyncCallbackOnMainThread((cc, result) -> {
if (result.isSuccess()) {
mPresenter.updatePrjState(UpdateBean.ALREADY_PRINT, finalIds, printDatas.get(0).getOrderNo());
}
});
}
}
......@@ -19,6 +19,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.gingersoft.gsa.cloud.base.order.bean.BillOrderMoney;
import com.gingersoft.gsa.cloud.base.order.bean.OrderDetail;
import com.gingersoft.gsa.cloud.base.order.bean.mealManger.MyOrderManage;
import com.gingersoft.gsa.cloud.base.utils.other.SPUtils;
import com.gingersoft.gsa.cloud.base.utils.other.TextUtil;
import com.gingersoft.gsa.cloud.base.utils.time.TimePickerUtils;
import com.gingersoft.gsa.cloud.base.utils.time.TimeUtils;
......@@ -114,6 +115,10 @@ public class SendOrderActivity extends BaseActivity<SendOrderPresenter> implemen
private final int SELECT_ADDRESS_REQUEST_CODE = 1001;
private final int SELECT_ADDRESS_RESULT_CODE = 1002;
public final static String MEMBER_NAME_KEY = "memberName";
public final static String MEMBER_PHONE_KEY = "memberPhone";
public final static String MEMBER_ADDRESS_KEY = "memberAddress";
@Override
public void setupActivityComponent(@NonNull AppComponent appComponent) {
DaggerSendOrderComponent //如找不到该类,请编译一下项目
......@@ -206,6 +211,19 @@ public class SendOrderActivity extends BaseActivity<SendOrderPresenter> implemen
PayBillAdapter payBillAdapter = new PayBillAdapter(R.layout.item_pay_bill, billBeans);
rvSendOrderBills.setAdapter(payBillAdapter);
rvSendOrderBills.setLayoutManager(new LinearLayoutManager(mContext));
String memberName = (String) SPUtils.get(mContext, MEMBER_NAME_KEY, "");
String memberPhone = (String) SPUtils.get(mContext, MEMBER_PHONE_KEY, "");
String memberAddress = (String) SPUtils.get(mContext, MEMBER_ADDRESS_KEY, "");
if (TextUtil.isNotEmptyOrNullOrUndefined(memberName)) {
edSendOrderName.setText(memberName);
}
if (TextUtil.isNotEmptyOrNullOrUndefined(memberPhone)) {
edSendOrderPhone.setText(memberPhone);
}
if (TextUtil.isNotEmptyOrNullOrUndefined(memberAddress)) {
edSendOrderAddress.setText(memberAddress);
}
}
private OrderDetails.DataBean.PRODUCTNAMEBean orderDetailTranProductnameBean(OrderDetail orderDetail) {
......@@ -299,6 +317,9 @@ public class SendOrderActivity extends BaseActivity<SendOrderPresenter> implemen
mPresenter.submitOrder(edSendOrderName.getText().toString(),
edSendOrderPhone.getText().toString(),
edSendOrderAddress.getText().toString(), sendTime);
SPUtils.remove(mContext, MEMBER_NAME_KEY);
SPUtils.remove(mContext, MEMBER_PHONE_KEY);
SPUtils.remove(mContext, MEMBER_ADDRESS_KEY);
} else {
showMessage("請輸入送貨地址");
}
......@@ -325,6 +346,15 @@ public class SendOrderActivity extends BaseActivity<SendOrderPresenter> implemen
showMessage("請輸入顧客電話");
}
} else if (viewId == R.id.tv_continue_add_food) {
if (TextUtil.isNotEmptyOrNullOrUndefined(edSendOrderName)) {
SPUtils.put(mContext, MEMBER_NAME_KEY, edSendOrderName.getText().toString());
}
if (TextUtil.isNotEmptyOrNullOrUndefined(edSendOrderPhone)) {
SPUtils.put(mContext, MEMBER_PHONE_KEY, edSendOrderPhone.getText().toString());
}
if (TextUtil.isNotEmptyOrNullOrUndefined(edSendOrderAddress)) {
SPUtils.put(mContext, MEMBER_ADDRESS_KEY, edSendOrderAddress.getText().toString());
}
killMyself();
} else if (viewId == R.id.iv_select_member_arrow || viewId == R.id.iv_select_address_arrow) {
if (mPresenter.addressData == null) {
......
......@@ -42,8 +42,8 @@ public class PrjStateAdapter extends BaseQuickAdapter<PrjBean.DataBean.Bean, Bas
state.setText("打印失敗");
state.setTextColor(ContextCompat.getColor(context, R.color.red));
} else {
state.setText("未知");
state.setTextColor(ContextCompat.getColor(context, R.color.gray));
state.setText("打印失敗");
state.setTextColor(ContextCompat.getColor(context, R.color.red));
}
if (baseViewHolder.getAdapterPosition() == 0) {
//只第一次測量一下
......
......@@ -15,7 +15,6 @@ import android.view.View
import android.widget.TextView
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat
import androidx.core.view.isGone
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Observer
......@@ -25,13 +24,13 @@ import com.billy.cc.core.component.CC
import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
import com.gingersoft.gsa.cloud.base.order.bean.mealManger.MyOrderManage
import com.gingersoft.gsa.cloud.base.utils.RestaurantExpandInfoUtils
import com.gingersoft.gsa.cloud.base.utils.other.SPUtils
import com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
import com.gingersoft.gsa.cloud.base.widget.DialogUtils
import com.gingersoft.gsa.cloud.constans.AppConstans
import com.gingersoft.gsa.cloud.constans.ExpandConstant
import com.gingersoft.gsa.cloud.constans.FoodSummaryConstans.TAKEAWAY_TYPE
import com.gingersoft.gsa.cloud.constans.FunctionManagerConstants
import com.gingersoft.gsa.cloud.database.bean.Function
import com.gingersoft.gsa.cloud.function.FunctionManager
import com.gingersoft.gsa.cloud.service.GetInfoUpdateService
import com.gingersoft.gsa.cloud.service.PostCallBack
......@@ -39,6 +38,7 @@ import com.gingersoft.gsa.cloud.ui.utils.AppDialog
import com.gingersoft.gsa.delivery_pick_mode.R
import com.gingersoft.gsa.delivery_pick_mode.databinding.ActivityOtherOrderBinding
import com.gingersoft.gsa.delivery_pick_mode.model.viewModel.PageViewModel
import com.gingersoft.gsa.delivery_pick_mode.mvp.ui.activity.SendOrderActivity
import com.gingersoft.gsa.delivery_pick_mode.ui.adapter.SectionsPagerAdapter
import com.gingersoft.gsa.delivery_pick_mode.ui.base.BaseActivity
import com.gingersoft.gsa.delivery_pick_mode.util.InjectorUtil
......@@ -603,6 +603,9 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen
.setActionName("showMealStandActivity")
.build()
.call()
SPUtils.remove(mContext, SendOrderActivity.MEMBER_NAME_KEY)
SPUtils.remove(mContext, SendOrderActivity.MEMBER_PHONE_KEY)
SPUtils.remove(mContext, SendOrderActivity.MEMBER_ADDRESS_KEY)
pop!!.dismiss()
}
}
......
......@@ -31,6 +31,37 @@
<activity
android:name=".mvp.ui.activity.RestaurantQrCodeActivity"
android:screenOrientation="portrait" />
<activity
android:name=".mvp.ui.activity.menu.AddFoodItemsActivity"
android:screenOrientation="portrait" />
<activity
android:name=".mvp.ui.activity.menu.NewSelectPeriodActivity"
android:screenOrientation="portrait" />
<activity
android:name=".mvp.ui.activity.menu.SelectTimePeriodActivity"
android:screenOrientation="portrait" />
<activity
android:name=".mvp.ui.activity.menu.NewFoodTypeActivity"
android:screenOrientation="portrait" />
<activity
android:name=".mvp.ui.activity.menu.SelectFoodTypeActivity"
android:screenOrientation="portrait" />
<activity
android:name=".mvp.ui.activity.menu.FoodDetailsActivity"
android:screenOrientation="portrait" />
<activity
android:name=".mvp.ui.activity.menu.SelectFoodGroupActivity"
android:screenOrientation="portrait" />
<activity
android:name=".mvp.ui.activity.menu.NewFoodActivity"
android:screenOrientation="portrait" />
<activity
android:name=".mvp.ui.activity.menu.NewAddFoodGroupActivity"
android:screenOrientation="portrait" />
<activity
android:name=".mvp.ui.activity.menu.FoodMenuManageActivity"
android:screenOrientation="portrait" />
<!-- arms配置 -->
<meta-data
android:name="com.gingersoft.gsa.cloud.globalconfig.GlobalConfiguration"
......
......@@ -17,7 +17,18 @@
android:networkSecurityConfig="@xml/network_android"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".mvp.ui.activity.ExpandListActivity"/>
<activity android:name=".mvp.ui.activity.menu.NewTimePeriodActivity" />
<activity android:name=".mvp.ui.activity.menu.AddFoodItemsActivity" />
<activity android:name=".mvp.ui.activity.menu.NewSelectPeriodActivity" />
<activity android:name=".mvp.ui.activity.menu.SelectTimePeriodActivity" />
<activity android:name=".mvp.ui.activity.menu.NewFoodTypeActivity" />
<activity android:name=".mvp.ui.activity.menu.SelectFoodTypeActivity" />
<activity android:name=".mvp.ui.activity.menu.FoodDetailsActivity" />
<activity android:name=".mvp.ui.activity.menu.SelectFoodGroupActivity" />
<activity android:name=".mvp.ui.activity.menu.NewFoodActivity" />
<activity android:name=".mvp.ui.activity.menu.NewAddFoodGroupActivity" />
<activity android:name=".mvp.ui.activity.NewMainActivity" />
<activity android:name=".mvp.ui.activity.ExpandListActivity" />
<activity android:name=".mvp.ui.activity.RestaurantQrCodeActivity" />
<activity android:name=".mvp.ui.activity.LanguageActivity" />
<activity android:name=".mvp.ui.activity.ReportActivity" />
......@@ -26,7 +37,7 @@
<activity android:name=".mvp.ui.activity.SettlementReportActivity" />
<activity android:name=".mvp.ui.activity.LookLogActivity" />
<activity
android:name=".mvp.ui.activity.NewMainActivity"
android:name=".mvp.ui.activity.menu.FoodMenuManageActivity"
android:launchMode="singleTask"
android:theme="@style/MainTheme">
<intent-filter>
......
<resources>
<string name="app_name">MainModule</string>
</resources>
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.AddFoodItemsModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.AddFoodItemsContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.AddFoodItemsActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:34
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = AddFoodItemsModule.class, dependencies = AppComponent.class)
public interface AddFoodItemsComponent {
void inject(AddFoodItemsActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
AddFoodItemsComponent.Builder view(AddFoodItemsContract.View view);
AddFoodItemsComponent.Builder appComponent(AppComponent appComponent);
AddFoodItemsComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.FoodDetailsModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodDetailsContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.FoodDetailsActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:24
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = FoodDetailsModule.class, dependencies = AppComponent.class)
public interface FoodDetailsComponent {
void inject(FoodDetailsActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
FoodDetailsComponent.Builder view(FoodDetailsContract.View view);
FoodDetailsComponent.Builder appComponent(AppComponent appComponent);
FoodDetailsComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.FoodItemsModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodItemsContract;
import com.jess.arms.di.scope.FragmentScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.fragment.menu.FoodItemsFragment;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/29/2020 15:28
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
@Component(modules = FoodItemsModule.class, dependencies = AppComponent.class)
public interface FoodItemsComponent {
void inject(FoodItemsFragment fragment);
@Component.Builder
interface Builder {
@BindsInstance
FoodItemsComponent.Builder view(FoodItemsContract.View view);
FoodItemsComponent.Builder appComponent(AppComponent appComponent);
FoodItemsComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.FoodMenuManageModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodMenuManageContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.FoodMenuManageActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:12
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = FoodMenuManageModule.class, dependencies = AppComponent.class)
public interface FoodMenuManageComponent {
void inject(FoodMenuManageActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
FoodMenuManageComponent.Builder view(FoodMenuManageContract.View view);
FoodMenuManageComponent.Builder appComponent(AppComponent appComponent);
FoodMenuManageComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.FoodPropertiesModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodPropertiesContract;
import com.jess.arms.di.scope.FragmentScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.fragment.menu.FoodPropertiesFragment;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/28/2020 17:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
@Component(modules = FoodPropertiesModule.class, dependencies = AppComponent.class)
public interface FoodPropertiesComponent {
void inject(FoodPropertiesFragment fragment);
@Component.Builder
interface Builder {
@BindsInstance
FoodPropertiesComponent.Builder view(FoodPropertiesContract.View view);
FoodPropertiesComponent.Builder appComponent(AppComponent appComponent);
FoodPropertiesComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.FoodSetModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodSetContract;
import com.jess.arms.di.scope.FragmentScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.fragment.menu.FoodSetFragment;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/29/2020 15:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
@Component(modules = FoodSetModule.class, dependencies = AppComponent.class)
public interface FoodSetComponent {
void inject(FoodSetFragment fragment);
@Component.Builder
interface Builder {
@BindsInstance
FoodSetComponent.Builder view(FoodSetContract.View view);
FoodSetComponent.Builder appComponent(AppComponent appComponent);
FoodSetComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.NewAddFoodGroupModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewAddFoodGroupContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.NewAddFoodGroupActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:21
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = NewAddFoodGroupModule.class, dependencies = AppComponent.class)
public interface NewAddFoodGroupComponent {
void inject(NewAddFoodGroupActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
NewAddFoodGroupComponent.Builder view(NewAddFoodGroupContract.View view);
NewAddFoodGroupComponent.Builder appComponent(AppComponent appComponent);
NewAddFoodGroupComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.NewFoodModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewFoodContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.NewFoodActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:23
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = NewFoodModule.class, dependencies = AppComponent.class)
public interface NewFoodComponent {
void inject(NewFoodActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
NewFoodComponent.Builder view(NewFoodContract.View view);
NewFoodComponent.Builder appComponent(AppComponent appComponent);
NewFoodComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.NewFoodTypeModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewFoodTypeContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.NewFoodTypeActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:25
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = NewFoodTypeModule.class, dependencies = AppComponent.class)
public interface NewFoodTypeComponent {
void inject(NewFoodTypeActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
NewFoodTypeComponent.Builder view(NewFoodTypeContract.View view);
NewFoodTypeComponent.Builder appComponent(AppComponent appComponent);
NewFoodTypeComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.NewSelectPeriodModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewSelectPeriodContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.NewSelectPeriodActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:30
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = NewSelectPeriodModule.class, dependencies = AppComponent.class)
public interface NewSelectPeriodComponent {
void inject(NewSelectPeriodActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
NewSelectPeriodComponent.Builder view(NewSelectPeriodContract.View view);
NewSelectPeriodComponent.Builder appComponent(AppComponent appComponent);
NewSelectPeriodComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.NewTimePeriodModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewTimePeriodContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.NewTimePeriodActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/30/2020 18:16
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = NewTimePeriodModule.class, dependencies = AppComponent.class)
public interface NewTimePeriodComponent {
void inject(NewTimePeriodActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
NewTimePeriodComponent.Builder view(NewTimePeriodContract.View view);
NewTimePeriodComponent.Builder appComponent(AppComponent appComponent);
NewTimePeriodComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.SelectFoodGroupModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectFoodGroupContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.SelectFoodGroupActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:23
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = SelectFoodGroupModule.class, dependencies = AppComponent.class)
public interface SelectFoodGroupComponent {
void inject(SelectFoodGroupActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
SelectFoodGroupComponent.Builder view(SelectFoodGroupContract.View view);
SelectFoodGroupComponent.Builder appComponent(AppComponent appComponent);
SelectFoodGroupComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.SelectFoodTypeModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectFoodTypeContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.SelectFoodTypeActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:25
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = SelectFoodTypeModule.class, dependencies = AppComponent.class)
public interface SelectFoodTypeComponent {
void inject(SelectFoodTypeActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
SelectFoodTypeComponent.Builder view(SelectFoodTypeContract.View view);
SelectFoodTypeComponent.Builder appComponent(AppComponent appComponent);
SelectFoodTypeComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.main.di.module.SelectTimePeriodModule;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectTimePeriodContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.SelectTimePeriodActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = SelectTimePeriodModule.class, dependencies = AppComponent.class)
public interface SelectTimePeriodComponent {
void inject(SelectTimePeriodActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
SelectTimePeriodComponent.Builder view(SelectTimePeriodContract.View view);
SelectTimePeriodComponent.Builder appComponent(AppComponent appComponent);
SelectTimePeriodComponent build();
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.AddFoodItemsContract;
import com.gingersoft.gsa.cloud.main.mvp.model.AddFoodItemsModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:34
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class AddFoodItemsModule {
@Binds
abstract AddFoodItemsContract.Model bindAddFoodItemsModel(AddFoodItemsModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodDetailsContract;
import com.gingersoft.gsa.cloud.main.mvp.model.FoodDetailsModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:24
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class FoodDetailsModule {
@Binds
abstract FoodDetailsContract.Model bindFoodDetailsModel(FoodDetailsModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.FragmentScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodItemsContract;
import com.gingersoft.gsa.cloud.main.mvp.model.FoodItemsModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/29/2020 15:28
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class FoodItemsModule {
@Binds
abstract FoodItemsContract.Model bindFoodItemsModel(FoodItemsModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodMenuManageContract;
import com.gingersoft.gsa.cloud.main.mvp.model.FoodMenuManageModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:12
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class FoodMenuManageModule {
@Binds
abstract FoodMenuManageContract.Model bindFoodMenuManageModel(FoodMenuManageModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.FragmentScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodPropertiesContract;
import com.gingersoft.gsa.cloud.main.mvp.model.FoodPropertiesModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/28/2020 17:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class FoodPropertiesModule {
@Binds
abstract FoodPropertiesContract.Model bindFoodPropertiesModel(FoodPropertiesModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.FragmentScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodSetContract;
import com.gingersoft.gsa.cloud.main.mvp.model.FoodSetModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/29/2020 15:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class FoodSetModule {
@Binds
abstract FoodSetContract.Model bindFoodSetModel(FoodSetModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewAddFoodGroupContract;
import com.gingersoft.gsa.cloud.main.mvp.model.NewAddFoodGroupModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:21
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class NewAddFoodGroupModule {
@Binds
abstract NewAddFoodGroupContract.Model bindNewAddFoodGroupModel(NewAddFoodGroupModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewFoodContract;
import com.gingersoft.gsa.cloud.main.mvp.model.NewFoodModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:23
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class NewFoodModule {
@Binds
abstract NewFoodContract.Model bindNewFoodModel(NewFoodModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewFoodTypeContract;
import com.gingersoft.gsa.cloud.main.mvp.model.NewFoodTypeModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:25
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class NewFoodTypeModule {
@Binds
abstract NewFoodTypeContract.Model bindNewFoodTypeModel(NewFoodTypeModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewSelectPeriodContract;
import com.gingersoft.gsa.cloud.main.mvp.model.NewSelectPeriodModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:30
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class NewSelectPeriodModule {
@Binds
abstract NewSelectPeriodContract.Model bindNewSelectPeriodModel(NewSelectPeriodModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewTimePeriodContract;
import com.gingersoft.gsa.cloud.main.mvp.model.NewTimePeriodModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/30/2020 18:16
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class NewTimePeriodModule {
@Binds
abstract NewTimePeriodContract.Model bindNewTimePeriodModel(NewTimePeriodModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectFoodGroupContract;
import com.gingersoft.gsa.cloud.main.mvp.model.SelectFoodGroupModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:23
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class SelectFoodGroupModule {
@Binds
abstract SelectFoodGroupContract.Model bindSelectFoodGroupModel(SelectFoodGroupModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectFoodTypeContract;
import com.gingersoft.gsa.cloud.main.mvp.model.SelectFoodTypeModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:25
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class SelectFoodTypeModule {
@Binds
abstract SelectFoodTypeContract.Model bindSelectFoodTypeModel(SelectFoodTypeModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectTimePeriodContract;
import com.gingersoft.gsa.cloud.main.mvp.model.SelectTimePeriodModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class SelectTimePeriodModule {
@Binds
abstract SelectTimePeriodContract.Model bindSelectTimePeriodModel(SelectTimePeriodModel model);
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:34
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface AddFoodItemsContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:24
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface FoodDetailsContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/29/2020 15:28
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface FoodItemsContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:12
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface FoodMenuManageContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/28/2020 17:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface FoodPropertiesContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/29/2020 15:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface FoodSetContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:21
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface NewAddFoodGroupContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:23
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface NewFoodContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:25
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface NewFoodTypeContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:30
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface NewSelectPeriodContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/30/2020 18:16
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface NewTimePeriodContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:23
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface SelectFoodGroupContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:25
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface SelectFoodTypeContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface SelectTimePeriodContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.AddFoodItemsContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:34
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class AddFoodItemsModel extends BaseModel implements AddFoodItemsContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public AddFoodItemsModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodDetailsContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:24
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class FoodDetailsModel extends BaseModel implements FoodDetailsContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public FoodDetailsModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.FragmentScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodItemsContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/29/2020 15:28
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
public class FoodItemsModel extends BaseModel implements FoodItemsContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public FoodItemsModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodMenuManageContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:12
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class FoodMenuManageModel extends BaseModel implements FoodMenuManageContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public FoodMenuManageModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.FragmentScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodPropertiesContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/28/2020 17:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
public class FoodPropertiesModel extends BaseModel implements FoodPropertiesContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public FoodPropertiesModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.FragmentScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodSetContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/29/2020 15:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
public class FoodSetModel extends BaseModel implements FoodSetContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public FoodSetModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewAddFoodGroupContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:21
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class NewAddFoodGroupModel extends BaseModel implements NewAddFoodGroupContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public NewAddFoodGroupModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewFoodContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:23
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class NewFoodModel extends BaseModel implements NewFoodContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public NewFoodModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewFoodTypeContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:25
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class NewFoodTypeModel extends BaseModel implements NewFoodTypeContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public NewFoodTypeModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewSelectPeriodContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:30
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class NewSelectPeriodModel extends BaseModel implements NewSelectPeriodContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public NewSelectPeriodModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewTimePeriodContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/30/2020 18:16
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class NewTimePeriodModel extends BaseModel implements NewTimePeriodContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public NewTimePeriodModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectFoodGroupContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:23
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class SelectFoodGroupModel extends BaseModel implements SelectFoodGroupContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public SelectFoodGroupModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectFoodTypeContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:25
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class SelectFoodTypeModel extends BaseModel implements SelectFoodTypeContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public SelectFoodTypeModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectTimePeriodContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class SelectTimePeriodModel extends BaseModel implements SelectTimePeriodContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public SelectTimePeriodModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.main.mvp.model.bean;
import lombok.Data;
/**
* @author 宇航.
* User: admin
* Date: 2020/10/29
* Time: 16:33
* Use:
*/
@Data
public class FoodGroupBean {
private String foodGroupName;
public FoodGroupBean(String foodGroupName) {
this.foodGroupName = foodGroupName;
}
}
package com.gingersoft.gsa.cloud.main.mvp.model.bean;
import java.util.List;
import lombok.Data;
@Data
public class FoodMenuEditBean {
/**
* 線條
*/
public final static int EDIT_FOOD_ITEM_THICK_LINE = 0;
/**
* 輸入框類型
*/
public final static int EDIT_FOOD_ITEM_INPUT = 1;
/**
* 進入下一頁面的選擇類型
*/
public final static int EDIT_FOOD_ITEM_SELECT = 2;
/**
* 選擇時間的類型
*/
public final static int EDIT_FOOD_ITEM_SELECT_TIME = 3;
/**
* boolean類型
*/
public final static int EDIT_FOOD_ITEM_BOOLEAN = 4;
/**
* 多選
*/
public final static int EDIT_FOOD_ITEM_CHECKBOX = 5;
/**
* 上傳圖片
*/
public final static int EDIT_FOOD_ITEM_UPLOAD_PIC = 6;
public int itemType;
/**
* 用於顯示的標題
*/
private String showTitle;
/**
* 是否必填
*/
private boolean isRequired;
/**
* 提示文字
*/
private String hintText;
/**
* 多選數據
*/
private List<ShowClient> checkBoxList;
private String foodName1;
private String foodName2;
private String foodName3;
/**
* 時段
*/
private String timePeriod;
/**
* 餐種
*/
private String foodType;
/**
* 顯示狀態,多個端顯示
*/
private boolean showState;
private String foodGroup;
/**
* 食品金額
*/
private double foodAmount;
/**
* 食品原價
*/
private double foodOriginalPrice;
private String printLocation;
private String foodDesc;
/**
* 用於顯示的值
*/
private String showValue;
private Class<?> cls;
/**
* 是否控制客戶端顯示
*/
private boolean isShowClient = false;
/**
* 顯示端
*/
@Data
public static class ShowClient {
private String clientName;
private boolean isChecked;
public ShowClient(String clientName, boolean isChecked) {
this.clientName = clientName;
this.isChecked = isChecked;
}
}
public FoodMenuEditBean() {
}
public FoodMenuEditBean(int itemType) {
this.itemType = itemType;
}
public FoodMenuEditBean(int itemType, String showTitle, boolean isRequired) {
this.itemType = itemType;
this.showTitle = showTitle;
this.isRequired = isRequired;
}
public FoodMenuEditBean(int itemType, String showTitle, boolean isRequired, String hintText) {
this.itemType = itemType;
this.showTitle = showTitle;
this.isRequired = isRequired;
this.hintText = hintText;
}
public FoodMenuEditBean(int itemType, String showTitle, boolean isRequired, String hintText, String showValue) {
this.itemType = itemType;
this.showTitle = showTitle;
this.isRequired = isRequired;
this.hintText = hintText;
this.showValue = showValue;
}
public FoodMenuEditBean(int itemType, String showTitle, boolean isRequired, String hintText, Class<?> cls) {
this.itemType = itemType;
this.showTitle = showTitle;
this.isRequired = isRequired;
this.hintText = hintText;
this.cls = cls;
}
public FoodMenuEditBean(int itemType, String showTitle, boolean isRequired, boolean showState) {
this.itemType = itemType;
this.showTitle = showTitle;
this.isRequired = isRequired;
this.showState = showState;
}
public FoodMenuEditBean(int itemType, String showTitle, boolean isRequired, boolean showState, boolean isShowClient) {
this.itemType = itemType;
this.showTitle = showTitle;
this.isRequired = isRequired;
this.showState = showState;
this.isShowClient = isShowClient;
}
public FoodMenuEditBean(int itemType, String showTitle, boolean isRequired, boolean showState, List<ShowClient> checkBoxList) {
this.itemType = itemType;
this.showTitle = showTitle;
this.isRequired = isRequired;
this.showState = showState;
this.checkBoxList = checkBoxList;
}
public FoodMenuEditBean(int itemType, String showTitle, boolean isRequired, List<ShowClient> checkBoxList) {
this.itemType = itemType;
this.showTitle = showTitle;
this.isRequired = isRequired;
this.checkBoxList = checkBoxList;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.AddFoodItemsContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:34
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class AddFoodItemsPresenter extends BasePresenter<AddFoodItemsContract.Model, AddFoodItemsContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public AddFoodItemsPresenter(AddFoodItemsContract.Model model, AddFoodItemsContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
......@@ -5,9 +5,11 @@ import android.app.Application;
import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication;
import com.gingersoft.gsa.cloud.base.common.bean.BaseResult;
import com.gingersoft.gsa.cloud.base.utils.JsonUtils;
import com.gingersoft.gsa.cloud.base.utils.RestaurantExpandInfoUtils;
import com.gingersoft.gsa.cloud.base.utils.gson.GsonUtils;
import com.gingersoft.gsa.cloud.base.utils.other.TextUtil;
import com.gingersoft.gsa.cloud.database.bean.ExpandInfo;
import com.gingersoft.gsa.cloud.database.utils.ExpandInfoDaoUtils;
import com.gingersoft.gsa.cloud.main.mvp.contract.ExpandListContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
......@@ -74,7 +76,7 @@ public class ExpandListPresenter extends BasePresenter<ExpandListContract.Model,
}
public void updateExpandInfo(List<ExpandInfo> data){
public void updateExpandInfo(List<ExpandInfo> data) {
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), GsonUtils.GsonString(data));
mModel.updateExpandInfo(requestBody)
.subscribeOn(Schedulers.io())
......@@ -86,11 +88,16 @@ public class ExpandListPresenter extends BasePresenter<ExpandListContract.Model,
.subscribe(new ErrorHandleSubscriber<BaseResult>(mErrorHandler) {
@Override
public void onNext(BaseResult result) {
if(TextUtil.isNotEmptyOrNullOrUndefined(result.getErrMsg())){
if (TextUtil.isNotEmptyOrNullOrUndefined(result.getErrMsg())) {
mRootView.showMessage(result.getErrMsg());
}
if (result.isSuccess()) {
mRootView.showMessage("保存成功");
ExpandInfoDaoUtils expandInfoDaoUtils = new ExpandInfoDaoUtils(GsaCloudApplication.getAppContext());
for (ExpandInfo expandInfo : data) {
expandInfoDaoUtils.updateExpandInfo(expandInfo);
}
RestaurantExpandInfoUtils.setCommonExpandInfo(data);
mRootView.killMyself();
}
}
......
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodDetailsContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:24
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class FoodDetailsPresenter extends BasePresenter<FoodDetailsContract.Model, FoodDetailsContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public FoodDetailsPresenter(FoodDetailsContract.Model model, FoodDetailsContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodItemsContract;
import com.jess.arms.di.scope.FragmentScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/29/2020 15:28
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
public class FoodItemsPresenter extends BasePresenter<FoodItemsContract.Model, FoodItemsContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public FoodItemsPresenter(FoodItemsContract.Model model, FoodItemsContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodMenuManageContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:12
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class FoodMenuManagePresenter extends BasePresenter<FoodMenuManageContract.Model, FoodMenuManageContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public FoodMenuManagePresenter(FoodMenuManageContract.Model model, FoodMenuManageContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodPropertiesContract;
import com.jess.arms.di.scope.FragmentScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/28/2020 17:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
public class FoodPropertiesPresenter extends BasePresenter<FoodPropertiesContract.Model, FoodPropertiesContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public FoodPropertiesPresenter(FoodPropertiesContract.Model model, FoodPropertiesContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodSetContract;
import com.jess.arms.di.scope.FragmentScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/29/2020 15:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
public class FoodSetPresenter extends BasePresenter<FoodSetContract.Model, FoodSetContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public FoodSetPresenter(FoodSetContract.Model model, FoodSetContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewAddFoodGroupContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:21
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class NewAddFoodGroupPresenter extends BasePresenter<NewAddFoodGroupContract.Model, NewAddFoodGroupContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public NewAddFoodGroupPresenter(NewAddFoodGroupContract.Model model, NewAddFoodGroupContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewFoodContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:23
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class NewFoodPresenter extends BasePresenter<NewFoodContract.Model, NewFoodContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public NewFoodPresenter(NewFoodContract.Model model, NewFoodContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewFoodTypeContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:25
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class NewFoodTypePresenter extends BasePresenter<NewFoodTypeContract.Model, NewFoodTypeContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public NewFoodTypePresenter(NewFoodTypeContract.Model model, NewFoodTypeContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewSelectPeriodContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:30
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class NewSelectPeriodPresenter extends BasePresenter<NewSelectPeriodContract.Model, NewSelectPeriodContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public NewSelectPeriodPresenter(NewSelectPeriodContract.Model model, NewSelectPeriodContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewTimePeriodContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/30/2020 18:16
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class NewTimePeriodPresenter extends BasePresenter<NewTimePeriodContract.Model, NewTimePeriodContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public NewTimePeriodPresenter(NewTimePeriodContract.Model model, NewTimePeriodContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectFoodGroupContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:23
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class SelectFoodGroupPresenter extends BasePresenter<SelectFoodGroupContract.Model, SelectFoodGroupContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public SelectFoodGroupPresenter(SelectFoodGroupContract.Model model, SelectFoodGroupContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectFoodTypeContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:25
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class SelectFoodTypePresenter extends BasePresenter<SelectFoodTypeContract.Model, SelectFoodTypeContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public SelectFoodTypePresenter(SelectFoodTypeContract.Model model, SelectFoodTypeContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.main.mvp.presenter;
import android.app.Application;
import com.gingersoft.gsa.cloud.main.mvp.contract.SelectTimePeriodContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.integration.AppManager;
import com.jess.arms.mvp.BasePresenter;
import javax.inject.Inject;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:29
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class SelectTimePeriodPresenter extends BasePresenter<SelectTimePeriodContract.Model, SelectTimePeriodContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public SelectTimePeriodPresenter(SelectTimePeriodContract.Model model, SelectTimePeriodContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
......@@ -40,6 +40,7 @@ import com.gingersoft.gsa.cloud.main.di.component.DaggerNewMainComponent;
import com.gingersoft.gsa.cloud.main.mvp.contract.NewMainContract;
import com.gingersoft.gsa.cloud.main.mvp.model.bean.MainSideMenuBean;
import com.gingersoft.gsa.cloud.main.mvp.presenter.NewMainPresenter;
import com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu.FoodMenuManageActivity;
import com.gingersoft.gsa.cloud.main.mvp.ui.adapter.MainOrderingAdapter;
import com.gingersoft.gsa.cloud.main.mvp.ui.adapter.MainSideMenuAdapter;
import com.gingersoft.gsa.cloud.main.mvp.ui.fragment.MainTopFragment;
......@@ -268,9 +269,10 @@ public class NewMainActivity extends BaseFragmentActivity<NewMainPresenter> impl
List<Function> managerFuncations = FunctionManager.getDefault().getFunctionByResModule(this, ComponentMain.main.class, ComponentMain.main.manager, "manager");
managerFuncations.add(new Function((long) 171, 163, 5, "二維碼", R.drawable.ic_authority_management_close, 0));
managerFuncations.add(new Function((long) 171, 163, 5, "配置列表", R.drawable.ic_authority_management_close, 0));
managerFuncations.add(new Function((long) 171, 163, 5, "廚房打印查詢", R.drawable.ic_authority_management_close, 0));
managerFuncations.add(new Function((long) 171, 163, 5, "二維碼", R.drawable.ic_authority_management, 0));
managerFuncations.add(new Function((long) 171, 163, 5, "配置列表", R.drawable.ic_authority_management, 0));
managerFuncations.add(new Function((long) 171, 163, 5, "廚房打印查詢", R.drawable.ic_authority_management, 0));
managerFuncations.add(new Function((long) 171, 163, 5, "餐牌管理", R.drawable.ic_authority_management, 0));
if (managerFuncations.size() > 0) {
functions.addAll(managerFuncations);
......@@ -390,6 +392,9 @@ public class NewMainActivity extends BaseFragmentActivity<NewMainPresenter> impl
.build()
.call();
break;
case "餐牌管理":
launchActivity(new Intent(mContext, FoodMenuManageActivity.class));
break;
default:
break;
}
......
package com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.gingersoft.gsa.cloud.main.R;
import com.gingersoft.gsa.cloud.main.di.component.DaggerAddFoodItemsComponent;
import com.gingersoft.gsa.cloud.main.mvp.contract.AddFoodItemsContract;
import com.gingersoft.gsa.cloud.main.mvp.presenter.AddFoodItemsPresenter;
import com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog;
import com.jess.arms.base.BaseActivity;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.utils.ArmsUtils;
import static com.jess.arms.utils.Preconditions.checkNotNull;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:34
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public class AddFoodItemsActivity extends BaseActivity<AddFoodItemsPresenter> implements AddFoodItemsContract.View {
@Override
public void setupActivityComponent(@NonNull AppComponent appComponent) {
DaggerAddFoodItemsComponent //如找不到该类,请编译一下项目
.builder()
.appComponent(appComponent)
.view(this)
.build()
.inject(this);
}
@Override
public int initView(@Nullable Bundle savedInstanceState) {
return R.layout.activity_add_food_items;
}
@Override
public void initData(@Nullable Bundle savedInstanceState) {
}
@Override
public void initIntent() {
}
@Override
public void initTopBar() {
}
@Override
public void initLanguage() {
}
@Override
public void initLayoutParams() {
}
@Override
public void initLayoutVisible() {
}
@Override
public void showLoading(String message) {
if (message != null) {
LoadingDialog.showDialogForLoading(this, message, true);
} else {
LoadingDialog.showDialogForLoading(this);
}
}
@Override
public void hideLoading() {
LoadingDialog.cancelDialogForLoading();
}
@Override
public void showMessage(@NonNull String message) {
ArmsUtils.makeText(this, message);
}
@Override
public void launchActivity(@NonNull Intent intent) {
checkNotNull(intent);
ArmsUtils.startActivity(intent);
}
@Override
public void killMyself() {
finish();
}
}
package com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.gingersoft.gsa.cloud.main.R;
import com.gingersoft.gsa.cloud.main.di.component.DaggerFoodDetailsComponent;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodDetailsContract;
import com.gingersoft.gsa.cloud.main.mvp.presenter.FoodDetailsPresenter;
import com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog;
import com.jess.arms.base.BaseActivity;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.utils.ArmsUtils;
import static com.jess.arms.utils.Preconditions.checkNotNull;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:24
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public class FoodDetailsActivity extends BaseActivity<FoodDetailsPresenter> implements FoodDetailsContract.View {
@Override
public void setupActivityComponent(@NonNull AppComponent appComponent) {
DaggerFoodDetailsComponent //如找不到该类,请编译一下项目
.builder()
.appComponent(appComponent)
.view(this)
.build()
.inject(this);
}
@Override
public int initView(@Nullable Bundle savedInstanceState) {
return R.layout.activity_food_details;
}
@Override
public void initData(@Nullable Bundle savedInstanceState) {
}
@Override
public void initIntent() {
}
@Override
public void initTopBar() {
}
@Override
public void initLanguage() {
}
@Override
public void initLayoutParams() {
}
@Override
public void initLayoutVisible() {
}
@Override
public void showLoading(String message) {
if (message != null) {
LoadingDialog.showDialogForLoading(this, message, true);
} else {
LoadingDialog.showDialogForLoading(this);
}
}
@Override
public void hideLoading() {
LoadingDialog.cancelDialogForLoading();
}
@Override
public void showMessage(@NonNull String message) {
ArmsUtils.makeText(this, message);
}
@Override
public void launchActivity(@NonNull Intent intent) {
checkNotNull(intent);
ArmsUtils.startActivity(intent);
}
@Override
public void killMyself() {
finish();
}
}
package com.gingersoft.gsa.cloud.main.mvp.ui.activity.menu;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.gingersoft.gsa.cloud.main.R;
import com.gingersoft.gsa.cloud.main.R2;
import com.gingersoft.gsa.cloud.main.di.component.DaggerFoodMenuManageComponent;
import com.gingersoft.gsa.cloud.main.mvp.contract.FoodMenuManageContract;
import com.gingersoft.gsa.cloud.main.mvp.presenter.FoodMenuManagePresenter;
import com.gingersoft.gsa.cloud.main.mvp.ui.adapter.foodmenu.FoodMenuMangerLeftAdapter;
import com.gingersoft.gsa.cloud.main.mvp.ui.adapter.foodmenu.FoodMenuMangerRightAdapter;
import com.gingersoft.gsa.cloud.ui.recylcler.decorator.DividerItemDecoration;
import com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog;
import com.jess.arms.base.BaseActivity;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.utils.ArmsUtils;
import com.qmuiteam.qmui.alpha.QMUIAlphaImageButton;
import com.qmuiteam.qmui.widget.QMUITopBar;
import java.util.Arrays;
import java.util.List;
import butterknife.BindView;
import butterknife.OnClick;
import static com.jess.arms.utils.Preconditions.checkNotNull;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 10/27/2020 15:12
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public class FoodMenuManageActivity extends BaseActivity<FoodMenuManagePresenter> implements FoodMenuManageContract.View, View.OnClickListener {
@BindView(R2.id.topbar_food_menu)
QMUITopBar topbarFoodMenu;
@BindView(R2.id.btn_add_food_group)
Button btnAddFoodGroup;
@BindView(R2.id.rv_food_menu_food_classification)
RecyclerView leftRv;
@BindView(R2.id.rv_food_menu_all_food)
RecyclerView rightRv;
private List<String> category = Arrays.asList("A食品", "B食品", "C食品", "D食品", "E食品");
@Override
public void setupActivityComponent(@NonNull AppComponent appComponent) {
DaggerFoodMenuManageComponent //如找不到该类,请编译一下项目
.builder()
.appComponent(appComponent)
.view(this)
.build()
.inject(this);
}
@Override
public int initView(@Nullable Bundle savedInstanceState) {
return R.layout.activity_food_menu_manage;
}
@Override
public void initData(@Nullable Bundle savedInstanceState) {
leftRv.setLayoutManager(new LinearLayoutManager(mContext));
leftRv.addItemDecoration(new DividerItemDecoration(mContext, LinearLayoutManager.VERTICAL));
FoodMenuMangerLeftAdapter foodMenuMangerLeftAdapter = new FoodMenuMangerLeftAdapter(this, category);
leftRv.setAdapter(foodMenuMangerLeftAdapter);
String[] foods = new String[50];
for (int i = 0; i < 50; i++) {
int x = i / 10;
String foodName = category.get(x);
foods[i] = foodName + i;
}
rightRv.setLayoutManager(new LinearLayoutManager(mContext));
rightRv.addItemDecoration(new DividerItemDecoration(mContext, LinearLayoutManager.VERTICAL));
FoodMenuMangerRightAdapter foodMenuMangerRightAdapter = new FoodMenuMangerRightAdapter(category, foods);
rightRv.setAdapter(foodMenuMangerRightAdapter);
foodMenuMangerLeftAdapter.setOnItemClickListener((adapter, view, position) -> {
int section = foodMenuMangerRightAdapter.getPositionForSection(position);
foodMenuMangerLeftAdapter.setSelectIndex(position);
((LinearLayoutManager)rightRv.getLayoutManager()).scrollToPositionWithOffset(section, 0);
});
rightRv.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
}
@Override
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
}
});
}
@Override
public void initIntent() {
}
@Override
public void initTopBar() {
topbarFoodMenu.setTitle("餐牌管理");
topbarFoodMenu.addLeftBackImageButton().setOnClickListener(v -> killMyself());
QMUIAlphaImageButton rightButton = topbarFoodMenu.addRightImageButton(R.drawable.ic_add_have_border, R.id.topbar_right_add_button);
rightButton.setOnClickListener(v -> {
launchActivity(new Intent(mContext, NewFoodActivity.class));
});
}
@Override
public void initLanguage() {
}
@Override
public void initLayoutParams() {
}
@Override
public void initLayoutVisible() {
}
@Override
public void showLoading(String message) {
if (message != null) {
LoadingDialog.showDialogForLoading(this, message, true);
} else {
LoadingDialog.showDialogForLoading(this);
}
}
@Override
public void hideLoading() {
LoadingDialog.cancelDialogForLoading();
}
@Override
public void showMessage(@NonNull String message) {
ArmsUtils.makeText(this, message);
}
@Override
public void launchActivity(@NonNull Intent intent) {
checkNotNull(intent);
ArmsUtils.startActivity(intent);
}
@Override
public void killMyself() {
finish();
}
@OnClick({R2.id.btn_add_food_group})
@Override
public void onClick(View v) {
int viewId = v.getId();
if (viewId == R.id.btn_add_food_group) {
launchActivity(new Intent(mContext, NewAddFoodGroupActivity.class));
}
}
}
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