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