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
c674b533
Commit
c674b533
authored
Jun 16, 2020
by
Wyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6.16 心跳優化,訂單詳情加載優化,打印機加機型。
parent
c07bddb7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
289 additions
and
53 deletions
+289
-53
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/HttpsConstans.java
+34
-34
base-module/src/main/java/com/gingersoft/gsa/cloud/ui/view/OrderPayView.java
+52
-0
base-module/src/main/res/layout/layout_order_pay.xml
+89
-0
base-module/src/main/res/values/colors.xml
+2
-0
config.gradle
+2
-2
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/NewMainPresenter.java
+8
-1
main-module/src/main/res/layout/activity_new_main.xml
+1
-1
other_order_mode/build.gradle
+2
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/OtherOrderComponent.java
+9
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/service/GetInfoUpdateService.kt
+0
-0
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OrderDetailsActivity.kt
+25
-5
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OtherOrderActivity.kt
+4
-4
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/RxTimerUtil.kt
+43
-0
other_order_mode/src/main/res/drawable/glide.xml
+10
-0
other_order_mode/src/main/res/layout/activity_order_details.xml
+2
-1
other_order_mode/src/main/res/layout/activity_order_details_loading.xml
+0
-0
other_order_mode/src/main/res/layout/item_delivery_layout.xml
+1
-1
other_order_mode/src/main/res/values/values.xml
+5
-0
print-module/src/main/java/com/joe/print/mvp/print/service/PrjService.java
+0
-1
table-module/src/main/AndroidManifest.xml
+0
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderPayActivity.java
+0
-1
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/HttpsConstans.java
View file @
c674b533
...
...
@@ -94,10 +94,10 @@ public class HttpsConstans {
//修改這個值,修改微信公眾號報表地址:首頁曲線圖數據,支付分析報表數據
public
static
String
WECHAR_REPORT_SERVER_ADDRESS
;
// = (isFormal ? WECHAR_REPORT_FORMAL_ADDRESS : WECHAR_REPORT_TEST_ADDRESS) + WECHAR_REPORT_PATH;//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
public
static
void
init
(
Context
context
,
boolean
isSwitchServer
)
{
public
static
void
init
(
Context
context
,
boolean
isSwitchServer
)
{
isFormal
=
(
int
)
SPUtils
.
get
(
context
,
"isFormal"
,
1
);
if
(!
BuildConfig
.
DEBUG
&&
!
isSwitchServer
)
{
isFormal
=
1
;
if
(!
isSwitchServer
)
{
isFormal
=
BuildConfig
.
DEBUG
?
2
:
1
;
}
// _SERVER_ADDRESS = (isFormal == 1 ? HTTP_ADDRESS_URL_FORMAL : "http://a.ricepon.com:61177") + "/member-web/api/";
// ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL = isFormal ==1 ? HTTP_ADDRESS_URL_FORMAL : REPORT_TEST_ADDRESS;
...
...
@@ -106,46 +106,46 @@ public class HttpsConstans {
// REPORT_SERVER_ADDRESS = (isFormal ==1 ? REPORT_FORMAL_ADDRESS : REPORT_TEST_ADDRESS) + REPORT_PATH;//測試:REPORT_FORMAL_ADDRESS 正式:REPORT_TEST_ADDRESS
// WECHAR_REPORT_SERVER_ADDRESS = (isFormal == 1 ? WECHAR_REPORT_FORMAL_ADDRESS : WECHAR_REPORT_TEST_ADDRESS) + WECHAR_REPORT_PATH;//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
switch
(
isFormal
){
switch
(
isFormal
)
{
case
1
:
_SERVER_ADDRESS
=
HTTP_ADDRESS_URL_FORMAL
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
HTTP_ADDRESS_URL_FORMAL
;
ROOT_SERVER_ADDRESS_FORMAL
=
HTTP_ADDRESS_URL_FORMAL
+
PATH
;
ROOT_URL
=
ROOT_FORMAL_URL
;
REPORT_SERVER_ADDRESS
=
REPORT_FORMAL_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_FORMAL_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
_SERVER_ADDRESS
=
HTTP_ADDRESS_URL_FORMAL
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
HTTP_ADDRESS_URL_FORMAL
;
ROOT_SERVER_ADDRESS_FORMAL
=
HTTP_ADDRESS_URL_FORMAL
+
PATH
;
ROOT_URL
=
ROOT_FORMAL_URL
;
REPORT_SERVER_ADDRESS
=
REPORT_FORMAL_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_FORMAL_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
break
;
case
2
:
_SERVER_ADDRESS
=
"http://a.ricepon.com:61177"
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
HTTP_ADDRESS_URL_HK
+
PATH
;
ROOT_URL
=
ROOT_HK_TEST_URL
;
REPORT_SERVER_ADDRESS
=
REPORT_TEST_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_TEST_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
_SERVER_ADDRESS
=
"http://a.ricepon.com:61177"
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
HTTP_ADDRESS_URL_HK
+
PATH
;
ROOT_URL
=
ROOT_HK_TEST_URL
;
REPORT_SERVER_ADDRESS
=
REPORT_TEST_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_TEST_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
break
;
case
3
:
_SERVER_ADDRESS
=
ROOT_SERVER_YOU_CHANG_HK
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
ROOT_SERVER_YOU_CHANG_HK
;
ROOT_URL
=
ROOT_SZ_URL
;
REPORT_SERVER_ADDRESS
=
REPORT_TEST_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_TEST_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
_SERVER_ADDRESS
=
ROOT_SERVER_YOU_CHANG_HK
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
ROOT_SERVER_YOU_CHANG_HK
;
ROOT_URL
=
ROOT_SZ_URL
;
REPORT_SERVER_ADDRESS
=
REPORT_TEST_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_TEST_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
break
;
case
4
:
_SERVER_ADDRESS
=
ROOT_SERVER_SHI_WEI_HK
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
ROOT_SERVER_SHI_WEI_HK
;
ROOT_URL
=
ROOT_SZ_URL
;
REPORT_SERVER_ADDRESS
=
REPORT_TEST_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_TEST_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
_SERVER_ADDRESS
=
ROOT_SERVER_SHI_WEI_HK
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
ROOT_SERVER_SHI_WEI_HK
;
ROOT_URL
=
ROOT_SZ_URL
;
REPORT_SERVER_ADDRESS
=
REPORT_TEST_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_TEST_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
break
;
case
5
:
_SERVER_ADDRESS
=
ROOT_SERVER_SHI_SHU_HK
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
ROOT_SERVER_SHI_SHU_HK
;
ROOT_URL
=
ROOT_SZ_URL
;
REPORT_SERVER_ADDRESS
=
REPORT_TEST_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_TEST_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
_SERVER_ADDRESS
=
ROOT_SERVER_SHI_SHU_HK
+
"/member-web/api/"
;
ROOT_SETTLEMENT_REPORT_SERVER_ADDRESS_FORMAL
=
REPORT_TEST_ADDRESS
;
ROOT_SERVER_ADDRESS_FORMAL
=
ROOT_SERVER_SHI_SHU_HK
;
ROOT_URL
=
ROOT_SZ_URL
;
REPORT_SERVER_ADDRESS
=
REPORT_TEST_ADDRESS
+
REPORT_PATH
;
WECHAR_REPORT_SERVER_ADDRESS
=
WECHAR_REPORT_TEST_ADDRESS
+
WECHAR_REPORT_PATH
;
//正式:WECHAR_REPORT_FORMAL_ADDRESS 測試:WECHAR_REPORT_TEST_ADDRESS
break
;
}
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/ui/view/OrderPayView.java
0 → 100644
View file @
c674b533
package
com
.
gingersoft
.
gsa
.
cloud
.
ui
.
view
;
import
android.content.Context
;
import
android.util.AttributeSet
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
androidx.annotation.Nullable
;
import
com.gingersoft.gsa.cloud.base.R
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaButton
;
public
class
OrderPayView
extends
LinearLayout
{
// public OrderPayView(Context context) {
// this(context, null);
// }
public
OrderPayView
(
Context
context
)
{
this
(
context
,
null
);
}
public
OrderPayView
(
Context
context
,
@Nullable
AttributeSet
attrs
)
{
this
(
context
,
attrs
,
0
);
}
public
OrderPayView
(
Context
context
,
@Nullable
AttributeSet
attrs
,
int
defStyleAttr
)
{
super
(
context
,
attrs
,
defStyleAttr
);
init
(
context
);
}
public
void
init
(
Context
context
)
{
View
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
layout_order_pay
,
null
);
MaxHeightRecyclerView
rv_bill_money
=
view
.
findViewById
(
R
.
id
.
rv_bill_money
);
TextView
tvDifferenceName
=
view
.
findViewById
(
R
.
id
.
tv_difference_name
);
TextView
tvDifferenceMoney
=
view
.
findViewById
(
R
.
id
.
tv_difference_money
);
MaxHeightRecyclerView
rv_bill_method
=
view
.
findViewById
(
R
.
id
.
rv_bill_method
);
QMUIAlphaButton
keypadBtn
=
view
.
findViewById
(
R
.
id
.
btn_keypad
);
QMUIAlphaButton
exactBtn
=
view
.
findViewById
(
R
.
id
.
btn_exact
);
QMUIAlphaButton
sureBtn
=
view
.
findViewById
(
R
.
id
.
btn_sure_pay
);
this
.
addView
(
view
);
}
}
base-module/src/main/res/layout/layout_order_pay.xml
0 → 100644
View file @
c674b533
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
>
<com.gingersoft.gsa.cloud.ui.view.MaxHeightRecyclerView
android:id=
"@+id/rv_bill_money"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:divider=
"@null"
android:fadeScrollbars=
"false"
android:orientation=
"vertical"
android:background=
"@color/theme_background_color"
app:maxHeight=
"@dimen/dp_80"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/yellow"
android:padding=
"@dimen/dp_5"
>
<TextView
android:id=
"@+id/tv_difference_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"尚欠:"
android:textSize=
"@dimen/sp_20"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_difference_money"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/red"
android:textSize=
"@dimen/sp_20"
android:textStyle=
"bold"
/>
</RelativeLayout>
<com.gingersoft.gsa.cloud.ui.view.MaxHeightRecyclerView
android:id=
"@+id/rv_bill_method"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:divider=
"@null"
android:fadeScrollbars=
"false"
android:orientation=
"vertical"
app:maxHeight=
"@dimen/dp_100"
app:layoutManager=
"androidx.recyclerview.widget.GridLayoutManager"
app:spanCount=
"4"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp_1"
android:orientation=
"horizontal"
>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_keypad"
android:layout_width=
"@dimen/dp_100"
android:layout_height=
"match_parent"
android:background=
"#2F6666"
android:text=
"Keypad"
android:textColor=
"@color/theme_white_color"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_exact"
android:layout_width=
"@dimen/dp_100"
android:layout_height=
"match_parent"
android:background=
"#315FC5"
android:layout_marginLeft=
"@dimen/dp_1"
android:text=
"Exact"
android:textColor=
"@color/theme_white_color"
/>
<com.qmuiteam.qmui.alpha.QMUIAlphaButton
android:id=
"@+id/btn_sure_pay"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_marginLeft=
"@dimen/dp_1"
android:layout_height=
"match_parent"
android:background=
"@color/Grass_green"
android:text=
"確認"
android:textColor=
"@color/theme_white_color"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
base-module/src/main/res/values/colors.xml
View file @
c674b533
...
...
@@ -495,4 +495,6 @@
<!-- 取消物流按鈕背景色-->
<color
name=
"other_order_details_cancel_logistics_btn_color"
>
#E74E40
</color>
<!-- 骨架屏加載時的顏色-->
<color
name=
"skeleton_color"
>
@color/color_f4
</color>
</resources>
config.gradle
View file @
c674b533
...
...
@@ -5,8 +5,8 @@ ext {
buildToolsVersion:
'28.0.3'
,
minSdkVersion
:
19
,
//N5收銀機應用安卓開發環境要求Android OS Version: 5.1Android SDK Min Version: 19
targetSdkVersion
:
28
,
versionCode
:
2
,
versionName
:
"1.0.
2
"
versionCode
:
3
,
versionName
:
"1.0.
3
"
]
version
=
[
...
...
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/NewMainPresenter.java
View file @
c674b533
...
...
@@ -5,6 +5,7 @@ import android.content.Intent;
import
android.net.Uri
;
import
android.text.TextUtils
;
import
com.billy.cc.core.component.CC
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.utils.LanguageUtils
;
import
com.gingersoft.gsa.cloud.main.R
;
...
...
@@ -120,8 +121,14 @@ public class NewMainPresenter extends BasePresenter<NewMainContract.Model, NewMa
public
void
loginOut
()
{
RequestBody
requestBody
=
new
FormBody
.
Builder
()
.
add
(
"restaurantId"
,
GsaCloudApplication
.
getRestaurantId
(
mApplication
)
+
""
)
.
add
(
"restaurantId"
,
GsaCloudApplication
.
getRestaurantId
(
mApplication
)
+
""
)
.
build
();
CC
.
obtainBuilder
(
"Component.OtherOrder"
)
.
setActionName
(
"closeHeart"
)
.
build
()
.
call
();
mModel
.
clearHeartbeat
(
requestBody
)
.
subscribeOn
(
Schedulers
.
io
())
.
doOnSubscribe
(
disposable
->
mRootView
.
showLoading
(
null
))
...
...
main-module/src/main/res/layout/activity_new_main.xml
View file @
c674b533
...
...
@@ -237,7 +237,7 @@
android:layout_marginRight=
"@dimen/dp_10"
app:hl_cornerRadius=
"@dimen/dp_4"
app:hl_dy=
"@dimen/main_shadow_dy"
android:visibility=
"
visibl
e"
android:visibility=
"
gon
e"
app:hl_shadowBackColor=
"@color/white"
app:hl_shadowColor=
"@color/shadow_color"
app:hl_shadowLimit=
"@dimen/main_shadow_limit"
>
...
...
other_order_mode/build.gradle
View file @
c674b533
...
...
@@ -75,7 +75,8 @@ dependencies {
testImplementation
'junit:junit:4.12'
androidTestImplementation
'androidx.test:runner:1.2.0'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.2.0'
implementation
'com.ethanhua:skeleton:1.1.2'
implementation
'io.supercharge:shimmerlayout:2.1.0'
if
(
project
.
ext
.
runAsApp
)
{
addComponent
'print-module'
}
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/OtherOrderComponent.java
View file @
c674b533
package
com
.
gingersoft
.
gsa
.
other_order_mode
;
import
android.content.Intent
;
import
android.util.Log
;
import
com.billy.cc.core.component.CC
;
import
com.billy.cc.core.component.CCResult
;
import
com.billy.cc.core.component.CCUtil
;
import
com.billy.cc.core.component.IComponent
;
import
com.gingersoft.gsa.other_order_mode.service.GetInfoUpdateService
;
import
com.gingersoft.gsa.other_order_mode.ui.activity.OtherOrderActivity
;
...
...
@@ -44,6 +48,11 @@ public class OtherOrderComponent implements IComponent {
CCUtil
.
navigateTo
(
cc
,
OtherOrderActivity
.
class
);
CC
.
sendCCResult
(
cc
.
getCallId
(),
CCResult
.
success
());
break
;
case
"closeHeart"
:
Intent
intent
=
new
Intent
(
cc
.
getContext
(),
GetInfoUpdateService
.
class
);
cc
.
getContext
().
stopService
(
intent
);
Log
.
e
(
"eee"
,
"closeHeart"
);
break
;
default
:
// cc.callAsync(new IComponentCallback() {
// @Override
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/service/GetInfoUpdateService.kt
View file @
c674b533
This diff is collapsed.
Click to expand it.
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OrderDetailsActivity.kt
View file @
c674b533
...
...
@@ -2,11 +2,14 @@ package com.gingersoft.gsa.other_order_mode.ui.activity
import
android.app.Dialog
import
android.os.Bundle
import
android.view.View
import
android.widget.TextView
import
androidx.databinding.DataBindingUtil
import
androidx.lifecycle.ViewModelProvider
import
androidx.recyclerview.widget.GridLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.ethanhua.skeleton.Skeleton
import
com.ethanhua.skeleton.ViewSkeletonScreen
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
import
com.gingersoft.gsa.cloud.base.utils.toast.ToastUtils
import
com.gingersoft.gsa.cloud.base.widget.DialogUtils
...
...
@@ -24,7 +27,11 @@ import com.gingersoft.gsa.other_order_mode.ui.adapter.FoodListAdapter
import
com.gingersoft.gsa.other_order_mode.ui.adapter.OrderDetailsAdapter
import
com.gingersoft.gsa.other_order_mode.ui.base.BaseActivity
import
com.gingersoft.gsa.other_order_mode.util.InjectorUtil
import
com.qmuiteam.qmui.widget.QMUITopBar
import
kotlinx.android.synthetic.main.activity_order_details.*
import
kotlinx.android.synthetic.main.activity_order_details.rv_food
import
kotlinx.android.synthetic.main.activity_order_details.tv_order_state
import
kotlinx.android.synthetic.main.activity_order_details_loading.*
class
OrderDetailsActivity
:
BaseActivity
()
{
...
...
@@ -34,10 +41,21 @@ class OrderDetailsActivity : BaseActivity() {
private
lateinit
var
orderId
:
String
private
var
orderType
:
Int
=
0
private
var
orderPayType
:
Int
=
0
lateinit
var
skeletonScreen
:
ViewSkeletonScreen
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
binding
=
DataBindingUtil
.
setContentView
(
this
,
R
.
layout
.
activity_order_details
)
val
rootView
=
findViewById
<
View
>(
R
.
id
.
scroll_order_info
)
skeletonScreen
=
Skeleton
.
bind
(
rootView
)
.
load
(
R
.
layout
.
activity_order_details_loading
)
.
shimmer
(
true
)
.
duration
(
1000
)
.
angle
(
20
)
.
color
(
R
.
color
.
white
)
.
show
()
orderId
=
intent
.
getStringExtra
(
"orderId"
)
//訂單id
orderType
=
intent
.
getIntExtra
(
"orderType"
,
0
)
//訂單類型
orderPayType
=
intent
.
getIntExtra
(
"orderPayType"
,
0
)
//訂單支付方式
...
...
@@ -45,16 +63,18 @@ class OrderDetailsActivity : BaseActivity() {
pageViewModel
=
ViewModelProvider
(
this
,
InjectorUtil
.
getWeatherModelFactory
())[
PageViewModel
::
class
.
java
].
apply
{
getOrderDetails
(
orderId
,
binding
)
}
initTopBar
(
qm_order_details_bar
)
}
qm_order_details_bar
.
setTitle
(
GsaCloudApplication
.
getRestaurantName
(
this
))
qm_order_details_bar
.
addLeftImageButton
(
R
.
drawable
.
icon_return
,
R
.
id
.
iv_left_back
).
setOnClickListener
{
finish
()
}
qm_order_details_bar
.
setBackgroundColor
(
resources
.
getColor
(
R
.
color
.
theme_color
))
private
fun
initTopBar
(
topbar
:
QMUITopBar
)
{
topbar
.
setTitle
(
GsaCloudApplication
.
getRestaurantName
(
this
@OrderDetailsActivity
))
topbar
.
addLeftImageButton
(
R
.
drawable
.
icon_return
,
R
.
id
.
iv_left_back
).
setOnClickListener
{
finish
()
}
topbar
.
setBackgroundColor
(
resources
.
getColor
(
R
.
color
.
theme_color
))
}
private
fun
PageViewModel
.
getOrderDetails
(
orderId
:
String
,
binding
:
ActivityOrderDetailsBinding
)
{
showLoading
()
getShipanyAndOrderInfo
(
GsaCloudApplication
.
getRestaurantId
(
this
@OrderDetailsActivity
).
toString
(),
orderId
)
{
it
->
cancelDialogForLoading
()
skeletonScreen
.
hide
()
if
(
it
?.
data
!=
null
&&
it
.
data
!!
.
isNotEmpty
())
{
val
orderDetails
=
it
.
data
!!
[
0
]
orderDetails
.
order_type
=
orderType
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/ui/activity/OtherOrderActivity.kt
View file @
c674b533
...
...
@@ -260,10 +260,10 @@ class OtherOrderActivity : BaseActivity() {
bindService
(
intent
,
serviceConnection
,
Context
.
BIND_AUTO_CREATE
)
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
unbindService
(
serviceConnection
)
}
//
override fun onDestroy() {
//
super.onDestroy()
//
unbindService(serviceConnection)
//
}
private
var
serviceConnection
=
object
:
ServiceConnection
{
override
fun
onServiceConnected
(
name
:
ComponentName
,
service
:
IBinder
)
{
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/RxTimerUtil.kt
0 → 100644
View file @
c674b533
package
com.gingersoft.gsa.other_order_mode.util
import
io.reactivex.Observable
import
io.reactivex.Observer
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.disposables.Disposable
import
java.util.concurrent.TimeUnit
class
RxTimerUtil
{
companion
object
{
var
mDisposable
:
Disposable
?
=
null
/**
* 执行定时任务
*/
fun
timer
(
block
:
()
->
Unit
,
milliseconds
:
Long
)
{
Observable
.
interval
(
0
,
milliseconds
,
TimeUnit
.
MILLISECONDS
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
object
:
Observer
<
Long
>
{
override
fun
onError
(
e
:
Throwable
)
{}
override
fun
onComplete
()
{}
override
fun
onNext
(
t
:
Long
)
{
block
()
}
override
fun
onSubscribe
(
d
:
Disposable
)
{
mDisposable
=
d
}
})
}
/**
* 取消定时器
*/
fun
cancel
()
{
if
(
mDisposable
!=
null
&&
!
mDisposable
!!
.
isDisposed
)
{
mDisposable
!!
.
dispose
()
}
}
}
}
\ No newline at end of file
other_order_mode/src/main/res/drawable/glide.xml
0 → 100644
View file @
c674b533
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<gradient
android:endColor=
"#99C0A069"
android:startColor=
"#FFC0A069"
/>
</shape>
\ No newline at end of file
other_order_mode/src/main/res/layout/activity_order_details.xml
View file @
c674b533
...
...
@@ -45,6 +45,7 @@
</data>
<RelativeLayout
android:id=
"@+id/rootview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_f0"
>
...
...
@@ -57,7 +58,6 @@
app:qmui_topbar_text_btn_color_state_list=
"@color/theme_white_color"
app:qmui_topbar_title_color=
"@color/theme_white_color"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_order_details_btn"
android:layout_width=
"match_parent"
...
...
@@ -131,6 +131,7 @@
style=
"@style/otherOrder_details_twelve_text_Style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginLeft=
"@dimen/other_order_info_dialog_content_marginLeft"
android:text=
"@{@string/create_order_time + TimeUtils.parseTimeRepeat(data.cREATE_TIME,TimeUtils.DEFAULT_DATE_FORMAT)}"
app:layout_constraintLeft_toLeftOf=
"parent"
...
...
other_order_mode/src/main/res/layout/activity_order_details_loading.xml
0 → 100644
View file @
c674b533
This diff is collapsed.
Click to expand it.
other_order_mode/src/main/res/layout/item_delivery_layout.xml
View file @
c674b533
...
...
@@ -153,7 +153,7 @@
app:layout_constraintRight_toLeftOf=
"@id/iv_edit"
app:layout_constraintTop_toTopOf=
"@id/tv_difference_text"
/>
<
com.qmuiteam.qmui.alpha.QMUIAlphaImageButton
<
ImageView
android:id=
"@+id/iv_edit"
android:layout_width=
"@dimen/dp_30"
android:layout_height=
"0dp"
...
...
other_order_mode/src/main/res/values/values.xml
0 → 100644
View file @
c674b533
<?xml version="1.0" encoding="utf-8"?>
<resources>
</resources>
\ No newline at end of file
print-module/src/main/java/com/joe/print/mvp/print/service/PrjService.java
View file @
c674b533
...
...
@@ -65,7 +65,6 @@ public class PrjService extends Service implements PrintSocketHolder.OnStateChan
@Nullable
@Override
public
IBinder
onBind
(
Intent
intent
)
{
return
null
;
}
...
...
table-module/src/main/AndroidManifest.xml
View file @
c674b533
...
...
@@ -14,7 +14,6 @@
<meta-data
android:name=
"com.gingersoft.gsa.cloud.globalconfig.GlobalConfiguration"
android:value=
"ConfigModule"
/>
<meta-data
android:name=
"design_width_in_dp"
android:value=
"360"
/>
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderPayActivity.java
View file @
c674b533
...
...
@@ -475,7 +475,6 @@ public class OrderPayActivity extends BaseActivity<OrderPayPresenter> implements
PayMethod
billMoneyBean
=
mPresenter
.
getSelectBillMoney
();
billMoneyBean
.
setPayMoney
(
Double
.
parseDouble
(
money
));
mPresenter
.
getBillMoneyAdapter
().
notifyDataSetChanged
();
setDifferenceText
();
}
})
...
...
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