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
495d306d
Commit
495d306d
authored
Jul 31, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、餐牌返回餐檯為紅檯問題 2、分檯重置 3、折扣結構邏輯問題
parent
8c343e7a
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
95 additions
and
44 deletions
+95
-44
base-module/src/main/java/com/gingersoft/gsa/cloud/base/common/bean/RestaurantExpandInfoUtils.java
+5
-4
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/ExpandConstant.java
+9
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Discount.java
+34
-22
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DiscountDao.java
+10
-10
base-module/src/main/java/com/gingersoft/gsa/cloud/database/utils/DiscountDaoUtils.java
+1
-1
base-module/src/main/res/values/colors.xml
+1
-0
manager-module/src/main/java/com/gingersoft/gsa/cloud/manager/mvp/ui/fragment/TableListFragment.java
+3
-3
table-module/src/main/java/com/gingersoft/gsa/cloud/table/app/TableOperatTypeConstant.java
+2
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/AllTablePresenter.java
+7
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
+6
-4
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/StateTablePresenter.java
+7
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/TableActivity.java
+2
-0
table-module/src/main/res/drawable/table_shape_status_split.xml
+8
-0
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/base/common/bean/RestaurantExpandInfoUtils.java
View file @
495d306d
...
@@ -2,6 +2,7 @@ package com.gingersoft.gsa.cloud.base.common.bean;
...
@@ -2,6 +2,7 @@ package com.gingersoft.gsa.cloud.base.common.bean;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.base.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.constans.ExpandConstant
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
import
java.util.List
;
import
java.util.List
;
...
@@ -23,16 +24,16 @@ public class RestaurantExpandInfoUtils {
...
@@ -23,16 +24,16 @@ public class RestaurantExpandInfoUtils {
*/
*/
public
static
void
setCommonExpandInfo
(
List
<
ExpandInfo
>
expandInfoList
)
{
public
static
void
setCommonExpandInfo
(
List
<
ExpandInfo
>
expandInfoList
)
{
for
(
ExpandInfo
expandInfo
:
expandInfoList
)
{
for
(
ExpandInfo
expandInfo
:
expandInfoList
)
{
if
(
expandInfo
.
getSettingName
().
equals
(
"Rounding"
))
{
if
(
expandInfo
.
getSettingName
().
equals
(
ExpandConstant
.
Rounding
))
{
MoneyUtil
.
rounding
=
expandInfo
.
getValueInt
();
MoneyUtil
.
rounding
=
expandInfo
.
getValueInt
();
}
}
if
(
expandInfo
.
getSettingName
().
equals
(
"RoundingDecimal"
))
{
if
(
expandInfo
.
getSettingName
().
equals
(
ExpandConstant
.
RoundingDecimal
))
{
MoneyUtil
.
RoundingDecimal
=
expandInfo
.
getValueInt
();
MoneyUtil
.
RoundingDecimal
=
expandInfo
.
getValueInt
();
}
}
if
(
expandInfo
.
getSettingName
().
equals
(
"ItemDecimals"
))
{
if
(
expandInfo
.
getSettingName
().
equals
(
ExpandConstant
.
ItemDecimals
))
{
MoneyUtil
.
ItemDecimals
=
expandInfo
.
getValueInt
();
MoneyUtil
.
ItemDecimals
=
expandInfo
.
getValueInt
();
}
}
if
(
expandInfo
.
getSettingName
().
equals
(
"MergeSendFood"
))
{
if
(
expandInfo
.
getSettingName
().
equals
(
ExpandConstant
.
MergeSendFood
))
{
GsaCloudApplication
.
androidSetting
.
setMergeSendFood
(
Boolean
.
parseBoolean
(
expandInfo
.
getValueChar
()));
GsaCloudApplication
.
androidSetting
.
setMergeSendFood
(
Boolean
.
parseBoolean
(
expandInfo
.
getValueChar
()));
}
}
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/ExpandConstant.java
View file @
495d306d
...
@@ -4,4 +4,13 @@ public class ExpandConstant {
...
@@ -4,4 +4,13 @@ public class ExpandConstant {
public
final
static
String
DeliveryPrintCount
=
"DeliveryPrintCount"
;
public
final
static
String
DeliveryPrintCount
=
"DeliveryPrintCount"
;
public
final
static
String
Rounding
=
"Rounding"
;
public
final
static
String
RoundingDecimal
=
"RoundingDecimal"
;
public
final
static
String
ItemDecimals
=
"ItemDecimals"
;
public
final
static
String
MergeSendFood
=
"MergeSendFood"
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Discount.java
View file @
495d306d
...
@@ -37,7 +37,7 @@ public class Discount {
...
@@ -37,7 +37,7 @@ public class Discount {
/**类型#0:金额;1:折扣;*/
/**类型#0:金额;1:折扣;*/
private
int
type
;
private
int
type
;
/**折扣可使用范围#0:食品;1:账单;*/
/**折扣可使用范围#0:食品;1:账单;*/
private
String
discount
_type
;
private
String
discount
Type
;
/**状态#0:启用;1:禁用;*/
/**状态#0:启用;1:禁用;*/
private
int
status
;
private
int
status
;
/**折扣描述*/
/**折扣描述*/
...
@@ -50,16 +50,22 @@ public class Discount {
...
@@ -50,16 +50,22 @@ public class Discount {
@Generated
(
hash
=
650388607
)
@Generated
(
hash
=
901376651
)
public
Discount
(
Long
id
,
int
restaurant_id
,
double
amount
,
double
discount_value
,
public
Discount
(
Long
id
,
int
restaurant_id
,
double
amount
,
double
discount_value
,
int
type
,
String
discount
_t
ype
,
int
status
,
String
remark
,
String
begin_time
,
int
type
,
String
discount
T
ype
,
int
status
,
String
remark
,
String
begin_time
,
String
end_time
)
{
String
end_time
)
{
this
.
id
=
id
;
this
.
id
=
id
;
this
.
restaurant_id
=
restaurant_id
;
this
.
restaurant_id
=
restaurant_id
;
this
.
amount
=
amount
;
this
.
amount
=
amount
;
this
.
discount_value
=
discount_value
;
this
.
discount_value
=
discount_value
;
this
.
type
=
type
;
this
.
type
=
type
;
this
.
discount
_type
=
discount_t
ype
;
this
.
discount
Type
=
discountT
ype
;
this
.
status
=
status
;
this
.
status
=
status
;
this
.
remark
=
remark
;
this
.
remark
=
remark
;
this
.
begin_time
=
begin_time
;
this
.
begin_time
=
begin_time
;
...
@@ -80,6 +86,12 @@ public class Discount {
...
@@ -80,6 +86,12 @@ public class Discount {
/**
/**
* 計算折扣金額
* 計算折扣金額
* @param discount
* @param discount
...
@@ -200,24 +212,6 @@ public class Discount {
...
@@ -200,24 +212,6 @@ public class Discount {
public
String
getDiscount_type
()
{
return
this
.
discount_type
;
}
public
void
setDiscount_type
(
String
discount_type
)
{
this
.
discount_type
=
discount_type
;
}
public
int
getStatus
()
{
public
int
getStatus
()
{
return
this
.
status
;
return
this
.
status
;
}
}
...
@@ -288,4 +282,22 @@ public class Discount {
...
@@ -288,4 +282,22 @@ public class Discount {
public
String
getDiscountType
()
{
return
this
.
discountType
;
}
public
void
setDiscountType
(
String
discountType
)
{
this
.
discountType
=
discountType
;
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DiscountDao.java
View file @
495d306d
...
@@ -29,7 +29,7 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -29,7 +29,7 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
public
final
static
Property
Amount
=
new
Property
(
2
,
double
.
class
,
"amount"
,
false
,
"AMOUNT"
);
public
final
static
Property
Amount
=
new
Property
(
2
,
double
.
class
,
"amount"
,
false
,
"AMOUNT"
);
public
final
static
Property
Discount_value
=
new
Property
(
3
,
double
.
class
,
"discount_value"
,
false
,
"DISCOUNT_VALUE"
);
public
final
static
Property
Discount_value
=
new
Property
(
3
,
double
.
class
,
"discount_value"
,
false
,
"DISCOUNT_VALUE"
);
public
final
static
Property
Type
=
new
Property
(
4
,
int
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
Type
=
new
Property
(
4
,
int
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
Discount
_type
=
new
Property
(
5
,
String
.
class
,
"discount_t
ype"
,
false
,
"DISCOUNT_TYPE"
);
public
final
static
Property
Discount
Type
=
new
Property
(
5
,
String
.
class
,
"discountT
ype"
,
false
,
"DISCOUNT_TYPE"
);
public
final
static
Property
Status
=
new
Property
(
6
,
int
.
class
,
"status"
,
false
,
"STATUS"
);
public
final
static
Property
Status
=
new
Property
(
6
,
int
.
class
,
"status"
,
false
,
"STATUS"
);
public
final
static
Property
Remark
=
new
Property
(
7
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
Remark
=
new
Property
(
7
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
Begin_time
=
new
Property
(
8
,
String
.
class
,
"begin_time"
,
false
,
"BEGIN_TIME"
);
public
final
static
Property
Begin_time
=
new
Property
(
8
,
String
.
class
,
"begin_time"
,
false
,
"BEGIN_TIME"
);
...
@@ -54,7 +54,7 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -54,7 +54,7 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
"\"AMOUNT\" REAL NOT NULL ,"
+
// 2: amount
"\"AMOUNT\" REAL NOT NULL ,"
+
// 2: amount
"\"DISCOUNT_VALUE\" REAL NOT NULL ,"
+
// 3: discount_value
"\"DISCOUNT_VALUE\" REAL NOT NULL ,"
+
// 3: discount_value
"\"TYPE\" INTEGER NOT NULL ,"
+
// 4: type
"\"TYPE\" INTEGER NOT NULL ,"
+
// 4: type
"\"DISCOUNT_TYPE\" TEXT,"
+
// 5: discount
_t
ype
"\"DISCOUNT_TYPE\" TEXT,"
+
// 5: discount
T
ype
"\"STATUS\" INTEGER NOT NULL ,"
+
// 6: status
"\"STATUS\" INTEGER NOT NULL ,"
+
// 6: status
"\"REMARK\" TEXT,"
+
// 7: remark
"\"REMARK\" TEXT,"
+
// 7: remark
"\"BEGIN_TIME\" TEXT,"
+
// 8: begin_time
"\"BEGIN_TIME\" TEXT,"
+
// 8: begin_time
...
@@ -80,9 +80,9 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -80,9 +80,9 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
stmt
.
bindDouble
(
4
,
entity
.
getDiscount_value
());
stmt
.
bindDouble
(
4
,
entity
.
getDiscount_value
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
String
discount
_type
=
entity
.
getDiscount_t
ype
();
String
discount
Type
=
entity
.
getDiscountT
ype
();
if
(
discount
_t
ype
!=
null
)
{
if
(
discount
T
ype
!=
null
)
{
stmt
.
bindString
(
6
,
discount
_t
ype
);
stmt
.
bindString
(
6
,
discount
T
ype
);
}
}
stmt
.
bindLong
(
7
,
entity
.
getStatus
());
stmt
.
bindLong
(
7
,
entity
.
getStatus
());
...
@@ -115,9 +115,9 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -115,9 +115,9 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
stmt
.
bindDouble
(
4
,
entity
.
getDiscount_value
());
stmt
.
bindDouble
(
4
,
entity
.
getDiscount_value
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
String
discount
_type
=
entity
.
getDiscount_t
ype
();
String
discount
Type
=
entity
.
getDiscountT
ype
();
if
(
discount
_t
ype
!=
null
)
{
if
(
discount
T
ype
!=
null
)
{
stmt
.
bindString
(
6
,
discount
_t
ype
);
stmt
.
bindString
(
6
,
discount
T
ype
);
}
}
stmt
.
bindLong
(
7
,
entity
.
getStatus
());
stmt
.
bindLong
(
7
,
entity
.
getStatus
());
...
@@ -150,7 +150,7 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -150,7 +150,7 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
cursor
.
getDouble
(
offset
+
2
),
// amount
cursor
.
getDouble
(
offset
+
2
),
// amount
cursor
.
getDouble
(
offset
+
3
),
// discount_value
cursor
.
getDouble
(
offset
+
3
),
// discount_value
cursor
.
getInt
(
offset
+
4
),
// type
cursor
.
getInt
(
offset
+
4
),
// type
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// discount
_t
ype
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// discount
T
ype
cursor
.
getInt
(
offset
+
6
),
// status
cursor
.
getInt
(
offset
+
6
),
// status
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// remark
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// remark
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// begin_time
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// begin_time
...
@@ -166,7 +166,7 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
...
@@ -166,7 +166,7 @@ public class DiscountDao extends AbstractDao<Discount, Long> {
entity
.
setAmount
(
cursor
.
getDouble
(
offset
+
2
));
entity
.
setAmount
(
cursor
.
getDouble
(
offset
+
2
));
entity
.
setDiscount_value
(
cursor
.
getDouble
(
offset
+
3
));
entity
.
setDiscount_value
(
cursor
.
getDouble
(
offset
+
3
));
entity
.
setType
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setType
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setDiscount
_t
ype
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setDiscount
T
ype
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setStatus
(
cursor
.
getInt
(
offset
+
6
));
entity
.
setStatus
(
cursor
.
getInt
(
offset
+
6
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setBegin_time
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setBegin_time
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/utils/DiscountDaoUtils.java
View file @
495d306d
...
@@ -162,7 +162,7 @@ public class DiscountDaoUtils {
...
@@ -162,7 +162,7 @@ public class DiscountDaoUtils {
// DiscountDao.Properties.Status.eq(0),
// DiscountDao.Properties.Status.eq(0),
// DiscountDao.Properties.Begin_time.le(currentTime),
// DiscountDao.Properties.Begin_time.le(currentTime),
// DiscountDao.Properties.End_time.ge(currentTime))).list();
// DiscountDao.Properties.End_time.ge(currentTime))).list();
return
queryBuilder
.
where
(
DiscountDao
.
Properties
.
Discount
_t
ype
.
like
(
discountType
)).
list
();
return
queryBuilder
.
where
(
DiscountDao
.
Properties
.
Discount
T
ype
.
like
(
discountType
)).
list
();
}
}
}
}
base-module/src/main/res/values/colors.xml
View file @
495d306d
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
<color
name=
"table_send"
>
#FF249B65
</color>
<color
name=
"table_send"
>
#FF249B65
</color>
<color
name=
"table_print"
>
#FFE5AC00
</color>
<color
name=
"table_print"
>
#FFE5AC00
</color>
<color
name=
"table_use"
>
#FFD14141
</color>
<color
name=
"table_use"
>
#FFD14141
</color>
<color
name=
"table_split"
>
#31BDF3
</color>
<color
name=
"pay_load_success"
>
#03a44e
</color>
<color
name=
"pay_load_success"
>
#03a44e
</color>
<color
name=
"pay_load_failure"
>
#de0e26
</color>
<color
name=
"pay_load_failure"
>
#de0e26
</color>
...
...
manager-module/src/main/java/com/gingersoft/gsa/cloud/manager/mvp/ui/fragment/TableListFragment.java
View file @
495d306d
...
@@ -168,7 +168,7 @@ public class TableListFragment extends BaseFragment<TableListPresenter> implemen
...
@@ -168,7 +168,7 @@ public class TableListFragment extends BaseFragment<TableListPresenter> implemen
initRecycleScrollListener
();
initRecycleScrollListener
();
mActivity
.
queryAreas
(
null
);
mActivity
.
queryAreas
(
null
);
mActivity
.
queryTables
(
null
);
mActivity
.
queryTables
(
null
);
mActivity
.
initGetTableTimer
();
//
mActivity.initGetTableTimer();
cb_all_select
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
cb_all_select
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
@Override
@Override
public
void
onCheckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
public
void
onCheckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
...
@@ -188,14 +188,14 @@ public class TableListFragment extends BaseFragment<TableListPresenter> implemen
...
@@ -188,14 +188,14 @@ public class TableListFragment extends BaseFragment<TableListPresenter> implemen
super
.
onResume
();
super
.
onResume
();
hideSoftInput
();
hideSoftInput
();
//開始刷新餐檯數據
//開始刷新餐檯數據
mActivity
.
onStartRefreshTableData
();
//
mActivity.onStartRefreshTableData();
}
}
@Override
@Override
public
void
onPause
()
{
public
void
onPause
()
{
super
.
onPause
();
super
.
onPause
();
//停止刷新餐檯數據
//停止刷新餐檯數據
mActivity
.
onPauseRefreshTableData
();
//
mActivity.onPauseRefreshTableData();
}
}
@Override
@Override
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/app/TableOperatTypeConstant.java
View file @
495d306d
...
@@ -15,12 +15,14 @@ public interface TableOperatTypeConstant {
...
@@ -15,12 +15,14 @@ public interface TableOperatTypeConstant {
* 2#已使用
* 2#已使用
* 3#已送單
* 3#已送單
* 4#已印單
* 4#已印單
* 5#已分檯
*/
*/
int
table_status_0
=
0
;
int
table_status_0
=
0
;
int
table_status_1
=
1
;
int
table_status_1
=
1
;
int
table_status_2
=
2
;
int
table_status_2
=
2
;
int
table_status_3
=
3
;
int
table_status_3
=
3
;
int
table_status_4
=
4
;
int
table_status_4
=
4
;
int
table_status_5
=
5
;
/**
/**
* 1#分台
* 1#分台
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/AllTablePresenter.java
View file @
495d306d
...
@@ -201,6 +201,13 @@ public class AllTablePresenter extends BasePresenter<AllTableContract.Model, All
...
@@ -201,6 +201,13 @@ public class AllTablePresenter extends BasePresenter<AllTableContract.Model, All
}
}
}
}
break
;
break
;
case
TableOperatTypeConstant
.
table_status_5
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
(
datasBeans
.
get
(
i
).
getStatus
()
==
4
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
}
}
break
;
default
:
default
:
mTableList
.
addAll
(
datasBeans
);
mTableList
.
addAll
(
datasBeans
);
break
;
break
;
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
View file @
495d306d
...
@@ -2,6 +2,7 @@ package com.gingersoft.gsa.cloud.table.mvp.presenter;
...
@@ -2,6 +2,7 @@ package com.gingersoft.gsa.cloud.table.mvp.presenter;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.app.Application
;
import
android.app.Application
;
import
android.text.TextUtils
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
...
@@ -948,7 +949,7 @@ public class BaseOrderPresenter<M extends BaseOrderContract.Model, V extends Bas
...
@@ -948,7 +949,7 @@ public class BaseOrderPresenter<M extends BaseOrderContract.Model, V extends Bas
if
(
canMerge
)
{
if
(
canMerge
)
{
//合并数量
//合并数量
mergeNum
+=
mergeFood
.
getNumber
();
mergeNum
+=
mergeFood
.
getNumber
();
if
(!
removeIndexs
.
contains
(
mergeFood
.
getMyIndex
()))
{
if
(!
removeIndexs
.
contains
(
mergeFood
.
getMyIndex
()))
{
//添加所需移除已合并的食品
//添加所需移除已合并的食品
removeIndexs
.
add
(
mergeFood
.
getMyIndex
());
removeIndexs
.
add
(
mergeFood
.
getMyIndex
());
}
}
...
@@ -959,7 +960,7 @@ public class BaseOrderPresenter<M extends BaseOrderContract.Model, V extends Bas
...
@@ -959,7 +960,7 @@ public class BaseOrderPresenter<M extends BaseOrderContract.Model, V extends Bas
for
(
int
i
=
removeIndexs
.
size
()
-
1
;
i
>=
0
;
i
--)
{
for
(
int
i
=
removeIndexs
.
size
()
-
1
;
i
>=
0
;
i
--)
{
for
(
int
j
=
foodList
.
size
()
-
1
;
j
>=
0
;
j
--)
{
for
(
int
j
=
foodList
.
size
()
-
1
;
j
>=
0
;
j
--)
{
if
(
removeIndexs
.
get
(
i
)
==
foodList
.
get
(
j
).
getMyIndex
())
{
if
(
removeIndexs
.
get
(
i
)
==
foodList
.
get
(
j
).
getMyIndex
())
{
foodList
.
remove
(
j
);
foodList
.
remove
(
j
);
break
;
break
;
}
}
...
@@ -969,13 +970,14 @@ public class BaseOrderPresenter<M extends BaseOrderContract.Model, V extends Bas
...
@@ -969,13 +970,14 @@ public class BaseOrderPresenter<M extends BaseOrderContract.Model, V extends Bas
/**
/**
* 过滤折扣类型
* 过滤折扣类型
*
* @param discountList
* @param discountList
* @return
* @return
*/
*/
protected
List
<
Discount
>
filterDiscountByType
(
List
<
Discount
>
discountList
,
String
discountType
)
{
protected
List
<
Discount
>
filterDiscountByType
(
List
<
Discount
>
discountList
,
String
discountType
)
{
for
(
int
i
=
discountList
.
size
()
-
1
;
i
>=
0
;
i
--)
{
for
(
int
i
=
discountList
.
size
()
-
1
;
i
>=
0
;
i
--)
{
Discount
discount
=
discountList
.
get
(
i
);
Discount
discount
=
discountList
.
get
(
i
);
if
(
!
discount
.
getDiscount_t
ype
().
contains
(
discountType
))
{
if
(
TextUtils
.
isEmpty
(
discount
.
getDiscountType
())
||
!
discount
.
getDiscountT
ype
().
contains
(
discountType
))
{
discountList
.
remove
(
i
);
discountList
.
remove
(
i
);
}
}
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/StateTablePresenter.java
View file @
495d306d
...
@@ -189,6 +189,13 @@ public class StateTablePresenter extends BasePresenter<StateTableContract.Model,
...
@@ -189,6 +189,13 @@ public class StateTablePresenter extends BasePresenter<StateTableContract.Model,
}
}
}
}
break
;
break
;
case
TableOperatTypeConstant
.
table_status_5
:
for
(
int
i
=
0
;
i
<
datasBeans
.
size
();
i
++)
{
if
(
datasBeans
.
get
(
i
).
getStatus
()
==
4
&&
datasBeans
.
get
(
i
).
getUseStatus
()
==
0
)
{
mTableList
.
add
(
datasBeans
.
get
(
i
));
}
}
break
;
// case 4:
// case 4:
// for (int i = 0; i < datasBeans.size(); i++) {
// for (int i = 0; i < datasBeans.size(); i++) {
// if (datasBeans.get(i).getStatus() == 2 && datasBeans.get(i).getStatus() != 1) {
// if (datasBeans.get(i).getStatus() == 2 && datasBeans.get(i).getStatus() != 1) {
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/TableActivity.java
View file @
495d306d
...
@@ -608,6 +608,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -608,6 +608,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
"已使用"
,
"已使用"
,
"已開檯"
,
"已開檯"
,
"已印單"
,
"已印單"
,
"已分檯"
,
};
};
int
[]
statusIconList
=
new
int
[]{
int
[]
statusIconList
=
new
int
[]{
R
.
drawable
.
table_shape_status_all
,
R
.
drawable
.
table_shape_status_all
,
...
@@ -615,6 +616,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
...
@@ -615,6 +616,7 @@ public class TableActivity extends BaseFragmentActivity<TablePresenter> implemen
R
.
drawable
.
table_shape_status_used
,
R
.
drawable
.
table_shape_status_used
,
R
.
drawable
.
table_shape_status_send
,
R
.
drawable
.
table_shape_status_send
,
R
.
drawable
.
table_shape_status_print
,
R
.
drawable
.
table_shape_status_print
,
R
.
drawable
.
table_shape_status_split
,
};
};
for
(
int
i
=
0
;
i
<
statusTextList
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
statusTextList
.
length
;
i
++)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
table-module/src/main/res/drawable/table_shape_status_split.xml
0 → 100644
View file @
495d306d
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"oval"
>
<solid
android:color=
"@color/table_split"
/>
</shape>
\ No newline at end of file
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