Commit 0218422a by Wyh

9.30 1、印單,結賬單。。。單號取值 2、PRJ多語言沒有配置則不顯示

Signed-off-by: Wyh <1239658231>
parent 6f431b7e
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
style="@style/Print_text_style" style="@style/Print_text_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="單號:" /> android:text="單號:" />
<TextView <TextView
android:id="@+id/tv_order_num" android:id="@+id/tv_order_num"
......
...@@ -3,6 +3,7 @@ package com.joe.print.mvp.print; ...@@ -3,6 +3,7 @@ package com.joe.print.mvp.print;
import android.content.Context; import android.content.Context;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import com.gingersoft.gsa.cloud.base.common.bean.BillingBean; import com.gingersoft.gsa.cloud.base.common.bean.BillingBean;
import com.gingersoft.gsa.cloud.base.common.bean.MemberInfo; import com.gingersoft.gsa.cloud.base.common.bean.MemberInfo;
import com.gingersoft.gsa.cloud.base.order.bean.BillOrderMoney; import com.gingersoft.gsa.cloud.base.order.bean.BillOrderMoney;
...@@ -42,7 +43,7 @@ public class PrintBill extends PrinterRoot { ...@@ -42,7 +43,7 @@ public class PrintBill extends PrinterRoot {
@Override @Override
public int getPrintCount(Context context) { public int getPrintCount(Context context) {
return RestaurantExpandInfoUtils.getValue(ExpandConstant.TableModeClosingPC,1); return RestaurantExpandInfoUtils.getValue(ExpandConstant.TableModeClosingPC, 1);
} }
private Bitmap getBitmap(Context mContext, PrinterDeviceBean deviceBean) { private Bitmap getBitmap(Context mContext, PrinterDeviceBean deviceBean) {
...@@ -58,11 +59,9 @@ public class PrintBill extends PrinterRoot { ...@@ -58,11 +59,9 @@ public class PrintBill extends PrinterRoot {
//訂單信息 //訂單信息
String tableName = "餐檯:" + tableBean.getTableName(); String tableName = "餐檯:" + tableBean.getTableName();
String peopleNum = OpenTableManage.getDefault().getPeopleNumber() + ""; String peopleNum = "人數:" + OpenTableManage.getDefault().getPeopleNumber();
String orderNum = null; String orderNum = MyOrderManage.getInstance().getOrderNo();
if (MyOrderManage.getInstance().getOrderId() != -1) {
orderNum = MyOrderManage.getInstance().getOrderId() + "";
}
String createTime = TimeUtils.parseTimeRepeat(tableBean.getCreateTime(), TimeUtils.DEFAULT_DATE_FORMAT); String createTime = TimeUtils.parseTimeRepeat(tableBean.getCreateTime(), TimeUtils.DEFAULT_DATE_FORMAT);
layout.addView(getDiningTableOrderInfo(mContext, tableName, peopleNum, orderNum, createTime)); layout.addView(getDiningTableOrderInfo(mContext, tableName, peopleNum, orderNum, createTime));
layout.addView(getLine(mContext)); layout.addView(getLine(mContext));
...@@ -95,7 +94,7 @@ public class PrintBill extends PrinterRoot { ...@@ -95,7 +94,7 @@ public class PrintBill extends PrinterRoot {
layout.addView(getDiningBillPayMethod(mContext, MyOrderManage.getInstance().getBillMoney())); layout.addView(getDiningBillPayMethod(mContext, MyOrderManage.getInstance().getBillMoney()));
layout.addView(getLine(mContext)); layout.addView(getLine(mContext));
layout.addView(getTableMealMemberIntegerView(mContext, getOrderMemberInfo(),MyOrderManage.getInstance().getIntegralQrcode())); layout.addView(getTableMealMemberIntegerView(mContext, getOrderMemberInfo(), MyOrderManage.getInstance().getIntegralQrcode()));
return zoomBitmap(deviceBean, viewToBitmap(mContext, layout)); return zoomBitmap(deviceBean, viewToBitmap(mContext, layout));
} }
......
...@@ -6,6 +6,10 @@ import android.view.Gravity; ...@@ -6,6 +6,10 @@ import android.view.Gravity;
import android.view.View; import android.view.View;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication; import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication;
import com.gingersoft.gsa.cloud.base.common.bean.BillingBean; import com.gingersoft.gsa.cloud.base.common.bean.BillingBean;
import com.gingersoft.gsa.cloud.base.order.adapter.print.FoodAdapter; import com.gingersoft.gsa.cloud.base.order.adapter.print.FoodAdapter;
...@@ -22,9 +26,6 @@ import java.util.HashMap; ...@@ -22,9 +26,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
/** /**
* 上菜紙打印 已改新版 * 上菜紙打印 已改新版
*/ */
...@@ -128,11 +129,7 @@ public class PrintServe extends PrinterRoot { ...@@ -128,11 +129,7 @@ public class PrintServe extends PrinterRoot {
layout.addView(getLine(mContext)); layout.addView(getLine(mContext));
//訂單信息 //訂單信息
String orderId = ""; layout.addView(getDiningTableOrderInfo(mContext, "餐檯:" + tableBean.getTableName(), "人數:" + OpenTableManage.getDefault().getPeopleNumber(), "單號:" + MyOrderManage.getInstance().getOrderNo(), "日期:" + TimeUtils.getCurrentTimeInString(TimeUtils.DEFAULT_DATE_FORMAT)));
if (MyOrderManage.getInstance().getOrderId() != -1) {
orderId = MyOrderManage.getInstance().getOrderId() + "";
}
layout.addView(getDiningTableOrderInfo(mContext, "餐檯:" + tableBean.getTableName(), "人數:" + OpenTableManage.getDefault().getPeopleNumber(), "單號:" + orderId, "日期:" + TimeUtils.getCurrentTimeInString(TimeUtils.DEFAULT_DATE_FORMAT)));
layout.addView(getLine(mContext)); layout.addView(getLine(mContext));
layout.addView(getDiningFoodList(mContext, foodList, printerDeviceBean, 0, false)); layout.addView(getDiningFoodList(mContext, foodList, printerDeviceBean, 0, false));
......
...@@ -130,11 +130,7 @@ public class PrintSlip extends PrinterRoot { ...@@ -130,11 +130,7 @@ public class PrintSlip extends PrinterRoot {
layout.addView(getLine(mContext)); layout.addView(getLine(mContext));
//訂單信息 //訂單信息
String orderId = ""; layout.addView(getDiningTableOrderInfo(mContext, "餐檯:" + tableBean.getTableName(), "人數:" + OpenTableManage.getDefault().getPeopleNumber(), "單號:" + MyOrderManage.getInstance().getOrderNo(), "日期:" + TimeUtils.getCurrentTimeInString(TimeUtils.DEFAULT_DATE_FORMAT)));
if (MyOrderManage.getInstance().getOrderId() != -1) {
orderId = MyOrderManage.getInstance().getOrderId() + "";
}
layout.addView(getDiningTableOrderInfo(mContext, "餐檯:" + tableBean.getTableName(), "人數:" + OpenTableManage.getDefault().getPeopleNumber(), "單號:" + orderId, "日期:" + TimeUtils.getCurrentTimeInString(TimeUtils.DEFAULT_DATE_FORMAT)));
layout.addView(getLine(mContext)); layout.addView(getLine(mContext));
layout.addView(getDiningFoodList(mContext, foodList, printerDeviceBean, 0, true)); layout.addView(getDiningFoodList(mContext, foodList, printerDeviceBean, 0, true));
......
...@@ -10,6 +10,7 @@ import androidx.annotation.Nullable; ...@@ -10,6 +10,7 @@ import androidx.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder; import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.gingersoft.gsa.cloud.base.R; import com.gingersoft.gsa.cloud.base.R;
import com.gingersoft.gsa.cloud.base.utils.other.TextUtil;
import com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean; import com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean;
import com.joe.print.mvp.model.bean.PrjBean; import com.joe.print.mvp.model.bean.PrjBean;
...@@ -58,13 +59,19 @@ public class KitChenPrjPrintFoodAdapter extends BaseQuickAdapter<PrjBean.DataBea ...@@ -58,13 +59,19 @@ public class KitChenPrjPrintFoodAdapter extends BaseQuickAdapter<PrjBean.DataBea
} }
if (languageType.equals("2")) { if (languageType.equals("2")) {
//語言二 //語言二
layout.addView(getOtherLanguageView(helper.getAdapterPosition(), item.getItemType(), item.getProductName2(), item.getNumber())); if (TextUtil.isNotEmptyOrNullOrUndefined(item.getProductName2())) {
layout.addView(getOtherLanguageView(helper.getAdapterPosition(), item.getItemType(), item.getProductName2(), item.getNumber()));
}
} else if (languageType.equals("3")) { } else if (languageType.equals("3")) {
//語言三 //語言三
layout.addView(getOtherLanguageView(helper.getAdapterPosition(), item.getItemType(), item.getProductName3(), item.getNumber())); if (TextUtil.isNotEmptyOrNullOrUndefined(item.getProductName3())) {
layout.addView(getOtherLanguageView(helper.getAdapterPosition(), item.getItemType(), item.getProductName3(), item.getNumber()));
}
} else { } else {
//語言一或其他 //語言一或其他
layout.addView(getOtherLanguageView(helper.getAdapterPosition(), item.getItemType(), item.getProductName(), item.getNumber())); if (TextUtil.isNotEmptyOrNullOrUndefined(item.getProductName())) {
layout.addView(getOtherLanguageView(helper.getAdapterPosition(), item.getItemType(), item.getProductName(), item.getNumber()));
}
} }
} }
} }
......
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