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
42e42857
Commit
42e42857
authored
Jun 06, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、新增版本配置
2、版本更新處理
parent
f598e606
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
452 additions
and
206 deletions
+452
-206
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
+2
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/ComboItem.java
+12
-3
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Function.java
+19
-5
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Modifier.java
+21
-18
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/FunctionDao.java
+36
-36
base-module/src/main/java/com/gingersoft/gsa/cloud/function/FunctionManager.java
+18
-4
base-module/src/main/res/mipmap-xxhdpi/ic_launcher2.png
+0
-0
base-module/src/main/res/mipmap-xxhdpi/ic_launcher_backgroup.png
+0
-0
config.gradle
+1
-1
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/presenter/DownloadPresenter.java
+6
-2
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/ui/activity/mvp/ui/activity/LoginActivity.java
+1
-1
login-module/src/main/res/layout/activity_welcome.xml
+9
-5
login-module/src/main/res/mipmap-hdpi/png_welcome_bottom.png
+0
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/ComponentMain.java
+1
-1
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/contract/MainContract.java
+7
-1
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/contract/NewMainContract.java
+3
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/MainModel.java
+6
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/NewMainModel.java
+6
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/bean/SettlementReport.java
+10
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/service/MainReportService.java
+1
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/service/MainService.java
+5
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/NewMainPresenter.java
+34
-1
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/SettlementReportPresenter.java
+16
-7
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/activity/NewMainActivity.java
+43
-18
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/activity/SettlementReportActivity.java
+14
-4
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/BusinessInfoAdapter.java
+3
-0
main-module/src/main/res/layout/activity_new_main.xml
+14
-4
main-module/src/main/res/layout/item_settlement_report5.xml
+2
-3
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/MessageBean.kt
+2
-11
print-module/src/main/res/layout/print_confirm_order_view.xml
+3
-2
print-module/src/main/res/layout/print_other_order_food.xml
+3
-8
print-module/src/main/res/values/styles.xml
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/ComponentTable.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/bean/request/DeleteOrderRequest.java
+0
-10
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/service/MealService.java
+2
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
+16
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/MealStandPresenter.java
+38
-29
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/OrderContentPresenter.java
+48
-8
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
+41
-18
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/BottomFunctionAdapter.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/FoodGroupAdapter.java
+4
-2
table-module/src/main/res/layout/table_item_bottom_function.xml
+2
-1
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
View file @
42e42857
...
@@ -159,6 +159,8 @@ public class GsaCloudApplication extends BaseApplication {
...
@@ -159,6 +159,8 @@ public class GsaCloudApplication extends BaseApplication {
RetrofitUrlManager
.
getInstance
().
putDomain
(
"wechat_report"
,
HttpsConstans
.
WECHAR_REPORT_SERVER_ADDRESS
);
RetrofitUrlManager
.
getInstance
().
putDomain
(
"wechat_report"
,
HttpsConstans
.
WECHAR_REPORT_SERVER_ADDRESS
);
//沽清控制請求地址
//沽清控制請求地址
RetrofitUrlManager
.
getInstance
().
putDomain
(
"soldoutctrl"
,
HttpsConstans
.
_SERVER_ADDRESS
);
RetrofitUrlManager
.
getInstance
().
putDomain
(
"soldoutctrl"
,
HttpsConstans
.
_SERVER_ADDRESS
);
//版本更新請求地址
RetrofitUrlManager
.
getInstance
().
putDomain
(
"update_version"
,
HttpsConstans
.
ROOT_URL
);
//友常本地請求地址
//友常本地請求地址
RetrofitUrlManager
.
getInstance
().
putDomain
(
"yc_location"
,
HttpsConstans
.
ROOT_SERVER_YOU_CHANG_HK
);
RetrofitUrlManager
.
getInstance
().
putDomain
(
"yc_location"
,
HttpsConstans
.
ROOT_SERVER_YOU_CHANG_HK
);
}
}
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/ComboItem.java
View file @
42e42857
package
com
.
gingersoft
.
gsa
.
cloud
.
database
.
bean
;
package
com
.
gingersoft
.
gsa
.
cloud
.
database
.
bean
;
import
android.graphics.Color
;
import
android.graphics.Color
;
import
android.text.TextUtils
;
import
org.greenrobot.greendao.annotation.Entity
;
import
org.greenrobot.greendao.annotation.Entity
;
import
org.greenrobot.greendao.annotation.Id
;
import
org.greenrobot.greendao.annotation.Id
;
...
@@ -147,9 +148,9 @@ public class ComboItem {
...
@@ -147,9 +148,9 @@ public class ComboItem {
@Generated
(
hash
=
1123579083
)
@Generated
(
hash
=
1123579083
)
public
ComboItem
(
Long
id
,
long
comId
,
long
fid
,
long
qty
,
double
diffAmt
,
long
seqNo
,
public
ComboItem
(
Long
id
,
long
comId
,
long
fid
,
long
qty
,
double
diffAmt
,
long
seqNo
,
long
visible
,
Date
createTime
,
long
visible
,
Date
createTime
,
String
createBy
,
Date
updateTime
,
long
conditions
,
String
createBy
,
Date
updateTime
,
long
conditions
,
long
isRT
,
byte
deletes
,
long
posId
,
long
restaurant_id
,
long
isRT
,
byte
deletes
,
long
posId
,
long
restaurant_id
,
byte
isMainAccount
)
{
byte
isMainAccount
)
{
this
.
id
=
id
;
this
.
id
=
id
;
this
.
comId
=
comId
;
this
.
comId
=
comId
;
this
.
fid
=
fid
;
this
.
fid
=
fid
;
...
@@ -173,6 +174,13 @@ public class ComboItem {
...
@@ -173,6 +174,13 @@ public class ComboItem {
}
}
public
boolean
isSold
()
{
if
(!
TextUtils
.
isEmpty
(
currentMaxNumber
)
&&
(
"售罄"
.
equals
(
currentMaxNumber
)
||
"暫停"
.
equals
(
currentMaxNumber
))){
return
true
;
}
return
false
;
}
public
Long
getId
()
{
public
Long
getId
()
{
return
id
;
return
id
;
}
}
...
@@ -209,6 +217,7 @@ public class ComboItem {
...
@@ -209,6 +217,7 @@ public class ComboItem {
this
.
currentMaxNumber
=
currentMaxNumber
;
this
.
currentMaxNumber
=
currentMaxNumber
;
}
}
public
Long
getQty
()
{
public
Long
getQty
()
{
return
qty
;
return
qty
;
}
}
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Function.java
View file @
42e42857
...
@@ -28,14 +28,28 @@ public class Function {
...
@@ -28,14 +28,28 @@ public class Function {
private
int
parentId
;
private
int
parentId
;
private
int
groupId
;
private
int
groupId
;
private
int
status
;
private
long
effectiveTime
;
private
long
effectiveTime
;
private
String
resName
;
private
String
resName
;
private
String
resUrl
;
private
String
resUrl
;
private
String
imageURL
;
private
String
imageURL
;
//暫時沒有imageURL,用本地資源代替
//暫時沒有imageURL,用本地資源代替
private
int
icRes
;
private
int
icRes
;
/**狀態
* 0 未开通
* 1 正常
* 2 有時間限制
* 3 關閉
* */
private
int
status
;
@Transient
public
static
final
int
STATUS_NONACTIVATED
=
0
;
@Transient
public
static
final
int
STATUS_NONAL
=
1
;
@Transient
public
static
final
int
STATUS_TIME_LIMIT
=
2
;
@Transient
public
static
final
int
STATUS_CLOSE
=
3
;
/**
/**
* 自定義字段
* 自定義字段
*/
*/
...
@@ -60,19 +74,19 @@ public class Function {
...
@@ -60,19 +74,19 @@ public class Function {
@Transient
@Transient
private
String
lable
;
private
String
lable
;
@Generated
(
hash
=
8165561
16
)
@Generated
(
hash
=
7568816
16
)
public
Function
(
Long
dbid
,
@NotNull
Long
id
,
int
parentId
,
int
groupId
,
int
status
,
public
Function
(
Long
dbid
,
@NotNull
Long
id
,
int
parentId
,
int
groupId
,
long
effectiveTime
,
long
effectiveTime
,
String
resName
,
String
resUrl
,
String
imageURL
,
int
icRe
s
)
{
String
resName
,
String
resUrl
,
String
imageURL
,
int
icRes
,
int
statu
s
)
{
this
.
dbid
=
dbid
;
this
.
dbid
=
dbid
;
this
.
id
=
id
;
this
.
id
=
id
;
this
.
parentId
=
parentId
;
this
.
parentId
=
parentId
;
this
.
groupId
=
groupId
;
this
.
groupId
=
groupId
;
this
.
status
=
status
;
this
.
effectiveTime
=
effectiveTime
;
this
.
effectiveTime
=
effectiveTime
;
this
.
resName
=
resName
;
this
.
resName
=
resName
;
this
.
resUrl
=
resUrl
;
this
.
resUrl
=
resUrl
;
this
.
imageURL
=
imageURL
;
this
.
imageURL
=
imageURL
;
this
.
icRes
=
icRes
;
this
.
icRes
=
icRes
;
this
.
status
=
status
;
}
}
@Generated
(
hash
=
133141990
)
@Generated
(
hash
=
133141990
)
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Modifier.java
View file @
42e42857
package
com
.
gingersoft
.
gsa
.
cloud
.
database
.
bean
;
package
com
.
gingersoft
.
gsa
.
cloud
.
database
.
bean
;
import
android.graphics.Color
;
import
android.graphics.Color
;
import
android.text.TextUtils
;
import
org.greenrobot.greendao.annotation.Entity
;
import
org.greenrobot.greendao.annotation.Entity
;
import
org.greenrobot.greendao.annotation.Generated
;
import
org.greenrobot.greendao.annotation.Generated
;
...
@@ -422,25 +423,15 @@ public class Modifier {
...
@@ -422,25 +423,15 @@ public class Modifier {
@Generated
(
hash
=
385685553
)
public
Modifier
()
{
}
@Generated
(
hash
=
1490458360
)
@Generated
(
hash
=
1490458360
)
public
Modifier
(
Long
dbid
,
long
mid
,
long
topId
,
long
restaurantId
,
public
Modifier
(
Long
dbid
,
long
mid
,
long
topId
,
long
restaurantId
,
String
modifierName
,
long
seqNo
,
double
marketPrice
,
String
modifierName
,
long
seqNo
,
double
marketPrice
,
double
price
,
double
price
,
double
lunchboxPrice
,
long
colorId
,
String
imageUrl
,
long
invisible
,
double
cost
,
Date
startDate
,
double
lunchboxPrice
,
long
colorId
,
String
imageUrl
,
long
invisible
,
Date
endDate
,
long
like
,
long
totalSold
,
long
majorMainId
,
long
deptId
,
String
createBy
,
Date
createTime
,
double
cost
,
Date
startDate
,
Date
endDate
,
long
like
,
long
totalSold
,
String
updateBy
,
Date
updateTime
,
String
posFid
,
String
pId
,
long
autoMod
,
long
blueEdit
,
long
autoMerge
,
long
majorMainId
,
long
deptId
,
String
createBy
,
Date
createTime
,
long
customMsg
,
long
isParent
,
String
modifierName1
,
String
modifierName2
,
double
multiple
,
String
printSet
,
String
updateBy
,
Date
updateTime
,
String
posFid
,
String
pId
,
String
ktSetting
,
long
modComm
,
long
modTaste
,
long
modMsg
,
long
ktFireCourse
,
long
ableDisCount
,
long
autoMod
,
long
blueEdit
,
long
autoMerge
,
long
customMsg
,
long
printToBill
,
long
ktPrintMainItem
,
long
ktShowPrice
,
long
ktFont
,
long
conditions
,
long
isRt
,
byte
visible
,
long
isParent
,
String
modifierName1
,
String
modifierName2
,
long
deletes
,
long
isStatistic
)
{
double
multiple
,
String
printSet
,
String
ktSetting
,
long
modComm
,
long
modTaste
,
long
modMsg
,
long
ktFireCourse
,
long
ableDisCount
,
long
printToBill
,
long
ktPrintMainItem
,
long
ktShowPrice
,
long
ktFont
,
long
conditions
,
long
isRt
,
byte
visible
,
long
deletes
,
long
isStatistic
)
{
this
.
dbid
=
dbid
;
this
.
dbid
=
dbid
;
this
.
mid
=
mid
;
this
.
mid
=
mid
;
this
.
topId
=
topId
;
this
.
topId
=
topId
;
...
@@ -492,6 +483,11 @@ public class Modifier {
...
@@ -492,6 +483,11 @@ public class Modifier {
this
.
isStatistic
=
isStatistic
;
this
.
isStatistic
=
isStatistic
;
}
}
@Generated
(
hash
=
385685553
)
public
Modifier
()
{
}
public
Long
getDbid
()
{
public
Long
getDbid
()
{
return
dbid
;
return
dbid
;
...
@@ -501,6 +497,13 @@ public class Modifier {
...
@@ -501,6 +497,13 @@ public class Modifier {
return
mid
;
return
mid
;
}
}
public
boolean
isSold
()
{
if
(!
TextUtils
.
isEmpty
(
currentMaxNumber
)
&&
(
"售罄"
.
equals
(
currentMaxNumber
)
||
"暫停"
.
equals
(
currentMaxNumber
))){
return
true
;
}
return
false
;
}
public
Long
getTopId
()
{
public
Long
getTopId
()
{
return
topId
;
return
topId
;
}
}
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/FunctionDao.java
View file @
42e42857
...
@@ -28,12 +28,12 @@ public class FunctionDao extends AbstractDao<Function, Long> {
...
@@ -28,12 +28,12 @@ public class FunctionDao extends AbstractDao<Function, Long> {
public
final
static
Property
Id
=
new
Property
(
1
,
Long
.
class
,
"id"
,
false
,
"ID"
);
public
final
static
Property
Id
=
new
Property
(
1
,
Long
.
class
,
"id"
,
false
,
"ID"
);
public
final
static
Property
ParentId
=
new
Property
(
2
,
int
.
class
,
"parentId"
,
false
,
"PARENT_ID"
);
public
final
static
Property
ParentId
=
new
Property
(
2
,
int
.
class
,
"parentId"
,
false
,
"PARENT_ID"
);
public
final
static
Property
GroupId
=
new
Property
(
3
,
int
.
class
,
"groupId"
,
false
,
"GROUP_ID"
);
public
final
static
Property
GroupId
=
new
Property
(
3
,
int
.
class
,
"groupId"
,
false
,
"GROUP_ID"
);
public
final
static
Property
Status
=
new
Property
(
4
,
int
.
class
,
"status"
,
false
,
"STATUS
"
);
public
final
static
Property
EffectiveTime
=
new
Property
(
4
,
long
.
class
,
"effectiveTime"
,
false
,
"EFFECTIVE_TIME
"
);
public
final
static
Property
EffectiveTime
=
new
Property
(
5
,
long
.
class
,
"effectiveTime"
,
false
,
"EFFECTIVE_TI
ME"
);
public
final
static
Property
ResName
=
new
Property
(
5
,
String
.
class
,
"resName"
,
false
,
"RES_NA
ME"
);
public
final
static
Property
Res
Name
=
new
Property
(
6
,
String
.
class
,
"resName"
,
false
,
"RES_NAME
"
);
public
final
static
Property
Res
Url
=
new
Property
(
6
,
String
.
class
,
"resUrl"
,
false
,
"RES_URL
"
);
public
final
static
Property
ResUrl
=
new
Property
(
7
,
String
.
class
,
"resUrl"
,
false
,
"RES
_URL"
);
public
final
static
Property
ImageURL
=
new
Property
(
7
,
String
.
class
,
"imageURL"
,
false
,
"IMAGE
_URL"
);
public
final
static
Property
I
mageURL
=
new
Property
(
8
,
String
.
class
,
"imageURL"
,
false
,
"IMAGE_URL
"
);
public
final
static
Property
I
cRes
=
new
Property
(
8
,
int
.
class
,
"icRes"
,
false
,
"IC_RES
"
);
public
final
static
Property
IcRes
=
new
Property
(
9
,
int
.
class
,
"icRes"
,
false
,
"IC_RE
S"
);
public
final
static
Property
Status
=
new
Property
(
9
,
int
.
class
,
"status"
,
false
,
"STATU
S"
);
}
}
...
@@ -53,12 +53,12 @@ public class FunctionDao extends AbstractDao<Function, Long> {
...
@@ -53,12 +53,12 @@ public class FunctionDao extends AbstractDao<Function, Long> {
"\"ID\" INTEGER NOT NULL ,"
+
// 1: id
"\"ID\" INTEGER NOT NULL ,"
+
// 1: id
"\"PARENT_ID\" INTEGER NOT NULL ,"
+
// 2: parentId
"\"PARENT_ID\" INTEGER NOT NULL ,"
+
// 2: parentId
"\"GROUP_ID\" INTEGER NOT NULL ,"
+
// 3: groupId
"\"GROUP_ID\" INTEGER NOT NULL ,"
+
// 3: groupId
"\"
STATUS\" INTEGER NOT NULL ,"
+
// 4: status
"\"
EFFECTIVE_TIME\" INTEGER NOT NULL ,"
+
// 4: effectiveTime
"\"
EFFECTIVE_TIME\" INTEGER NOT NULL ,"
+
// 5: effectiveTi
me
"\"
RES_NAME\" TEXT,"
+
// 5: resNa
me
"\"RES_
NAME\" TEXT,"
+
// 6: resName
"\"RES_
URL\" TEXT,"
+
// 6: resUrl
"\"
RES_URL\" TEXT,"
+
// 7: resUrl
"\"
IMAGE_URL\" TEXT,"
+
// 7: imageURL
"\"I
MAGE_URL\" TEXT,"
+
// 8: imageURL
"\"I
C_RES\" INTEGER NOT NULL ,"
+
// 8: icRes
"\"
IC_RES\" INTEGER NOT NULL );"
);
// 9: icRe
s
"\"
STATUS\" INTEGER NOT NULL );"
);
// 9: statu
s
}
}
/** Drops the underlying database table. */
/** Drops the underlying database table. */
...
@@ -78,24 +78,24 @@ public class FunctionDao extends AbstractDao<Function, Long> {
...
@@ -78,24 +78,24 @@ public class FunctionDao extends AbstractDao<Function, Long> {
stmt
.
bindLong
(
2
,
entity
.
getId
());
stmt
.
bindLong
(
2
,
entity
.
getId
());
stmt
.
bindLong
(
3
,
entity
.
getParentId
());
stmt
.
bindLong
(
3
,
entity
.
getParentId
());
stmt
.
bindLong
(
4
,
entity
.
getGroupId
());
stmt
.
bindLong
(
4
,
entity
.
getGroupId
());
stmt
.
bindLong
(
5
,
entity
.
getStatus
());
stmt
.
bindLong
(
5
,
entity
.
getEffectiveTime
());
stmt
.
bindLong
(
6
,
entity
.
getEffectiveTime
());
String
resName
=
entity
.
getResName
();
String
resName
=
entity
.
getResName
();
if
(
resName
!=
null
)
{
if
(
resName
!=
null
)
{
stmt
.
bindString
(
7
,
resName
);
stmt
.
bindString
(
6
,
resName
);
}
}
String
resUrl
=
entity
.
getResUrl
();
String
resUrl
=
entity
.
getResUrl
();
if
(
resUrl
!=
null
)
{
if
(
resUrl
!=
null
)
{
stmt
.
bindString
(
8
,
resUrl
);
stmt
.
bindString
(
7
,
resUrl
);
}
}
String
imageURL
=
entity
.
getImageURL
();
String
imageURL
=
entity
.
getImageURL
();
if
(
imageURL
!=
null
)
{
if
(
imageURL
!=
null
)
{
stmt
.
bindString
(
9
,
imageURL
);
stmt
.
bindString
(
8
,
imageURL
);
}
}
stmt
.
bindLong
(
10
,
entity
.
getIcRes
());
stmt
.
bindLong
(
9
,
entity
.
getIcRes
());
stmt
.
bindLong
(
10
,
entity
.
getStatus
());
}
}
@Override
@Override
...
@@ -109,24 +109,24 @@ public class FunctionDao extends AbstractDao<Function, Long> {
...
@@ -109,24 +109,24 @@ public class FunctionDao extends AbstractDao<Function, Long> {
stmt
.
bindLong
(
2
,
entity
.
getId
());
stmt
.
bindLong
(
2
,
entity
.
getId
());
stmt
.
bindLong
(
3
,
entity
.
getParentId
());
stmt
.
bindLong
(
3
,
entity
.
getParentId
());
stmt
.
bindLong
(
4
,
entity
.
getGroupId
());
stmt
.
bindLong
(
4
,
entity
.
getGroupId
());
stmt
.
bindLong
(
5
,
entity
.
getStatus
());
stmt
.
bindLong
(
5
,
entity
.
getEffectiveTime
());
stmt
.
bindLong
(
6
,
entity
.
getEffectiveTime
());
String
resName
=
entity
.
getResName
();
String
resName
=
entity
.
getResName
();
if
(
resName
!=
null
)
{
if
(
resName
!=
null
)
{
stmt
.
bindString
(
7
,
resName
);
stmt
.
bindString
(
6
,
resName
);
}
}
String
resUrl
=
entity
.
getResUrl
();
String
resUrl
=
entity
.
getResUrl
();
if
(
resUrl
!=
null
)
{
if
(
resUrl
!=
null
)
{
stmt
.
bindString
(
8
,
resUrl
);
stmt
.
bindString
(
7
,
resUrl
);
}
}
String
imageURL
=
entity
.
getImageURL
();
String
imageURL
=
entity
.
getImageURL
();
if
(
imageURL
!=
null
)
{
if
(
imageURL
!=
null
)
{
stmt
.
bindString
(
9
,
imageURL
);
stmt
.
bindString
(
8
,
imageURL
);
}
}
stmt
.
bindLong
(
10
,
entity
.
getIcRes
());
stmt
.
bindLong
(
9
,
entity
.
getIcRes
());
stmt
.
bindLong
(
10
,
entity
.
getStatus
());
}
}
@Override
@Override
...
@@ -141,12 +141,12 @@ public class FunctionDao extends AbstractDao<Function, Long> {
...
@@ -141,12 +141,12 @@ public class FunctionDao extends AbstractDao<Function, Long> {
cursor
.
getLong
(
offset
+
1
),
// id
cursor
.
getLong
(
offset
+
1
),
// id
cursor
.
getInt
(
offset
+
2
),
// parentId
cursor
.
getInt
(
offset
+
2
),
// parentId
cursor
.
getInt
(
offset
+
3
),
// groupId
cursor
.
getInt
(
offset
+
3
),
// groupId
cursor
.
get
Int
(
offset
+
4
),
// status
cursor
.
get
Long
(
offset
+
4
),
// effectiveTime
cursor
.
getLong
(
offset
+
5
),
// effectiveTi
me
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// resNa
me
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// res
Name
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// res
Url
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
//
resUrl
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
//
imageURL
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// imageURL
cursor
.
getInt
(
offset
+
8
),
// icRes
cursor
.
getInt
(
offset
+
9
)
//
icRe
s
cursor
.
getInt
(
offset
+
9
)
//
statu
s
);
);
return
entity
;
return
entity
;
}
}
...
@@ -157,12 +157,12 @@ public class FunctionDao extends AbstractDao<Function, Long> {
...
@@ -157,12 +157,12 @@ public class FunctionDao extends AbstractDao<Function, Long> {
entity
.
setId
(
cursor
.
getLong
(
offset
+
1
));
entity
.
setId
(
cursor
.
getLong
(
offset
+
1
));
entity
.
setParentId
(
cursor
.
getInt
(
offset
+
2
));
entity
.
setParentId
(
cursor
.
getInt
(
offset
+
2
));
entity
.
setGroupId
(
cursor
.
getInt
(
offset
+
3
));
entity
.
setGroupId
(
cursor
.
getInt
(
offset
+
3
));
entity
.
set
Status
(
cursor
.
getInt
(
offset
+
4
));
entity
.
set
EffectiveTime
(
cursor
.
getLong
(
offset
+
4
));
entity
.
set
EffectiveTime
(
cursor
.
getLo
ng
(
offset
+
5
));
entity
.
set
ResName
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getStri
ng
(
offset
+
5
));
entity
.
setRes
Name
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setRes
Url
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
set
ResUrl
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
set
ImageURL
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setI
mageURL
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setI
cRes
(
cursor
.
getInt
(
offset
+
8
));
entity
.
set
IcRe
s
(
cursor
.
getInt
(
offset
+
9
));
entity
.
set
Statu
s
(
cursor
.
getInt
(
offset
+
9
));
}
}
@Override
@Override
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/function/FunctionManager.java
View file @
42e42857
...
@@ -45,11 +45,25 @@ public class FunctionManager {
...
@@ -45,11 +45,25 @@ public class FunctionManager {
if
(
function
.
getResUrl
().
startsWith
(
resLoction
))
{
if
(
function
.
getResUrl
().
startsWith
(
resLoction
))
{
for
(
int
j
=
0
;
j
<
fModules
.
length
;
j
++)
{
for
(
int
j
=
0
;
j
<
fModules
.
length
;
j
++)
{
FModule
module
=
fModules
[
j
];
FModule
module
=
fModules
[
j
];
if
(
function
.
getResUrl
().
equals
(
module
.
getKeyRes
())){
if
(
function
.
getResUrl
().
equals
(
module
.
getKeyRes
()))
{
if
(
function
.
getStatus
()
==
0
)
{
switch
(
function
.
getStatus
())
{
function
.
setIconRes
(
module
.
getOpenIconRes
());
case
Function
.
STATUS_NONAL
:
function
.
setIcRes
(
module
.
getOpenIconRes
());
break
;
case
Function
.
STATUS_TIME_LIMIT
:
long
currentTime
=
System
.
currentTimeMillis
();
long
effectiveTime
=
function
.
getEffectiveTime
();
if
(
effectiveTime
>
currentTime
)
{
//在有效期内
function
.
setStatus
(
Function
.
STATUS_NONAL
);
function
.
setIcRes
(
module
.
getOpenIconRes
());
}
else
{
}
else
{
function
.
setIconRes
(
module
.
getDisableIconRes
());
function
.
setIcRes
(
module
.
getDisableIconRes
());
}
break
;
default
:
function
.
setIcRes
(
module
.
getDisableIconRes
());
break
;
}
}
}
}
}
}
...
...
base-module/src/main/res/mipmap-xxhdpi/ic_launcher2.png
0 → 100644
View file @
42e42857
1.68 KB
base-module/src/main/res/mipmap-xxhdpi/ic_launcher_backgroup.png
0 → 100644
View file @
42e42857
3.02 KB
config.gradle
View file @
42e42857
...
@@ -6,7 +6,7 @@ ext {
...
@@ -6,7 +6,7 @@ ext {
minSdkVersion
:
19
,
//N5收銀機應用安卓開發環境要求Android OS Version: 5.1Android SDK Min Version: 19
minSdkVersion
:
19
,
//N5收銀機應用安卓開發環境要求Android OS Version: 5.1Android SDK Min Version: 19
targetSdkVersion
:
28
,
targetSdkVersion
:
28
,
versionCode
:
1
,
versionCode
:
1
,
versionName
:
"1.
8
"
versionName
:
"1.
0.1
"
]
]
version
=
[
version
=
[
...
...
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/presenter/DownloadPresenter.java
View file @
42e42857
...
@@ -99,6 +99,10 @@ public class DownloadPresenter extends BasePresenter<DownloadContract.Model, Dow
...
@@ -99,6 +99,10 @@ public class DownloadPresenter extends BasePresenter<DownloadContract.Model, Dow
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
+
Api
.
expand_info
,
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
+
Api
.
expand_info
,
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
+
Api
.
printerDevice_list
};
HttpsConstans
.
ROOT_SERVER_ADDRESS_FORMAL
+
Api
.
printerDevice_list
};
// private String[] downTitles = {"打印機列表"};
// //下載所佔比例
// private int[] ratios = {100};
// private String urlList[] = {HttpsConstans.ROOT_SERVER_ADDRESS_FORMAL + Api.printerDevice_list};
//当前请求响应成功数
//当前请求响应成功数
private
int
responseSuccessCount
;
private
int
responseSuccessCount
;
...
@@ -269,7 +273,7 @@ public class DownloadPresenter extends BasePresenter<DownloadContract.Model, Dow
...
@@ -269,7 +273,7 @@ public class DownloadPresenter extends BasePresenter<DownloadContract.Model, Dow
public
void
downFun
(
int
downTag
)
{
public
void
downFun
(
int
downTag
)
{
List
<
Function
>
functions
=
getFunctions
();
//
List<Function> functions = getFunctions();
long
userId
=
GsaCloudApplication
.
getMemberId
(
mApplication
);
long
userId
=
GsaCloudApplication
.
getMemberId
(
mApplication
);
...
@@ -293,7 +297,7 @@ public class DownloadPresenter extends BasePresenter<DownloadContract.Model, Dow
...
@@ -293,7 +297,7 @@ public class DownloadPresenter extends BasePresenter<DownloadContract.Model, Dow
if
(
functionBean
.
getData
()
!=
null
)
{
if
(
functionBean
.
getData
()
!=
null
)
{
FunctionDaoUtils
functionDao
=
new
FunctionDaoUtils
(
IActivity
);
FunctionDaoUtils
functionDao
=
new
FunctionDaoUtils
(
IActivity
);
functionDao
.
deleteAll
();
functionDao
.
deleteAll
();
functionDao
.
insertMultFunction
(
function
s
);
functionDao
.
insertMultFunction
(
function
Bean
.
getData
()
);
}
}
DataDownLoadState
loadState
=
mList
.
get
(
downTag
);
DataDownLoadState
loadState
=
mList
.
get
(
downTag
);
...
...
login-module/src/main/java/com/gingersoft/gsa/cloud/login/mvp/ui/activity/mvp/ui/activity/LoginActivity.java
View file @
42e42857
...
@@ -310,7 +310,7 @@ public class LoginActivity extends LoginInterfaceImpl<LoginPresenter> implements
...
@@ -310,7 +310,7 @@ public class LoginActivity extends LoginInterfaceImpl<LoginPresenter> implements
//保存登陸信息
//保存登陸信息
// saveLoginInfo(loginBean);
// saveLoginInfo(loginBean);
}
}
//158 - 189
@Override
@Override
public
void
showChooseRestaurantDialog
(
List
<
LoginBean
.
DataBean
.
UserBean
.
BrandsBean
>
brandsBeans
,
List
<
LoginBean
.
DataBean
.
UserBean
.
BrandsBean
>
brands
)
{
public
void
showChooseRestaurantDialog
(
List
<
LoginBean
.
DataBean
.
UserBean
.
BrandsBean
>
brandsBeans
,
List
<
LoginBean
.
DataBean
.
UserBean
.
BrandsBean
>
brands
)
{
new
ChooseRestaurantDialog
.
BottomListSheetBuilder
(
mContext
)
new
ChooseRestaurantDialog
.
BottomListSheetBuilder
(
mContext
)
...
...
login-module/src/main/res/layout/activity_welcome.xml
View file @
42e42857
...
@@ -30,14 +30,18 @@
...
@@ -30,14 +30,18 @@
android:layout_marginTop=
"@dimen/dp_60"
android:layout_marginTop=
"@dimen/dp_60"
android:src=
"@mipmap/png_welcome_center"
/>
android:src=
"@mipmap/png_welcome_center"
/>
<
Image
View
<
Text
View
android:id=
"@+id/iv_welcome_logo"
android:id=
"@+id/iv_welcome_logo"
android:layout_width=
"
@dimen/dp_56
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"
@dimen/dp_56
"
android:layout_height=
"
wrap_content
"
android:layout_below=
"@+id/iv_welcome_center"
android:layout_below=
"@+id/iv_welcome_center"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"@dimen/dp_16"
android:layout_marginTop=
"@dimen/dp_30"
android:src=
"@mipmap/ic_launcher"
/>
android:drawableTop=
"@mipmap/ic_launcher"
android:text=
"Ricepon POS"
android:textSize=
"@dimen/sp_16"
android:textColor=
"@color/theme_color"
android:textStyle=
"bold"
/>
<ImageView
<ImageView
android:id=
"@+id/iv_welcome_bottom"
android:id=
"@+id/iv_welcome_bottom"
...
...
login-module/src/main/res/mipmap-
x
hdpi/png_welcome_bottom.png
→
login-module/src/main/res/mipmap-hdpi/png_welcome_bottom.png
View file @
42e42857
File moved
main-module/src/main/java/com/gingersoft/gsa/cloud/main/ComponentMain.java
View file @
42e42857
...
@@ -12,7 +12,7 @@ import com.gingersoft.gsa.cloud.main.mvp.ui.activity.NewMainActivity;
...
@@ -12,7 +12,7 @@ import com.gingersoft.gsa.cloud.main.mvp.ui.activity.NewMainActivity;
public
class
ComponentMain
implements
IComponent
{
public
class
ComponentMain
implements
IComponent
{
public
static
final
class
Functio
n
{
public
static
final
class
mai
n
{
/**首頁- 點餐*/
/**首頁- 點餐*/
public
static
final
FModule
[]
order
=
{
public
static
final
FModule
[]
order
=
{
new
FModule
(
"main/order"
,
0
,
0
)
,
new
FModule
(
"main/order"
,
0
,
0
)
,
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/contract/MainContract.java
View file @
42e42857
...
@@ -5,6 +5,10 @@ import android.widget.BaseAdapter;
...
@@ -5,6 +5,10 @@ import android.widget.BaseAdapter;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IModel
;
import
com.jess.arms.mvp.IModel
;
import
io.reactivex.Observable
;
import
okhttp3.RequestBody
;
import
retrofit2.http.Body
;
/**
/**
* ================================================
* ================================================
...
@@ -24,8 +28,10 @@ public interface MainContract {
...
@@ -24,8 +28,10 @@ public interface MainContract {
void
setFunctionAdapter
(
BaseAdapter
adapter
);
void
setFunctionAdapter
(
BaseAdapter
adapter
);
}
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface
Model
extends
IModel
{
interface
Model
extends
IModel
{
}
}
}
}
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/contract/NewMainContract.java
View file @
42e42857
...
@@ -30,6 +30,9 @@ public interface NewMainContract {
...
@@ -30,6 +30,9 @@ public interface NewMainContract {
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface
Model
extends
IModel
{
interface
Model
extends
IModel
{
Observable
<
Object
>
checkAppVersion
(
RequestBody
requestBody
);
Observable
<
Object
>
loginOut
(
RequestBody
requestBody
);
Observable
<
Object
>
loginOut
(
RequestBody
requestBody
);
}
}
}
}
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/MainModel.java
View file @
42e42857
...
@@ -2,12 +2,16 @@ package com.gingersoft.gsa.cloud.main.mvp.model;
...
@@ -2,12 +2,16 @@ package com.gingersoft.gsa.cloud.main.mvp.model;
import
android.app.Application
;
import
android.app.Application
;
import
com.gingersoft.gsa.cloud.main.mvp.contract.MainContract
;
import
com.gingersoft.gsa.cloud.main.mvp.contract.MainContract
;
import
com.gingersoft.gsa.cloud.main.mvp.model.service.MainReportService
;
import
com.gingersoft.gsa.cloud.main.mvp.model.service.MainService
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.jess.arms.integration.IRepositoryManager
;
import
com.jess.arms.integration.IRepositoryManager
;
import
com.jess.arms.mvp.BaseModel
;
import
com.jess.arms.mvp.BaseModel
;
import
com.jess.arms.di.scope.ActivityScope
;
import
com.jess.arms.di.scope.ActivityScope
;
import
javax.inject.Inject
;
import
javax.inject.Inject
;
import
io.reactivex.Observable
;
import
okhttp3.RequestBody
;
/**
/**
...
@@ -40,4 +44,5 @@ public class MainModel extends BaseModel implements MainContract.Model{
...
@@ -40,4 +44,5 @@ public class MainModel extends BaseModel implements MainContract.Model{
this
.
mGson
=
null
;
this
.
mGson
=
null
;
this
.
mApplication
=
null
;
this
.
mApplication
=
null
;
}
}
}
}
\ No newline at end of file
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/NewMainModel.java
View file @
42e42857
...
@@ -50,6 +50,12 @@ public class NewMainModel extends BaseModel implements NewMainContract.Model {
...
@@ -50,6 +50,12 @@ public class NewMainModel extends BaseModel implements NewMainContract.Model {
}
}
@Override
@Override
public
Observable
<
Object
>
checkAppVersion
(
RequestBody
requestBody
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
MainService
.
class
)
.
checkAppVersion
(
requestBody
);
}
@Override
public
Observable
<
Object
>
loginOut
(
RequestBody
requestBody
)
{
public
Observable
<
Object
>
loginOut
(
RequestBody
requestBody
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
MainService
.
class
)
return
mRepositoryManager
.
obtainRetrofitService
(
MainService
.
class
)
.
loginOut
(
requestBody
);
.
loginOut
(
requestBody
);
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/bean/SettlementReport.java
View file @
42e42857
...
@@ -130,6 +130,7 @@ public class SettlementReport {
...
@@ -130,6 +130,7 @@ public class SettlementReport {
* tipnum : 0
* tipnum : 0
* tipsPrice : 0
* tipsPrice : 0
* totamount : 256
* totamount : 256
* deliverycharge : 0
* num : 2
* num : 2
* person : 7
* person : 7
*/
*/
...
@@ -142,9 +143,18 @@ public class SettlementReport {
...
@@ -142,9 +143,18 @@ public class SettlementReport {
private
int
tipnum
;
private
int
tipnum
;
private
double
tipsPrice
;
private
double
tipsPrice
;
private
double
totamount
;
private
double
totamount
;
private
double
deliverycharge
;
private
int
num
;
private
int
num
;
private
int
person
;
private
int
person
;
public
double
getDeliverycharge
()
{
return
deliverycharge
;
}
public
void
setDeliverycharge
(
double
deliverycharge
)
{
this
.
deliverycharge
=
deliverycharge
;
}
public
double
getPrices
()
{
public
double
getPrices
()
{
return
prices
;
return
prices
;
}
}
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/service/MainReportService.java
View file @
42e42857
...
@@ -23,6 +23,7 @@ import retrofit2.http.QueryMap;
...
@@ -23,6 +23,7 @@ import retrofit2.http.QueryMap;
* 首頁和報表
* 首頁和報表
*/
*/
public
interface
MainReportService
{
public
interface
MainReportService
{
//支付分析報表
//支付分析報表
@Headers
({
"Domain-Name: wechat_report"
})
@Headers
({
"Domain-Name: wechat_report"
})
@POST
(
"wx/findPayMode"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
@POST
(
"wx/findPayMode"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/model/service/MainService.java
View file @
42e42857
...
@@ -4,6 +4,7 @@ import io.reactivex.Observable;
...
@@ -4,6 +4,7 @@ import io.reactivex.Observable;
import
me.jessyan.retrofiturlmanager.RetrofitUrlManager
;
import
me.jessyan.retrofiturlmanager.RetrofitUrlManager
;
import
okhttp3.RequestBody
;
import
okhttp3.RequestBody
;
import
retrofit2.http.Body
;
import
retrofit2.http.Body
;
import
retrofit2.http.Headers
;
import
retrofit2.http.POST
;
import
retrofit2.http.POST
;
/**
/**
...
@@ -13,4 +14,8 @@ public interface MainService {
...
@@ -13,4 +14,8 @@ public interface MainService {
@POST
(
"gsa/logout"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
@POST
(
"gsa/logout"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
Object
>
loginOut
(
@Body
RequestBody
requestBody
);
Observable
<
Object
>
loginOut
(
@Body
RequestBody
requestBody
);
@Headers
({
"Domain-Name: update_version"
})
@POST
(
"/member-web/api/system/checkAppVersion"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
Object
>
checkAppVersion
(
@Body
RequestBody
requestBody
);
}
}
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/NewMainPresenter.java
View file @
42e42857
package
com
.
gingersoft
.
gsa
.
cloud
.
main
.
mvp
.
presenter
;
package
com
.
gingersoft
.
gsa
.
cloud
.
main
.
mvp
.
presenter
;
import
android.app.Application
;
import
android.app.Application
;
import
android.text.TextUtils
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.utils.LanguageUtils
;
import
com.gingersoft.gsa.cloud.base.utils.LanguageUtils
;
...
@@ -11,6 +12,7 @@ import com.jess.arms.http.imageloader.ImageLoader;
...
@@ -11,6 +12,7 @@ import com.jess.arms.http.imageloader.ImageLoader;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.mvp.BasePresenter
;
import
com.jess.arms.mvp.BasePresenter
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.jess.arms.utils.DeviceUtils
;
import
com.jess.arms.utils.PermissionUtil
;
import
com.jess.arms.utils.PermissionUtil
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.jess.arms.utils.RxLifecycleUtils
;
...
@@ -64,7 +66,38 @@ public class NewMainPresenter extends BasePresenter<NewMainContract.Model, NewMa
...
@@ -64,7 +66,38 @@ public class NewMainPresenter extends BasePresenter<NewMainContract.Model, NewMa
this
.
mApplication
=
null
;
this
.
mApplication
=
null
;
}
}
public
void
loginOut
(){
public
void
checkAppVersion
()
{
RequestBody
requestBody
=
new
FormBody
.
Builder
()
.
add
(
"version"
,
DeviceUtils
.
getVersionName
(
mApplication
)
+
"|"
+
DeviceUtils
.
getVersionCode
(
mApplication
))
.
build
();
mModel
.
checkAppVersion
(
requestBody
)
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
subscribe
(
new
ErrorHandleSubscriber
<
Object
>(
mErrorHandler
)
{
@Override
public
void
onNext
(
@NonNull
Object
info
)
{
if
(
info
!=
null
)
{
// int operate = json.optInt("operate");//操作类型:1、不提示更新 2、提示更新可选择更新 3、强行更新
// if (operate == 2 || operate == 3 || operate == 4 || operate == 5) {
// String updatePath = json.optString("updatePath");
// if (!TextUtils.isEmpty("updatePath") && !updatePath.equals("null")) {
// updateAPK(operate, updatePath);
// } else {
// if (operate == 3) {
// ExitAPP();
// }
// }
// }
}
else
{
}
}
});
}
public
void
loginOut
()
{
RequestBody
requestBody
=
new
FormBody
.
Builder
()
RequestBody
requestBody
=
new
FormBody
.
Builder
()
.
build
();
.
build
();
mModel
.
loginOut
(
requestBody
)
mModel
.
loginOut
(
requestBody
)
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/SettlementReportPresenter.java
View file @
42e42857
...
@@ -61,10 +61,10 @@ public class SettlementReportPresenter extends BasePresenter<SettlementReportCon
...
@@ -61,10 +61,10 @@ public class SettlementReportPresenter extends BasePresenter<SettlementReportCon
private
SettlementReportActivity
IActivity
;
private
SettlementReportActivity
IActivity
;
private
SettlementReportItemAdapter
mSettlementReportItemAdapter
;
private
SettlementReportItemAdapter
mSettlementReportItemAdapter
;
private
List
<
SectionTextItem3
>
mSettlementReportItemList
=
new
ArrayList
<>();
private
List
<
SectionTextItem3
>
mSettlementReportItemList
=
new
ArrayList
<>();
private
SettlementReportItem5Adapter
mSettlementReportItem5Adapter
;
private
SettlementReportItem5Adapter
mSettlementReportItem5Adapter
;
private
List
<
SectionTextItem5
>
mSettlementReportItem5List
=
new
ArrayList
<>();
private
List
<
SectionTextItem5
>
mSettlementReportItem5List
=
new
ArrayList
<>();
public
SettlementReportItem5Adapter
mPrintAdapter
;
public
SettlementReportItem5Adapter
mPrintAdapter
;
...
@@ -92,7 +92,7 @@ public class SettlementReportPresenter extends BasePresenter<SettlementReportCon
...
@@ -92,7 +92,7 @@ public class SettlementReportPresenter extends BasePresenter<SettlementReportCon
mSettlementReportItem5Adapter
=
new
SettlementReportItem5Adapter
(
IActivity
,
mSettlementReportItem5List
);
mSettlementReportItem5Adapter
=
new
SettlementReportItem5Adapter
(
IActivity
,
mSettlementReportItem5List
);
mRootView
.
setSettlementReportItem5Adapter
(
mSettlementReportItem5Adapter
);
mRootView
.
setSettlementReportItem5Adapter
(
mSettlementReportItem5Adapter
);
}
}
if
(
mPrintAdapter
==
null
)
{
if
(
mPrintAdapter
==
null
)
{
mPrintAdapter
=
new
SettlementReportItem5Adapter
(
IActivity
,
mSettlementReportItem5List
,
24
);
mPrintAdapter
=
new
SettlementReportItem5Adapter
(
IActivity
,
mSettlementReportItem5List
,
24
);
}
}
}
}
...
@@ -142,15 +142,15 @@ public class SettlementReportPresenter extends BasePresenter<SettlementReportCon
...
@@ -142,15 +142,15 @@ public class SettlementReportPresenter extends BasePresenter<SettlementReportCon
//打印清機報表
//打印清機報表
mRootView
.
printRepore
();
mRootView
.
printRepore
();
}
}
}
else
if
(
info
.
getErrCode
().
equals
(
"restaurant.operation.0003"
))
{
}
else
if
(
info
.
getErrCode
().
equals
(
"restaurant.operation.0003"
))
{
Class
[]
parameterTypes
=
{};
Class
[]
parameterTypes
=
{};
Object
[]
parameters
=
{};
Object
[]
parameters
=
{};
CommonTipDialog
.
showDoubtDialog
(
IActivity
,
"今天已清機過,是否繼續清機"
,
SettlementReportPresenter
.
class
,
SettlementReportPresenter
.
this
,
CommonTipDialog
.
showDoubtDialog
(
IActivity
,
"今天已清機過,是否繼續清機"
,
SettlementReportPresenter
.
class
,
SettlementReportPresenter
.
this
,
"sendSettlement"
,
parameterTypes
,
parameters
);
"sendSettlement"
,
parameterTypes
,
parameters
);
}
else
if
(
info
.
getErrCode
().
equals
(
"restaurant.operation.0004"
))
{
}
else
if
(
info
.
getErrCode
().
equals
(
"restaurant.operation.0004"
))
{
Class
[]
parameterTypes
=
{};
Class
[]
parameterTypes
=
{};
Object
[]
parameters
=
{};
Object
[]
parameters
=
{};
CommonTipDialog
.
showDoubtDialog
(
IActivity
,
"仍有外送訂單未結賬,請先結賬!"
,
SettlementReportPresenter
.
class
,
SettlementReportPresenter
.
this
,
CommonTipDialog
.
showDoubtDialog
(
IActivity
,
"仍有外送訂單未結賬,請先結賬!"
,
SettlementReportPresenter
.
class
,
SettlementReportPresenter
.
this
,
""
,
parameterTypes
,
parameters
);
""
,
parameterTypes
,
parameters
);
}
else
{
}
else
{
mRootView
.
showMessage
(
"清機失敗"
);
mRootView
.
showMessage
(
"清機失敗"
);
...
@@ -170,6 +170,15 @@ public class SettlementReportPresenter extends BasePresenter<SettlementReportCon
...
@@ -170,6 +170,15 @@ public class SettlementReportPresenter extends BasePresenter<SettlementReportCon
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
subscribe
(
new
ErrorHandleSubscriber
<
SettlementReport
>(
mErrorHandler
)
{
.
subscribe
(
new
ErrorHandleSubscriber
<
SettlementReport
>(
mErrorHandler
)
{
//{"success":false,"errCode":"data_002","errMsg":"沒有查詢到數據","sysTime":1583573772290}
//{"success":false,"errCode":"data_002","errMsg":"沒有查詢到數據","sysTime":1583573772290}
@Override
public
void
onSubscribe
(
Disposable
d
)
{
super
.
onSubscribe
(
d
);
}
@Override
public
void
onError
(
Throwable
t
)
{
super
.
onError
(
t
);
}
@Override
@Override
public
void
onNext
(
@NonNull
SettlementReport
info
)
{
public
void
onNext
(
@NonNull
SettlementReport
info
)
{
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/activity/NewMainActivity.java
View file @
42e42857
This diff is collapsed.
Click to expand it.
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/activity/SettlementReportActivity.java
View file @
42e42857
...
@@ -41,6 +41,7 @@ import com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog;
...
@@ -41,6 +41,7 @@ import com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog;
import
com.jess.arms.base.BaseActivity
;
import
com.jess.arms.base.BaseActivity
;
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.integration.AppManager
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.jess.arms.utils.DeviceUtils
;
import
com.jess.arms.utils.DeviceUtils
;
import
com.qmuiteam.qmui.widget.QMUITopBar
;
import
com.qmuiteam.qmui.widget.QMUITopBar
;
...
@@ -55,6 +56,8 @@ import java.util.HashMap;
...
@@ -55,6 +56,8 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.inject.Inject
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
...
@@ -75,6 +78,9 @@ import static com.jess.arms.utils.Preconditions.checkNotNull;
...
@@ -75,6 +78,9 @@ import static com.jess.arms.utils.Preconditions.checkNotNull;
*/
*/
public
class
SettlementReportActivity
extends
BaseActivity
<
SettlementReportPresenter
>
implements
SettlementReportContract
.
View
{
public
class
SettlementReportActivity
extends
BaseActivity
<
SettlementReportPresenter
>
implements
SettlementReportContract
.
View
{
@Inject
AppManager
mAppManager
;
@BindView
(
R2
.
id
.
topbar
)
@BindView
(
R2
.
id
.
topbar
)
QMUITopBar
mTopBar
;
QMUITopBar
mTopBar
;
...
@@ -261,6 +267,7 @@ public class SettlementReportActivity extends BaseActivity<SettlementReportPrese
...
@@ -261,6 +267,7 @@ public class SettlementReportActivity extends BaseActivity<SettlementReportPrese
String
projectTotalSalesText
=
LanguageUtils
.
get_language_system
(
this
,
"total.project.sales"
,
"項目銷售總額"
);
String
projectTotalSalesText
=
LanguageUtils
.
get_language_system
(
this
,
"total.project.sales"
,
"項目銷售總額"
);
String
discountText
=
LanguageUtils
.
get_language_system
(
this
,
""
,
"折扣"
);
String
discountText
=
LanguageUtils
.
get_language_system
(
this
,
""
,
"折扣"
);
String
serviceFeeText
=
LanguageUtils
.
get_language_system
(
this
,
""
,
"服務費"
);
String
serviceFeeText
=
LanguageUtils
.
get_language_system
(
this
,
""
,
"服務費"
);
String
deliveryFeeText
=
LanguageUtils
.
get_language_system
(
this
,
""
,
"配送費"
);
String
orderCountallText
=
LanguageUtils
.
get_language_system
(
this
,
"order.countall_litter"
,
"賬單小數"
);
String
orderCountallText
=
LanguageUtils
.
get_language_system
(
this
,
"order.countall_litter"
,
"賬單小數"
);
String
netTurnoverText
=
LanguageUtils
.
get_language_system
(
this
,
"net.turnover"
,
"營業金額淨值"
);
String
netTurnoverText
=
LanguageUtils
.
get_language_system
(
this
,
"net.turnover"
,
"營業金額淨值"
);
...
@@ -293,8 +300,9 @@ public class SettlementReportActivity extends BaseActivity<SettlementReportPrese
...
@@ -293,8 +300,9 @@ public class SettlementReportActivity extends BaseActivity<SettlementReportPrese
SettlementReport
.
DataBean
.
VoBean
voBean
=
datasBean
.
getVo
();
SettlementReport
.
DataBean
.
VoBean
voBean
=
datasBean
.
getVo
();
if
(
voBean
!=
null
)
{
if
(
voBean
!=
null
)
{
settlementReportItem5s
.
add
(
new
SectionTextItem5
(
projectTotalSalesText
,
null
,
null
,
null
,
cashStr
+
df
.
format
(
voBean
.
getPrices
())));
settlementReportItem5s
.
add
(
new
SectionTextItem5
(
projectTotalSalesText
,
null
,
null
,
null
,
cashStr
+
df
.
format
(
voBean
.
getPrices
())));
settlementReportItem5s
.
add
(
new
SectionTextItem5
(
discountText
,
null
,
null
,
null
,
cashStr
+
df
.
format
(
voBean
.
getDisamount
())));
settlementReportItem5s
.
add
(
new
SectionTextItem5
(
discountText
,
null
,
null
,
null
,
"-"
+
cashStr
+
df
.
format
(
voBean
.
getDisamount
())));
settlementReportItem5s
.
add
(
new
SectionTextItem5
(
serviceFeeText
,
null
,
null
,
null
,
cashStr
+
df
.
format
(
voBean
.
getScamount
())));
settlementReportItem5s
.
add
(
new
SectionTextItem5
(
serviceFeeText
,
null
,
null
,
null
,
cashStr
+
df
.
format
(
voBean
.
getScamount
())));
settlementReportItem5s
.
add
(
new
SectionTextItem5
(
deliveryFeeText
,
null
,
null
,
null
,
cashStr
+
df
.
format
(
voBean
.
getDeliverycharge
())));
settlementReportItem5s
.
add
(
new
SectionTextItem5
(
netTurnoverText
,
null
,
null
,
null
,
cashStr
+
df
.
format
(
voBean
.
getTotamount
())));
settlementReportItem5s
.
add
(
new
SectionTextItem5
(
netTurnoverText
,
null
,
null
,
null
,
cashStr
+
df
.
format
(
voBean
.
getTotamount
())));
// if (voBean.getPayNum() > 0) {
// if (voBean.getPayNum() > 0) {
...
@@ -523,9 +531,11 @@ public class SettlementReportActivity extends BaseActivity<SettlementReportPrese
...
@@ -523,9 +531,11 @@ public class SettlementReportActivity extends BaseActivity<SettlementReportPrese
.
callAsyncCallbackOnMainThread
((
cc
,
result
)
->
{
.
callAsyncCallbackOnMainThread
((
cc
,
result
)
->
{
//打印完之後,清除view
//打印完之後,清除view
PrintTransitUtils
.
getInstance
().
setPrintView
(
null
);
PrintTransitUtils
.
getInstance
().
setPrintView
(
null
);
if
(
mPresenter
!=
null
)
{
// if (mPresenter != null) {
mPresenter
.
getSettlementReport
();
// mPresenter.getSettlementReport();
}
// }
mAppManager
.
killActivity
(
SettlementActivity
.
class
);
killMyself
();
});
});
}
}
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/adapter/BusinessInfoAdapter.java
View file @
42e42857
package
com
.
gingersoft
.
gsa
.
cloud
.
main
.
mvp
.
ui
.
adapter
;
package
com
.
gingersoft
.
gsa
.
cloud
.
main
.
mvp
.
ui
.
adapter
;
import
android.widget.BaseAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.gingersoft.gsa.cloud.main.R
;
import
com.gingersoft.gsa.cloud.main.R
;
...
@@ -16,6 +18,7 @@ public class BusinessInfoAdapter extends BaseQuickAdapter<BusinessBean, BaseView
...
@@ -16,6 +18,7 @@ public class BusinessInfoAdapter extends BaseQuickAdapter<BusinessBean, BaseView
public
BusinessInfoAdapter
(
@Nullable
List
<
BusinessBean
>
data
)
{
public
BusinessInfoAdapter
(
@Nullable
List
<
BusinessBean
>
data
)
{
super
(
R
.
layout
.
report_business_info_item
,
data
);
super
(
R
.
layout
.
report_business_info_item
,
data
);
}
}
// @Override
// @Override
...
...
main-module/src/main/res/layout/activity_new_main.xml
View file @
42e42857
...
@@ -83,6 +83,16 @@
...
@@ -83,6 +83,16 @@
android:textSize=
"@dimen/dp_17"
/>
android:textSize=
"@dimen/dp_17"
/>
</LinearLayout>
</LinearLayout>
<TextView
android:id=
"@+id/tv_version_name"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_18"
android:layout_marginBottom=
"@dimen/dp_35"
android:gravity=
"center_vertical|bottom"
android:text=
""
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_14"
/>
</LinearLayout>
</LinearLayout>
<!-- 主頁內容-->
<!-- 主頁內容-->
...
@@ -227,11 +237,10 @@
...
@@ -227,11 +237,10 @@
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginRight=
"@dimen/dp_10"
app:hl_cornerRadius=
"@dimen/dp_4"
app:hl_cornerRadius=
"@dimen/dp_4"
app:hl_dy=
"@dimen/main_shadow_dy"
app:hl_dy=
"@dimen/main_shadow_dy"
android:visibility=
"
gon
e"
android:visibility=
"
visibl
e"
app:hl_shadowBackColor=
"@color/white"
app:hl_shadowBackColor=
"@color/white"
app:hl_shadowColor=
"@color/shadow_color"
app:hl_shadowColor=
"@color/shadow_color"
app:hl_shadowLimit=
"@dimen/main_shadow_limit"
app:hl_shadowLimit=
"@dimen/main_shadow_limit"
>
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -268,5 +277,6 @@
...
@@ -268,5 +277,6 @@
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.gingersoft.gsa.cloud.main.mvp.ui.view.SlidingMenu>
</com.gingersoft.gsa.cloud.main.mvp.ui.view.SlidingMenu>
main-module/src/main/res/layout/item_settlement_report5.xml
View file @
42e42857
...
@@ -41,8 +41,9 @@
...
@@ -41,8 +41,9 @@
<TextView
<TextView
android:id=
"@+id/tv_item4"
android:id=
"@+id/tv_item4"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:gravity=
"center"
android:maxLines=
"1"
android:maxLines=
"1"
android:text=
"item4"
android:text=
"item4"
...
@@ -59,5 +60,4 @@
...
@@ -59,5 +60,4 @@
android:text=
"item5"
android:text=
"item5"
android:textColor=
"@color/black"
android:textColor=
"@color/black"
android:textSize=
"@dimen/settlement_report_text_size"
/>
android:textSize=
"@dimen/settlement_report_text_size"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/data/model/bean/MessageBean.kt
View file @
42e42857
package
com.gingersoft.gsa.other_order_mode.data.model.bean
package
com.gingersoft.gsa.other_order_mode.data.model.bean
data class
MessageBean
(
val
code
:
String
,
val
errorMsg
:
String
,
val
success
:
Boolean
=
false
,
val
sysTime
:
Long
=
0
,
val
data
:
DataBean
?
=
null
)
{
data class
MessageBean
(
val
code
:
String
,
val
errorMsg
:
String
,
val
success
:
Boolean
=
false
,
val
sysTime
:
Long
=
0
,
val
data
:
String
?
=
null
)
class
DataBean
(
var
msg
:
String
?
=
null
,
var
num
:
Int
=
0
)
\ No newline at end of file
/**
* msg : 數據更新成功!
* num : 1
*
* {"code":"1","errorMsg":"成功","data":null}
*/
}
\ No newline at end of file
print-module/src/main/res/layout/print_confirm_order_view.xml
View file @
42e42857
...
@@ -31,10 +31,11 @@
...
@@ -31,10 +31,11 @@
<TextView
<TextView
android:id=
"@+id/tv_order_type"
android:id=
"@+id/tv_order_type"
style=
"@style/print_other_order_t
wenty_six
_style"
style=
"@style/print_other_order_t
hirty_bold
_style"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:textSize=
"@dimen/dp_35"
android:text=
'外送'
/>
android:text=
'外送'
/>
<TextView
<TextView
...
@@ -91,7 +92,7 @@
...
@@ -91,7 +92,7 @@
<TextView
<TextView
android:id=
"@+id/tv_order_take_food_code"
android:id=
"@+id/tv_order_take_food_code"
style=
"@style/print_other_order_t
wenty_six
_style"
style=
"@style/print_other_order_t
hirty
_style"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
""
android:text=
""
...
...
print-module/src/main/res/layout/print_other_order_food.xml
View file @
42e42857
...
@@ -5,27 +5,22 @@
...
@@ -5,27 +5,22 @@
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<!-- 接單的廚房單-->
<!-- 接單的廚房單-->
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
>
<TextView
<TextView
android:id=
"@+id/tv_order_type"
android:id=
"@+id/tv_order_type"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/theme_333_color"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_26"
/>
android:textStyle=
"bold"
android:textSize=
"@dimen/dp_34"
/>
<TextView
<TextView
android:id=
"@+id/tv_order_number"
android:id=
"@+id/tv_order_number"
style=
"@style/print_other_order_twenty_six_style"
style=
"@style/print_other_order_twenty_six_style"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_15"
android:text=
"單號:"
android:text=
"單號:"
android:textColor=
"@color/theme_333_color"
/>
android:textColor=
"@color/theme_333_color"
/>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/tv_order_create_time"
android:id=
"@+id/tv_order_create_time"
...
@@ -37,7 +32,7 @@
...
@@ -37,7 +32,7 @@
<TextView
<TextView
android:id=
"@+id/tv_order_take_code"
android:id=
"@+id/tv_order_take_code"
style=
"@style/print_other_order_t
wenty_six
_style"
style=
"@style/print_other_order_t
hirty
_style"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:layout_marginTop=
"@dimen/dp_5"
...
...
print-module/src/main/res/values/styles.xml
View file @
42e42857
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<style
name=
"print_other_order_thirty_style"
>
<style
name=
"print_other_order_thirty_style"
>
<item
name=
"android:textColor"
>
@color/theme_333_color
</item>
<item
name=
"android:textColor"
>
@color/theme_333_color
</item>
<item
name=
"android:textSize"
>
@dimen/dp_3
0
</item>
<item
name=
"android:textSize"
>
@dimen/dp_3
4
</item>
</style>
</style>
<style
name=
"print_other_order_thirty_bold_style"
parent=
"print_other_order_thirty_style"
>
<style
name=
"print_other_order_thirty_bold_style"
parent=
"print_other_order_thirty_style"
>
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/ComponentTable.java
View file @
42e42857
...
@@ -12,7 +12,7 @@ import com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity;
...
@@ -12,7 +12,7 @@ import com.gingersoft.gsa.cloud.table.mvp.ui.activity.TableActivity;
public
class
ComponentTable
implements
IComponent
{
public
class
ComponentTable
implements
IComponent
{
public
static
final
class
Function
{
public
static
final
class
table
{
/**餐檯頁*/
/**餐檯頁*/
public
static
final
FModule
[]
bottom
=
{
public
static
final
FModule
[]
bottom
=
{
new
FModule
(
"table/bottom/init"
,
R
.
mipmap
.
table_init
,
0
)
,
new
FModule
(
"table/bottom/init"
,
R
.
mipmap
.
table_init
,
0
)
,
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/bean/request/DeleteOrderRequest.java
View file @
42e42857
...
@@ -19,8 +19,6 @@ public class DeleteOrderRequest {
...
@@ -19,8 +19,6 @@ public class DeleteOrderRequest {
private
List
<
Map
<
Byte
,
DeleteOrderRequest
.
DeleteBean
>>
mapsDelete
;
private
List
<
Map
<
Byte
,
DeleteOrderRequest
.
DeleteBean
>>
mapsDelete
;
private
long
orderId
;
private
long
orderId
;
private
byte
type
;
private
byte
type
;
/**賬單小數*/
private
Double
rounding
;
private
long
reasonId
;
private
long
reasonId
;
public
List
<
Map
<
Byte
,
DeleteOrderRequest
.
DeleteBean
>>
getMapsDelete
()
{
public
List
<
Map
<
Byte
,
DeleteOrderRequest
.
DeleteBean
>>
getMapsDelete
()
{
...
@@ -47,14 +45,6 @@ public class DeleteOrderRequest {
...
@@ -47,14 +45,6 @@ public class DeleteOrderRequest {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
Double
getRounding
()
{
return
rounding
;
}
public
void
setRounding
(
Double
rounding
)
{
this
.
rounding
=
rounding
;
}
public
long
getReasonId
()
{
public
long
getReasonId
()
{
return
reasonId
;
return
reasonId
;
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/service/MealService.java
View file @
42e42857
...
@@ -12,6 +12,7 @@ import java.util.Map;
...
@@ -12,6 +12,7 @@ import java.util.Map;
import
io.reactivex.Observable
;
import
io.reactivex.Observable
;
import
me.jessyan.retrofiturlmanager.RetrofitUrlManager
;
import
me.jessyan.retrofiturlmanager.RetrofitUrlManager
;
import
okhttp3.FormBody
;
import
okhttp3.RequestBody
;
import
okhttp3.RequestBody
;
import
retrofit2.http.Body
;
import
retrofit2.http.Body
;
import
retrofit2.http.Field
;
import
retrofit2.http.Field
;
...
@@ -45,6 +46,7 @@ public interface MealService {
...
@@ -45,6 +46,7 @@ public interface MealService {
@POST
(
"food/updateInvisible"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
@POST
(
"food/updateInvisible"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
BaseResult
>
updateInvisible
(
@Body
RequestBody
requestBody
);
Observable
<
BaseResult
>
updateInvisible
(
@Body
RequestBody
requestBody
);
@POST
(
"order/send"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
@POST
(
"order/send"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
BaseResult
>
createOrder
(
@Body
RequestBody
requestBody
);
Observable
<
BaseResult
>
createOrder
(
@Body
RequestBody
requestBody
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/BaseOrderPresenter.java
View file @
42e42857
...
@@ -663,8 +663,24 @@ public class BaseOrderPresenter<M extends BaseOrderContract.Model, V extends Bas
...
@@ -663,8 +663,24 @@ public class BaseOrderPresenter<M extends BaseOrderContract.Model, V extends Bas
}
}
}
}
}
}
//删除食品后更新下标
mSelectMealAdapter
.
setIndex
();
}
}
// protected void reduceSelectedFoodNumber(int number) {
// List<OrderDetail> orderDetails = getOrderFoodLists();
// int start_position = mSelectMealAdapter.getSelect_full_start_position();
// int end_position = mSelectMealAdapter.getSelect_full_end_position();
// for (int i = orderDetails.size() - 1; i >= 0; i--) {
// if (start_position <= i && i <= end_position) {
// OrderDetail orderDetail1 = orderDetails.get(i);
// if (orderDetail1.getType() != DISCOUNT_TYPE) {
// orderDetail1.setNumber(orderDetail1.getNumber() - number);
// }
// }
// }
// }
/**
/**
* 返回未选中的食品
* 返回未选中的食品
*
*
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/MealStandPresenter.java
View file @
42e42857
...
@@ -160,14 +160,14 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -160,14 +160,14 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
mFoodGroupList
.
addAll
(
foodGroupList
);
mFoodGroupList
.
addAll
(
foodGroupList
);
Food
defalutFoodGroup
=
getDefalutFoodGroup
(
mFoodGroupList
);
Food
defalutFoodGroup
=
getDefalutFoodGroup
(
mFoodGroupList
);
if
(
defalutFoodGroup
!=
null
)
{
if
(
defalutFoodGroup
!=
null
)
{
//默認選中第一組
//默認選中第一組
defalutFoodGroup
.
setSelected
(
true
);
defalutFoodGroup
.
setSelected
(
true
);
}
}
IActivity
.
initFoodGroupView
(
mFoodGroupList
);
IActivity
.
initFoodGroupView
(
mFoodGroupList
);
if
(
defalutFoodGroup
!=
null
)
{
if
(
defalutFoodGroup
!=
null
)
{
changedMealByParentId
(
defalutFoodGroup
.
getId
());
changedMealByParentId
(
defalutFoodGroup
.
getId
());
}
}
}
}
...
@@ -175,8 +175,8 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -175,8 +175,8 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
private
Food
getDefalutFoodGroup
(
List
<
Food
>
foodGroupList
)
{
private
Food
getDefalutFoodGroup
(
List
<
Food
>
foodGroupList
)
{
Food
defalutFoodGroup
=
null
;
Food
defalutFoodGroup
=
null
;
for
(
Food
food:
foodGroupList
)
{
for
(
Food
food
:
foodGroupList
)
{
if
(
food
.
getInvisible
()
==
0
)
{
if
(
food
.
getInvisible
()
==
0
)
{
defalutFoodGroup
=
food
;
defalutFoodGroup
=
food
;
break
;
break
;
}
}
...
@@ -352,6 +352,11 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -352,6 +352,11 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
for
(
int
i
=
0
;
i
<
mFoodComboList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
mFoodComboList
.
size
();
i
++)
{
//自动添加组合子食品
//自动添加组合子食品
ComboItem
comboItem
=
mFoodComboList
.
get
(
i
);
ComboItem
comboItem
=
mFoodComboList
.
get
(
i
);
if
(
comboItem
.
isSold
())
{
String
msg
=
"["
+
comboItem
.
getName
()
+
"]"
+
comboItem
.
getCurrentMaxNumber
();
CommonTipDialog
.
showSurpisedDialog
(
IActivity
,
msg
,
null
,
null
,
null
,
null
,
null
);
continue
;
}
if
(
comboItem
.
getInvisible
()
!=
2
)
{
if
(
comboItem
.
getInvisible
()
!=
2
)
{
int
defNumber
=
Integer
.
parseInt
(
comboItem
.
getDefmodifier
());
int
defNumber
=
Integer
.
parseInt
(
comboItem
.
getDefmodifier
());
if
(
defNumber
!=
0
)
{
if
(
defNumber
!=
0
)
{
...
@@ -366,6 +371,11 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -366,6 +371,11 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
//自动添加mixqty>1細項
//自动添加mixqty>1細項
for
(
int
i
=
0
;
i
<
mModifierList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
mModifierList
.
size
();
i
++)
{
Modifier
modfier
=
mModifierList
.
get
(
i
);
Modifier
modfier
=
mModifierList
.
get
(
i
);
if
(
modfier
.
isSold
())
{
String
msg
=
"["
+
modfier
.
getModifierName
()
+
"]"
+
modfier
.
getCurrentMaxNumber
();
CommonTipDialog
.
showSurpisedDialog
(
IActivity
,
msg
,
null
,
null
,
null
,
null
,
null
);
continue
;
}
if
(
modfier
.
getInvisible
()
!=
2
)
{
if
(
modfier
.
getInvisible
()
!=
2
)
{
int
defNumber
=
Integer
.
parseInt
(
modfier
.
getDefmodifier
());
int
defNumber
=
Integer
.
parseInt
(
modfier
.
getDefmodifier
());
if
(
defNumber
!=
0
)
{
if
(
defNumber
!=
0
)
{
...
@@ -616,6 +626,18 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -616,6 +626,18 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseResult
>(
mErrorHandler
)
{
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseResult
>(
mErrorHandler
)
{
@Override
@Override
public
void
onComplete
()
{
super
.
onComplete
();
updateFoodSoldoutCtrData
(
mSoldoutCtrList
);
}
@Override
public
void
onError
(
Throwable
t
)
{
super
.
onError
(
t
);
updateFoodSoldoutCtrData
(
mSoldoutCtrList
);
}
@Override
public
void
onNext
(
@NonNull
BaseResult
info
)
{
public
void
onNext
(
@NonNull
BaseResult
info
)
{
if
(
info
!=
null
&&
info
.
isSuccess
()
&&
info
.
getData
()
!=
null
)
{
if
(
info
!=
null
&&
info
.
isSuccess
()
&&
info
.
getData
()
!=
null
)
{
List
<
SoldoutCtrFood
>
soldoutCtrFoods
=
JsonUtils
.
parseArray
(
info
.
getData
(),
SoldoutCtrFood
.
class
);
List
<
SoldoutCtrFood
>
soldoutCtrFoods
=
JsonUtils
.
parseArray
(
info
.
getData
(),
SoldoutCtrFood
.
class
);
...
@@ -625,7 +647,7 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -625,7 +647,7 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
}
}
mSoldoutCtrList
.
addAll
(
soldoutCtrFoods
);
mSoldoutCtrList
.
addAll
(
soldoutCtrFoods
);
updateFoodSoldoutCtrData
(
mSoldoutCtrList
);
//
updateFoodSoldoutCtrData(mSoldoutCtrList);
//設置細項沽清數
//設置細項沽清數
IActivity
.
setFineItemSlodoutListFull
(
mSoldoutCtrList
);
IActivity
.
setFineItemSlodoutListFull
(
mSoldoutCtrList
);
}
else
{
}
else
{
...
@@ -666,7 +688,7 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -666,7 +688,7 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
MyOrderManage
.
getInstance
().
setNewFoodList
(
getOrderFoodLists
());
MyOrderManage
.
getInstance
().
setNewFoodList
(
getOrderFoodLists
());
printSendOrder
(
true
);
printSendOrder
(
true
);
}
else
{
}
else
{
mRootView
.
showMessage
(
"送單失敗"
);
mRootView
.
showMessage
(
info
.
getErrMsg
()
);
}
}
}
}
});
});
...
@@ -707,7 +729,7 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -707,7 +729,7 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
}
}
printSendOrder
(
false
);
printSendOrder
(
false
);
}
else
{
}
else
{
mRootView
.
showMessage
(
"送單失敗"
);
mRootView
.
showMessage
(
info
.
getErrMsg
()
);
}
}
}
}
}
}
...
@@ -750,23 +772,24 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -750,23 +772,24 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
// });
// });
}
}
/**
* 問題:刪除數量 1.賬單小數未更新 世維調整
* 刪除已送單食品
*
* @param maxNumber
* @param deleteNumber
* @param reasonId
*/
public
void
deleteFood
(
int
maxNumber
,
int
deleteNumber
,
long
reasonId
)
{
public
void
deleteFood
(
int
maxNumber
,
int
deleteNumber
,
long
reasonId
)
{
//删除食品前先保存一份
List
<
OrderDetail
>
recodeOrderFoods
=
new
ArrayList
<>();
recodeOrderFoods
.
addAll
(
getOrderFoodLists
());
String
ids
=
getSelectedOldFoodIds
();
String
ids
=
getSelectedOldFoodIds
();
if
(
TextUtils
.
isEmpty
(
ids
))
{
if
(
TextUtils
.
isEmpty
(
ids
))
{
return
;
return
;
}
}
//删除已选中食品 重新计算账单小数 折扣
removeSelectedFoods
();
updateOrderMoneyItem
();
DeleteOrderRequest
.
Request
request
=
getDeleteOrderRequest
(
ids
,
reasonId
,
maxNumber
,
deleteNumber
);
DeleteOrderRequest
.
Request
request
=
getDeleteOrderRequest
(
ids
,
reasonId
,
maxNumber
,
deleteNumber
);
String
deleteOrderRequest
=
GsonUtils
.
GsonString
(
request
);
String
deleteOrderRequest
=
GsonUtils
.
GsonString
(
request
);
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
deleteOrderRequest
+
","
);
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
deleteOrderRequest
);
mModel
.
deleteFood
(
requestBody
)
mModel
.
deleteFood
(
requestBody
)
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
Schedulers
.
io
())
...
@@ -777,22 +800,10 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -777,22 +800,10 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseRespose
>(
mErrorHandler
)
{
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseRespose
>(
mErrorHandler
)
{
private
void
restoreOrderDetails
(){
getOrderFoodLists
().
addAll
(
recodeOrderFoods
);
recodeOrderFoods
.
clear
();
mSelectMealAdapter
.
notifyDataSetChanged
();
}
@Override
public
void
onError
(
Throwable
t
)
{
super
.
onError
(
t
);
restoreOrderDetails
();
}
@Override
@Override
public
void
onNext
(
@NonNull
BaseRespose
info
)
{
public
void
onNext
(
@NonNull
BaseRespose
info
)
{
if
(
info
==
null
)
{
if
(
info
==
null
)
{
restoreOrderDetails
();
mRootView
.
showMessage
(
"刪除失敗"
);
mRootView
.
showMessage
(
"刪除失敗"
);
return
;
return
;
}
}
...
@@ -1633,8 +1644,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -1633,8 +1644,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
request
.
setOrderId
(
orderId
);
request
.
setOrderId
(
orderId
);
request
.
setType
(
type
);
request
.
setType
(
type
);
request
.
setReasonId
(
reasonId
);
request
.
setReasonId
(
reasonId
);
Double
rounding
=
getRounding
();
request
.
setRounding
(
rounding
!=
null
?
rounding
:
0
);
return
request
;
return
request
;
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/OrderContentPresenter.java
View file @
42e42857
...
@@ -23,7 +23,11 @@ import com.gingersoft.gsa.cloud.constans.GoldConstants;
...
@@ -23,7 +23,11 @@ import com.gingersoft.gsa.cloud.constans.GoldConstants;
import
com.gingersoft.gsa.cloud.constans.PrintConstans
;
import
com.gingersoft.gsa.cloud.constans.PrintConstans
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
import
com.gingersoft.gsa.cloud.database.bean.Function
;
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.print.PrinterUtils
;
import
com.gingersoft.gsa.cloud.table.ComponentTable
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.app.TableOperatTypeConstant
;
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.BaseRespose
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.BaseRespose
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.TableDetail
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.TableDetail
;
...
@@ -135,6 +139,40 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
...
@@ -135,6 +139,40 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
if
(
XClickUtil
.
isFastDoubleClick
(
v
,
1000
))
{
if
(
XClickUtil
.
isFastDoubleClick
(
v
,
1000
))
{
return
;
return
;
}
}
// if (function.getResUrl().equals(ComponentTable.table.order[0].getKeyRes())) {
// //送單
// sendOrder(false);
// } else if (function.getResUrl().equals(ComponentTable.table.order[1].getKeyRes())) {
// //印單
// if (!canPrint()) {
// return;
// }
// if (hasNesOrderFoods()) {
// //有未送單食品先送單
// sendOrder(true);
// } else {
// printOrder(OpenTableManage.getDefault().getTableBean().getId(), false);
// }
// } else if (function.getResUrl().equals(ComponentTable.table.order[2].getKeyRes())) {
// //結賬
// if (!canPay()) {
// return;
// }
// mRootView.startActivityForResult(OrderContentActivity.BILL_CODE, OrderPayActivity.class, null);
// } else if (function.getResUrl().equals(ComponentTable.table.order[3].getKeyRes())) {
// //轉移
// if (!canTransfer()) {
// return;
// }
// mRootView.showTransferFoodLayout();
// } else if (function.getResUrl().equals(ComponentTable.table.order[4].getKeyRes())) {
// //折扣
// if (!canDiscount()) {
// return;
// }
// showDiscountDialog();
// }
switch
(
function
.
getResName
())
{
switch
(
function
.
getResName
())
{
case
"送單"
:
case
"送單"
:
sendOrder
(
false
);
sendOrder
(
false
);
...
@@ -174,7 +212,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
...
@@ -174,7 +212,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
@Override
@Override
public
boolean
onItemLongClick
(
View
v
,
Function
datasBean
)
{
public
boolean
onItemLongClick
(
View
v
,
Function
datasBean
)
{
if
(
datasBean
.
getResName
().
equals
(
"印單"
)
||
datasBean
.
getResName
().
equals
(
"送單"
))
{
if
(
datasBean
.
getResName
().
equals
(
"印單"
)
||
datasBean
.
getResName
().
equals
(
"送單"
))
{
PrinterUtils
.
switchPrintMethod
(
IActivity
,
datasBean
,
mOrderTopFunctionAdapter
);
PrinterUtils
.
switchPrintMethod
(
IActivity
,
datasBean
,
mOrderTopFunctionAdapter
);
}
}
return
false
;
return
false
;
}
}
...
@@ -206,11 +244,11 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
...
@@ -206,11 +244,11 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
mFunctionList
.
add
(
new
Function
(
"結賬"
,
Color
.
parseColor
(
"#FFFFFF"
),
Color
.
parseColor
(
"#DC0000"
),
24
));
mFunctionList
.
add
(
new
Function
(
"結賬"
,
Color
.
parseColor
(
"#FFFFFF"
),
Color
.
parseColor
(
"#DC0000"
),
24
));
mFunctionList
.
add
(
new
Function
(
"轉移"
,
Color
.
parseColor
(
"#FFFFFF"
),
Color
.
parseColor
(
"#FF4B9DFA"
),
24
));
mFunctionList
.
add
(
new
Function
(
"轉移"
,
Color
.
parseColor
(
"#FFFFFF"
),
Color
.
parseColor
(
"#FF4B9DFA"
),
24
));
mFunctionList
.
add
(
new
Function
(
"折扣"
,
Color
.
parseColor
(
"#FFFFFF"
),
Color
.
parseColor
(
"#008577"
),
24
));
mFunctionList
.
add
(
new
Function
(
"折扣"
,
Color
.
parseColor
(
"#FFFFFF"
),
Color
.
parseColor
(
"#008577"
),
24
));
// List<Function> functions = FunctionManager.getDefault().getFunctionByResModule(IActivity,
FunctionModule.Table.class
, "order");
// List<Function> functions = FunctionManager.getDefault().getFunctionByResModule(IActivity,
ComponentTable.table.class, ComponentTable.table.order
, "order");
// for (int i = 0; i < functions.size(); i++) {
// for (int i = 0; i < functions.size(); i++) {
//
functions.get(i).setTextSize(ArmsUtils.getDimens(IActivity, R.dimen.sp_14));
//
if (functions.get(i).getParentId() == 0) {
//
functions.get(i).setTextColor(ArmsUtils.getColor(IActivity, R.color.theme_white_color)
);
//
functions.remove(i
);
//
functions.get(i).setIconRes(FunctionModule.Table.order[i].getOpenIconRes());
//
}
// }
// }
// mFunctionList.addAll(functions);
// mFunctionList.addAll(functions);
}
}
...
@@ -260,7 +298,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
...
@@ -260,7 +298,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
if
(
isPrint
)
{
if
(
isPrint
)
{
printOrder
(
OpenTableManage
.
getDefault
().
getTableBean
().
getId
(),
true
);
printOrder
(
OpenTableManage
.
getDefault
().
getTableBean
().
getId
(),
true
);
}
else
{
}
else
{
mRootView
.
showMessage
(
"送單失敗"
);
mRootView
.
showMessage
(
info
.
getErrMsg
()
);
}
}
}
}
}
}
...
@@ -302,7 +340,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
...
@@ -302,7 +340,7 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
mRootView
.
showMessage
(
"送單成功"
);
mRootView
.
showMessage
(
"送單成功"
);
// mRootView.sendSuccess();
// mRootView.sendSuccess();
}
else
{
}
else
{
mRootView
.
showMessage
(
"送單失敗"
);
mRootView
.
showMessage
(
info
.
getErrMsg
()
);
}
}
}
}
}
}
...
@@ -547,9 +585,11 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
...
@@ -547,9 +585,11 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseRespose
>(
mErrorHandler
)
{
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseRespose
>(
mErrorHandler
)
{
private
void
restoreOrderDetails
(){
private
void
restoreOrderDetails
()
{
getOrderFoodLists
().
clear
();
getOrderFoodLists
().
addAll
(
recodeOrderFoods
);
getOrderFoodLists
().
addAll
(
recodeOrderFoods
);
recodeOrderFoods
.
clear
();
recodeOrderFoods
.
clear
();
mSelectMealAdapter
.
setIndex
();
mSelectMealAdapter
.
notifyDataSetChanged
();
mSelectMealAdapter
.
notifyDataSetChanged
();
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
View file @
42e42857
...
@@ -13,6 +13,7 @@ import com.gingersoft.gsa.cloud.base.common.bean.mealManage.MyOrderManage;
...
@@ -13,6 +13,7 @@ import com.gingersoft.gsa.cloud.base.common.bean.mealManage.MyOrderManage;
import
com.gingersoft.gsa.cloud.base.common.bean.mealManage.OpenTableManage
;
import
com.gingersoft.gsa.cloud.base.common.bean.mealManage.OpenTableManage
;
import
com.gingersoft.gsa.cloud.base.utils.CommonConfiguration
;
import
com.gingersoft.gsa.cloud.base.utils.CommonConfiguration
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.base.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
;
import
com.gingersoft.gsa.cloud.constans.GoldConstants
;
import
com.gingersoft.gsa.cloud.constans.GoldConstants
;
import
com.gingersoft.gsa.cloud.database.bean.FoodCombo
;
import
com.gingersoft.gsa.cloud.database.bean.FoodCombo
;
import
com.gingersoft.gsa.cloud.database.bean.Function
;
import
com.gingersoft.gsa.cloud.database.bean.Function
;
...
@@ -59,6 +60,8 @@ import okhttp3.RequestBody;
...
@@ -59,6 +60,8 @@ import okhttp3.RequestBody;
import
static
com
.
gingersoft
.
gsa
.
cloud
.
base
.
common
.
bean
.
OrderDetail
.
FOOD_TYPE
;
import
static
com
.
gingersoft
.
gsa
.
cloud
.
base
.
common
.
bean
.
OrderDetail
.
FOOD_TYPE
;
import
static
com
.
gingersoft
.
gsa
.
cloud
.
base
.
common
.
bean
.
OrderDetail
.
MODIFIER_TYPE
;
import
static
com
.
gingersoft
.
gsa
.
cloud
.
base
.
common
.
bean
.
OrderDetail
.
MODIFIER_TYPE
;
import
static
com
.
gingersoft
.
gsa
.
cloud
.
database
.
bean
.
Function
.
STATUS_NONACTIVATED
;
import
static
com
.
gingersoft
.
gsa
.
cloud
.
database
.
bean
.
Function
.
STATUS_TIME_LIMIT
;
/**
/**
...
@@ -151,39 +154,59 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -151,39 +154,59 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
@Override
@Override
public
void
onItemClick
(
View
view
,
int
viewType
,
Object
data
,
int
position
)
{
public
void
onItemClick
(
View
view
,
int
viewType
,
Object
data
,
int
position
)
{
switch
(
position
)
{
Function
function
=
(
Function
)
data
;
case
0
:
switch
(
function
.
getStatus
())
{
case
STATUS_NONACTIVATED:
mRootView
.
showMessage
(
"服務暫未開通,敬請期待"
);
return
;
case
STATUS_TIME_LIMIT:
mRootView
.
showMessage
(
"服務已到期,請前往續費"
);
return
;
}
if
(
function
.
getResUrl
().
equals
(
ComponentTable
.
table
.
bottom
[
0
].
getKeyRes
()))
{
//重置
//重置
mRootView
.
setCurrentOperatType
(
TableOperatTypeConstant
.
init_table_3
);
mRootView
.
setCurrentOperatType
(
TableOperatTypeConstant
.
init_table_3
);
break
;
}
else
if
(
function
.
getResUrl
().
equals
(
ComponentTable
.
table
.
bottom
[
1
].
getKeyRes
()))
{
case
1
:
//轉檯
//轉檯
mRootView
.
setCurrentOperatType
(
TableOperatTypeConstant
.
move_table_4
);
mRootView
.
setCurrentOperatType
(
TableOperatTypeConstant
.
move_table_4
);
break
;
}
else
if
(
function
.
getResUrl
().
equals
(
ComponentTable
.
table
.
bottom
[
3
].
getKeyRes
()))
{
case
2
:
//上菜紙
//上菜紙
mRootView
.
setCurrentOperatType
(
TableOperatTypeConstant
.
print_parper_2
);
mRootView
.
setCurrentOperatType
(
TableOperatTypeConstant
.
print_parper_2
);
break
;
}
}
// switch (position) {
// case 0:
// //重置
// mRootView.setCurrentOperatType(TableOperatTypeConstant.init_table_3);
// break;
// case 1:
// //轉檯
// mRootView.setCurrentOperatType(TableOperatTypeConstant.move_table_4);
// break;
// case 2:
// //上菜紙
// mRootView.setCurrentOperatType(TableOperatTypeConstant.print_parper_2);
// break;
// }
}
}
});
});
}
}
public
void
initBottomFunctionItem
()
{
public
void
initBottomFunctionItem
()
{
// List<Function> functions = FunctionManager.getDefault().getFunctionByResModule(IActivity, ComponentTable.Function.class, ComponentTable.Function
.bottom,"bottom");
List
<
Function
>
functions
=
FunctionManager
.
getDefault
().
getFunctionByResModule
(
IActivity
,
ComponentTable
.
table
.
class
,
ComponentTable
.
table
.
bottom
,
"bottom"
);
//
for (int i = 0; i < functions.size(); i++) {
for
(
int
i
=
0
;
i
<
functions
.
size
();
i
++)
{
// functions.get(i).setTextSize(ArmsUtils.getDimens(IActivity, R.dimen.sp_14));
if
(
functions
.
get
(
i
).
getParentId
()
==
0
){
// functions.get(i).setTextColor(ArmsUtils.getColor(IActivity, R.color.theme_black)
);
functions
.
remove
(
i
);
// functions.get(i).setIconRes(ComponentTable.Function.bottom[i].getOpenIconRes());
}
//
}
}
//
mBottomFunctionList.addAll(functions);
mBottomFunctionList
.
addAll
(
functions
);
mBottomFunctionList
.
add
(
new
Function
((
long
)
1
,
"重置檯號"
,
ArmsUtils
.
getColor
(
IActivity
,
R
.
color
.
theme_black
),
ArmsUtils
.
getDimens
(
IActivity
,
R
.
dimen
.
sp_14
),
R
.
mipmap
.
table_init
));
//
mBottomFunctionList.add(new Function((long) 1, "重置檯號", ArmsUtils.getColor(IActivity, R.color.theme_black), ArmsUtils.getDimens(IActivity, R.dimen.sp_14), R.mipmap.table_init));
mBottomFunctionList
.
add
(
new
Function
((
long
)
2
,
"轉檯"
,
ArmsUtils
.
getColor
(
IActivity
,
R
.
color
.
theme_black
),
ArmsUtils
.
getDimens
(
IActivity
,
R
.
dimen
.
sp_14
),
R
.
mipmap
.
table_move
));
//
mBottomFunctionList.add(new Function((long) 2, "轉檯", ArmsUtils.getColor(IActivity, R.color.theme_black), ArmsUtils.getDimens(IActivity, R.dimen.sp_14), R.mipmap.table_move));
// mBottomFunctionList.add(new Function((long) 3, "分檯", ArmsUtils.getColor(IActivity, R.color.theme_black), ArmsUtils.getDimens(IActivity, R.dimen.sp_14), R.mipmap.table_splite));
// mBottomFunctionList.add(new Function((long) 3, "分檯", ArmsUtils.getColor(IActivity, R.color.theme_black), ArmsUtils.getDimens(IActivity, R.dimen.sp_14), R.mipmap.table_splite));
// mBottomFunctionList.add(new Function((long) 4, "skyorder", ArmsUtils.getColor(IActivity, R.color.theme_black), ArmsUtils.getDimens(IActivity, R.dimen.sp_14), R.mipmap.table_skyorder));
// mBottomFunctionList.add(new Function((long) 4, "skyorder", ArmsUtils.getColor(IActivity, R.color.theme_black), ArmsUtils.getDimens(IActivity, R.dimen.sp_14), R.mipmap.table_skyorder));
mBottomFunctionList
.
add
(
new
Function
((
long
)
5
,
"上菜紙"
,
ArmsUtils
.
getColor
(
IActivity
,
R
.
color
.
theme_black
),
ArmsUtils
.
getDimens
(
IActivity
,
R
.
dimen
.
sp_14
),
R
.
mipmap
.
table_paper
));
//
mBottomFunctionList.add(new Function((long) 5, "上菜紙", ArmsUtils.getColor(IActivity, R.color.theme_black), ArmsUtils.getDimens(IActivity, R.dimen.sp_14), R.mipmap.table_paper));
}
}
public
void
getTables
(
boolean
show
,
RefreshLayout
refreshLayout
)
{
public
void
getTables
(
boolean
show
,
RefreshLayout
refreshLayout
)
{
int
restaurantId
=
GsaCloudApplication
.
getRestaurantId
(
mApplication
);
int
restaurantId
=
GsaCloudApplication
.
getRestaurantId
(
mApplication
);
mModel
.
getTables
(
restaurantId
)
mModel
.
getTables
(
restaurantId
)
...
@@ -402,7 +425,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
...
@@ -402,7 +425,7 @@ public class TablePresenter extends BasePresenter<TableContract.Model, TableCont
OrderBean
.
OrderDetailsBean
orderDetailsBean
=
orderDetailsBeans
.
get
(
i
);
OrderBean
.
OrderDetailsBean
orderDetailsBean
=
orderDetailsBeans
.
get
(
i
);
if
(
orderDetailsBean
.
getType
()
==
FOOD_TYPE
)
{
if
(
orderDetailsBean
.
getType
()
==
FOOD_TYPE
)
{
int
nextIndex
=
i
+
1
;
int
nextIndex
=
i
+
1
;
if
(
orderDetailsBean
.
getParentId
()
==
0
||
(
orderDetailsBeans
.
size
()
>
nextIndex
&&
orderDetailsBeans
.
get
(
nextIndex
).
getType
()
==
MODIFIER_TYPE
)
)
{
if
(
orderDetailsBean
.
getParentId
()
==
0
||
(
orderDetailsBeans
.
size
()
>
nextIndex
&&
orderDetailsBeans
.
get
(
nextIndex
).
getType
()
==
MODIFIER_TYPE
))
{
paroductId
=
orderDetailsBean
.
getProductId
();
paroductId
=
orderDetailsBean
.
getProductId
();
}
}
topId
=
getComboIdByFid
(
paroductId
);
topId
=
getComboIdByFid
(
paroductId
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/BottomFunctionAdapter.java
View file @
42e42857
...
@@ -69,7 +69,7 @@ public class BottomFunctionAdapter extends DefaultAdapter<Function> {
...
@@ -69,7 +69,7 @@ public class BottomFunctionAdapter extends DefaultAdapter<Function> {
private
void
initItemData
(
Function
item
)
{
private
void
initItemData
(
Function
item
)
{
tv_name
.
setText
(
item
.
getResName
());
tv_name
.
setText
(
item
.
getResName
());
iv_icon
.
setImageResource
(
item
.
getIc
on
Res
());
iv_icon
.
setImageResource
(
item
.
getIcRes
());
}
}
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/meal/FoodGroupAdapter.java
View file @
42e42857
...
@@ -193,10 +193,12 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
...
@@ -193,10 +193,12 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
// } else {
// } else {
// //后台没有设置颜色当前选中高亮色,没有选中默认使用绿色
// //后台没有设置颜色当前选中高亮色,没有选中默认使用绿色
if
(
datasBean
.
isSelected
())
{
if
(
datasBean
.
isSelected
())
{
tv_name
.
setBackgroundColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
orange_500
));
tv_name
.
setBackgroundColor
(
Color
.
parseColor
(
"#3C3C3C"
));
// tv_name.setBackgroundColor(ArmsUtils.getColor(mContext, R.color.orange_500));
tv_name
.
setTextColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
theme_white_color
));
tv_name
.
setTextColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
theme_white_color
));
}
else
{
}
else
{
tv_name
.
setBackgroundColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
Grass_green
));
tv_name
.
setBackgroundColor
(
Color
.
parseColor
(
"#FF9700"
));
// tv_name.setBackgroundColor(ArmsUtils.getColor(mContext, R.color.Grass_green));
tv_name
.
setTextColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
theme_white_color
));
tv_name
.
setTextColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
theme_white_color
));
}
}
// }
// }
...
...
table-module/src/main/res/layout/table_item_bottom_function.xml
View file @
42e42857
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
android:id=
"@+id/iv_icon"
android:id=
"@+id/iv_icon"
android:layout_width=
"@dimen/dp_25"
android:layout_width=
"@dimen/dp_25"
android:layout_height=
"@dimen/dp_25"
android:layout_height=
"@dimen/dp_25"
android:layout_marginTop=
"@dimen/dp_5"
/>
android:layout_marginTop=
"@dimen/dp_5"
android:src=
"@mipmap/ic_launcher"
/>
<TextView
<TextView
android:id=
"@+id/tv_name"
android:id=
"@+id/tv_name"
...
...
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