Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supplier
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王宇航
supplier
Commits
0218422a
Commit
0218422a
authored
Sep 30, 2020
by
Wyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
9.30 1、印單,結賬單。。。單號取值 2、PRJ多語言沒有配置則不顯示
Signed-off-by: Wyh <1239658231>
parent
6f431b7e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
24 deletions
+23
-24
base-module/src/main/res/layout/print_kitchen.xml
+1
-1
print-module/src/main/java/com/joe/print/mvp/print/PrintBill.java
+6
-7
print-module/src/main/java/com/joe/print/mvp/print/PrintServe.java
+5
-8
print-module/src/main/java/com/joe/print/mvp/print/PrintSlip.java
+1
-5
print-module/src/main/java/com/joe/print/mvp/ui/adapter/KitChenPrjPrintFoodAdapter.java
+10
-3
No files found.
base-module/src/main/res/layout/print_kitchen.xml
View file @
0218422a
...
@@ -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"
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintBill.java
View file @
0218422a
...
@@ -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
));
}
}
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintServe.java
View file @
0218422a
...
@@ -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
));
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintSlip.java
View file @
0218422a
...
@@ -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
));
...
...
print-module/src/main/java/com/joe/print/mvp/ui/adapter/KitChenPrjPrintFoodAdapter.java
View file @
0218422a
...
@@ -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
()));
}
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment