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
fb2f2dca
Commit
fb2f2dca
authored
Dec 01, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
外賣接單 結賬單,外賣接單 印單
parent
922cde77
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
734 additions
and
172 deletions
+734
-172
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/StringUtils.java
+39
-19
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/PrintQRCodeContent.java
+6
-6
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/PrintTakeawayCheckoutContent.java
+56
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/PrintTakeawayFormContent.java
+148
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/adapter/AdaptationContent.java
+22
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/adapter/AdaptationContent2.java
+22
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/adapter/PrintContentAdapter.java
+111
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/base/PrintBillItem.java
+49
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/base/PrintFoodItem.java
+60
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/base/PrintPayTypeItem.java
+50
-0
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/model/viewModel/HistoryOrderViewModel.kt
+2
-2
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/model/viewModel/PageViewModel.kt
+13
-4
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/mvp/ui/activity/SendOrderActivity.java
+0
-1
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/cart/ShoppingCart.java
+1
-2
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/cart/ShoppingCartNumberChange.java
+0
-2
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/commodity/OrderDetail.java
+0
-1
print-module/src/main/java/com/joe/print/mvp/model/bean/HtmlLable.java
+17
-0
print-module/src/main/java/com/joe/print/mvp/model/bean/PrintBillBean.java
+0
-28
print-module/src/main/java/com/joe/print/mvp/print/PrintBill.java
+0
-2
print-module/src/main/java/com/joe/print/mvp/print/PrintCleanMachine.java
+20
-24
print-module/src/main/java/com/joe/print/mvp/print/PrintKitchen.java
+0
-1
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrder.java
+25
-7
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrderClosing.java
+29
-9
print-module/src/main/java/com/joe/print/mvp/print/PrintPrjKitchen.java
+27
-27
print-module/src/main/java/com/joe/print/mvp/print/PrintQRCode.java
+17
-16
print-module/src/main/java/com/joe/print/mvp/print/PrintSlip.java
+0
-1
print-module/src/main/java/com/joe/print/mvp/print/PrintUtils.java
+4
-12
print-module/src/main/java/com/joe/print/mvp/print/PrinterRoot.java
+0
-0
print-module/src/main/java/com/joe/print/mvp/print/common/HtmlContract.java
+11
-0
print-module/src/main/java/com/joe/print/mvp/print/utils/BBposPrint.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/ui/adapter/BillItemAdapter.java
+4
-4
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/FineItemAllPresenter.java
+0
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/OrderPayPresenter.java
+0
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
+0
-1
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/StringUtils.java
View file @
fb2f2dca
...
@@ -10,6 +10,7 @@ import java.util.regex.Pattern;
...
@@ -10,6 +10,7 @@ import java.util.regex.Pattern;
public
class
StringUtils
{
public
class
StringUtils
{
public
static
final
String
DEFAULT_QUERY_REGEX
=
"[!$^&*+=|{}';'\",<>/?~!#¥%……&*——|{}【】‘;:”“'。,、?]"
;
public
static
final
String
DEFAULT_QUERY_REGEX
=
"[!$^&*+=|{}';'\",<>/?~!#¥%……&*——|{}【】‘;:”“'。,、?]"
;
/**
/**
* 生成指定长度字符串,不足位右补空格,超出換行
* 生成指定长度字符串,不足位右补空格,超出換行
*
*
...
@@ -190,29 +191,30 @@ public class StringUtils {
...
@@ -190,29 +191,30 @@ public class StringUtils {
/**
/**
* 特殊字符转义处理
* 特殊字符转义处理
*
* @param data
* @param data
* @return
* @return
*/
*/
public
static
String
stringEscape
(
String
data
)
{
public
static
String
stringEscape
(
String
data
)
{
data
=
data
.
replace
(
" "
,
"%20"
);
data
=
data
.
replace
(
" "
,
"%20"
);
data
=
data
.
replace
(
"\""
,
"%22"
);
data
=
data
.
replace
(
"\""
,
"%22"
);
data
=
data
.
replace
(
"#"
,
"%23"
);
data
=
data
.
replace
(
"#"
,
"%23"
);
data
=
data
.
replace
(
"%"
,
"%25"
);
data
=
data
.
replace
(
"%"
,
"%25"
);
data
=
data
.
replace
(
"&"
,
"%26"
);
data
=
data
.
replace
(
"&"
,
"%26"
);
data
=
data
.
replace
(
"("
,
"%28"
);
data
=
data
.
replace
(
"("
,
"%28"
);
data
=
data
.
replace
(
")"
,
"%29"
);
data
=
data
.
replace
(
")"
,
"%29"
);
data
=
data
.
replace
(
"+"
,
"%2B"
);
data
=
data
.
replace
(
"+"
,
"%2B"
);
data
=
data
.
replace
(
","
,
"%2C"
);
data
=
data
.
replace
(
","
,
"%2C"
);
data
=
data
.
replace
(
"/"
,
"%2F"
);
data
=
data
.
replace
(
"/"
,
"%2F"
);
data
=
data
.
replace
(
":"
,
"%3A"
);
data
=
data
.
replace
(
":"
,
"%3A"
);
data
=
data
.
replace
(
";"
,
"%3B"
);
data
=
data
.
replace
(
";"
,
"%3B"
);
data
=
data
.
replace
(
"<"
,
"%3C"
);
data
=
data
.
replace
(
"<"
,
"%3C"
);
data
=
data
.
replace
(
"="
,
"%3D"
);
data
=
data
.
replace
(
"="
,
"%3D"
);
data
=
data
.
replace
(
">"
,
"%3E"
);
data
=
data
.
replace
(
">"
,
"%3E"
);
data
=
data
.
replace
(
"?"
,
"%3F"
);
data
=
data
.
replace
(
"?"
,
"%3F"
);
data
=
data
.
replace
(
"@"
,
"%40"
);
data
=
data
.
replace
(
"@"
,
"%40"
);
data
=
data
.
replace
(
"\\ "
,
"%5C"
);
data
=
data
.
replace
(
"\\ "
,
"%5C"
);
data
=
data
.
replace
(
"|"
,
"%7C"
);
data
=
data
.
replace
(
"|"
,
"%7C"
);
return
data
;
return
data
;
}
}
...
@@ -268,4 +270,21 @@ public class StringUtils {
...
@@ -268,4 +270,21 @@ public class StringUtils {
protected
String
getQueryRegex
()
{
protected
String
getQueryRegex
()
{
return
DEFAULT_QUERY_REGEX
;
return
DEFAULT_QUERY_REGEX
;
}
}
/**
* 方法二:推荐,速度最快
* 判断是否为整数
* @param str 传入的字符串
* @return 是整数返回true, 否则返回false
*/
public
static
boolean
isInteger
(
String
str
)
{
Pattern
pattern
=
Pattern
.
compile
(
"^[-\\+]?[\\d]*$"
);
return
pattern
.
matcher
(
str
).
matches
();
}
public
static
boolean
isNumeric
(
String
str
){
Pattern
pattern
=
Pattern
.
compile
(
"[0-9]*"
);
return
pattern
.
matcher
(
str
).
matches
();
}
}
}
\ No newline at end of file
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/PrintQRCodeContent.java
View file @
fb2f2dca
...
@@ -2,17 +2,15 @@ package com.gingersoft.gsa.cloud.print.bean;
...
@@ -2,17 +2,15 @@ package com.gingersoft.gsa.cloud.print.bean;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
import
lombok.Getter
;
import
lombok.Data
;
import
lombok.Setter
;
/**
/**
* @author : bin
* @author : bin
* @create date: 2020-11-06
* @create date: 2020-11-06
* @update date: 2020-11-06
* @update date: 2020-11-06
* @description:skyorder 打印實體
* @description:skyorder qrcode打印實體
* */
*/
@Getter
@Data
@Setter
public
class
PrintQRCodeContent
implements
PrintContent
,
Parcelable
{
public
class
PrintQRCodeContent
implements
PrintContent
,
Parcelable
{
private
String
printTableName
;
private
String
printTableName
;
...
@@ -63,4 +61,6 @@ public class PrintQRCodeContent implements PrintContent, Parcelable {
...
@@ -63,4 +61,6 @@ public class PrintQRCodeContent implements PrintContent, Parcelable {
return
new
PrintQRCodeContent
[
size
];
return
new
PrintQRCodeContent
[
size
];
}
}
};
};
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/PrintTakeawayCheckoutContent.java
0 → 100644
View file @
fb2f2dca
package
com
.
gingersoft
.
gsa
.
cloud
.
print
.
bean
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
com.gingersoft.gsa.cloud.print.bean.base.PrintPayTypeItem
;
import
java.util.List
;
import
lombok.Data
;
/**
* @author : bin
* @create date: 2020-12-01
* @update date: 2020-12-01
* @description:外賣結賬打印實體
*/
@Data
public
class
PrintTakeawayCheckoutContent
extends
PrintTakeawayFormContent
implements
Parcelable
,
PrintContent
{
/**
* 支付方式
*/
private
List
<
PrintPayTypeItem
>
payTypeList
;
public
PrintTakeawayCheckoutContent
()
{
}
@Override
public
int
describeContents
()
{
return
0
;
}
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
super
.
writeToParcel
(
dest
,
flags
);
dest
.
writeTypedList
(
this
.
payTypeList
);
}
protected
PrintTakeawayCheckoutContent
(
Parcel
in
)
{
super
(
in
);
this
.
payTypeList
=
in
.
createTypedArrayList
(
PrintPayTypeItem
.
CREATOR
);
}
public
static
final
Creator
<
PrintTakeawayCheckoutContent
>
CREATOR
=
new
Creator
<
PrintTakeawayCheckoutContent
>()
{
@Override
public
PrintTakeawayCheckoutContent
createFromParcel
(
Parcel
source
)
{
return
new
PrintTakeawayCheckoutContent
(
source
);
}
@Override
public
PrintTakeawayCheckoutContent
[]
newArray
(
int
size
)
{
return
new
PrintTakeawayCheckoutContent
[
size
];
}
};
}
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/PrintTakeawayFormContent.java
0 → 100644
View file @
fb2f2dca
package
com
.
gingersoft
.
gsa
.
cloud
.
print
.
bean
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
com.gingersoft.gsa.cloud.print.bean.base.PrintBillItem
;
import
com.gingersoft.gsa.cloud.print.bean.base.PrintFoodItem
;
import
com.gingersoft.gsa.cloud.print.bean.base.PrintPayTypeItem
;
import
java.util.List
;
import
lombok.Data
;
/**
* @author : bin
* @create date: 2020-12-01
* @update date: 2020-12-01
* @description:外賣印單打印實體
*/
@Data
public
class
PrintTakeawayFormContent
implements
PrintContent
,
Parcelable
{
private
String
brand
;
private
String
resturantName
;
/**
* 支付類型:在線支付,貨到付款
*/
private
String
payType
;
//送達時間
private
String
deliveryTime
;
//單號
private
String
orderNumber
;
//訂單碼
private
String
billNumber
;
//取餐碼
private
String
orderTakeFoodCode
;
//開單時間
private
String
billingTime
;
//支付時間
private
String
payTime
;
//備註
private
String
remark
;
//訂單實體
private
List
<
PrintFoodItem
>
foodItemList
;
private
List
<
PrintBillItem
>
billItemList
;
private
List
<
PrintPayTypeItem
>
printPayTypeItemList
;
//總金額
private
String
totalAmountText
;
private
String
totalAmount
;
//支付金額
private
String
payAmountText
;
private
String
payAmount
;
//會員積分信息
private
String
memberName
;
private
String
memberNumber
;
private
String
memberPhone
;
private
String
memberOldPoints
;
private
String
memberAddPoints
;
private
String
memberNowPoints
;
//收貨信息
private
String
adress
;
private
String
receiver
;
private
String
phone
;
//禮貌用語
private
String
politeLanguage
;
//打印時間
private
String
printTime
;
public
PrintTakeawayFormContent
()
{
}
@Override
public
int
describeContents
()
{
return
0
;
}
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
writeString
(
this
.
brand
);
dest
.
writeString
(
this
.
resturantName
);
dest
.
writeString
(
this
.
payType
);
dest
.
writeString
(
this
.
deliveryTime
);
dest
.
writeString
(
this
.
orderNumber
);
dest
.
writeString
(
this
.
billNumber
);
dest
.
writeString
(
this
.
orderTakeFoodCode
);
dest
.
writeString
(
this
.
billingTime
);
dest
.
writeString
(
this
.
payTime
);
dest
.
writeString
(
this
.
remark
);
dest
.
writeTypedList
(
this
.
foodItemList
);
dest
.
writeTypedList
(
this
.
billItemList
);
dest
.
writeTypedList
(
this
.
printPayTypeItemList
);
dest
.
writeString
(
this
.
totalAmountText
);
dest
.
writeString
(
this
.
totalAmount
);
dest
.
writeString
(
this
.
payAmount
);
dest
.
writeString
(
this
.
memberNumber
);
dest
.
writeString
(
this
.
memberName
);
dest
.
writeString
(
this
.
memberPhone
);
dest
.
writeString
(
this
.
memberOldPoints
);
dest
.
writeString
(
this
.
memberAddPoints
);
dest
.
writeString
(
this
.
memberNowPoints
);
dest
.
writeString
(
this
.
adress
);
dest
.
writeString
(
this
.
receiver
);
dest
.
writeString
(
this
.
phone
);
dest
.
writeString
(
this
.
politeLanguage
);
dest
.
writeString
(
this
.
printTime
);
}
protected
PrintTakeawayFormContent
(
Parcel
in
)
{
this
.
brand
=
in
.
readString
();
this
.
resturantName
=
in
.
readString
();
this
.
payType
=
in
.
readString
();
this
.
deliveryTime
=
in
.
readString
();
this
.
orderNumber
=
in
.
readString
();
this
.
billNumber
=
in
.
readString
();
this
.
orderTakeFoodCode
=
in
.
readString
();
this
.
billingTime
=
in
.
readString
();
this
.
payTime
=
in
.
readString
();
this
.
remark
=
in
.
readString
();
this
.
foodItemList
=
in
.
createTypedArrayList
(
PrintFoodItem
.
CREATOR
);
this
.
billItemList
=
in
.
createTypedArrayList
(
PrintBillItem
.
CREATOR
);
this
.
printPayTypeItemList
=
in
.
createTypedArrayList
(
PrintPayTypeItem
.
CREATOR
);
this
.
totalAmountText
=
in
.
readString
();
this
.
totalAmount
=
in
.
readString
();
this
.
payAmount
=
in
.
readString
();
this
.
memberNumber
=
in
.
readString
();
this
.
memberName
=
in
.
readString
();
this
.
memberPhone
=
in
.
readString
();
this
.
memberOldPoints
=
in
.
readString
();
this
.
memberAddPoints
=
in
.
readString
();
this
.
memberNowPoints
=
in
.
readString
();
this
.
adress
=
in
.
readString
();
this
.
receiver
=
in
.
readString
();
this
.
phone
=
in
.
readString
();
this
.
politeLanguage
=
in
.
readString
();
this
.
printTime
=
in
.
readString
();
}
public
static
final
Creator
<
PrintTakeawayFormContent
>
CREATOR
=
new
Creator
<
PrintTakeawayFormContent
>()
{
@Override
public
PrintTakeawayFormContent
createFromParcel
(
Parcel
source
)
{
return
new
PrintTakeawayFormContent
(
source
);
}
@Override
public
PrintTakeawayFormContent
[]
newArray
(
int
size
)
{
return
new
PrintTakeawayFormContent
[
size
];
}
};
}
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/adapter/AdaptationContent.java
0 → 100644
View file @
fb2f2dca
package
com
.
gingersoft
.
gsa
.
cloud
.
print
.
bean
.
adapter
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
;
/**
* @author : bin
* @create date: 2020-12-01
* @update date: 2020-12-01
* @description:
*/
public
interface
AdaptationContent
{
PrintContent
adaptationQRCode
();
PrintContent
adaptationPrintTakeawayFormContent
(
OrderDetails
.
DataBean
data
);
PrintContent
adaptationPrintTakeawayCheckoutContent
(
OrderDetails
.
DataBean
data
);
PrintContent
adaptationPrintCleanMachineContent
();
}
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/adapter/AdaptationContent2.java
0 → 100644
View file @
fb2f2dca
package
com
.
gingersoft
.
gsa
.
cloud
.
print
.
bean
.
adapter
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
;
/**
* @author : bin
* @create date: 2020-12-01
* @update date: 2020-12-01
* @description:
*/
public
interface
AdaptationContent2
{
PrintContent
adaptationQRCode
();
// PrintContent adaptationPrintTakeawayFormContent(OrderDetails.DataBean data);
//
// PrintContent adaptationPrintTakeawayCheckoutContent(OrderDetails.DataBean data);
//
// PrintContent adaptationPrintCleanMachineContent();
}
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/adapter/PrintContentAdapter.java
0 → 100644
View file @
fb2f2dca
package
com
.
gingersoft
.
gsa
.
cloud
.
print
.
bean
.
adapter
;
import
android.text.TextUtils
;
import
com.gingersoft.gsa.cloud.account.restaurant.ResturantInfoManager
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
;
import
com.gingersoft.gsa.cloud.print.bean.PrintTakeawayFormContent
;
import
com.gingersoft.gsa.cloud.print.bean.base.PrintBillItem
;
import
com.gingersoft.gsa.cloud.print.bean.base.PrintFoodItem
;
import
com.gingersoft.gsa.cloud.print.bean.base.PrintPayTypeItem
;
import
java.util.ArrayList
;
import
java.util.List
;
import
lombok.Data
;
/**
* @author : bin
* @create date: 2020-12-01
* @update date: 2020-12-01
* @description:
*/
@Data
public
class
PrintContentAdapter
implements
AdaptationContent
{
public
PrintContentAdapter
()
{
}
@Override
public
PrintContent
adaptationQRCode
()
{
return
null
;
}
@Override
public
PrintContent
adaptationPrintTakeawayFormContent
(
OrderDetails
.
DataBean
data
)
{
return
getPrintTakeawayFormContent
(
data
);
}
@Override
public
PrintContent
adaptationPrintTakeawayCheckoutContent
(
OrderDetails
.
DataBean
data
)
{
return
getPrintTakeawayFormContent
(
data
);
}
@Override
public
PrintContent
adaptationPrintCleanMachineContent
()
{
return
null
;
}
public
PrintTakeawayFormContent
getPrintTakeawayFormContent
(
OrderDetails
.
DataBean
data
)
{
PrintTakeawayFormContent
takeawayFormContent
=
new
PrintTakeawayFormContent
();
takeawayFormContent
.
setBrand
(
ResturantInfoManager
.
newInstance
().
getBrandName
());
takeawayFormContent
.
setResturantName
(
ResturantInfoManager
.
newInstance
().
getRestaurantName
());
takeawayFormContent
.
setPayType
(
String
.
valueOf
(
data
.
getPayType
()));
takeawayFormContent
.
setDeliveryTime
(
data
.
getOrder_type
()
==
2
?
data
.
getSEND_TIME
()
:
data
.
getTakeTime
());
takeawayFormContent
.
setOrderNumber
(
data
.
getORDER_NO
());
takeawayFormContent
.
setBillNumber
(
data
.
getBillNo
());
takeawayFormContent
.
setOrderTakeFoodCode
(
data
.
getTakeFoodCode
());
takeawayFormContent
.
setBillingTime
(
data
.
getCREATE_TIME
());
takeawayFormContent
.
setPayTime
(
data
.
getPayTime
());
takeawayFormContent
.
setRemark
(
data
.
getRemark
());
// takeawayFormContent.setFoodItemList(getPrintFoodItemsByProductBeans(data.getPRODUCT_NAME()));
takeawayFormContent
.
setBillItemList
(
getBillItemListByInfo
(
data
.
getTOTAL_AMOUNT
(),
data
.
getLunchbox
(),
data
.
getDELIVERY_CHARGE
()));
takeawayFormContent
.
setPrintPayTypeItemList
(
getPrintPayTypeItemsByPayMultiple
(
data
.
getPayMultiple
()));
takeawayFormContent
.
setTotalAmountText
(
"總金額: "
);
takeawayFormContent
.
setTotalAmount
(
data
.
getTOTAL_AMOUNT
());
takeawayFormContent
.
setPayAmountText
(
"支付金額: "
);
takeawayFormContent
.
setPayAmount
(
String
.
valueOf
(
data
.
getPAY_AMOUNT
()));
takeawayFormContent
.
setMemberName
(
data
.
getMEMBER_NAME
());
// takeawayFormContent.setMemberNumber(data.getm);
takeawayFormContent
.
setMemberPhone
(
data
.
getPHONE
());
takeawayFormContent
.
setMemberOldPoints
(
String
.
valueOf
(
data
.
getOldPoints
()));
takeawayFormContent
.
setMemberAddPoints
(
String
.
valueOf
(
data
.
getAddPoints
()));
takeawayFormContent
.
setMemberNowPoints
(
String
.
valueOf
(
data
.
getNowPoints
()));
takeawayFormContent
.
setAdress
(
data
.
getAddressDetail
());
takeawayFormContent
.
setReceiver
(
data
.
getRECEIVER
());
takeawayFormContent
.
setPhone
(
data
.
getPHONE
());
takeawayFormContent
.
setPoliteLanguage
(
"謝謝光臨!"
);
return
takeawayFormContent
;
}
// private List<PrintFoodItem> getPrintFoodItemsByProductBeans(List<OrderDetails.DataBean.PRODUCTNAMEBean> productnameBeanList) {
// List<OrderDetail> orderDetailList = OrderDetail.productMameBeanToOrderDetail(1, productnameBeanList);
// List<PrintFoodItem> printFoodItems = new ArrayList<>();
// for (OrderDetail orderDetail : orderDetailList) {
// printFoodItems.add(new PrintFoodItem(orderDetail.getProductName(), orderDetail.getNumber(), orderDetail.getPrice(), orderDetail.getItemType()));
// }
// return printFoodItems;
// }
private
List
<
PrintBillItem
>
getBillItemListByInfo
(
String
totalAmount
,
double
lunchbox
,
double
deliveryCharge
)
{
List
<
PrintBillItem
>
billItems
=
new
ArrayList
<>();
if
(
TextUtils
.
isEmpty
(
totalAmount
))
{
billItems
.
add
(
new
PrintBillItem
(
"合計: "
,
String
.
valueOf
(
totalAmount
)));
}
if
(
lunchbox
!=
0.0
)
{
billItems
.
add
(
new
PrintBillItem
(
"餐盒費: "
,
String
.
valueOf
(
lunchbox
)));
}
if
(
deliveryCharge
!=
0.0
)
{
billItems
.
add
(
new
PrintBillItem
(
"送貨費: "
,
String
.
valueOf
(
deliveryCharge
)));
}
return
billItems
;
}
private
List
<
PrintPayTypeItem
>
getPrintPayTypeItemsByPayMultiple
(
List
<
OrderDetails
.
DataBean
.
PayMultiple
>
payMultiples
)
{
List
<
PrintPayTypeItem
>
printPayTypeItems
=
new
ArrayList
<>();
for
(
OrderDetails
.
DataBean
.
PayMultiple
payMultiple
:
payMultiples
)
{
printPayTypeItems
.
add
(
new
PrintPayTypeItem
(
payMultiple
.
getPayName
(),
String
.
valueOf
(
payMultiple
.
getAmount
())));
}
return
printPayTypeItems
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/base/PrintBillItem.java
0 → 100644
View file @
fb2f2dca
package
com
.
gingersoft
.
gsa
.
cloud
.
print
.
bean
.
base
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
lombok.Data
;
/**
* 賬單打印實體
*/
@Data
public
class
PrintBillItem
implements
Parcelable
{
private
String
billName
;
private
String
billAmount
;
public
PrintBillItem
(
String
billName
,
String
billAmount
)
{
this
.
billName
=
billName
;
this
.
billAmount
=
billAmount
;
}
@Override
public
int
describeContents
()
{
return
0
;
}
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
writeString
(
this
.
billName
);
dest
.
writeString
(
this
.
billAmount
);
}
protected
PrintBillItem
(
Parcel
in
)
{
this
.
billName
=
in
.
readString
();
this
.
billAmount
=
in
.
readString
();
}
public
static
final
Creator
<
PrintBillItem
>
CREATOR
=
new
Creator
<
PrintBillItem
>()
{
@Override
public
PrintBillItem
createFromParcel
(
Parcel
source
)
{
return
new
PrintBillItem
(
source
);
}
@Override
public
PrintBillItem
[]
newArray
(
int
size
)
{
return
new
PrintBillItem
[
size
];
}
};
}
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/base/PrintFoodItem.java
0 → 100644
View file @
fb2f2dca
package
com
.
gingersoft
.
gsa
.
cloud
.
print
.
bean
.
base
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
lombok.Data
;
/**
* @author : bin
* @create date: 2020-12-01
* @update date: 2020-12-01
* @description:食品打印實體
*/
@Data
public
class
PrintFoodItem
implements
Parcelable
{
private
String
name
;
private
int
num
;
private
double
price
;
private
int
itemType
;
public
PrintFoodItem
(
String
name
,
int
num
,
double
price
,
int
itemType
)
{
this
.
name
=
name
;
this
.
num
=
num
;
this
.
price
=
price
;
this
.
itemType
=
itemType
;
}
@Override
public
int
describeContents
()
{
return
0
;
}
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
writeString
(
this
.
name
);
dest
.
writeInt
(
this
.
num
);
dest
.
writeDouble
(
this
.
price
);
dest
.
writeInt
(
this
.
itemType
);
}
protected
PrintFoodItem
(
Parcel
in
)
{
this
.
name
=
in
.
readString
();
this
.
num
=
in
.
readInt
();
this
.
price
=
in
.
readDouble
();
this
.
itemType
=
in
.
readInt
();
}
public
static
final
Creator
<
PrintFoodItem
>
CREATOR
=
new
Creator
<
PrintFoodItem
>()
{
@Override
public
PrintFoodItem
createFromParcel
(
Parcel
source
)
{
return
new
PrintFoodItem
(
source
);
}
@Override
public
PrintFoodItem
[]
newArray
(
int
size
)
{
return
new
PrintFoodItem
[
size
];
}
};
}
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/base/PrintPayTypeItem.java
0 → 100644
View file @
fb2f2dca
package
com
.
gingersoft
.
gsa
.
cloud
.
print
.
bean
.
base
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
lombok.Data
;
/**
* 賬單支付方式實體
*/
@Data
public
class
PrintPayTypeItem
implements
Parcelable
{
private
String
payName
;
private
String
payAmount
;
public
PrintPayTypeItem
(
String
payName
,
String
payAmount
)
{
this
.
payName
=
payName
;
this
.
payAmount
=
payAmount
;
}
@Override
public
int
describeContents
()
{
return
0
;
}
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
writeString
(
this
.
payName
);
dest
.
writeString
(
this
.
payAmount
);
}
protected
PrintPayTypeItem
(
Parcel
in
)
{
this
.
payName
=
in
.
readString
();
this
.
payAmount
=
in
.
readString
();
}
public
static
final
Creator
<
PrintPayTypeItem
>
CREATOR
=
new
Creator
<
PrintPayTypeItem
>()
{
@Override
public
PrintPayTypeItem
createFromParcel
(
Parcel
source
)
{
return
new
PrintPayTypeItem
(
source
);
}
@Override
public
PrintPayTypeItem
[]
newArray
(
int
size
)
{
return
new
PrintPayTypeItem
[
size
];
}
};
}
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/model/viewModel/HistoryOrderViewModel.kt
View file @
fb2f2dca
...
@@ -88,7 +88,7 @@ class HistoryOrderViewModel(private val historyOrderRepository: HistoryOrderRepo
...
@@ -88,7 +88,7 @@ class HistoryOrderViewModel(private val historyOrderRepository: HistoryOrderRepo
//訂單信息和廚房單
//訂單信息和廚房單
orderDetails
.
data
!!
[
0
].
order_type
=
data
.
order_type
orderDetails
.
data
!!
[
0
].
order_type
=
data
.
order_type
orderDetails
.
data
!!
[
0
].
orderPayType
=
data
.
orderPayType
orderDetails
.
data
!!
[
0
].
orderPayType
=
data
.
orderPayType
TakeawayOrder
.
getInstance
().
shoppingCart
.
d
ataBean
=
orderDetails
.
data
!!
[
0
]
TakeawayOrder
.
getInstance
().
shoppingCart
.
d
eliveryAndPickupData
=
orderDetails
.
data
!!
[
0
]
CC
.
obtainBuilder
(
ComponentName
.
COMPONENT_PRINT
)
CC
.
obtainBuilder
(
ComponentName
.
COMPONENT_PRINT
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_OTHER_ORDER
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_OTHER_ORDER
)
.
setActionName
(
"printActivity"
)
.
setActionName
(
"printActivity"
)
...
@@ -101,7 +101,7 @@ class HistoryOrderViewModel(private val historyOrderRepository: HistoryOrderRepo
...
@@ -101,7 +101,7 @@ class HistoryOrderViewModel(private val historyOrderRepository: HistoryOrderRepo
}
else
{
}
else
{
listener
.
invoke
(
true
)
listener
.
invoke
(
true
)
}
}
TakeawayOrder
.
getInstance
().
shoppingCart
.
d
ataBean
=
null
TakeawayOrder
.
getInstance
().
shoppingCart
.
d
eliveryAndPickupData
=
null
}
}
}
else
{
}
else
{
ToastUtils
.
show
(
context
,
"沒有訂單內容,打印失敗"
)
ToastUtils
.
show
(
context
,
"沒有訂單內容,打印失敗"
)
...
...
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/model/viewModel/PageViewModel.kt
View file @
fb2f2dca
...
@@ -28,6 +28,7 @@ import com.gingersoft.gsa.cloud.constans.AppConstans
...
@@ -28,6 +28,7 @@ import com.gingersoft.gsa.cloud.constans.AppConstans
import
com.gingersoft.gsa.cloud.constans.FoodSummaryConstans
import
com.gingersoft.gsa.cloud.constans.FoodSummaryConstans
import
com.gingersoft.gsa.cloud.constans.PrintConstans
import
com.gingersoft.gsa.cloud.constans.PrintConstans
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
import
com.gingersoft.gsa.cloud.service.GetInfoUpdateService
import
com.gingersoft.gsa.cloud.service.GetInfoUpdateService
import
com.gingersoft.gsa.delivery_pick_mode.R
import
com.gingersoft.gsa.delivery_pick_mode.R
import
com.gingersoft.gsa.delivery_pick_mode.data.WeatherRepository
import
com.gingersoft.gsa.delivery_pick_mode.data.WeatherRepository
...
@@ -618,13 +619,13 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
...
@@ -618,13 +619,13 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
*/
*/
fun
printOrder
(
code
:
Int
,
dataBean
:
OrderDetails
.
DataBean
,
listener
:
(
MessageBean
)
->
Unit
)
{
fun
printOrder
(
code
:
Int
,
dataBean
:
OrderDetails
.
DataBean
,
listener
:
(
MessageBean
)
->
Unit
)
{
//訂單信息和廚房單,打印前需要修改dataBean的order_type和orderPayType
//訂單信息和廚房單,打印前需要修改dataBean的order_type和orderPayType
TakeawayOrder
.
getInstance
().
shoppingCart
.
d
ataBean
=
dataBean
TakeawayOrder
.
getInstance
().
shoppingCart
.
d
eliveryAndPickupData
=
dataBean
CC
.
obtainBuilder
(
ComponentName
.
COMPONENT_PRINT
)
CC
.
obtainBuilder
(
ComponentName
.
COMPONENT_PRINT
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_OTHER_ORDER
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_OTHER_ORDER
)
.
setActionName
(
"printActivity"
)
.
setActionName
(
"printActivity"
)
.
build
()
.
build
()
.
callAsyncCallbackOnMainThread
{
_
,
result
->
.
callAsyncCallbackOnMainThread
{
_
,
result
->
TakeawayOrder
.
getInstance
().
shoppingCart
.
d
ataBean
=
null
TakeawayOrder
.
getInstance
().
shoppingCart
.
d
eliveryAndPickupData
=
null
listener
.
invoke
(
getMsgBean
(
code
,
"打印"
,
result
.
isSuccess
))
listener
.
invoke
(
getMsgBean
(
code
,
"打印"
,
result
.
isSuccess
))
}
}
}
}
...
@@ -633,15 +634,23 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
...
@@ -633,15 +634,23 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
* 打印結賬單
* 打印結賬單
*/
*/
private
fun
printOrderClosing
(
dataBean
:
OrderDetails
.
DataBean
,
listener
:
(
Int
,
Boolean
)
->
Unit
)
{
private
fun
printOrderClosing
(
dataBean
:
OrderDetails
.
DataBean
,
listener
:
(
Int
,
Boolean
)
->
Unit
)
{
TakeawayOrder
.
getInstance
().
shoppingCart
.
dataBean
=
dataBean
TakeawayOrder
.
getInstance
().
shoppingCart
.
deliveryAndPickupData
=
dataBean
var
contentAdapter
:
PrintContentAd
=
PrintContent
()
var
PrintContent
=
contentAdapter
.
adaptationPrintTakeawayFormContent
(
TakeawayOrder
.
getInstance
().
shoppingCart
.
deliveryAndPickupData
)
CC
.
obtainBuilder
(
ComponentName
.
COMPONENT_PRINT
)
CC
.
obtainBuilder
(
ComponentName
.
COMPONENT_PRINT
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_OTHER_CLOSING
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_OTHER_CLOSING
)
.
setActionName
(
"printActivity"
)
.
setActionName
(
"printActivity"
)
.
addParam
(
PrintConstans
.
PRINT_CONTENT
,
PrintContent
)
.
build
()
.
build
()
.
callAsyncCallbackOnMainThread
{
_
,
result
->
.
callAsyncCallbackOnMainThread
{
_
,
result
->
TakeawayOrder
.
getInstance
().
shoppingCart
.
d
ataBean
=
null
TakeawayOrder
.
getInstance
().
shoppingCart
.
d
eliveryAndPickupData
=
null
listener
.
invoke
(
PrintCode
,
result
.
isSuccess
)
listener
.
invoke
(
PrintCode
,
result
.
isSuccess
)
}
}
}
}
/**
/**
...
...
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/mvp/ui/activity/SendOrderActivity.java
View file @
fb2f2dca
...
@@ -16,7 +16,6 @@ import androidx.recyclerview.widget.LinearLayoutManager;
...
@@ -16,7 +16,6 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.gingersoft.gsa.cloud.base.order.billItem.BillItem
;
import
com.gingersoft.gsa.cloud.base.order.billItem.BillItem
;
import
com.gingersoft.gsa.cloud.base.order.billItem.BillOrderMoney
;
import
com.gingersoft.gsa.cloud.base.order.cart.ShoppingCart
;
import
com.gingersoft.gsa.cloud.base.order.cart.ShoppingCart
;
import
com.gingersoft.gsa.cloud.base.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.order.order.TakeawayOrder
;
import
com.gingersoft.gsa.cloud.base.order.order.TakeawayOrder
;
...
...
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/cart/ShoppingCart.java
View file @
fb2f2dca
...
@@ -14,7 +14,6 @@ import com.gingersoft.gsa.cloud.print.bean.OrderDetails;
...
@@ -14,7 +14,6 @@ import com.gingersoft.gsa.cloud.print.bean.OrderDetails;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.CopyOnWriteArrayList
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
...
@@ -42,7 +41,7 @@ public class ShoppingCart {
...
@@ -42,7 +41,7 @@ public class ShoppingCart {
/**
/**
* 外送/自取 的訂單數據
* 外送/自取 的訂單數據
*/
*/
protected
OrderDetails
.
DataBean
d
ataBean
;
protected
OrderDetails
.
DataBean
d
eliveryAndPickupData
;
/**
/**
* 商品列表
* 商品列表
*/
*/
...
...
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/cart/ShoppingCartNumberChange.java
View file @
fb2f2dca
package
com
.
gingersoft
.
gsa
.
cloud
.
base
.
order
.
cart
;
package
com
.
gingersoft
.
gsa
.
cloud
.
base
.
order
.
cart
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.gingersoft.gsa.cloud.base.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
...
order-base/src/main/java/com/gingersoft/gsa/cloud/base/order/commodity/OrderDetail.java
View file @
fb2f2dca
...
@@ -9,7 +9,6 @@ import com.gingersoft.gsa.cloud.database.bean.Discount;
...
@@ -9,7 +9,6 @@ import com.gingersoft.gsa.cloud.database.bean.Discount;
import
com.gingersoft.gsa.cloud.database.bean.Food
;
import
com.gingersoft.gsa.cloud.database.bean.Food
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
...
...
print-module/src/main/java/com/joe/print/mvp/model/bean/HtmlLable.java
View file @
fb2f2dca
...
@@ -34,15 +34,32 @@ public class HtmlLable {
...
@@ -34,15 +34,32 @@ public class HtmlLable {
this
.
attributesList
=
attributes
;
this
.
attributesList
=
attributes
;
}
}
public
HtmlLable
(
String
value
,
HtmlLable
.
Attributes
...
attributes
)
{
this
.
value
=
value
;
this
.
attributesList
=
attributes
;
}
@Data
@Data
public
static
final
class
Attributes
{
public
static
final
class
Attributes
{
private
String
attributesName
;
private
String
attributesName
;
private
String
attributesVaule
;
private
String
attributesVaule
;
/**
* 值類型:
* 0:自身類型 如1=int型
* 1:字符串 有時間1可能為字符串類型
*/
private
byte
valueType
=
0
;
public
Attributes
(
String
attributesName
,
String
attributesVaule
)
{
public
Attributes
(
String
attributesName
,
String
attributesVaule
)
{
this
.
attributesName
=
attributesName
;
this
.
attributesName
=
attributesName
;
this
.
attributesVaule
=
attributesVaule
;
this
.
attributesVaule
=
attributesVaule
;
}
}
public
Attributes
(
String
attributesName
,
String
attributesVaule
,
byte
valueType
)
{
this
.
attributesName
=
attributesName
;
this
.
attributesVaule
=
attributesVaule
;
this
.
valueType
=
valueType
;
}
}
}
}
}
print-module/src/main/java/com/joe/print/mvp/model/bean/PrintBillBean.java
deleted
100644 → 0
View file @
922cde77
package
com
.
joe
.
print
.
mvp
.
model
.
bean
;
public
class
PrintBillBean
{
public
PrintBillBean
(
String
billName
,
String
billAmount
)
{
this
.
billName
=
billName
;
this
.
billAmount
=
billAmount
;
}
private
String
billName
;
private
String
billAmount
;
public
String
getBillName
()
{
return
billName
;
}
public
void
setBillName
(
String
billName
)
{
this
.
billName
=
billName
;
}
public
String
getBillAmount
()
{
return
billAmount
;
}
public
void
setBillAmount
(
String
billAmount
)
{
this
.
billAmount
=
billAmount
;
}
}
print-module/src/main/java/com/joe/print/mvp/print/PrintBill.java
View file @
fb2f2dca
...
@@ -9,7 +9,6 @@ import com.gingersoft.gsa.cloud.base.common.bean.BillingBean;
...
@@ -9,7 +9,6 @@ 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.common.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.base.common.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.base.order.billItem.BillItem
;
import
com.gingersoft.gsa.cloud.base.order.billItem.BillItem
;
import
com.gingersoft.gsa.cloud.base.order.billItem.BillOrderMoney
;
import
com.gingersoft.gsa.cloud.base.order.cart.ShoppingCart
;
import
com.gingersoft.gsa.cloud.base.order.cart.ShoppingCart
;
import
com.gingersoft.gsa.cloud.base.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.base.order.order.DoshokuOrder
;
...
@@ -20,7 +19,6 @@ import com.gingersoft.gsa.cloud.base.utils.time.TimeUtils;
...
@@ -20,7 +19,6 @@ import com.gingersoft.gsa.cloud.base.utils.time.TimeUtils;
import
com.gingersoft.gsa.cloud.constans.ExpandConstant
;
import
com.gingersoft.gsa.cloud.constans.ExpandConstant
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintCleanMachine.java
View file @
fb2f2dca
...
@@ -4,6 +4,7 @@ import android.content.Context;
...
@@ -4,6 +4,7 @@ import android.content.Context;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.View
;
import
com.gingersoft.gsa.cloud.account.restaurant.ResturantInfoManager
;
import
com.gingersoft.gsa.cloud.account.restaurant.ResturantInfoManager
;
import
com.gingersoft.gsa.cloud.account.user.UserContext
;
import
com.gingersoft.gsa.cloud.account.user.UserContext
;
import
com.gingersoft.gsa.cloud.base.common.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.base.common.bean.PayMethod
;
...
@@ -15,10 +16,12 @@ import com.gingersoft.gsa.cloud.constans.AppConstans;
...
@@ -15,10 +16,12 @@ import com.gingersoft.gsa.cloud.constans.AppConstans;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.print.bean.PrintCleanMachineContent
;
import
com.gingersoft.gsa.cloud.print.bean.PrintCleanMachineContent
;
import
com.joe.print.mvp.model.bean.HtmlLable
;
import
com.joe.print.mvp.model.bean.HtmlLable
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
static
com
.
joe
.
print
.
mvp
.
print
.
common
.
HtmlContract
.
ATTRIBUTES_ALIGN
;
import
static
com
.
joe
.
print
.
mvp
.
print
.
common
.
HtmlContract
.
ATTRIBUTES_ALIGN
;
import
static
com
.
joe
.
print
.
mvp
.
print
.
common
.
HtmlContract
.
ATTRIBUTES_OFFSET
;
import
static
com
.
joe
.
print
.
mvp
.
print
.
common
.
HtmlContract
.
ATTRIBUTES_OFFSET
;
import
static
com
.
joe
.
print
.
mvp
.
print
.
common
.
HtmlContract
.
LABLE_COLUMN
;
import
static
com
.
joe
.
print
.
mvp
.
print
.
common
.
HtmlContract
.
LABLE_COLUMN
;
...
@@ -102,15 +105,15 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
...
@@ -102,15 +105,15 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
}
}
private
String
getHtmlHeadInfo
()
{
private
String
getHtmlHeadInfo
()
{
HtmlLable
[]
htmlLables
=
new
HtmlLable
[
7
]
;
List
<
HtmlLable
>
htmlLables
=
new
ArrayList
<>()
;
htmlLables
[
0
]
=
new
HtmlLable
(
LABLE_P
,
"上次清機時間:"
+
mCleanMachineContent
.
getRestaurantOperation
().
getOperationTime
(
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"上次清機時間:"
+
mCleanMachineContent
.
getRestaurantOperation
().
getOperationTime
()
));
htmlLables
[
1
]
=
new
HtmlLable
(
LABLE_P
,
"品牌名稱:"
+
ResturantInfoManager
.
newInstance
().
getBrandName
(
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"品牌名稱:"
+
ResturantInfoManager
.
newInstance
().
getBrandName
()
));
htmlLables
[
2
]
=
new
HtmlLable
(
LABLE_P
,
"店鋪名稱:"
+
ResturantInfoManager
.
newInstance
().
getRestaurantName
(
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"店鋪名稱:"
+
ResturantInfoManager
.
newInstance
().
getRestaurantName
()
));
htmlLables
[
3
]
=
new
HtmlLable
(
LABLE_P
,
"每日營業報表"
);
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"每日營業報表"
)
);
htmlLables
[
4
]
=
new
HtmlLable
(
LABLE_P
,
"由營業日期:"
+
mCleanMachineContent
.
getStartTime
(
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"由營業日期:"
+
mCleanMachineContent
.
getStartTime
()
));
htmlLables
[
5
]
=
new
HtmlLable
(
LABLE_P
,
"到營業日期:"
+
mCleanMachineContent
.
getCurrentTime
(
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"到營業日期:"
+
mCleanMachineContent
.
getCurrentTime
()
));
htmlLables
[
6
]
=
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
);
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
)
);
return
getHtmlLables
(
htmlLables
);
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()])
);
}
}
private
String
getHtmlBusinessTotal
()
{
private
String
getHtmlBusinessTotal
()
{
...
@@ -150,8 +153,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
...
@@ -150,8 +153,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
}
}
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
HtmlLable
[]
htmlLables2
=
(
HtmlLable
[])
htmlLables
.
toArray
();
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()]));
return
getHtmlLables
(
htmlLables2
);
}
}
/**
/**
...
@@ -180,8 +182,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
...
@@ -180,8 +182,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
}
}
HtmlLable
[]
htmlLables2
=
(
HtmlLable
[])
htmlLables
.
toArray
();
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()]));
return
getHtmlLables
(
htmlLables2
);
}
}
/**
/**
...
@@ -225,8 +226,8 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
...
@@ -225,8 +226,8 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
HtmlLable
[]
htmlLables2
=
(
HtmlLable
[])
htmlLables
.
toArray
();
return
getHtmlLables
(
htmlLables
2
);
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()])
);
}
}
/**
/**
...
@@ -248,8 +249,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
...
@@ -248,8 +249,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
htmlLables
.
addAll
(
getHtmlBillingStatisticsItem
(
analysisBean
,
voBean
));
htmlLables
.
addAll
(
getHtmlBillingStatisticsItem
(
analysisBean
,
voBean
));
}
}
}
}
HtmlLable
[]
htmlLables2
=
(
HtmlLable
[])
htmlLables
.
toArray
();
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()]));
return
getHtmlLables
(
htmlLables2
);
}
}
private
List
<
HtmlLable
>
getHtmlBillingStatisticsItem
(
SettlementReport
.
AnalysisBean
analysisBean
,
SettlementReport
.
VoBean
voBean
)
{
private
List
<
HtmlLable
>
getHtmlBillingStatisticsItem
(
SettlementReport
.
AnalysisBean
analysisBean
,
SettlementReport
.
VoBean
voBean
)
{
...
@@ -338,8 +338,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
...
@@ -338,8 +338,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
htmlLables
.
add
(
new
HtmlLable
(
getRowLableEnd
()));
htmlLables
.
add
(
new
HtmlLable
(
getRowLableEnd
()));
}
}
HtmlLable
[]
htmlLables2
=
(
HtmlLable
[])
htmlLables
.
toArray
();
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()]));
return
getHtmlLables
(
htmlLables2
);
}
}
...
@@ -377,8 +376,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
...
@@ -377,8 +376,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
htmlLables
.
add
(
new
HtmlLable
(
getRowLableEnd
()));
htmlLables
.
add
(
new
HtmlLable
(
getRowLableEnd
()));
}
}
HtmlLable
[]
htmlLables2
=
(
HtmlLable
[])
htmlLables
.
toArray
();
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()]));
return
getHtmlLables
(
htmlLables2
);
}
}
...
@@ -397,9 +395,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
...
@@ -397,9 +395,7 @@ public class PrintCleanMachine extends PrinterRoot<PrintCleanMachineContent> {
htmlLables
.
add
(
new
HtmlLable
(
LABLE_COLUMN
,
items
.
get
(
i
)));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_COLUMN
,
items
.
get
(
i
)));
htmlLables
.
add
(
new
HtmlLable
(
getRowLableEnd
()));
htmlLables
.
add
(
new
HtmlLable
(
getRowLableEnd
()));
}
}
HtmlLable
[]
htmlLables2
=
(
HtmlLable
[])
htmlLables
.
toArray
();
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()]));
return
getHtmlLables
(
htmlLables2
);
}
}
}
}
print-module/src/main/java/com/joe/print/mvp/print/PrintKitchen.java
View file @
fb2f2dca
...
@@ -14,7 +14,6 @@ import com.gingersoft.gsa.cloud.base.table.bean.TableBean;
...
@@ -14,7 +14,6 @@ import com.gingersoft.gsa.cloud.base.table.bean.TableBean;
import
com.gingersoft.gsa.cloud.base.utils.other.TextUtil
;
import
com.gingersoft.gsa.cloud.base.utils.other.TextUtil
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
;
import
com.joe.print.R
;
import
com.joe.print.R
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrder.java
View file @
fb2f2dca
...
@@ -11,7 +11,8 @@ import com.gingersoft.gsa.cloud.base.utils.RestaurantExpandInfoUtils;
...
@@ -11,7 +11,8 @@ import com.gingersoft.gsa.cloud.base.utils.RestaurantExpandInfoUtils;
import
com.gingersoft.gsa.cloud.constans.ExpandConstant
;
import
com.gingersoft.gsa.cloud.constans.ExpandConstant
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.joe.print.mvp.model.bean.PrintBillBean
;
import
com.gingersoft.gsa.cloud.print.bean.PrintTakeawayFormContent
;
import
com.gingersoft.gsa.cloud.print.bean.base.PrintBillItem
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -21,12 +22,18 @@ import java.util.Map;
...
@@ -21,12 +22,18 @@ import java.util.Map;
/**
/**
* 外送接單,印單 已改新版
* 外送接單,印單 已改新版
*/
*/
public
class
PrintOtherOrder
extends
PrinterRoot
{
public
class
PrintOtherOrder
extends
PrinterRoot
<
PrintTakeawayFormContent
>
{
private
PrintTakeawayFormContent
printTakeawayFormContent
;
@Override
protected
void
setPrintContent
(
PrintTakeawayFormContent
printContent
)
{
this
.
printTakeawayFormContent
=
printContent
;
}
@Override
@Override
public
Map
<
String
,
List
<
Bitmap
>>
getPrintBitmap
(
Context
mContext
,
PrinterDeviceBean
deviceBean
)
{
public
Map
<
String
,
List
<
Bitmap
>>
getPrintBitmap
(
Context
mContext
,
PrinterDeviceBean
deviceBean
)
{
OrderDetails
.
DataBean
dataBean
=
TakeawayOrder
.
getInstance
().
getShoppingCart
().
getD
ataBean
();
OrderDetails
.
DataBean
dataBean
=
TakeawayOrder
.
getInstance
().
getShoppingCart
().
getD
eliveryAndPickupData
();
if
(
dataBean
!=
null
)
{
if
(
dataBean
!=
null
)
{
Map
<
String
,
List
<
Bitmap
>>
bitmapMaps
=
new
HashMap
<>();
Map
<
String
,
List
<
Bitmap
>>
bitmapMaps
=
new
HashMap
<>();
//廚房單,可能會有多個IP打印
//廚房單,可能會有多個IP打印
...
@@ -49,9 +56,20 @@ public class PrintOtherOrder extends PrinterRoot {
...
@@ -49,9 +56,20 @@ public class PrintOtherOrder extends PrinterRoot {
@Override
@Override
public
String
[]
getPrintDatas
(
Context
mContext
,
PrinterDeviceBean
deviceBean
)
{
public
String
[]
getPrintDatas
(
Context
mContext
,
PrinterDeviceBean
deviceBean
)
{
return
null
;
if
(
printTakeawayFormContent
==
null
)
{
return
new
String
[]{
"<html><body></body></html>"
};
}
String
stringBuilder
=
"<html><body>"
+
getTakewayPrintContent
(
printTakeawayFormContent
,
deviceBean
)
+
"</body></html>"
;
String
[]
pritContent
=
new
String
[
1
];
pritContent
[
0
]
=
stringBuilder
;
return
pritContent
;
}
}
@Override
@Override
public
int
getPrintCount
(
Context
context
)
{
public
int
getPrintCount
(
Context
context
)
{
return
RestaurantExpandInfoUtils
.
getValue
(
ExpandConstant
.
DeliveryPrintCount
,
1
);
return
RestaurantExpandInfoUtils
.
getValue
(
ExpandConstant
.
DeliveryPrintCount
,
1
);
...
@@ -69,7 +87,7 @@ public class PrintOtherOrder extends PrinterRoot {
...
@@ -69,7 +87,7 @@ public class PrintOtherOrder extends PrinterRoot {
layout
.
addView
(
getDiningFoodList
(
mContext
,
OrderDetail
.
productMameBeanToOrderDetail
(
0
,
data
.
getPRODUCT_NAME
()),
deviceBean
,
1
,
true
));
layout
.
addView
(
getDiningFoodList
(
mContext
,
OrderDetail
.
productMameBeanToOrderDetail
(
0
,
data
.
getPRODUCT_NAME
()),
deviceBean
,
1
,
true
));
layout
.
addView
(
getLine
(
mContext
));
layout
.
addView
(
getLine
(
mContext
));
//訂單金額信息
//訂單金額信息
List
<
PrintBill
Bean
>
billData
=
new
ArrayList
<>();
List
<
PrintBill
Item
>
billData
=
new
ArrayList
<>();
billData
.
add
(
getBillBean
(
"合計:"
,
MONETARY_UNIT
+
MoneyUtil
.
sub
(
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getLunchbox
()),
data
.
getDELIVERY_CHARGE
())));
billData
.
add
(
getBillBean
(
"合計:"
,
MONETARY_UNIT
+
MoneyUtil
.
sub
(
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getLunchbox
()),
data
.
getDELIVERY_CHARGE
())));
if
(
data
.
getLunchbox
()
!=
0
)
{
if
(
data
.
getLunchbox
()
!=
0
)
{
billData
.
add
(
getBillBean
(
"餐盒費:"
,
MONETARY_UNIT
+
data
.
getLunchbox
()));
billData
.
add
(
getBillBean
(
"餐盒費:"
,
MONETARY_UNIT
+
data
.
getLunchbox
()));
...
@@ -95,8 +113,8 @@ public class PrintOtherOrder extends PrinterRoot {
...
@@ -95,8 +113,8 @@ public class PrintOtherOrder extends PrinterRoot {
return
viewToZoomBitmap
(
mContext
,
layout
,
deviceBean
);
return
viewToZoomBitmap
(
mContext
,
layout
,
deviceBean
);
}
}
private
PrintBill
Bean
getBillBean
(
String
title
,
String
value
)
{
private
PrintBill
Item
getBillBean
(
String
title
,
String
value
)
{
return
new
PrintBill
Bean
(
title
,
value
);
return
new
PrintBill
Item
(
title
,
value
);
}
}
}
}
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrderClosing.java
View file @
fb2f2dca
...
@@ -6,6 +6,7 @@ import android.view.LayoutInflater;
...
@@ -6,6 +6,7 @@ import android.view.LayoutInflater;
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.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
...
@@ -18,8 +19,9 @@ import com.gingersoft.gsa.cloud.base.utils.time.TimeUtils;
...
@@ -18,8 +19,9 @@ import com.gingersoft.gsa.cloud.base.utils.time.TimeUtils;
import
com.gingersoft.gsa.cloud.constans.ExpandConstant
;
import
com.gingersoft.gsa.cloud.constans.ExpandConstant
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.gingersoft.gsa.cloud.print.bean.PrintTakeawayCheckoutContent
;
import
com.joe.print.R
;
import
com.joe.print.R
;
import
com.
joe.print.mvp.model.bean.PrintBillBean
;
import
com.
gingersoft.gsa.cloud.print.bean.base.PrintBillItem
;
import
com.joe.print.mvp.ui.adapter.BillItemAdapter
;
import
com.joe.print.mvp.ui.adapter.BillItemAdapter
;
import
com.joe.print.mvp.ui.adapter.OtherOrderAdapter
;
import
com.joe.print.mvp.ui.adapter.OtherOrderAdapter
;
...
@@ -31,11 +33,19 @@ import java.util.Map;
...
@@ -31,11 +33,19 @@ import java.util.Map;
/**
/**
* 打印外賣接單 結賬單
* 打印外賣接單 結賬單
*/
*/
public
class
PrintOtherOrderClosing
extends
PrinterRoot
{
public
class
PrintOtherOrderClosing
extends
PrinterRoot
<
PrintTakeawayCheckoutContent
>
{
private
PrintTakeawayCheckoutContent
mTakeawayCheckoutContent
;
@Override
protected
void
setPrintContent
(
PrintTakeawayCheckoutContent
printContent
)
{
this
.
mTakeawayCheckoutContent
=
printContent
;
}
@Override
@Override
public
Map
<
String
,
List
<
Bitmap
>>
getPrintBitmap
(
Context
mContext
,
PrinterDeviceBean
deviceBean
)
{
public
Map
<
String
,
List
<
Bitmap
>>
getPrintBitmap
(
Context
mContext
,
PrinterDeviceBean
deviceBean
)
{
OrderDetails
.
DataBean
dataBean
=
TakeawayOrder
.
getInstance
().
getShoppingCart
().
getD
ataBean
();
OrderDetails
.
DataBean
dataBean
=
TakeawayOrder
.
getInstance
().
getShoppingCart
().
getD
eliveryAndPickupData
();
if
(
dataBean
!=
null
)
{
if
(
dataBean
!=
null
)
{
Map
<
String
,
List
<
Bitmap
>>
bitmapMaps
=
new
HashMap
<>();
Map
<
String
,
List
<
Bitmap
>>
bitmapMaps
=
new
HashMap
<>();
List
<
Bitmap
>
bitmaps
=
new
ArrayList
<>();
List
<
Bitmap
>
bitmaps
=
new
ArrayList
<>();
...
@@ -48,12 +58,21 @@ public class PrintOtherOrderClosing extends PrinterRoot {
...
@@ -48,12 +58,21 @@ public class PrintOtherOrderClosing extends PrinterRoot {
@Override
@Override
public
String
[]
getPrintDatas
(
Context
mContext
,
PrinterDeviceBean
deviceBean
)
{
public
String
[]
getPrintDatas
(
Context
mContext
,
PrinterDeviceBean
deviceBean
)
{
return
null
;
if
(
mTakeawayCheckoutContent
==
null
)
{
return
new
String
[]{
"<html><body></body></html>"
};
}
String
stringBuilder
=
"<html><body>"
+
getTakewayPrintContent
(
mTakeawayCheckoutContent
,
deviceBean
)
+
"</body></html>"
;
String
[]
pritContent
=
new
String
[
1
];
pritContent
[
0
]
=
stringBuilder
;
return
pritContent
;
}
}
@Override
@Override
public
int
getPrintCount
(
Context
context
)
{
public
int
getPrintCount
(
Context
context
)
{
return
RestaurantExpandInfoUtils
.
getValue
(
ExpandConstant
.
DeliveryClosingPC
,
1
);
return
RestaurantExpandInfoUtils
.
getValue
(
ExpandConstant
.
DeliveryClosingPC
,
1
);
}
}
private
Bitmap
initPrintView
(
Context
context
,
OrderDetails
.
DataBean
data
,
PrinterDeviceBean
deviceBean
)
{
private
Bitmap
initPrintView
(
Context
context
,
OrderDetails
.
DataBean
data
,
PrinterDeviceBean
deviceBean
)
{
...
@@ -98,7 +117,7 @@ public class PrintOtherOrderClosing extends PrinterRoot {
...
@@ -98,7 +117,7 @@ public class PrintOtherOrderClosing extends PrinterRoot {
String
amountUnit
=
context
.
getString
(
R
.
string
.
amount_unit
);
String
amountUnit
=
context
.
getString
(
R
.
string
.
amount_unit
);
RecyclerView
rvBill
=
view
.
findViewById
(
R
.
id
.
rv_bill
);
RecyclerView
rvBill
=
view
.
findViewById
(
R
.
id
.
rv_bill
);
List
<
PrintBill
Bean
>
billData
=
new
ArrayList
<>();
List
<
PrintBill
Item
>
billData
=
new
ArrayList
<>();
billData
.
add
(
getBillBean
(
"合計:"
,
amountUnit
+
MoneyUtil
.
sub
(
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getLunchbox
()),
data
.
getDELIVERY_CHARGE
())));
billData
.
add
(
getBillBean
(
"合計:"
,
amountUnit
+
MoneyUtil
.
sub
(
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getLunchbox
()),
data
.
getDELIVERY_CHARGE
())));
if
(
data
.
getLunchbox
()
!=
0
)
{
if
(
data
.
getLunchbox
()
!=
0
)
{
billData
.
add
(
getBillBean
(
"餐盒費:"
,
amountUnit
+
data
.
getLunchbox
()));
billData
.
add
(
getBillBean
(
"餐盒費:"
,
amountUnit
+
data
.
getLunchbox
()));
...
@@ -197,7 +216,7 @@ public class PrintOtherOrderClosing extends PrinterRoot {
...
@@ -197,7 +216,7 @@ public class PrintOtherOrderClosing extends PrinterRoot {
layout
.
addView
(
getDiningFoodList
(
mContext
,
OrderDetail
.
productMameBeanToOrderDetail
(
1
,
data
.
getPRODUCT_NAME
()),
deviceBean
,
1
,
true
));
layout
.
addView
(
getDiningFoodList
(
mContext
,
OrderDetail
.
productMameBeanToOrderDetail
(
1
,
data
.
getPRODUCT_NAME
()),
deviceBean
,
1
,
true
));
layout
.
addView
(
getLine
(
mContext
));
layout
.
addView
(
getLine
(
mContext
));
//訂單金額信息
//訂單金額信息
List
<
PrintBill
Bean
>
billData
=
new
ArrayList
<>();
List
<
PrintBill
Item
>
billData
=
new
ArrayList
<>();
billData
.
add
(
getBillBean
(
"合計:"
,
MONETARY_UNIT
+
MoneyUtil
.
sub
(
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getLunchbox
()),
data
.
getDELIVERY_CHARGE
())));
billData
.
add
(
getBillBean
(
"合計:"
,
MONETARY_UNIT
+
MoneyUtil
.
sub
(
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getLunchbox
()),
data
.
getDELIVERY_CHARGE
())));
if
(
data
.
getLunchbox
()
!=
0
)
{
if
(
data
.
getLunchbox
()
!=
0
)
{
billData
.
add
(
getBillBean
(
"餐盒費:"
,
MONETARY_UNIT
+
data
.
getLunchbox
()));
billData
.
add
(
getBillBean
(
"餐盒費:"
,
MONETARY_UNIT
+
data
.
getLunchbox
()));
...
@@ -236,8 +255,8 @@ public class PrintOtherOrderClosing extends PrinterRoot {
...
@@ -236,8 +255,8 @@ public class PrintOtherOrderClosing extends PrinterRoot {
return
viewToZoomBitmap
(
mContext
,
layout
,
deviceBean
);
return
viewToZoomBitmap
(
mContext
,
layout
,
deviceBean
);
}
}
private
PrintBill
Bean
getBillBean
(
String
title
,
String
value
)
{
private
PrintBill
Item
getBillBean
(
String
title
,
String
value
)
{
return
new
PrintBill
Bean
(
title
,
value
);
return
new
PrintBill
Item
(
title
,
value
);
}
}
}
}
\ No newline at end of file
print-module/src/main/java/com/joe/print/mvp/print/PrintPrjKitchen.java
View file @
fb2f2dca
...
@@ -197,7 +197,7 @@ public class PrintPrjKitchen extends PrinterRoot {
...
@@ -197,7 +197,7 @@ public class PrintPrjKitchen extends PrinterRoot {
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
htmlLables
.
add
(
new
HtmlLable
(
LABLE_P
,
"-----------------------------------------------------------------"
));
htmlLables
.
add
(
new
HtmlLable
(
getBrLable
()));
htmlLables
.
add
(
new
HtmlLable
(
getBrLable
()));
return
getHtmlLables
(
(
HtmlLable
[])
htmlLables
.
toArray
(
));
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()]
));
}
}
private
String
getHtmlKitchenFood
(
List
<
PrjBean
.
DataBean
.
Bean
>
prjBeans
)
{
private
String
getHtmlKitchenFood
(
List
<
PrjBean
.
DataBean
.
Bean
>
prjBeans
)
{
...
@@ -212,7 +212,7 @@ public class PrintPrjKitchen extends PrinterRoot {
...
@@ -212,7 +212,7 @@ public class PrintPrjKitchen extends PrinterRoot {
}
}
htmlLables
.
add
(
new
HtmlLable
(
getBrLable
()));
htmlLables
.
add
(
new
HtmlLable
(
getBrLable
()));
return
getHtmlLables
(
(
HtmlLable
[])
htmlLables
.
toArray
(
));
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()]
));
}
}
private
String
getHtmlEndInfo
(
PrjBean
.
DataBean
.
Bean
prjBean
)
{
private
String
getHtmlEndInfo
(
PrjBean
.
DataBean
.
Bean
prjBean
)
{
...
@@ -225,7 +225,7 @@ public class PrintPrjKitchen extends PrinterRoot {
...
@@ -225,7 +225,7 @@ public class PrintPrjKitchen extends PrinterRoot {
new
HtmlLable
.
Attributes
(
HtmlContract
.
ATTRIBUTES_FONT_SIZE
,
font_size_prj_page_index
),
new
HtmlLable
.
Attributes
(
HtmlContract
.
ATTRIBUTES_FONT_SIZE
,
font_size_prj_page_index
),
new
HtmlLable
.
Attributes
(
HtmlContract
.
ATTRIBUTES_ALIGN
,
HtmlContract
.
value_align_center
)));
new
HtmlLable
.
Attributes
(
HtmlContract
.
ATTRIBUTES_ALIGN
,
HtmlContract
.
value_align_center
)));
}
}
return
getHtmlLables
(
(
HtmlLable
[])
htmlLables
.
toArray
(
));
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()]
));
}
}
@Override
@Override
...
@@ -411,30 +411,30 @@ public class PrintPrjKitchen extends PrinterRoot {
...
@@ -411,30 +411,30 @@ public class PrintPrjKitchen extends PrinterRoot {
}
}
}
}
private
String
getProductNameByLanguageType
(
PrjBean
.
DataBean
.
Bean
prjBean
)
{
//
private String getProductNameByLanguageType(PrjBean.DataBean.Bean prjBean) {
for
(
String
type
:
languageTypes
)
{
//
for (String type : languageTypes) {
String
languageType
=
type
;
//
String languageType = type;
if
(
languageType
.
contains
(
"."
))
{
//
if (languageType.contains(".")) {
languageType
=
type
.
substring
(
0
,
type
.
indexOf
(
"."
));
//
languageType = type.substring(0, type.indexOf("."));
}
//
}
if
(
languageType
.
equals
(
"2"
))
{
//
if (languageType.equals("2")) {
//語言二
//
//語言二
if
(
TextUtil
.
isNotEmptyOrNullOrUndefined
(
prjBean
.
getProductName2
()))
{
//
if (TextUtil.isNotEmptyOrNullOrUndefined(prjBean.getProductName2())) {
return
prjBean
.
getProductName2
();
//
return prjBean.getProductName2();
}
//
}
}
else
if
(
languageType
.
equals
(
"3"
))
{
//
} else if (languageType.equals("3")) {
//語言三
//
//語言三
if
(
TextUtil
.
isNotEmptyOrNullOrUndefined
(
prjBean
.
getProductName3
()))
{
//
if (TextUtil.isNotEmptyOrNullOrUndefined(prjBean.getProductName3())) {
return
prjBean
.
getProductName3
();
//
return prjBean.getProductName3();
}
//
}
}
else
{
//
} else {
//語言一或其他
//
//語言一或其他
if
(
TextUtil
.
isNotEmptyOrNullOrUndefined
(
prjBean
.
getProductName
()))
{
//
if (TextUtil.isNotEmptyOrNullOrUndefined(prjBean.getProductName())) {
return
prjBean
.
getProductName
();
//
return prjBean.getProductName();
}
//
}
}
//
}
}
//
}
}
//
}
public
static
Map
<
String
,
List
<
PrjBean
.
DataBean
.
Bean
>>
getPrjMap
()
{
public
static
Map
<
String
,
List
<
PrjBean
.
DataBean
.
Bean
>>
getPrjMap
()
{
if
(
prjMap
==
null
)
{
if
(
prjMap
==
null
)
{
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintQRCode.java
View file @
fb2f2dca
...
@@ -17,6 +17,8 @@ import com.joe.print.mvp.model.bean.HtmlLable;
...
@@ -17,6 +17,8 @@ import com.joe.print.mvp.model.bean.HtmlLable;
import
com.joe.print.mvp.print.common.HtmlContract
;
import
com.joe.print.mvp.print.common.HtmlContract
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -55,8 +57,8 @@ public class PrintQRCode extends PrinterRoot<PrintQRCodeContent> {
...
@@ -55,8 +57,8 @@ public class PrintQRCode extends PrinterRoot<PrintQRCodeContent> {
}
}
String
stringBuilder
=
"<html><body>"
+
String
stringBuilder
=
"<html><body>"
+
getHtmlHeadInfo
()
+
getHtmlHeadInfo
()
+
getHtmlQRcode
()
+
getHtmlQRcode
()
getHtmlEndInfo
()
//
getHtmlEndInfo()
+
"</body></html>"
;
+
"</body></html>"
;
String
[]
pritContent
=
new
String
[
1
];
String
[]
pritContent
=
new
String
[
1
];
pritContent
[
0
]
=
stringBuilder
;
pritContent
[
0
]
=
stringBuilder
;
...
@@ -64,31 +66,30 @@ public class PrintQRCode extends PrinterRoot<PrintQRCodeContent> {
...
@@ -64,31 +66,30 @@ public class PrintQRCode extends PrinterRoot<PrintQRCodeContent> {
}
}
private
String
getHtmlHeadInfo
()
{
private
String
getHtmlHeadInfo
()
{
HtmlLable
[]
htmlLables
=
{
List
<
HtmlLable
>
htmlLables
=
new
ArrayList
<>();
new
HtmlLable
(
LABLE_P
,
mQRCodeBean
.
getPrintTableName
(),
new
HtmlLable
.
Attributes
(
HtmlContract
.
ATTRIBUTES_ALIGN
,
HtmlContract
.
value_align_center
)),
htmlLables
.
addAll
(
getRowInformation
(
new
HtmlLable
(
mQRCodeBean
.
getPrintTableName
(),
new
HtmlLable
.
Attributes
(
HtmlContract
.
ATTRIBUTES_ALIGN
,
HtmlContract
.
value_align_center
))));
new
HtmlLable
(
LABLE_P
,
mQRCodeBean
.
getPrintTableName
(),
new
HtmlLable
.
Attributes
(
HtmlContract
.
ATTRIBUTES_ALIGN
,
HtmlContract
.
value_align_center
)),
htmlLables
.
addAll
(
getRowInformation
(
new
HtmlLable
(
mQRCodeBean
.
getPrintTopInfo
(),
new
HtmlLable
.
Attributes
(
HtmlContract
.
ATTRIBUTES_ALIGN
,
HtmlContract
.
value_align_center
))));
new
HtmlLable
(
getBrLable
())};
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()]));
return
getHtmlLables
(
htmlLables
);
}
}
private
String
getHtmlQRcode
()
{
private
String
getHtmlQRcode
()
{
HtmlLable
[]
htmlLables
=
{
HtmlLable
[]
htmlLables
=
{
new
HtmlLable
(
getBrLable
()),
new
HtmlLable
(
LABLE_QRCODE
,
mQRCodeBean
.
getPrintQrcode
(),
new
HtmlLable
(
LABLE_QRCODE
,
mQRCodeBean
.
getPrintQrcode
(),
new
HtmlLable
.
Attributes
(
HtmlContract
.
ATTRIBUTES_ALIGN
,
HtmlContract
.
value_align_center
)),
new
HtmlLable
.
Attributes
(
HtmlContract
.
ATTRIBUTES_SCALE
,
HtmlContract
.
value_scale_1
,
HtmlContract
.
value_type_string
),
new
HtmlLable
.
Attributes
(
HtmlContract
.
ATTRIBUTES_ALIGN
,
HtmlContract
.
value_align_center
)),
new
HtmlLable
(
getBrLable
())};
new
HtmlLable
(
getBrLable
())};
return
getHtmlLables
(
htmlLables
);
return
getHtmlLables
(
htmlLables
);
}
}
private
String
getHtmlEndInfo
()
{
private
String
getHtmlEndInfo
()
{
HtmlLable
[]
htmlLables
=
{
List
<
HtmlLable
>
htmlLables
=
new
ArrayList
<>();
new
HtmlLable
(
LABLE_P
,
mQRCodeBean
.
getPrintTime
()),
htmlLables
.
addAll
(
getRowInformation
(
new
HtmlLable
(
mQRCodeBean
.
getPrintTime
())));
new
HtmlLable
(
LABLE_P
,
mQRCodeBean
.
getPrintPeopleNum
()),
htmlLables
.
addAll
(
getRowInformation
(
new
HtmlLable
(
mQRCodeBean
.
getPrintPeopleNum
())));
new
HtmlLable
(
LABLE_P
,
mQRCodeBean
.
getPrintMealEndTime
()),
htmlLables
.
addAll
(
getRowInformation
(
new
HtmlLable
(
mQRCodeBean
.
getPrintMealEndTime
())));
new
HtmlLable
(
LABLE_P
,
mQRCodeBean
.
getPrintBottonInfo
())}
;
htmlLables
.
addAll
(
getRowInformation
(
new
HtmlLable
(
mQRCodeBean
.
getPrintBottonInfo
())))
;
return
getHtmlLables
(
htmlLables
);
return
getHtmlLables
(
htmlLables
.
toArray
(
new
HtmlLable
[
htmlLables
.
size
()])
);
}
}
@Override
@Override
public
int
getPrintCount
(
Context
context
)
{
public
int
getPrintCount
(
Context
context
)
{
return
1
;
return
1
;
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintSlip.java
View file @
fb2f2dca
...
@@ -7,7 +7,6 @@ import android.widget.LinearLayout;
...
@@ -7,7 +7,6 @@ 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.order.billItem.BillItem
;
import
com.gingersoft.gsa.cloud.base.order.billItem.BillItem
;
import
com.gingersoft.gsa.cloud.base.order.billItem.BillOrderMoney
;
import
com.gingersoft.gsa.cloud.base.order.cart.ShoppingCart
;
import
com.gingersoft.gsa.cloud.base.order.cart.ShoppingCart
;
import
com.gingersoft.gsa.cloud.base.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.base.order.order.DoshokuOrder
;
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintUtils.java
View file @
fb2f2dca
...
@@ -2,6 +2,8 @@ package com.joe.print.mvp.print;
...
@@ -2,6 +2,8 @@ package com.joe.print.mvp.print;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.joe.print.mvp.model.bean.HtmlLable
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -13,7 +15,7 @@ public class PrintUtils {
...
@@ -13,7 +15,7 @@ public class PrintUtils {
//一行42個 17.5
//一行42個 17.5
public
final
static
int
lineLength
=
42
;
public
final
static
int
lineLength
=
42
;
p
rivate
static
int
foodNameSpace
=
20
;
p
ublic
static
int
foodNameSpace
=
20
;
private
static
int
foodNumSpace
=
8
;
private
static
int
foodNumSpace
=
8
;
private
static
int
foodAmountSpace
=
12
;
private
static
int
foodAmountSpace
=
12
;
public
final
static
double
BBPOS_Chinese_Length
=
2.4
;
public
final
static
double
BBPOS_Chinese_Length
=
2.4
;
...
@@ -23,6 +25,7 @@ public class PrintUtils {
...
@@ -23,6 +25,7 @@ public class PrintUtils {
private
static
final
int
food_width_percentage
=
60
;
private
static
final
int
food_width_percentage
=
60
;
private
static
final
int
num_and_amount_percentage
=
40
;
private
static
final
int
num_and_amount_percentage
=
40
;
/**
/**
* @param content 要顯示的內容
* @param content 要顯示的內容
* @param maxLength 字符串最大長度
* @param maxLength 字符串最大長度
...
@@ -217,16 +220,5 @@ public class PrintUtils {
...
@@ -217,16 +220,5 @@ public class PrintUtils {
}
}
}
}
/**
* 獲取BBPos食品行打印信息
* @param name1s
* @param name2s
* @param name3s
* @return
*/
public
static
String
getBBPosFoodLineString
(
List
<
String
>
name1s
,
List
<
String
>
name2s
,
List
<
String
>
name3s
){
}
}
}
print-module/src/main/java/com/joe/print/mvp/print/PrinterRoot.java
View file @
fb2f2dca
This diff is collapsed.
Click to expand it.
print-module/src/main/java/com/joe/print/mvp/print/common/HtmlContract.java
View file @
fb2f2dca
...
@@ -8,6 +8,9 @@ package com.joe.print.mvp.print.common;
...
@@ -8,6 +8,9 @@ package com.joe.print.mvp.print.common;
*/
*/
public
class
HtmlContract
{
public
class
HtmlContract
{
public
static
final
String
LABLE_H2
=
"h2"
;
public
static
final
String
LABLE_H3
=
"h3"
;
public
static
final
String
LABLE_H4
=
"h4"
;
public
static
final
String
LABLE_BR
=
"br"
;
public
static
final
String
LABLE_BR
=
"br"
;
public
static
final
String
LABLE_DIV
=
"div"
;
public
static
final
String
LABLE_DIV
=
"div"
;
public
static
final
String
LABLE_P
=
"p"
;
public
static
final
String
LABLE_P
=
"p"
;
...
@@ -30,7 +33,15 @@ public class HtmlContract {
...
@@ -30,7 +33,15 @@ public class HtmlContract {
public
static
final
String
value_offset_percentage30
=
"0.3"
;
public
static
final
String
value_offset_percentage30
=
"0.3"
;
public
static
final
String
value_offset_percentage35
=
"0.35"
;
public
static
final
String
value_offset_percentage35
=
"0.35"
;
public
static
final
String
value_offset_percentage20
=
"0.2"
;
public
static
final
String
value_offset_percentage20
=
"0.2"
;
public
static
final
String
value_offset_percentage_foodNum
=
"0.6"
;
public
static
final
String
value_scale_1
=
"1"
;
public
static
final
String
value_align_center
=
"center"
;
public
static
final
String
value_align_center
=
"center"
;
public
static
final
String
value_align_right
=
"right"
;
public
static
final
String
value_align_right
=
"right"
;
public
static
final
byte
value_type_default
=
0
;
public
static
final
byte
value_type_string
=
1
;
}
}
print-module/src/main/java/com/joe/print/mvp/print/utils/BBposPrint.java
View file @
fb2f2dca
...
@@ -41,7 +41,7 @@ public class BBposPrint {
...
@@ -41,7 +41,7 @@ public class BBposPrint {
public
void
onNext
(
String
s
)
{
public
void
onNext
(
String
s
)
{
analysisPrintResult
(
s
,
wiseposBean
,
listener
);
analysisPrintResult
(
s
,
wiseposBean
,
listener
);
}
}
// HTML不完整,请确保转义特殊字符
@Override
@Override
public
void
onError
(
Throwable
e
)
{
public
void
onError
(
Throwable
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
print-module/src/main/java/com/joe/print/mvp/ui/adapter/BillItemAdapter.java
View file @
fb2f2dca
...
@@ -5,21 +5,21 @@ import androidx.annotation.Nullable;
...
@@ -5,21 +5,21 @@ 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.joe.print.R
;
import
com.joe.print.R
;
import
com.
joe.print.mvp.model.bean.PrintBillBean
;
import
com.
gingersoft.gsa.cloud.print.bean.base.PrintBillItem
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* Created by Wyh on 2020/1/16.
* Created by Wyh on 2020/1/16.
*/
*/
public
class
BillItemAdapter
extends
BaseQuickAdapter
<
PrintBill
Bean
,
BaseViewHolder
>
{
public
class
BillItemAdapter
extends
BaseQuickAdapter
<
PrintBill
Item
,
BaseViewHolder
>
{
public
BillItemAdapter
(
@Nullable
List
<
PrintBill
Bean
>
data
)
{
public
BillItemAdapter
(
@Nullable
List
<
PrintBill
Item
>
data
)
{
super
(
R
.
layout
.
print_bill_adapter_item_bill
,
data
);
super
(
R
.
layout
.
print_bill_adapter_item_bill
,
data
);
}
}
@Override
@Override
protected
void
convert
(
BaseViewHolder
helper
,
PrintBill
Bean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
PrintBill
Item
item
)
{
helper
.
setText
(
R
.
id
.
print_bill_name
,
item
.
getBillName
());
helper
.
setText
(
R
.
id
.
print_bill_name
,
item
.
getBillName
());
helper
.
setText
(
R
.
id
.
print_bill_value
,
item
.
getBillAmount
());
helper
.
setText
(
R
.
id
.
print_bill_value
,
item
.
getBillAmount
());
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/FineItemAllPresenter.java
View file @
fb2f2dca
...
@@ -6,7 +6,6 @@ import android.content.Context;
...
@@ -6,7 +6,6 @@ import android.content.Context;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.View
;
import
com.gingersoft.gsa.cloud.base.order.cart.ShoppingCart
;
import
com.gingersoft.gsa.cloud.base.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.base.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.base.utils.LanguageUtils
;
import
com.gingersoft.gsa.cloud.base.utils.LanguageUtils
;
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/OrderPayPresenter.java
View file @
fb2f2dca
...
@@ -150,7 +150,6 @@ public class OrderPayPresenter extends BaseOrderPresenter<OrderPayContract.Model
...
@@ -150,7 +150,6 @@ public class OrderPayPresenter extends BaseOrderPresenter<OrderPayContract.Model
String
payRequest
=
GsonUtils
.
GsonString
(
getOrderPayRequest
(
orderPayView
));
String
payRequest
=
GsonUtils
.
GsonString
(
getOrderPayRequest
(
orderPayView
));
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
payRequest
);
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
payRequest
);
String
json
=
GsonUtils
.
GsonString
(
payRequest
);
mModel
.
toOrderPay
(
requestBody
)
mModel
.
toOrderPay
(
requestBody
)
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
Schedulers
.
io
())
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
View file @
fb2f2dca
...
@@ -43,7 +43,6 @@ import com.gingersoft.gsa.cloud.database.bean.Function;
...
@@ -43,7 +43,6 @@ import com.gingersoft.gsa.cloud.database.bean.Function;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
import
com.gingersoft.gsa.cloud.database.utils.FoodComboDaoUtils
;
import
com.gingersoft.gsa.cloud.database.utils.FoodComboDaoUtils
;
import
com.gingersoft.gsa.cloud.database.utils.ModifierDaoUtils
;
import
com.gingersoft.gsa.cloud.database.utils.ModifierDaoUtils
;
import
com.gingersoft.gsa.cloud.function.FunctionManager
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.BaseRetryDialog
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.BaseRetryDialog
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.CommonTipDialog
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.CommonTipDialog
;
import
com.jess.arms.base.DefaultAdapter
;
import
com.jess.arms.base.DefaultAdapter
;
...
...
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