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
84718696
Commit
84718696
authored
Jun 30, 2020
by
Wyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、外賣接單結賬打印(顯示會員信息和積分未完成,需要等待接口)
2、添加編輯打印機邏輯修改 3、登陸頁面鍵盤擋住輸入框問題 4、外賣確認訂單閃退問題修復
parent
c58b0c54
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
326 additions
and
39 deletions
+326
-39
base-module/build.gradle
+1
-1
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/PrintConstans.java
+2
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/PrinterDeviceBean.java
+14
-5
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoMaster.java
+2
-2
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/PrinterDeviceBeanDao.java
+0
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/OrderDetails.kt
+8
-3
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/ui/activity/mvp/ui/activity/LoginActivity.java
+1
-1
login-module/src/main/res/layout/user_login_activity_login.xml
+4
-3
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/OrderClosingBean.kt
+13
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/api/WeatherService.kt
+1
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/PageViewModel.kt
+24
-6
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OrderDetailsActivity.kt
+1
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/PayActivity.kt
+2
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/OtherOrderUtils.kt
+8
-7
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrderClosing.java
+179
-0
print-module/src/main/java/com/joe/print/mvp/print/PrintPrjKitchen.java
+12
-3
print-module/src/main/java/com/joe/print/mvp/print/PrinterRoot.java
+8
-0
print-module/src/main/java/com/joe/print/mvp/ui/activity/PrinterAddActivity.java
+16
-3
print-module/src/main/java/com/joe/print/mvp/ui/adapter/BillItemAdapter.java
+1
-1
print-module/src/main/res/layout/print_bill_adapter_item_bill.xml
+0
-0
print-module/src/main/res/layout/print_confirm_order_view.xml
+29
-1
No files found.
base-module/build.gradle
View file @
84718696
...
@@ -43,7 +43,7 @@ android {
...
@@ -43,7 +43,7 @@ android {
/**
/**
* 版本号
* 版本号
*/
*/
schemaVersion
8
schemaVersion
9
/**
/**
* greendao输出dao的数据库操作实体类文件夹(相对路径 包名+自定义路径名称,包将创建于包名的直接路径下)
* greendao输出dao的数据库操作实体类文件夹(相对路径 包名+自定义路径名称,包将创建于包名的直接路径下)
*/
*/
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/PrintConstans.java
View file @
84718696
...
@@ -24,6 +24,8 @@ public class PrintConstans {
...
@@ -24,6 +24,8 @@ public class PrintConstans {
* 3:廚房單
* 3:廚房單
* 4:打印view
* 4:打印view
* 5:外賣接單打印
* 5:外賣接單打印
* 6:開錢箱
* 7:外賣接單結賬單
*/
*/
public
static
final
String
PRINT_TYPE
=
"type"
;
//打印類型
public
static
final
String
PRINT_TYPE
=
"type"
;
//打印類型
public
static
final
String
PRINT_LOADING
=
"is_show_loading"
;
//是否顯示加載框
public
static
final
String
PRINT_LOADING
=
"is_show_loading"
;
//是否顯示加載框
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/PrinterDeviceBean.java
View file @
84718696
...
@@ -24,6 +24,8 @@ public class PrinterDeviceBean implements Serializable {
...
@@ -24,6 +24,8 @@ public class PrinterDeviceBean implements Serializable {
private
String
name
;
private
String
name
;
private
Integer
restaurantId
;
private
Integer
restaurantId
;
private
String
ip
;
//ip
private
String
ip
;
//ip
private
int
uid
;
private
Integer
port
;
//端口
private
Integer
port
;
//端口
// private int type;//打印機紙張類型 為1時是58mm,否則是88mm
// private int type;//打印機紙張類型 為1時是58mm,否則是88mm
...
@@ -51,9 +53,7 @@ public class PrinterDeviceBean implements Serializable {
...
@@ -51,9 +53,7 @@ public class PrinterDeviceBean implements Serializable {
this
.
id
=
id
;
this
.
id
=
id
;
this
.
restaurantId
=
restaurantId
;
this
.
restaurantId
=
restaurantId
;
this
.
ip
=
ip
;
this
.
ip
=
ip
;
this
.
port
=
port
;
this
.
port
=
port
;
// this.type = type;
}
}
public
PrinterDeviceBean
(
String
name
,
Integer
restaurantId
,
String
ip
,
Integer
port
,
int
type
)
{
public
PrinterDeviceBean
(
String
name
,
Integer
restaurantId
,
String
ip
,
Integer
port
,
int
type
)
{
...
@@ -61,16 +61,16 @@ public class PrinterDeviceBean implements Serializable {
...
@@ -61,16 +61,16 @@ public class PrinterDeviceBean implements Serializable {
this
.
restaurantId
=
restaurantId
;
this
.
restaurantId
=
restaurantId
;
this
.
ip
=
ip
;
this
.
ip
=
ip
;
this
.
port
=
port
;
this
.
port
=
port
;
// this.type = type;
}
}
@Generated
(
hash
=
15762325
5
)
@Generated
(
hash
=
81518214
5
)
public
PrinterDeviceBean
(
int
id
,
Long
dbid
,
String
name
,
Integer
restaurantId
,
String
ip
,
Integer
port
,
Integer
status
,
int
printerModelId
,
String
paperSpecification
,
String
printerName
,
String
model
,
Long
printerDeviceId
,
Long
defaultPrinterDeviceId
)
{
public
PrinterDeviceBean
(
int
id
,
Long
dbid
,
String
name
,
Integer
restaurantId
,
String
ip
,
int
uid
,
Integer
port
,
Integer
status
,
int
printerModelId
,
String
paperSpecification
,
String
printerName
,
String
model
,
Long
printerDeviceId
,
Long
defaultPrinterDeviceId
)
{
this
.
id
=
id
;
this
.
id
=
id
;
this
.
dbid
=
dbid
;
this
.
dbid
=
dbid
;
this
.
name
=
name
;
this
.
name
=
name
;
this
.
restaurantId
=
restaurantId
;
this
.
restaurantId
=
restaurantId
;
this
.
ip
=
ip
;
this
.
ip
=
ip
;
this
.
uid
=
uid
;
this
.
port
=
port
;
this
.
port
=
port
;
this
.
status
=
status
;
this
.
status
=
status
;
this
.
printerModelId
=
printerModelId
;
this
.
printerModelId
=
printerModelId
;
...
@@ -192,4 +192,13 @@ public class PrinterDeviceBean implements Serializable {
...
@@ -192,4 +192,13 @@ public class PrinterDeviceBean implements Serializable {
public
void
setModel
(
String
model
)
{
public
void
setModel
(
String
model
)
{
this
.
model
=
model
;
this
.
model
=
model
;
}
}
public
int
getUid
()
{
return
uid
;
}
public
void
setUid
(
int
uid
)
{
this
.
uid
=
uid
;
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoMaster.java
View file @
84718696
...
@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
...
@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
/**
* Master of DAO (schema version
8
): knows all DAOs.
* Master of DAO (schema version
9
): knows all DAOs.
*/
*/
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
static
final
int
SCHEMA_VERSION
=
8
;
public
static
final
int
SCHEMA_VERSION
=
9
;
/** Creates underlying database table using DAOs. */
/** Creates underlying database table using DAOs. */
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/PrinterDeviceBeanDao.java
View file @
84718696
This diff is collapsed.
Click to expand it.
base-module/src/main/java/com/gingersoft/gsa/cloud/print/bean/OrderDetails.kt
View file @
84718696
...
@@ -80,6 +80,11 @@ class OrderDetails {
...
@@ -80,6 +80,11 @@ class OrderDetails {
var
estimatedTime
:
String
?
=
null
var
estimatedTime
:
String
?
=
null
var
orderStatus
:
Int
=
0
var
orderStatus
:
Int
=
0
var
addPoints
:
Double
=
0
.
toDouble
()
//本次加多少積分
var
oldPoints
:
Double
=
0
.
toDouble
()
//之前有多少積分
var
nowPoints
:
Double
=
0
.
toDouble
()
//現在有多少積分
var
curStat
:
Int
=
0
//訂單已創建 1
var
curStat
:
Int
=
0
//訂單已創建 1
// * * Order Assigned To Delivery Man - 配送員已接單 2
// * * Order Assigned To Delivery Man - 配送員已接單 2
// * * Delivery Man Reached Pickup Point Nearby - 配送員已到達店鋪附近 3
// * * Delivery Man Reached Pickup Point Nearby - 配送員已到達店鋪附近 3
...
@@ -91,7 +96,7 @@ class OrderDetails {
...
@@ -91,7 +96,7 @@ class OrderDetails {
// * * Order Cancelled After Collection - 訂單已取消 - 取餐后 9
// * * Order Cancelled After Collection - 訂單已取消 - 取餐后 9
// * * Order Assigned To Another Delivery Man - 已指派另一位配送員 10
// * * Order Assigned To Another Delivery Man - 已指派另一位配送員 10
class
PRODUCTNAMEBean
:
Serializable
{
class
PRODUCTNAMEBean
:
Serializable
{
/**
/**
* odsId : 1654481
* odsId : 1654481
* PRICE : 760.0
* PRICE : 760.0
...
@@ -108,7 +113,7 @@ class OrderDetails {
...
@@ -108,7 +113,7 @@ class OrderDetails {
var
child
:
List
<
ChildBeanX
>?
=
null
var
child
:
List
<
ChildBeanX
>?
=
null
var
printseting
:
String
?
=
null
var
printseting
:
String
?
=
null
class
ChildBeanX
:
Serializable
{
class
ChildBeanX
:
Serializable
{
/**
/**
* odsId : 1654482
* odsId : 1654482
* PRICE : 0.0
* PRICE : 0.0
...
@@ -125,7 +130,7 @@ class OrderDetails {
...
@@ -125,7 +130,7 @@ class OrderDetails {
var
child
:
List
<
ChildBean
>?
=
null
var
child
:
List
<
ChildBean
>?
=
null
var
printseting
:
String
?
=
null
var
printseting
:
String
?
=
null
class
ChildBean
:
Serializable
{
class
ChildBean
:
Serializable
{
/**
/**
* odsId : 1654488
* odsId : 1654488
* PRICE : 0.0
* PRICE : 0.0
...
...
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/ui/activity/mvp/ui/activity/LoginActivity.java
View file @
84718696
...
@@ -94,7 +94,7 @@ public class LoginActivity extends LoginInterfaceImpl<LoginPresenter> implements
...
@@ -94,7 +94,7 @@ public class LoginActivity extends LoginInterfaceImpl<LoginPresenter> implements
@Override
@Override
public
int
initView
(
@Nullable
Bundle
savedInstanceState
)
{
public
int
initView
(
@Nullable
Bundle
savedInstanceState
)
{
getWindow
().
setSoftInputMode
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_ADJUST_
NOTHING
);
getWindow
().
setSoftInputMode
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_ADJUST_
PAN
);
//SOFT_INPUT_ADJUST_NOTHING
return
R
.
layout
.
user_login_activity_login
;
//如果你不需要框架帮你设置 setContentView(id) 需要自行设置,请返回 0
return
R
.
layout
.
user_login_activity_login
;
//如果你不需要框架帮你设置 setContentView(id) 需要自行设置,请返回 0
}
}
...
...
login-module/src/main/res/layout/user_login_activity_login.xml
View file @
84718696
...
@@ -4,15 +4,14 @@
...
@@ -4,15 +4,14 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/theme_white_color"
android:background=
"@color/theme_white_color"
android:clipChildren=
"true"
android:fillViewport=
"true"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:fillViewport=
"true"
android:paddingLeft=
"@dimen/dp_18"
android:paddingLeft=
"@dimen/dp_18"
android:paddingRight=
"@dimen/dp_18"
>
android:paddingRight=
"@dimen/dp_18"
>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_cont
ent"
>
android:layout_height=
"
match_par
ent"
>
<TextView
<TextView
android:id=
"@+id/login_title"
android:id=
"@+id/login_title"
...
@@ -188,6 +187,8 @@
...
@@ -188,6 +187,8 @@
android:gravity=
"center"
android:gravity=
"center"
android:text=
"登錄"
android:text=
"登錄"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
app:layout_constraintVertical_bias=
"1"
app:layout_constraintTop_toBottomOf=
"@id/rb_auto_login"
android:textSize=
"@dimen/dp_16"
android:textSize=
"@dimen/dp_16"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
app:layout_constraintBottom_toBottomOf=
"parent"
/>
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/OrderClosingBean.kt
0 → 100644
View file @
84718696
package
com.gingersoft.gsa.other_order_mode.data.model.bean
data class
OrderClosingBean
(
var
code
:
String
,
var
data
:
DataX
,
var
errorMsg
:
String
)
{
data class
DataX
(
var
addPoints
:
Double
=
0
.
toDouble
(),
var
nowPoints
:
Double
=
0
.
toDouble
(),
var
oldPoints
:
Double
=
0
.
toDouble
()
)
}
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/network/api/WeatherService.kt
View file @
84718696
...
@@ -28,7 +28,7 @@ interface WeatherService {
...
@@ -28,7 +28,7 @@ interface WeatherService {
fun
updateOrderStatus
(
@Body
requestBody
:
RequestBody
):
Call
<
UpdateOrderBean
>
fun
updateOrderStatus
(
@Body
requestBody
:
RequestBody
):
Call
<
UpdateOrderBean
>
@POST
(
"order/updateOrderStatus"
)
@POST
(
"order/updateOrderStatus"
)
fun
gsUpdateOrderStatus
(
@Body
requestBody
:
RequestBody
):
Call
<
Message
Bean
>
fun
gsUpdateOrderStatus
(
@Body
requestBody
:
RequestBody
):
Call
<
OrderClosing
Bean
>
@POST
(
"gsa/shipAnyOrdersNew"
)
@POST
(
"gsa/shipAnyOrdersNew"
)
fun
thirdDelivery
(
@Body
requestBody
:
RequestBody
):
Call
<
ThirdSend
>
fun
thirdDelivery
(
@Body
requestBody
:
RequestBody
):
Call
<
ThirdSend
>
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/PageViewModel.kt
View file @
84718696
...
@@ -2,7 +2,6 @@ package com.gingersoft.gsa.other_order_mode.model.viewModel
...
@@ -2,7 +2,6 @@ package com.gingersoft.gsa.other_order_mode.model.viewModel
import
android.app.Dialog
import
android.app.Dialog
import
android.content.Context
import
android.content.Context
import
android.util.Log
import
android.view.Gravity
import
android.view.Gravity
import
android.view.WindowManager
import
android.view.WindowManager
import
android.widget.TextView
import
android.widget.TextView
...
@@ -18,8 +17,6 @@ import com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
...
@@ -18,8 +17,6 @@ import com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
import
com.gingersoft.gsa.cloud.base.widget.DialogUtils
import
com.gingersoft.gsa.cloud.base.widget.DialogUtils
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.ui.utils.AppDialog
import
com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.R
import
com.gingersoft.gsa.other_order_mode.data.WeatherRepository
import
com.gingersoft.gsa.other_order_mode.data.WeatherRepository
import
com.gingersoft.gsa.other_order_mode.data.model.bean.*
import
com.gingersoft.gsa.other_order_mode.data.model.bean.*
...
@@ -299,13 +296,19 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
...
@@ -299,13 +296,19 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
})
})
}
}
fun
gsUpdateOrderStatus
(
orderId
:
String
,
orderType
:
Int
,
payTypeId
:
Int
=
0
,
listener
:
(
Int
,
Boolean
)
->
Unit
)
{
fun
gsUpdateOrderStatus
(
orderDetails
:
OrderDetails
.
DataBean
,
payTypeId
:
Int
=
0
,
listener
:
(
Int
,
Boolean
)
->
Unit
)
{
launch
({
launch
({
repository
.
gsUpdateOrderStatus
(
orderId
,
4
,
orderType
,
3
,
""
,
""
,
""
,
"0"
,
""
,
1
,
0
,
payTypeId
).
apply
{
repository
.
gsUpdateOrderStatus
(
orderDetails
.
ID
.
toString
(),
4
,
orderDetails
.
order_type
,
3
,
""
,
""
,
""
,
"0"
,
""
,
1
,
0
,
payTypeId
).
apply
{
listener
.
invoke
(
OrderDelivery
,
code
==
"1"
)
orderDetails
.
payType
=
payTypeId
orderDetails
.
oldPoints
=
data
.
oldPoints
orderDetails
.
nowPoints
=
data
.
nowPoints
orderDetails
.
addPoints
=
data
.
addPoints
printOrderClosing
(
orderDetails
,
listener
)
}
}
},
{
},
{
listener
.
invoke
(
OrderDelivery
,
false
)
listener
.
invoke
(
OrderDelivery
,
false
)
// integralBean.postValue(null)
})
})
}
}
...
@@ -451,6 +454,21 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
...
@@ -451,6 +454,21 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
}
}
/**
/**
* 打印結賬單
*/
private
fun
printOrderClosing
(
dataBean
:
OrderDetails
.
DataBean
,
listener
:
(
Int
,
Boolean
)
->
Unit
)
{
MyOrderManage
.
setDataBean
(
dataBean
)
CC
.
obtainBuilder
(
"Component.Print"
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
7
)
.
setActionName
(
"printActivity"
)
.
build
()
.
callAsyncCallbackOnMainThread
{
_
,
result
->
MyOrderManage
.
setDataBean
(
null
)
listener
.
invoke
(
PrintCode
,
result
.
isSuccess
)
}
}
/**
* 打開錢箱
* 打開錢箱
*/
*/
fun
openCashBox
()
{
fun
openCashBox
()
{
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OrderDetailsActivity.kt
View file @
84718696
...
@@ -173,7 +173,7 @@ class OrderDetailsActivity : BaseActivity() {
...
@@ -173,7 +173,7 @@ class OrderDetailsActivity : BaseActivity() {
BtnBuilder
.
closingBtn
->
{
BtnBuilder
.
closingBtn
->
{
//如果是在線支付的訂單,就直接修改訂單狀態
//如果是在線支付的訂單,就直接修改訂單狀態
if
(
orderPayType
!=
1
)
{
if
(
orderPayType
!=
1
)
{
gsUpdateOrderStatus
(
orderDetails
.
ID
.
toString
()
,
orderDetails
.
order_type
)
{
status
,
isSuccess
->
gsUpdateOrderStatus
(
orderDetails
,
orderDetails
.
order_type
)
{
status
,
isSuccess
->
if
(
isSuccess
)
{
if
(
isSuccess
)
{
finish
()
finish
()
}
else
{
}
else
{
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/PayActivity.kt
View file @
84718696
...
@@ -62,6 +62,7 @@ class PayActivity : BaseActivity() {
...
@@ -62,6 +62,7 @@ class PayActivity : BaseActivity() {
// other_pay_view.loadInfo(this, PayTypeInfo.getPayMethodByPayType(it), MoneyUtil.sub(orderDetails.TOTAL_AMOUNT!!.toDouble(), orderDetails.discount_amount), foodCount)
// other_pay_view.loadInfo(this, PayTypeInfo.getPayMethodByPayType(it), MoneyUtil.sub(orderDetails.TOTAL_AMOUNT!!.toDouble(), orderDetails.discount_amount), foodCount)
other_pay_view
.
notifyBillMethodAdapter
(
PayTypeInfo
.
getPayMethodByPayType
(
it
))
other_pay_view
.
notifyBillMethodAdapter
(
PayTypeInfo
.
getPayMethodByPayType
(
it
))
})
})
other_pay_view
.
setmOnSureClickLisenter
{
payMethods
->
other_pay_view
.
setmOnSureClickLisenter
{
payMethods
->
//確認結賬,調用結賬接口
//確認結賬,調用結賬接口
object
:
DialogUtils
(
this
,
R
.
layout
.
other_order_pause_orders
)
{
object
:
DialogUtils
(
this
,
R
.
layout
.
other_order_pause_orders
)
{
...
@@ -70,7 +71,7 @@ class PayActivity : BaseActivity() {
...
@@ -70,7 +71,7 @@ class PayActivity : BaseActivity() {
hepler
.
getView
<
TextView
>(
R
.
id
.
tv_dialog_confirm
).
setOnClickListener
{
hepler
.
getView
<
TextView
>(
R
.
id
.
tv_dialog_confirm
).
setOnClickListener
{
dialog
.
dismiss
()
dialog
.
dismiss
()
showLoading
()
showLoading
()
pageViewModel
.
gsUpdateOrderStatus
(
orderDetails
.
ID
.
toString
(),
orderDetails
.
order_type
,
payMethods
[
0
].
id
)
{
status
,
isSuccess
->
pageViewModel
.
gsUpdateOrderStatus
(
orderDetails
,
payMethods
[
0
].
id
)
{
_
,
_
->
cancelDialogForLoading
()
cancelDialogForLoading
()
setResult
(
RESULT_OK
)
setResult
(
RESULT_OK
)
finish
()
finish
()
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/OtherOrderUtils.kt
View file @
84718696
...
@@ -5,6 +5,7 @@ import android.content.Context
...
@@ -5,6 +5,7 @@ import android.content.Context
import
android.view.View
import
android.view.View
import
android.widget.ImageView
import
android.widget.ImageView
import
android.widget.TextView
import
android.widget.TextView
import
androidx.core.content.ContextCompat
import
androidx.databinding.DataBindingUtil
import
androidx.databinding.DataBindingUtil
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView
...
@@ -29,7 +30,7 @@ object OtherOrderUtils {
...
@@ -29,7 +30,7 @@ object OtherOrderUtils {
layoutOrderInfoDialogBinding
.
totalAmount
=
orderData
.
TOTAL_AMOUNT
!!
.
toDouble
()
layoutOrderInfoDialogBinding
.
totalAmount
=
orderData
.
TOTAL_AMOUNT
!!
.
toDouble
()
//是歷史訂單,就不顯示訂單狀態
//是歷史訂單,就不顯示訂單狀態
layoutOrderInfoDialogBinding
.
isHistory
=
isHistory
layoutOrderInfoDialogBinding
.
isHistory
=
isHistory
var
btnContent
=
""
var
btnContent
=
""
var
cancelBtnContent
=
""
var
cancelBtnContent
=
""
val
type
=
if
(
orderType
==
7
)
"自取"
else
"外送"
val
type
=
if
(
orderType
==
7
)
"自取"
else
"外送"
...
@@ -40,7 +41,7 @@ object OtherOrderUtils {
...
@@ -40,7 +41,7 @@ object OtherOrderUtils {
if
(
orderType
==
7
)
{
if
(
orderType
==
7
)
{
//自取
//自取
btnContent
=
"製作完成"
btnContent
=
"製作完成"
tvStatus
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
order_state0_color
))
tvStatus
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
order_state0_color
))
cancelBtnContent
=
"取消訂單"
cancelBtnContent
=
"取消訂單"
}
else
{
}
else
{
if
(
orderData
.
isDelete
==
0
)
{
if
(
orderData
.
isDelete
==
0
)
{
...
@@ -50,7 +51,7 @@ object OtherOrderUtils {
...
@@ -50,7 +51,7 @@ object OtherOrderUtils {
btnContent
=
"指派送貨"
btnContent
=
"指派送貨"
cancelBtnContent
=
"取消訂單"
cancelBtnContent
=
"取消訂單"
}
}
tvStatus
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
order_state1_color
))
tvStatus
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
order_state1_color
))
}
}
orderStatus
=
"製作中"
orderStatus
=
"製作中"
}
}
...
@@ -59,20 +60,20 @@ object OtherOrderUtils {
...
@@ -59,20 +60,20 @@ object OtherOrderUtils {
if
(
orderType
==
7
)
{
if
(
orderType
==
7
)
{
//自取
//自取
orderStatus
=
"待取餐"
orderStatus
=
"待取餐"
tvStatus
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
order_state3_color
))
tvStatus
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
order_state3_color
))
}
else
{
}
else
{
if
(
orderData
.
isDelete
==
0
)
{
if
(
orderData
.
isDelete
==
0
)
{
//如果是第三方物流,不顯示結賬按鈕
//如果是第三方物流,不顯示結賬按鈕
btnContent
=
"重印"
btnContent
=
"重印"
}
}
orderStatus
=
"派送中"
orderStatus
=
"派送中"
tvStatus
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
order_state2_color
))
tvStatus
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
order_state2_color
))
}
}
}
}
else
->
{
else
->
{
btnContent
=
"確認訂單"
btnContent
=
"確認訂單"
orderStatus
=
"待確認"
orderStatus
=
"待確認"
tvStatus
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
order_state0_color
))
tvStatus
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
order_state0_color
))
cancelBtnContent
=
"取消訂單"
cancelBtnContent
=
"取消訂單"
}
}
}
}
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrderClosing.java
0 → 100644
View file @
84718696
package
com
.
joe
.
print
.
mvp
.
print
;
import
android.content.Context
;
import
android.graphics.Bitmap
;
import
android.view.LayoutInflater
;
import
android.view.View
;
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.mealManage.MyOrderManage
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.constans.ExpandConstant
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
import
com.gingersoft.gsa.cloud.database.utils.ExpandInfoDaoUtils
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.joe.print.R
;
import
com.joe.print.mvp.model.bean.PrintBillBean
;
import
com.joe.print.mvp.ui.adapter.BillItemAdapter
;
import
com.joe.print.mvp.ui.adapter.OtherOrderAdapter
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 打印外賣接單結賬單
*/
public
class
PrintOtherOrderClosing
extends
PrinterRoot
{
@Override
public
Map
<
String
,
List
<
Bitmap
>>
getPrintBitmap
(
Context
mContext
)
{
OrderDetails
.
DataBean
dataBean
=
MyOrderManage
.
getDataBean
();
if
(
dataBean
!=
null
)
{
Map
<
String
,
List
<
Bitmap
>>
bitmapMaps
=
new
HashMap
<>();
List
<
Bitmap
>
bitmaps
=
new
ArrayList
<>();
bitmaps
.
add
(
initPrintView
(
mContext
,
dataBean
));
bitmapMaps
.
put
(
""
,
bitmaps
);
return
bitmapMaps
;
}
return
null
;
}
@Override
public
int
getPrintCount
(
Context
context
)
{
ExpandInfoDaoUtils
expandInfoDaoUtils
=
new
ExpandInfoDaoUtils
(
context
);
List
<
ExpandInfo
>
expandInfos
=
expandInfoDaoUtils
.
queryAllExpandInfo
();
int
printCount
=
1
;
if
(
expandInfos
!=
null
)
{
for
(
ExpandInfo
expandInfo
:
expandInfos
)
{
if
(
expandInfo
.
getSettingName
().
equals
(
ExpandConstant
.
DeliveryPrintCount
))
{
printCount
=
expandInfo
.
getValueInt
();
}
}
}
return
printCount
;
}
private
Bitmap
initPrintView
(
Context
context
,
OrderDetails
.
DataBean
data
)
{
View
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
print_confirm_order_view
,
null
,
false
);
TextView
tvNowPoint
=
view
.
findViewById
(
R
.
id
.
tv_nowPoints
);
TextView
tvAddPoints
=
view
.
findViewById
(
R
.
id
.
tv_addPoints
);
TextView
tvOldPoints
=
view
.
findViewById
(
R
.
id
.
tv_oldPoints
);
//品牌名
setText
(
view
,
R
.
id
.
tv_brand_name
,
GsaCloudApplication
.
getBrandName
(
context
));
//餐廳名
setText
(
view
,
R
.
id
.
tv_restaurant_name
,
GsaCloudApplication
.
getRestaurantName
(
context
));
// 訂單類型
setText
(
view
,
R
.
id
.
tv_order_type
,
data
.
getOrder_type
()
==
2
?
"外送"
:
"自取"
);
// 訂單號
setText
(
view
,
R
.
id
.
tv_order_number
,
"單號:"
+
data
.
getORDER_NO
());
if
(
data
.
getTakeFoodCode
()
!=
null
&&
!
data
.
getTakeFoodCode
().
equals
(
"0"
))
{
setText
(
view
,
R
.
id
.
tv_order_take_food_code
,
"取餐碼:#"
+
data
.
getTakeFoodCode
());
}
else
{
view
.
findViewById
(
R
.
id
.
tv_order_take_food_code
).
setVisibility
(
View
.
GONE
);
}
//訂單創建時間
setText
(
view
,
R
.
id
.
tv_order_create
,
context
.
getString
(
R
.
string
.
create_order_time
)
+
TimeUtils
.
parseTimeRepeat
(
data
.
getCREATE_TIME
(),
TimeUtils
.
DEFAULT_DATE_FORMAT
));
String
amountUnit
=
context
.
getString
(
R
.
string
.
amount_unit
);
RecyclerView
rvBill
=
view
.
findViewById
(
R
.
id
.
rv_bill
);
List
<
PrintBillBean
>
billData
=
new
ArrayList
<>();
billData
.
add
(
getBillBean
(
"合計:"
,
amountUnit
+
MoneyUtil
.
sub
(
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getLunchbox
()),
data
.
getDELIVERY_CHARGE
())));
if
(
data
.
getLunchbox
()
!=
0
)
{
billData
.
add
(
getBillBean
(
"餐盒費:"
,
amountUnit
+
data
.
getLunchbox
()));
}
if
(
data
.
getDELIVERY_CHARGE
()
!=
0
)
{
billData
.
add
(
getBillBean
(
"送貨費:"
,
amountUnit
+
data
.
getDELIVERY_CHARGE
()));
}
if
(
data
.
getCouponList
()
!=
null
&&
data
.
getCouponList
().
size
()
>
0
)
{
for
(
OrderDetails
.
DataBean
.
CouponBean
coupon
:
data
.
getCouponList
())
{
billData
.
add
(
getBillBean
(
coupon
.
getCouponName
()
+
":"
,
"-$"
+
coupon
.
getDiscount_amount
()));
}
}
BillItemAdapter
adapter
=
new
BillItemAdapter
(
billData
);
rvBill
.
setLayoutManager
(
new
LinearLayoutManager
(
context
));
rvBill
.
setAdapter
(
adapter
);
//總金額
setText
(
view
,
R
.
id
.
tv_total
,
amountUnit
+
data
.
getTOTAL_AMOUNT
());
//支付金額
setText
(
view
,
R
.
id
.
tv_pay_amount_text
,
"支付金額:"
+
amountUnit
+
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getDiscount_amount
()));
//支付類型:貨到付款,在線支付
String
payType
=
""
;
if
(
data
.
getPayType
()
==
1
)
{
payType
=
":積分支付"
;
}
else
if
(
data
.
getPayType
()
==
2
)
{
payType
=
":支付寶"
;
}
else
if
(
data
.
getPayType
()
==
3
)
{
payType
=
":财付通"
;
}
else
if
(
data
.
getPayType
()
==
4
)
{
payType
=
":微信支付"
;
}
else
if
(
data
.
getPayType
()
==
5
)
{
payType
=
":貨到付款"
;
}
else
if
(
data
.
getPayType
()
==
6
)
{
payType
=
":其他支付"
;
}
if
(
data
.
getOrderPayType
()
==
1
)
{
//貨到付款
setText
(
view
,
R
.
id
.
tv_pay_type
,
"貨到付款"
);
}
else
{
setText
(
view
,
R
.
id
.
tv_pay_type
,
"在線支付"
+
payType
);
}
//收貨時間
setText
(
view
,
R
.
id
.
tv_delivery_time
,
data
.
getOrder_type
()
==
2
?
data
.
getSEND_TIME
()
:
data
.
getTakeTime
());
if
(
data
.
getOrder_type
()
!=
2
)
{
//自取,隱藏地址和收貨人
view
.
findViewById
(
R
.
id
.
tv_address
).
setVisibility
(
View
.
GONE
);
view
.
findViewById
(
R
.
id
.
tv_receiver
).
setVisibility
(
View
.
GONE
);
}
else
{
//收貨地址
setText
(
view
,
R
.
id
.
tv_address
,
context
.
getString
(
R
.
string
.
address
)
+
data
.
getAddressDetail
());
//收貨人
setText
(
view
,
R
.
id
.
tv_receiver
,
"收貨人:"
+
data
.
getRECEIVER
());
}
//手機號
setText
(
view
,
R
.
id
.
tv_phone
,
"手機號:"
+
data
.
getPHONE
());
//備註
if
(
data
.
getRemark
()
!=
null
&&
!
data
.
getRemark
().
isEmpty
())
{
setText
(
view
,
R
.
id
.
tv_remark
,
"備註:"
+
data
.
getRemark
());
view
.
findViewById
(
R
.
id
.
tv_remark
).
setVisibility
(
View
.
VISIBLE
);
}
else
{
view
.
findViewById
(
R
.
id
.
tv_remark
).
setVisibility
(
View
.
GONE
);
}
if
(
data
.
getPRODUCT_NAME
()
!=
null
)
{
RecyclerView
rvFoodList
=
view
.
findViewById
(
R
.
id
.
rv_order_print_food
);
rvFoodList
.
setLayoutManager
(
new
LinearLayoutManager
(
context
));
rvFoodList
.
setAdapter
(
new
OtherOrderAdapter
(
context
,
data
.
getPRODUCT_NAME
(),
true
));
}
if
(
data
.
getAddPoints
()
!=
0
||
data
.
getOldPoints
()
!=
0
||
data
.
getAddPoints
()
!=
0
)
{
tvAddPoints
.
setText
(
""
+
data
.
getNowPoints
());
tvNowPoint
.
setText
(
""
+
data
.
getOldPoints
());
tvOldPoints
.
setText
(
""
+
data
.
getAddPoints
());
tvAddPoints
.
setVisibility
(
View
.
VISIBLE
);
tvNowPoint
.
setVisibility
(
View
.
VISIBLE
);
tvOldPoints
.
setVisibility
(
View
.
VISIBLE
);
}
return
viewToBitmap
(
context
,
view
);
}
private
PrintBillBean
getBillBean
(
String
title
,
String
value
)
{
return
new
PrintBillBean
(
title
,
value
);
}
private
void
setAmount
(
Double
data
,
TextView
tvText
,
TextView
tvAmount
,
String
amountUnit
)
{
if
(
data
<=
0
)
{
tvText
.
setVisibility
(
View
.
GONE
);
tvAmount
.
setVisibility
(
View
.
GONE
);
}
else
{
tvText
.
setVisibility
(
View
.
VISIBLE
);
tvAmount
.
setVisibility
(
View
.
VISIBLE
);
tvAmount
.
setText
(
amountUnit
+
data
.
toString
());
}
}
}
\ No newline at end of file
print-module/src/main/java/com/joe/print/mvp/print/PrintPrjKitchen.java
View file @
84718696
...
@@ -110,8 +110,6 @@ public class PrintPrjKitchen extends PrinterRoot {
...
@@ -110,8 +110,6 @@ public class PrintPrjKitchen extends PrinterRoot {
tvKitChenLocation
.
setVisibility
(
View
.
GONE
);
tvKitChenLocation
.
setVisibility
(
View
.
GONE
);
}
}
}
}
if
(
OpenTableManage
.
getDefault
().
getTableBean
()
!=
null
)
{
//台號
tvTableNumber
.
setText
(
data
.
get
(
0
).
getTableName
());
tvTableNumber
.
setText
(
data
.
get
(
0
).
getTableName
());
tvTableNumber2
.
setText
(
data
.
get
(
0
).
getTableName
());
tvTableNumber2
.
setText
(
data
.
get
(
0
).
getTableName
());
//人數
//人數
...
@@ -120,7 +118,18 @@ public class PrintPrjKitchen extends PrinterRoot {
...
@@ -120,7 +118,18 @@ public class PrintPrjKitchen extends PrinterRoot {
tvOrderNumber
.
setText
(
data
.
get
(
0
).
getOrderNo
());
tvOrderNumber
.
setText
(
data
.
get
(
0
).
getOrderNo
());
//開台時間
//開台時間
tvOpeningTime
.
setText
(
TimeUtils
.
parseTimeRepeat
(
data
.
get
(
0
).
getOrderDetailsTime
(),
TimeUtils
.
DEFAULT_DATE_FORMAT
));
tvOpeningTime
.
setText
(
TimeUtils
.
parseTimeRepeat
(
data
.
get
(
0
).
getOrderDetailsTime
(),
TimeUtils
.
DEFAULT_DATE_FORMAT
));
}
// if (OpenTableManage.getDefault().getTableBean() != null) {
// //台號
// tvTableNumber.setText(data.get(0).getTableName());
// tvTableNumber2.setText(data.get(0).getTableName());
// //人數
// tvPeople.setText(data.get(0).getPerson() + "");
// //訂單號
// tvOrderNumber.setText(data.get(0).getOrderNo());
// //開台時間
// tvOpeningTime.setText(TimeUtils.parseTimeRepeat(data.get(0).getOrderDetailsTime(), TimeUtils.DEFAULT_DATE_FORMAT));
// }
//落單時間,為當前時間
//落單時間,為當前時間
tvOrderTime
.
setText
(
TimeUtils
.
getCurrentTimeInString
(
TimeUtils
.
DEFAULT_DATE_FORMAT
));
tvOrderTime
.
setText
(
TimeUtils
.
getCurrentTimeInString
(
TimeUtils
.
DEFAULT_DATE_FORMAT
));
//操作人員
//操作人員
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrinterRoot.java
View file @
84718696
...
@@ -60,6 +60,7 @@ public abstract class PrinterRoot implements PrintSocketHolder.OnStateChangedLis
...
@@ -60,6 +60,7 @@ public abstract class PrinterRoot implements PrintSocketHolder.OnStateChangedLis
public
final
static
int
PRINT_CLEAN_MACHINE
=
4
;
//清機報表
public
final
static
int
PRINT_CLEAN_MACHINE
=
4
;
//清機報表
public
final
static
int
PRINT_OTHER_ORDER
=
5
;
//接單內容打印
public
final
static
int
PRINT_OTHER_ORDER
=
5
;
//接單內容打印
public
final
static
int
PRINT_INSTRUCTION
=
6
;
//開錢箱
public
final
static
int
PRINT_INSTRUCTION
=
6
;
//開錢箱
public
final
static
int
PRINT_OTHER_CLOSING
=
7
;
//外賣結賬單
private
final
static
int
SUNMI_PAPER_WIDTH
=
360
;
//商米打印機紙張寬度
private
final
static
int
SUNMI_PAPER_WIDTH
=
360
;
//商米打印機紙張寬度
private
final
static
int
N5_PAPER_WIDTH
=
500
;
//N5打印機紙張寬度
private
final
static
int
N5_PAPER_WIDTH
=
500
;
//N5打印機紙張寬度
...
@@ -89,6 +90,8 @@ public abstract class PrinterRoot implements PrintSocketHolder.OnStateChangedLis
...
@@ -89,6 +90,8 @@ public abstract class PrinterRoot implements PrintSocketHolder.OnStateChangedLis
return
new
PrintOtherOrder
();
return
new
PrintOtherOrder
();
}
else
if
(
type
==
PRINT_INSTRUCTION
)
{
}
else
if
(
type
==
PRINT_INSTRUCTION
)
{
return
new
PrintInstruction
();
return
new
PrintInstruction
();
}
else
if
(
type
==
PRINT_OTHER_CLOSING
)
{
return
new
PrintOtherOrderClosing
();
}
}
return
null
;
return
null
;
}
}
...
@@ -107,6 +110,7 @@ public abstract class PrinterRoot implements PrintSocketHolder.OnStateChangedLis
...
@@ -107,6 +110,7 @@ public abstract class PrinterRoot implements PrintSocketHolder.OnStateChangedLis
((
TextView
)
parentView
.
findViewById
(
viewId
)).
setText
(
text
);
((
TextView
)
parentView
.
findViewById
(
viewId
)).
setText
(
text
);
}
}
/**
/**
* 把Map中Key相同,则各个value添加到一起,汇总值
* 把Map中Key相同,则各个value添加到一起,汇总值
* 把partMap数据合并放到resultMap中。
* 把partMap数据合并放到resultMap中。
...
@@ -143,6 +147,10 @@ public abstract class PrinterRoot implements PrintSocketHolder.OnStateChangedLis
...
@@ -143,6 +147,10 @@ public abstract class PrinterRoot implements PrintSocketHolder.OnStateChangedLis
executor
.
doPrinterRequestAsync
(
new
OpenCashBoxMaker
());
executor
.
doPrinterRequestAsync
(
new
OpenCashBoxMaker
());
}
else
{
}
else
{
listMap
=
getPrintBitmap
(
mContext
);
listMap
=
getPrintBitmap
(
mContext
);
if
(
listMap
==
null
)
{
printListener
.
printFile
();
return
;
}
printSize
=
listMap
.
size
();
printSize
=
listMap
.
size
();
printCount
=
getPrintCount
(
mContext
);
printCount
=
getPrintCount
(
mContext
);
if
(
printSize
<=
0
)
{
if
(
printSize
<=
0
)
{
...
...
print-module/src/main/java/com/joe/print/mvp/ui/activity/PrinterAddActivity.java
View file @
84718696
...
@@ -344,19 +344,32 @@ public class PrinterAddActivity extends BaseActivity<PrinterAddPresenter> implem
...
@@ -344,19 +344,32 @@ public class PrinterAddActivity extends BaseActivity<PrinterAddPresenter> implem
String
port
=
etPort
.
getText
().
toString
();
String
port
=
etPort
.
getText
().
toString
();
PrinterDeviceBean
deviceBean
;
PrinterDeviceBean
deviceBean
;
if
(
printerDeviceBean
!=
null
)
{
deviceBean
=
printerDeviceBean
;
}
else
{
deviceBean
=
new
PrinterDeviceBean
();
}
deviceBean
.
setPrinterName
(
mEdPrintName
.
getText
().
toString
().
trim
());
deviceBean
.
setId
(
0
);
deviceBean
.
setRestaurantId
(
GsaCloudApplication
.
getRestaurantId
(
mContext
));
deviceBean
.
setIp
(
ipAddress
.
substring
(
0
,
ipAddress
.
lastIndexOf
(
"."
)));
if
(
TextUtil
.
isEmptyOrNullOrUndefined
(
port
))
{
if
(
TextUtil
.
isEmptyOrNullOrUndefined
(
port
))
{
deviceBean
=
new
PrinterDeviceBean
(
mEdPrintName
.
getText
().
toString
().
trim
(),
0
,
GsaCloudApplication
.
getRestaurantId
(
mContext
),
ipAddress
.
substring
(
0
,
ipAddress
.
lastIndexOf
(
"."
)),
9100
,
paperType
);
deviceBean
.
setPort
(
9100
);
}
else
{
}
else
{
deviceBean
=
new
PrinterDeviceBean
(
mEdPrintName
.
getText
().
toString
().
trim
(),
0
,
GsaCloudApplication
.
getRestaurantId
(
mContext
),
ipAddress
.
substring
(
0
,
ipAddress
.
lastIndexOf
(
"."
)),
Integer
.
parseInt
(
port
),
paperType
);
deviceBean
.
setPort
(
Integer
.
parseInt
(
port
)
);
}
}
//飛單打印機
if
(
oneFailPosition
!=
-
1
)
{
if
(
oneFailPosition
!=
-
1
)
{
deviceBean
.
setPrinterDeviceId
((
long
)
devicess
.
get
(
oneFailPosition
).
getId
());
deviceBean
.
setPrinterDeviceId
((
long
)
devicess
.
get
(
oneFailPosition
).
getId
());
}
}
if
(
twoFailPosition
!=
-
1
)
{
if
(
twoFailPosition
!=
-
1
)
{
deviceBean
.
setDefaultPrinterDeviceId
((
long
)
devicess
.
get
(
twoFailPosition
).
getId
());
deviceBean
.
setDefaultPrinterDeviceId
((
long
)
devicess
.
get
(
twoFailPosition
).
getId
());
}
}
//是否默認
deviceBean
.
setStatus
(
mSwitchDefalute
.
isChecked
()
?
2
:
1
);
deviceBean
.
setStatus
(
mSwitchDefalute
.
isChecked
()
?
2
:
1
);
//打印機機型ID
//打印機機型
if
(
modelPosition
<
0
)
{
if
(
modelPosition
<
0
)
{
if
(
printerDeviceBean
!=
null
)
{
if
(
printerDeviceBean
!=
null
)
{
deviceBean
.
setPrinterModelId
(
printerDeviceBean
.
getPrinterModelId
());
deviceBean
.
setPrinterModelId
(
printerDeviceBean
.
getPrinterModelId
());
...
...
print-module/src/main/java/com/joe/print/mvp/ui/adapter/BillItemAdapter.java
View file @
84718696
...
@@ -15,7 +15,7 @@ import java.util.List;
...
@@ -15,7 +15,7 @@ import java.util.List;
public
class
BillItemAdapter
extends
BaseQuickAdapter
<
PrintBillBean
,
BaseViewHolder
>
{
public
class
BillItemAdapter
extends
BaseQuickAdapter
<
PrintBillBean
,
BaseViewHolder
>
{
public
BillItemAdapter
(
@Nullable
List
<
PrintBillBean
>
data
)
{
public
BillItemAdapter
(
@Nullable
List
<
PrintBillBean
>
data
)
{
super
(
R
.
layout
.
print_item_bill
,
data
);
super
(
R
.
layout
.
print_
bill_adapter_
item_bill
,
data
);
}
}
@Override
@Override
...
...
print-module/src/main/res/layout/print_item_bill.xml
→
print-module/src/main/res/layout/print_
bill_adapter_
item_bill.xml
View file @
84718696
File moved
print-module/src/main/res/layout/print_confirm_order_view.xml
View file @
84718696
...
@@ -237,11 +237,39 @@
...
@@ -237,11 +237,39 @@
android:text=
"手機號:"
/>
android:text=
"手機號:"
/>
<TextView
<TextView
android:id=
"@+id/tv_oldPoints"
style=
"@style/print_other_order_twenty_six_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"上次積分:"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/tv_nowPoints"
style=
"@style/print_other_order_twenty_six_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"現在積分:"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/tv_addPoints"
style=
"@style/print_other_order_twenty_six_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"本次增加:"
android:visibility=
"gone"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
android:text=
"@string/print_split_line"
android:textColor=
"@color/theme_333_color"
/>
android:textColor=
"@color/theme_333_color"
android:visibility=
"visible"
/>
<TextView
<TextView
style=
"@style/print_other_order_twenty_six_style"
style=
"@style/print_other_order_twenty_six_style"
...
...
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