Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc86f031b7 | ||
|
|
bb85e8ace7 | ||
|
|
35a2329073 | ||
|
|
c6c0fdbb6f | ||
|
|
d561b3598a | ||
|
|
1f0613ffcf | ||
|
|
736c73ea11 | ||
|
|
153d7c2c82 | ||
|
|
ae21a860b6 | ||
|
|
781e58ab44 | ||
|
|
d053e4492f | ||
|
|
5cf861671b | ||
|
|
258058d86c | ||
|
|
cf94fa8573 | ||
|
|
e126ecb8e7 | ||
|
|
7614dc4476 | ||
|
|
c9fcd9fb91 | ||
|
|
e41edf7b58 | ||
|
|
5d4389329d | ||
|
|
6fcaa21d57 | ||
|
|
b97d3dcb61 | ||
|
|
f0da8e0234 | ||
|
|
8de8c92b79 | ||
|
|
c6a4d3bca3 | ||
|
|
671ca60854 | ||
|
|
f0e7d63ae0 | ||
|
|
f648050328 | ||
|
|
c5f16d7d17 | ||
|
|
7d29c5ec89 | ||
|
|
bfbe7e9b5f | ||
|
|
a7db2019ad | ||
|
|
d8f80ad07d | ||
|
|
f5e24e2273 | ||
|
|
f13815709d | ||
|
|
1b40375c3c | ||
|
|
ca76fd4cc3 | ||
|
|
88144de31c | ||
|
|
9388a6ac87 | ||
|
|
0b2d42c090 | ||
|
|
d0df0bd42e |
+27
-21
@@ -2,8 +2,7 @@ plugins {
|
|||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'kotlin-android'
|
id 'kotlin-android'
|
||||||
id 'kotlin-kapt'
|
id 'kotlin-kapt'
|
||||||
id 'com.huawei.agconnect'
|
// id 'kotlin-android-extensions'
|
||||||
id 'kotlin-android-extensions'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -38,17 +37,17 @@ android {
|
|||||||
applicationId "com.arpa.hndahesudintocctmsdriver"
|
applicationId "com.arpa.hndahesudintocctmsdriver"
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 78
|
versionCode 75
|
||||||
versionName "3.4.8"
|
versionName "3.4.5"
|
||||||
flavorDimensions "CHANNEL_VALUE"
|
flavorDimensions "CHANNEL_VALUE"
|
||||||
flavorDimensions "app_icon"
|
flavorDimensions "app_icon"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
javaCompileOptions {
|
javaCompileOptions {
|
||||||
|
|
||||||
annotationProcessorOptions {
|
// annotationProcessorOptions {
|
||||||
includeCompileClasspath = true
|
// includeCompileClasspath = true
|
||||||
arguments = [moduleName: project.getName()]
|
// arguments = [moduleName: project.getName()]
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
@@ -83,17 +82,17 @@ android {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = '1.8'
|
jvmTarget = '1.8'
|
||||||
}
|
}
|
||||||
allprojects {
|
// allprojects {
|
||||||
repositories {
|
// repositories {
|
||||||
maven { url "https://jitpack.io" }
|
// maven { url "https://jitpack.io" }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
repositories {
|
// repositories {
|
||||||
flatDir {
|
// flatDir {
|
||||||
dirs 'libs'
|
// dirs 'libs'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
qa {
|
qa {
|
||||||
@@ -157,6 +156,9 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
|
// implementation(fileTree("libs"))
|
||||||
|
// implementation(name: 'mdp-release', ext: 'aar')
|
||||||
|
|
||||||
implementation 'com.google.android.material:material:1.2.1'
|
implementation 'com.google.android.material:material:1.2.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
|
||||||
implementation 'com.caverock:androidsvg-aar:1.3'
|
implementation 'com.caverock:androidsvg-aar:1.3'
|
||||||
@@ -186,7 +188,8 @@ dependencies {
|
|||||||
implementation 'com.alibaba:fastjson:1.2.61'
|
implementation 'com.alibaba:fastjson:1.2.61'
|
||||||
implementation 'org.bouncycastle:bcprov-jdk15on:1.55'
|
implementation 'org.bouncycastle:bcprov-jdk15on:1.55'
|
||||||
implementation 'org.apache.commons:commons-lang3:3.5'
|
implementation 'org.apache.commons:commons-lang3:3.5'
|
||||||
implementation(name: 'locationgd-androidx_2.1.0', ext: 'aar')//交通厅
|
// implementation(name: 'locationgd-androidx_2.1.0', ext: 'aar')//交通厅
|
||||||
|
implementation files('libs/locationgd-androidx_2.1.0.aar')
|
||||||
//安联
|
//安联
|
||||||
// implementation 'com.google.code.gson:gson:2.8.6'
|
// implementation 'com.google.code.gson:gson:2.8.6'
|
||||||
implementation 'com.loopj.android:android-async-http:1.4.9'
|
implementation 'com.loopj.android:android-async-http:1.4.9'
|
||||||
@@ -213,8 +216,10 @@ dependencies {
|
|||||||
//EventBus
|
//EventBus
|
||||||
implementation 'org.greenrobot:eventbus:3.1.1'
|
implementation 'org.greenrobot:eventbus:3.1.1'
|
||||||
//易签宝
|
//易签宝
|
||||||
implementation(name: 'EsignSDK', ext: 'aar')
|
// implementation(name: 'EsignSDK', ext: 'aar')
|
||||||
implementation 'pub.devrel:easypermissions:1.3.0'
|
implementation 'pub.devrel:easypermissions:1.3.0'
|
||||||
|
implementation files('libs/EsignSDK.aar')
|
||||||
|
|
||||||
|
|
||||||
implementation "com.squareup.retrofit2:retrofit:2.4.0"
|
implementation "com.squareup.retrofit2:retrofit:2.4.0"
|
||||||
// implementation "com.squareup.retrofit2:converter-gson:2.4.0"
|
// implementation "com.squareup.retrofit2:converter-gson:2.4.0"
|
||||||
@@ -229,8 +234,9 @@ dependencies {
|
|||||||
//
|
//
|
||||||
implementation 'com.github.getActivity:XToast:8.2'
|
implementation 'com.github.getActivity:XToast:8.2'
|
||||||
|
|
||||||
|
implementation files('libs/mdp-release.aar')
|
||||||
|
// implementation(name: 'mdp-release', ext: 'aar')
|
||||||
implementation project(path: ':mylibrary')
|
implementation project(path: ':mylibrary')
|
||||||
|
|
||||||
implementation files('libs/mdp-release.aar')
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -100,8 +100,9 @@
|
|||||||
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"
|
||||||
|
android:exported="true">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
||||||
@@ -114,8 +115,24 @@
|
|||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivityBC"
|
android:name=".ui.home.shangchuan.ShangChuangImgNewActivity"
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait"
|
||||||
|
android:exported="true">
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
|
<data android:mimeType="*/*" />
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".ui.home.shangchuan.ShangChuangImgActivityBC"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:exported="true">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
||||||
@@ -129,8 +146,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivity2"
|
android:name=".ui.home.shangchuan.ShangChuangImgActivity2"
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait"
|
||||||
|
android:exported="true">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
||||||
@@ -255,14 +273,11 @@
|
|||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:process=":mdpLocation_v1" />
|
android:process=":mdpLocation_v1" />
|
||||||
|
|
||||||
<!--后台访问 gps-->
|
|
||||||
<service
|
<service
|
||||||
android:name="com.express.mdp.GpsService"
|
android:name="com.express.mdp.GpsService"
|
||||||
android:foregroundServiceType="location"
|
android:foregroundServiceType="location"
|
||||||
android:label="GPS服务"
|
android:label="GPS服务"
|
||||||
android:priority="1000" />
|
android:priority="1000" />
|
||||||
|
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name="com.baidu.location.f"
|
android:name="com.baidu.location.f"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
@@ -369,7 +384,8 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name=".ui.NFCActivity">
|
<activity android:name=".ui.NFCActivity"
|
||||||
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
||||||
|
|
||||||
@@ -383,7 +399,8 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".H5Activity"
|
android:name=".H5Activity"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait"
|
||||||
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
@@ -411,7 +428,8 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".H5Activity2"
|
android:name=".H5Activity2"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait"
|
||||||
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
|
|||||||
@@ -232,10 +232,6 @@ public class H5Activity extends AppCompatActivity {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
String url = intent.getStringExtra("url");
|
String url = intent.getStringExtra("url");
|
||||||
if (TextUtils.isEmpty(url)) {
|
|
||||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
viewFile = intent.getBooleanExtra("view_file", false);
|
viewFile = intent.getBooleanExtra("view_file", false);
|
||||||
if (url.startsWith("alipay")) {
|
if (url.startsWith("alipay")) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -68,18 +68,9 @@ public class CarListBean {
|
|||||||
private Object carImage;
|
private Object carImage;
|
||||||
private String owner;
|
private String owner;
|
||||||
private String vehicleNumber;
|
private String vehicleNumber;
|
||||||
private String outInvoice;
|
|
||||||
private int auditStatus;
|
private int auditStatus;
|
||||||
private String drivingLicenseValidity;
|
private String drivingLicenseValidity;
|
||||||
|
|
||||||
public String getOutInvoice() {
|
|
||||||
return outInvoice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOutInvoice(String outInvoice) {
|
|
||||||
this.outInvoice = outInvoice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarNumber() {
|
public String getCarNumber() {
|
||||||
return carNumber == null ? "" : carNumber;
|
return carNumber == null ? "" : carNumber;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,12 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
package com.arpa.hndahesudintocctmsdriver.cuspop
|
||||||
|
|
||||||
import android.Manifest
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.Toast
|
import android.widget.TextView
|
||||||
import androidx.fragment.app.FragmentActivity
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil
|
|
||||||
import com.dahe.mylibrary.utils.ToastUtils
|
|
||||||
import com.lxj.xpopup.core.CenterPopupView
|
import com.lxj.xpopup.core.CenterPopupView
|
||||||
import com.lxj.xpopup.util.XPermission
|
|
||||||
import com.permissionx.guolindev.PermissionX
|
|
||||||
import kotlinx.android.synthetic.main.load.view.*
|
|
||||||
import kotlinx.android.synthetic.main.pop_message_center.view.*
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,9 +30,14 @@ class MessagePop(context: Context) : CenterPopupView(context), View.OnClickListe
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun getImplLayoutId() = R.layout.pop_message_center
|
override fun getImplLayoutId() = R.layout.pop_message_center
|
||||||
|
private lateinit var tvPhone : TextView
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
|
val tvCancel = findViewById<View>(R.id.tvCancel) as TextView
|
||||||
|
val tvOk = findViewById<View>(R.id.tvOk) as TextView
|
||||||
|
tvPhone = findViewById<View>(R.id.tvPhone) as TextView
|
||||||
|
val tvContent = findViewById<View>(R.id.tvContent) as TextView
|
||||||
|
val tvMessage2 = findViewById<View>(R.id.tvMessage2) as TextView
|
||||||
tvCancel.setOnClickListener(this)
|
tvCancel.setOnClickListener(this)
|
||||||
tvOk.setOnClickListener(this)
|
tvOk.setOnClickListener(this)
|
||||||
tvPhone.setOnClickListener(this)
|
tvPhone.setOnClickListener(this)
|
||||||
|
|||||||
@@ -2,11 +2,9 @@ package com.arpa.hndahesudintocctmsdriver.cuspop
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.widget.TextView
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity
|
|
||||||
import com.lxj.xpopup.core.CenterPopupView
|
import com.lxj.xpopup.core.CenterPopupView
|
||||||
import kotlinx.android.synthetic.main.pop_sim_center.view.*
|
|
||||||
import org.bouncycastle.jcajce.provider.symmetric.Rijndael
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -33,6 +31,10 @@ class SimCenterPop(context: Context) : CenterPopupView(context), View.OnClickLis
|
|||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
|
val tvCancel = findViewById<View>(R.id.tvCancel) as TextView
|
||||||
|
val tvOk = findViewById<View>(R.id.tvOk) as TextView
|
||||||
|
val tvContent = findViewById<View>(R.id.tvContent) as TextView
|
||||||
|
|
||||||
tvCancel.text = titleLeft
|
tvCancel.text = titleLeft
|
||||||
tvOk.text = titleReft
|
tvOk.text = titleReft
|
||||||
tvCancel.setOnClickListener(this)
|
tvCancel.setOnClickListener(this)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
package com.arpa.hndahesudintocctmsdriver.cuspop
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.TextView
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
import com.lxj.xpopup.core.PositionPopupView
|
import com.lxj.xpopup.core.PositionPopupView
|
||||||
import com.lxj.xpopup.enums.DragOrientation
|
import com.lxj.xpopup.enums.DragOrientation
|
||||||
import kotlinx.android.synthetic.main.popup_qq_msg.view.tvMessage
|
|
||||||
import kotlinx.android.synthetic.main.popup_qq_msg.view.tvTitle
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description: 自定义自由定位Position弹窗
|
* Description: 自定义自由定位Position弹窗
|
||||||
@@ -30,6 +30,9 @@ class TopMsgPopup(context: Context,title:String, message: String) : PositionPopu
|
|||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
|
val tvMessage = findViewById<View>(R.id.tvMessage) as TextView
|
||||||
|
val tvTitle = findViewById<View>(R.id.tvTitle) as TextView
|
||||||
|
|
||||||
tvMessage.text = message
|
tvMessage.text = message
|
||||||
tvTitle.text = title
|
tvTitle.text = title
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.arpa.hndahesudintocctmsdriver.report;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.alct.mdp.MDPLocationCollectionManager;
|
import com.alct.mdp.MDPLocationCollectionManager;
|
||||||
@@ -157,15 +156,11 @@ public class ALProcess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void verification(Context con,String carNum,Handler hd){
|
public static void verification(Context con,Handler hd){
|
||||||
DriverAuthDataBean auth= AuthParts.getAuth(con);
|
DriverAuthDataBean auth= AuthParts.getAuth(con);
|
||||||
if (auth==null){
|
if (auth==null){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (TextUtils.isEmpty(carNum)){
|
|
||||||
ToastUtils.showToast(con,"请选择车辆");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Identity idy=new Identity();
|
// Identity idy=new Identity();
|
||||||
// //企业代码
|
// //企业代码
|
||||||
// idy.setEnterpriseCode(BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE);
|
// idy.setEnterpriseCode(BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE);
|
||||||
@@ -192,8 +187,7 @@ public class ALProcess {
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
NewLJUtils.getInstance().searchDriver(con, auth.getData().getIdcard(), new OnGDDownloadResultListener(){
|
||||||
NewLJUtils.getInstance().trucks(con, auth.getData().getIdcard(),carNum, new OnGDDownloadResultListener(){
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String var1) {
|
public void onSuccess(String var1) {
|
||||||
MsgUtil.addHdMsgWatBody(hd, 1111,"认证成功");
|
MsgUtil.addHdMsgWatBody(hd, 1111,"认证成功");
|
||||||
@@ -205,18 +199,6 @@ public class ALProcess {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// NewLJUtils.getInstance().searchDriver(con, auth.getData().getIdcard(), new OnGDDownloadResultListener(){
|
|
||||||
// @Override
|
|
||||||
// public void onSuccess(String var1) {
|
|
||||||
// MsgUtil.addHdMsgWatBody(hd, 1111,"认证成功");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onFailure(String var1, String var2) {
|
|
||||||
// MsgUtil.addHdMsgWatBody(hd, 2222,var2);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// NewLJUtils.getInstance().getToken(con, new OnGDResultListener() {
|
// NewLJUtils.getInstance().getToken(con, new OnGDResultListener() {
|
||||||
// @Override
|
// @Override
|
||||||
// public void onSuccess() {
|
// public void onSuccess() {
|
||||||
|
|||||||
@@ -119,9 +119,6 @@ public class JTTProcess {
|
|||||||
//参数 ShippingNoteInfo 和 start 接口中的参数 ShippingNoteInfo 相
|
//参数 ShippingNoteInfo 和 start 接口中的参数 ShippingNoteInfo 相
|
||||||
//同,这里 shippingNoteInfo 信息只需传入运单号和分单号即可
|
//同,这里 shippingNoteInfo 信息只需传入运单号和分单号即可
|
||||||
public static void send(Context con,StartOrderBean sob,String remark){
|
public static void send(Context con,StartOrderBean sob,String remark){
|
||||||
if (sob.getData()==null){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ShippingNoteInfo[] snis=new ShippingNoteInfo[1];
|
ShippingNoteInfo[] snis=new ShippingNoteInfo[1];
|
||||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||||
|
|||||||
@@ -152,14 +152,5 @@ public interface Api {
|
|||||||
|
|
||||||
@GET(BASE_URL+"/openapi/drivers")
|
@GET(BASE_URL+"/openapi/drivers")
|
||||||
Observable<CommonResponseBean> searchDriver(@Query("identityNo") String identityNo);
|
Observable<CommonResponseBean> searchDriver(@Query("identityNo") String identityNo);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 司机车辆绑定关系
|
|
||||||
* @param identityNo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GET(BASE_URL+"openapi/drivers/{identityNo}/trucks")
|
|
||||||
Observable<CommonResponseBean> trucks(@Path("identityNo") String identityNo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.service;
|
||||||
|
|
||||||
|
import android.app.Notification;
|
||||||
|
import android.app.NotificationChannel;
|
||||||
|
import android.app.NotificationManager;
|
||||||
|
import android.app.PendingIntent;
|
||||||
|
import android.app.Service;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.IBinder;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.core.app.NotificationCompat;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
|
import com.express.mdp.gps.a;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName TrackForeService
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/12/2 13:12
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class TrackForeService extends Service {
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public IBinder onBind(Intent intent) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
|
||||||
|
// String var3 = "channelId" + System.currentTimeMillis();
|
||||||
|
// NotificationCompat.Builder var4;
|
||||||
|
// NotificationCompat.Builder var10001 = var4 = new NotificationCompat.Builder;
|
||||||
|
// var4.<init>(this, var3);
|
||||||
|
// var4.setContentText("运单轨迹服务");
|
||||||
|
// var4.setContentTitle("");
|
||||||
|
// var10001.setSmallIcon(var1);
|
||||||
|
// var10001.setAutoCancel(false);
|
||||||
|
// var10001.setShowWhen(true);
|
||||||
|
// var10001.setWhen(System.currentTimeMillis());
|
||||||
|
// var10001.setPriority(2);
|
||||||
|
// var10001.setOngoing(true);
|
||||||
|
// var10001.setDefaults(-1);
|
||||||
|
// NotificationManager var7 = (NotificationManager)this.getSystemService("notification");
|
||||||
|
// if (Build.VERSION.SDK_INT >= 26) {
|
||||||
|
// NotificationChannel var5;
|
||||||
|
// var5 = new NotificationChannel.<init>(var3, var2, 4);
|
||||||
|
// var7.createNotificationChannel(var5);
|
||||||
|
// var4.setChannelId(var3);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// a var10000 = this;
|
||||||
|
// Notification var6 = var4.build();
|
||||||
|
// var4.setContentIntent((PendingIntent)null);
|
||||||
|
// var7.notify(6, var6);
|
||||||
|
// var10000.startForeground(6, var6);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 判断是否为8.0版本以上
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||||
|
// 获取系统服务管理器
|
||||||
|
NotificationManager manage = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
|
String id = "channelId" + System.currentTimeMillis();
|
||||||
|
String name = "通知分类名称";
|
||||||
|
// 建立通知通道
|
||||||
|
NotificationChannel notificationChannel = new NotificationChannel(id, name, NotificationManager.IMPORTANCE_DEFAULT);
|
||||||
|
manage.createNotificationChannel(notificationChannel);
|
||||||
|
|
||||||
|
Notification build = new NotificationCompat.Builder(this, id)
|
||||||
|
.setContentTitle("前台服务")
|
||||||
|
.setContentText("运单轨迹服务")
|
||||||
|
.setWhen(System.currentTimeMillis()) // 当前时间
|
||||||
|
.setSmallIcon(R.drawable.ic_launcher_background) // 图标
|
||||||
|
.setProgress(100, 10, false) // 进度
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// 第一个参数唯一就好
|
||||||
|
startForeground(1, build);
|
||||||
|
manage.notify(1, build);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui;
|
package com.arpa.hndahesudintocctmsdriver.ui;
|
||||||
|
|
||||||
|
import static com.dahe.mylibrary.utils.BaseSPUtils.NEW_LJ_TOKEN;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||||
@@ -41,6 +43,7 @@ public class UiAuxiliary {
|
|||||||
public static void delLogin(Context con){
|
public static void delLogin(Context con){
|
||||||
// JPushInterface.deleteAlias(con,0);
|
// JPushInterface.deleteAlias(con,0);
|
||||||
SPUtils.remove(con,"curWaybillId");
|
SPUtils.remove(con,"curWaybillId");
|
||||||
|
SPUtils.remove(con,NEW_LJ_TOKEN);
|
||||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_TOKEN,"");
|
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_TOKEN,"");
|
||||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_UNAME,"");
|
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_UNAME,"");
|
||||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_RNAME,"");
|
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_RNAME,"");
|
||||||
|
|||||||
+1
-16
@@ -1220,29 +1220,14 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
iib.setDriverLicense(str1);
|
iib.setDriverLicense(str1);
|
||||||
iib.setDriverLicenseBackPhoto(backId);
|
iib.setDriverLicenseBackPhoto(backId);
|
||||||
iib.setDriverLicensePhoto(fontId);
|
iib.setDriverLicensePhoto(fontId);
|
||||||
|
iib.setEndTime("长期".equals(odl.getData().getEndDate()) ? "2999-12-31" : odl.getData().getEndDate());
|
||||||
if ("长期".equals(odl.getData().getEndDate())){
|
|
||||||
iib.setEndTime("2999-12-31");
|
|
||||||
}else if (TimeUtil.isValidDate(odl.getData().getEndDate())){//非yyyy-MM-dd格式的日期传""
|
|
||||||
iib.setEndTime(odl.getData().getEndDate());
|
|
||||||
}else{
|
|
||||||
iib.setEndTime("");
|
|
||||||
}
|
|
||||||
// iib.setEndTime("长期".equals(odl.getData().getEndDate()) ? "2999-12-31" : odl.getData().getEndDate());
|
|
||||||
iib.setFirstTime(odl.getData().getFirstGetDocDate());
|
iib.setFirstTime(odl.getData().getFirstGetDocDate());
|
||||||
|
|
||||||
|
|
||||||
// iib.setName(odl.getData().getName());
|
// iib.setName(odl.getData().getName());
|
||||||
iib.setOrganizationName(odl.getData().getIssuingAuthority());
|
iib.setOrganizationName(odl.getData().getIssuingAuthority());
|
||||||
iib.setAddress(odl.getData().getAddress());
|
iib.setAddress(odl.getData().getAddress());
|
||||||
|
|
||||||
if (TimeUtil.isValidDate(odl.getData().getBeginDate())){//非yyyy-MM-dd格式的日期传""
|
|
||||||
iib.setStartTime(odl.getData().getBeginDate());
|
iib.setStartTime(odl.getData().getBeginDate());
|
||||||
}else{
|
|
||||||
iib.setStartTime("");
|
|
||||||
}
|
|
||||||
|
|
||||||
// iib.setStartTime(odl.getData().getBeginDate());
|
|
||||||
|
|
||||||
iib.setSex(odl.getData().getSex());
|
iib.setSex(odl.getData().getSex());
|
||||||
iib.setBirthday(odl.getData().getBirthday());
|
iib.setBirthday(odl.getData().getBirthday());
|
||||||
|
|||||||
@@ -730,7 +730,6 @@ public class HomeFragment extends BaseFragment {
|
|||||||
if (zStatus == 0) {//未装货
|
if (zStatus == 0) {//未装货
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 0);
|
in.putExtra("type", 0);
|
||||||
in.putExtra("reportAlct", data.getReportAlct());
|
|
||||||
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);
|
||||||
@@ -738,7 +737,6 @@ public class HomeFragment extends BaseFragment {
|
|||||||
} else if (zStatus == 1 && xStatus == 4) {//已装货未上传回单
|
} else if (zStatus == 1 && xStatus == 4) {//已装货未上传回单
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 2);
|
in.putExtra("type", 2);
|
||||||
in.putExtra("reportAlct", data.getReportAlct());
|
|
||||||
in.putExtra("wid", zData.getId() + "");
|
in.putExtra("wid", zData.getId() + "");
|
||||||
in.putExtra("h_type", 0);
|
in.putExtra("h_type", 0);
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
@@ -748,7 +746,6 @@ public class HomeFragment extends BaseFragment {
|
|||||||
if (dis > 5) {//大于五分钟可以接单
|
if (dis > 5) {//大于五分钟可以接单
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 1);
|
in.putExtra("type", 1);
|
||||||
in.putExtra("reportAlct", data.getReportAlct());
|
|
||||||
in.putExtra("wid", xData.getId() + "");
|
in.putExtra("wid", xData.getId() + "");
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
in.putExtra("keys", true);
|
in.putExtra("keys", true);
|
||||||
@@ -760,7 +757,6 @@ 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, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 2);
|
in.putExtra("type", 2);
|
||||||
in.putExtra("reportAlct", data.getReportAlct());
|
|
||||||
in.putExtra("wid", xData.getId() + "");
|
in.putExtra("wid", xData.getId() + "");
|
||||||
in.putExtra("h_type", 1);
|
in.putExtra("h_type", 1);
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
|
|||||||
+9
-145
@@ -8,7 +8,6 @@ import android.content.Intent;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.CountDownTimer;
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
@@ -18,7 +17,6 @@ import android.text.TextUtils;
|
|||||||
import android.text.method.HideReturnsTransformationMethod;
|
import android.text.method.HideReturnsTransformationMethod;
|
||||||
import android.text.method.PasswordTransformationMethod;
|
import android.text.method.PasswordTransformationMethod;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
@@ -46,15 +44,11 @@ import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.PersonalAuthActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.auth.PersonalAuthActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.img.ImageGetUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.img.ImageGetUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickHelper;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickListener;
|
|
||||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||||
import com.dahe.mylibrary.utils.ToastUtils;
|
|
||||||
import com.esign.esignsdk.EsignSdk;
|
import com.esign.esignsdk.EsignSdk;
|
||||||
import com.esign.esignsdk.data.AuthEvent;
|
import com.esign.esignsdk.data.AuthEvent;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@@ -80,7 +74,6 @@ import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||||
import com.lxj.xpopup.interfaces.XPopupCallback;
|
|
||||||
import com.permissionx.guolindev.PermissionX;
|
import com.permissionx.guolindev.PermissionX;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@@ -88,7 +81,6 @@ import org.greenrobot.eventbus.Subscribe;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.TreeMap;
|
|
||||||
|
|
||||||
public class HuoYunDelActivity extends BaseAppCompatActivity {
|
public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||||
|
|
||||||
@@ -102,10 +94,6 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
private BasePopupView xp;
|
private BasePopupView xp;
|
||||||
private TextView car;
|
private TextView car;
|
||||||
private String cid;
|
private String cid;
|
||||||
private String selectCarNum = "";
|
|
||||||
|
|
||||||
private String currOutInvoice = "0";
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
@@ -170,17 +158,13 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
}
|
}
|
||||||
isRegOk = true;
|
|
||||||
|
|
||||||
Log.e("orderStatus", CacheGroup.cacheList.get("orderStatus"));
|
Log.e("orderStatus", CacheGroup.cacheList.get("orderStatus"));
|
||||||
WaybillStatusBean status = gson.fromJson(CacheGroup.cacheList.get("orderStatus"), WaybillStatusBean.class);
|
WaybillStatusBean status = gson.fromJson(CacheGroup.cacheList.get("orderStatus"), WaybillStatusBean.class);
|
||||||
if (status.getCode() == 200) {
|
if (status.getCode() == 200) {
|
||||||
if (regOkPop != null && regOkPop.isShow()) {
|
|
||||||
regOkPop.dismiss();
|
|
||||||
}
|
|
||||||
if (status.getData() != null) {
|
if (status.getData() != null) {
|
||||||
//执行运单下一步操作
|
//执行运单下一步操作
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
|
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||||
.asConfirm("请确认接单", "是否确定承运此运单?",
|
.asConfirm("请确认接单", "是否确定承运此运单?",
|
||||||
"取消", "确认",
|
"取消", "确认",
|
||||||
() -> {
|
() -> {
|
||||||
@@ -201,17 +185,10 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
CacheGroup.cacheList.remove("orderStatus");
|
CacheGroup.cacheList.remove("orderStatus");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RequsetCodeConstants.ERROR:
|
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
|
||||||
customDialog.dismiss();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 13:
|
case 13:
|
||||||
int index = Integer.valueOf((String) m.obj);
|
int index = Integer.valueOf((String) m.obj);
|
||||||
Log.e("--选择车辆--", clb.getData().get(index).getCarNumber());
|
Log.e("--选择车辆--", clb.getData().get(index).getCarNumber());
|
||||||
car.setText("选择车辆:" + clb.getData().get(index).getCarNumber());
|
car.setText("选择车辆:" + clb.getData().get(index).getCarNumber());
|
||||||
selectCarNum = clb.getData().get(index).getCarNumber();
|
|
||||||
currOutInvoice = clb.getData().get(index).getOutInvoice();
|
|
||||||
cid = clb.getData().get(index).getCarId();
|
cid = clb.getData().get(index).getCarId();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -339,25 +316,12 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
//
|
//
|
||||||
ImageButton xuanze = v.findViewById(R.id.xuanze);
|
ImageButton xuanze = v.findViewById(R.id.xuanze);
|
||||||
|
|
||||||
if (hyd != null && hyd.getData() != null && !TextUtils.isEmpty(hyd.getData().getCarNumber())) {
|
if (hyd!=null&&hyd.getData()!=null&& !TextUtils.isEmpty(hyd.getData().getCarNumber())){
|
||||||
String carNumber = hyd.getData().getCarNumber();
|
|
||||||
if (clb != null && !clb.getData().isEmpty()) {//判断车辆是否需要上传安联
|
|
||||||
for (CarListBean.DataDTO datum : clb.getData()) {
|
|
||||||
if (carNumber.equals(datum.getCarNumber())) {
|
|
||||||
cid = hyd.getData().getCarId();
|
cid = hyd.getData().getCarId();
|
||||||
car.setText("选择车辆:" + hyd.getData().getCarNumber());
|
car.setText("选择车辆:" + hyd.getData().getCarNumber());
|
||||||
currOutInvoice = datum.getOutInvoice();
|
}else if (clb != null && clb.getData().size() == 1) {
|
||||||
selectCarNum = hyd.getData().getCarNumber();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (clb != null && clb.getData().size() == 1) {
|
|
||||||
cid = clb.getData().get(0).getCarId();
|
cid = clb.getData().get(0).getCarId();
|
||||||
car.setText("选择车辆:" + clb.getData().get(0).getCarNumber());
|
car.setText("选择车辆:" + clb.getData().get(0).getCarNumber());
|
||||||
currOutInvoice = clb.getData().get(0).getOutInvoice();
|
|
||||||
selectCarNum = clb.getData().get(0).getCarNumber();
|
|
||||||
}
|
}
|
||||||
xuanze.setOnClickListener(v1 -> {
|
xuanze.setOnClickListener(v1 -> {
|
||||||
if (clb.getData().size() > 0) {
|
if (clb.getData().size() > 0) {
|
||||||
@@ -370,7 +334,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
});
|
});
|
||||||
//
|
//
|
||||||
Button confirm_btn = v.findViewById(R.id.confirm_btn);
|
Button confirm_btn = v.findViewById(R.id.confirm_btn);
|
||||||
confirm_btn.setOnClickListener(new OnLimitClickHelper(view -> {
|
confirm_btn.setOnClickListener(v13 -> {
|
||||||
if ("1".equals(UserParts.getUser(con).getData().getRealAuthentication())) {
|
if ("1".equals(UserParts.getUser(con).getData().getRealAuthentication())) {
|
||||||
if (cid != null) {
|
if (cid != null) {
|
||||||
// if (fpKey){
|
// if (fpKey){
|
||||||
@@ -391,7 +355,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
Intent in = new Intent(con, PersonalAuthActivity.class);
|
Intent in = new Intent(con, PersonalAuthActivity.class);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
BaseRecyclerView zhuang_data = v.findViewById(R.id.zhuang_rv1);
|
BaseRecyclerView zhuang_data = v.findViewById(R.id.zhuang_rv1);
|
||||||
BaseRecyclerView xie_data = v.findViewById(R.id.zhuang_rv2);
|
BaseRecyclerView xie_data = v.findViewById(R.id.zhuang_rv2);
|
||||||
List<Object> listz = new ArrayList<>();
|
List<Object> listz = new ArrayList<>();
|
||||||
@@ -448,7 +412,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
|
|
||||||
UiAuxiliary.homeRequest("接单");
|
UiAuxiliary.homeRequest("接单");
|
||||||
Intent in = new Intent(con, StartYunDanActivity.class);
|
Intent in = new Intent(con, StartYunDanActivity.class);
|
||||||
in.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
in.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||||
in.putExtra("id", "0");
|
in.putExtra("id", "0");
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
finish();
|
finish();
|
||||||
@@ -526,8 +490,6 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
* 先判断安联用户信息验证,随后接单
|
* 先判断安联用户信息验证,随后接单
|
||||||
*/
|
*/
|
||||||
private void reOrder() {
|
private void reOrder() {
|
||||||
//开始倒计时
|
|
||||||
startCountDown();
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
try {
|
try {
|
||||||
PermissionX.init(this)
|
PermissionX.init(this)
|
||||||
@@ -539,13 +501,8 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
if (allGranted) {
|
if (allGranted) {
|
||||||
customDialog = new CustomDialog(con, "正在接单...");
|
customDialog = new CustomDialog(con, "正在接单...");
|
||||||
customDialog.show();
|
customDialog.show();
|
||||||
if ("0".equals(currOutInvoice)) {
|
|
||||||
//验证安联用户是否通过
|
//验证安联用户是否通过
|
||||||
ALProcess.verification(con, selectCarNum, hd);
|
ALProcess.verification(con, hd);
|
||||||
} else {
|
|
||||||
hyr.getOrderStatus(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
boolean accessCoarseLocation = deniedList.contains("android.permission.ACCESS_FINE_LOCATION");
|
boolean accessCoarseLocation = deniedList.contains("android.permission.ACCESS_FINE_LOCATION");
|
||||||
boolean contains = deniedList.contains("android.permission.WRITE_EXTERNAL_STORAGE");
|
boolean contains = deniedList.contains("android.permission.WRITE_EXTERNAL_STORAGE");
|
||||||
@@ -565,14 +522,14 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
customDialog = new CustomDialog(con, "正在接单...");
|
customDialog = new CustomDialog(con, "正在接单...");
|
||||||
customDialog.show();
|
customDialog.show();
|
||||||
//验证安联用户是否通过
|
//验证安联用户是否通过
|
||||||
ALProcess.verification(con, selectCarNum, hd);
|
ALProcess.verification(con, hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
customDialog = new CustomDialog(con, "正在接单...");
|
customDialog = new CustomDialog(con, "正在接单...");
|
||||||
customDialog.show();
|
customDialog.show();
|
||||||
//验证安联用户是否通过
|
//验证安联用户是否通过
|
||||||
ALProcess.verification(con, selectCarNum, hd);
|
ALProcess.verification(con, hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -587,97 +544,4 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onStop() {
|
|
||||||
super.onStop();
|
|
||||||
// 取消倒计时,防止内存泄漏
|
|
||||||
if (countDownTimer != null) {
|
|
||||||
countDownTimer.cancel();
|
|
||||||
}
|
|
||||||
if (regOkPop != null && regOkPop.isShow()) {
|
|
||||||
regOkPop.dismiss();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private CountDownTimer countDownTimer;
|
|
||||||
private boolean isRegOk = false;
|
|
||||||
private BasePopupView regOkPop;
|
|
||||||
private void startCountDown() {
|
|
||||||
countDownTimer = new CountDownTimer(30000, 1000) {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTick(long millisUntilFinished) {
|
|
||||||
// 更新TextView显示剩余时间
|
|
||||||
System.out.println("asdf");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFinish() {
|
|
||||||
if (!isRegOk) {
|
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
|
||||||
customDialog.dismiss();
|
|
||||||
}
|
|
||||||
//执行运单下一步操作
|
|
||||||
regOkPop = new XPopup.Builder(con)
|
|
||||||
.setPopupCallback(new XPopupCallback() {
|
|
||||||
@Override
|
|
||||||
public void onCreated(BasePopupView popupView) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void beforeShow(BasePopupView popupView) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onShow(BasePopupView popupView) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDismiss(BasePopupView popupView) {
|
|
||||||
isRegOk = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void beforeDismiss(BasePopupView popupView) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onBackPressed(BasePopupView popupView) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onKeyBoardStateChanged(BasePopupView popupView, int height) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDrag(BasePopupView popupView, int value, float percent, boolean upOrLeft) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClickOutside(BasePopupView popupView) {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.asConfirm("提示", "接单失败,请返回重新接单!",
|
|
||||||
"取消", "确认",
|
|
||||||
() -> {
|
|
||||||
isRegOk = false;
|
|
||||||
finish();
|
|
||||||
}, () -> {
|
|
||||||
}, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
|
||||||
.show();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}.start(); // 别忘了调用start()方法来启动倒计时
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-7
@@ -101,7 +101,6 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
private boolean key = false;
|
private boolean key = false;
|
||||||
private int id = 0;
|
private int id = 0;
|
||||||
LocationGDUtil ld;
|
LocationGDUtil ld;
|
||||||
private TextView pl_submit;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
@@ -135,7 +134,6 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
if (CacheGroup.cacheList.get(KEEP_EVALUTE) != null) {
|
if (CacheGroup.cacheList.get(KEEP_EVALUTE) != null) {
|
||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(KEEP_EVALUTE), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(KEEP_EVALUTE), BaseBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
pl_submit.setVisibility(View.GONE);
|
|
||||||
Toast.makeText(con, "评价保存成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "评价保存成功", Toast.LENGTH_SHORT).show();
|
||||||
hyr.startOrder(id);
|
hyr.startOrder(id);
|
||||||
hyr.getEvaluate(id);
|
hyr.getEvaluate(id);
|
||||||
@@ -261,7 +259,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
sv2.initView();
|
sv2.initView();
|
||||||
sv1.setScore(5);
|
sv1.setScore(5);
|
||||||
//设置是否可以修改评分,默认为true
|
//设置是否可以修改评分,默认为true
|
||||||
pl_submit = v.findViewById(R.id.pl_submit);
|
TextView pl_submit = v.findViewById(R.id.pl_submit);
|
||||||
TextView m_pl_value = v.findViewById(R.id.m_pl_value);
|
TextView m_pl_value = v.findViewById(R.id.m_pl_value);
|
||||||
TextView pl_value = v.findViewById(R.id.pl_value);
|
TextView pl_value = v.findViewById(R.id.pl_value);
|
||||||
if (wnb.getData() != null) {
|
if (wnb.getData() != null) {
|
||||||
@@ -389,7 +387,6 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", type);
|
in.putExtra("type", type);
|
||||||
in.putExtra("reportAlct", sob.getData().getReportAlct());
|
|
||||||
in.putExtra("wid", wid);
|
in.putExtra("wid", wid);
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
in.putExtra("keys", key);
|
in.putExtra("keys", key);
|
||||||
@@ -400,7 +397,6 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
} else if (sdw.getStatus() == 1) {//装货回单
|
} else if (sdw.getStatus() == 1) {//装货回单
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 2);
|
in.putExtra("type", 2);
|
||||||
in.putExtra("reportAlct", sob.getData().getReportAlct());
|
|
||||||
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));
|
||||||
@@ -408,7 +404,6 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
} else if (sdw.getStatus() == 2) {//上传收货单(卸货回单)
|
} else if (sdw.getStatus() == 2) {//上传收货单(卸货回单)
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 2);
|
in.putExtra("type", 2);
|
||||||
in.putExtra("reportAlct", sob.getData().getReportAlct());
|
|
||||||
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));
|
||||||
@@ -428,7 +423,6 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
if (dis > 5) {//大于五分钟可以接单
|
if (dis > 5) {//大于五分钟可以接单
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", type);
|
in.putExtra("type", type);
|
||||||
in.putExtra("reportAlct", sob.getData().getReportAlct());
|
|
||||||
in.putExtra("wid", wid);
|
in.putExtra("wid", wid);
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
in.putExtra("keys", key);
|
in.putExtra("keys", key);
|
||||||
|
|||||||
+2
-25
@@ -89,7 +89,6 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
private String[] names = {"装货", "卸货", "回单"};
|
private String[] names = {"装货", "卸货", "回单"};
|
||||||
public static String[] TYPE_NAME = {"zhuanghuo", "xiehuo", "huidan"};
|
public static String[] TYPE_NAME = {"zhuanghuo", "xiehuo", "huidan"};
|
||||||
private int index = 0;
|
private int index = 0;
|
||||||
private int reportAlct = 1;//是否上报(安联城通) 0否 1是'
|
|
||||||
//
|
//
|
||||||
private Gson gson = new Gson();
|
private Gson gson = new Gson();
|
||||||
//
|
//
|
||||||
@@ -185,13 +184,6 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
EventBus.getDefault().post(new HomeWaybillEvent());
|
EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
finish();
|
finish();
|
||||||
}else if (reportAlct==0){
|
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
|
||||||
customDialog.dismiss();
|
|
||||||
}
|
|
||||||
EventBus.getDefault().post(new HomeWaybillEvent());
|
|
||||||
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
|
||||||
finish();
|
|
||||||
}
|
}
|
||||||
} else if ((0 == index || 1 == index) && isFinish) {
|
} else if ((0 == index || 1 == index) && isFinish) {
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
@@ -337,7 +329,6 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
tips_x = findViewById(R.id.tips_x);
|
tips_x = findViewById(R.id.tips_x);
|
||||||
Bundle ins = getIntent().getExtras();
|
Bundle ins = getIntent().getExtras();
|
||||||
index = ins.getInt("type");
|
index = ins.getInt("type");
|
||||||
reportAlct = ins.getInt("reportAlct");
|
|
||||||
wid = ins.getString("wid");
|
wid = ins.getString("wid");
|
||||||
h_type = ins.getInt("h_type");
|
h_type = ins.getInt("h_type");
|
||||||
keys = ins.getBoolean("keys");
|
keys = ins.getBoolean("keys");
|
||||||
@@ -490,7 +481,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("--装货信息", gson.toJson(lub));
|
Log.e("--装货信息", gson.toJson(lub));
|
||||||
if (locationKey) {//高德定位
|
if (locationKey) {//高德定位
|
||||||
if (keys) {
|
if (keys) {
|
||||||
if (1==reportAlct){
|
|
||||||
NewLJUtils.getInstance().getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnGDDownloadResultListener() {
|
NewLJUtils.getInstance().getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnGDDownloadResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String var1) {
|
public void onSuccess(String var1) {
|
||||||
@@ -515,12 +506,6 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
ToastUtils.showToast(con, var2);
|
ToastUtils.showToast(con, var2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
|
||||||
isFinish = true;
|
|
||||||
//平台确认装货
|
|
||||||
hyr.loading(lub);
|
|
||||||
}
|
|
||||||
|
|
||||||
// MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
// MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
||||||
// @Override
|
// @Override
|
||||||
// public void onSuccess(Object o) {
|
// public void onSuccess(Object o) {
|
||||||
@@ -576,7 +561,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("--卸货信息", gson.toJson(lub));
|
Log.e("--卸货信息", gson.toJson(lub));
|
||||||
if (locationKey) {
|
if (locationKey) {
|
||||||
if (keys) {
|
if (keys) {
|
||||||
if (1==reportAlct){
|
|
||||||
NewLJUtils.getInstance().getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnGDDownloadResultListener() {
|
NewLJUtils.getInstance().getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnGDDownloadResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String var1) {
|
public void onSuccess(String var1) {
|
||||||
@@ -601,12 +586,6 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}else {
|
|
||||||
//卸货状态-平台
|
|
||||||
isFinish = true;
|
|
||||||
hyr.dischargeCargo(lub);
|
|
||||||
}
|
|
||||||
|
|
||||||
// MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
// MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
||||||
// @Override
|
// @Override
|
||||||
// public void onSuccess(Object o) {
|
// public void onSuccess(Object o) {
|
||||||
@@ -664,9 +643,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("--回单信息", gson.toJson(urib));
|
Log.e("--回单信息", gson.toJson(urib));
|
||||||
if (locationKey) {
|
if (locationKey) {
|
||||||
if (index == 2 && keys) {
|
if (index == 2 && keys) {
|
||||||
if (1==reportAlct){
|
|
||||||
up_trafficSign();
|
up_trafficSign();
|
||||||
}
|
|
||||||
// up_trafficReceipt();
|
// up_trafficReceipt();
|
||||||
// receipt_image();
|
// receipt_image();
|
||||||
}
|
}
|
||||||
|
|||||||
+900
@@ -0,0 +1,900 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Message;
|
||||||
|
import android.provider.Settings;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
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;
|
||||||
|
import com.alct.mdp.model.Location;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.CarInfoBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.StartOrderBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.WaybillStatusBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.event.HomeWaybillEvent;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.request.bean.UploadReceiptInputBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.BitmapUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.NfcUtils;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.file.FileUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.img.GetCarImageAlert;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.location.LocationGDUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.location.LocationUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
|
import com.baidu.mapapi.model.LatLng;
|
||||||
|
import com.baidu.mapapi.utils.CoordinateConverter;
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.luck.picture.lib.PictureSelector;
|
||||||
|
import com.luck.picture.lib.config.PictureConfig;
|
||||||
|
import com.luck.picture.lib.entity.LocalMedia;
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ShangChuangImgNewActivity extends BaseAppCompatActivity {
|
||||||
|
|
||||||
|
private TextView submit, name_top, name_body, address, tips, tips_x;
|
||||||
|
private RelativeLayout getImg;
|
||||||
|
private ImageView res_img, img_icon, img_delete;
|
||||||
|
private String[] names = {"装货", "卸货", "回单"};
|
||||||
|
public static String[] TYPE_NAME = {"zhuanghuo", "xiehuo", "huidan"};
|
||||||
|
private int index = 0;
|
||||||
|
//
|
||||||
|
private Gson gson = new Gson();
|
||||||
|
//
|
||||||
|
private LUInputBean lub = new LUInputBean();
|
||||||
|
private UploadReceiptInputBean urib = new UploadReceiptInputBean();
|
||||||
|
private LocationGDUtil lgdu;
|
||||||
|
public LocationUtil lu;
|
||||||
|
private List<Integer> imgIds = new ArrayList<>();
|
||||||
|
private UploadBean ub;
|
||||||
|
private HuoYuanRequset hyr;
|
||||||
|
//
|
||||||
|
private GetCarImageAlert gia = new GetCarImageAlert();
|
||||||
|
private CustomDialog customDialog;
|
||||||
|
private int id = 0;
|
||||||
|
private boolean key = true;
|
||||||
|
private boolean keys = false;
|
||||||
|
private boolean locationKey = false;
|
||||||
|
private TextView tv_loaction;
|
||||||
|
|
||||||
|
private boolean isFinish = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void msgMethod(Message m) {
|
||||||
|
super.msgMethod(m);
|
||||||
|
switch (m.what) {
|
||||||
|
case RequsetCodeConstants.SUCCESS:
|
||||||
|
if (CacheGroup.cacheList.get("upload") != null) {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
Log.e("upload", CacheGroup.cacheList.get("upload"));
|
||||||
|
ub = gson.fromJson(CacheGroup.cacheList.remove("upload"), UploadBean.class);
|
||||||
|
if (ub.getCode() == 200) {
|
||||||
|
imgIds.add(ub.getData().getId());
|
||||||
|
// Glide.with(con).load(ub.getData().getUrl()).into(res_img);
|
||||||
|
Glide.with(con).load(path).into(res_img);
|
||||||
|
res_img.setVisibility(View.VISIBLE);
|
||||||
|
img_delete.setVisibility(View.VISIBLE);
|
||||||
|
img_icon.setVisibility(View.GONE);
|
||||||
|
key = false;
|
||||||
|
} else {
|
||||||
|
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
CacheGroup.cacheList.remove("upload");
|
||||||
|
}
|
||||||
|
if (CacheGroup.cacheList.get("waybillStatus") != null) {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
Log.e("waybillStatus", CacheGroup.cacheList.get("waybillStatus"));
|
||||||
|
WaybillStatusBean status = gson.fromJson(CacheGroup.cacheList.get("waybillStatus"), WaybillStatusBean.class);
|
||||||
|
if (status.getCode() == 200) {
|
||||||
|
if (status.getData() != null) {
|
||||||
|
//执行运单下一步操作
|
||||||
|
typeRequest();
|
||||||
|
} else {//订单已取消
|
||||||
|
new MessageUtils().showSimCenPop(con, "运单异常将无法进行下步操作,请返回首页", "取消", "确定", () -> {
|
||||||
|
SPUtils.remove(con, "curWaybillId");
|
||||||
|
EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
|
ActivityUtils.finishToActivity(MainActivity.class, false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Toast.makeText(con, status.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
CacheGroup.cacheList.remove("waybillStatus");
|
||||||
|
}
|
||||||
|
for (int i = 0; i < TYPE_NAME.length; i++) {
|
||||||
|
if (CacheGroup.cacheList.get(TYPE_NAME[i]) != null) {
|
||||||
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[i]), BaseBean.class);
|
||||||
|
if (bb.getCode() == 200) {
|
||||||
|
if (index == 2) {
|
||||||
|
if (!keys) {//装货回单
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
} else if ((0 == index || 1 == index) && isFinish) {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
CacheGroup.cacheList.remove(TYPE_NAME[i]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CacheGroup.cacheList.get("carName") != null) {
|
||||||
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("carName"), BaseBean.class);
|
||||||
|
if (bb.getCode() == 200) {
|
||||||
|
|
||||||
|
}
|
||||||
|
CacheGroup.cacheList.remove("carName");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CacheGroup.cacheList.get("carNum") != null) {
|
||||||
|
Log.e("upload", CacheGroup.cacheList.get("carNum"));
|
||||||
|
CarInfoBean ub = gson.fromJson(CacheGroup.cacheList.remove("carNum"), CarInfoBean.class);
|
||||||
|
if (ub.getCode() == 200 && ub.getData().getData().getPrism_keyValueInfo().size() > 0) {
|
||||||
|
String value = ub.getData().getData().getPrism_keyValueInfo().get(0).getValue();
|
||||||
|
String forceMatching = ub.getData().getForceMatching();
|
||||||
|
if ("1".equals(forceMatching)) {//是否强校验车牌号 1:强校验
|
||||||
|
if (sob.getData().getCarNumber().equals(value)) {
|
||||||
|
hyr.uploadFile(new File(path));
|
||||||
|
} else {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
new MessageUtils().showCenMessage(ShangChuangImgNewActivity.this, "车牌号不匹配!", "请重新拍照或联系管理员");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
hyr.uploadFile(new File(path));
|
||||||
|
}
|
||||||
|
} else {//识别失败后返回code500
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
if (index == 0) {//装卸货车辆需要识别车牌号){
|
||||||
|
Toast.makeText(con, "装货照片包含车牌号、三分之二车身或者装卸货场景。", Toast.LENGTH_SHORT).show();
|
||||||
|
} else if (index == 1) {
|
||||||
|
Toast.makeText(con, "卸货照片包含车牌号、三分之二车身或者装卸货场景。", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
CacheGroup.cacheList.remove("carNum");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 14://定位成功
|
||||||
|
locationKey = true;
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
tv_loaction.setText("定位成功");
|
||||||
|
tv_loaction.setTextColor(getResources().getColor(R.color.theme_color, null));
|
||||||
|
latLng = convertGPSToBaidu(new LatLng(lgdu.getLatitude(), lgdu.getLongitude()));
|
||||||
|
initLocation();
|
||||||
|
break;
|
||||||
|
case 16://定位失败
|
||||||
|
locationKey = false;
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
tv_loaction.setText("定位失败,点击重试");
|
||||||
|
tv_loaction.setTextColor(getResources().getColor(R.color.loaction_no_color, null));
|
||||||
|
|
||||||
|
new MessageUtils().showSimCenPop(con, "缺少定位权限,去开启精确定位权限!", "取消", "确认", () -> {
|
||||||
|
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||||
|
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||||
|
intent.setData(uri);
|
||||||
|
startActivity(intent);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Toast.makeText(con, "定位失败,请确认开启定位后重试!", Toast.LENGTH_LONG).show();
|
||||||
|
//定位结果接收
|
||||||
|
//finish();
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||||
|
path = (String) m.obj;
|
||||||
|
Log.e("res:", "选定图片结果");
|
||||||
|
Log.e("res:", path);
|
||||||
|
//选定图片结果
|
||||||
|
// if(index==1 || index==2){
|
||||||
|
// new OCRRequest().OCRPlateLicense(con,hd,new File(path));
|
||||||
|
// }
|
||||||
|
if ((index == 0 || index == 1) && !BuildConfig.isTest) {//装卸货车辆需要识别车牌号,测试环境不校验车牌号
|
||||||
|
new OCRRequest().OCRCarPlateLicense(con, hd, new File(path));
|
||||||
|
} else {
|
||||||
|
hyr.uploadFile(new File(path));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private LatLng latLng;
|
||||||
|
|
||||||
|
public LatLng convertGPSToBaidu(LatLng srLatLng) {
|
||||||
|
CoordinateConverter converter = new CoordinateConverter();
|
||||||
|
converter.from(CoordinateConverter.CoordType.COMMON);
|
||||||
|
converter.coord(srLatLng);
|
||||||
|
return converter.convert();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String wid;
|
||||||
|
private int h_type;
|
||||||
|
String sobStr = "";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
StateStyleUtil.stateTextColor(this);
|
||||||
|
setContentView(R.layout.activity_shangchuan);
|
||||||
|
con = this;
|
||||||
|
submit = findViewById(R.id.submit);
|
||||||
|
name_top = findViewById(R.id.name_top);
|
||||||
|
name_body = findViewById(R.id.name_body);
|
||||||
|
address = findViewById(R.id.address);
|
||||||
|
getImg = findViewById(R.id.getImg);
|
||||||
|
res_img = findViewById(R.id.res_img);
|
||||||
|
img_icon = findViewById(R.id.img_icon);
|
||||||
|
img_delete = findViewById(R.id.img_delete);
|
||||||
|
tv_loaction = findViewById(R.id.tv_loaction);
|
||||||
|
tips = findViewById(R.id.tips);
|
||||||
|
tips_x = findViewById(R.id.tips_x);
|
||||||
|
Bundle ins = getIntent().getExtras();
|
||||||
|
index = ins.getInt("type");
|
||||||
|
wid = ins.getString("wid");
|
||||||
|
h_type = ins.getInt("h_type");
|
||||||
|
keys = ins.getBoolean("keys");
|
||||||
|
sobStr = getIntent().getExtras().getString("sob");
|
||||||
|
//Log.e("---sdwStr--",sdwStr);
|
||||||
|
sob = new Gson().fromJson(sobStr, StartOrderBean.class);
|
||||||
|
|
||||||
|
initView(null);
|
||||||
|
customDialog = new CustomDialog(con, "正在定位当前位置...");
|
||||||
|
customDialog.show();
|
||||||
|
lgdu = new LocationGDUtil(con, hd);
|
||||||
|
//启动定位
|
||||||
|
lgdu.onCreate();
|
||||||
|
// lu = new LocationUtil(con, hd);
|
||||||
|
// lu.onCreate();
|
||||||
|
// if (keys) {
|
||||||
|
// lu = new LocationUtil(con, hd);
|
||||||
|
// lu.onCreate();
|
||||||
|
// }
|
||||||
|
tv_loaction.setOnClickListener(v -> {
|
||||||
|
if (!locationKey) {
|
||||||
|
customDialog.show();
|
||||||
|
lgdu.onCreate();
|
||||||
|
// lu = new LocationUtil(con, hd);
|
||||||
|
// lu.onCreate();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
hyr = new HuoYuanRequset(con, hd);
|
||||||
|
// if (!NfcUtils.hasNfc(con)) {
|
||||||
|
// Toast.makeText(con,"请先开启nfc",Toast.LENGTH_LONG).show();
|
||||||
|
// }else{
|
||||||
|
// initData();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initData() {
|
||||||
|
//nfc初始化设置
|
||||||
|
NfcUtils nfcUtils = new NfcUtils(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initView(Object obj) {
|
||||||
|
super.initView(obj);
|
||||||
|
name_top.setText("上传" + names[index] + "照片");
|
||||||
|
name_body.setText(names[index] + "照片");
|
||||||
|
if (index == 1) {
|
||||||
|
tips.setVisibility(View.VISIBLE);
|
||||||
|
tips_x.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
submit.setOnClickListener(v -> {
|
||||||
|
if (imgIds.size() != 0) {
|
||||||
|
//判断运单是否已取消
|
||||||
|
hyr.getWaybillStatus(sob.getData().getWaybillId());
|
||||||
|
// typeRequest();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(con, "请先上传一张图片", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
getImg.setOnClickListener(v -> {
|
||||||
|
if (key) {
|
||||||
|
Log.e("--imgIds.size()--", imgIds.size() + "");
|
||||||
|
gia.showPopueWindow(this, index == 2);
|
||||||
|
} else {
|
||||||
|
new XPopup.Builder(con)
|
||||||
|
.asImageViewer(res_img, ub.getData().getUrl(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(res_img, ub.getData().getUrl(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
|
Toast.makeText(con, "查看了照片", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
img_delete.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
imgIds = new ArrayList<>();
|
||||||
|
ub = new UploadBean();
|
||||||
|
res_img.setVisibility(View.GONE);
|
||||||
|
img_delete.setVisibility(View.GONE);
|
||||||
|
img_icon.setVisibility(View.VISIBLE);
|
||||||
|
key = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
String path;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
if (requestCode == 12 && resultCode == RESULT_OK) {
|
||||||
|
if (null == gia.getFile()) {
|
||||||
|
new ToastUtil(con, Gravity.CENTER, "图片选择失败").show(Toast.LENGTH_SHORT);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
path = gia.getFile().getPath();
|
||||||
|
Log.e("图片地址:", path);
|
||||||
|
gia.dis();
|
||||||
|
|
||||||
|
if (customDialog != null && !customDialog.isShowing()) {
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
|
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
||||||
|
List<LocalMedia> imgs = PictureSelector.obtainMultipleResult(data);
|
||||||
|
if (imgs != null && imgs.size() > 0) {
|
||||||
|
LocalMedia image = imgs.get(0);
|
||||||
|
|
||||||
|
String paths = image.getAndroidQToPath();
|
||||||
|
if (TextUtils.isEmpty(paths)) {
|
||||||
|
paths = image.getPath();
|
||||||
|
}
|
||||||
|
path = paths;
|
||||||
|
Log.e("图片地址:", path);
|
||||||
|
gia.dis();
|
||||||
|
|
||||||
|
if (customDialog != null && !customDialog.isShowing()) {
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initLocation() {
|
||||||
|
address.setText(lgdu.getAddress());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void typeRequest() {
|
||||||
|
// for(int i=0;i<imgIds.size();i++){
|
||||||
|
// Log.e("--imgIds--",imgIds.get(i)+"");
|
||||||
|
// }
|
||||||
|
if (customDialog != null && !customDialog.isShowing()) {
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
|
}
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
//装货
|
||||||
|
if (imgIds != null && imgIds.size() > 0) {
|
||||||
|
lub.setLatitude(lgdu.getLatitude() + "");
|
||||||
|
lub.setLongitude(lgdu.getLongitude() + "");
|
||||||
|
lub.setLocationAddress(lgdu.getAddress());
|
||||||
|
lub.setImageId(imgIds);
|
||||||
|
lub.setWaybillId(wid);
|
||||||
|
Log.e("--装货信息", gson.toJson(lub));
|
||||||
|
if (locationKey) {//高德定位
|
||||||
|
if (keys) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// nfc();
|
||||||
|
// loadInfo();
|
||||||
|
// up_traffic_start();
|
||||||
|
// up_image_z();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
Toast.makeText(con, "图片上传异常,请重新上传", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (imgIds != null && imgIds.size() > 0) {
|
||||||
|
//卸货
|
||||||
|
lub.setLatitude(lgdu.getLatitude() + "");
|
||||||
|
lub.setLongitude(lgdu.getLongitude() + "");
|
||||||
|
lub.setLocationAddress(lgdu.getAddress());
|
||||||
|
lub.setImageId(imgIds);
|
||||||
|
lub.setWaybillId(wid);
|
||||||
|
Log.e("--卸货信息", gson.toJson(lub));
|
||||||
|
if (locationKey) {
|
||||||
|
if (keys) {
|
||||||
|
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();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
Toast.makeText(con, "图片上传异常,请重新上传", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (imgIds != null && imgIds.size() > 0) {//卸货回单
|
||||||
|
//上传回单
|
||||||
|
urib.setLatitude(lgdu.getLatitude() + "");
|
||||||
|
urib.setLongitude(lgdu.getLongitude() + "");
|
||||||
|
urib.setLocationAddress(lgdu.getAddress());
|
||||||
|
//装卸货类型
|
||||||
|
urib.setType(h_type + 1);
|
||||||
|
//回单id 数组
|
||||||
|
urib.setReceiptId(imgIds);
|
||||||
|
//子运运单ID
|
||||||
|
urib.setWaybillId(wid);
|
||||||
|
Log.e("--回单信息", gson.toJson(urib));
|
||||||
|
if (locationKey) {
|
||||||
|
if (index == 2 && keys) {
|
||||||
|
up_trafficSign();
|
||||||
|
up_trafficReceipt();
|
||||||
|
receipt_image();
|
||||||
|
}
|
||||||
|
hyr.receipt(urib);
|
||||||
|
} else {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
Toast.makeText(con, "图片上传异常,请重新上传", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private StartOrderBean sob;
|
||||||
|
|
||||||
|
public void nfc() {
|
||||||
|
// if(sob.getData().getNfcId().equals(nfcStr)){
|
||||||
|
// Toast.makeText(con,"nfcId匹配失败",Toast.LENGTH_LONG).show();
|
||||||
|
// }
|
||||||
|
if ("".equals(sob.getData().getNfcId()) || sob.getData().getNfcId() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
MDPLocationCollectionManager.checkNfc(con, sob.getData().getShippingNoteNumber(),
|
||||||
|
sob.getData().getNfcId(), new OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Toast.makeText(con, "nfcId匹配成功", Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("不匹配", "" + s + s1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//上传安联-签收
|
||||||
|
public void up_trafficSign() {
|
||||||
|
//安联
|
||||||
|
Location l = new Location();
|
||||||
|
l.setBaiduLongitude(latLng.longitude);
|
||||||
|
l.setBaiduLatitude(latLng.latitude);
|
||||||
|
l.setLocation(lgdu.getAddress());
|
||||||
|
l.setTime(Timer.getTimerT());
|
||||||
|
List<Goods> gs = new ArrayList<>();
|
||||||
|
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||||
|
if (wid.equals(wayChild.getId() + "")) {
|
||||||
|
for (StartOrderBean.DataDTO.WayChildrenDTO.GoodsDTO good : wayChild.getGoods()) {
|
||||||
|
Goods g = new Goods();
|
||||||
|
g.setGoodsName(good.getGoodName());
|
||||||
|
g.setUnit(good.getGoodUnit());
|
||||||
|
g.setItemNo(good.getId());
|
||||||
|
//实收
|
||||||
|
g.setQuantity(1);
|
||||||
|
//应收
|
||||||
|
g.setReceivedQuantity(1);
|
||||||
|
//破损
|
||||||
|
g.setDamageQuantity(1);
|
||||||
|
//丢失
|
||||||
|
g.setQuantity(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MDPLocationCollectionManager.sign(con, sob.getData().getShippingNoteNumber(), l, gs, new OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联", "签收成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(签收):", s + s1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//上传安联-回单
|
||||||
|
public void up_trafficReceipt() {
|
||||||
|
//安联
|
||||||
|
Location l = new Location();
|
||||||
|
l.setBaiduLongitude(latLng.longitude);
|
||||||
|
l.setBaiduLatitude(latLng.latitude);
|
||||||
|
l.setLocation(lgdu.getAddress());
|
||||||
|
l.setTime(Timer.getTimerT());
|
||||||
|
MDPLocationCollectionManager.pod(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联", "回单上传成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(回单):", s + s1);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void up_image_z() {
|
||||||
|
///storage/emulated/0/Android/data/com.oneclouds.wangluohuoyun/files/Pictures/163124593063154.jpg
|
||||||
|
File file = new File(path);
|
||||||
|
Image image = new Image();
|
||||||
|
String base = BitmapUtil.imageToBase64(path);
|
||||||
|
image.setFileData("data:image/" + FileUtil.lastName(file) + ";base64," + base);
|
||||||
|
image.setFileExt(FileUtil.lastName(file));
|
||||||
|
image.setFileName(FileUtil.fileName(file));
|
||||||
|
image.setImageTakenDate(Timer.getTimerT());
|
||||||
|
image.setBaiduLongitude(latLng.longitude);
|
||||||
|
image.setBaiduLatitude(latLng.latitude);
|
||||||
|
image.setLocation(lgdu.getAddress());
|
||||||
|
MDPLocationCollectionManager.uploadPickupImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
|
Log.e("上报安联", "装货照片上传成功");
|
||||||
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(装货照片):", s + s1);
|
||||||
|
// SPUtil.insSP(con,"make","装货",sob.getData().getShippingNoteNumber());
|
||||||
|
// SPUtil.insSP(con,"make","装货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||||
|
// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||||
|
// startService(serviceIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void up_image() {
|
||||||
|
File file = new File(path);
|
||||||
|
Image image = new Image();
|
||||||
|
String base = BitmapUtil.imageToBase64(path);
|
||||||
|
image.setFileData("data:image/" + FileUtil.lastName(file) + ";base64," + base);
|
||||||
|
image.setFileExt(FileUtil.lastName(file));
|
||||||
|
image.setFileName(FileUtil.fileName(file));
|
||||||
|
image.setImageTakenDate(Timer.getTimerT());
|
||||||
|
image.setBaiduLongitude(latLng.longitude);
|
||||||
|
image.setBaiduLatitude(latLng.latitude);
|
||||||
|
image.setLocation(lgdu.getAddress());
|
||||||
|
MDPLocationCollectionManager.uploadUnloadImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
|
Log.e("上报安联", "卸货照片上传成功");
|
||||||
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(卸货照片):", s + s1);
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
// SPUtil.insSP(con,"make","卸货",sob.getData().getShippingNoteNumber());
|
||||||
|
// SPUtil.insSP(con,"make","卸货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||||
|
// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||||
|
// startService(serviceIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void receipt_image() {
|
||||||
|
///storage/emulated/0/Android/data/com.oneclouds.wangluohuoyun/files/Pictures/163124593063154.jpg
|
||||||
|
File file = new File(path);
|
||||||
|
Image image = new Image();
|
||||||
|
String base = BitmapUtil.imageToBase64(path);
|
||||||
|
image.setFileData("data:image/" + FileUtil.lastName(file) + ";base64," + base);
|
||||||
|
image.setFileExt(FileUtil.lastName(file));
|
||||||
|
image.setFileName(FileUtil.fileName(file));
|
||||||
|
image.setImageTakenDate(Timer.getTimerT());
|
||||||
|
image.setBaiduLongitude(latLng.longitude);
|
||||||
|
image.setBaiduLatitude(latLng.latitude);
|
||||||
|
image.setLocation(lgdu.getAddress());
|
||||||
|
MDPLocationCollectionManager.uploadPODImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
SPUtils.remove(con, "curWaybillId");
|
||||||
|
EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
|
Log.e("上报安联", "回单照片上传成功");
|
||||||
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(回单照片):", s + s1);
|
||||||
|
// SPUtil.insSP(con,"make","回单",sob.getData().getShippingNoteNumber());
|
||||||
|
//// SPUtil.insSP(con,"make","回单-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||||
|
//// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||||
|
//// startService(serviceIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
//开启前台调度系统
|
||||||
|
//NfcUtils.mNfcAdapter.enableForegroundDispatch(this, NfcUtils.mPendingIntent, NfcUtils.mIntentFilter, NfcUtils.mTechList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
//关闭前台调度系统
|
||||||
|
//NfcUtils.mNfcAdapter.disableForegroundDispatch(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
String nfcStr = "";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onNewIntent(Intent intent) {
|
||||||
|
super.onNewIntent(intent);
|
||||||
|
//当该Activity接收到NFC标签时,运行该方法
|
||||||
|
//调用工具方法,读取NFC数据
|
||||||
|
try {
|
||||||
|
nfcStr = NfcUtils.readNFCId(intent);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
Log.e("nfc", nfcStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传安联和交通厅,平台-装货
|
||||||
|
*/
|
||||||
|
private void loadInfo() {
|
||||||
|
//安联
|
||||||
|
if (sob.getData().getReportAlct() == 1) {
|
||||||
|
Location l = new Location();
|
||||||
|
l.setBaiduLongitude(latLng.longitude);
|
||||||
|
l.setBaiduLatitude(latLng.latitude);
|
||||||
|
l.setLocation(lgdu.getAddress());
|
||||||
|
l.setTime(Timer.getTimerT());
|
||||||
|
MDPLocationCollectionManager.pickup(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联", "装货上传成功");
|
||||||
|
//交通厅
|
||||||
|
if (sob.getData().getReport() == 1) {
|
||||||
|
JTTProcess.start(con, sob, "");
|
||||||
|
}
|
||||||
|
//装货状态
|
||||||
|
hyr.loading(lub);
|
||||||
|
//装货照片
|
||||||
|
up_image_z();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(装货):", s + s1);
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
new MessageUtils().showCenMessage(con, s1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传安联和交通厅,平台-卸货
|
||||||
|
*/
|
||||||
|
private void uploadInfo() {
|
||||||
|
|
||||||
|
//安联
|
||||||
|
if (sob.getData().getReportAlct() == 1) {
|
||||||
|
Location l = new Location();
|
||||||
|
l.setBaiduLongitude(latLng.longitude);
|
||||||
|
l.setBaiduLatitude(latLng.latitude);
|
||||||
|
l.setLocation(lgdu.getAddress());
|
||||||
|
l.setTime(Timer.getTimerT());
|
||||||
|
Log.e("-安联卸货信息-", gson.toJson(l));
|
||||||
|
MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联", "卸货上传成功");
|
||||||
|
//交通厅
|
||||||
|
if (sob.getData().getReport() == 1) {
|
||||||
|
JTTProcess.stop(con, sob, "");
|
||||||
|
}
|
||||||
|
//卸货状态-平台
|
||||||
|
hyr.dischargeCargo(lub);
|
||||||
|
//卸货照片-安联
|
||||||
|
up_image();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(卸货):", s + s1);
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
new MessageUtils().showCenMessage(con, s1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -11,7 +11,6 @@ import android.telecom.TelecomManager;
|
|||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
import android.text.TextPaint;
|
import android.text.TextPaint;
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.text.style.ClickableSpan;
|
import android.text.style.ClickableSpan;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -69,7 +68,6 @@ public class LoginActivity extends BaseActivity {
|
|||||||
public static final String USER = "user";
|
public static final String USER = "user";
|
||||||
public static final String USER_TOKEN = "token";
|
public static final String USER_TOKEN = "token";
|
||||||
public static final String USER_UNAME = "uname";
|
public static final String USER_UNAME = "uname";
|
||||||
public static final String USER_PHONE = "USER_PHONE";
|
|
||||||
public static final String USER_RNAME = "rname";
|
public static final String USER_RNAME = "rname";
|
||||||
public static final String USER_ID = "id";
|
public static final String USER_ID = "id";
|
||||||
|
|
||||||
@@ -115,7 +113,6 @@ public class LoginActivity extends BaseActivity {
|
|||||||
NewLJUtils.getInstance().getToken(con);
|
NewLJUtils.getInstance().getToken(con);
|
||||||
SPUtil.insSP(con, USER, USER_TOKEN, loginBean.getData().getToken());
|
SPUtil.insSP(con, USER, USER_TOKEN, loginBean.getData().getToken());
|
||||||
SPUtil.insSP(con, USER, USER_UNAME, loginBean.getData().getUname());
|
SPUtil.insSP(con, USER, USER_UNAME, loginBean.getData().getUname());
|
||||||
SPUtil.insSP(con, USER, USER_PHONE, loginBean.getData().getRegisterPhone());
|
|
||||||
SPUtil.insSP(con, USER, USER_RNAME, loginBean.getData().getRname());
|
SPUtil.insSP(con, USER, USER_RNAME, loginBean.getData().getRname());
|
||||||
SPUtil.insSP(con, USER, USER_ID, loginBean.getData().getId() + "");
|
SPUtil.insSP(con, USER, USER_ID, loginBean.getData().getId() + "");
|
||||||
// JPushInterface.setAlias(con, 0, loginBean.getData().getUname());
|
// JPushInterface.setAlias(con, 0, loginBean.getData().getUname());
|
||||||
@@ -158,10 +155,6 @@ public class LoginActivity extends BaseActivity {
|
|||||||
getCode = findViewById(R.id.getCode);
|
getCode = findViewById(R.id.getCode);
|
||||||
cb = findViewById(R.id.cb);
|
cb = findViewById(R.id.cb);
|
||||||
ur = new UserRequset(con, hd);
|
ur = new UserRequset(con, hd);
|
||||||
String phone = SPUtil.getSP(con, LoginActivity.USER, LoginActivity.USER_PHONE);
|
|
||||||
if (!TextUtils.isEmpty(phone)){
|
|
||||||
input_phone.setText(phone);
|
|
||||||
}
|
|
||||||
initView(null);
|
initView(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.UpAppBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.UpAppBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
||||||
@@ -26,6 +27,7 @@ import com.arpa.hndahesudintocctmsdriver.parts.StartOrderParts;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.alert.UpAppAlert;
|
import com.arpa.hndahesudintocctmsdriver.ui.alert.UpAppAlert;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.business.BusinessActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.business.BusinessActivity;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.NewLJUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.dahe.mylibrary.utils.ImageLoader;
|
import com.dahe.mylibrary.utils.ImageLoader;
|
||||||
|
|||||||
@@ -232,14 +232,14 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void submit() {
|
public void submit() {
|
||||||
|
customDialog = new CustomDialog(con, "上传中,请稍后...");
|
||||||
|
customDialog.show();
|
||||||
String bankName = bank_name.getText().toString().trim();
|
String bankName = bank_name.getText().toString().trim();
|
||||||
String bankNumber = bank_number.getText().toString().trim();
|
String bankNumber = bank_number.getText().toString().trim();
|
||||||
if ("".equals(bankName) || "".equals(bankNumber)) {
|
if ("".equals(bankName) || "".equals(bankNumber)) {
|
||||||
Toast.makeText(con, "请先补充完整的银行卡信息", Toast.LENGTH_LONG).show();
|
Toast.makeText(con, "请先补充完整的银行卡信息", Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
customDialog = new CustomDialog(con, "上传中,请稍后...");
|
|
||||||
customDialog.show();
|
|
||||||
InsBankInputBean ibib = new InsBankInputBean();
|
InsBankInputBean ibib = new InsBankInputBean();
|
||||||
ibib.setCardNo(bankNumber);
|
ibib.setCardNo(bankNumber);
|
||||||
// ibib.setCardType(Integer.parseInt(ib.getData().getType()));
|
// ibib.setCardType(Integer.parseInt(ib.getData().getType()));
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import android.widget.Toast;
|
|||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.App;
|
import com.arpa.hndahesudintocctmsdriver.App;
|
||||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverAuthDataBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.DriverAuthDataBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.GDImage;
|
import com.arpa.hndahesudintocctmsdriver.bean.GDImage;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.GDLocation;
|
import com.arpa.hndahesudintocctmsdriver.bean.GDLocation;
|
||||||
@@ -42,8 +41,6 @@ import com.express.mdp.Callback;
|
|||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||||
|
|
||||||
@@ -87,10 +84,9 @@ public class NewLJUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷新token
|
* 刷新token
|
||||||
*
|
|
||||||
* @param ctx
|
* @param ctx
|
||||||
*/
|
*/
|
||||||
public void refreshToken(Context ctx) {
|
public void refreshToken(Context ctx){
|
||||||
String token = SPUtils.get(ctx, NEW_LJ_TOKEN, "").toString();
|
String token = SPUtils.get(ctx, NEW_LJ_TOKEN, "").toString();
|
||||||
DataManager.getInstance().refreshToken(token)
|
DataManager.getInstance().refreshToken(token)
|
||||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||||
@@ -159,7 +155,7 @@ public class NewLJUtils {
|
|||||||
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
super.onCodeError(mContext, t);
|
super.onCodeError(mContext, t);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage()) ? "运单提货操作异常" : t.getMessage());
|
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage())?"运单操作异常":t.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -204,7 +200,7 @@ public class NewLJUtils {
|
|||||||
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
super.onCodeError(mContext, t);
|
super.onCodeError(mContext, t);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage()) ? "运单卸货操作异常" : t.getMessage());
|
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage())?"运单操作异常":t.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -249,7 +245,7 @@ public class NewLJUtils {
|
|||||||
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
super.onCodeError(mContext, t);
|
super.onCodeError(mContext, t);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage()) ? "运单签收操作异常" : t.getMessage());
|
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage())?"运单操作异常":t.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -294,7 +290,7 @@ public class NewLJUtils {
|
|||||||
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
super.onCodeError(mContext, t);
|
super.onCodeError(mContext, t);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage()) ? "运单回单操作异常" : t.getMessage());
|
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage())?"运单操作异常":t.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -339,7 +335,7 @@ public class NewLJUtils {
|
|||||||
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
super.onCodeError(mContext, t);
|
super.onCodeError(mContext, t);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage()) ? "运单提货照片操作异常" : t.getMessage());
|
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage())?"运单操作异常":t.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -384,7 +380,7 @@ public class NewLJUtils {
|
|||||||
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
super.onCodeError(mContext, t);
|
super.onCodeError(mContext, t);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage()) ? "运单卸货照片操作异常" : t.getMessage());
|
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage())?"运单操作异常":t.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -429,7 +425,7 @@ public class NewLJUtils {
|
|||||||
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
super.onCodeError(mContext, t);
|
super.onCodeError(mContext, t);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage()) ? "运单回单照片操作异常" : t.getMessage());
|
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage())?"运单操作异常":t.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -513,7 +509,7 @@ public class NewLJUtils {
|
|||||||
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
super.onCodeError(mContext, t);
|
super.onCodeError(mContext, t);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage()) ? "同意发票异常" : t.getMessage());
|
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage())?"运单操作异常":t.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -617,7 +613,7 @@ public class NewLJUtils {
|
|||||||
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
super.onCodeError(mContext, t);
|
super.onCodeError(mContext, t);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage()) ? "运单状态查询异常" : t.getMessage());
|
listener.onFailure(t.getCode() + "", TextUtils.isEmpty(t.getMessage())?"运单操作异常":t.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -660,13 +656,10 @@ public class NewLJUtils {
|
|||||||
public void onSuccess(String var1) {
|
public void onSuccess(String var1) {
|
||||||
try {
|
try {
|
||||||
//开启定位服务
|
//开启定位服务
|
||||||
if (BuildConfig.isTest) {
|
|
||||||
Api.setBaseUrl("https://kehui56.cn/api", "https://api.kehui56.cn/api");
|
Api.setBaseUrl("https://kehui56.cn/api", "https://api.kehui56.cn/api");
|
||||||
}
|
|
||||||
String result = Api.startLocationService(act, var1, s -> {
|
String result = Api.startLocationService(act, var1, s -> {
|
||||||
Log.e("位置上报", s);
|
Log.e("位置上报", s);
|
||||||
});
|
});
|
||||||
System.out.println(result);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
@@ -758,51 +751,7 @@ public class NewLJUtils {
|
|||||||
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
super.onCodeError(mContext, t);
|
super.onCodeError(mContext, t);
|
||||||
if (listener != null)
|
if (listener != null)
|
||||||
listener.onFailure(t.getCode(), TextUtils.isEmpty(t.getMessage()) ? "司机异常请联系管理员" : t.getMessage());
|
listener.onFailure(t.getCode(), TextUtils.isEmpty(t.getMessage())?"运单操作异常":t.getMessage());
|
||||||
}
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人车绑定关系
|
|
||||||
* @param ctx
|
|
||||||
* @param idCard
|
|
||||||
* @param listener
|
|
||||||
*/
|
|
||||||
public void trucks(Context ctx, String idCard,String carNum, OnGDDownloadResultListener listener){
|
|
||||||
DataManager.getInstance().trucks(idCard)
|
|
||||||
.subscribeOn(Schedulers.io())
|
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
|
||||||
.subscribe(new BaseObserver(ctx, new RxHttpCallBack<CommonResponseBean>() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(CommonResponseBean<CommonResponseBean> t) {
|
|
||||||
super.onSuccess(t);
|
|
||||||
String[] licensePlateNos = t.getLicensePlateNos();
|
|
||||||
if (listener!=null){
|
|
||||||
if (licensePlateNos.length==0){
|
|
||||||
listener.onFailure(t.getCode(), "该司机暂未绑定任何车辆");
|
|
||||||
}else{
|
|
||||||
boolean isHasCar = false;
|
|
||||||
for (int i = 0; i < licensePlateNos.length; i++) {
|
|
||||||
if (licensePlateNos[i].equals(carNum)){
|
|
||||||
isHasCar = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isHasCar){
|
|
||||||
listener.onSuccess("人车绑定正常");
|
|
||||||
}else{
|
|
||||||
listener.onFailure(t.getCode(), "司机车辆绑定异常");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
|
||||||
super.onCodeError(mContext, t);
|
|
||||||
if (listener != null)
|
|
||||||
listener.onFailure(t.getCode(), TextUtils.isEmpty(t.getMessage()) ? "司机异常" : t.getMessage());
|
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import okhttp3.Call;
|
import okhttp3.Call;
|
||||||
import okhttp3.Callback;
|
import okhttp3.Callback;
|
||||||
@@ -49,7 +48,7 @@ public class RequestUtil {
|
|||||||
|
|
||||||
public static void a1(final String name, Request re, Context con, final Handler hd){
|
public static void a1(final String name, Request re, Context con, final Handler hd){
|
||||||
Log.e("请求开始","........");
|
Log.e("请求开始","........");
|
||||||
OkHttpClient client = new OkHttpClient().newBuilder().connectTimeout(30, TimeUnit.SECONDS)
|
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||||
.build();
|
.build();
|
||||||
client.newCall(re).enqueue( new Callback() {
|
client.newCall(re).enqueue( new Callback() {
|
||||||
@Override
|
@Override
|
||||||
@@ -97,7 +96,7 @@ public class RequestUtil {
|
|||||||
}
|
}
|
||||||
public static void a1s(final String name, Request re, Context con, final Handler hd){
|
public static void a1s(final String name, Request re, Context con, final Handler hd){
|
||||||
Log.e("请求开始","........");
|
Log.e("请求开始","........");
|
||||||
OkHttpClient client = new OkHttpClient().newBuilder().connectTimeout(30, TimeUnit.SECONDS)
|
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||||
.build();
|
.build();
|
||||||
client.newCall(re).enqueue( new Callback() {
|
client.newCall(re).enqueue( new Callback() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:src="@mipmap/btn_back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/close"
|
||||||
|
android:layout_toRightOf="@id/back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:text="关闭" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_marginLeft="70dp"
|
||||||
|
android:layout_marginRight="60dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:textSize="17sp"
|
||||||
|
android:textColor="@color/color_333333"
|
||||||
|
android:text="人脸识别" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<com.esign.esignsdk.h5.view.X5WebView
|
||||||
|
android:id="@+id/webview"
|
||||||
|
android:layout_below="@id/rl_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/rl_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_exception"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/color_white"
|
||||||
|
android:layout_below="@id/rl_title"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone"
|
||||||
|
>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="80dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:src="@mipmap/icon_exception"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/color_282828"
|
||||||
|
android:text="@string/exception_tips"
|
||||||
|
android:gravity="center_horizontal"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver;
|
|
||||||
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hlh
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2021/10/12 16:53
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
public class test1 {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void te(){
|
|
||||||
String s = new BigDecimal("100.000").subtract(new BigDecimal("5")).toString();
|
|
||||||
Log.i("",s);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+5
-41
@@ -1,45 +1,9 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
plugins {
|
||||||
|
id 'com.android.application' version '7.2.2' apply false
|
||||||
|
id 'com.android.library' version '7.2.2' apply false
|
||||||
|
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
|
||||||
|
}
|
||||||
apply from: "compile.gradle"
|
apply from: "compile.gradle"
|
||||||
buildscript {
|
|
||||||
// ext.kotlin_version = "1.5.0"
|
|
||||||
ext.kotlin_version = "1.6.10"
|
|
||||||
repositories {
|
|
||||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
|
||||||
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
|
||||||
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
|
|
||||||
google()
|
|
||||||
jcenter() // 这个
|
|
||||||
mavenCentral()
|
|
||||||
maven { url 'http://developer.huawei.com/repo/'}
|
|
||||||
maven { url 'https://repo1.maven.org/maven2/' }
|
|
||||||
maven {
|
|
||||||
url 'https://maven.aliyun.com/repository/releases'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:4.2.2'
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
||||||
classpath 'com.huawei.agconnect:agcp:1.4.1.300'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
|
||||||
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
|
||||||
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
|
|
||||||
google()
|
|
||||||
jcenter() // Warning: this repository is going to shut down soon
|
|
||||||
mavenCentral()
|
|
||||||
maven {url 'http://developer.huawei.com/repo/'}
|
|
||||||
maven { url 'https://www.jitpack.io' }
|
|
||||||
maven { url 'https://repo1.maven.org/maven2/' }
|
|
||||||
maven {
|
|
||||||
url 'https://maven.aliyun.com/repository/releases'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
#Mon Jul 12 10:16:49 CST 2021
|
#Mon Jul 12 10:16:49 CST 2021
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-6.7.1-bin.zip
|
#distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-6.7.1-bin.zip
|
||||||
|
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-7.3.3-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
// implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||||
implementation 'androidx.core:core-ktx:1.3.1'
|
implementation 'androidx.core:core-ktx:1.3.1'
|
||||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||||
implementation 'com.google.android.material:material:1.2.1'
|
implementation 'com.google.android.material:material:1.2.1'
|
||||||
|
|||||||
@@ -21,16 +21,6 @@ public class CommonResponseBean<T> implements Serializable {
|
|||||||
private String statusCode;
|
private String statusCode;
|
||||||
private boolean success;
|
private boolean success;
|
||||||
|
|
||||||
private String[] LicensePlateNos;
|
|
||||||
|
|
||||||
public String[] getLicensePlateNos() {
|
|
||||||
return LicensePlateNos;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLicensePlateNos(String[] licensePlateNos) {
|
|
||||||
LicensePlateNos = licensePlateNos;
|
|
||||||
}
|
|
||||||
|
|
||||||
private DriverBean driver;
|
private DriverBean driver;
|
||||||
|
|
||||||
public DriverBean getDriver() {
|
public DriverBean getDriver() {
|
||||||
|
|||||||
@@ -1,112 +0,0 @@
|
|||||||
package com.dahe.mylibrary.utils;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.provider.Settings;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName PermissionUtils
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/12/19 14:59
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class PermissionUtils {
|
|
||||||
|
|
||||||
// 私有静态实例,防止被外部实例化
|
|
||||||
private static PermissionUtils instance;
|
|
||||||
|
|
||||||
// 私有构造方法,防止通过 new 关键字创建实例
|
|
||||||
private PermissionUtils() {
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取单例实例
|
|
||||||
public static PermissionUtils getInstance() {
|
|
||||||
if (instance == null) {
|
|
||||||
synchronized (PermissionUtils.class) {
|
|
||||||
if (instance == null) {
|
|
||||||
instance = new PermissionUtils();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据不同手机机型跳转到权限设置页面
|
|
||||||
*
|
|
||||||
* @param context 上下文
|
|
||||||
*/
|
|
||||||
public void goToAppPermissionSettings(Context context) {
|
|
||||||
Intent intent = new Intent();
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
||||||
if (Build.FINGERPRINT.startsWith("Huawei") || Build.BRAND.startsWith("Huawei")) {
|
|
||||||
// 华为手机
|
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
|
||||||
Uri uri = Uri.fromParts("package", context.getPackageName(), null);
|
|
||||||
intent.setData(uri);
|
|
||||||
} else if (Build.FINGERPRINT.startsWith("Xiaomi") || Build.BRAND.startsWith("Xiaomi")) {
|
|
||||||
// 小米手机
|
|
||||||
intent.setAction(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION);
|
|
||||||
Uri uri = Uri.parse("package:" + context.getPackageName());
|
|
||||||
intent.setData(uri);
|
|
||||||
} else if (Build.BRAND.equals("Meizu")) {
|
|
||||||
// 魅族手机
|
|
||||||
intent.setAction("com.meizu.safe.security.SHOW_APPSEC");
|
|
||||||
intent.addCategory(Intent.CATEGORY_DEFAULT);
|
|
||||||
intent.putExtra("packageName", context.getPackageName());
|
|
||||||
} else if (Build.FINGERPRINT.startsWith("OPPO") || Build.BRAND.startsWith("OPPO")) {
|
|
||||||
// OPPO手机
|
|
||||||
try {
|
|
||||||
String pkgName = context.getPackageName();
|
|
||||||
String className = "com.coloros.safecenter.permission.PermissionManagerActivity";
|
|
||||||
intent.setClassName("com.coloros.safecenter", className);
|
|
||||||
intent.putExtra("packageName", pkgName);
|
|
||||||
intent.putExtra("appName", context.getResources().getString(context.getApplicationInfo().labelRes));
|
|
||||||
intent.putExtra("opType", "4"); // 4 表示权限管理页面
|
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
} catch (Exception e) {
|
|
||||||
// 如果找不到OPPO的特定页面,则使用通用页面
|
|
||||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
|
||||||
Uri uri = Uri.fromParts("package", context.getPackageName(), null);
|
|
||||||
intent.setData(uri);
|
|
||||||
}
|
|
||||||
} else if (Build.FINGERPRINT.startsWith("vivo") || Build.BRAND.startsWith("vivo")) {
|
|
||||||
// vivo手机
|
|
||||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
|
||||||
Uri uri = Uri.fromParts("package", context.getPackageName(), null);
|
|
||||||
intent.setData(uri);
|
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
|
|
||||||
} else if (Build.BRAND.equals("samsung")) {
|
|
||||||
// 三星手机
|
|
||||||
try {
|
|
||||||
String pkgName = context.getPackageName();
|
|
||||||
Intent intent2 = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS");
|
|
||||||
intent2.addCategory(Intent.CATEGORY_DEFAULT);
|
|
||||||
intent2.setData(Uri.parse("package:" + pkgName));
|
|
||||||
intent2.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
intent2.putExtra("com.android.providers.media.EXTRA_APP_PACKAGE", pkgName);
|
|
||||||
context.startActivity(intent2);
|
|
||||||
return; // 使用三星特定的页面,不需要继续执行通用代码
|
|
||||||
} catch (Exception e) {
|
|
||||||
// 如果三星特定页面失败,则使用通用页面
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 其他手机使用通用页面
|
|
||||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
|
||||||
Uri uri = Uri.fromParts("package", context.getPackageName(), null);
|
|
||||||
intent.setData(uri);
|
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 低于Android 6.0(M)的版本,使用通用页面
|
|
||||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
|
||||||
Uri uri = Uri.fromParts("package", context.getPackageName(), null);
|
|
||||||
intent.setData(uri);
|
|
||||||
}
|
|
||||||
context.startActivity(intent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -307,27 +307,6 @@ public final class TimeUtil {
|
|||||||
return format.format(date);
|
return format.format(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 验证时间字符串是否是yyyy-MM-dd格式
|
|
||||||
*
|
|
||||||
* @param dateStr 需要验证的时间字符串
|
|
||||||
* @return 如果是yyyy-MM-dd格式,返回true;否则返回false
|
|
||||||
*/
|
|
||||||
public static boolean isValidDate(String dateStr) {
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
|
|
||||||
sdf.setLenient(false); // 设置不宽容,严格解析
|
|
||||||
try {
|
|
||||||
Date date = sdf.parse(dateStr);
|
|
||||||
// 可以进一步验证解析后的日期是否合法(例如:检查月份天数、闰年等)
|
|
||||||
// 但对于简单的格式验证,这一步通常不是必需的
|
|
||||||
return true;
|
|
||||||
} catch (ParseException e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将Date类型转为时间戳
|
* 将Date类型转为时间戳
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,3 +1,27 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
|
||||||
|
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
||||||
|
maven { url "https://jitpack.io" }
|
||||||
|
gradlePluginPortal()
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dependencyResolutionManagement {
|
||||||
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||||
|
repositories {
|
||||||
|
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
|
||||||
|
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
||||||
|
maven { url "https://jitpack.io" }
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rootProject.name = "wangluohuoyun"
|
rootProject.name = "wangluohuoyun"
|
||||||
include ':app'
|
include ':app'
|
||||||
//include ':AliyunVideoCommon'
|
//include ':AliyunVideoCommon'
|
||||||
|
|||||||
Reference in New Issue
Block a user