Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lify
RvApp
Commits
ef58b614
Commit
ef58b614
authored
Oct 25, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
租车和钱包修改
parent
b1b1879e
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
142 additions
and
73 deletions
+142
-73
ConfirmOrderActivity.java
.../rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
+44
-27
OrderCalendarPriceBean.java
...e/rv/module/ui/main/home/bean/OrderCalendarPriceBean.java
+3
-7
CashWithdrawalDetailsActivity.java
...m/xxrv/wallet/activity/CashWithdrawalDetailsActivity.java
+8
-0
WalletActivity.java
...rc/main/java/com/xxrv/wallet/activity/WalletActivity.java
+37
-23
WithdrawActivity.java
.../main/java/com/xxrv/wallet/activity/WithdrawActivity.java
+15
-10
activity_cash_withdrawal_details.xml
.../src/main/res/layout/activity_cash_withdrawal_details.xml
+17
-2
activity_withdraw.xml
plugin_wallet/src/main/res/layout/activity_withdraw.xml
+2
-1
rv_dialog_third_party_binding.xml
...let/src/main/res/layout/rv_dialog_third_party_binding.xml
+16
-3
No files found.
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
View file @
ef58b614
...
...
@@ -716,7 +716,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
if
(
memberData
!=
null
)
{
if
(
memberData
.
getRentFreeDays
()
==
0
)
{
swbtnMember
.
setChecked
(
false
);
showToast
(
"免费用车天数0"
);
showToast
(
"免费用车天数
为
0"
);
return
true
;
}
}
...
...
@@ -751,9 +751,11 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
ArrayList
<
OrderPriceDetailBean
.
ChildrenBean
>
childrenBeanList
=
new
ArrayList
<>();
//费用明细
double
payMoney
=
0.00
;
// double dayPrice = mCarBean.getVehicleModel().getSum();
double
totalPrice
=
0.00
;
//租车总价
double
totalCarPrice
=
0.00
;
//租车总价
double
totalMemberDays
=
0
;
//会员天数
for
(
int
i
=
0
;
i
<
calendarPriceBean
.
getData
().
size
();
i
++)
{
totalPrice
=
totalPrice
+
calendarPriceBean
.
getData
().
get
(
i
).
getPrice
();
totalCarPrice
=
totalCarPrice
+
calendarPriceBean
.
getData
().
get
(
i
).
getPrice
();
totalMemberDays
=
totalMemberDays
+
calendarPriceBean
.
getData
().
get
(
i
).
getFreeDays
();
}
int
dayNum
=
dataBean
.
getDayNum
();
...
...
@@ -761,35 +763,50 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
OrderPriceDetailBean
.
ChildrenBean
childrenBean2
=
new
OrderPriceDetailBean
.
ChildrenBean
();
childrenBean2
.
setKey
(
"车辆租赁费"
);
childrenBean2
.
setDetail
(
dayNum
+
"天"
);
childrenBean2
.
setVal
(
"¥"
+
new
BigDecimal
(
totalPrice
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBean2
.
setVal
(
"¥"
+
new
BigDecimal
(
total
Car
Price
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBeanList
.
add
(
childrenBean2
);
if
(
isMemberType
==
0
)
{
//是否使用会员 0 不使用
payMoney
=
totalPrice
+
priceBean
.
getData
().
getDeposit
();
//租车和押金价格
carAmount
=
totalPrice
;
payMoney
=
total
Car
Price
+
priceBean
.
getData
().
getDeposit
();
//租车和押金价格
carAmount
=
total
Car
Price
;
}
else
{
// if (memberData != null) {
// if (dayNum > memberData.getRentFreeDays()) {
if
(
memberData
!=
null
)
{
if
(
totalMemberDays
>
memberData
.
getRentFreeDays
())
{
//个人会员天数小于租车使用会员天数
double
useTotalMemberPrice
=
0.00
;
double
useTotalMemberDays
=
0
;
for
(
int
j
=
0
;
j
<
calendarPriceBean
.
getData
().
size
();
j
++)
{
if
(
useTotalMemberDays
<
memberData
.
getRentFreeDays
())
{
useTotalMemberDays
=
useTotalMemberDays
+
calendarPriceBean
.
getData
().
get
(
j
).
getFreeDays
();
useTotalMemberPrice
=
useTotalMemberPrice
+
calendarPriceBean
.
getData
().
get
(
j
).
getPrice
();
}
else
{
double
memberPrice
=
calendarPriceBean
.
getData
().
get
(
j
-
1
).
getPrice
()
/
calendarPriceBean
.
getData
().
get
(
j
-
1
).
getFreeDays
();
//计算最后使用会员单价
useTotalMemberPrice
=
useTotalMemberPrice
-
(
useTotalMemberDays
-
memberData
.
getRentFreeDays
())
*
memberPrice
;
break
;
}
}
payMoney
=
totalCarPrice
-
useTotalMemberPrice
+
priceBean
.
getData
().
getDeposit
();
carAmount
=
totalCarPrice
-
useTotalMemberPrice
;
// payMoney = dayPrice * (dayNum - memberData.getRentFreeDays()) + priceBean.getData().getDeposit();
//
// carAmount = dayPrice * (dayNum - memberData.getRentFreeDays());
// OrderPriceDetailBean.ChildrenBean childrenBean1 = new OrderPriceDetailBean.ChildrenBean();
// childrenBean1.setKey("免费天数");
// childrenBean1.setDetail("会员天数" + (dayNum - memberData.getRentFreeDays()) + "天");
// childrenBean1.setVal("-¥" + new BigDecimal(dayPrice * memberData.getRentFreeDays()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
// childrenBeanList.add(childrenBean1);
// } else if (dayNum <= memberData.getRentFreeDays()) {
// payMoney = priceBean.getData().getDeposit();
// carAmount = 0;
//
// OrderPriceDetailBean.ChildrenBean childrenBean1 = new OrderPriceDetailBean.ChildrenBean();
// childrenBean1.setKey("免费天数");
// childrenBean1.setDetail("会员天数" + dayNum + "天");
// childrenBean1.setVal("-¥" + new BigDecimal(dayPrice * dayNum).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
// childrenBeanList.add(childrenBean1);
// }
// }
OrderPriceDetailBean
.
ChildrenBean
childrenBean1
=
new
OrderPriceDetailBean
.
ChildrenBean
();
childrenBean1
.
setKey
(
"免费天数"
);
childrenBean1
.
setDetail
(
"会员天数"
+
(
memberData
.
getRentFreeDays
())
+
"天"
);
childrenBean1
.
setVal
(
"-¥"
+
new
BigDecimal
(
useTotalMemberPrice
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBeanList
.
add
(
childrenBean1
);
}
else
if
(
totalMemberDays
<=
memberData
.
getRentFreeDays
())
{
payMoney
=
priceBean
.
getData
().
getDeposit
();
carAmount
=
0
;
OrderPriceDetailBean
.
ChildrenBean
childrenBean1
=
new
OrderPriceDetailBean
.
ChildrenBean
();
childrenBean1
.
setKey
(
"免费天数"
);
childrenBean1
.
setDetail
(
"会员天数"
+
totalMemberDays
+
"天"
);
childrenBean1
.
setVal
(
"-¥"
+
new
BigDecimal
(
totalCarPrice
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBeanList
.
add
(
childrenBean1
);
}
}
}
if
(
drivingType
==
1
)
{
payMoney
=
payMoney
+
priceBean
.
getData
().
getDriverAmount
();
// + 专职司机
...
...
@@ -823,7 +840,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
OrderPriceDetailBean
.
ChildrenBean
childrenBean
=
new
OrderPriceDetailBean
.
ChildrenBean
();
childrenBean
.
setKey
(
"租房车押金"
);
childrenBean
.
setVal
(
"¥"
+
priceBean
.
getData
().
getDeposit
());
childrenBean
.
setVal
(
"¥"
+
new
BigDecimal
(
priceBean
.
getData
().
getDeposit
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBeanList
.
add
(
childrenBean
);
if
(
couponAmount
>
0
)
{
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/bean/OrderCalendarPriceBean.java
View file @
ef58b614
...
...
@@ -32,21 +32,17 @@ public class OrderCalendarPriceBean extends BaseBean implements Serializable {
}
public
static
class
DataBean
implements
Serializable
{
// "date": "2019-10-26 00:00:00",
// "price": 0.180,
// "no_discount_price": 0.30,
// "freeDays": 1
private
lo
ng
date
;
private
Stri
ng
date
;
private
double
price
;
private
double
no_discount_price
;
private
double
freeDays
;
public
lo
ng
getDate
()
{
public
Stri
ng
getDate
()
{
return
date
;
}
public
void
setDate
(
lo
ng
date
)
{
public
void
setDate
(
Stri
ng
date
)
{
this
.
date
=
date
;
}
...
...
plugin_wallet/src/main/java/com/xxrv/wallet/activity/CashWithdrawalDetailsActivity.java
View file @
ef58b614
...
...
@@ -25,6 +25,8 @@ import com.xxrv.wallet.presenter.WalletPresenter;
import
com.yuyife.okgo.OkGoUtil
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
static
com
.
ruiwenliu
.
wrapper
.
weight
.
webview
.
SafeWebView
.
hasKitkat
;
...
...
@@ -125,6 +127,12 @@ public class CashWithdrawalDetailsActivity extends BaseStatusActivity<WalletPres
});
}
@OnClick
(
R2
.
id
.
tv_ok
)
public
void
onViewClicked
()
{
finish
();
}
public
class
AndroidJs
{
@JavascriptInterface
public
String
getToken
()
{
...
...
plugin_wallet/src/main/java/com/xxrv/wallet/activity/WalletActivity.java
View file @
ef58b614
...
...
@@ -135,9 +135,25 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
}
private
void
isAccountNumber
(
AccountNumberListBean
result
)
{
if
(
result
!=
null
&&
result
.
getData
()
!=
null
&&
result
.
getData
().
size
()
>
0
)
{
if
(
result
!=
null
&&
result
.
getData
()
!=
null
&&
result
.
getData
().
size
()
>
0
)
{
////1支付宝 2微信
int
num
=
0
;
for
(
int
i
=
0
;
i
<
result
.
getData
().
size
();
i
++)
{
if
(
1
==
result
.
getData
().
get
(
i
).
getType
())
{
num
++;
}
}
if
(
num
>
0
){
startActivity
(
WithdrawActivity
.
getIntent
(
mActivity
,
balance
));
}
else
{
showBindingDialog
();
}
}
else
{
showBindingDialog
();
}
}
private
void
showBindingDialog
()
{
new
ThirdPartyBindingDialog
(
mActivity
)
{
@Override
public
void
helper
(
ViewHolder
helper
)
{
...
...
@@ -152,7 +168,6 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
dismiss
();
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
//微信绑定
dismiss
();
}
}
...
...
@@ -160,7 +175,6 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
}
}.
show
();
}
}
private
void
setWalletData
(
WalletBean
bean
)
{
...
...
plugin_wallet/src/main/java/com/xxrv/wallet/activity/WithdrawActivity.java
View file @
ef58b614
...
...
@@ -212,6 +212,8 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> implem
*/
private
void
setAccountNumber
(
AccountNumberListBean
result
)
{
if
(
result
!=
null
&&
result
.
getData
()
!=
null
&&
result
.
getData
().
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
result
.
getData
().
size
();
i
++)
{
if
(
1
==
result
.
getData
().
get
(
i
).
getType
())
{
AccountNumberListBean
.
DataBean
dataBean
=
result
.
getData
().
get
(
0
);
selectAccountNumber
=
dataBean
;
dataBean
.
setCheck
(
true
);
...
...
@@ -222,6 +224,9 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> implem
ivAccountNumberIcon
.
setImageResource
(
R
.
drawable
.
common_icon_wallet_weiwx_small
);
tvAccountNumber
.
setText
(
"微信零钱("
+
dataBean
.
getNickname
()
+
")"
);
}
break
;
}
}
}
}
...
...
@@ -283,7 +288,7 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> implem
.
withInt
(
"type"
,
20
)
.
navigation
();
}
else
if
(
id
==
R
.
id
.
ll_item_select_account_number
)
{
selectShow
();
//
selectShow();
}
}
...
...
plugin_wallet/src/main/res/layout/activity_cash_withdrawal_details.xml
View file @
ef58b614
...
...
@@ -15,8 +15,7 @@
android:indeterminateOnly=
"false"
android:max=
"100"
android:progressDrawable=
"@drawable/shape_rv_bg_yellow_progress"
android:visibility=
"gone"
>
</ProgressBar>
android:visibility=
"gone"
></ProgressBar>
<WebView
android:id=
"@+id/webView"
...
...
@@ -24,4 +23,20 @@
android:layout_height=
"match_parent"
android:layout_weight=
"1"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_60"
>
<Button
android:id=
"@+id/tv_ok"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginTop=
"@dimen/size_5"
android:layout_marginRight=
"@dimen/size_15"
android:background=
"@drawable/shape_rv_bg_dark_yellow"
android:text=
"确定"
android:textSize=
"@dimen/text_16"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
plugin_wallet/src/main/res/layout/activity_withdraw.xml
View file @
ef58b614
...
...
@@ -54,7 +54,8 @@
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/common_icon_rig_gray"
/>
android:src=
"@drawable/common_icon_rig_gray"
android:visibility=
"invisible"
/>
</LinearLayout>
...
...
plugin_wallet/src/main/res/layout/rv_dialog_third_party_binding.xml
View file @
ef58b614
...
...
@@ -35,10 +35,21 @@
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginRight=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_26"
android:text=
"
提现有2种方式,提现到微信零钱或支付宝余额。需至少绑定一种方式:
"
android:text=
"
支持提现到支付余额,请绑定支付宝。
"
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/size_16"
/>
<!--<TextView-->
<!--android:id="@+id/tv_content"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginLeft="@dimen/size_15"-->
<!--android:layout_marginRight="@dimen/size_15"-->
<!--android:layout_marginBottom="@dimen/size_26"-->
<!--android:text="提现有2种方式,提现到微信零钱或支付宝余额。需至少绑定一种方式:"-->
<!--android:textColor="@color/textGray"-->
<!--android:textSize="@dimen/size_16" />-->
<LinearLayout
android:layout_width=
"match_parent"
...
...
@@ -75,7 +86,8 @@
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:background=
"@color/colorLine"
/>
android:background=
"@color/colorLine"
android:visibility=
"gone"
/>
<LinearLayout
android:id=
"@+id/ll_item_wechat"
...
...
@@ -83,7 +95,8 @@
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:visibility=
"gone"
>
<TextView
android:layout_width=
"wrap_content"
...
...
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