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
398a05f3
authored
Nov 12, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Plain Diff
工单收发货显示具体时间
parents
a3b12e00
784415bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
29 deletions
.idea/modules.xml
orderCenter/src/main/java/com/dayu/order/api/protocol/Order.java
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderAdapter.java
.idea/modules.xml
View file @
398a05f3
...
...
@@ -7,7 +7,7 @@
<module
fileurl=
"file://$PROJECT_DIR$/baseSDK/baseSDK.iml"
filepath=
"$PROJECT_DIR$/baseSDK/baseSDK.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/beauty/beauty.iml"
filepath=
"$PROJECT_DIR$/beauty/beauty.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/camera/camera.iml"
filepath=
"$PROJECT_DIR$/camera/camera.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/dayu-saas-android
.iml"
filepath=
"$PROJECT_DIR$/dayu-saas-android
.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/dayu-saas-android
00.iml"
filepath=
"$PROJECT_DIR$/dayu-saas-android00
.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/learnCenter/learnCenter.iml"
filepath=
"$PROJECT_DIR$/learnCenter/learnCenter.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/liveModule/liveModule.iml"
filepath=
"$PROJECT_DIR$/liveModule/liveModule.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/locationComponent/locationComponent.iml"
filepath=
"$PROJECT_DIR$/locationComponent/locationComponent.iml"
/>
...
...
orderCenter/src/main/java/com/dayu/order/api/protocol/Order.java
View file @
398a05f3
...
...
@@ -63,23 +63,14 @@ public class Order implements Serializable{
private
int
version
;
private
String
greenManStatus
;
private
int
createProviderId
;
private
double
latitude
;
private
double
longitude
;
private
int
alerted
;
//2开启预警 1或者空为未开启预警
public
double
getLatitude
()
{
return
latitude
;
public
int
getAlerted
()
{
return
alerted
;
}
public
void
setLatitude
(
double
latitude
)
{
this
.
latitude
=
latitude
;
}
public
double
getLongitude
()
{
return
longitude
;
}
public
void
setLongitude
(
double
longitude
)
{
this
.
longitude
=
longitude
;
public
void
setAlerted
(
int
alerted
)
{
this
.
alerted
=
alerted
;
}
public
int
getCreateProviderId
()
{
...
...
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderAdapter.java
View file @
398a05f3
...
...
@@ -149,7 +149,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
tvOrderTime
.
setText
(
mContext
.
getString
(
R
.
string
.
have_appointment
));
time
=
item
.
getAppointmentTime
();
setTimeStatus
(
holder
,
time
);
setTimeStatus
(
holder
,
item
,
time
);
break
;
case
3
:
//待服务
holder
.
tvItemProcess
.
setVisibility
(
View
.
GONE
);
...
...
@@ -171,7 +171,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
tvItemProcess
.
setText
(
mContext
.
getString
(
R
.
string
.
begain_server
));
}
time
=
item
.
getConfirmDoorTime
();
setTimeStatus
(
holder
,
time
);
setTimeStatus
(
holder
,
item
,
time
);
break
;
case
4
:
//待处理
holder
.
tvItemProcess
.
setVisibility
(
View
.
GONE
);
...
...
@@ -207,7 +207,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
orderLineTwo
.
setVisibility
(
View
.
VISIBLE
);
}
time
=
item
.
getConfirmDoorTime
();
setTimeStatus
(
holder
,
time
);
setTimeStatus
(
holder
,
item
,
time
);
break
;
case
5
:
//已完成
// holder.tvErrorState.setText(mContext.getString(R.string.order_finish));
...
...
@@ -341,20 +341,25 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
}
//根据时间状态设置不同颜色
private
void
setTimeStatus
(
FragmentOrderdoingItemBinding
holder
,
String
time
)
{
long
timeDiff
=
CommonUtils
.
caluteTimeDiff
(
time
);
double
timeMin
=
timeDiff
/
60000.0
;
//相差分钟数
if
(
timeMin
<
0
)
{
private
void
setTimeStatus
(
FragmentOrderdoingItemBinding
holder
,
Order
item
,
String
time
)
{
if
(
item
.
getAlerted
()
==
2
){
holder
.
itemTody
.
setTextColor
(
Color
.
parseColor
(
"#FF5A4B"
));
holder
.
itemTime
.
setTextColor
(
Color
.
parseColor
(
"#FF5A4B"
));
}
else
if
(
timeMin
<
120
)
{
holder
.
itemTody
.
setTextColor
(
Color
.
parseColor
(
"#ffbe2d"
));
holder
.
itemTime
.
setTextColor
(
Color
.
parseColor
(
"#ffbe2d"
));
}
else
{
holder
.
itemTody
.
setTextColor
(
Color
.
parseColor
(
"#FF3FAAFC"
));
holder
.
itemTime
.
setTextColor
(
Color
.
parseColor
(
"#FF3FAAFC"
));
}
else
{
long
timeDiff
=
CommonUtils
.
caluteTimeDiff
(
time
);
double
timeMin
=
timeDiff
/
60000.0
;
//相差分钟数
if
(
timeMin
<
0
)
{
holder
.
itemTody
.
setTextColor
(
Color
.
parseColor
(
"#FF5A4B"
));
holder
.
itemTime
.
setTextColor
(
Color
.
parseColor
(
"#FF5A4B"
));
}
else
if
(
timeMin
<
120
)
{
holder
.
itemTody
.
setTextColor
(
Color
.
parseColor
(
"#ffbe2d"
));
holder
.
itemTime
.
setTextColor
(
Color
.
parseColor
(
"#ffbe2d"
));
}
else
{
holder
.
itemTody
.
setTextColor
(
Color
.
parseColor
(
"#FF3FAAFC"
));
holder
.
itemTime
.
setTextColor
(
Color
.
parseColor
(
"#FF3FAAFC"
));
}
}
}
...
...
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