执行中运单完成状态优化,运单详情偶发不刷新,登录数据类型控制
This commit is contained in:
parent
a2be579ae9
commit
db9990eec0
@ -79,6 +79,13 @@ public class HuoYuanRequset{
|
|||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetStartOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetStartOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||||
RequestUtil.start(1, HuoYuanFragmengt.START_ORDER,re,con,hd);
|
RequestUtil.start(1, HuoYuanFragmengt.START_ORDER,re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void startOrder2(int id){
|
||||||
|
Map<String,Object> map=new HashMap<>();
|
||||||
|
map.put("waybillId",id);
|
||||||
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetStartOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||||
|
RequestUtil.start(1, "refreshorderDetail",re,con,hd);
|
||||||
|
}
|
||||||
//装货
|
//装货
|
||||||
public void loading(LUInputBean lub){
|
public void loading(LUInputBean lub){
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getLOADING(), gson.toJson(lub)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getLOADING(), gson.toJson(lub)),getToken(con),con);
|
||||||
|
@ -23,6 +23,7 @@ import android.widget.Toast;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.cardview.widget.CardView;
|
import androidx.cardview.widget.CardView;
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
import com.alct.mdp.MDPLocationCollectionManager;
|
import com.alct.mdp.MDPLocationCollectionManager;
|
||||||
import com.alct.mdp.callback.OnDownloadResultListener;
|
import com.alct.mdp.callback.OnDownloadResultListener;
|
||||||
@ -198,8 +199,20 @@ public class HomeFragment extends BaseFragment {
|
|||||||
initStart();
|
initStart();
|
||||||
StartOrderParts.setStartOrder(con, sob);
|
StartOrderParts.setStartOrder(con, sob);
|
||||||
if (sob.getData() != null && !sob.getData().getWaybillStatus().equals("已取消")) {
|
if (sob.getData() != null && !sob.getData().getWaybillStatus().equals("已取消")) {
|
||||||
|
StartOrderBean.DataDTO.WayChildrenDTO xData = null;
|
||||||
|
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
||||||
|
if (2 == sob.getData().getWayChildren().get(i).getType()) {
|
||||||
|
xData = sob.getData().getWayChildren().get(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (xData != null && xData.getStatus() == 3) {
|
||||||
|
SPUtils.remove(con, "curWaybillId");
|
||||||
|
llCurWay.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
dealCurWay(sob.getData());
|
dealCurWay(sob.getData());
|
||||||
ur.getJtts(sob.getData().getShippingNoteNumber());
|
ur.getJtts(sob.getData().getShippingNoteNumber());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
SPUtils.remove(con, "curWaybillId");
|
SPUtils.remove(con, "curWaybillId");
|
||||||
llCurWay.setVisibility(View.GONE);
|
llCurWay.setVisibility(View.GONE);
|
||||||
@ -776,8 +789,13 @@ public class HomeFragment extends BaseFragment {
|
|||||||
Log.e("开始轨迹上传服务", "-----");
|
Log.e("开始轨迹上传服务", "-----");
|
||||||
orderNum.setText("运单号:" + sob.getData().getShippingNoteNumber());
|
orderNum.setText("运单号:" + sob.getData().getShippingNoteNumber());
|
||||||
order_state.setText("" + sob.getData().getWaybillStatus());
|
order_state.setText("" + sob.getData().getWaybillStatus());
|
||||||
|
try {
|
||||||
Intent serviceIn = new Intent(con, TrackService.class);
|
Intent serviceIn = new Intent(con, TrackService.class);
|
||||||
getActivity().startService(serviceIn);
|
getActivity().startActivity(serviceIn);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
SPUtil.insSP(con, "order", "ShippingNoteNumber", "");
|
SPUtil.insSP(con, "order", "ShippingNoteNumber", "");
|
||||||
order_start.setVisibility(View.GONE);
|
order_start.setVisibility(View.GONE);
|
||||||
|
@ -107,10 +107,10 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
switch (m.what) {
|
switch (m.what) {
|
||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
//获取页面数据
|
//获取页面数据
|
||||||
if (CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER) != null && CacheGroup.cacheList.get(GET_EVALUTE) != null) {
|
if (CacheGroup.cacheList.get("refreshorderDetail") != null && CacheGroup.cacheList.get(GET_EVALUTE) != null) {
|
||||||
Log.e("-评论-", CacheGroup.cacheList.get(GET_EVALUTE));
|
Log.e("-评论-", CacheGroup.cacheList.get(GET_EVALUTE));
|
||||||
Log.e("-运单-", CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER));
|
Log.e("-运单-", CacheGroup.cacheList.get("refreshorderDetail"));
|
||||||
sob = gson.fromJson(CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER), StartOrderBean.class);
|
sob = gson.fromJson(CacheGroup.cacheList.get("refreshorderDetail"), StartOrderBean.class);
|
||||||
wnb = gson.fromJson(CacheGroup.cacheList.get(GET_EVALUTE), WNewsBean.class);
|
wnb = gson.fromJson(CacheGroup.cacheList.get(GET_EVALUTE), WNewsBean.class);
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
@ -126,7 +126,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, sob.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, sob.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove(HuoYuanFragmengt.START_ORDER);
|
CacheGroup.cacheList.remove("refreshorderDetail");
|
||||||
CacheGroup.cacheList.remove(GET_EVALUTE);
|
CacheGroup.cacheList.remove(GET_EVALUTE);
|
||||||
}
|
}
|
||||||
//保存评价
|
//保存评价
|
||||||
@ -484,9 +484,15 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
if (map != null) {
|
if (map != null) {
|
||||||
map.onResume();
|
map.onResume();
|
||||||
}
|
}
|
||||||
|
if (customDialog==null){
|
||||||
customDialog = new CustomDialog(con, "网络请求中...");
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
customDialog.show();
|
customDialog.show();
|
||||||
hyr.startOrder(id);
|
}else{
|
||||||
|
if (!customDialog.isShowing()){
|
||||||
|
customDialog.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hyr.startOrder2(id);
|
||||||
hyr.getEvaluate(id);
|
hyr.getEvaluate(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="请输入手机号码"
|
android:hint="请输入手机号码"
|
||||||
|
android:inputType="phone"
|
||||||
android:textColor="#ff000000"
|
android:textColor="#ff000000"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14"
|
||||||
android:maxLength="11"
|
android:maxLength="11"
|
||||||
@ -65,6 +66,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<EditText
|
<EditText
|
||||||
|
android:inputType="number"
|
||||||
android:id="@+id/input_code"
|
android:id="@+id/input_code"
|
||||||
android:paddingTop="@dimen/dp_12"
|
android:paddingTop="@dimen/dp_12"
|
||||||
android:paddingBottom="@dimen/dp_12"
|
android:paddingBottom="@dimen/dp_12"
|
||||||
|
Loading…
Reference in New Issue
Block a user