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
3639ad20
Commit
3639ad20
authored
Sep 24, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、餐檯代碼結構調整 2、賬單管理折扣未送單 先送單再進入結賬頁
parent
9a665eff
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
332 additions
and
305 deletions
+332
-305
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Function.java
+1
-4
base-module/src/main/java/com/gingersoft/gsa/cloud/patterns/Strategy.java
+14
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/contract/TableContract.java
+4
-3
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/constant/TableActionConstant.java
+0
-12
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/PrintServingPaperAction.java
+0
-50
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/ResetTableAction.java
+0
-34
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/SplitTableStrategy.java
+0
-13
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/TableActionStrategy.java
+0
-46
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/action/MoveTableAction.java
+11
-7
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/action/PrintServingPaperAction.java
+59
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/action/PrintSkyOrderAction.java
+6
-11
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/action/ResetTableAction.java
+59
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/action/SplitTableAction.java
+8
-6
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/action/TableAction.java
+102
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
+2
-2
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/OrderContentPresenter.java
+23
-11
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
+0
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/MealStandActivity.java
+11
-11
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderContentActivity.java
+7
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderPayActivity.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/TableActivity.java
+22
-92
table-module/src/main/res/layout/table_activity_table.xml
+2
-2
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Function.java
View file @
3639ad20
...
...
@@ -8,9 +8,6 @@ import org.greenrobot.greendao.annotation.NotNull;
import
org.greenrobot.greendao.annotation.Property
;
import
org.greenrobot.greendao.annotation.Transient
;
import
lombok.Data
;
import
lombok.extern.java.Log
;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
...
...
@@ -35,7 +32,7 @@ public class Function {
private
String
resName
;
private
String
resUrl
;
private
String
imageURL
;
/
/暫時沒有imageURL,用本地資源代替
/
**暫時沒有imageURL,用本地資源代替*/
private
int
icRes
;
/**狀態
* 0 未开通
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/patterns/Strategy.java
0 → 100644
View file @
3639ad20
package
com
.
gingersoft
.
gsa
.
cloud
.
patterns
;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-09-24
* 修订历史:2020-09-24
* 描述:
*/
public
interface
Strategy
<
T
>
{
/**具體操作行為實現方法*/
void
action
(
T
t
);
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/contract/TableContract.java
View file @
3639ad20
...
...
@@ -6,6 +6,7 @@ import com.gingersoft.gsa.cloud.database.bean.Modifier;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.BaseOrderRespose
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.TableDetail
;
import
com.gingersoft.gsa.cloud.table.mvp.model.table.action.TableAction
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.fragment.AllTableFragment
;
import
com.jess.arms.base.DefaultAdapter
;
import
com.jess.arms.mvp.IView
;
...
...
@@ -49,13 +50,13 @@ public interface TableContract {
void
setBottomFunctionRecycleLayoutManager
(
int
orientation
);
void
setCurrent
OperatType
(
int
type
);
void
setCurrent
TableAction
(
TableAction
action
);
void
set
Operat
ContentText
(
String
contentText
);
void
set
TableAction
ContentText
(
String
contentText
);
String
getOperatContentText
();
void
setTableActionTitle
();
void
setTableActionTitle
(
TableAction
action
);
void
canceTableAction
();
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/constant/TableActionConstant.java
View file @
3639ad20
...
...
@@ -24,16 +24,4 @@ public interface TableActionConstant {
int
table_status_4
=
4
;
int
table_status_5
=
5
;
/**
* 1#分台
* 2#上菜纸
* 3#重置
* 4#转台
* 5#sky_order
*/
int
splite_table_1
=
1
;
int
print_parper_2
=
2
;
int
init_table_3
=
3
;
int
move_table_4
=
4
;
int
skyorder_mode_5
=
5
;
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/PrintServingPaperAction.java
deleted
100644 → 0
View file @
9a665eff
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/ResetTableAction.java
deleted
100644 → 0
View file @
9a665eff
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/SplitTableStrategy.java
deleted
100644 → 0
View file @
9a665eff
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
deleted
100644 → 0
View file @
9a665eff
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/model/table/MoveTableAction.java
→
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/
action/
MoveTableAction.java
View file @
3639ad20
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
;
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
.
action
;
import
android.content.Context
;
...
...
@@ -11,21 +11,25 @@ import com.gingersoft.gsa.cloud.base.common.bean.table.TableBean;
* 修订历史:2020-09-23
* 描述:餐檯模式-轉台{@link com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity}
*/
public
class
MoveTableAction
extends
TableActionStrategy
implements
SplitTableStrategy
{
public
class
MoveTableAction
extends
TableAction
{
public
MoveTableAction
(
Context
context
)
{
super
(
context
);
super
(
context
,
"轉台"
,
"請選擇檯號"
,
""
);
}
@Override
public
void
action
(
TableBean
.
DataBean
dataBean
)
{
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
showSplitTableDialogAction
();
}
else
{
//獲取餐檯狀態
moveTable
(
dataBean
);
}
}
@Override
public
void
splitTableAction
(
)
{
public
boolean
filterTableCondition
(
TableBean
.
DataBean
dataBean
)
{
return
true
;
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/action/PrintServingPaperAction.java
0 → 100644
View file @
3639ad20
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
.
action
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
/**
* 作者: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
TableAction
{
public
PrintServingPaperAction
(
Context
context
)
{
super
(
context
,
"上菜紙"
,
"請選擇檯號"
,
""
);
}
@Override
public
void
action
(
TableBean
.
DataBean
dataBean
)
{
setOperatContentText
(
dataBean
.
getTableName
());
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
showSplitTableDialogAction
();
}
else
{
showActionTipDialog
(
dataBean
);
}
}
@Override
public
boolean
filterTableCondition
(
TableBean
.
DataBean
dataBean
)
{
return
dataBean
.
getStatus
()
!=
0
;
}
public
void
showActionTipDialog
(
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
);
}
});
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
→
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/
action/
PrintSkyOrderAction.java
View file @
3639ad20
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
;
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
.
action
;
import
android.content.Context
;
...
...
@@ -11,26 +11,21 @@ import com.gingersoft.gsa.cloud.base.common.bean.table.TableBean;
* 修订历史:2020-09-23
* 描述:餐檯模式-打印skyorder碼{@link com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity}
*/
public
class
PrintSkyOrderAction
extends
TableAction
Strategy
implements
SplitTableStrategy
{
public
class
PrintSkyOrderAction
extends
TableAction
{
public
PrintSkyOrderAction
(
Context
context
)
{
super
(
context
);
super
(
context
,
"打印skyorder"
,
"請選擇檯號"
,
""
);
}
@Override
public
void
splitTableAction
()
{
}
@Override
public
void
action
(
TableBean
.
DataBean
dataBean
)
{
}
@Override
public
void
cancel
(
)
{
public
boolean
filterTableCondition
(
TableBean
.
DataBean
dataBean
)
{
return
true
;
}
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/action/ResetTableAction.java
0 → 100644
View file @
3639ad20
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
.
action
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
/**
* 作者: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
TableAction
{
public
ResetTableAction
(
Context
context
)
{
super
(
context
,
"重置餐檯"
,
"請選擇需要重置的檯號"
,
""
);
}
@Override
public
void
action
(
TableBean
.
DataBean
dataBean
)
{
setOperatContentText
(
dataBean
.
getTableName
());
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
showSplitTableDialogAction
();
}
else
{
showActionTipDialog
(
dataBean
);
}
}
@Override
public
boolean
filterTableCondition
(
TableBean
.
DataBean
dataBean
)
{
return
dataBean
.
getUseStatus
()
==
1
||
dataBean
.
getSplitStatus
()
==
1
;
}
public
void
showActionTipDialog
(
TableBean
.
DataBean
dataBean
)
{
QMUIDialog
.
MessageDialogBuilder
dialogBuilder
=
new
QMUIDialog
.
MessageDialogBuilder
(
mContext
);
dialogBuilder
.
setTitleIcon
(
R
.
drawable
.
qmui_icon_dialog_doubt
);
dialogBuilder
.
setMessage
(
"是否確認重置"
+
dataBean
.
getTableName
()
+
"號檯?"
);
dialogBuilder
.
addAction
(
0
,
"確認"
,
QMUIDialogAction
.
ACTION_PROP_NEGATIVE
,
new
QMUIDialogAction
.
ActionListener
()
{
@Override
public
void
onClick
(
QMUIDialog
dialog
,
int
index
)
{
dialog
.
dismiss
();
resetTable
(
dataBean
);
}
});
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/SplitTableAction.java
→
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/
action/
SplitTableAction.java
View file @
3639ad20
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
;
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
.
action
;
import
android.content.Context
;
...
...
@@ -11,19 +11,21 @@ import com.gingersoft.gsa.cloud.base.common.bean.table.TableBean;
* 修订历史:2020-09-23
* 描述:餐檯模式-分檯{@link com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity}
*/
public
class
SplitTableAction
extends
TableAction
Strategy
{
public
class
SplitTableAction
extends
TableAction
{
public
SplitTableAction
(
Context
context
)
{
super
(
context
);
super
(
context
,
"分檯"
,
"請選擇檯號"
,
""
);
}
@Override
public
void
action
(
TableBean
.
DataBean
dataBean
)
{
setOperatContentText
(
dataBean
.
getTableName
());
splitTableAction
(
dataBean
);
}
@Override
public
void
cancel
(
)
{
public
boolean
filterTableCondition
(
TableBean
.
DataBean
dataBean
)
{
return
dataBean
.
getStatus
()
!=
0
;
}
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/table/action/TableAction.java
0 → 100644
View file @
3639ad20
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
model
.
table
.
action
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.base.common.bean.table.TableBean
;
import
com.gingersoft.gsa.cloud.patterns.Strategy
;
import
lombok.Data
;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-09-23
* 修订历史:2020-09-23
* 描述:餐檯功能策略類,所有餐檯功能都需要繼承這個類
*/
@Data
public
abstract
class
TableAction
implements
Strategy
<
TableBean
.
DataBean
>
{
public
Context
mContext
;
protected
String
actionTitle
;
protected
String
actionHint
;
protected
String
actionContent
;
public
TableAction
(
Context
mContext
)
{
this
.
mContext
=
mContext
;
}
public
TableAction
(
Context
context
,
String
actionTitle
,
String
actionHint
,
String
actionContent
)
{
this
.
mContext
=
context
;
this
.
actionTitle
=
actionTitle
;
this
.
actionHint
=
actionHint
;
this
.
actionContent
=
actionContent
;
}
/**不同餐檯操作,對餐檯的過濾條件*/
public
abstract
boolean
filterTableCondition
(
TableBean
.
DataBean
dataBean
);
protected
void
setOperatContentText
(
String
content
)
{
if
(
actionListener
!=
null
)
{
actionListener
.
setOperatContentText
(
content
);
}
}
protected
void
resetTable
(
TableBean
.
DataBean
tableBean
)
{
if
(
actionListener
!=
null
)
{
actionListener
.
resetTable
(
tableBean
);
}
}
protected
void
moveTable
(
TableBean
.
DataBean
tableBean
)
{
if
(
actionListener
!=
null
)
{
actionListener
.
moveTable
(
tableBean
);
}
}
protected
void
loadOrderToPrint
(
TableBean
.
DataBean
tableBean
)
{
if
(
actionListener
!=
null
)
{
actionListener
.
loadOrderToPrint
(
tableBean
);
}
}
protected
void
showSplitTableDialogAction
()
{
if
(
actionListener
!=
null
)
{
actionListener
.
showSplitTableDialogAction
();
}
}
protected
void
splitTableAction
(
TableBean
.
DataBean
tableBean
)
{
if
(
actionListener
!=
null
)
{
actionListener
.
splitTableAction
(
tableBean
);
}
}
public
void
cancel
()
{
if
(
actionListener
!=
null
)
{
actionListener
.
cancel
();
}
}
private
OnActionListener
actionListener
;
public
void
setActionListener
(
OnActionListener
actionListener
)
{
this
.
actionListener
=
actionListener
;
}
public
interface
OnActionListener
{
void
setOperatContentText
(
String
content
);
void
resetTable
(
TableBean
.
DataBean
tableBean
);
void
moveTable
(
TableBean
.
DataBean
tableBean
);
void
loadOrderToPrint
(
TableBean
.
DataBean
tableBean
);
void
splitTableAction
(
TableBean
.
DataBean
tableBean
);
void
showSplitTableDialogAction
();
void
cancel
();
}
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
View file @
3639ad20
...
...
@@ -394,7 +394,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
// }
// }
// }
pr
ivate
void
addSentOrderDiscount
()
{
pr
otected
void
addSentOrderDiscount
()
{
OrderBean
orderBean
=
myOrderManage
.
getOrderBean
();
if
(
orderBean
!=
null
)
{
List
<
OrderDiscount
.
Respose
>
discountDetails
=
orderBean
.
getDiscountDetails
();
...
...
@@ -450,7 +450,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
/**
* 添加餐檯服務費
*/
pr
ivate
void
addTableServiceAmount
()
{
pr
otected
void
addTableServiceAmount
()
{
TableBean
.
DataBean
dataBean
=
OpenTableManage
.
getDefault
().
getTableBean
();
if
(
dataBean
==
null
)
{
return
;
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/OrderContentPresenter.java
View file @
3639ad20
...
...
@@ -12,14 +12,15 @@ import com.gingersoft.gsa.cloud.aspectj.XClickUtil;
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.BillOrderMoney
;
import
com.gingersoft.gsa.cloud.base.common.bean.discount.CouponDiscountBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.MemberInfo
;
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.
table.Table
Bean
;
import
com.gingersoft.gsa.cloud.base.common.bean.
table.TableExtBean
;
import
com.gingersoft.gsa.cloud.base.common.bean.
discount.CouponDiscount
Bean
;
import
com.gingersoft.gsa.cloud.base.common.bean.
discount.CouponDiscountResult
;
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.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.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.constans.GoldConstants
;
...
...
@@ -29,9 +30,9 @@ import com.gingersoft.gsa.cloud.database.bean.Function;
import
com.gingersoft.gsa.cloud.function.FunctionManager
;
import
com.gingersoft.gsa.cloud.print.PrinterUtils
;
import
com.gingersoft.gsa.cloud.table.ComponentTable
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.OrderContentContract
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.BaseOrderRespose
;
import
com.gingersoft.gsa.cloud.base.common.bean.discount.CouponDiscountResult
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.TableDetail
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.request.AddOrderRequest
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.request.CreateOrderRequest
;
...
...
@@ -50,6 +51,7 @@ import com.gingersoft.gsa.cloud.ui.widget.dialog.CommonTipDialog;
import
com.jess.arms.di.scope.ActivityScope
;
import
com.jess.arms.http.imageloader.ImageLoader
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.scwang.smartrefresh.layout.api.RefreshLayout
;
...
...
@@ -356,7 +358,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
mRootView
.
showMessage
(
"送單成功"
);
//刷新食品列表
if
(
afterToActivity
!=
null
)
{
update
FoodList
(
info
);
update
OrderDetails
(
info
);
}
printSendOrder
(
afterToActivity
);
}
...
...
@@ -506,7 +508,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
@Override
public
void
onNext
(
@NonNull
BaseOrderRespose
info
)
{
update
FoodList
(
info
);
update
OrderDetails
(
info
);
}
});
}
...
...
@@ -652,9 +654,9 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
mRootView
.
showMessage
(
"轉移成功"
);
updateFoodList
(
info
);
updateOrderDetails
(
info
);
updateBillOrderItem
();
IActivity
.
initOrderDetail
();
IActivity
.
backPressed
();
}
else
{
...
...
@@ -771,12 +773,14 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
}
/**
* 更新
食品列表
* 更新
訂單詳情
*
* @param info
*/
private
void
updateFoodList
(
BaseOrderRespose
info
)
{
if
(
info
.
getData
()
!=
null
&&
info
.
getData
().
getOrderDetails
()
!=
null
)
{
private
void
updateOrderDetails
(
BaseOrderRespose
info
)
{
if
(
info
.
getData
()
!=
null
)
{
if
(
info
.
getData
().
getOrderDetails
()
!=
null
)
{
OpenTableManage
.
getDefault
().
setPeopleNumber
(
info
.
getData
().
getPerson
());
//緩存訂單信息
...
...
@@ -789,6 +793,14 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
mSelectMealAdapter
.
notifyDataSetChanged
();
mSelectMealAdapter
.
setIndex
();
}
for
(
BillOrderMoney
billOrderMoney:
mOrderMoneyList
)
{
//將已有折扣 服務費狀態改為已送單
billOrderMoney
.
setStatus
(
BillOrderMoney
.
BILL_ITEM_ORDER_SENT_STATUS
);
billOrderMoney
.
setTextColor
(
ArmsUtils
.
getColor
(
IActivity
,
R
.
color
.
theme_black
));
}
mOrderMoneyAdapter
.
notifyDataSetChanged
();
}
}
/**
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
View file @
3639ad20
This diff is collapsed.
Click to expand it.
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/MealStandActivity.java
View file @
3639ad20
...
...
@@ -23,16 +23,6 @@ import android.widget.LinearLayout;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.recyclerview.widget.DefaultItemAnimator
;
import
androidx.recyclerview.widget.GridLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.viewpager.widget.ViewPager
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.common.bean.BillOrderMoney
;
import
com.gingersoft.gsa.cloud.base.common.bean.MemberInfo
;
...
...
@@ -84,6 +74,15 @@ import java.util.ArrayList;
import
java.util.Arrays
;
import
java.util.List
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.recyclerview.widget.DefaultItemAnimator
;
import
androidx.recyclerview.widget.GridLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.viewpager.widget.ViewPager
;
import
butterknife.BindView
;
import
butterknife.OnClick
;
import
butterknife.OnLongClick
;
...
...
@@ -291,8 +290,9 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
mPresenter
.
initMealData
();
//搜索
keyView
.
setOnConfirmCallBack
(
inputText
->
{
if
(
TextUtils
.
isEmpty
(
inputText
))
if
(
TextUtils
.
isEmpty
(
inputText
))
{
return
;
}
mPresenter
.
toFindMeal
(
inputText
);
});
if
(!
MyOrderManage
.
getInstance
().
isModifyOrder
())
{
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderContentActivity.java
View file @
3639ad20
...
...
@@ -218,12 +218,19 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
//TODO 暫未分檯功能
// tableno = GSAApplication.tableContract.getTableno().trim() + "-" + GSAApplication.tableContract.getTableno_split().trim();
}
if
(
MyOrderManage
.
getInstance
().
getMemberInfo
()
!=
null
)
{
useMember
();
}
btn_table
.
setText
(
tableno
);
tv_time
.
setText
(
"時間:"
+
openTime
);
btn_people_num
.
setText
(
OpenTableManage
.
getDefault
().
getPeopleNumber
()
+
""
);
tv_server_main
.
setText
(
GsaCloudApplication
.
getMemberName
());
}
private
void
useMember
()
{
btn_table
.
setBackgroundResource
(
R
.
color
.
pink_300
);
}
@Override
protected
void
onPause
()
{
super
.
onPause
();
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderPayActivity.java
View file @
3639ad20
...
...
@@ -221,7 +221,6 @@ public class OrderPayActivity extends BaseActivity<OrderPayPresenter> implements
tableno
=
OpenTableManage
.
getDefault
().
getTableBean
().
getTableName
().
trim
()
+
"-"
+
OpenTableManage
.
getDefault
().
getSplitNo
().
trim
();
}
btn_table
.
setText
(
tableno
);
tv_time
.
setText
(
"時間:"
+
openTime
);
btn_people_num
.
setText
(
OpenTableManage
.
getDefault
().
getPeopleNumber
()
+
""
);
tv_server_main
.
setText
(
GsaCloudApplication
.
getMemberName
());
...
...
@@ -230,6 +229,7 @@ public class OrderPayActivity extends BaseActivity<OrderPayPresenter> implements
tv_action_name
.
setText
(
"結賬"
);
}
public
void
initOrderDetail
()
{
double
wholeAmount
=
mPresenter
.
getFoodTotal
();
tv_whole
.
setText
(
"合計 $"
+
wholeAmount
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/TableActivity.java
View file @
3639ad20
...
...
@@ -20,13 +20,10 @@ import com.gingersoft.gsa.cloud.table.di.component.DaggerTableComponent;
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.constant.TableActionConstant
;
import
com.gingersoft.gsa.cloud.table.mvp.
presenter.OrderContentPresenter
;
import
com.gingersoft.gsa.cloud.table.mvp.
model.table.action.TableAction
;
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.InputTableFragment
;
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.LoadingDialog
;
import
com.jess.arms.base.BaseFragmentActivity
;
import
com.jess.arms.base.DefaultAdapter
;
...
...
@@ -97,10 +94,10 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
@BindView
(
R2
.
id
.
ll_table_operat_content
)
LinearLayout
ll_table_operat_content
;
@BindView
(
R2
.
id
.
tv_
operat
_hint
)
TextView
tv_
operat
_hint
;
@BindView
(
R2
.
id
.
tv_
operat
_content
)
TextView
tv_
operat
_content
;
@BindView
(
R2
.
id
.
tv_
table_action
_hint
)
TextView
tv_
table_action
_hint
;
@BindView
(
R2
.
id
.
tv_
table_action
_content
)
TextView
tv_
table_action
_content
;
@BindView
(
R2
.
id
.
iv_tab_icon
)
ImageView
iv_tab_icon
;
...
...
@@ -257,9 +254,10 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
@Override
public
void
launchActivity
(
@NonNull
Intent
intent
)
{
if
(
intent
!=
null
)
if
(
intent
!=
null
)
{
ArmsUtils
.
startActivity
(
intent
);
}
}
@Override
public
void
killMyself
()
{
...
...
@@ -269,7 +267,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
@Override
public
void
returnTableList
(
List
<
TableBean
.
DataBean
>
dataBeanList
)
{
if
(
dataBeanList
!=
null
&&
dataBeanList
.
size
()
>
0
)
{
mPresenter
.
filterTableBy
OperatType
();
mPresenter
.
filterTableBy
Action
();
}
}
...
...
@@ -293,52 +291,13 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
if
(
dataBean
==
null
)
{
return
;
}
// boolean doAction = mPresenter.doTableAction(dataBean);
// if (!doAction) {
// if (dataBean.getSplitStatus() == 1) {
// showSplitTableDialog(dataBean.getId());
// } else {
// mPresenter.openTable(dataBean.getId(), null);
// }
// }
switch
(
mPresenter
.
getCurrentChooseOperatType
())
{
case
TableActionConstant
.
splite_table_1
:
setOperatContentText
(
dataBean
.
getTableName
());
mPresenter
.
splitTable
(
dataBean
);
break
;
case
TableActionConstant
.
print_parper_2
:
case
TableActionConstant
.
init_table_3
:
setOperatContentText
(
dataBean
.
getTableName
());
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
mPresenter
.
showSplitTableDialog
(
dataBean
.
getId
());
}
else
{
mPresenter
.
showOperatTipDialog
(
dataBean
);
}
break
;
case
TableActionConstant
.
move_table_4
:
if
(
mPresenter
.
getOriginalTableId
()
==
dataBean
.
getId
())
{
CommonTipDialog
.
showCancelDialog
(
this
,
"相同檯不能转檯"
,
OrderContentPresenter
.
class
,
mPresenter
,
""
,
null
,
null
);
return
;
}
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
mPresenter
.
showSplitTableDialog
(
dataBean
.
getId
());
}
else
{
//獲取餐檯狀態
mPresenter
.
getTable
(
dataBean
);
}
//獲取餐檯狀態
// mPresenter.getTable(dataBean.getId());
break
;
case
TableActionConstant
.
skyorder_mode_5
:
break
;
default
:
boolean
doAction
=
mPresenter
.
doTableAction
(
dataBean
);
if
(!
doAction
)
{
if
(
dataBean
.
getSplitStatus
()
==
1
)
{
mPresenter
.
showSplitTableDialog
(
dataBean
.
getId
());
}
else
{
mPresenter
.
openTable
(
dataBean
.
getId
(),
null
);
}
break
;
}
}
...
...
@@ -351,59 +310,30 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
}
@Override
public
void
setCurrentOperatType
(
int
type
)
{
mPresenter
.
setCurrentChooseOperatType
(
type
);
public
void
setCurrentTableAction
(
TableAction
action
)
{
btn_cancel_operat
.
setVisibility
(
View
.
VISIBLE
);
ll_table_operat_content
.
setVisibility
(
View
.
VISIBLE
);
rv_bottom_function
.
setVisibility
(
View
.
INVISIBLE
);
//转台不需要过滤
if
(
mPresenter
.
getCurrentChooseOperatType
()
!=
TableActionConstant
.
move_table_4
)
{
//根据操作类型过滤一遍餐台
mPresenter
.
filterTableByOperatType
();
}
setTableActionTitle
();
setTableActionTitle
(
action
);
}
@Override
public
void
setTableActionTitle
()
{
switch
(
mPresenter
.
getCurrentChooseOperatType
())
{
case
TableActionConstant
.
splite_table_1
:
tv_operat_hint
.
setText
(
"請選擇檯號"
);
tv_operat_content
.
setText
(
""
);
mTopBar
.
setTitle
(
"分檯"
);
break
;
case
TableActionConstant
.
print_parper_2
:
tv_operat_hint
.
setText
(
"請選擇檯號"
);
tv_operat_content
.
setText
(
""
);
mTopBar
.
setTitle
(
"上菜紙"
);
break
;
case
TableActionConstant
.
init_table_3
:
tv_operat_hint
.
setText
(
"請選擇需要重置的檯號"
);
tv_operat_content
.
setText
(
""
);
mTopBar
.
setTitle
(
"重置檯號"
);
break
;
case
TableActionConstant
.
move_table_4
:
tv_operat_hint
.
setText
(
"請選擇檯號"
);
tv_operat_content
.
setText
(
""
);
mTopBar
.
setTitle
(
"轉檯"
);
break
;
case
TableActionConstant
.
skyorder_mode_5
:
break
;
}
public
void
setTableActionTitle
(
TableAction
action
)
{
mTopBar
.
setTitle
(
action
.
getActionTitle
());
tv_table_action_hint
.
setText
(
action
.
getActionHint
());
tv_table_action_content
.
setText
(
action
.
getActionContent
());
//移除back鍵
mTopBar
.
removeAllLeftViews
();
}
@Override
public
void
canceTableAction
()
{
mPresenter
.
setCurrentChooseOperatType
(-
1
);
btn_cancel_operat
.
setVisibility
(
View
.
INVISIBLE
);
ll_table_operat_content
.
setVisibility
(
View
.
INVISIBLE
);
rv_bottom_function
.
setVisibility
(
View
.
VISIBLE
);
tv_
operat
_hint
.
setText
(
""
);
tv_
operat
_content
.
setText
(
""
);
tv_
table_action
_hint
.
setText
(
""
);
tv_
table_action
_content
.
setText
(
""
);
mTopBar
.
setTitle
(
"餐檯模式"
);
//添加back鍵
mTopBar
.
removeAllLeftViews
();
...
...
@@ -414,7 +344,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
}
});
mPresenter
.
initTableActionParameter
();
mPresenter
.
filterTableBy
OperatType
();
mPresenter
.
filterTableBy
Action
();
}
@Override
...
...
@@ -423,13 +353,13 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
}
@Override
public
void
set
Operat
ContentText
(
String
contentText
)
{
tv_
operat
_content
.
setText
(
contentText
);
public
void
set
TableAction
ContentText
(
String
contentText
)
{
tv_
table_action
_content
.
setText
(
contentText
);
}
@Override
public
String
getOperatContentText
()
{
return
tv_
operat
_content
.
getText
().
toString
();
return
tv_
table_action
_content
.
getText
().
toString
();
}
@Override
...
...
table-module/src/main/res/layout/table_activity_table.xml
View file @
3639ad20
...
...
@@ -48,7 +48,7 @@
android:visibility=
"invisible"
>
<TextView
android:id=
"@+id/tv_
operat
_hint"
android:id=
"@+id/tv_
table_action
_hint"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
""
...
...
@@ -56,7 +56,7 @@
android:textSize=
"@dimen/font_normal3"
/>
<TextView
android:id=
"@+id/tv_
operat
_content"
android:id=
"@+id/tv_
table_action
_content"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/normal_space"
...
...
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