Commit db26bdf1 by mReturn

服务工单添加紧急状态标识

parent 995ec248
...@@ -82,6 +82,15 @@ public class OrderDetail implements Serializable { ...@@ -82,6 +82,15 @@ public class OrderDetail implements Serializable {
private double subsidyPrice; private double subsidyPrice;
private int createProviderId; private int createProviderId;
private int version; private int version;
private int alerted;
public int getAlerted() {
return alerted;
}
public void setAlerted(int alerted) {
this.alerted = alerted;
}
public int getVersion() { public int getVersion() {
return version; return version;
......
...@@ -345,7 +345,9 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi ...@@ -345,7 +345,9 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
if (item.getAlerted() == 2){ if (item.getAlerted() == 2){
holder.itemTody.setTextColor(Color.parseColor("#FF5A4B")); holder.itemTody.setTextColor(Color.parseColor("#FF5A4B"));
holder.itemTime.setTextColor(Color.parseColor("#FF5A4B")); holder.itemTime.setTextColor(Color.parseColor("#FF5A4B"));
holder.tvAlert.setVisibility(View.VISIBLE);
}else{ }else{
holder.tvAlert.setVisibility(View.GONE);
long timeDiff = CommonUtils.caluteTimeDiff(time); long timeDiff = CommonUtils.caluteTimeDiff(time);
double timeMin = timeDiff / 60000.0; //相差分钟数 double timeMin = timeDiff / 60000.0; //相差分钟数
if (timeMin < 0) { if (timeMin < 0) {
......
...@@ -92,6 +92,7 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag ...@@ -92,6 +92,7 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag
initInfoView(detail); initInfoView(detail);
getShowPriceData(); getShowPriceData();
} }
mBind.tvAlert.setText(detail.getAlerted() == 2 ? "紧急" : "正常");
mServerAdapter = new CoreAdapter<>(false); mServerAdapter = new CoreAdapter<>(false);
mBind.rlServerContent.setLayoutManager(new LinearLayoutManager(mActivity)); mBind.rlServerContent.setLayoutManager(new LinearLayoutManager(mActivity));
mServerAdapter.setViewType(R.layout.item_detail_server_info); mServerAdapter.setViewType(R.layout.item_detail_server_info);
......
...@@ -86,10 +86,32 @@ ...@@ -86,10 +86,32 @@
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/tv_content" android:id="@+id/tv_alert0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_state"
android:layout_marginTop="15dp"
android:text="优 先 级"
android:textColor="@color/tv_cl"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_alert"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_state" android:layout_below="@+id/tv_state"
android:layout_marginLeft="19dp"
android:textColor="@color/common_text_color"
android:layout_marginTop="@dimen/dp_15"
android:layout_toRightOf="@+id/tv_alert0"
android:text="正常"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_alert0"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:text="@string/server_content" android:text="@string/server_content"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
...@@ -99,7 +121,7 @@ ...@@ -99,7 +121,7 @@
android:id="@+id/ll_server_content" android:id="@+id/ll_server_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/tv_state" android:layout_below="@id/tv_alert0"
android:layout_marginLeft="19dp" android:layout_marginLeft="19dp"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:layout_toRightOf="@+id/tv_content"> android:layout_toRightOf="@+id/tv_content">
......
...@@ -69,6 +69,17 @@ ...@@ -69,6 +69,17 @@
android:textColor="@color/cl_tab_read" android:textColor="@color/cl_tab_read"
android:textSize="14sp" android:textSize="14sp"
android:visibility="gone" /> android:visibility="gone" />
<TextView
android:id="@+id/tv_alert"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="3dp"
android:textColor="@color/cl_tab_read"
android:text="紧急"
android:textSize="14sp"
android:visibility="gone"
/>
</LinearLayout> </LinearLayout>
<ImageView <ImageView
......
...@@ -37,7 +37,15 @@ public class EngineerInfo extends BaseObservable implements Serializable { ...@@ -37,7 +37,15 @@ public class EngineerInfo extends BaseObservable implements Serializable {
private int liveStatus; private int liveStatus;
private int lianmaiStatus; private int lianmaiStatus;
private String nickName; private String nickName;
private int detectStatus;
public int getDetectStatus() {
return detectStatus;
}
public void setDetectStatus(int detectStatus) {
this.detectStatus = detectStatus;
}
public String getNickName() { public String getNickName() {
return nickName; return nickName;
......
...@@ -218,6 +218,7 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo ...@@ -218,6 +218,7 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo
private void saveUserInfo(EngineerInfo info) { private void saveUserInfo(EngineerInfo info) {
UserInfo userInfo = UserManager.getInstance().getUser(); UserInfo userInfo = UserManager.getInstance().getUser();
if (userInfo != null) { if (userInfo != null) {
userInfo.setDetectStatus(info.getDetectStatus());
userInfo.setAccountName(info.getRealName()); userInfo.setAccountName(info.getRealName());
userInfo.setHeaderImg(info.getAccountUrl()); userInfo.setHeaderImg(info.getAccountUrl());
userInfo.setNickName(info.getNickName()); userInfo.setNickName(info.getNickName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment