Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a3b12e00
authored
Nov 11, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小绿人工单添加一公里内才能开始服务的限制
parent
1daa5481
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderAdapter.java
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderAdapter.java
View file @
a3b12e00
...
...
@@ -385,13 +385,13 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
return
;
}
//小绿人工单师傅开始服务前必须开启定位开关
if
(
mItem
.
getCreateProviderId
()
==
Constants
.
XLR_PID
&&
!
GpsUtil
.
isOPen
(
mContext
)
&&
mItem
.
getLatitude
()
!=
0
&&
mItem
.
getLongitude
()
!=
0
)
{
ToastUtils
.
showShortToast
(
"请打开GPS定位开关"
);
return
;
}
if
(
mItem
.
getStatus
()
==
3
)
{
//小绿人工单师傅开始服务前必须开启定位开关
if
(
mItem
.
getCreateProviderId
()
==
Constants
.
XLR_PID
&&
!
GpsUtil
.
isOPen
(
mContext
)
&&
mItem
.
getLatitude
()
!=
0
&&
mItem
.
getLongitude
()
!=
0
)
{
ToastUtils
.
showShortToast
(
"请打开GPS定位开关"
);
return
;
}
ProgressUtil
.
setCanDismiss
(
false
);
ProgressUtil
.
startLoad
(
mContext
);
LocationUtils
.
getCurrentLocation
(
new
LocationUtils
.
MyLocationListener
()
{
...
...
@@ -404,7 +404,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
longitude
=
location
.
getLongitude
();
}
//小绿人工单师傅在目的地一公里内才能开始服务
if
(
mItem
.
getCreateProviderId
()
==
Constants
.
XLR_PID
&&
latitude
!=
0
&&
if
(
mItem
.
getCreateProviderId
()
==
Constants
.
XLR_PID
&&
latitude
!=
0
&&
longitude
!=
0
&&
mItem
.
getLatitude
()
!=
0
&&
mItem
.
getLongitude
()
!=
0
)
{
double
distance
=
LocationUtils
.
getDistance
(
latitude
,
longitude
,
mItem
.
getLatitude
(),
mItem
.
getLongitude
());
if
(
distance
>
1000
)
{
...
...
@@ -413,7 +413,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
return
;
}
startFirstServe
(
latitude
,
longitude
);
}
else
{
}
else
{
startFirstServe
(
latitude
,
longitude
);
}
...
...
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