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
2d91ffa0
authored
Dec 16, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开始服务添加容错距离
parent
f9ec9f0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 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 @
2d91ffa0
...
...
@@ -5,6 +5,7 @@ import android.graphics.Color;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.view.View
;
import
com.alibaba.android.arouter.launcher.ARouter
;
...
...
@@ -428,8 +429,12 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
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
)
{
ToastUtils
.
showShortToast
(
"未到达目的地,无法开始服务"
);
// Log.e("startService: ",latitude+" "+longitude+" "+mItem.getLatitude()
// +" "+mItem.getLongitude()+" "+distance);
// if (distance > 1000) {
//添加容错距离,因为创建工单时的经纬度可能不太准确
if
(
distance
>
3000
)
{
ToastUtils
.
showShortToast
(
"未到达目的地,无法开始服务 "
);
ProgressUtil
.
stopLoad
();
return
;
}
...
...
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