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
ea4cdbc5
Commit
ea4cdbc5
authored
Sep 23, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、使用會員未送單,結賬前先送單
parent
9f8088c0
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
498 additions
and
207 deletions
+498
-207
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
+10
-4
base-module/src/main/java/com/gingersoft/gsa/cloud/base/common/bean/table/TableBean.java
+3
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/FileUtils.java
+14
-7
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/contract/TableContract.java
+2
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/cart/ShoppingCart.java
+13
-7
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/constant/OrderConentActionConstant.java
+2
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/constant/TableActionConstant.java
+2
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/discount/CouponDiscount.java
+3
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/discount/MemberDiscount.java
+3
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/discount/NomalDiscount.java
+3
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/MoveTableAction.java
+32
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/PrintServingPaperAction.java
+50
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/PrintSkyOrderAction.java
+36
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/ResetTableAction.java
+34
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/SplitTableAction.java
+29
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/SplitTableStrategy.java
+13
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/TableActionStrategy.java
+46
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/AllTablePresenter.java
+7
-7
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
+5
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/MealStandPresenter.java
+0
-32
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/OrderContentPresenter.java
+2
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/StateTablePresenter.java
+7
-7
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
+137
-53
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderContentActivity.java
+10
-10
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/TableActivity.java
+35
-70
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
View file @
ea4cdbc5
...
@@ -8,8 +8,6 @@ import android.content.res.Configuration;
...
@@ -8,8 +8,6 @@ import android.content.res.Configuration;
import
android.os.Build
;
import
android.os.Build
;
import
android.os.RemoteException
;
import
android.os.RemoteException
;
import
androidx.annotation.NonNull
;
import
com.billy.cc.core.component.CC
;
import
com.billy.cc.core.component.CC
;
import
com.elvishew.xlog.LogConfiguration
;
import
com.elvishew.xlog.LogConfiguration
;
import
com.elvishew.xlog.LogLevel
;
import
com.elvishew.xlog.LogLevel
;
...
@@ -47,6 +45,11 @@ import com.scwang.smartrefresh.layout.header.ClassicsHeader;
...
@@ -47,6 +45,11 @@ import com.scwang.smartrefresh.layout.header.ClassicsHeader;
import
java.util.List
;
import
java.util.List
;
import
java.util.Locale
;
import
java.util.Locale
;
import
androidx.annotation.NonNull
;
import
io.reactivex.Observable
;
import
io.reactivex.ObservableEmitter
;
import
io.reactivex.ObservableOnSubscribe
;
import
io.reactivex.schedulers.Schedulers
;
import
me.jessyan.autosize.AutoSize
;
import
me.jessyan.autosize.AutoSize
;
import
me.jessyan.autosize.AutoSizeConfig
;
import
me.jessyan.autosize.AutoSizeConfig
;
import
me.jessyan.autosize.onAdaptListener
;
import
me.jessyan.autosize.onAdaptListener
;
...
@@ -140,13 +143,16 @@ public class GsaCloudApplication extends BaseApplication {
...
@@ -140,13 +143,16 @@ public class GsaCloudApplication extends BaseApplication {
}
}
private
void
initExpandInfo
()
{
private
void
initExpandInfo
()
{
new
Thread
(()
->
{
Observable
.
create
(
new
ObservableOnSubscribe
<
Void
>()
{
@Override
public
void
subscribe
(
ObservableEmitter
<
Void
>
emitter
)
throws
Exception
{
ExpandInfoDaoUtils
expandInfoDaoUtils
=
new
ExpandInfoDaoUtils
(
getAppContext
());
ExpandInfoDaoUtils
expandInfoDaoUtils
=
new
ExpandInfoDaoUtils
(
getAppContext
());
List
<
ExpandInfo
>
expandInfos
=
expandInfoDaoUtils
.
queryAllExpandInfo
();
List
<
ExpandInfo
>
expandInfos
=
expandInfoDaoUtils
.
queryAllExpandInfo
();
if
(
expandInfos
!=
null
)
{
if
(
expandInfos
!=
null
)
{
RestaurantExpandInfoUtils
.
setCommonExpandInfo
(
expandInfos
);
RestaurantExpandInfoUtils
.
setCommonExpandInfo
(
expandInfos
);
}
}
}).
start
();
}
}).
subscribeOn
(
Schedulers
.
io
()).
subscribe
();
//在IO线程执行数据库处理操作
}
}
public
Activity
getCurrentActivity
()
{
public
Activity
getCurrentActivity
()
{
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/common/bean/table/TableBean.java
View file @
ea4cdbc5
...
@@ -165,6 +165,7 @@ public class TableBean {
...
@@ -165,6 +165,7 @@ public class TableBean {
this
.
useStatus
=
dataBean
.
useStatus
;
this
.
useStatus
=
dataBean
.
useStatus
;
this
.
sort
=
dataBean
.
sort
;
this
.
sort
=
dataBean
.
sort
;
this
.
type
=
dataBean
.
type
;
this
.
type
=
dataBean
.
type
;
this
.
splitStatus
=
dataBean
.
splitStatus
;
this
.
tableNumber
=
dataBean
.
tableNumber
;
this
.
tableNumber
=
dataBean
.
tableNumber
;
}
}
}
}
...
@@ -185,6 +186,7 @@ public class TableBean {
...
@@ -185,6 +186,7 @@ public class TableBean {
tableBean
.
setUseStatus
(
dataBean
.
getInUse
());
tableBean
.
setUseStatus
(
dataBean
.
getInUse
());
tableBean
.
setTableNumber
(
dataBean
.
getTableNumber
());
tableBean
.
setTableNumber
(
dataBean
.
getTableNumber
());
tableBean
.
setServiceCharge
(
dataBean
.
getServiceCharge
());
tableBean
.
setServiceCharge
(
dataBean
.
getServiceCharge
());
tableBean
.
setSplitStatus
(
0
);
return
tableBean
;
return
tableBean
;
}
}
...
@@ -204,6 +206,7 @@ public class TableBean {
...
@@ -204,6 +206,7 @@ public class TableBean {
tableBean
.
setUseStatus
(
dataBean
.
getInUse
());
tableBean
.
setUseStatus
(
dataBean
.
getInUse
());
tableBean
.
setTableNumber
(
dataBean
.
getTableNumber
());
tableBean
.
setTableNumber
(
dataBean
.
getTableNumber
());
tableBean
.
setServiceCharge
(
dataBean
.
getServiceCharge
());
tableBean
.
setServiceCharge
(
dataBean
.
getServiceCharge
());
tableBean
.
setSplitStatus
(
0
);
return
tableBean
;
return
tableBean
;
}
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/FileUtils.java
View file @
ea4cdbc5
...
@@ -29,13 +29,20 @@ import java.io.InputStreamReader;
...
@@ -29,13 +29,20 @@ import java.io.InputStreamReader;
*/
*/
public
class
FileUtils
{
public
class
FileUtils
{
public
static
String
FirstFolder
=
"GSACloud"
;
//一级目录
//一级目录
public
static
String
file
=
"file"
;
//文件文件夹
public
static
String
FirstFolder
=
"GSACloud"
;
public
static
String
Image
=
"image"
;
//图片文件夹
//文件文件夹
public
static
String
Log
=
"xLog"
;
//日志存储
public
static
String
file
=
"file"
;
public
static
String
ActionLog
=
"actionLog"
;
//操作日志
//图片文件夹
public
static
String
ErrorLog
=
"errorLog"
;
//错误日志存储
public
static
String
Image
=
"image"
;
public
static
String
APK
=
"Download"
;
//安装包目录放在系统目录
//日志存储
public
static
String
Log
=
"xLog"
;
//操作日志
public
static
String
ActionLog
=
"actionLog"
;
//错误日志存储
public
static
String
ErrorLog
=
"errorLog"
;
//安装包目录放在系统目录
public
static
String
APK
=
"Download"
;
/*ALBUM_PATH取得机器的SD卡位置,File.separator为分隔符“/”*/
/*ALBUM_PATH取得机器的SD卡位置,File.separator为分隔符“/”*/
public
final
static
String
ALBUM_PATH
=
Environment
.
getExternalStorageDirectory
()
+
File
.
separator
+
FirstFolder
+
File
.
separator
;
public
final
static
String
ALBUM_PATH
=
Environment
.
getExternalStorageDirectory
()
+
File
.
separator
+
FirstFolder
+
File
.
separator
;
public
final
static
String
IMAGE_PATH
=
ALBUM_PATH
+
Image
+
File
.
separator
;
public
final
static
String
IMAGE_PATH
=
ALBUM_PATH
+
Image
+
File
.
separator
;
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/contract/TableContract.java
View file @
ea4cdbc5
...
@@ -55,9 +55,9 @@ public interface TableContract {
...
@@ -55,9 +55,9 @@ public interface TableContract {
String
getOperatContentText
();
String
getOperatContentText
();
void
set
Operat
Title
();
void
set
TableAction
Title
();
void
cance
Operat
();
void
cance
TableAction
();
void
startMealStandActivity
();
void
startMealStandActivity
();
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/cart/ShoppingCart.java
View file @
ea4cdbc5
...
@@ -55,16 +55,19 @@ public class ShoppingCart {
...
@@ -55,16 +55,19 @@ public class ShoppingCart {
protected
List
<
BillOrderMoney
>
orderMoneyList
=
new
ArrayList
<>();
protected
List
<
BillOrderMoney
>
orderMoneyList
=
new
ArrayList
<>();
public
void
addNomalDiscount
(
Discount
discount
)
{
public
MultyDiscount
addNomalDiscount
(
Discount
discount
)
{
multyDiscounts
=
new
NomalDiscount
(
multyDiscounts
,
discount
);
multyDiscounts
=
new
NomalDiscount
(
multyDiscounts
,
discount
);
return
multyDiscounts
;
}
}
public
void
addMemberDiscount
(
MemberInfo
discount
)
{
public
MultyDiscount
addMemberDiscount
(
MemberInfo
discount
)
{
multyDiscounts
=
new
MemberDiscount
(
multyDiscounts
,
discount
);
multyDiscounts
=
new
MemberDiscount
(
multyDiscounts
,
discount
);
return
multyDiscounts
;
}
}
public
void
addCouponDiscount
(
CouponDiscountBean
discount
)
{
public
MultyDiscount
addCouponDiscount
(
CouponDiscountBean
discount
)
{
multyDiscounts
=
new
CouponDiscount
(
multyDiscounts
,
discount
);
multyDiscounts
=
new
CouponDiscount
(
multyDiscounts
,
discount
);
return
multyDiscounts
;
}
}
public
static
void
main
(
String
[]
arg
)
{
public
static
void
main
(
String
[]
arg
)
{
...
@@ -75,21 +78,24 @@ public class ShoppingCart {
...
@@ -75,21 +78,24 @@ public class ShoppingCart {
MemberInfo
memberDiscount
=
new
MemberInfo
();
MemberInfo
memberDiscount
=
new
MemberInfo
();
memberDiscount
.
setMemberName
(
"斯八達"
);
memberDiscount
.
setMemberName
(
"斯八達"
);
memberDiscount
.
setDiscount
(
20
);
memberDiscount
.
set
Member
Discount
(
20
);
CouponDiscountBean
couponDiscount
=
new
CouponDiscountBean
();
CouponDiscountBean
couponDiscount
=
new
CouponDiscountBean
();
couponDiscount
.
setCouponType
((
byte
)
2
);
couponDiscount
.
setCouponType
((
byte
)
2
);
couponDiscount
.
setCouponTypeName1
(
"立減8元"
);
couponDiscount
.
setCouponTypeName1
(
"立減8元"
);
couponDiscount
.
setAmount
(
8
);
couponDiscount
.
setAmount
(
8
);
ShoppingCart
.
getInstance
().
addNomalDiscount
(
discount
);
NomalDiscount
nomalDiscountBean
=
(
NomalDiscount
)
ShoppingCart
.
getInstance
().
addNomalDiscount
(
discount
);
ShoppingCart
.
getInstance
().
addMemberDiscount
(
memberDiscount
);
MemberDiscount
memberDiscountBean
=
(
MemberDiscount
)
ShoppingCart
.
getInstance
().
addMemberDiscount
(
memberDiscount
);
ShoppingCart
.
getInstance
().
addCouponDiscount
(
couponDiscount
);
CouponDiscount
couponDiscountBean
=
(
CouponDiscount
)
ShoppingCart
.
getInstance
().
addCouponDiscount
(
couponDiscount
);
MultyDiscount
multyDiscount
=
ShoppingCart
.
getInstance
().
getMultyDiscounts
();
MultyDiscount
multyDiscount
=
ShoppingCart
.
getInstance
().
getMultyDiscounts
();
double
money
=
multyDiscount
.
calculate
(
100
);
double
money
=
multyDiscount
.
calculate
(
100
);
System
.
out
.
println
(
"calculate : "
+
money
);
System
.
out
.
println
(
"calculate : "
+
money
);
System
.
out
.
println
(
"NomalDiscount discountMoney : "
+
nomalDiscountBean
.
getDiscountMoney
());
System
.
out
.
println
(
"MemberDiscount discountMoney : "
+
memberDiscountBean
.
getDiscountMoney
());
System
.
out
.
println
(
"CouponDiscount discountMoney : "
+
couponDiscountBean
.
getDiscountMoney
());
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/
app/OrderConentOperatType
Constant.java
→
table-module/src/main/java/com/gingersoft/gsa/cloud/table/
mvp/model/constant/OrderConentAction
Constant.java
View file @
ea4cdbc5
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
app
;
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
constant
;
/**
/**
* 作者:ELEGANT_BIN
* 作者:ELEGANT_BIN
...
@@ -7,7 +7,7 @@ package com.gingersoft.gsa.cloud.table.app;
...
@@ -7,7 +7,7 @@ package com.gingersoft.gsa.cloud.table.app;
* 修订历史:2020-01-10
* 修订历史:2020-01-10
* 描述:
* 描述:
*/
*/
public
interface
OrderConent
OperatType
Constant
{
public
interface
OrderConent
Action
Constant
{
/**
/**
* 1#賬單內容
* 1#賬單內容
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/
app/TableOperatType
Constant.java
→
table-module/src/main/java/com/gingersoft/gsa/cloud/table/
mvp/model/constant/TableAction
Constant.java
View file @
ea4cdbc5
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
app
;
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
constant
;
/**
/**
* 作者:ELEGANT_BIN
* 作者:ELEGANT_BIN
...
@@ -7,7 +7,7 @@ package com.gingersoft.gsa.cloud.table.app;
...
@@ -7,7 +7,7 @@ package com.gingersoft.gsa.cloud.table.app;
* 修订历史:2020-01-10
* 修订历史:2020-01-10
* 描述:
* 描述:
*/
*/
public
interface
Table
OperatType
Constant
{
public
interface
Table
Action
Constant
{
/**
/**
* 0#全部
* 0#全部
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/discount/CouponDiscount.java
View file @
ea4cdbc5
...
@@ -3,6 +3,8 @@ package com.gingersoft.gsa.cloud.table.mvp.model.discount;
...
@@ -3,6 +3,8 @@ package com.gingersoft.gsa.cloud.table.mvp.model.discount;
import
com.gingersoft.gsa.cloud.base.common.bean.discount.CouponDiscountBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.discount.CouponDiscountBean
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
lombok.Getter
;
/**
/**
* 作者:ELEGANT_BIN
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 版本:1.6.0
...
@@ -10,6 +12,7 @@ import com.gingersoft.gsa.cloud.base.utils.MoneyUtil;
...
@@ -10,6 +12,7 @@ import com.gingersoft.gsa.cloud.base.utils.MoneyUtil;
* 修订历史:2020-09-19
* 修订历史:2020-09-19
* 描述: 優惠券折扣{@link CouponDiscountBean}
* 描述: 優惠券折扣{@link CouponDiscountBean}
*/
*/
@Getter
public
class
CouponDiscount
extends
MultyDiscount
{
public
class
CouponDiscount
extends
MultyDiscount
{
private
CouponDiscountBean
couponDiscount
;
private
CouponDiscountBean
couponDiscount
;
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/discount/MemberDiscount.java
View file @
ea4cdbc5
...
@@ -3,6 +3,8 @@ package com.gingersoft.gsa.cloud.table.mvp.model.discount;
...
@@ -3,6 +3,8 @@ package com.gingersoft.gsa.cloud.table.mvp.model.discount;
import
com.gingersoft.gsa.cloud.base.common.bean.MemberInfo
;
import
com.gingersoft.gsa.cloud.base.common.bean.MemberInfo
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
lombok.Getter
;
/**
/**
* 作者:ELEGANT_BIN
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 版本:1.6.0
...
@@ -10,6 +12,7 @@ import com.gingersoft.gsa.cloud.base.utils.MoneyUtil;
...
@@ -10,6 +12,7 @@ import com.gingersoft.gsa.cloud.base.utils.MoneyUtil;
* 修订历史:2020-09-19
* 修订历史:2020-09-19
* 描述: 會員折扣{@link MemberInfo#memberDiscount}
* 描述: 會員折扣{@link MemberInfo#memberDiscount}
*/
*/
@Getter
public
class
MemberDiscount
extends
MultyDiscount
{
public
class
MemberDiscount
extends
MultyDiscount
{
private
MemberInfo
memberDiscount
;
private
MemberInfo
memberDiscount
;
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/discount/NomalDiscount.java
View file @
ea4cdbc5
...
@@ -3,6 +3,8 @@ package com.gingersoft.gsa.cloud.table.mvp.model.discount;
...
@@ -3,6 +3,8 @@ package com.gingersoft.gsa.cloud.table.mvp.model.discount;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
import
lombok.Getter
;
/**
/**
* 作者:ELEGANT_BIN
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 版本:1.6.0
...
@@ -10,6 +12,7 @@ import com.gingersoft.gsa.cloud.database.bean.Discount;
...
@@ -10,6 +12,7 @@ import com.gingersoft.gsa.cloud.database.bean.Discount;
* 修订历史:2020-09-19
* 修订历史:2020-09-19
* 描述: 整單折扣{@link Discount}
* 描述: 整單折扣{@link Discount}
*/
*/
@Getter
public
class
NomalDiscount
extends
MultyDiscount
{
public
class
NomalDiscount
extends
MultyDiscount
{
private
Discount
discount
;
private
Discount
discount
;
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/MoveTableAction.java
0 → 100644
View file @
ea4cdbc5
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-09-23
* 修订历史:2020-09-23
* 描述:餐檯模式-轉台{@link com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity}
*/
public
class
MoveTableAction
extends
TableActionStrategy
implements
SplitTableStrategy
{
public
MoveTableAction
(
Context
context
)
{
super
(
context
);
}
@Override
public
void
action
(
TableBean
.
DataBean
dataBean
)
{
}
@Override
public
void
splitTableAction
()
{
}
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/PrintServingPaperAction.java
0 → 100644
View file @
ea4cdbc5
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-09-23
* 修订历史:2020-09-23
* 描述:餐檯模式-打印上菜紙{@link com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity}
*/
public
class
PrintServingPaperAction
extends
TableActionStrategy
{
public
PrintServingPaperAction
(
Context
context
)
{
super
(
context
);
}
@Override
public
void
action
(
TableBean
.
DataBean
dataBean
)
{
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
splitTableAction
();
}
else
{
// showOperatTipDialog(dataBean);
}
}
// public void showOperatTipDialog(TableBean.DataBean dataBean) {
// QMUIDialog.MessageDialogBuilder dialogBuilder = new QMUIDialog.MessageDialogBuilder(mContext);
// dialogBuilder.setTitleIcon(R.drawable.qmui_icon_dialog_doubt);
// dialogBuilder.setMessage("是否確認打印");
// dialogBuilder.addAction(0, "確認", QMUIDialogAction.ACTION_PROP_NEGATIVE, new QMUIDialogAction.ActionListener() {
// @Override
// public void onClick(QMUIDialog dialog, int index) {
// dialog.dismiss();
// loadOrderToPrint(dataBean.getId(), dataBean.getOrderId());
// }
// });
// dialogBuilder.addAction("取消", new QMUIDialogAction.ActionListener() {
// @Override
// public void onClick(QMUIDialog dialog, int index) {
// dialog.dismiss();
// cancel();
// }
// });
// dialogBuilder.create(R.style.MyDialogTheme2).show();
// }
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/PrintSkyOrderAction.java
0 → 100644
View file @
ea4cdbc5
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-09-23
* 修订历史:2020-09-23
* 描述:餐檯模式-打印skyorder碼{@link com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity}
*/
public
class
PrintSkyOrderAction
extends
TableActionStrategy
implements
SplitTableStrategy
{
public
PrintSkyOrderAction
(
Context
context
)
{
super
(
context
);
}
@Override
public
void
splitTableAction
()
{
}
@Override
public
void
action
(
TableBean
.
DataBean
dataBean
)
{
}
@Override
public
void
cancel
()
{
}
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/ResetTableAction.java
0 → 100644
View file @
ea4cdbc5
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-09-23
* 修订历史:2020-09-23
* 描述:餐檯模式-重置餐檯{@link com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity}
*/
public
class
ResetTableAction
extends
TableActionStrategy
implements
SplitTableStrategy
{
public
ResetTableAction
(
Context
context
)
{
super
(
context
);
}
@Override
public
void
splitTableAction
()
{
}
@Override
public
void
action
(
TableBean
.
DataBean
dataBean
)
{
}
@Override
public
void
cancel
()
{
}
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/SplitTableAction.java
0 → 100644
View file @
ea4cdbc5
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-09-23
* 修订历史:2020-09-23
* 描述:餐檯模式-分檯{@link com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity}
*/
public
class
SplitTableAction
extends
TableActionStrategy
{
public
SplitTableAction
(
Context
context
)
{
super
(
context
);
}
@Override
public
void
action
(
TableBean
.
DataBean
dataBean
)
{
}
@Override
public
void
cancel
()
{
}
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/SplitTableStrategy.java
0 → 100644
View file @
ea4cdbc5
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-09-23
* 修订历史:2020-09-23
* 描述:分檯策略接口 需要對分檯進行操作需要實現此接口
*/
public
interface
SplitTableStrategy
{
void
splitTableAction
();
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/TableActionStrategy.java
0 → 100644
View file @
ea4cdbc5
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-09-23
* 修订历史:2020-09-23
* 描述:餐檯功能策略類,所有餐檯功能都需要繼承這個
*/
public
abstract
class
TableActionStrategy
{
protected
Context
mContext
;
public
TableActionStrategy
(
Context
context
)
{
this
.
mContext
=
context
;
}
public
abstract
void
action
(
TableBean
.
DataBean
dataBean
);
protected
void
splitTableAction
(){
if
(
actionListener
!=
null
)
{
actionListener
.
splitTableAction
();
}
}
protected
void
cancel
()
{
if
(
actionListener
!=
null
)
{
actionListener
.
cancel
();
}
}
private
OnActionListener
actionListener
;
public
void
setActionListener
(
OnActionListener
actionListener
)
{
this
.
actionListener
=
actionListener
;
}
public
interface
OnActionListener
{
void
splitTableAction
();
void
cancel
();
}
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/AllTablePresenter.java
View file @
ea4cdbc5
...
@@ -6,7 +6,7 @@ import android.content.Context;
...
@@ -6,7 +6,7 @@ import android.content.Context;
import
com.gingersoft.gsa.cloud.base.utils.VibratorUtils
;
import
com.gingersoft.gsa.cloud.base.utils.VibratorUtils
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.table.
app.TableOperatType
Constant
;
import
com.gingersoft.gsa.cloud.table.
mvp.model.constant.TableAction
Constant
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.OrderContentActivity
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.OrderContentActivity
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.TableAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.TableAdapter
;
...
@@ -146,7 +146,7 @@ public class AllTablePresenter extends BasePresenter<AllTableContract.Model, All
...
@@ -146,7 +146,7 @@ public class AllTablePresenter extends BasePresenter<AllTableContract.Model, All
if
(
tableList
!=
null
)
{
if
(
tableList
!=
null
)
{
//这里先清空
//这里先清空
mTableList
.
clear
();
mTableList
.
clear
();
if
(
status
==
Table
OperatType
Constant
.
table_status_0
)
{
if
(
status
==
Table
Action
Constant
.
table_status_0
)
{
//显示全部台号 按照狀態排序
//显示全部台号 按照狀態排序
initTableByStauts
(
tableList
);
initTableByStauts
(
tableList
);
}
else
{
}
else
{
...
@@ -173,35 +173,35 @@ public class AllTablePresenter extends BasePresenter<AllTableContract.Model, All
...
@@ -173,35 +173,35 @@ public class AllTablePresenter extends BasePresenter<AllTableContract.Model, All
return
;
return
;
}
}
switch
(
status
)
{
switch
(
status
)
{
case
Table
OperatType
Constant
.
table_status_1
:
case
Table
Action
Constant
.
table_status_1
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
(
datasBeans
.
get
(
i
).
getStatus
()
==
0
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
if
(
datasBeans
.
get
(
i
).
getStatus
()
==
0
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
mTableList
.
add
(
datasBeans
.
get
(
i
));
}
}
}
}
break
;
break
;
case
Table
OperatType
Constant
.
table_status_2
:
case
Table
Action
Constant
.
table_status_2
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
(
datasBeans
.
get
(
i
).
getUseStatus
()
==
1
)
{
if
(
datasBeans
.
get
(
i
).
getUseStatus
()
==
1
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
mTableList
.
add
(
datasBeans
.
get
(
i
));
}
}
}
}
break
;
break
;
case
Table
OperatType
Constant
.
table_status_3
:
case
Table
Action
Constant
.
table_status_3
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
((
datasBeans
.
get
(
i
).
getStatus
()
==
1
||
datasBeans
.
get
(
i
).
getStatus
()
==
2
)
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
if
((
datasBeans
.
get
(
i
).
getStatus
()
==
1
||
datasBeans
.
get
(
i
).
getStatus
()
==
2
)
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
mTableList
.
add
(
datasBeans
.
get
(
i
));
}
}
}
}
break
;
break
;
case
Table
OperatType
Constant
.
table_status_4
:
case
Table
Action
Constant
.
table_status_4
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
(
datasBeans
.
get
(
i
).
getStatus
()
==
3
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
if
(
datasBeans
.
get
(
i
).
getStatus
()
==
3
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
mTableList
.
add
(
datasBeans
.
get
(
i
));
}
}
}
}
break
;
break
;
case
Table
OperatType
Constant
.
table_status_5
:
case
Table
Action
Constant
.
table_status_5
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
(
datasBeans
.
get
(
i
).
getSplitStatus
()
==
1
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
if
(
datasBeans
.
get
(
i
).
getSplitStatus
()
==
1
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
mTableList
.
add
(
datasBeans
.
get
(
i
));
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
View file @
ea4cdbc5
...
@@ -1507,9 +1507,12 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
...
@@ -1507,9 +1507,12 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
*
*
* @return
* @return
*/
*/
protected
BillOrderMoney
getNe
sOrder
Discount
()
{
protected
BillOrderMoney
getNe
w
Discount
()
{
for
(
BillOrderMoney
item
:
mOrderMoneyList
)
{
for
(
BillOrderMoney
item
:
mOrderMoneyList
)
{
if
(
item
.
getStatus
()
==
0
&&
item
.
getType
()
==
BillOrderMoney
.
ORDER_DISCOUNT_TYPE
)
{
if
(
item
.
getStatus
()
==
0
&&
(
item
.
getType
()
==
BillOrderMoney
.
ORDER_DISCOUNT_TYPE
||
item
.
getType
()
==
BillOrderMoney
.
MEMBER_DISCOUNT_TYPE
||
item
.
getType
()
==
BillOrderMoney
.
COUPON_DISCOUNT_TYPE
))
{
return
item
;
return
item
;
}
}
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/MealStandPresenter.java
View file @
ea4cdbc5
...
@@ -542,38 +542,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -542,38 +542,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
updateOrderFoodNumber
();
updateOrderFoodNumber
();
}
}
});
});
// long fid = food.getProductId();
// int itemType = food.getItemType();
//
// List<ComboItem> comboItemList = new ArrayList<>();
// if (itemType == 1) {
// //获取套餐细项数据
// List<ComboItem> comboItems = mModel.queryDB_ComboList(fid);
// comboItemList.addAll(comboItems);
// }
// List<Modifier> modifierList = mModel.queryDB_ModifierList(fid, ModifierDaoUtils.modifierMode_All);
// //設置默認選中套餐食品
// setComboDefModifier(comboItemList);
// //設置默認選中細項
// setModifierDefModifier(modifierList);
//
// //更新套餐数据
// updateComboData(comboItemList);
// //更新细项数据
// updateModifierData(modifierList);
//
// if (comboItemList.size() > 0) {
// mRootView.setModifierTop(10);
// } else {
// mRootView.setModifierTop(0);
// }
//
//// isSelectedMeal = isSelectedMeal && (comboItemList.size() > 0 || modifierList.size() > 0);
// boolean autoMod = food.getAutoMod() == 1 && (comboItemList.size() > 0 || modifierList.size() > 0);
// if (IActivity.getCurrentViewMode() != MealConstant.fine_ViewMode && isSelectedMeal || autoMod) {
// mRootView.showViewModeVisibility(MealConstant.combo_ViewMode, MealConstant.modifier_ViewMode);
// }
}
}
/**
/**
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/OrderContentPresenter.java
View file @
ea4cdbc5
...
@@ -191,7 +191,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
...
@@ -191,7 +191,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
if
(!
canPrint
())
{
if
(!
canPrint
())
{
return
;
return
;
}
}
if
(
hasNesOrderFoods
()
||
getNe
sOrder
Discount
()
!=
null
)
{
if
(
hasNesOrderFoods
()
||
getNe
w
Discount
()
!=
null
)
{
//有未送單食品先送單
//有未送單食品先送單
sendOrder
(
true
,
null
);
sendOrder
(
true
,
null
);
}
else
{
}
else
{
...
@@ -202,7 +202,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
...
@@ -202,7 +202,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
// if (!canPay()) {
// if (!canPay()) {
// return;
// return;
// }
// }
if
(
hasNesOrderFoods
()
||
getNe
sOrder
Discount
()
!=
null
)
{
if
(
hasNesOrderFoods
()
||
getNe
w
Discount
()
!=
null
)
{
//有未送單食品先送單
//有未送單食品先送單
sendOrder
(
false
,
OrderPayActivity
.
class
);
sendOrder
(
false
,
OrderPayActivity
.
class
);
}
else
{
}
else
{
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/StateTablePresenter.java
View file @
ea4cdbc5
...
@@ -6,7 +6,7 @@ import android.content.Context;
...
@@ -6,7 +6,7 @@ import android.content.Context;
import
com.gingersoft.gsa.cloud.base.utils.VibratorUtils
;
import
com.gingersoft.gsa.cloud.base.utils.VibratorUtils
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.table.
app.TableOperatType
Constant
;
import
com.gingersoft.gsa.cloud.table.
mvp.model.constant.TableAction
Constant
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.OrderContentActivity
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.OrderContentActivity
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.TableAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.TableAdapter
;
...
@@ -101,7 +101,7 @@ public class StateTablePresenter extends BasePresenter<StateTableContract.Model,
...
@@ -101,7 +101,7 @@ public class StateTablePresenter extends BasePresenter<StateTableContract.Model,
if
(
tableList
!=
null
)
{
if
(
tableList
!=
null
)
{
//这里先清空
//这里先清空
mTableList
.
clear
();
mTableList
.
clear
();
if
(
status
==
Table
OperatType
Constant
.
table_status_0
)
{
if
(
status
==
Table
Action
Constant
.
table_status_0
)
{
//显示全部台号 按照狀態排序
//显示全部台号 按照狀態排序
initTableByStauts
(
tableList
);
initTableByStauts
(
tableList
);
}
else
{
}
else
{
...
@@ -161,35 +161,35 @@ public class StateTablePresenter extends BasePresenter<StateTableContract.Model,
...
@@ -161,35 +161,35 @@ public class StateTablePresenter extends BasePresenter<StateTableContract.Model,
return
;
return
;
}
}
switch
(
status
)
{
switch
(
status
)
{
case
Table
OperatType
Constant
.
table_status_1
:
case
Table
Action
Constant
.
table_status_1
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
(
datasBeans
.
get
(
i
).
getStatus
()
==
0
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
if
(
datasBeans
.
get
(
i
).
getStatus
()
==
0
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
mTableList
.
add
(
datasBeans
.
get
(
i
));
}
}
}
}
break
;
break
;
case
Table
OperatType
Constant
.
table_status_2
:
case
Table
Action
Constant
.
table_status_2
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
(
datasBeans
.
get
(
i
).
getUseStatus
()
==
1
)
{
if
(
datasBeans
.
get
(
i
).
getUseStatus
()
==
1
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
mTableList
.
add
(
datasBeans
.
get
(
i
));
}
}
}
}
break
;
break
;
case
Table
OperatType
Constant
.
table_status_3
:
case
Table
Action
Constant
.
table_status_3
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
((
datasBeans
.
get
(
i
).
getStatus
()
==
1
||
datasBeans
.
get
(
i
).
getStatus
()
==
2
)
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
if
((
datasBeans
.
get
(
i
).
getStatus
()
==
1
||
datasBeans
.
get
(
i
).
getStatus
()
==
2
)
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
mTableList
.
add
(
datasBeans
.
get
(
i
));
}
}
}
}
break
;
break
;
case
Table
OperatType
Constant
.
table_status_4
:
case
Table
Action
Constant
.
table_status_4
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
(
datasBeans
.
get
(
i
).
getStatus
()
==
3
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
if
(
datasBeans
.
get
(
i
).
getStatus
()
==
3
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
mTableList
.
add
(
datasBeans
.
get
(
i
));
}
}
}
}
break
;
break
;
case
Table
OperatType
Constant
.
table_status_5
:
case
Table
Action
Constant
.
table_status_5
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
(
datasBeans
.
get
(
i
).
getSplitStatus
()
==
1
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
if
(
datasBeans
.
get
(
i
).
getSplitStatus
()
==
1
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
mTableList
.
add
(
datasBeans
.
get
(
i
));
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
View file @
ea4cdbc5
...
@@ -10,10 +10,10 @@ import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication;
...
@@ -10,10 +10,10 @@ import com.gingersoft.gsa.cloud.base.application.GsaCloudApplication;
import
com.gingersoft.gsa.cloud.base.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.base.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.common.bean.OrderDetail
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableExtBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.mealManger.MyOrderManage
;
import
com.gingersoft.gsa.cloud.base.common.bean.mealManger.MyOrderManage
;
import
com.gingersoft.gsa.cloud.base.common.bean.mealManger.OpenTableManage
;
import
com.gingersoft.gsa.cloud.base.common.bean.mealManger.OpenTableManage
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableExtBean
;
import
com.gingersoft.gsa.cloud.base.utils.JsonUtils
;
import
com.gingersoft.gsa.cloud.base.utils.JsonUtils
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.constans.GoldConstants
;
import
com.gingersoft.gsa.cloud.constans.GoldConstants
;
...
@@ -27,14 +27,16 @@ import com.gingersoft.gsa.cloud.database.utils.ModifierDaoUtils;
...
@@ -27,14 +27,16 @@ import com.gingersoft.gsa.cloud.database.utils.ModifierDaoUtils;
import
com.gingersoft.gsa.cloud.function.FunctionManager
;
import
com.gingersoft.gsa.cloud.function.FunctionManager
;
import
com.gingersoft.gsa.cloud.table.ComponentTable
;
import
com.gingersoft.gsa.cloud.table.ComponentTable
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.app.TableOperatTypeConstant
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.TableContract
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.TableContract
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.BaseOrderRespose
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.BaseOrderRespose
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.TableDetail
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.TableDetail
;
import
com.gingersoft.gsa.cloud.table.mvp.model.constant.TableActionConstant
;
import
com.gingersoft.gsa.cloud.table.mvp.model.table.TableActionStrategy
;
import
com.gingersoft.gsa.cloud.table.mvp.model.utils.OrderAssemblyUtil
;
import
com.gingersoft.gsa.cloud.table.mvp.model.utils.OrderAssemblyUtil
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.BottomFunctionAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.BottomFunctionAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.widget.SplitTableDialog
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.widget.SplitTableDialog
;
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
;
import
com.jess.arms.di.scope.ActivityScope
;
import
com.jess.arms.di.scope.ActivityScope
;
...
@@ -91,15 +93,17 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -91,15 +93,17 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
private
TableActivity
IActivity
;
private
TableActivity
IActivity
;
/**
* 分檯弹窗
*/
private
SplitTableDialog
mSplitTableDialog
;
private
List
<
TableBean
.
DataBean
>
mTableList
=
new
ArrayList
<>();
private
List
<
TableBean
.
DataBean
>
mTableList
=
new
ArrayList
<>();
private
BottomFunctionAdapter
mBottomFunctionAdapter
;
private
BottomFunctionAdapter
mBottomFunctionAdapter
;
private
List
<
Function
>
mBottomFunctionList
=
new
ArrayList
<>();
private
List
<
Function
>
mBottomFunctionList
=
new
ArrayList
<>();
//定时获取餐台 定时器
private
TableActionStrategy
mTableAction
;
private
GetTableTimer
tableTimer
;
private
Disposable
mGetTablesDataDisposable
;
/**
/**
* 当前选择的操作:
* 当前选择的操作:
* 1#分台
* 1#分台
...
@@ -124,6 +128,10 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -124,6 +128,10 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
private
long
targetTableId
;
private
long
targetTableId
;
private
String
targetTableNumber
=
""
;
private
String
targetTableNumber
=
""
;
//定时获取餐台 定时器
private
GetTableTimer
tableTimer
;
private
Disposable
mGetTablesDataDisposable
;
@Inject
@Inject
public
TablePresenter
(
TableContract
.
Model
model
,
TableContract
.
View
rootView
)
{
public
TablePresenter
(
TableContract
.
Model
model
,
TableContract
.
View
rootView
)
{
super
(
model
,
rootView
);
super
(
model
,
rootView
);
...
@@ -168,30 +176,34 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -168,30 +176,34 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
// }
// }
// if (function.getResUrl().equals(ComponentTable.table.bottom[0].getKeyRes())) {
// if (function.getResUrl().equals(ComponentTable.table.bottom[0].getKeyRes())) {
// //重置
// //重置
// mRootView.setCurrentOperatType(Table
OperatType
Constant.init_table_3);
// mRootView.setCurrentOperatType(Table
Action
Constant.init_table_3);
// } else if (function.getResUrl().equals(ComponentTable.table.bottom[1].getKeyRes())) {
// } else if (function.getResUrl().equals(ComponentTable.table.bottom[1].getKeyRes())) {
// //轉檯
// //轉檯
// mRootView.setCurrentOperatType(Table
OperatType
Constant.move_table_4);
// mRootView.setCurrentOperatType(Table
Action
Constant.move_table_4);
// } else if (function.getResUrl().equals(ComponentTable.table.bottom[3].getKeyRes())) {
// } else if (function.getResUrl().equals(ComponentTable.table.bottom[3].getKeyRes())) {
// //上菜紙
// //上菜紙
// mRootView.setCurrentOperatType(Table
OperatType
Constant.print_parper_2);
// mRootView.setCurrentOperatType(Table
Action
Constant.print_parper_2);
// }
// }
switch
(
position
)
{
switch
(
position
)
{
case
0
:
case
0
:
// mTableAction = new ResetTableAction();
//重置
//重置
mRootView
.
setCurrentOperatType
(
Table
OperatType
Constant
.
init_table_3
);
mRootView
.
setCurrentOperatType
(
Table
Action
Constant
.
init_table_3
);
break
;
break
;
case
1
:
case
1
:
// mTableAction = new MoveTableAction();
//轉檯
//轉檯
mRootView
.
setCurrentOperatType
(
Table
OperatType
Constant
.
move_table_4
);
mRootView
.
setCurrentOperatType
(
Table
Action
Constant
.
move_table_4
);
break
;
break
;
case
2
:
case
2
:
// mTableAction = new SplitTableAction();
//分檯
//分檯
mRootView
.
setCurrentOperatType
(
Table
OperatType
Constant
.
splite_table_1
);
mRootView
.
setCurrentOperatType
(
Table
Action
Constant
.
splite_table_1
);
break
;
break
;
case
3
:
case
3
:
// mTableAction = new PrintServingPaperAction();
//上菜紙
//上菜紙
mRootView
.
setCurrentOperatType
(
Table
OperatType
Constant
.
print_parper_2
);
mRootView
.
setCurrentOperatType
(
Table
Action
Constant
.
print_parper_2
);
break
;
break
;
}
}
}
}
...
@@ -371,7 +383,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -371,7 +383,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
//清空開檯數據
//清空開檯數據
OpenTableManage
.
getDefault
().
clear
();
OpenTableManage
.
getDefault
().
clear
();
mRootView
.
cance
Operat
();
mRootView
.
cance
TableAction
();
});
});
}
}
});
});
...
@@ -402,8 +414,8 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -402,8 +414,8 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
TableBean
.
DataBean
openTableBean
;
TableBean
.
DataBean
openTableBean
;
if
(
tableExtBean
!=
null
)
{
if
(
tableExtBean
!=
null
)
{
openTableBean
=
tableExtBean
;
openTableBean
=
tableExtBean
;
if
(
IActivity
.
getSplitTableDialog
()
!=
null
)
{
if
(
mSplitTableDialog
!=
null
)
{
IActivity
.
getSplitTableDialog
()
.
closeDialog
();
mSplitTableDialog
.
closeDialog
();
}
}
}
else
{
}
else
{
openTableBean
=
getTableById
(
tableId
);
openTableBean
=
getTableById
(
tableId
);
...
@@ -590,7 +602,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -590,7 +602,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
}
else
{
}
else
{
mRootView
.
showMessage
(
"轉檯成功"
);
mRootView
.
showMessage
(
"轉檯成功"
);
}
}
mRootView
.
cance
Operat
();
mRootView
.
cance
TableAction
();
//立即獲取餐檯數據
//立即獲取餐檯數據
getTables
(
false
,
null
);
getTables
(
false
,
null
);
}
else
{
}
else
{
...
@@ -617,8 +629,9 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -617,8 +629,9 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
doAfterTerminate
(()
->
{
.
doAfterTerminate
(()
->
{
if
(
showMessage
)
if
(
showMessage
)
{
mRootView
.
hideLoading
();
mRootView
.
hideLoading
();
}
})
})
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseOrderRespose
>(
mErrorHandler
)
{
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseOrderRespose
>(
mErrorHandler
)
{
...
@@ -631,21 +644,21 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -631,21 +644,21 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
// if (showMessage)
// if (showMessage)
// mRootView.showMessage("重置成功!");
// mRootView.showMessage("重置成功!");
mRootView
.
cance
Operat
();
mRootView
.
cance
TableAction
();
getTables
(
false
,
null
);
getTables
(
false
,
null
);
refreshSplitTablesDialog
();
refreshSplitTablesDialog
();
}
else
{
}
else
{
if
(
showMessage
)
if
(
showMessage
)
{
mRootView
.
showMessage
(
respose
.
getErrMsg
());
mRootView
.
showMessage
(
respose
.
getErrMsg
());
}
}
}
}
}
});
});
}
}
public
void
getSplitTables
(
int
tableId
)
{
public
void
getSplitTables
(
int
tableId
)
{
SplitTableDialog
splitTableDialog
=
IActivity
.
getSplitTableDialog
();
mModel
.
getSplitTables
(
tableId
)
mModel
.
getSplitTables
(
tableId
)
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
Schedulers
.
io
())
// .doOnSubscribe(disposable -> mRootView.showLoading(null))
// .doOnSubscribe(disposable -> mRootView.showLoading(null))
...
@@ -658,8 +671,8 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -658,8 +671,8 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
@Override
@Override
public
void
onSubscribe
(
Disposable
d
)
{
public
void
onSubscribe
(
Disposable
d
)
{
super
.
onSubscribe
(
d
);
super
.
onSubscribe
(
d
);
s
plitTableDialog
.
clearItems
();
mS
plitTableDialog
.
clearItems
();
s
plitTableDialog
.
setProgressVisibility
(
true
);
mS
plitTableDialog
.
setProgressVisibility
(
true
);
}
}
@Override
@Override
...
@@ -671,22 +684,22 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -671,22 +684,22 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
List
<
TableBean
.
DataBean
>
dataBeanList
=
assemblyTableExts
(
tableExtBean
.
getRestaurantTable
(),
tableExtBean
.
getRestaurantTableExtList
());
List
<
TableBean
.
DataBean
>
dataBeanList
=
assemblyTableExts
(
tableExtBean
.
getRestaurantTable
(),
tableExtBean
.
getRestaurantTableExtList
());
s
plitTableDialog
.
addItems
(
dataBeanList
);
mS
plitTableDialog
.
addItems
(
dataBeanList
);
s
plitTableDialog
.
notifyDataSetChanged
();
mS
plitTableDialog
.
notifyDataSetChanged
();
}
else
{
}
else
{
s
plitTableDialog
.
showEmptyView
(
true
,
0
,
null
);
mS
plitTableDialog
.
showEmptyView
(
true
,
0
,
null
);
}
}
}
else
{
}
else
{
s
plitTableDialog
.
showEmptyView
(
false
,
0
,
null
);
mS
plitTableDialog
.
showEmptyView
(
false
,
0
,
null
);
}
}
s
plitTableDialog
.
setProgressVisibility
(
false
);
mS
plitTableDialog
.
setProgressVisibility
(
false
);
}
}
@Override
@Override
public
void
onError
(
Throwable
t
)
{
public
void
onError
(
Throwable
t
)
{
super
.
onError
(
t
);
super
.
onError
(
t
);
s
plitTableDialog
.
setProgressVisibility
(
false
);
mS
plitTableDialog
.
setProgressVisibility
(
false
);
s
plitTableDialog
.
showEmptyView
(
false
,
0
,
t
);
mS
plitTableDialog
.
showEmptyView
(
false
,
0
,
t
);
}
}
private
List
<
TableBean
.
DataBean
>
assemblyTableExts
(
TableBean
.
DataBean
mainTable
,
List
<
TableExtBean
.
DataBean
>
restaurantTableExtList
)
{
private
List
<
TableBean
.
DataBean
>
assemblyTableExts
(
TableBean
.
DataBean
mainTable
,
List
<
TableExtBean
.
DataBean
>
restaurantTableExtList
)
{
...
@@ -768,10 +781,9 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -768,10 +781,9 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
* 刷新分檯数据
* 刷新分檯数据
*/
*/
private
void
refreshSplitTablesDialog
()
{
private
void
refreshSplitTablesDialog
()
{
SplitTableDialog
splitTableDialog
=
IActivity
.
getSplitTableDialog
();
if
(
mSplitTableDialog
!=
null
)
{
if
(
splitTableDialog
!=
null
)
{
//刷新餐檯
//刷新餐檯
getSplitTables
(
s
plitTableDialog
.
getMainTableId
());
getSplitTables
(
mS
plitTableDialog
.
getMainTableId
());
}
}
}
}
...
@@ -785,7 +797,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -785,7 +797,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
List
<
TableBean
.
DataBean
>
filterTableBeanList
=
new
ArrayList
<>();
List
<
TableBean
.
DataBean
>
filterTableBeanList
=
new
ArrayList
<>();
//如果是餐檯操作過一遍筛选
//如果是餐檯操作過一遍筛选
switch
(
mCurrentOperatType
)
{
switch
(
mCurrentOperatType
)
{
case
Table
OperatType
Constant
.
splite_table_1
:
case
Table
Action
Constant
.
splite_table_1
:
for
(
int
i
=
0
;
i
<
mTableList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
mTableList
.
size
();
i
++)
{
// if (mTableList.get(i).getStatus() != 0 || mTableList.get(i).getSplitStatus() == 1 ? true : false) {
// if (mTableList.get(i).getStatus() != 0 || mTableList.get(i).getSplitStatus() == 1 ? true : false) {
if
(
mTableList
.
get
(
i
).
getStatus
()
!=
0
)
{
if
(
mTableList
.
get
(
i
).
getStatus
()
!=
0
)
{
...
@@ -793,26 +805,26 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -793,26 +805,26 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
}
}
}
}
break
;
break
;
case
Table
OperatType
Constant
.
print_parper_2
:
case
Table
Action
Constant
.
print_parper_2
:
for
(
int
i
=
0
;
i
<
mTableList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
mTableList
.
size
();
i
++)
{
if
(
mTableList
.
get
(
i
).
getStatus
()
!=
0
)
{
if
(
mTableList
.
get
(
i
).
getStatus
()
!=
0
)
{
filterTableBeanList
.
add
(
mTableList
.
get
(
i
));
filterTableBeanList
.
add
(
mTableList
.
get
(
i
));
}
}
}
}
break
;
break
;
case
Table
OperatType
Constant
.
init_table_3
:
case
Table
Action
Constant
.
init_table_3
:
for
(
int
i
=
0
;
i
<
mTableList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
mTableList
.
size
();
i
++)
{
if
(
mTableList
.
get
(
i
).
getUseStatus
()
==
1
||
mTableList
.
get
(
i
).
getSplitStatus
()
==
1
)
{
if
(
mTableList
.
get
(
i
).
getUseStatus
()
==
1
||
mTableList
.
get
(
i
).
getSplitStatus
()
==
1
)
{
filterTableBeanList
.
add
(
mTableList
.
get
(
i
));
filterTableBeanList
.
add
(
mTableList
.
get
(
i
));
}
}
}
}
break
;
break
;
// case Table
OperatType
Constant.skyorder_mode_5:
// case Table
Action
Constant.skyorder_mode_5:
// for (int i = 0; i < datasBeans.size(); i++) {
// for (int i = 0; i < datasBeans.size(); i++) {
// mTableList.add(datasBeans.get(i));
// mTableList.add(datasBeans.get(i));
// }
// }
// break;
// break;
case
Table
OperatType
Constant
.
move_table_4
:
case
Table
Action
Constant
.
move_table_4
:
case
-
1
:
//正常餐檯模式下顯示所有餐檯數據
case
-
1
:
//正常餐檯模式下顯示所有餐檯數據
filterTableBeanList
.
addAll
(
mTableList
);
filterTableBeanList
.
addAll
(
mTableList
);
break
;
break
;
...
@@ -826,16 +838,16 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -826,16 +838,16 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
//是否合併檯
//是否合併檯
boolean
isMergeTable
=
false
;
boolean
isMergeTable
=
false
;
switch
(
mCurrentOperatType
)
{
switch
(
mCurrentOperatType
)
{
case
Table
OperatType
Constant
.
splite_table_1
:
case
Table
Action
Constant
.
splite_table_1
:
break
;
break
;
case
Table
OperatType
Constant
.
print_parper_2
:
case
Table
Action
Constant
.
print_parper_2
:
dialogBuilder
.
setMessage
(
"是否確認打印"
);
dialogBuilder
.
setMessage
(
"是否確認打印"
);
break
;
break
;
case
Table
OperatType
Constant
.
init_table_3
:
case
Table
Action
Constant
.
init_table_3
:
dialogBuilder
.
setMessage
(
"是否確認重置"
+
dataBean
.
getTableName
()
+
"號檯?"
);
dialogBuilder
.
setMessage
(
"是否確認重置"
+
dataBean
.
getTableName
()
+
"號檯?"
);
break
;
break
;
case
Table
OperatType
Constant
.
move_table_4
:
case
Table
Action
Constant
.
move_table_4
:
String
message
;
String
message
;
if
(
dataBean
.
getStatus
()
==
1
||
dataBean
.
getStatus
()
==
2
||
dataBean
.
getStatus
()
==
3
)
{
if
(
dataBean
.
getStatus
()
==
1
||
dataBean
.
getStatus
()
==
2
||
dataBean
.
getStatus
()
==
3
)
{
message
=
"是否由%s號檯合併到%s號檯"
;
message
=
"是否由%s號檯合併到%s號檯"
;
...
@@ -845,7 +857,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -845,7 +857,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
}
}
dialogBuilder
.
setMessage
(
String
.
format
(
message
,
originalTableName
,
targetTableName
));
dialogBuilder
.
setMessage
(
String
.
format
(
message
,
originalTableName
,
targetTableName
));
break
;
break
;
case
Table
OperatType
Constant
.
skyorder_mode_5
:
case
Table
Action
Constant
.
skyorder_mode_5
:
break
;
break
;
}
}
...
@@ -855,19 +867,19 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -855,19 +867,19 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
public
void
onClick
(
QMUIDialog
dialog
,
int
index
)
{
public
void
onClick
(
QMUIDialog
dialog
,
int
index
)
{
dialog
.
dismiss
();
dialog
.
dismiss
();
switch
(
mCurrentOperatType
)
{
switch
(
mCurrentOperatType
)
{
case
Table
OperatType
Constant
.
splite_table_1
:
case
Table
Action
Constant
.
splite_table_1
:
break
;
break
;
case
Table
OperatType
Constant
.
print_parper_2
:
case
Table
Action
Constant
.
print_parper_2
:
loadOrderToPrint
(
dataBean
.
getId
(),
dataBean
.
getOrderId
());
loadOrderToPrint
(
dataBean
.
getId
(),
dataBean
.
getOrderId
());
break
;
break
;
case
Table
OperatType
Constant
.
init_table_3
:
case
Table
Action
Constant
.
init_table_3
:
initTable
(
dataBean
.
getId
(),
dataBean
.
getTableNumber
(),
true
);
initTable
(
dataBean
.
getId
(),
dataBean
.
getTableNumber
(),
true
);
break
;
break
;
case
Table
OperatType
Constant
.
move_table_4
:
case
Table
Action
Constant
.
move_table_4
:
turnTable
(
originalTableId
,
targetTableId
,
originalTableNumber
,
targetTableNumber
,
finalIsMergeTable
);
turnTable
(
originalTableId
,
targetTableId
,
originalTableNumber
,
targetTableNumber
,
finalIsMergeTable
);
break
;
break
;
case
Table
OperatType
Constant
.
skyorder_mode_5
:
case
Table
Action
Constant
.
skyorder_mode_5
:
break
;
break
;
}
}
...
@@ -877,32 +889,104 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -877,32 +889,104 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
@Override
@Override
public
void
onClick
(
QMUIDialog
dialog
,
int
index
)
{
public
void
onClick
(
QMUIDialog
dialog
,
int
index
)
{
//重置之前選的餐檯數據
//重置之前選的餐檯數據
initTableParameter
();
initTable
Action
Parameter
();
mRootView
.
set
Operat
Title
();
mRootView
.
set
TableAction
Title
();
dialog
.
dismiss
();
dialog
.
dismiss
();
}
}
});
});
dialogBuilder
.
create
(
R
.
style
.
MyDialogTheme2
).
show
();
dialogBuilder
.
create
(
R
.
style
.
MyDialogTheme2
).
show
();
}
}
public
void
showSplitTableDialog
(
int
tableId
)
{
if
(
mSplitTableDialog
==
null
)
{
mSplitTableDialog
=
new
SplitTableDialog
(
IActivity
);
mSplitTableDialog
.
setOnClickListener
(
new
SplitTableDialog
.
OnClickListener
()
{
@Override
public
void
onItemClick
(
SplitTableDialog
dialog
,
TableBean
.
DataBean
dataBean
,
int
position
)
{
int
currentChooseOperatType
=
getCurrentChooseOperatType
();
switch
(
currentChooseOperatType
)
{
case
TableActionConstant
.
print_parper_2
:
case
TableActionConstant
.
init_table_3
:
showOperatTipDialog
(
dataBean
);
break
;
case
TableActionConstant
.
move_table_4
:
mSplitTableDialog
.
closeDialog
();
//獲取餐檯狀態
getTable
(
dataBean
);
break
;
default
:
mSplitTableDialog
.
closeDialog
();
openTable
(
dataBean
.
getId
(),
dataBean
);
break
;
}
// if (mTableAction != null) {
// if (mTableAction instanceof PrintServingPaperAction || mTableAction instanceof ResetTableAction) {
//
// }
//
// } else {
// //開台操作
// mSplitTableDialog.closeDialog();
// openTable(dataBean.getId(), dataBean);
// }
}
});
mSplitTableDialog
.
setOnRetryListener
(
new
BaseRetryDialog
.
OnRetryListener
()
{
@Override
public
void
onRetryClick
()
{
getSplitTables
(
tableId
);
}
});
}
mSplitTableDialog
.
setMainTableId
(
tableId
);
mSplitTableDialog
.
build
().
show
();
getSplitTables
(
tableId
);
}
/**
* 執行餐檯操作
*/
public
boolean
doTableAction
(
TableBean
.
DataBean
dataBean
)
{
if
(
mTableAction
!=
null
)
{
mTableAction
.
action
(
dataBean
);
mTableAction
.
setActionListener
(
new
TableActionStrategy
.
OnActionListener
()
{
@Override
public
void
splitTableAction
()
{
showSplitTableDialog
(
dataBean
.
getId
());
}
@Override
public
void
cancel
()
{
initTableActionParameter
();
mRootView
.
canceTableAction
();
}
});
return
true
;
}
return
false
;
}
/**
/**
* 初始化操作參數
* 初始化操作參數
*/
*/
public
void
initTableParameter
()
{
public
void
initTable
Action
Parameter
()
{
originalTableName
=
""
;
originalTableName
=
""
;
originalTableId
=
0
;
originalTableId
=
0
;
originalTableNumber
=
""
;
originalTableNumber
=
""
;
targetTableName
=
""
;
targetTableName
=
""
;
targetTableId
=
0
;
targetTableId
=
0
;
targetTableNumber
=
""
;
targetTableNumber
=
""
;
mTableAction
=
null
;
}
}
private
TableBean
.
DataBean
getTableById
(
long
id
)
{
private
TableBean
.
DataBean
getTableById
(
long
id
)
{
for
(
int
i
=
0
;
i
<
mTableList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
mTableList
.
size
();
i
++)
{
TableBean
.
DataBean
dataBean
=
mTableList
.
get
(
i
);
TableBean
.
DataBean
dataBean
=
mTableList
.
get
(
i
);
if
(
dataBean
.
getId
()
==
id
)
if
(
dataBean
.
getId
()
==
id
)
{
return
dataBean
;
return
dataBean
;
}
}
}
return
null
;
return
null
;
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderContentActivity.java
View file @
ea4cdbc5
...
@@ -24,8 +24,8 @@ import com.gingersoft.gsa.cloud.base.utils.encryption.DESUtil;
...
@@ -24,8 +24,8 @@ import com.gingersoft.gsa.cloud.base.utils.encryption.DESUtil;
import
com.gingersoft.gsa.cloud.base.utils.log.LogUtil
;
import
com.gingersoft.gsa.cloud.base.utils.log.LogUtil
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.
app.OrderConentOperatType
Constant
;
import
com.gingersoft.gsa.cloud.table.
mvp.model.constant.OrderConentAction
Constant
;
import
com.gingersoft.gsa.cloud.table.
app.TableOperatType
Constant
;
import
com.gingersoft.gsa.cloud.table.
mvp.model.constant.TableAction
Constant
;
import
com.gingersoft.gsa.cloud.table.di.component.DaggerOrderContentComponent
;
import
com.gingersoft.gsa.cloud.table.di.component.DaggerOrderContentComponent
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.OrderContentContract
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.OrderContentContract
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.event.InitTableEvent
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.event.InitTableEvent
;
...
@@ -148,13 +148,13 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
...
@@ -148,13 +148,13 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
/**
/**
* 當前所顯示餐檯狀態(默認:全部)
* 當前所顯示餐檯狀態(默認:全部)
*/
*/
private
int
mCurrentSelectTableStatus
=
Table
OperatType
Constant
.
table_status_0
;
private
int
mCurrentSelectTableStatus
=
Table
Action
Constant
.
table_status_0
;
/**
/**
* 当前选择的操作:
* 当前选择的操作:
* 1#賬單內容
* 1#賬單內容
* 2#轉移
* 2#轉移
*/
*/
private
int
mCurrentOperatType
=
OrderConent
OperatType
Constant
.
order_conetnt_1
;
private
int
mCurrentOperatType
=
OrderConent
Action
Constant
.
order_conetnt_1
;
private
boolean
isRefreshData
=
false
;
private
boolean
isRefreshData
=
false
;
...
@@ -244,14 +244,14 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
...
@@ -244,14 +244,14 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
public
void
backPressed
()
{
public
void
backPressed
()
{
switch
(
mCurrentOperatType
)
{
switch
(
mCurrentOperatType
)
{
case
OrderConent
OperatType
Constant
.
transfer_food_2
:
case
OrderConent
Action
Constant
.
transfer_food_2
:
hideTransferFoodLayout
();
hideTransferFoodLayout
();
break
;
break
;
default
:
default
:
killMyself
();
killMyself
();
break
;
break
;
}
}
mCurrentOperatType
=
OrderConent
OperatType
Constant
.
order_conetnt_1
;
mCurrentOperatType
=
OrderConent
Action
Constant
.
order_conetnt_1
;
tv_action_name
.
setVisibility
(
View
.
GONE
);
tv_action_name
.
setVisibility
(
View
.
GONE
);
}
}
...
@@ -323,7 +323,7 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
...
@@ -323,7 +323,7 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
return
;
return
;
}
}
switch
(
mCurrentOperatType
)
{
switch
(
mCurrentOperatType
)
{
case
OrderConent
OperatType
Constant
.
transfer_food_2
:
case
OrderConent
Action
Constant
.
transfer_food_2
:
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
mPresenter
.
showSplitTableDialog
(
dataBean
.
getId
());
mPresenter
.
showSplitTableDialog
(
dataBean
.
getId
());
}
else
{
}
else
{
...
@@ -367,7 +367,7 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
...
@@ -367,7 +367,7 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
vs_transfer_food
.
setVisibility
(
View
.
VISIBLE
);
vs_transfer_food
.
setVisibility
(
View
.
VISIBLE
);
}
finally
{
}
finally
{
mCurrentOperatType
=
OrderConent
OperatType
Constant
.
transfer_food_2
;
mCurrentOperatType
=
OrderConent
Action
Constant
.
transfer_food_2
;
tv_table_name
.
setHint
(
"請選擇目標檯號"
);
tv_table_name
.
setHint
(
"請選擇目標檯號"
);
setActionName
();
setActionName
();
}
}
...
@@ -375,7 +375,7 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
...
@@ -375,7 +375,7 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
@Override
@Override
public
void
hideTransferFoodLayout
()
{
public
void
hideTransferFoodLayout
()
{
mCurrentOperatType
=
OrderConent
OperatType
Constant
.
order_conetnt_1
;
mCurrentOperatType
=
OrderConent
Action
Constant
.
order_conetnt_1
;
vs_transfer_food
.
setVisibility
(
View
.
GONE
);
vs_transfer_food
.
setVisibility
(
View
.
GONE
);
}
}
...
@@ -770,7 +770,7 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
...
@@ -770,7 +770,7 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
private
void
setActionName
()
{
private
void
setActionName
()
{
switch
(
mCurrentOperatType
)
{
switch
(
mCurrentOperatType
)
{
case
OrderConent
OperatType
Constant
.
transfer_food_2
:
case
OrderConent
Action
Constant
.
transfer_food_2
:
tv_action_name
.
setVisibility
(
View
.
VISIBLE
);
tv_action_name
.
setVisibility
(
View
.
VISIBLE
);
tv_action_name
.
setText
(
"轉移"
);
tv_action_name
.
setText
(
"轉移"
);
tv_action_name
.
setBackgroundColor
(
mPresenter
.
getFunctionList
().
get
(
3
).
getBackgroundColor
());
tv_action_name
.
setBackgroundColor
(
mPresenter
.
getFunctionList
().
get
(
3
).
getBackgroundColor
());
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/TableActivity.java
View file @
ea4cdbc5
...
@@ -11,15 +11,17 @@ import android.widget.SimpleAdapter;
...
@@ -11,15 +11,17 @@ import android.widget.SimpleAdapter;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.billy.cc.core.component.CC
;
import
com.billy.cc.core.component.CC
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.base.utils.log.LogUtil
;
import
com.gingersoft.gsa.cloud.base.utils.log.LogUtil
;
import
com.gingersoft.gsa.cloud.constans.GoldConstants
;
import
com.gingersoft.gsa.cloud.constans.GoldConstants
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.app.TableOperatTypeConstant
;
import
com.gingersoft.gsa.cloud.table.di.component.DaggerTableComponent
;
import
com.gingersoft.gsa.cloud.table.di.component.DaggerTableComponent
;
import
com.gingersoft.gsa.cloud.
base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.
table.mvp.contract.TableContract
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.event.InitTableEvent
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.event.InitTableEvent
;
import
com.gingersoft.gsa.cloud.table.mvp.model.constant.TableActionConstant
;
import
com.gingersoft.gsa.cloud.table.mvp.presenter.OrderContentPresenter
;
import
com.gingersoft.gsa.cloud.table.mvp.presenter.OrderContentPresenter
;
import
com.gingersoft.gsa.cloud.table.mvp.presenter.TablePresenter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.fragment.AllTableFragment
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.fragment.AllTableFragment
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.fragment.InputTableFragment
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.fragment.InputTableFragment
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.widget.SplitTableDialog
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.widget.SplitTableDialog
;
...
@@ -30,8 +32,6 @@ import com.jess.arms.base.BaseFragmentActivity;
...
@@ -30,8 +32,6 @@ import com.jess.arms.base.BaseFragmentActivity;
import
com.jess.arms.base.DefaultAdapter
;
import
com.jess.arms.base.DefaultAdapter
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.TableContract
;
import
com.gingersoft.gsa.cloud.table.mvp.presenter.TablePresenter
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaImageButton
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaImageButton
;
import
com.qmuiteam.qmui.arch.QMUIFragmentPagerAdapter
;
import
com.qmuiteam.qmui.arch.QMUIFragmentPagerAdapter
;
import
com.qmuiteam.qmui.layout.QMUIButton
;
import
com.qmuiteam.qmui.layout.QMUIButton
;
...
@@ -117,11 +117,6 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -117,11 +117,6 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
private
AllTableFragment
allTableFragment
,
stateTableFragment
;
private
AllTableFragment
allTableFragment
,
stateTableFragment
;
private
String
[]
mTabTitles
=
{
"編號"
,
"全部"
,
"狀態:全部"
};
private
String
[]
mTabTitles
=
{
"編號"
,
"全部"
,
"狀態:全部"
};
/**
* 分檯弹窗
*/
private
SplitTableDialog
mSplitTableDialog
;
/**
/**
* 切換餐檯狀態下拉框
* 切換餐檯狀態下拉框
*/
*/
...
@@ -133,7 +128,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -133,7 +128,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
/**
/**
* 當前所顯示餐檯狀態(默認:全部)
* 當前所顯示餐檯狀態(默認:全部)
*/
*/
private
int
mCurrentSelectTableStatus
=
Table
OperatType
Constant
.
table_status_0
;
private
int
mCurrentSelectTableStatus
=
Table
Action
Constant
.
table_status_0
;
@Override
@Override
...
@@ -162,7 +157,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -162,7 +157,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
@Subscriber
(
tag
=
"initTable_status_event"
)
@Subscriber
(
tag
=
"initTable_status_event"
)
private
void
notifyUpdateTableStatus
(
InitTableEvent
tableEvent
)
{
private
void
notifyUpdateTableStatus
(
InitTableEvent
tableEvent
)
{
mPresenter
.
initTable
(
tableEvent
.
getTableId
(),
tableEvent
.
getTableNumber
(),
false
);
mPresenter
.
initTable
(
tableEvent
.
getTableId
(),
tableEvent
.
getTableNumber
(),
false
);
cance
Operat
();
cance
TableAction
();
}
}
...
@@ -295,29 +290,38 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -295,29 +290,38 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
@Override
@Override
public
void
clickTableItem
(
TableBean
.
DataBean
dataBean
)
{
public
void
clickTableItem
(
TableBean
.
DataBean
dataBean
)
{
if
(
dataBean
==
null
)
if
(
dataBean
==
null
)
{
return
;
return
;
}
// boolean doAction = mPresenter.doTableAction(dataBean);
// if (!doAction) {
// if (dataBean.getSplitStatus() == 1) {
// showSplitTableDialog(dataBean.getId());
// } else {
// mPresenter.openTable(dataBean.getId(), null);
// }
// }
switch
(
mPresenter
.
getCurrentChooseOperatType
())
{
switch
(
mPresenter
.
getCurrentChooseOperatType
())
{
case
Table
OperatType
Constant
.
splite_table_1
:
case
Table
Action
Constant
.
splite_table_1
:
setOperatContentText
(
dataBean
.
getTableName
());
setOperatContentText
(
dataBean
.
getTableName
());
mPresenter
.
splitTable
(
dataBean
);
mPresenter
.
splitTable
(
dataBean
);
break
;
break
;
case
Table
OperatType
Constant
.
print_parper_2
:
case
Table
Action
Constant
.
print_parper_2
:
case
Table
OperatType
Constant
.
init_table_3
:
case
Table
Action
Constant
.
init_table_3
:
setOperatContentText
(
dataBean
.
getTableName
());
setOperatContentText
(
dataBean
.
getTableName
());
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
showSplitTableDialog
(
dataBean
.
getId
());
mPresenter
.
showSplitTableDialog
(
dataBean
.
getId
());
}
else
{
}
else
{
mPresenter
.
showOperatTipDialog
(
dataBean
);
mPresenter
.
showOperatTipDialog
(
dataBean
);
}
}
break
;
break
;
case
Table
OperatType
Constant
.
move_table_4
:
case
Table
Action
Constant
.
move_table_4
:
if
(
mPresenter
.
getOriginalTableId
()
==
dataBean
.
getId
())
{
if
(
mPresenter
.
getOriginalTableId
()
==
dataBean
.
getId
())
{
CommonTipDialog
.
showCancelDialog
(
this
,
"相同檯不能转檯"
,
OrderContentPresenter
.
class
,
mPresenter
,
""
,
null
,
null
);
CommonTipDialog
.
showCancelDialog
(
this
,
"相同檯不能转檯"
,
OrderContentPresenter
.
class
,
mPresenter
,
""
,
null
,
null
);
return
;
return
;
}
}
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
showSplitTableDialog
(
dataBean
.
getId
());
mPresenter
.
showSplitTableDialog
(
dataBean
.
getId
());
}
else
{
}
else
{
//獲取餐檯狀態
//獲取餐檯狀態
mPresenter
.
getTable
(
dataBean
);
mPresenter
.
getTable
(
dataBean
);
...
@@ -325,12 +329,12 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -325,12 +329,12 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
//獲取餐檯狀態
//獲取餐檯狀態
// mPresenter.getTable(dataBean.getId());
// mPresenter.getTable(dataBean.getId());
break
;
break
;
case
Table
OperatType
Constant
.
skyorder_mode_5
:
case
Table
Action
Constant
.
skyorder_mode_5
:
break
;
break
;
default
:
default
:
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
showSplitTableDialog
(
dataBean
.
getId
());
mPresenter
.
showSplitTableDialog
(
dataBean
.
getId
());
}
else
{
}
else
{
mPresenter
.
openTable
(
dataBean
.
getId
(),
null
);
mPresenter
.
openTable
(
dataBean
.
getId
(),
null
);
}
}
...
@@ -342,7 +346,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -342,7 +346,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
int
id
=
v
.
getId
();
int
id
=
v
.
getId
();
if
(
id
==
R
.
id
.
btn_cancel_operat
)
{
if
(
id
==
R
.
id
.
btn_cancel_operat
)
{
cance
Operat
();
cance
TableAction
();
}
}
}
}
...
@@ -353,37 +357,37 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -353,37 +357,37 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
ll_table_operat_content
.
setVisibility
(
View
.
VISIBLE
);
ll_table_operat_content
.
setVisibility
(
View
.
VISIBLE
);
rv_bottom_function
.
setVisibility
(
View
.
INVISIBLE
);
rv_bottom_function
.
setVisibility
(
View
.
INVISIBLE
);
//转台不需要过滤
//转台不需要过滤
if
(
mPresenter
.
getCurrentChooseOperatType
()
!=
Table
OperatType
Constant
.
move_table_4
)
{
if
(
mPresenter
.
getCurrentChooseOperatType
()
!=
Table
Action
Constant
.
move_table_4
)
{
//根据操作类型过滤一遍餐台
//根据操作类型过滤一遍餐台
mPresenter
.
filterTableByOperatType
();
mPresenter
.
filterTableByOperatType
();
}
}
set
Operat
Title
();
set
TableAction
Title
();
}
}
@Override
@Override
public
void
set
Operat
Title
()
{
public
void
set
TableAction
Title
()
{
switch
(
mPresenter
.
getCurrentChooseOperatType
())
{
switch
(
mPresenter
.
getCurrentChooseOperatType
())
{
case
Table
OperatType
Constant
.
splite_table_1
:
case
Table
Action
Constant
.
splite_table_1
:
tv_operat_hint
.
setText
(
"請選擇檯號"
);
tv_operat_hint
.
setText
(
"請選擇檯號"
);
tv_operat_content
.
setText
(
""
);
tv_operat_content
.
setText
(
""
);
mTopBar
.
setTitle
(
"分檯"
);
mTopBar
.
setTitle
(
"分檯"
);
break
;
break
;
case
Table
OperatType
Constant
.
print_parper_2
:
case
Table
Action
Constant
.
print_parper_2
:
tv_operat_hint
.
setText
(
"請選擇檯號"
);
tv_operat_hint
.
setText
(
"請選擇檯號"
);
tv_operat_content
.
setText
(
""
);
tv_operat_content
.
setText
(
""
);
mTopBar
.
setTitle
(
"上菜紙"
);
mTopBar
.
setTitle
(
"上菜紙"
);
break
;
break
;
case
Table
OperatType
Constant
.
init_table_3
:
case
Table
Action
Constant
.
init_table_3
:
tv_operat_hint
.
setText
(
"請選擇需要重置的檯號"
);
tv_operat_hint
.
setText
(
"請選擇需要重置的檯號"
);
tv_operat_content
.
setText
(
""
);
tv_operat_content
.
setText
(
""
);
mTopBar
.
setTitle
(
"重置檯號"
);
mTopBar
.
setTitle
(
"重置檯號"
);
break
;
break
;
case
Table
OperatType
Constant
.
move_table_4
:
case
Table
Action
Constant
.
move_table_4
:
tv_operat_hint
.
setText
(
"請選擇檯號"
);
tv_operat_hint
.
setText
(
"請選擇檯號"
);
tv_operat_content
.
setText
(
""
);
tv_operat_content
.
setText
(
""
);
mTopBar
.
setTitle
(
"轉檯"
);
mTopBar
.
setTitle
(
"轉檯"
);
break
;
break
;
case
Table
OperatType
Constant
.
skyorder_mode_5
:
case
Table
Action
Constant
.
skyorder_mode_5
:
break
;
break
;
}
}
...
@@ -392,7 +396,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -392,7 +396,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
}
}
@Override
@Override
public
void
cance
Operat
()
{
public
void
cance
TableAction
()
{
mPresenter
.
setCurrentChooseOperatType
(-
1
);
mPresenter
.
setCurrentChooseOperatType
(-
1
);
btn_cancel_operat
.
setVisibility
(
View
.
INVISIBLE
);
btn_cancel_operat
.
setVisibility
(
View
.
INVISIBLE
);
ll_table_operat_content
.
setVisibility
(
View
.
INVISIBLE
);
ll_table_operat_content
.
setVisibility
(
View
.
INVISIBLE
);
...
@@ -409,46 +413,10 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -409,46 +413,10 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
killMyself
();
killMyself
();
}
}
});
});
mPresenter
.
initTableParameter
();
mPresenter
.
initTable
Action
Parameter
();
mPresenter
.
filterTableByOperatType
();
mPresenter
.
filterTableByOperatType
();
}
}
private
void
showSplitTableDialog
(
int
tableId
)
{
if
(
mSplitTableDialog
==
null
)
{
mSplitTableDialog
=
new
SplitTableDialog
(
this
);
mSplitTableDialog
.
setOnClickListener
(
new
SplitTableDialog
.
OnClickListener
()
{
@Override
public
void
onItemClick
(
SplitTableDialog
dialog
,
TableBean
.
DataBean
dataBean
,
int
position
)
{
int
currentChooseOperatType
=
mPresenter
.
getCurrentChooseOperatType
();
switch
(
currentChooseOperatType
)
{
case
TableOperatTypeConstant
.
print_parper_2
:
case
TableOperatTypeConstant
.
init_table_3
:
mPresenter
.
showOperatTipDialog
(
dataBean
);
break
;
case
TableOperatTypeConstant
.
move_table_4
:
mSplitTableDialog
.
closeDialog
();
//獲取餐檯狀態
mPresenter
.
getTable
(
dataBean
);
break
;
default
:
mSplitTableDialog
.
closeDialog
();
mPresenter
.
openTable
(
dataBean
.
getId
(),
dataBean
);
break
;
}
}
});
mSplitTableDialog
.
setOnRetryListener
(
new
BaseRetryDialog
.
OnRetryListener
()
{
@Override
public
void
onRetryClick
()
{
mPresenter
.
getSplitTables
(
tableId
);
}
});
}
mSplitTableDialog
.
setMainTableId
(
tableId
);
mSplitTableDialog
.
build
().
show
();
mPresenter
.
getSplitTables
(
tableId
);
}
@Override
@Override
public
void
startMealStandActivity
()
{
public
void
startMealStandActivity
()
{
startActivity
(
new
Intent
(
this
,
MealStandActivity
.
class
));
startActivity
(
new
Intent
(
this
,
MealStandActivity
.
class
));
...
@@ -693,8 +661,5 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -693,8 +661,5 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
this
.
mCurrentSelectTableStatus
=
mCurrentSelectTableStatus
;
this
.
mCurrentSelectTableStatus
=
mCurrentSelectTableStatus
;
}
}
public
SplitTableDialog
getSplitTableDialog
()
{
return
mSplitTableDialog
;
}
}
}
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