运营端初始化
This commit is contained in:
parent
8b2007a11d
commit
bad0a7fdef
@ -100,7 +100,7 @@
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.VehicleAuthActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivity"
|
||||
android:name=".ui.home.shangchuan.ShangChuangImgActivity"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
<intent-filter>
|
||||
@ -114,7 +114,7 @@
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivityBC"
|
||||
android:name=".ui.home.shangchuan.ShangChuangImgActivityBC"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
<intent-filter>
|
||||
@ -129,7 +129,7 @@
|
||||
|
||||
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivity2"
|
||||
android:name=".ui.home.shangchuan.ShangChuangImgActivity2"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
<intent-filter>
|
||||
@ -142,7 +142,7 @@
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.GetShangChuanActivity"
|
||||
android:name=".ui.home.shangchuan.GetShangChuanActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.AuthQualificationActivity"
|
||||
|
@ -97,18 +97,18 @@ public class TrackService extends Service {
|
||||
}
|
||||
|
||||
public void genzong() {
|
||||
if (l == null || l.getLatitude() == 0d) {
|
||||
return;
|
||||
}
|
||||
//经度
|
||||
tib.setLatitude(l.getLatitude() + "");
|
||||
//纬度
|
||||
tib.setLongitude(l.getLongitude() + "");
|
||||
Log.e("经度", l.getLatitude() + "");
|
||||
Log.e("维度", l.getLongitude() + "");
|
||||
//单号
|
||||
tib.setShippingNoteNumber(snn);
|
||||
hyr.trackTracking(tib);
|
||||
// if (l == null || l.getLatitude() == 0d) {
|
||||
// return;
|
||||
// }
|
||||
// //经度
|
||||
// tib.setLatitude(l.getLatitude() + "");
|
||||
// //纬度
|
||||
// tib.setLongitude(l.getLongitude() + "");
|
||||
// Log.e("经度", l.getLatitude() + "");
|
||||
// Log.e("维度", l.getLongitude() + "");
|
||||
// //单号
|
||||
// tib.setShippingNoteNumber(snn);
|
||||
// hyr.trackTracking(tib);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.WalletRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivityBC;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.news.NewActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.wallet.UpBankActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.web.WebOnlyOneActivity;
|
||||
@ -726,14 +727,14 @@ public class HomeFragment extends BaseFragment {
|
||||
int zStatus = zData.getStatus();
|
||||
int xStatus = xData.getStatus();
|
||||
if (zStatus == 0) {//未装货
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
Intent in = new Intent(con, ShangChuangImgActivityBC.class);
|
||||
in.putExtra("type", 0);
|
||||
in.putExtra("wid", zData.getId() + "");
|
||||
in.putExtra("sob", gson.toJson(sob));
|
||||
in.putExtra("keys", true);
|
||||
startActivity(in);
|
||||
} else if (zStatus == 1 && xStatus == 4) {//已装货未上传回单
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
Intent in = new Intent(con, ShangChuangImgActivityBC.class);
|
||||
in.putExtra("type", 2);
|
||||
in.putExtra("wid", zData.getId() + "");
|
||||
in.putExtra("h_type", 0);
|
||||
@ -742,7 +743,7 @@ public class HomeFragment extends BaseFragment {
|
||||
} else if (zStatus == 3 && xStatus == 4) {//已上传装货回单,未卸货
|
||||
int dis = TimeUtil.compareNowDate(TimeUtil.string2Millis(zData.getImageTakenDate(), TimeUtil.DEFAULT_FORMAT4));
|
||||
if (dis > 5) {//大于五分钟可以接单
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
Intent in = new Intent(con, ShangChuangImgActivityBC.class);
|
||||
in.putExtra("type", 1);
|
||||
in.putExtra("wid", xData.getId() + "");
|
||||
in.putExtra("sob", gson.toJson(sob));
|
||||
@ -753,7 +754,7 @@ public class HomeFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
} else if (zStatus == 3 && xStatus == 2) {//已卸货,未上传卸货回单
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
Intent in = new Intent(con, ShangChuangImgActivityBC.class);
|
||||
in.putExtra("type", 2);
|
||||
in.putExtra("wid", xData.getId() + "");
|
||||
in.putExtra("h_type", 1);
|
||||
@ -869,8 +870,8 @@ public class HomeFragment extends BaseFragment {
|
||||
orderNum.setText("运单号:" + sob.getData().getShippingNoteNumber());
|
||||
order_state.setText("" + sob.getData().getWaybillStatus());
|
||||
try {
|
||||
Intent serviceIn = new Intent(con, TrackService.class);
|
||||
getActivity().startService(serviceIn);
|
||||
// Intent serviceIn = new Intent(con, TrackService.class);
|
||||
// getActivity().startService(serviceIn);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -231,8 +231,8 @@ public class HuoYuanFragmengt extends BaseFragment {
|
||||
if(sob!=null && sob.getData()!=null && sob.getData().getWayChildren().size()>0){
|
||||
SPUtil.insSP(con,"order","ShippingNoteNumber",sob.getData().getShippingNoteNumber());
|
||||
Log.e("开始轨迹上传服务","-----");
|
||||
Intent serviceIn=new Intent(con,TrackService.class);
|
||||
getActivity().startService(serviceIn);
|
||||
// Intent serviceIn=new Intent(con,TrackService.class);
|
||||
// getActivity().startService(serviceIn);
|
||||
list.add(new ManyBean(sob.getData(),R.layout.huoyuan_yundan));
|
||||
}else{
|
||||
SPUtil.insSP(con,"order","ShippingNoteNumber","");
|
||||
|
@ -41,6 +41,7 @@ import com.amap.api.services.route.DriveStep;
|
||||
import com.amap.api.services.route.RideRouteResult;
|
||||
import com.amap.api.services.route.RouteSearch;
|
||||
import com.amap.api.services.route.WalkRouteResult;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivityBC;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||
import com.bumptech.glide.Glide;
|
||||
@ -385,7 +386,7 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
String wid = sdw.getId() + "";
|
||||
if (sdw.getStatus() == 0) {
|
||||
if (type == 0) {
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
Intent in = new Intent(con, ShangChuangImgActivityBC.class);
|
||||
in.putExtra("type", type);
|
||||
in.putExtra("wid", wid);
|
||||
in.putExtra("sob", gson.toJson(sob));
|
||||
@ -395,14 +396,14 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
Toast.makeText(con, "您还没有装货", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else if (sdw.getStatus() == 1) {//装货回单
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
Intent in = new Intent(con, ShangChuangImgActivityBC.class);
|
||||
in.putExtra("type", 2);
|
||||
in.putExtra("wid", wid);
|
||||
in.putExtra("h_type", type);
|
||||
in.putExtra("sob", gson.toJson(sob));
|
||||
startActivity(in);
|
||||
} else if (sdw.getStatus() == 2) {//上传收货单(卸货回单)
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
Intent in = new Intent(con, ShangChuangImgActivityBC.class);
|
||||
in.putExtra("type", 2);
|
||||
in.putExtra("wid", wid);
|
||||
in.putExtra("h_type", type);
|
||||
@ -410,7 +411,7 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
in.putExtra("keys", key);
|
||||
startActivity(in);
|
||||
} else if (sdw.getStatus() == 3) {
|
||||
Intent in = new Intent(con, GetShangChuanActivity.class);
|
||||
Intent in = new Intent(con, ShangChuangImgActivityBC.class);
|
||||
in.putExtra("sdwStr", gson.toJson(sdw));
|
||||
startActivity(in);
|
||||
} else {//卸货照片
|
||||
@ -421,7 +422,7 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
if (zInfo.getReceiptUrl() != null && zInfo.getReceiptUrl().size() > 0) {
|
||||
int dis = TimeUtil.compareNowDate(TimeUtil.string2Millis(zInfo.getImageTakenDate(), TimeUtil.DEFAULT_FORMAT4));
|
||||
if (dis > 5) {//大于五分钟可以接单
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
Intent in = new Intent(con, ShangChuangImgActivityBC.class);
|
||||
in.putExtra("type", type);
|
||||
in.putExtra("wid", wid);
|
||||
in.putExtra("sob", gson.toJson(sob));
|
||||
|
@ -18,6 +18,7 @@ import android.widget.Toast;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alct.mdp.MDPLocationCollectionManager;
|
||||
import com.alct.mdp.callback.OnDownloadResultListener;
|
||||
import com.alct.mdp.callback.OnResultListener;
|
||||
import com.alct.mdp.model.Goods;
|
||||
import com.alct.mdp.model.Image;
|
||||
@ -504,7 +505,7 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isFinish = false;
|
||||
public void initLocation() {
|
||||
address.setText(lgdu.getAddress());
|
||||
}
|
||||
@ -525,10 +526,29 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
Log.e("--装货信息", gson.toJson(lub));
|
||||
if (locationKey) {//高德定位
|
||||
if (keys) {
|
||||
nfc();
|
||||
loadInfo();
|
||||
// up_traffic_start();
|
||||
// up_image_z();
|
||||
MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
||||
@Override
|
||||
public void onSuccess(Object o) {
|
||||
|
||||
String string = o.toString();
|
||||
if (string.equals("PICKUPED")) {//安联装货,单平台未装货
|
||||
isFinish = true;
|
||||
//平台确认装货
|
||||
hyr.loading(lub);
|
||||
} else {
|
||||
nfc();
|
||||
loadInfo();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showToast(con, s1);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||
@ -550,8 +570,32 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
Log.e("--卸货信息", gson.toJson(lub));
|
||||
if (locationKey&&!TextUtils.isEmpty(tempLoca.address)) {
|
||||
if (keys) {
|
||||
nfc();
|
||||
uploadInfo();
|
||||
MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
||||
@Override
|
||||
public void onSuccess(Object o) {
|
||||
if (o.toString().equals("UNLOADED")) {//安联装货,单平台未装货
|
||||
//卸货状态-平台
|
||||
isFinish = true;
|
||||
hyr.dischargeCargo(lub);
|
||||
} else {
|
||||
nfc();
|
||||
uploadInfo();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showToast(con, s1);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// nfc();
|
||||
// uploadInfo();
|
||||
|
||||
}
|
||||
|
||||
|
@ -102,8 +102,8 @@ public class BillLocationUtils {
|
||||
//order_start.setVisibility(View.VISIBLE);
|
||||
SPUtil.insSP(con, "order", "ShippingNoteNumber", sob.getData().getShippingNoteNumber());
|
||||
Log.e("开始轨迹上传服务", "-----");
|
||||
Intent serviceIn = new Intent(con, TrackService.class);
|
||||
con.startService(serviceIn);
|
||||
// Intent serviceIn = new Intent(con, TrackService.class);
|
||||
// con.startService(serviceIn);
|
||||
} else {
|
||||
SPUtil.insSP(con, "order", "ShippingNoteNumber", "");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user