Commit 0218422a by Wyh

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

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