Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df7a29e54b | ||
|
|
7c63bb1d39 | ||
|
|
8bbae1cf92 | ||
|
|
97e0c5f629 | ||
|
|
95667723e9 | ||
|
|
1fd37db329 | ||
|
|
51075e72c8 | ||
|
|
5bc0a041de | ||
|
|
c11974e9c1 | ||
|
|
ccf70796a3 | ||
|
|
7b3abfeafc | ||
|
|
9dc92a1bc7 | ||
|
|
5fdaa0b213 | ||
|
|
446aed1574 | ||
|
|
6f573aee98 | ||
|
|
15bec78cb8 | ||
|
|
3a44129b03 | ||
|
|
96819e08b4 | ||
|
|
db9990eec0 | ||
|
|
a2be579ae9 | ||
|
|
873e0b81cf | ||
|
|
4cba8a8246 | ||
|
|
ba86cfb234 | ||
|
|
6d2656a1f7 | ||
|
|
d9ec95fbc8 | ||
|
|
3c65d1f691 | ||
|
|
c8b6e75d7d | ||
|
|
0e8ea7147f | ||
|
|
9364706365 |
+5
-3
@@ -33,12 +33,13 @@ android {
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.arpa.hndahesudintocctmsdriver"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 30
|
||||
versionCode 68
|
||||
versionName "3.3.8"
|
||||
versionCode 72
|
||||
versionName "3.4.2"
|
||||
flavorDimensions "CHANNEL_VALUE"
|
||||
flavorDimensions "app_icon"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@@ -105,7 +106,8 @@ android {
|
||||
JPUSH_CHANNEL: "developer-default"//暂时填写默认值即可.
|
||||
]
|
||||
buildConfigField("String", "OPEN_AL_URL", "\"https://oapi-staging.alct56.com\"")
|
||||
buildConfigField("String", "BASE_URL", "\"https://app.test.dahehuoyun.com/api/\"")
|
||||
buildConfigField("String", "BASE_URL", "\"http://192.168.1.118:8080/api/\"")
|
||||
// buildConfigField("String", "BASE_URL", "\"http://linux.local:8080/api/\"")
|
||||
buildConfigField "boolean", "isTest", "true"
|
||||
//APP名称,可以在androidMainfest中引用
|
||||
resValue "string", "appName", "司机测试"
|
||||
|
||||
@@ -380,6 +380,27 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".H5Activity2"
|
||||
android:screenOrientation="portrait"
|
||||
android:launchMode="singleTask">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="demo"
|
||||
android:path="/signBack"
|
||||
android:scheme="esign" />
|
||||
<data
|
||||
android:host="demo"
|
||||
android:path="/realBack"
|
||||
android:scheme="esign" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.push.XService"
|
||||
android:enabled="true"
|
||||
|
||||
@@ -63,8 +63,8 @@ public class App extends Application {
|
||||
}
|
||||
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
||||
// 路由初始化
|
||||
JVerificationInterface.setDebugMode(true);
|
||||
JVerificationInterface.init(this, 5000, (code, msg) -> Log.d("tag", "code = " + code + " msg = " + msg));
|
||||
// JVerificationInterface.setDebugMode(true);
|
||||
// JVerificationInterface.init(this, 5000, (code, msg) -> Log.d("tag", "code = " + code + " msg = " + msg));
|
||||
//友盟
|
||||
//设置非debug版本开启
|
||||
if (!isDebugVersion(con)) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.arpa.hndahesudintocctmsdriver;
|
||||
import android.Manifest;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
@@ -40,10 +41,12 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.SimCenterPop;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.FaceEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.UiAuxiliary;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.home.StartYunDanActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.esign.esignsdk.EsignSdk;
|
||||
import com.esign.esignsdk.h5.base.WBH5FaceVerifySDK;
|
||||
@@ -73,25 +76,38 @@ public class H5Activity extends AppCompatActivity {
|
||||
|
||||
String curUrl = null;
|
||||
boolean viewFile = false;
|
||||
boolean isGoCar = false;
|
||||
|
||||
long time = System.currentTimeMillis();
|
||||
|
||||
ValueCallback<Uri> uploadMessage;
|
||||
private ValueCallback<Uri[]> uploadMessageAboveL;
|
||||
private final static int FILE_CHOOSER_RESULT_CODE = 10000;
|
||||
private Context ctx;
|
||||
private boolean isOk = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
super.setContentView(R.layout.activity_h5);
|
||||
|
||||
ctx = this;
|
||||
|
||||
mWebView = findViewById(R.id.webview);
|
||||
ImageView back = findViewById(R.id.back);
|
||||
TextView close = findViewById(R.id.close);
|
||||
TextView tvTitle = findViewById(R.id.tv_title);
|
||||
WebSettings webSetting = mWebView.getSettings();
|
||||
|
||||
String title = getIntent().getStringExtra("title");
|
||||
if (!TextUtils.isEmpty(title)){
|
||||
tvTitle.setText(title);
|
||||
}
|
||||
|
||||
back.setOnClickListener(v -> {
|
||||
if (isOk){
|
||||
ActivityUtils.finishToActivity(MainActivity.class,false);
|
||||
return;
|
||||
}
|
||||
if (mWebView.canGoBack()) {
|
||||
mWebView.goBack();
|
||||
} else {
|
||||
@@ -100,6 +116,10 @@ public class H5Activity extends AppCompatActivity {
|
||||
});
|
||||
|
||||
close.setOnClickListener(v -> {
|
||||
if (isOk){
|
||||
ActivityUtils.finishToActivity(MainActivity.class,false);
|
||||
return;
|
||||
}
|
||||
if (mWebView.canGoBack()) {
|
||||
mWebView.goBack();
|
||||
} else {
|
||||
@@ -114,6 +134,9 @@ public class H5Activity extends AppCompatActivity {
|
||||
webSetting.setLoadWithOverviewMode(true);
|
||||
webSetting.setAllowFileAccess(true);
|
||||
webSetting.setAppCacheEnabled(true);
|
||||
webSetting.setAllowContentAccess(true);
|
||||
webSetting.setLoadsImagesAutomatically(true);
|
||||
webSetting.setMediaPlaybackRequiresUserGesture(true);
|
||||
String appCachePath = getApplication().getCacheDir().getAbsolutePath();
|
||||
webSetting.setAppCachePath(appCachePath);
|
||||
webSetting.setDatabaseEnabled(true);
|
||||
@@ -180,6 +203,7 @@ public class H5Activity extends AppCompatActivity {
|
||||
private void processExtraData() {
|
||||
|
||||
Intent intent = getIntent();
|
||||
isGoCar = intent.getBooleanExtra("isGoCar", false);
|
||||
Uri uri = intent.getData();
|
||||
Log.e("test", "===" + uri);
|
||||
if (uri != null) {
|
||||
@@ -225,6 +249,17 @@ public class H5Activity extends AppCompatActivity {
|
||||
Uri uri = Uri.parse(url);
|
||||
Log.e("test", "要加载的地址:" + uri.getScheme() + " " + url + " ");
|
||||
if (uri.getScheme().equals("http") || uri.getScheme().equals("https")) {
|
||||
if (isGoCar&&url.startsWith("http://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")){
|
||||
isOk = true;
|
||||
view.loadUrl(url);
|
||||
new MessageUtils().showSimCenPop(ctx, "个人信息上传成功,请添加车辆信息!", "去添加",() -> {
|
||||
Intent in = new Intent(ctx, CertificatesActivity.class);
|
||||
in.putExtra("index", 2);
|
||||
startActivity(in);
|
||||
ActivityUtils.finishToActivity(MainActivity.class,false);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
} else if (uri.getScheme().equals("js") || uri.getScheme().equals("jsbridge")) {
|
||||
@@ -261,6 +296,12 @@ public class H5Activity extends AppCompatActivity {
|
||||
// 实名认证结束 返回按钮/倒计时返回/暂不认证
|
||||
boolean status = uri.getBooleanQueryParameter("status", false);
|
||||
if (status) {
|
||||
//认证成功返回
|
||||
new Handler().postDelayed(() -> {
|
||||
FaceEvent he = new FaceEvent("刷脸成功");
|
||||
EventBus.getDefault().post(he);
|
||||
finish();
|
||||
}, 800);
|
||||
//认证成功返回
|
||||
Toast.makeText(H5Activity.this, "认证成功", Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
@@ -278,6 +319,12 @@ public class H5Activity extends AppCompatActivity {
|
||||
boolean status = uri.getBooleanQueryParameter("status", false);
|
||||
if (status) {
|
||||
//认证成功返回
|
||||
//认证成功返回
|
||||
new Handler().postDelayed(() -> {
|
||||
FaceEvent he = new FaceEvent("刷脸成功");
|
||||
EventBus.getDefault().post(he);
|
||||
finish();
|
||||
}, 800);
|
||||
Toast.makeText(H5Activity.this, "认证成功", Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,485 @@
|
||||
package com.arpa.hndahesudintocctmsdriver;
|
||||
|
||||
import static android.webkit.WebSettings.LOAD_NO_CACHE;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.net.http.SslError;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.webkit.ConsoleMessage;
|
||||
import android.webkit.CookieManager;
|
||||
import android.webkit.CookieSyncManager;
|
||||
import android.webkit.JsPromptResult;
|
||||
import android.webkit.JsResult;
|
||||
import android.webkit.PermissionRequest;
|
||||
import android.webkit.SslErrorHandler;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebResourceError;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.event.FaceEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StatusBar;
|
||||
import com.esign.esignsdk.h5.base.WBH5FaceVerifySDK;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
import pub.devrel.easypermissions.EasyPermissions;
|
||||
import qiu.niorgai.StatusBarCompat;
|
||||
|
||||
/**
|
||||
* @author xingtian on 2019/3/25
|
||||
*/
|
||||
public class H5Activity2 extends AppCompatActivity {
|
||||
|
||||
public static final int REQUEST_PERMISSION_STORAGE = 0x00;
|
||||
public static final int REQUEST_PERMISSION_CAMERA = 0x01;
|
||||
|
||||
public final static String SCHEMA_REAL = "esign://demo/realBack";
|
||||
|
||||
public final static String SCHEMA_SIGN = "esign://demo/signBack";
|
||||
|
||||
private WebView mWebView;
|
||||
|
||||
String curUrl = null;
|
||||
boolean viewFile = false;
|
||||
|
||||
long time = System.currentTimeMillis();
|
||||
|
||||
ValueCallback<Uri> uploadMessage;
|
||||
private ValueCallback<Uri[]> uploadMessageAboveL;
|
||||
private final static int FILE_CHOOSER_RESULT_CODE = 10000;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
super.setContentView(R.layout.activity_h5);
|
||||
StatusBarCompat.setStatusBarColor(this, ContextCompat.getColor(this, R.color.white), 0);
|
||||
StatusBar.changeToLightStatusBar(this); //黑色 下边白色
|
||||
|
||||
mWebView = findViewById(R.id.webview);
|
||||
// ImageView back = findViewById(R.id.back);
|
||||
// TextView close = findViewById(R.id.close);
|
||||
WebSettings webSetting = mWebView.getSettings();
|
||||
|
||||
// back.setOnClickListener(v -> {
|
||||
// if (mWebView.canGoBack()) {
|
||||
// mWebView.goBack();
|
||||
// } else {
|
||||
// finish();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// close.setOnClickListener(v -> {
|
||||
// if (mWebView.canGoBack()) {
|
||||
// mWebView.goBack();
|
||||
// } else {
|
||||
// finish();
|
||||
// }
|
||||
// });
|
||||
|
||||
webSetting.setJavaScriptEnabled(true);
|
||||
webSetting.setDomStorageEnabled(true);
|
||||
// webSetting.setAppCacheMaxSize(1024 * 1024 * 8);
|
||||
webSetting.setUseWideViewPort(true);
|
||||
webSetting.setLoadWithOverviewMode(true);
|
||||
webSetting.setAllowFileAccess(true);
|
||||
// webSetting.setAppCacheEnabled(true);
|
||||
String appCachePath = getApplication().getCacheDir().getAbsolutePath();
|
||||
// webSetting.setAppCachePath(appCachePath);
|
||||
webSetting.setDatabaseEnabled(true);
|
||||
webSetting.setCacheMode(LOAD_NO_CACHE);
|
||||
webSetting.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
WebView.setWebContentsDebuggingEnabled(true);
|
||||
}
|
||||
|
||||
CookieSyncManager.createInstance(this);
|
||||
CookieManager cookieManager = CookieManager.getInstance();
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
cookieManager.setAcceptThirdPartyCookies(mWebView, true);
|
||||
}
|
||||
cookieManager.setAcceptCookie(true);
|
||||
|
||||
|
||||
mWebView.setWebViewClient(new MyWebViewClient());
|
||||
mWebView.setWebChromeClient(new H5FaceWebChromeClient(this));
|
||||
|
||||
WBH5FaceVerifySDK.getInstance().setWebViewSettings(mWebView, getApplicationContext());
|
||||
|
||||
processExtraData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
mWebView.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
mWebView.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
mWebView.stopLoading();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
try {
|
||||
if (mWebView != null) {
|
||||
mWebView.removeAllViews();
|
||||
mWebView.destroy();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
setIntent(intent);
|
||||
processExtraData();
|
||||
}
|
||||
|
||||
private void processExtraData() {
|
||||
|
||||
Intent intent = getIntent();
|
||||
Uri uri = intent.getData();
|
||||
Log.e("test", "===" + uri);
|
||||
if (uri != null) {
|
||||
// 芝麻认证刷脸结束返回获取后续操作页面地址
|
||||
// String callbackUrl = uri.getQueryParameter("callback");
|
||||
|
||||
String callbackUrl = uri.getQueryParameter("realnameUrl");
|
||||
if (!TextUtils.isEmpty(callbackUrl)) {
|
||||
try {
|
||||
mWebView.loadUrl(URLDecoder.decode(callbackUrl, "utf-8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
String url = intent.getStringExtra("url");
|
||||
viewFile = intent.getBooleanExtra("view_file", false);
|
||||
if (url.startsWith("alipay")) {
|
||||
|
||||
try {
|
||||
Intent intent2 = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
startActivity(intent2);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
if (curUrl == null) {
|
||||
curUrl = url;
|
||||
}
|
||||
mWebView.loadUrl(url);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class MyWebViewClient extends WebViewClient {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
if (url == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Uri uri = Uri.parse(url);
|
||||
Log.e("test", "要加载的地址:" + uri.getScheme() + " " + url + " ");
|
||||
if (uri.getScheme().equals("http") || uri.getScheme().equals("https")) {
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
} else if (uri.getScheme().equals("js") || uri.getScheme().equals("jsbridge")) {
|
||||
|
||||
// js://signCallback?signResult=true 签署结果
|
||||
if (uri.getAuthority().equals("signCallback")) {
|
||||
if (viewFile) {
|
||||
view.loadUrl(curUrl);
|
||||
return true;
|
||||
} else {
|
||||
if (url.contains("signResult")) {
|
||||
boolean signResult = uri.getBooleanQueryParameter("signResult", false);
|
||||
Toast.makeText(H5Activity2.this, "签署结果: " + " signResult = " + signResult, Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
String tsignCode = uri.getQueryParameter("tsignCode");
|
||||
if ("0".equals(tsignCode)) {
|
||||
tsignCode = "签署成功";
|
||||
} else {
|
||||
tsignCode = "签署失败";
|
||||
}
|
||||
Toast.makeText(H5Activity2.this, "签署结果: " + tsignCode, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
//js://tsignRealBack?esignAppScheme=esign://app/callback&serviceId=854677892133554052&verifycode=4a52e2af0d0abfb7b285c4f05b5af133&status=true&passed=true
|
||||
//实名结果
|
||||
if (uri.getAuthority().equals("tsignRealBack")) {
|
||||
//实名结果字段
|
||||
if (uri.getQueryParameter("verifycode") != null) {
|
||||
String realVerifyCode = uri.getQueryParameter("verifycode");
|
||||
}
|
||||
// 实名认证结束 返回按钮/倒计时返回/暂不认证
|
||||
boolean status = uri.getBooleanQueryParameter("status", false);
|
||||
if (status) {
|
||||
//认证成功返回
|
||||
new Handler().postDelayed(() -> {
|
||||
FaceEvent he = new FaceEvent("刷脸成功");
|
||||
EventBus.getDefault().post(he);
|
||||
finish();
|
||||
}, 800);
|
||||
Toast.makeText(H5Activity2.this, "认证成功", Toast.LENGTH_LONG).show();
|
||||
// finish();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else if (url.startsWith(SCHEMA_REAL)) {
|
||||
//esign://app/realBack&serviceId=854677892133554052&verifycode=4a52e2af0d0abfb7b285c4f05b5af133&status=true&passed=true
|
||||
|
||||
//实名结果
|
||||
if (uri.getQueryParameter("verifycode") != null) {
|
||||
String realVerifyCode = uri.getQueryParameter("verifycode");
|
||||
}
|
||||
// 实名认证结束 返回按钮/倒计时返回/暂不认证
|
||||
boolean status = uri.getBooleanQueryParameter("status", false);
|
||||
if (status) {
|
||||
//认证成功返回
|
||||
new Handler().postDelayed(() -> {
|
||||
FaceEvent he = new FaceEvent("刷脸成功");
|
||||
EventBus.getDefault().post(he);
|
||||
finish();
|
||||
}, 800);
|
||||
Toast.makeText(H5Activity2.this, "认证成功", Toast.LENGTH_LONG).show();
|
||||
// finish();
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if (url.startsWith(SCHEMA_SIGN)) {
|
||||
// js://signCallback?signResult=true 签署结果
|
||||
if (url.contains("signResult")) {
|
||||
boolean signResult = uri.getBooleanQueryParameter("signResult", false);
|
||||
Toast.makeText(H5Activity2.this, "签署结果: " + " signResult = " + signResult, Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
String tsignCode = uri.getQueryParameter("tsignCode");
|
||||
if ("0".equals(tsignCode)) {
|
||||
//延时1.5秒跳转运单详情页面
|
||||
// new Handler().postDelayed(() -> {
|
||||
// FaceEvent he = new FaceEvent("刷脸成功");
|
||||
// EventBus.getDefault().post(he);
|
||||
// finish();
|
||||
// }, 800);
|
||||
tsignCode = "签署成功";
|
||||
} else {
|
||||
tsignCode = "签署失败";
|
||||
}
|
||||
Toast.makeText(H5Activity2.this, "签署结果: " + tsignCode, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
// finish();
|
||||
return true;
|
||||
} else if (uri.getScheme().equals("alipays")) {
|
||||
// 跳转到支付宝刷脸
|
||||
// alipays://platformapi/startapp?appId=20000067&pd=NO&url=https%3A%2F%2Fzmcustprod.zmxy.com.cn%2Fcertify%2Fbegin.htm%3Ftoken%3DZM201811133000000050500431389414
|
||||
try {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
startActivity(intent);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
|
||||
super.onReceivedError(view, request, error);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
||||
// super.onReceivedSslError(view, handler, error);
|
||||
handler.proceed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
super.onPageStarted(view, url, favicon);
|
||||
time = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadResource(WebView view, String url) {
|
||||
super.onLoadResource(view, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class H5FaceWebChromeClient extends WebChromeClient {
|
||||
private Activity activity;
|
||||
|
||||
public H5FaceWebChromeClient(Activity mActivity) {
|
||||
this.activity = mActivity;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onReceivedTitle(WebView view, String title) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) {
|
||||
return super.onJsPrompt(view, url, message, defaultValue, result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onJsConfirm(WebView view, String url, String message, JsResult result) {
|
||||
return super.onJsConfirm(view, url, message, result);
|
||||
}
|
||||
|
||||
@TargetApi(8)
|
||||
@Override
|
||||
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
|
||||
return super.onConsoleMessage(consoleMessage);
|
||||
}
|
||||
|
||||
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
|
||||
if (WBH5FaceVerifySDK.getInstance().recordVideoForApiBelow21(uploadMsg, acceptType, activity)) {
|
||||
return;
|
||||
}
|
||||
uploadMessage = uploadMsg;
|
||||
}
|
||||
|
||||
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) {
|
||||
if (WBH5FaceVerifySDK.getInstance().recordVideoForApiBelow21(uploadMsg, acceptType, activity)) {
|
||||
return;
|
||||
}
|
||||
uploadMessage = uploadMessage;
|
||||
}
|
||||
|
||||
@TargetApi(21)
|
||||
@Override
|
||||
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
|
||||
if (WBH5FaceVerifySDK.getInstance().recordVideoForApi21(webView, filePathCallback, activity, fileChooserParams)) {
|
||||
return true;
|
||||
}
|
||||
uploadMessageAboveL = filePathCallback;
|
||||
recordVideo(H5Activity2.this);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPermissionRequest(PermissionRequest request) {
|
||||
request.grant(request.getResources());
|
||||
request.getOrigin();
|
||||
}
|
||||
}
|
||||
|
||||
public void recordVideo(Activity activity) {
|
||||
if (EasyPermissions.hasPermissions(activity, Manifest.permission.CAMERA)) {
|
||||
try {
|
||||
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.putExtra("android.intent.extras.CAMERA_FACING", 1); // 调用前置摄像头
|
||||
activity.startActivityForResult(intent, FILE_CHOOSER_RESULT_CODE);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
EasyPermissions.requestPermissions(activity, "请同意使用相机功能", REQUEST_PERMISSION_CAMERA, Manifest.permission.CAMERA);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
if (mWebView.canGoBack()) {
|
||||
mWebView.goBack();
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (WBH5FaceVerifySDK.getInstance().receiveH5FaceVerifyResult(requestCode, resultCode, data)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (requestCode == FILE_CHOOSER_RESULT_CODE) {
|
||||
if (null == uploadMessage && null == uploadMessageAboveL) {
|
||||
return;
|
||||
}
|
||||
Uri result = data == null || resultCode != RESULT_OK ? null : data.getData();
|
||||
if (uploadMessageAboveL != null) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
uploadMessageAboveL.onReceiveValue(new Uri[]{result});
|
||||
uploadMessageAboveL = null;
|
||||
} else {
|
||||
uploadMessageAboveL.onReceiveValue(new Uri[]{});
|
||||
uploadMessageAboveL = null;
|
||||
}
|
||||
} else if (uploadMessage != null) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
uploadMessage.onReceiveValue(result);
|
||||
uploadMessage = null;
|
||||
} else {
|
||||
uploadMessage.onReceiveValue(Uri.EMPTY);
|
||||
uploadMessage = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
WBH5FaceVerifySDK.getInstance().recordVideo(this);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,386 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName CarInfoBean2
|
||||
* @Author john
|
||||
* @Date 2024/11/20 15:43
|
||||
* @Description TODO
|
||||
*/
|
||||
public class CarInfoBean2 implements Serializable {
|
||||
|
||||
|
||||
private int code;
|
||||
private DataDTO data;
|
||||
private String msg;
|
||||
private String remark;
|
||||
private int res;
|
||||
private boolean success;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public DataDTO getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(DataDTO data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
private String allAuality;
|
||||
private String allCapacity;
|
||||
private String approvedCapacity;
|
||||
private String auditStatus;
|
||||
private String auditTime;
|
||||
private String backImage;
|
||||
private String backStatus;
|
||||
private String backTime;
|
||||
private String carId;
|
||||
private String carNumber;
|
||||
private String checkRecord;
|
||||
private String createTime;
|
||||
private String dateIssue;
|
||||
private String engineNumber;
|
||||
private String fileNumber;
|
||||
private String frontImage;
|
||||
private String frontStatus;
|
||||
private String frontTime;
|
||||
private String fuelType;
|
||||
private String id;
|
||||
private String model;
|
||||
private String nature;
|
||||
private String organizationName;
|
||||
private String owner;
|
||||
private String personCapacity;
|
||||
private String registerDate;
|
||||
private String remark;
|
||||
private String size;
|
||||
private String threeImage;
|
||||
private String threeImageStatus;
|
||||
private String towAuality;
|
||||
private String trailer;
|
||||
private String type;
|
||||
private String vehicleAxis;
|
||||
private String vehicleNumber;
|
||||
|
||||
public String getAllAuality() {
|
||||
return allAuality;
|
||||
}
|
||||
|
||||
public void setAllAuality(String allAuality) {
|
||||
this.allAuality = allAuality;
|
||||
}
|
||||
|
||||
public String getAllCapacity() {
|
||||
return allCapacity;
|
||||
}
|
||||
|
||||
public void setAllCapacity(String allCapacity) {
|
||||
this.allCapacity = allCapacity;
|
||||
}
|
||||
|
||||
public String getApprovedCapacity() {
|
||||
return approvedCapacity;
|
||||
}
|
||||
|
||||
public void setApprovedCapacity(String approvedCapacity) {
|
||||
this.approvedCapacity = approvedCapacity;
|
||||
}
|
||||
|
||||
public String getAuditStatus() {
|
||||
return auditStatus;
|
||||
}
|
||||
|
||||
public void setAuditStatus(String auditStatus) {
|
||||
this.auditStatus = auditStatus;
|
||||
}
|
||||
|
||||
public String getAuditTime() {
|
||||
return auditTime;
|
||||
}
|
||||
|
||||
public void setAuditTime(String auditTime) {
|
||||
this.auditTime = auditTime;
|
||||
}
|
||||
|
||||
public String getBackImage() {
|
||||
return backImage;
|
||||
}
|
||||
|
||||
public void setBackImage(String backImage) {
|
||||
this.backImage = backImage;
|
||||
}
|
||||
|
||||
public String getBackStatus() {
|
||||
return backStatus;
|
||||
}
|
||||
|
||||
public void setBackStatus(String backStatus) {
|
||||
this.backStatus = backStatus;
|
||||
}
|
||||
|
||||
public String getBackTime() {
|
||||
return backTime;
|
||||
}
|
||||
|
||||
public void setBackTime(String backTime) {
|
||||
this.backTime = backTime;
|
||||
}
|
||||
|
||||
public String getCarId() {
|
||||
return carId;
|
||||
}
|
||||
|
||||
public void setCarId(String carId) {
|
||||
this.carId = carId;
|
||||
}
|
||||
|
||||
public String getCarNumber() {
|
||||
return carNumber;
|
||||
}
|
||||
|
||||
public void setCarNumber(String carNumber) {
|
||||
this.carNumber = carNumber;
|
||||
}
|
||||
|
||||
public String getCheckRecord() {
|
||||
return checkRecord;
|
||||
}
|
||||
|
||||
public void setCheckRecord(String checkRecord) {
|
||||
this.checkRecord = checkRecord;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getDateIssue() {
|
||||
return dateIssue;
|
||||
}
|
||||
|
||||
public void setDateIssue(String dateIssue) {
|
||||
this.dateIssue = dateIssue;
|
||||
}
|
||||
|
||||
public String getEngineNumber() {
|
||||
return engineNumber;
|
||||
}
|
||||
|
||||
public void setEngineNumber(String engineNumber) {
|
||||
this.engineNumber = engineNumber;
|
||||
}
|
||||
|
||||
public String getFileNumber() {
|
||||
return fileNumber;
|
||||
}
|
||||
|
||||
public void setFileNumber(String fileNumber) {
|
||||
this.fileNumber = fileNumber;
|
||||
}
|
||||
|
||||
public String getFrontImage() {
|
||||
return frontImage;
|
||||
}
|
||||
|
||||
public void setFrontImage(String frontImage) {
|
||||
this.frontImage = frontImage;
|
||||
}
|
||||
|
||||
public String getFrontStatus() {
|
||||
return frontStatus;
|
||||
}
|
||||
|
||||
public void setFrontStatus(String frontStatus) {
|
||||
this.frontStatus = frontStatus;
|
||||
}
|
||||
|
||||
public String getFrontTime() {
|
||||
return frontTime;
|
||||
}
|
||||
|
||||
public void setFrontTime(String frontTime) {
|
||||
this.frontTime = frontTime;
|
||||
}
|
||||
|
||||
public String getFuelType() {
|
||||
return fuelType;
|
||||
}
|
||||
|
||||
public void setFuelType(String fuelType) {
|
||||
this.fuelType = fuelType;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setModel(String model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getNature() {
|
||||
return nature;
|
||||
}
|
||||
|
||||
public void setNature(String nature) {
|
||||
this.nature = nature;
|
||||
}
|
||||
|
||||
public String getOrganizationName() {
|
||||
return organizationName;
|
||||
}
|
||||
|
||||
public void setOrganizationName(String organizationName) {
|
||||
this.organizationName = organizationName;
|
||||
}
|
||||
|
||||
public String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public String getPersonCapacity() {
|
||||
return personCapacity;
|
||||
}
|
||||
|
||||
public void setPersonCapacity(String personCapacity) {
|
||||
this.personCapacity = personCapacity;
|
||||
}
|
||||
|
||||
public String getRegisterDate() {
|
||||
return registerDate;
|
||||
}
|
||||
|
||||
public void setRegisterDate(String registerDate) {
|
||||
this.registerDate = registerDate;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(String size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public String getThreeImage() {
|
||||
return threeImage;
|
||||
}
|
||||
|
||||
public void setThreeImage(String threeImage) {
|
||||
this.threeImage = threeImage;
|
||||
}
|
||||
|
||||
public String getThreeImageStatus() {
|
||||
return threeImageStatus;
|
||||
}
|
||||
|
||||
public void setThreeImageStatus(String threeImageStatus) {
|
||||
this.threeImageStatus = threeImageStatus;
|
||||
}
|
||||
|
||||
public String getTowAuality() {
|
||||
return towAuality;
|
||||
}
|
||||
|
||||
public void setTowAuality(String towAuality) {
|
||||
this.towAuality = towAuality;
|
||||
}
|
||||
|
||||
public String getTrailer() {
|
||||
return trailer;
|
||||
}
|
||||
|
||||
public void setTrailer(String trailer) {
|
||||
this.trailer = trailer;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getVehicleAxis() {
|
||||
return vehicleAxis;
|
||||
}
|
||||
|
||||
public void setVehicleAxis(String vehicleAxis) {
|
||||
this.vehicleAxis = vehicleAxis;
|
||||
}
|
||||
|
||||
public String getVehicleNumber() {
|
||||
return vehicleNumber;
|
||||
}
|
||||
|
||||
public void setVehicleNumber(String vehicleNumber) {
|
||||
this.vehicleNumber = vehicleNumber;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,12 +57,15 @@ public class DriverAuthDataBean {
|
||||
private String idcardValidity;
|
||||
private String dirverAllowType;
|
||||
private int idcardPhoto;
|
||||
private String bankImgUrl;
|
||||
private String bankName;
|
||||
private String cardNo;
|
||||
private int idcardBackPhoto;
|
||||
private Object idcardPhotoHold;
|
||||
private String idcardAddress;
|
||||
private String idcardName;
|
||||
private int idcardSex;
|
||||
private int idCardStatus;
|
||||
private int idCardStatus;//身份证认证状态;-1未提交 0待认证 1认证通过 2认证失败
|
||||
private int driverLicenseStatus;
|
||||
private int qualificationCertificateStatus;
|
||||
private String idCardReason;
|
||||
@@ -141,6 +144,30 @@ public class DriverAuthDataBean {
|
||||
private Object mbindStatus;
|
||||
private Object mreason;
|
||||
|
||||
public String getBankImgUrl() {
|
||||
return bankImgUrl;
|
||||
}
|
||||
|
||||
public void setBankImgUrl(String bankImgUrl) {
|
||||
this.bankImgUrl = bankImgUrl;
|
||||
}
|
||||
|
||||
public String getBankName() {
|
||||
return bankName;
|
||||
}
|
||||
|
||||
public void setBankName(String bankName) {
|
||||
this.bankName = bankName;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName DriverUpBean
|
||||
* @Author john
|
||||
* @Date 2024/11/20 09:20
|
||||
* @Description TODO
|
||||
*/
|
||||
public class DriverUpBean implements Serializable {
|
||||
|
||||
private String frontImageUrl;
|
||||
private String backImageUrl;
|
||||
private String carNumber;
|
||||
private String type;
|
||||
private String owner;
|
||||
private String vehicleNumber;
|
||||
private String carLong;
|
||||
private String carWidth;
|
||||
private String carHeight;
|
||||
private String carId;
|
||||
private String carPlateColor;
|
||||
private String carEnergyTyp;
|
||||
|
||||
private DataDTO zjObj;
|
||||
|
||||
public String getCarId() {
|
||||
return carId;
|
||||
}
|
||||
|
||||
public void setCarId(String carId) {
|
||||
this.carId = carId;
|
||||
}
|
||||
|
||||
public String getFrontImageUrl() {
|
||||
return frontImageUrl;
|
||||
}
|
||||
|
||||
public void setFrontImageUrl(String frontImageUrl) {
|
||||
this.frontImageUrl = frontImageUrl;
|
||||
}
|
||||
|
||||
public String getBackImageUrl() {
|
||||
return backImageUrl;
|
||||
}
|
||||
|
||||
public void setBackImageUrl(String backImageUrl) {
|
||||
this.backImageUrl = backImageUrl;
|
||||
}
|
||||
|
||||
public String getCarNumber() {
|
||||
return carNumber;
|
||||
}
|
||||
|
||||
public void setCarNumber(String carNumber) {
|
||||
this.carNumber = carNumber;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public String getVehicleNumber() {
|
||||
return vehicleNumber;
|
||||
}
|
||||
|
||||
public void setVehicleNumber(String vehicleNumber) {
|
||||
this.vehicleNumber = vehicleNumber;
|
||||
}
|
||||
|
||||
public String getCarLong() {
|
||||
return carLong;
|
||||
}
|
||||
|
||||
public void setCarLong(String carLong) {
|
||||
this.carLong = carLong;
|
||||
}
|
||||
|
||||
public String getCarWidth() {
|
||||
return carWidth;
|
||||
}
|
||||
|
||||
public void setCarWidth(String carWidth) {
|
||||
this.carWidth = carWidth;
|
||||
}
|
||||
|
||||
public String getCarHeight() {
|
||||
return carHeight;
|
||||
}
|
||||
|
||||
public void setCarHeight(String carHeight) {
|
||||
this.carHeight = carHeight;
|
||||
}
|
||||
|
||||
public String getCarPlateColor() {
|
||||
return carPlateColor;
|
||||
}
|
||||
|
||||
public void setCarPlateColor(String carPlateColor) {
|
||||
this.carPlateColor = carPlateColor;
|
||||
}
|
||||
|
||||
public String getCarEnergyTyp() {
|
||||
return carEnergyTyp;
|
||||
}
|
||||
|
||||
public void setCarEnergyTyp(String carEnergyTyp) {
|
||||
this.carEnergyTyp = carEnergyTyp;
|
||||
}
|
||||
|
||||
public DataDTO getZjObj() {
|
||||
return zjObj;
|
||||
}
|
||||
|
||||
public void setZjObj(DataDTO zjObj) {
|
||||
this.zjObj = zjObj;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
|
||||
private String approveTon;
|
||||
private String recordId;
|
||||
private String note;
|
||||
private String passengers;
|
||||
private String vclDrwTn;
|
||||
private String overallDimen;
|
||||
private String vclN;
|
||||
private String enTn;
|
||||
private String loadTon;
|
||||
private String inspectionRecord;
|
||||
private String barCode;
|
||||
private String issuingAuthority;
|
||||
private String regTime;
|
||||
private String address;
|
||||
private String ownerName;
|
||||
private String engine;
|
||||
private String vin;
|
||||
private String licensedateOfissue;
|
||||
private String vcltype;
|
||||
private String vclBrand;
|
||||
private String natureOfUsage;
|
||||
|
||||
public String getApproveTon() {
|
||||
return approveTon;
|
||||
}
|
||||
|
||||
public void setApproveTon(String approveTon) {
|
||||
this.approveTon = approveTon;
|
||||
}
|
||||
|
||||
public String getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setRecordId(String recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public String getPassengers() {
|
||||
return passengers;
|
||||
}
|
||||
|
||||
public void setPassengers(String passengers) {
|
||||
this.passengers = passengers;
|
||||
}
|
||||
|
||||
public String getVclDrwTn() {
|
||||
return vclDrwTn;
|
||||
}
|
||||
|
||||
public void setVclDrwTn(String vclDrwTn) {
|
||||
this.vclDrwTn = vclDrwTn;
|
||||
}
|
||||
|
||||
public String getOverallDimen() {
|
||||
return overallDimen;
|
||||
}
|
||||
|
||||
public void setOverallDimen(String overallDimen) {
|
||||
this.overallDimen = overallDimen;
|
||||
}
|
||||
|
||||
public String getVclN() {
|
||||
return vclN;
|
||||
}
|
||||
|
||||
public void setVclN(String vclN) {
|
||||
this.vclN = vclN;
|
||||
}
|
||||
|
||||
public String getEnTn() {
|
||||
return enTn;
|
||||
}
|
||||
|
||||
public void setEnTn(String enTn) {
|
||||
this.enTn = enTn;
|
||||
}
|
||||
|
||||
public String getLoadTon() {
|
||||
return loadTon;
|
||||
}
|
||||
|
||||
public void setLoadTon(String loadTon) {
|
||||
this.loadTon = loadTon;
|
||||
}
|
||||
|
||||
public String getInspectionRecord() {
|
||||
return inspectionRecord;
|
||||
}
|
||||
|
||||
public void setInspectionRecord(String inspectionRecord) {
|
||||
this.inspectionRecord = inspectionRecord;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return barCode;
|
||||
}
|
||||
|
||||
public void setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getRegTime() {
|
||||
return regTime;
|
||||
}
|
||||
|
||||
public void setRegTime(String regTime) {
|
||||
this.regTime = regTime;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getEngine() {
|
||||
return engine;
|
||||
}
|
||||
|
||||
public void setEngine(String engine) {
|
||||
this.engine = engine;
|
||||
}
|
||||
|
||||
public String getVin() {
|
||||
return vin;
|
||||
}
|
||||
|
||||
public void setVin(String vin) {
|
||||
this.vin = vin;
|
||||
}
|
||||
|
||||
public String getLicensedateOfissue() {
|
||||
return licensedateOfissue;
|
||||
}
|
||||
|
||||
public void setLicensedateOfissue(String licensedateOfissue) {
|
||||
this.licensedateOfissue = licensedateOfissue;
|
||||
}
|
||||
|
||||
public String getVcltype() {
|
||||
return vcltype;
|
||||
}
|
||||
|
||||
public void setVcltype(String vcltype) {
|
||||
this.vcltype = vcltype;
|
||||
}
|
||||
|
||||
public String getVclBrand() {
|
||||
return vclBrand;
|
||||
}
|
||||
|
||||
public void setVclBrand(String vclBrand) {
|
||||
this.vclBrand = vclBrand;
|
||||
}
|
||||
|
||||
public String getNatureOfUsage() {
|
||||
return natureOfUsage;
|
||||
}
|
||||
|
||||
public void setNatureOfUsage(String natureOfUsage) {
|
||||
this.natureOfUsage = natureOfUsage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,33 @@ public class OCRBankBean {
|
||||
private String validDate;
|
||||
private String bankCardType;
|
||||
private String bankName;
|
||||
private String expiryDate;
|
||||
private String type;
|
||||
private String cardNumber;
|
||||
|
||||
public String getExpiryDate() {
|
||||
return expiryDate;
|
||||
}
|
||||
|
||||
public void setExpiryDate(String expiryDate) {
|
||||
this.expiryDate = expiryDate;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getCardNumber() {
|
||||
return cardNumber;
|
||||
}
|
||||
|
||||
public void setCardNumber(String cardNumber) {
|
||||
this.cardNumber = cardNumber;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
||||
@@ -60,6 +60,33 @@ public class OCRCardBackBean {
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
private String organizationName;
|
||||
private String validFrom;
|
||||
private String validTo;
|
||||
private String issue;
|
||||
|
||||
public String getIssue() {
|
||||
return issue;
|
||||
}
|
||||
|
||||
public void setIssue(String issue) {
|
||||
this.issue = issue;
|
||||
}
|
||||
|
||||
public String getValidFrom() {
|
||||
return validFrom;
|
||||
}
|
||||
|
||||
public void setValidFrom(String validFrom) {
|
||||
this.validFrom = validFrom;
|
||||
}
|
||||
|
||||
public String getValidTo() {
|
||||
return validTo;
|
||||
}
|
||||
|
||||
public void setValidTo(String validTo) {
|
||||
this.validTo = validTo;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
||||
@@ -63,6 +63,51 @@ public class OCRCardBean {
|
||||
private String cardId;
|
||||
private String birthday;
|
||||
private String sex;
|
||||
private String ethnicity;
|
||||
private String idcard;
|
||||
private String birth;
|
||||
private String validFrom;
|
||||
private String validTo;
|
||||
|
||||
public String getEthnicity() {
|
||||
return ethnicity;
|
||||
}
|
||||
|
||||
public void setEthnicity(String ethnicity) {
|
||||
this.ethnicity = ethnicity;
|
||||
}
|
||||
|
||||
public String getIdcard() {
|
||||
return idcard;
|
||||
}
|
||||
|
||||
public void setIdcard(String idcard) {
|
||||
this.idcard = idcard;
|
||||
}
|
||||
|
||||
public String getBirth() {
|
||||
return birth;
|
||||
}
|
||||
|
||||
public void setBirth(String birth) {
|
||||
this.birth = birth;
|
||||
}
|
||||
|
||||
public String getValidFrom() {
|
||||
return validFrom;
|
||||
}
|
||||
|
||||
public void setValidFrom(String validFrom) {
|
||||
this.validFrom = validFrom;
|
||||
}
|
||||
|
||||
public String getValidTo() {
|
||||
return validTo;
|
||||
}
|
||||
|
||||
public void setValidTo(String validTo) {
|
||||
this.validTo = validTo;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
||||
+36
@@ -58,6 +58,42 @@ public class OCRDrivingLicenseBackBean {
|
||||
private int id;
|
||||
private String url;
|
||||
private String archivesName;
|
||||
private String fileNumber;
|
||||
private String record;
|
||||
private String name;
|
||||
private String issuingAuthority;
|
||||
|
||||
public String getFileNumber() {
|
||||
return fileNumber;
|
||||
}
|
||||
|
||||
public void setFileNumber(String fileNumber) {
|
||||
this.fileNumber = fileNumber;
|
||||
}
|
||||
|
||||
public String getRecord() {
|
||||
return record;
|
||||
}
|
||||
|
||||
public void setRecord(String record) {
|
||||
this.record = record;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
||||
@@ -68,6 +68,70 @@ public class OCRDrivingLicenseBean {
|
||||
private String allowType;
|
||||
private String sex;
|
||||
private String startTime;
|
||||
private String beginDate;
|
||||
private String endDate;
|
||||
private String firstGetDocDate;
|
||||
private String idcard;
|
||||
private String quasiDriveType;
|
||||
private String issuingAuthority;
|
||||
private String nationality;
|
||||
|
||||
|
||||
public String getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(String beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getFirstGetDocDate() {
|
||||
return firstGetDocDate;
|
||||
}
|
||||
|
||||
public void setFirstGetDocDate(String firstGetDocDate) {
|
||||
this.firstGetDocDate = firstGetDocDate;
|
||||
}
|
||||
|
||||
public String getIdcard() {
|
||||
return idcard;
|
||||
}
|
||||
|
||||
public void setIdcard(String idcard) {
|
||||
this.idcard = idcard;
|
||||
}
|
||||
|
||||
public String getQuasiDriveType() {
|
||||
return quasiDriveType;
|
||||
}
|
||||
|
||||
public void setQuasiDriveType(String quasiDriveType) {
|
||||
this.quasiDriveType = quasiDriveType;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getNationality() {
|
||||
return nationality;
|
||||
}
|
||||
|
||||
public void setNationality(String nationality) {
|
||||
this.nationality = nationality;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName OCRQualiBean
|
||||
* @Author john
|
||||
* @Date 2024/11/19 15:53
|
||||
* @Description TODO
|
||||
*/
|
||||
public class OCRQualiBean {
|
||||
|
||||
|
||||
private int code;
|
||||
private DataDTO data;
|
||||
private String msg;
|
||||
private String remark;
|
||||
private int res;
|
||||
private boolean success;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public DataDTO getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(DataDTO data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
private String address;
|
||||
private List<QualificationCategoryListDTO> qualification_category_list;
|
||||
private String nationality;
|
||||
private String issuing_authority;
|
||||
private String sex;
|
||||
private String birth_date;
|
||||
private String integrity_assessment_info;
|
||||
private String name;
|
||||
private String driving_class;
|
||||
private String certificate_number;
|
||||
private String continuing_education_info;
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public List<QualificationCategoryListDTO> getQualification_category_list() {
|
||||
return qualification_category_list;
|
||||
}
|
||||
|
||||
public void setQualification_category_list(List<QualificationCategoryListDTO> qualification_category_list) {
|
||||
this.qualification_category_list = qualification_category_list;
|
||||
}
|
||||
|
||||
public String getNationality() {
|
||||
return nationality;
|
||||
}
|
||||
|
||||
public void setNationality(String nationality) {
|
||||
this.nationality = nationality;
|
||||
}
|
||||
|
||||
public String getIssuing_authority() {
|
||||
return issuing_authority;
|
||||
}
|
||||
|
||||
public void setIssuing_authority(String issuing_authority) {
|
||||
this.issuing_authority = issuing_authority;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getBirth_date() {
|
||||
return birth_date;
|
||||
}
|
||||
|
||||
public void setBirth_date(String birth_date) {
|
||||
this.birth_date = birth_date;
|
||||
}
|
||||
|
||||
public String getIntegrity_assessment_info() {
|
||||
return integrity_assessment_info;
|
||||
}
|
||||
|
||||
public void setIntegrity_assessment_info(String integrity_assessment_info) {
|
||||
this.integrity_assessment_info = integrity_assessment_info;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDriving_class() {
|
||||
return driving_class;
|
||||
}
|
||||
|
||||
public void setDriving_class(String driving_class) {
|
||||
this.driving_class = driving_class;
|
||||
}
|
||||
|
||||
public String getCertificate_number() {
|
||||
return certificate_number;
|
||||
}
|
||||
|
||||
public void setCertificate_number(String certificate_number) {
|
||||
this.certificate_number = certificate_number;
|
||||
}
|
||||
|
||||
public String getContinuing_education_info() {
|
||||
return continuing_education_info;
|
||||
}
|
||||
|
||||
public void setContinuing_education_info(String continuing_education_info) {
|
||||
this.continuing_education_info = continuing_education_info;
|
||||
}
|
||||
|
||||
public static class QualificationCategoryListDTO {
|
||||
private String issue_date;
|
||||
private String expiry_date;
|
||||
private String category;
|
||||
|
||||
public String getIssue_date() {
|
||||
return issue_date;
|
||||
}
|
||||
|
||||
public void setIssue_date(String issue_date) {
|
||||
this.issue_date = issue_date;
|
||||
}
|
||||
|
||||
public String getExpiry_date() {
|
||||
return expiry_date;
|
||||
}
|
||||
|
||||
public void setExpiry_date(String expiry_date) {
|
||||
this.expiry_date = expiry_date;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
/**
|
||||
* @ClassName OCRRoadBean
|
||||
* @Author john
|
||||
* @Date 2024/11/19 17:05
|
||||
* @Description TODO
|
||||
*/
|
||||
public class OCRRoadBean {
|
||||
|
||||
|
||||
private int code;
|
||||
private DataDTO data;
|
||||
private String msg;
|
||||
private String remark;
|
||||
private int res;
|
||||
private boolean success;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public DataDTO getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(DataDTO data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
private String vehicleWeight;
|
||||
private String issuingAuthority;
|
||||
private String ownerName;
|
||||
private String businessCertificate;
|
||||
private String economicType;
|
||||
private String businessScope;
|
||||
private String vehicleNumber;
|
||||
private String licenseNumber;
|
||||
private String vehicleSize;
|
||||
private String ownerAddress;
|
||||
private String issueDate;
|
||||
private String vehicleType;
|
||||
|
||||
public String getVehicleWeight() {
|
||||
return vehicleWeight;
|
||||
}
|
||||
|
||||
public void setVehicleWeight(String vehicleWeight) {
|
||||
this.vehicleWeight = vehicleWeight;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getBusinessCertificate() {
|
||||
return businessCertificate;
|
||||
}
|
||||
|
||||
public void setBusinessCertificate(String businessCertificate) {
|
||||
this.businessCertificate = businessCertificate;
|
||||
}
|
||||
|
||||
public String getEconomicType() {
|
||||
return economicType;
|
||||
}
|
||||
|
||||
public void setEconomicType(String economicType) {
|
||||
this.economicType = economicType;
|
||||
}
|
||||
|
||||
public String getBusinessScope() {
|
||||
return businessScope;
|
||||
}
|
||||
|
||||
public void setBusinessScope(String businessScope) {
|
||||
this.businessScope = businessScope;
|
||||
}
|
||||
|
||||
public String getVehicleNumber() {
|
||||
return vehicleNumber;
|
||||
}
|
||||
|
||||
public void setVehicleNumber(String vehicleNumber) {
|
||||
this.vehicleNumber = vehicleNumber;
|
||||
}
|
||||
|
||||
public String getLicenseNumber() {
|
||||
return licenseNumber;
|
||||
}
|
||||
|
||||
public void setLicenseNumber(String licenseNumber) {
|
||||
this.licenseNumber = licenseNumber;
|
||||
}
|
||||
|
||||
public String getVehicleSize() {
|
||||
return vehicleSize;
|
||||
}
|
||||
|
||||
public void setVehicleSize(String vehicleSize) {
|
||||
this.vehicleSize = vehicleSize;
|
||||
}
|
||||
|
||||
public String getOwnerAddress() {
|
||||
return ownerAddress;
|
||||
}
|
||||
|
||||
public void setOwnerAddress(String ownerAddress) {
|
||||
this.ownerAddress = ownerAddress;
|
||||
}
|
||||
|
||||
public String getIssueDate() {
|
||||
return issueDate;
|
||||
}
|
||||
|
||||
public void setIssueDate(String issueDate) {
|
||||
this.issueDate = issueDate;
|
||||
}
|
||||
|
||||
public String getVehicleType() {
|
||||
return vehicleType;
|
||||
}
|
||||
|
||||
public void setVehicleType(String vehicleType) {
|
||||
this.vehicleType = vehicleType;
|
||||
}
|
||||
}
|
||||
}
|
||||
+108
@@ -71,6 +71,114 @@ public class OCRVehicleBackLicenseBean {
|
||||
private String fileNumber;
|
||||
private String carNumber;
|
||||
private int licenseId;
|
||||
private String note;
|
||||
private String passengers;
|
||||
private String vclDrwTn;
|
||||
private String overallDimen;
|
||||
private String vclN;
|
||||
private String enTn;
|
||||
private String loadTon;
|
||||
private String inspectionRecord;
|
||||
private String barCode;
|
||||
private String approveTon;
|
||||
private String recordId;
|
||||
private String issuingAuthority;
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public String getPassengers() {
|
||||
return passengers;
|
||||
}
|
||||
|
||||
public void setPassengers(String passengers) {
|
||||
this.passengers = passengers;
|
||||
}
|
||||
|
||||
public String getVclDrwTn() {
|
||||
return vclDrwTn;
|
||||
}
|
||||
|
||||
public void setVclDrwTn(String vclDrwTn) {
|
||||
this.vclDrwTn = vclDrwTn;
|
||||
}
|
||||
|
||||
public String getOverallDimen() {
|
||||
return overallDimen;
|
||||
}
|
||||
|
||||
public void setOverallDimen(String overallDimen) {
|
||||
this.overallDimen = overallDimen;
|
||||
}
|
||||
|
||||
public String getVclN() {
|
||||
return vclN;
|
||||
}
|
||||
|
||||
public void setVclN(String vclN) {
|
||||
this.vclN = vclN;
|
||||
}
|
||||
|
||||
public String getEnTn() {
|
||||
return enTn;
|
||||
}
|
||||
|
||||
public void setEnTn(String enTn) {
|
||||
this.enTn = enTn;
|
||||
}
|
||||
|
||||
public String getLoadTon() {
|
||||
return loadTon;
|
||||
}
|
||||
|
||||
public void setLoadTon(String loadTon) {
|
||||
this.loadTon = loadTon;
|
||||
}
|
||||
|
||||
public String getInspectionRecord() {
|
||||
return inspectionRecord;
|
||||
}
|
||||
|
||||
public void setInspectionRecord(String inspectionRecord) {
|
||||
this.inspectionRecord = inspectionRecord;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return barCode;
|
||||
}
|
||||
|
||||
public void setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public String getApproveTon() {
|
||||
return approveTon;
|
||||
}
|
||||
|
||||
public void setApproveTon(String approveTon) {
|
||||
this.approveTon = approveTon;
|
||||
}
|
||||
|
||||
public String getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setRecordId(String recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getIsSave() {
|
||||
return isSave;
|
||||
|
||||
@@ -63,6 +63,96 @@ public class OCRVehicleLicenseBean {
|
||||
private String url;
|
||||
private String vehicleNumber;
|
||||
private String licenseId;
|
||||
private String ownerName;
|
||||
private String regTime;
|
||||
private String issuingAuthority;
|
||||
private String engine;
|
||||
private String vclN;
|
||||
private String licensedateOfissue;
|
||||
private String vin;
|
||||
private String vcltype;
|
||||
private String vclBrand;
|
||||
private String natureOfUsage;
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getRegTime() {
|
||||
return regTime;
|
||||
}
|
||||
|
||||
public void setRegTime(String regTime) {
|
||||
this.regTime = regTime;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getEngine() {
|
||||
return engine;
|
||||
}
|
||||
|
||||
public void setEngine(String engine) {
|
||||
this.engine = engine;
|
||||
}
|
||||
|
||||
public String getVclN() {
|
||||
return vclN;
|
||||
}
|
||||
|
||||
public void setVclN(String vclN) {
|
||||
this.vclN = vclN;
|
||||
}
|
||||
|
||||
public String getLicensedateOfissue() {
|
||||
return licensedateOfissue;
|
||||
}
|
||||
|
||||
public void setLicensedateOfissue(String licensedateOfissue) {
|
||||
this.licensedateOfissue = licensedateOfissue;
|
||||
}
|
||||
|
||||
public String getVin() {
|
||||
return vin;
|
||||
}
|
||||
|
||||
public void setVin(String vin) {
|
||||
this.vin = vin;
|
||||
}
|
||||
|
||||
public String getVcltype() {
|
||||
return vcltype;
|
||||
}
|
||||
|
||||
public void setVcltype(String vcltype) {
|
||||
this.vcltype = vcltype;
|
||||
}
|
||||
|
||||
public String getVclBrand() {
|
||||
return vclBrand;
|
||||
}
|
||||
|
||||
public void setVclBrand(String vclBrand) {
|
||||
this.vclBrand = vclBrand;
|
||||
}
|
||||
|
||||
public String getNatureOfUsage() {
|
||||
return natureOfUsage;
|
||||
}
|
||||
|
||||
public void setNatureOfUsage(String natureOfUsage) {
|
||||
this.natureOfUsage = natureOfUsage;
|
||||
}
|
||||
|
||||
public String getLicenseId() {
|
||||
return licenseId;
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName ToH5Bean
|
||||
* @Author john
|
||||
* @Date 2024/9/9 10:01
|
||||
* @Description TODO
|
||||
*/
|
||||
public class ToH5Bean implements Serializable {
|
||||
|
||||
private int id;
|
||||
private String carNumber;
|
||||
private String carId;
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCarNumber() {
|
||||
return carNumber;
|
||||
}
|
||||
|
||||
public void setCarNumber(String carNumber) {
|
||||
this.carNumber = carNumber;
|
||||
}
|
||||
|
||||
public String getCarId() {
|
||||
return carId;
|
||||
}
|
||||
|
||||
public void setCarId(String carId) {
|
||||
this.carId = carId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
/**
|
||||
* @ClassName WaybillStatusBean
|
||||
* @Author john
|
||||
* @Date 2024/10/14 15:40
|
||||
* @Description TODO
|
||||
*/
|
||||
public class WaybillStatusBean {
|
||||
|
||||
private int res;
|
||||
private int code;
|
||||
private boolean success;
|
||||
private String msg;
|
||||
private String data;
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
||||
|
||||
/**
|
||||
* @ClassName MyRequestCallback
|
||||
* @Author john
|
||||
* @Date 2024/10/28 17:19
|
||||
* @Description TODO
|
||||
*/
|
||||
interface MyRequestCallback{
|
||||
fun onResult(allGranted: Boolean, grantedList: List<String?>, deniedList: List<String?>)
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
||||
|
||||
import android.content.Context
|
||||
import com.arpa.hndahesudintocctmsdriver.R
|
||||
import com.lxj.xpopup.core.PositionPopupView
|
||||
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弹窗
|
||||
* Create by dance, at 2019/6/14
|
||||
*/
|
||||
class TopMsgPopup(context: Context,title:String, message: String) : PositionPopupView(context) {
|
||||
|
||||
private var message: String
|
||||
private var title: String
|
||||
|
||||
init {
|
||||
this.message = message
|
||||
this.title = title
|
||||
}
|
||||
override fun getImplLayoutId(): Int {
|
||||
return R.layout.popup_qq_msg
|
||||
}
|
||||
|
||||
override fun getDragOrientation(): DragOrientation {
|
||||
return DragOrientation.DragToLeft
|
||||
}
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
tvMessage.text = message
|
||||
tvTitle.text = title
|
||||
}
|
||||
}
|
||||
@@ -8,9 +8,26 @@ package com.arpa.hndahesudintocctmsdriver.event;
|
||||
*/
|
||||
public class HomeWaybillEvent {
|
||||
|
||||
private int message;
|
||||
|
||||
|
||||
public int getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(int message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public HomeWaybillEvent() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param message 1:刷新运单列表
|
||||
*/
|
||||
public HomeWaybillEvent(int message) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,11 +6,11 @@ package com.arpa.hndahesudintocctmsdriver.event;
|
||||
* @date 2021/10/20 14:43
|
||||
* @description:
|
||||
*/
|
||||
public class PdfResEvent {
|
||||
public class WalletEvent {
|
||||
|
||||
private String message;
|
||||
|
||||
public PdfResEvent(String message) {
|
||||
public WalletEvent(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
public String getMessage() {
|
||||
@@ -13,6 +13,7 @@ import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.AuthParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.msg.MsgUtil;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverAuthDataBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.FqBean;
|
||||
@@ -42,6 +43,10 @@ public class ALProcess {
|
||||
|
||||
public static void verification(Context con){
|
||||
DriverAuthDataBean auth= AuthParts.getAuth(con);
|
||||
if (auth==null){
|
||||
return;
|
||||
}
|
||||
|
||||
Identity idy=new Identity();
|
||||
//企业代码
|
||||
idy.setEnterpriseCode(BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE);
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.arpa.hndahesudintocctmsdriver.report;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.amap.api.location.AMapLocationClient;
|
||||
@@ -78,6 +79,9 @@ public class JTTProcess {
|
||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
||||
return;
|
||||
}
|
||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||
sni.setSerialNumber("0000");
|
||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||
@@ -143,6 +147,9 @@ public class JTTProcess {
|
||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
||||
return;
|
||||
}
|
||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||
sni.setSerialNumber("0000");
|
||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||
@@ -176,6 +183,9 @@ public class JTTProcess {
|
||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
||||
return;
|
||||
}
|
||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||
sni.setSerialNumber("0000");
|
||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||
@@ -208,6 +218,9 @@ public class JTTProcess {
|
||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
||||
return;
|
||||
}
|
||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||
sni.setSerialNumber("0000");
|
||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.map.MapUtil;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.IDInputBean;
|
||||
@@ -74,6 +75,22 @@ public class AuthRequest {
|
||||
RequestUtil.start(1, "saveVehicleLicense", re, con, hd);
|
||||
}
|
||||
|
||||
//查询车辆信息-行驶证/app/carDriver/saveVehicleLicense
|
||||
public void getCarInfo(Context con, Handler hd, String carNum) {
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("carNum",carNum);
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"app/carDriver/onlyGetVehicleLicense", MapUtil.mapJson(map)), getToken(con), con);
|
||||
RequestUtil.start(1, "getCarInfo", re, con, hd);
|
||||
}
|
||||
|
||||
//绑定车辆信息-行驶证/app/carDriver/saveVehicleLicense
|
||||
public void bindCar(Context con, Handler hd, String carId) {
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("carId",carId);
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"app/carDriver/bindCar", MapUtil.mapJson(map)), getToken(con), con);
|
||||
RequestUtil.start(1, "bindCarInfo", re, con, hd);
|
||||
}
|
||||
|
||||
//上传头像
|
||||
public void upHeadImg(Context con, Handler hd, String imgUrl) {
|
||||
String mt = "{\"headportrait\": \"" + imgUrl + "\"}";
|
||||
@@ -152,6 +169,7 @@ public class AuthRequest {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAuthUrl(), ""), getToken(con), con);
|
||||
RequestUtil.start(1, "authUrl", re, con, hd);
|
||||
}
|
||||
|
||||
//获取车牌颜色
|
||||
public void getCarColor(Context con, Handler hd) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.request;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.TrackInputBean;
|
||||
@@ -73,14 +74,16 @@ public class HuoYuanRequset{
|
||||
RequestUtil.start(1, HuoYunDelActivity.END,re,con,hd);
|
||||
}
|
||||
|
||||
public void confirm(String cid,String contractUrl,int wid){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("carId",cid);
|
||||
map.put("orderId",wid);
|
||||
map.put("contractUrl",contractUrl);
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAgreeOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestUtil.start(1, HuoYunDelActivity.END,re,con,hd);
|
||||
}
|
||||
// public void confirm2(String cid,int wid){
|
||||
// Map<String,Object> map=new HashMap<>();
|
||||
// map.put("carId",cid);
|
||||
// map.put("orderId",wid);
|
||||
// map.put("status",2);
|
||||
// map.put("imgUrl","");
|
||||
// Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"/app/driver/waybill/grab",MapUtil.mapJson(map)),getToken(con),con);
|
||||
// RequestUtil.start(1, "jfaklsdjfklasjdflk",re,con,hd);
|
||||
// }
|
||||
|
||||
//获取执行中的运单
|
||||
public void startOrder(int id){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
@@ -88,6 +91,13 @@ public class HuoYuanRequset{
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetStartOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestUtil.start(1, HuoYuanFragmengt.START_ORDER,re,con,hd);
|
||||
}
|
||||
|
||||
public void startOrder2(int id){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("waybillId",id);
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetStartOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestUtil.start(1, "refreshorderDetail",re,con,hd);
|
||||
}
|
||||
//装货
|
||||
public void loading(LUInputBean lub){
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getLOADING(), gson.toJson(lub)),getToken(con),con);
|
||||
@@ -151,6 +161,32 @@ public class HuoYuanRequset{
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getEvaluationV2(),MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestUtil.start(1, StartYunDanActivity.KEEP_EVALUTE,re,con,hd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取运单状态
|
||||
* @param waybillId
|
||||
*/
|
||||
public void getWaybillStatus(int waybillId){
|
||||
// Map<String,Object> map=new HashMap<>();
|
||||
// map.put("waybillId",waybillId);
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetWaybillStatus()+"?waybillId="+waybillId,""),getToken(con),con);
|
||||
RequestUtil.start(1, "waybillStatus",re,con,hd);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取货源状态
|
||||
* @param orderId
|
||||
*/
|
||||
public void getOrderStatus(int orderId){
|
||||
// Map<String,Object> map=new HashMap<>();
|
||||
// map.put("waybillId",waybillId);
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetOrderStatus()+"?orderId="+orderId,""),getToken(con),con);
|
||||
RequestUtil.start(1, "orderStatus",re,con,hd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public final static String ASYMMETRYWAYBILL="waybill_getAsymmetryWaybill";
|
||||
|
||||
//获取装货失败信息
|
||||
|
||||
@@ -3,65 +3,132 @@ package com.arpa.hndahesudintocctmsdriver.request;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.OkDate;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.OkHttpUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequestUtil;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import okhttp3.Request;
|
||||
|
||||
public class OCRRequest {
|
||||
|
||||
public String getToken(Context con) {
|
||||
return SPUtil.getSP(con, LoginActivity.USER,LoginActivity.USER_TOKEN);
|
||||
return SPUtil.getSP(con, LoginActivity.USER, LoginActivity.USER_TOKEN);
|
||||
}
|
||||
|
||||
//银行卡识别
|
||||
public void ORCBank(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getOrcBank()),getToken(con),file);
|
||||
RequestUtil.start(12, "OCR_BANK",re,con,hd);
|
||||
public void ORCBank(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getOrcBank()), getToken(con), file);
|
||||
RequestUtil.start(12, "OCR_BANK", re, con, hd);
|
||||
}
|
||||
|
||||
//银行卡识别-中交
|
||||
public void ORCBankZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getOrcBank() + "?imgurl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, "OCR_BANK", re, con, hd);
|
||||
}
|
||||
|
||||
//从业资格证-中交
|
||||
public void ORCQualificaZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"sinoiov/ocr/getTransQualificationCertOCR" + "?imgurl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, "ORCQualificaZj", re, con, hd);
|
||||
}
|
||||
|
||||
//道路运输许可证-中交
|
||||
public void ORCRoadLicZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"sinoiov/ocr/getVehicleRoadLicenseOCR" + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, "ORCRoadLicZj", re, con, hd);
|
||||
}
|
||||
|
||||
//身份证正面识别
|
||||
public void OCRCard(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardFront()),getToken(con),file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[0],re,con,hd);
|
||||
public void OCRCard(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardFront()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[0], re, con, hd);
|
||||
}
|
||||
|
||||
//身份证背面识别
|
||||
public void OCRCardBack(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardBack()),getToken(con),file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[0], re,con,hd);
|
||||
public void OCRCardBack(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardBack()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[0], re, con, hd);
|
||||
}
|
||||
|
||||
//身份证正面识别-中交
|
||||
public void OCRZjCard(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIdCardFront() + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[0], re, con, hd);
|
||||
}
|
||||
|
||||
//身份证背面识别-中交
|
||||
public void OCRZjCardBack(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIdCardFront() + "?backDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[0], re, con, hd);
|
||||
}
|
||||
|
||||
//驾驶证正面识别
|
||||
public void OCRDrivingLicense(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicense()),getToken(con),file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[1],re,con,hd);
|
||||
public void OCRDrivingLicense(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicense()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[1], re, con, hd);
|
||||
}
|
||||
|
||||
//驾驶证背面识别
|
||||
public void OCRDrivingLicenseBack(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicenseBack()),getToken(con),file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[1],re,con,hd);
|
||||
public void OCRDrivingLicenseBack(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicenseBack()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[1], re, con, hd);
|
||||
}
|
||||
|
||||
//驾驶证正面识别-中交
|
||||
public void OCRDrivingLicenseZj(Context con, Handler hd, String imgUrl){
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getDrivingLicense()+"?faceDataUrl="+imgUrl,""),getToken(con),con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[1],re,con,hd);
|
||||
}
|
||||
|
||||
//驾驶证背面识别-中交
|
||||
public void OCRDrivingLicenseBackZj(Context con, Handler hd, String imgUrl){
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getDrivingLicense()+"?backDataUrl="+imgUrl,""),getToken(con),con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[1],re,con,hd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//行驶证正面识别
|
||||
public void OCRVehicleLicense(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getVehicleLicense()),getToken(con),file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[2],re,con,hd);
|
||||
public void OCRVehicleLicense(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getVehicleLicense()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[2], re, con, hd);
|
||||
}
|
||||
|
||||
//行驶证背面识别
|
||||
public void OCRVehicleLicenseBack(Context con, Handler hd, File file,String carId,String carNum,boolean isSave){
|
||||
Request re = OkHttpUtil.postFiles(new OkDate(RequestConstant.getVehicleLicenseBack()),file,getToken(con),carId,carNum,isSave);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[2],re,con,hd);
|
||||
}
|
||||
|
||||
public void OCRPlateLicense(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getPlateLicense()),getToken(con),file);
|
||||
RequestUtil.start(12, "carName",re,con,hd);
|
||||
public void OCRVehicleLicenseBack(Context con, Handler hd, File file, String carId, String carNum, boolean isSave) {
|
||||
Request re = OkHttpUtil.postFiles(new OkDate(RequestConstant.getVehicleLicenseBack()), file, getToken(con), carId, carNum, isSave);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[2], re, con, hd);
|
||||
}
|
||||
|
||||
|
||||
public void OCRCarPlateLicense(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getPlateLicense2()),getToken(con),file);
|
||||
RequestUtil.start(12, "carNum",re,con,hd);
|
||||
//行驶证正面识别-中交
|
||||
public void OCRVehicleLicenseZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getVehicleLicense() + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[2], re, con, hd);
|
||||
}
|
||||
|
||||
//行驶证背面识别-中交
|
||||
public void OCRVehicleLicenseBackZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getVehicleLicense() + "?backDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[2], re, con, hd);
|
||||
}
|
||||
|
||||
public void OCRPlateLicense(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getPlateLicense()), getToken(con), file);
|
||||
RequestUtil.start(12, "carName", re, con, hd);
|
||||
}
|
||||
|
||||
|
||||
public void OCRCarPlateLicense(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getPlateLicense2()), getToken(con), file);
|
||||
RequestUtil.start(12, "carNum", re, con, hd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RequestConstant {
|
||||
//运单列表
|
||||
private static final String ORDER_LIST = "/app/driver/waybill/listV2";
|
||||
//抢单
|
||||
private static final String AGREE_ORDER = "/app/driver/waybill/grabDriverOrdersContruct";
|
||||
private static final String AGREE_ORDER = "/app/driver/waybill/grabDriverOrdersContructV2";
|
||||
//获取正在执行的运单/运单详情
|
||||
private static final String GET_START_ORDER = "/app/driver/waybill/getExecuteWaybill";
|
||||
//查看承运合同
|
||||
@@ -81,6 +81,8 @@ public class RequestConstant {
|
||||
private static final String COMPLAINT = "/app/driver/waybill/complaintV2";
|
||||
//保存评价信息
|
||||
private static final String EVALUATION_V2 = "/app/driver/waybill/evaluationV2";
|
||||
private static final String GET_WAYBILL_STATUS = "/app/driver/waybill/getWaybillStatus";
|
||||
private static final String GET_ORDER_STATUS = "/app/driver/order/getOrderStatus";
|
||||
//车辆列表
|
||||
private static final String GET_CAR_LIST = "/app/carDriver/getCarList";
|
||||
//车辆详情
|
||||
@@ -98,17 +100,21 @@ public class RequestConstant {
|
||||
//--ORC识别--
|
||||
|
||||
//银行卡识别
|
||||
private static final String ORC_BANK = "/common/ocr/bank";
|
||||
// private static final String ORC_BANK = "/common/ocr/bank";
|
||||
private static final String ORC_BANK = "sinoiov/ocr/getBankcardOCR";
|
||||
//身份证正面
|
||||
private static final String ID_CARD_FRONT = "/common/ocr/idCardFront";
|
||||
// private static final String ID_CARD_FRONT = "/common/ocr/idCardFront";
|
||||
private static final String ID_CARD_FRONT = "sinoiov/ocr/getIdCardLicenseV2";
|
||||
//身份证识别反面
|
||||
private static final String ID_CARD_BACK = "/common/ocr/idCardBack";
|
||||
//驾驶证正面
|
||||
private static final String DRIVING_LICENSE = "/common/ocr/drivingLicense";
|
||||
// private static final String DRIVING_LICENSE = "/common/ocr/drivingLicense";
|
||||
private static final String DRIVING_LICENSE = "sinoiov/ocr/getDrivingLicenseOCRV2";
|
||||
//驾驶证副页
|
||||
private static final String DRIVING_LICENSE_BACK = "/common/ocr/drivingLicenseBack";
|
||||
//行驶证正面
|
||||
private static final String VEHICLE_LICENSE = "/common/ocr/vehicleLicense";
|
||||
// private static final String VEHICLE_LICENSE = "/common/ocr/vehicleLicense";
|
||||
private static final String VEHICLE_LICENSE = "sinoiov/ocr/getVehicleLicenseOCRV2";
|
||||
//行驶证副页
|
||||
private static final String VEHICLE_LICENSE_BACK = "/common/ocr/v2/vehicleBackLicenseV3";
|
||||
//身份证认证信息
|
||||
@@ -124,6 +130,7 @@ public class RequestConstant {
|
||||
private static final String DRIVERAUTHLICENSE = "/app/driver/auth/driverAuthLicense";
|
||||
//行驶证认证
|
||||
private static final String SAVEVEHICLELICENSE = "/app/carDriver/saveVehicleLicense";
|
||||
// private static final String SAVEVEHICLELICENSE = "app/carDriver/save";
|
||||
//从业资格证认证
|
||||
private static final String DRIVER_AUTH_QUALIFICATION = "/app/driver/auth/driverAuthQualification";
|
||||
//车辆等级证书
|
||||
@@ -331,6 +338,14 @@ public class RequestConstant {
|
||||
return BASE_URL + EVALUATION_V2;
|
||||
}
|
||||
|
||||
public static String getGetWaybillStatus() {
|
||||
return BASE_URL + GET_WAYBILL_STATUS;
|
||||
}
|
||||
|
||||
public static String getGetOrderStatus() {
|
||||
return BASE_URL + GET_ORDER_STATUS;
|
||||
}
|
||||
|
||||
public static String getDRIVERAUTHIDCARD() {
|
||||
return BASE_URL + DRIVERAUTHIDCARD;
|
||||
}
|
||||
|
||||
+115
@@ -16,8 +16,123 @@ public class LicenseInputBean {
|
||||
private int driverLicensePhoto;
|
||||
private String endTime;
|
||||
private String firstTime;
|
||||
private String address;
|
||||
private String quasiDriveType;
|
||||
private String beginDate;
|
||||
private String endDate;
|
||||
private String fileNumber;
|
||||
private String issuingAuthority;
|
||||
private String sex;
|
||||
private String name;
|
||||
private String idcard;
|
||||
private String organizationName;
|
||||
private String startTime;
|
||||
private String birthday;
|
||||
private String country;
|
||||
|
||||
public String getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthday(String birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getOrganizationName() {
|
||||
return organizationName;
|
||||
}
|
||||
|
||||
public void setOrganizationName(String organizationName) {
|
||||
this.organizationName = organizationName;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getQuasiDriveType() {
|
||||
return quasiDriveType;
|
||||
}
|
||||
|
||||
public void setQuasiDriveType(String quasiDriveType) {
|
||||
this.quasiDriveType = quasiDriveType;
|
||||
}
|
||||
|
||||
public String getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(String beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getFileNumber() {
|
||||
return fileNumber;
|
||||
}
|
||||
|
||||
public void setFileNumber(String fileNumber) {
|
||||
this.fileNumber = fileNumber;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getIdcard() {
|
||||
return idcard;
|
||||
}
|
||||
|
||||
public void setIdcard(String idcard) {
|
||||
this.idcard = idcard;
|
||||
}
|
||||
|
||||
public String getAllowType() {
|
||||
return allowType;
|
||||
|
||||
@@ -62,14 +62,14 @@ public class MakeUpService extends Service {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
palyMp3();
|
||||
// palyMp3();
|
||||
}
|
||||
|
||||
//开始
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
Log.e("服务开启","-----");
|
||||
|
||||
palyMp3();
|
||||
return START_STICKY;
|
||||
|
||||
}
|
||||
|
||||
@@ -30,22 +30,22 @@ import java.util.TimerTask;
|
||||
public class TrackService extends Service {
|
||||
|
||||
private Context con;
|
||||
private TrackInputBean tib=new TrackInputBean();
|
||||
private TrackInputBean tib = new TrackInputBean();
|
||||
private LocationGDUtil l;
|
||||
private int timeSum=1000*60*3;
|
||||
private String snn="";
|
||||
private Gson gson=new Gson();
|
||||
private int timeSum = 1000 * 60 * 3;
|
||||
private String snn = "";
|
||||
private Gson gson = new Gson();
|
||||
private HuoYuanRequset hyr;
|
||||
|
||||
private Handler hd=new Handler(msg -> {
|
||||
switch (msg.what){
|
||||
private Handler hd = new Handler(msg -> {
|
||||
switch (msg.what) {
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
if(CacheGroup.cacheList.get("genzong")!=null){
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get("genzong"),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
Log.e("--轨迹上传--","成功");
|
||||
}else{
|
||||
Log.e("--轨迹上传失败:--",bb.getMsg());
|
||||
if (CacheGroup.cacheList.get("genzong") != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("genzong"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
Log.e("--轨迹上传--", "成功");
|
||||
} else {
|
||||
Log.e("--轨迹上传失败:--", bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove("genzong");
|
||||
}
|
||||
@@ -59,32 +59,34 @@ public class TrackService extends Service {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {return null; }
|
||||
public IBinder onBind(Intent intent) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
con=this;
|
||||
hyr=new HuoYuanRequset(con,hd);
|
||||
Log.e("开始循环上传,等待100ms","-----");
|
||||
con = this;
|
||||
hyr = new HuoYuanRequset(con, hd);
|
||||
Log.e("开始循环上传,等待100ms", "-----");
|
||||
new Timer().schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
snn=SPUtil.getSP(con,"order","ShippingNoteNumber");
|
||||
if(!snn.equals("")) {
|
||||
snn = SPUtil.getSP(con, "order", "ShippingNoteNumber");
|
||||
if (!snn.equals("")) {
|
||||
l = new LocationGDUtil(con, hd);
|
||||
l.onCreate();
|
||||
}else{
|
||||
} else {
|
||||
onDestroy();
|
||||
}
|
||||
}
|
||||
},100,timeSum);
|
||||
}, 100, timeSum);
|
||||
}
|
||||
|
||||
//开始
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
Log.e("服务开启","-----");
|
||||
Log.e("服务开启", "-----");
|
||||
return START_STICKY;
|
||||
|
||||
}
|
||||
@@ -94,16 +96,19 @@ public class TrackService extends Service {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
public void genzong(){
|
||||
//经度
|
||||
tib.setLatitude(l.getLatitude()+"");
|
||||
//纬度
|
||||
tib.setLongitude(l.getLongitude()+"");
|
||||
Log.e("经度",l.getLatitude()+"");
|
||||
Log.e("维度",l.getLongitude()+"");
|
||||
//单号
|
||||
tib.setShippingNoteNumber(snn);
|
||||
hyr.trackTracking(tib);
|
||||
public void genzong() {
|
||||
if (l == null || l.getLatitude() == 0d) {
|
||||
return;
|
||||
}
|
||||
//经度
|
||||
tib.setLatitude(l.getLatitude() + "");
|
||||
//纬度
|
||||
tib.setLongitude(l.getLongitude() + "");
|
||||
Log.e("经度", l.getLatitude() + "");
|
||||
Log.e("维度", l.getLongitude() + "");
|
||||
//单号
|
||||
tib.setShippingNoteNumber(snn);
|
||||
hyr.trackTracking(tib);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.view.KeyEvent
|
||||
import android.widget.*
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.arpa.hndahesudintocctmsdriver.R
|
||||
import com.arpa.hndahesudintocctmsdriver.event.WalletEvent
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.home.HomeFragment
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.my.MyFragment
|
||||
@@ -23,6 +24,7 @@ import com.arpa.hndahesudintocctmsdriver.util.view.PanDuanUtil
|
||||
import com.google.gson.Gson
|
||||
import com.gyf.cactus.ext.cactusUpdateNotification
|
||||
import com.permissionx.guolindev.PermissionX
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
@Suppress("DIVISION_BY_ZERO")
|
||||
@SuppressLint("SetTextI18n")
|
||||
@@ -93,6 +95,7 @@ class MainActivity : BaseAppCompatActivity() {
|
||||
bt.hide(fs[bt.index])
|
||||
bt.selectItem(fs[1])
|
||||
} else {
|
||||
EventBus.getDefault().post(WalletEvent("refresh"))
|
||||
bt.setDefaultFragment(fs[1])
|
||||
}
|
||||
bt.index = 1
|
||||
@@ -126,9 +129,9 @@ class MainActivity : BaseAppCompatActivity() {
|
||||
bt.index = 3
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
getPression()
|
||||
}
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
// getPression()
|
||||
// }
|
||||
}
|
||||
|
||||
fun getPression() {
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -38,7 +39,8 @@ public class UiAuxiliary {
|
||||
}
|
||||
|
||||
public static void delLogin(Context con){
|
||||
JPushInterface.deleteAlias(con,0);
|
||||
// JPushInterface.deleteAlias(con,0);
|
||||
SPUtils.remove(con,"curWaybillId");
|
||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_TOKEN,"");
|
||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_UNAME,"");
|
||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_RNAME,"");
|
||||
|
||||
+30
-7
@@ -20,9 +20,12 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.OCRQualiBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.TimeUtil;
|
||||
import com.esign.esignsdk.EsignSdk;
|
||||
import com.esign.esignsdk.data.AuthEvent;
|
||||
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
||||
@@ -83,6 +86,10 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
ub = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
if ("0".equals(type)) {//从业资格识别,党员认证不识别
|
||||
new OCRRequest().ORCQualificaZj(con, hd, ub.getData().getUrl());
|
||||
}
|
||||
|
||||
url = ub.getData().getUrl();
|
||||
Glide.with(con).load(url).into(img);
|
||||
up_img.setVisibility(View.GONE);
|
||||
@@ -90,6 +97,24 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("ORCQualificaZj") != null) {
|
||||
OCRQualiBean ocrQualiBean = gson.fromJson(CacheGroup.cacheList.get("ORCQualificaZj"), OCRQualiBean.class);
|
||||
if (ocrQualiBean.getCode() == 200 && ocrQualiBean.getData() != null) {
|
||||
List<OCRQualiBean.DataDTO.QualificationCategoryListDTO> qualificationCategoryList = ocrQualiBean.getData().getQualification_category_list();
|
||||
if (qualificationCategoryList != null && qualificationCategoryList.size() > 0) {
|
||||
String expiryDate = qualificationCategoryList.get(0).getExpiry_date();
|
||||
if (expiryDate.contains("-")){
|
||||
value2.setText(expiryDate);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("ORCQualificaZj");
|
||||
}
|
||||
|
||||
|
||||
if (CacheGroup.cacheList.get("isAuthDriverAuthQualification") != null) {
|
||||
Log.e("is", CacheGroup.cacheList.get("isAuthDriverAuthQualification"));
|
||||
ib = gson.fromJson(CacheGroup.cacheList.get("isAuthDriverAuthQualification"), IsAuthDriverAuthQualificationBean.class);
|
||||
@@ -119,12 +144,12 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
} else {
|
||||
finish();
|
||||
if (isOverCar){//从业资格证=》道路运输许可证
|
||||
if (isOverCar) {//从业资格证=》道路运输许可证
|
||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||
in.putExtra("type", 3);
|
||||
in.putExtra("carId", carId);
|
||||
startActivity(in);
|
||||
}else{//资料传完 补传情况
|
||||
} else {//资料传完 补传情况
|
||||
Intent in = new Intent(con, AddCarSuccActivity.class);
|
||||
in.putExtra("type", 3);
|
||||
con.startActivity(in);
|
||||
@@ -132,7 +157,6 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
Toast.makeText(con, "资格证上传成功", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
@@ -205,7 +229,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
data_view = findViewById(R.id.data_view);
|
||||
type = getIntent().getExtras().getString("type");
|
||||
carId = getIntent().getExtras().getString("carId", "");
|
||||
isOverCar = getIntent().getExtras().getBoolean("isOverCar",false);
|
||||
isOverCar = getIntent().getExtras().getBoolean("isOverCar", false);
|
||||
ur = new UserRequset(con, hd);
|
||||
initView(null);
|
||||
if ("0".equals(type)) {
|
||||
@@ -217,9 +241,9 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
//new RZRequest().isDriverAuthQualification(con,hd);
|
||||
}
|
||||
if (TextUtils.isEmpty(carId)){//carId不为空 从添加车辆进入 该操作不能跳过
|
||||
if (TextUtils.isEmpty(carId)) {//carId不为空 从添加车辆进入 该操作不能跳过
|
||||
tvSkip.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
} else {
|
||||
tvSkip.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
@@ -300,7 +324,6 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
tvSkip.setOnClickListener(v -> {
|
||||
|
||||
|
||||
|
||||
if (type.equals("0")) {
|
||||
// finish();
|
||||
if (key) {
|
||||
|
||||
+436
-105
@@ -23,7 +23,10 @@ import androidx.cardview.widget.CardView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.CarInfoBean2;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DicBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverUpBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.SinglePickBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.SimCenterPop;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||
@@ -38,6 +41,9 @@ import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||
import com.dahe.mylibrary.utils.ImageLoader;
|
||||
import com.dahe.mylibrary.utils.PatternUtils;
|
||||
import com.dahe.mylibrary.utils.TimeUtil;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.esign.esignsdk.EsignSdk;
|
||||
import com.esign.esignsdk.data.AuthEvent;
|
||||
@@ -84,10 +90,12 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
//修改后不可编辑
|
||||
public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
@@ -104,13 +112,14 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
private String[] names_img3 = {"", "", "行驶证副页背面照片", "挂车行驶证副页背面照片"};
|
||||
private String[][] name = {
|
||||
{"姓名", "身份证号", "地址", "有效期至"},
|
||||
{"档案编号", "初次领证日期", "准驾车型", "有效期限(止)"},
|
||||
{"驾驶证号", "初次领证日期", "准驾车型", "有效期限(止)"},
|
||||
{"车牌号码", "车辆类型", "所有人", "车辆识别代码"},
|
||||
{"车牌号码", "车辆类型", "所有人", "车辆识别代码"}
|
||||
};
|
||||
private int[] typeImgOne = {R.mipmap.id, R.mipmap.license, R.mipmap.vehicle_license, R.mipmap.vehicle_license};
|
||||
private int[] typeImgTwo = {R.mipmap.id_back, R.mipmap.license_back, R.mipmap.vehicle_license_back, R.mipmap.vehicle_license_back};
|
||||
private int index = 0;
|
||||
private String carExistCarId = "";
|
||||
private DicBean.DataDTO curColor, curEnergy;
|
||||
private TextView zj_name, zjimg_name, zjimg2_name, zj_name2, zj_name3;
|
||||
private TextView name1, name2, name3, name4, value5, value6;
|
||||
@@ -174,8 +183,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
|
||||
|
||||
//上传身份证信息后 跳转上传银行卡信息页面
|
||||
Intent in333=new Intent(con, UpBankActivity.class);
|
||||
in333.putExtra("type",1);
|
||||
Intent in333 = new Intent(con, UpBankActivity.class);
|
||||
in333.putExtra("type", 1);
|
||||
startActivity(in333);
|
||||
|
||||
} else {
|
||||
@@ -212,7 +221,13 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
Log.e("url", CacheGroup.cacheList.get("authUrl"));
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("authUrl"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||
Intent intent = new Intent(this, H5Activity.class);
|
||||
intent.putExtra("url", (String) bb.getData());
|
||||
intent.putExtra("view_file", false);
|
||||
intent.putExtra("title", "人脸识别");
|
||||
intent.putExtra("isGoCar", true);
|
||||
startActivity(intent);
|
||||
// EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||
} else {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||
@@ -339,6 +354,92 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
});
|
||||
}
|
||||
CacheGroup.cacheList.remove(CAR_COLOR);
|
||||
} else if (CacheGroup.cacheList.get("upload") != null) {
|
||||
ub = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
// url3 = ub.getData().getUrl();
|
||||
// fid = ub.getData().getId();
|
||||
//// Glide.with(con).load(url3).into(img3);
|
||||
// Glide.with(con).load(path).into(img3);
|
||||
String imageUrl = ub.getData().getUrl();
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (keys[0]) {
|
||||
fontId = ub.getData().getId();
|
||||
url1 = imageUrl;
|
||||
new OCRRequest().OCRZjCard(con, hd, imageUrl);
|
||||
} else {
|
||||
Log.e("res" + new File(path).getName(), new File(path).getPath());
|
||||
backId = ub.getData().getId();
|
||||
url2 = imageUrl;
|
||||
new OCRRequest().OCRZjCardBack(con, hd, imageUrl);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (keys[0]) {
|
||||
fontId = ub.getData().getId();
|
||||
url1 = imageUrl;
|
||||
new OCRRequest().OCRDrivingLicenseZj(con, hd, imageUrl);
|
||||
} else {
|
||||
backId = ub.getData().getId();
|
||||
url2 = imageUrl;
|
||||
new OCRRequest().OCRDrivingLicenseBackZj(con, hd, imageUrl);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (keys[0]) {
|
||||
fontId = ub.getData().getId();
|
||||
url1 = imageUrl;
|
||||
new OCRRequest().OCRVehicleLicenseZj(con, hd, imageUrl);
|
||||
} else if (keys[1]) {
|
||||
if ("".equals(carNum)) {
|
||||
Toast.makeText(con, "车牌号不能为空", Toast.LENGTH_LONG).show();
|
||||
customDialog.dismiss();
|
||||
return;
|
||||
}
|
||||
backId = ub.getData().getId();
|
||||
url2 = imageUrl;
|
||||
new OCRRequest().OCRVehicleLicenseBackZj(con, hd, imageUrl);
|
||||
|
||||
} else {
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
Log.e("添加挂车", "挂车" + oCrcarId);
|
||||
if (keys[0]) {
|
||||
fontId = ub.getData().getId();
|
||||
url1 = imageUrl;
|
||||
new OCRRequest().OCRVehicleLicenseZj(con, hd, imageUrl);
|
||||
} else if (keys[1]) {
|
||||
if ("".equals(carNum)) {
|
||||
Toast.makeText(con, "车牌号不能为空", Toast.LENGTH_LONG).show();
|
||||
customDialog.dismiss();
|
||||
return;
|
||||
}
|
||||
// if (cdb != null && cdb.getData().getTrailerResVo() &&cdb.getRes() == 1)
|
||||
boolean isExist = false;
|
||||
if (olb != null) {//主页识别成功后获取
|
||||
isExist = olb.getData().isCarExist();
|
||||
} else {
|
||||
if (cdb != null && cdb.getData().getTrailerResVo() != null && cdb.getRes() == 1) {//上个页面带来数据
|
||||
isExist = true;
|
||||
}
|
||||
}
|
||||
backId = ub.getData().getId();
|
||||
url2 = imageUrl;
|
||||
new OCRRequest().OCRVehicleLicenseBackZj(con, hd, imageUrl);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
} else if (CacheGroup.cacheList.get(CAR_ENERGY_TYPE) != null) {
|
||||
DicBean bb = gson.fromJson(CacheGroup.cacheList.get(CAR_ENERGY_TYPE), DicBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
@@ -358,18 +459,58 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
Log.e("url", CacheGroup.cacheList.get("authUrl"));
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("authUrl"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||
Intent intent = new Intent(this, H5Activity.class);
|
||||
intent.putExtra("url", (String) bb.getData());
|
||||
intent.putExtra("view_file", false);
|
||||
intent.putExtra("title", "人脸识别");
|
||||
intent.putExtra("isGoCar", true);
|
||||
startActivity(intent);
|
||||
// EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||
} else {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||
CacheGroup.cacheList.remove("authUrl");
|
||||
} else if (CacheGroup.cacheList.get("getCarInfo") != null) {
|
||||
Log.e("url", CacheGroup.cacheList.get("getCarInfo"));
|
||||
CarInfoBean2 bb = gson.fromJson(CacheGroup.cacheList.get("getCarInfo"), CarInfoBean2.class);
|
||||
if (bb.getCode() == 200 && bb.getData() != null) {
|
||||
if (!TextUtils.isEmpty(bb.getData().getCarId())) {
|
||||
carExistCarId = bb.getData().getCarId();
|
||||
value1.setEnabled(false);
|
||||
value2.setEnabled(false);
|
||||
value3.setEnabled(false);
|
||||
value4.setEnabled(false);
|
||||
// img2.setEnabled(false);
|
||||
u_img2.setEnabled(false);
|
||||
url2 = bb.getData().getBackImage();
|
||||
Glide.with(con).load(bb.getData().getBackImage()).into(img2);
|
||||
// url2 = olb.getData().getExistCarInfo().getBackImage();
|
||||
ToastUtils.showLongToast(con, "该车辆已存在,请仔细核对相关信息");
|
||||
}
|
||||
}
|
||||
CacheGroup.cacheList.remove("getCarInfo");
|
||||
} else if (CacheGroup.cacheList.get("bindCarInfo") != null) {
|
||||
if (customDialog != null && customDialog.isShowing())
|
||||
customDialog.dismiss();
|
||||
Log.e("url", CacheGroup.cacheList.get("bindCarInfo"));
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("bindCarInfo"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
VehicleEvent ve = new VehicleEvent(String.valueOf(carExistCarId));
|
||||
EventBus.getDefault().postSticky(ve);
|
||||
finish();
|
||||
ToastUtils.showToast(con, bb.getMsg());
|
||||
}else{
|
||||
ToastUtils.showToast(con, bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove("bindCarInfo");
|
||||
} else {
|
||||
pathOrcRes();
|
||||
//重复代码?
|
||||
initView(null);
|
||||
if (!(CacheGroup.cacheList.get(TYPE_NAME_BANK[2]) != null || CacheGroup.cacheList.get(TYPE_NAME_BANK[3]) != null)) {
|
||||
initData();
|
||||
}
|
||||
pathOrcRes();
|
||||
|
||||
}
|
||||
break;
|
||||
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||
@@ -486,10 +627,12 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
img1.setImageResource(typeImgOne[index]);
|
||||
img2.setImageResource(typeImgTwo[index]);
|
||||
if (!url1.equals("")) {
|
||||
Glide.with(con).load(url1).into(img1);
|
||||
ImageLoader.getInstance().loadImage(con, url1, img1, typeImgOne[index]);
|
||||
// Glide.with(con).load(url1).into(img1);
|
||||
}
|
||||
if (!url2.equals("")) {
|
||||
Glide.with(con).load(url2).into(img2);
|
||||
ImageLoader.getInstance().loadImage(con, url2, img2, typeImgTwo[index]);
|
||||
// Glide.with(con).load(url2).into(img2);
|
||||
}
|
||||
//查看第一张照片
|
||||
img1.setOnClickListener(v -> {
|
||||
@@ -591,8 +734,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
// startActivity(in1);
|
||||
|
||||
//上传身份证信息后 跳转上传银行卡信息页面
|
||||
Intent in333=new Intent(con, UpBankActivity.class);
|
||||
in333.putExtra("type",1);
|
||||
Intent in333 = new Intent(con, UpBankActivity.class);
|
||||
in333.putExtra("type", 1);
|
||||
startActivity(in333);
|
||||
break;
|
||||
case 1:
|
||||
@@ -772,14 +915,12 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
case 0:
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME[0]) != null) {
|
||||
ocb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[0]), OCRCardBean.class);
|
||||
if (ocb.getCode() == 200) {
|
||||
url1 = ocb.getData().getUrl();
|
||||
if (ocb.getCode() == 200 && ocb.getData() != null) {
|
||||
// url1 = ocb.getData().getUrl();
|
||||
value1.setText(ocb.getData().getName());
|
||||
value2.setText(ocb.getData().getCardId());
|
||||
value2.setText(ocb.getData().getIdcard());
|
||||
value3.setText(ocb.getData().getAddress());
|
||||
// Glide.with(con).load(url1).into(img1);
|
||||
Glide.with(con).load(path).into(img1);
|
||||
fontId = ocb.getData().getId();
|
||||
} else {
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -787,14 +928,10 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME_BANK[0]) != null) {
|
||||
ocbb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME_BANK[0]), OCRCardBackBean.class);
|
||||
if (ocbb.getCode() == 200) {
|
||||
url2 = ocbb.getData().getUrl();
|
||||
value4.setText(ocbb.getData().getEndTime());
|
||||
// Glide.with(con).load(url2).into(img2);
|
||||
if (ocbb.getCode() == 200 && ocbb.getData() != null) {
|
||||
value4.setText(ocbb.getData().getValidTo());
|
||||
Glide.with(con).load(path).into(img2);
|
||||
startTime = ocbb.getData().getStartTime();
|
||||
backId = ocbb.getData().getId();
|
||||
|
||||
startTime = ocbb.getData().getValidFrom();
|
||||
//自动调取提交功能,实现页面自动跳转
|
||||
subimt();
|
||||
} else {
|
||||
@@ -807,17 +944,15 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
//{"档案编号","初次领证日期","准驾车型","有效期限(止)"},
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME[1]) != null) {
|
||||
odl = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[1]), OCRDrivingLicenseBean.class);
|
||||
if (odl.getCode() == 200) {
|
||||
if (odl.getCode() == 200 && odl.getData() != null) {
|
||||
OCRDrivingLicenseBean.DataDTO od = odl.getData();
|
||||
url1 = odl.getData().getUrl();
|
||||
// url1 = odl.getData().getUrl();
|
||||
value7.setText(StringUtil.isNull(od.getName(), "识别异常"));
|
||||
value1.setText(StringUtil.isNull(od.getNumber(), "识别异常"));
|
||||
value2.setText(StringUtil.isNull(od.getStartTime(), "识别异常"));
|
||||
value3.setText(StringUtil.isNull(od.getAllowType(), "识别异常"));
|
||||
value4.setText(StringUtil.isNull(od.getEndTime(), "识别异常"));
|
||||
// Glide.with(con).load(url1).into(img1);
|
||||
value1.setText(StringUtil.isNull(od.getIdcard(), "识别异常"));
|
||||
value2.setText(StringUtil.isNull(od.getFirstGetDocDate(), "识别异常"));
|
||||
value3.setText(StringUtil.isNull(od.getQuasiDriveType(), "识别异常"));
|
||||
value4.setText(StringUtil.isNull(od.getEndDate(), "识别异常"));
|
||||
Glide.with(con).load(path).into(img1);
|
||||
fontId = od.getId();
|
||||
} else {
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -825,10 +960,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME_BANK[1]) != null) {
|
||||
odlb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME_BANK[1]), OCRDrivingLicenseBackBean.class);
|
||||
if (odlb.getCode() == 200) {
|
||||
url2 = odlb.getData().getUrl();
|
||||
backId = odlb.getData().getId();
|
||||
// Glide.with(con).load(url2).into(img2);
|
||||
if (odlb.getCode() == 200 && odlb.getData() != null) {
|
||||
Glide.with(con).load(path).into(img2);
|
||||
//自动调取提交功能,实现页面自动跳转
|
||||
subimt();
|
||||
@@ -844,56 +976,55 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME[2]) != null) {
|
||||
Log.e("olb", CacheGroup.cacheList.get(TYPE_NAME[2]));
|
||||
olb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[2]), OCRVehicleLicenseBean.class);
|
||||
if (olb.getCode() == 200) {
|
||||
if (olb.getData().isCarExist()) {
|
||||
value1.setEnabled(false);
|
||||
Glide.with(con).load(olb.getData().getExistCarInfo().getBackImage()).into(img2);
|
||||
url2 = olb.getData().getExistCarInfo().getBackImage();
|
||||
ToastUtils.showLongToast(con, "该车辆已存在,请仔细核对相关信息");
|
||||
} else {
|
||||
value1.setEnabled(true);
|
||||
}
|
||||
url1 = olb.getData().getUrl();
|
||||
value1.setText(olb.getData().getCarNumber());
|
||||
value2.setText(olb.getData().getType());
|
||||
value3.setText(olb.getData().getOwner());
|
||||
value4.setText(olb.getData().getVehicleNumber());
|
||||
fontId = olb.getData().getId();
|
||||
if (2==index&&olb.getData().getVclN().contains("挂")){
|
||||
Toast.makeText(con,"该证件为挂车,请上传行驶证证件",Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
if (3==index&&!olb.getData().getVclN().contains("挂")){
|
||||
Toast.makeText(con,"未识别到挂车相关信息,请上传挂车行驶证证件",Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (olb.getCode() == 200 && olb.getData() != null) {
|
||||
carExistCarId = "";
|
||||
value1.setEnabled(true);
|
||||
value2.setEnabled(true);
|
||||
value3.setEnabled(true);
|
||||
value4.setEnabled(true);
|
||||
img2.setEnabled(true);
|
||||
u_img2.setEnabled(true);
|
||||
// url1 = olb.getData().getUrl();
|
||||
value1.setText(olb.getData().getVclN());
|
||||
value2.setText(olb.getData().getVcltype());
|
||||
value3.setText(olb.getData().getOwnerName());
|
||||
value4.setText(olb.getData().getVin());
|
||||
// fontId = olb.getData().getId();
|
||||
// Glide.with(con).load(url1).into(img1);
|
||||
Glide.with(con).load(path).into(img1);
|
||||
oCrcarId = olb.getData().getCarId() + "";
|
||||
if (!TextUtils.isEmpty(olb.getData().getVclN())&&!olb.getData().getVclN().contains("挂"))
|
||||
new AuthRequest().getCarInfo(con, hd, olb.getData().getVclN());
|
||||
Log.e("-cardId-", oCrcarId);
|
||||
} else {
|
||||
Toast.makeText(con, olb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(TYPE_NAME[2]);
|
||||
}
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME_BANK[2]) != null) {
|
||||
oblb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME_BANK[2]), OCRVehicleBackLicenseBean.class);
|
||||
if (oblb.getCode() == 200) {
|
||||
url2 = oblb.getData().getUrl();
|
||||
backId = oblb.getData().getId();
|
||||
if (oblb.getCode() == 200 && oblb.getData() != null) {
|
||||
// url2 = oblb.getData().getUrl();
|
||||
// backId = oblb.getData().getId();
|
||||
// Glide.with(con).load(url2).into(img2);
|
||||
Glide.with(con).load(path).into(img2);
|
||||
//自动调取提交功能,实现页面自动跳转实现页面自动跳转
|
||||
subimt();
|
||||
} else {
|
||||
Toast.makeText(con, oblb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(TYPE_NAME_BANK[2]);
|
||||
}
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
ub = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
url3 = ub.getData().getUrl();
|
||||
fid = ub.getData().getId();
|
||||
// Glide.with(con).load(url3).into(img3);
|
||||
Glide.with(con).load(path).into(img3);
|
||||
} else {
|
||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -910,29 +1041,35 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (keys[0]) {
|
||||
new OCRRequest().OCRCard(con, hd, new File(path));
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRCard(con, hd, new File(path));
|
||||
} else {
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
Log.e("res" + new File(path).getName(), new File(path).getPath());
|
||||
new OCRRequest().OCRCardBack(con, hd, new File(path));
|
||||
// new OCRRequest().OCRCardBack(con, hd, new File(path));
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (keys[0]) {
|
||||
new OCRRequest().OCRDrivingLicense(con, hd, new File(path));
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRDrivingLicense(con, hd, new File(path));
|
||||
} else {
|
||||
new OCRRequest().OCRDrivingLicenseBack(con, hd, new File(path));
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRDrivingLicenseBack(con, hd, new File(path));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (keys[0]) {
|
||||
new OCRRequest().OCRVehicleLicense(con, hd, new File(path));
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRVehicleLicense(con, hd, new File(path));
|
||||
} else if (keys[1]) {
|
||||
if ("".equals(carNum)) {
|
||||
Toast.makeText(con, "车牌号不能为空", Toast.LENGTH_LONG).show();
|
||||
customDialog.dismiss();
|
||||
return;
|
||||
}
|
||||
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, olb.getData().isCarExist());
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, olb.getData().isCarExist());
|
||||
|
||||
} else {
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
@@ -941,7 +1078,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
case 3:
|
||||
Log.e("添加挂车", "挂车" + oCrcarId);
|
||||
if (keys[0]) {
|
||||
new OCRRequest().OCRVehicleLicense(con, hd, new File(path));
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRVehicleLicense(con, hd, new File(path));
|
||||
} else if (keys[1]) {
|
||||
if ("".equals(carNum)) {
|
||||
Toast.makeText(con, "车牌号不能为空", Toast.LENGTH_LONG).show();
|
||||
@@ -957,7 +1095,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
isExist = true;
|
||||
}
|
||||
}
|
||||
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, isExist);
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
// new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, isExist);
|
||||
} else {
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
}
|
||||
@@ -994,7 +1133,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
} else {
|
||||
ib.setIdcardSex(2);
|
||||
}
|
||||
ib.setIdcardValidity(ocbb.getData().getEndTime());
|
||||
ib.setIdcardValidity("长期".equals(ocbb.getData().getValidTo()) ? "2999-12-31" : ocbb.getData().getValidTo());
|
||||
new AuthRequest().driverAuthIdCard(con, hd, ib);
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||
@@ -1008,20 +1147,36 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
customDialog.show();
|
||||
Log.e("ocr", new Gson().toJson(odl));
|
||||
LicenseInputBean iib = new LicenseInputBean();
|
||||
iib.setArchivesName(str1);
|
||||
iib.setArchivesName(odlb.getData().getFileNumber());
|
||||
iib.setDriverLicenseName(value7.getText().toString());
|
||||
iib.setAllowType(str3);
|
||||
iib.setDriverLicense(odl.getData().getNumber());
|
||||
iib.setDriverLicense(str1);
|
||||
iib.setDriverLicenseBackPhoto(backId);
|
||||
iib.setDriverLicensePhoto(fontId);
|
||||
iib.setEndTime(odl.getData().getEndTime());
|
||||
iib.setFirstTime(odl.getData().getFirstTime());
|
||||
iib.setEndTime("长期".equals(odl.getData().getEndDate()) ? "2999-12-31" : odl.getData().getEndDate());
|
||||
iib.setFirstTime(odl.getData().getFirstGetDocDate());
|
||||
|
||||
|
||||
// iib.setName(odl.getData().getName());
|
||||
iib.setOrganizationName(odl.getData().getIssuingAuthority());
|
||||
iib.setAddress(odl.getData().getAddress());
|
||||
iib.setStartTime(odl.getData().getBeginDate());
|
||||
|
||||
iib.setSex(odl.getData().getSex());
|
||||
iib.setBirthday(odl.getData().getBirthday());
|
||||
iib.setCountry(odl.getData().getNationality());
|
||||
new AuthRequest().driverAuthLicense(con, hd, iib);
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!TextUtils.isEmpty(carExistCarId)) {
|
||||
customDialog = new CustomDialog(con, "网络请求中...");
|
||||
customDialog.show();
|
||||
new AuthRequest().bindCar(con, hd, carExistCarId);
|
||||
return;
|
||||
}
|
||||
if ((olb != null && !olb.getData().isCarExist() && oblb != null) || (olb != null && olb.getData().isCarExist())) {
|
||||
// if (curColor == null || curEnergy == null) {
|
||||
// Toast.makeText(con, "请完善内容", Toast.LENGTH_SHORT).show();
|
||||
@@ -1033,17 +1188,100 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
if ("".equals(url3)) {
|
||||
map.put("imgId", fid);
|
||||
}
|
||||
map.put("licenseId", olb.getData().isCarExist() ? olb.getData().getExistCarInfo().getLicenseId() : oblb.getData().getLicenseId());
|
||||
map.put("carNumber", str1);
|
||||
map.put("type", str2);
|
||||
map.put("owner", str3);
|
||||
map.put("vehicleNumber", str4);
|
||||
// if (olb.getData().isCarExist()) {
|
||||
// map.put("carId", olb.getData().getCarId());
|
||||
// }
|
||||
// map.put("carPlateColor", curColor.getValue());
|
||||
// map.put("carEnergyTyp", curEnergy.getValue());
|
||||
new AuthRequest().saveVehicleLicense(con, hd, MapUtil.mapJson(map));
|
||||
// map.put("licenseId", olb.getData().isCarExist() ? olb.getData().getExistCarInfo().getLicenseId() : oblb.getData().getLicenseId());
|
||||
// map.put("vclN", str1);
|
||||
// map.put("vcltype", str2);
|
||||
// map.put("ownerName", str3);
|
||||
// map.put("vin", str4);//车辆识别代号
|
||||
|
||||
String carLong = "";
|
||||
String carWidth = "";
|
||||
String carHeight = "";
|
||||
String carPlateColor = "302003";
|
||||
String carEnergyTyp = "303002";
|
||||
String note = "";
|
||||
|
||||
String overallDimen = oblb.getData().getOverallDimen();
|
||||
if (overallDimen.contains("mm")) {
|
||||
String[] mms = overallDimen.split("mm");
|
||||
String mm = mms[0];
|
||||
|
||||
// String[] xes = mm.split("x");
|
||||
// String[] xes1 = mm.split("X");
|
||||
String[] xes = mm.split("×");
|
||||
if (xes.length == 3) {
|
||||
carLong = xes[0];
|
||||
carWidth = xes[1];
|
||||
carHeight = xes[2];
|
||||
}
|
||||
try {
|
||||
int i = Integer.parseInt(carLong);
|
||||
if (i < 4200) {
|
||||
carPlateColor = "302002";
|
||||
carEnergyTyp = "303001";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
String inNote = oblb.getData().getNote();
|
||||
if (inNote.contains(":")) {
|
||||
String[] split = inNote.split(":");
|
||||
if (split.length == 2) {
|
||||
note = split[1];
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
DriverUpBean driverUpBean = new DriverUpBean();
|
||||
DriverUpBean.DataDTO dataDTO = new DriverUpBean.DataDTO();
|
||||
driverUpBean.setFrontImageUrl(url1);
|
||||
driverUpBean.setBackImageUrl(url2);
|
||||
driverUpBean.setCarNumber(str1);
|
||||
driverUpBean.setType(str2);
|
||||
driverUpBean.setOwner(str3);
|
||||
driverUpBean.setVehicleNumber(str4);
|
||||
driverUpBean.setCarPlateColor(carPlateColor);
|
||||
driverUpBean.setCarEnergyTyp(carEnergyTyp);
|
||||
driverUpBean.setCarLong(carLong);
|
||||
driverUpBean.setCarWidth(carWidth);
|
||||
driverUpBean.setCarHeight(carHeight);
|
||||
|
||||
|
||||
dataDTO.setVclN(str1);
|
||||
dataDTO.setVcltype(str2);
|
||||
dataDTO.setOwnerName(str3);
|
||||
dataDTO.setVin(str4);
|
||||
dataDTO.setNatureOfUsage(olb.getData().getNatureOfUsage());
|
||||
dataDTO.setIssuingAuthority(olb.getData().getIssuingAuthority());
|
||||
dataDTO.setRegTime(olb.getData().getRegTime());
|
||||
dataDTO.setAddress(olb.getData().getAddress());
|
||||
dataDTO.setEngine(olb.getData().getEngine());
|
||||
dataDTO.setLicensedateOfissue(olb.getData().getLicensedateOfissue());
|
||||
dataDTO.setVclBrand(olb.getData().getVclBrand());
|
||||
|
||||
|
||||
dataDTO.setApproveTon(oblb.getData().getApproveTon());
|
||||
dataDTO.setRecordId(oblb.getData().getRecordId());
|
||||
dataDTO.setNote(note);
|
||||
dataDTO.setPassengers(oblb.getData().getPassengers());
|
||||
dataDTO.setVclDrwTn(oblb.getData().getVclDrwTn());
|
||||
dataDTO.setOverallDimen(oblb.getData().getOverallDimen());
|
||||
dataDTO.setEnTn(oblb.getData().getEnTn());
|
||||
dataDTO.setLoadTon(oblb.getData().getLoadTon());
|
||||
dataDTO.setInspectionRecord(oblb.getData().getInspectionRecord());
|
||||
dataDTO.setBarCode(oblb.getData().getBarCode());
|
||||
driverUpBean.setZjObj(dataDTO);
|
||||
|
||||
String json = gson.toJson(driverUpBean);
|
||||
|
||||
new AuthRequest().saveVehicleLicense(con, hd, json);
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -1056,21 +1294,114 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
// }
|
||||
customDialog = new CustomDialog(con, "网络请求中...");
|
||||
customDialog.show();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if ("".equals(url3)) {
|
||||
map.put("imgId", fid);
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// if ("".equals(url3)) {
|
||||
// map.put("imgId", fid);
|
||||
// }
|
||||
//// map.put("licenseId", oblb.getData().getLicenseId());
|
||||
// map.put("carId", carId);
|
||||
// map.put("carNumberDraw", str1);
|
||||
// map.put("type", str2);
|
||||
// map.put("owner", str3);
|
||||
//// map.put("carEnergyTyp", curEnergy.getValue());
|
||||
// map.put("vehicleNumber", str4);
|
||||
// if (cdb != null && cdb.getRes() == 1 && cdb.getData() != null && cdb.getData().getTrailerResVo() != null) {
|
||||
// map.put("oldTrailerNumber", cdb.getData().getTrailerResVo().getCarNumber());
|
||||
// }
|
||||
//
|
||||
// map.put("registerDate", olb.getData().getRegTime());//注册日期
|
||||
// map.put("dateIssue", olb.getData().getLicensedateOfissue());//发证日期
|
||||
// map.put("nature", olb.getData().getNatureOfUsage());//使用性质
|
||||
// map.put("model", olb.getData().getVclBrand());//品牌型号
|
||||
// map.put("organizationName", olb.getData().getIssuingAuthority());//发证机关
|
||||
// map.put("engineNumber", olb.getData().getEngine());//发动机号
|
||||
//
|
||||
//
|
||||
// map.put("frontImage", url1);
|
||||
// map.put("backImage", url2);
|
||||
// map.put("size", oblb.getData().getOverallDimen());//车辆尺寸
|
||||
// map.put("allCapacity", oblb.getData().getEnTn());//整备质量
|
||||
// map.put("approvedCapacity", oblb.getData().getLoadTon());//核定载质量
|
||||
// map.put("allAuality", oblb.getData().getApproveTon());//总质量
|
||||
//
|
||||
// map.put("personCapacity", oblb.getData().getPassengers());//核定载人数
|
||||
// map.put("fileNumber", oblb.getData().getRecordId());//档案编号
|
||||
// map.put("towAuality", oblb.getData().getVclDrwTn());//准牵引总质量
|
||||
|
||||
|
||||
String carLong = "";
|
||||
String carWidth = "";
|
||||
String carHeight = "";
|
||||
String note = "";
|
||||
String overallDimen = oblb.getData().getOverallDimen();
|
||||
if (overallDimen.contains("mm")) {
|
||||
String[] mms = overallDimen.split("mm");
|
||||
String mm = mms[0];
|
||||
|
||||
// String[] xes = mm.split("x");
|
||||
// String[] xes1 = mm.split("X");
|
||||
String[] xes = mm.split("×");
|
||||
if (xes.length == 3) {
|
||||
carLong = xes[0];
|
||||
carWidth = xes[1];
|
||||
carHeight = xes[2];
|
||||
}
|
||||
}
|
||||
// map.put("licenseId", oblb.getData().getLicenseId());
|
||||
map.put("carId", carId);
|
||||
map.put("carNumberDraw", str1);
|
||||
map.put("type", str2);
|
||||
map.put("owner", str3);
|
||||
// map.put("carEnergyTyp", curEnergy.getValue());
|
||||
map.put("vehicleNumber", str4);
|
||||
if (cdb != null && cdb.getRes() == 1 && cdb.getData() != null && cdb.getData().getTrailerResVo() != null) {
|
||||
map.put("oldTrailerNumber", cdb.getData().getTrailerResVo().getCarNumber());
|
||||
|
||||
try {
|
||||
String inNote = oblb.getData().getNote();
|
||||
if (inNote.contains(":")) {
|
||||
String[] split = inNote.split(":");
|
||||
if (split.length == 2) {
|
||||
note = split[1];
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
new AuthRequest().saveDrawCar(con, hd, MapUtil.mapJson(map));
|
||||
|
||||
|
||||
DriverUpBean driverUpBean = new DriverUpBean();
|
||||
DriverUpBean.DataDTO dataDTO = new DriverUpBean.DataDTO();
|
||||
driverUpBean.setCarId(carId);
|
||||
driverUpBean.setFrontImageUrl(url1);
|
||||
driverUpBean.setBackImageUrl(url2);
|
||||
driverUpBean.setCarNumber(str1);
|
||||
driverUpBean.setType(str2);
|
||||
driverUpBean.setOwner(str3);
|
||||
driverUpBean.setVehicleNumber(str4);
|
||||
driverUpBean.setCarLong(carLong);
|
||||
driverUpBean.setCarWidth(carWidth);
|
||||
driverUpBean.setCarHeight(carHeight);
|
||||
|
||||
dataDTO.setNatureOfUsage(olb.getData().getNatureOfUsage());
|
||||
dataDTO.setVclN(str1);
|
||||
dataDTO.setVcltype(str2);
|
||||
dataDTO.setOwnerName(str3);
|
||||
dataDTO.setVin(str4);
|
||||
dataDTO.setIssuingAuthority(olb.getData().getIssuingAuthority());
|
||||
dataDTO.setRegTime(olb.getData().getRegTime());
|
||||
dataDTO.setAddress(olb.getData().getAddress());
|
||||
dataDTO.setEngine(olb.getData().getEngine());
|
||||
dataDTO.setLicensedateOfissue(olb.getData().getLicensedateOfissue());
|
||||
dataDTO.setVclBrand(olb.getData().getVclBrand());
|
||||
|
||||
|
||||
dataDTO.setApproveTon(oblb.getData().getApproveTon());
|
||||
dataDTO.setRecordId(oblb.getData().getRecordId());
|
||||
dataDTO.setNote(note);
|
||||
dataDTO.setPassengers(oblb.getData().getPassengers());
|
||||
dataDTO.setVclDrwTn(oblb.getData().getVclDrwTn());
|
||||
dataDTO.setOverallDimen(oblb.getData().getOverallDimen());
|
||||
dataDTO.setEnTn(oblb.getData().getEnTn());
|
||||
dataDTO.setLoadTon(oblb.getData().getLoadTon());
|
||||
dataDTO.setInspectionRecord(oblb.getData().getInspectionRecord());
|
||||
dataDTO.setBarCode(oblb.getData().getBarCode());
|
||||
driverUpBean.setZjObj(dataDTO);
|
||||
|
||||
String json = gson.toJson(driverUpBean);
|
||||
|
||||
new AuthRequest().saveDrawCar(con, hd, json);
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -1092,11 +1423,11 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
JSONObject jsonObject = JSON.parseObject(auth.result);
|
||||
if ("success".equalsIgnoreCase(jsonObject.getString("res"))) {
|
||||
EsignSdk.getInstance().finishH5Activity();
|
||||
new MessageUtils().showSimCenPop(con, "个人信息上传成功,请添加车辆信息!", () -> {
|
||||
finish();
|
||||
new MessageUtils().showSimCenPop(con, "个人信息上传成功,请添加车辆信息!", "去添加", () -> {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 2);
|
||||
startActivity(in);
|
||||
finish();
|
||||
|
||||
});
|
||||
if ("sign".equalsIgnoreCase(jsonObject.getString("key"))) {
|
||||
|
||||
+41
-11
@@ -1,9 +1,12 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.auth;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.widget.ImageView;
|
||||
@@ -16,9 +19,14 @@ import androidx.annotation.Nullable;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
||||
import com.arpa.hndahesudintocctmsdriver.H5Activity2;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.business.BusinessActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PermissionUtils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||
import com.esign.esignsdk.EsignSdk;
|
||||
import com.esign.esignsdk.data.AuthEvent;
|
||||
import com.google.gson.Gson;
|
||||
@@ -42,6 +50,7 @@ import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||
import com.permissionx.guolindev.PermissionX;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -98,11 +107,18 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("authUrl"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
|
||||
// Intent intent = new Intent(this, H5Activity.class);
|
||||
// intent.putExtra("url", (String) bb.getData());
|
||||
// intent.putExtra("view_file", false);
|
||||
// startActivity(intent);
|
||||
EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||
Intent intent = new Intent(this, H5Activity.class);
|
||||
intent.putExtra("url", (String) bb.getData());
|
||||
intent.putExtra("view_file", false);
|
||||
// intent.putExtra("isGoCar", true);
|
||||
startActivity(intent);
|
||||
|
||||
// Bundle t = new Bundle();
|
||||
// t.putString("url",(String) bb.getData());
|
||||
// t.putBoolean("view_file", false);
|
||||
// ActivityUtils.startActivity(con, H5Activity2.class,t);
|
||||
|
||||
// EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||
} else {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||
@@ -168,13 +184,25 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
||||
// startActivityForResult(in, 12);
|
||||
//EsignSdk.getInstance().startH5Activity(act,"https://smlh5.esign.cn/usercenterFront/oemAuth/v3/realName/index?contextKey=b7b103b15b866ec4c72beef1dfe20828&appId=7438873235");
|
||||
if (key) {
|
||||
// EsignSdk.getInstance().startH5Activity(act, "");
|
||||
PermissionX.init(this)
|
||||
.permissions(Manifest.permission.CAMERA)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if(allGranted) {
|
||||
key = false;
|
||||
new AuthRequest().getAuthUrl(con, hd);
|
||||
new Handler().postDelayed(() -> {
|
||||
key = true;
|
||||
}, 3000);
|
||||
} else{
|
||||
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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
key = false;
|
||||
new AuthRequest().getAuthUrl(con, hd);
|
||||
new Handler().postDelayed(() -> {
|
||||
key = true;
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
//头像
|
||||
@@ -276,6 +304,8 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
||||
Toast.makeText(con, "签署场景成功", Toast.LENGTH_SHORT).show();
|
||||
} else if ("realName".equalsIgnoreCase(jsonObject.getString("key"))) {
|
||||
Toast.makeText(con, "实名认证成功", Toast.LENGTH_SHORT).show();
|
||||
EsignSdk.getInstance().finishH5Activity();
|
||||
finish();
|
||||
} else {
|
||||
Toast.makeText(con, "意愿认证成功", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@@ -20,10 +20,14 @@ import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.CarDelBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.IsAuthDriverAuthQualificationBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.OCRBankBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.OCRRoadBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.AuthRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.my.WoDeFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.wallet.WalletFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||
@@ -32,6 +36,7 @@ import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.PatternUtils;
|
||||
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
||||
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode;
|
||||
import com.google.gson.Gson;
|
||||
@@ -104,6 +109,17 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
CacheGroup.cacheList.remove("onlyGetDetail");
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("ORCRoadLicZj") != null) {
|
||||
OCRRoadBean ib = new Gson().fromJson(CacheGroup.cacheList.get("ORCRoadLicZj"), OCRRoadBean.class);
|
||||
customDialog.dismiss();
|
||||
if (ib.getCode() == 200 && ib.getData() != null) {
|
||||
value1.setText(PatternUtils.getNumByStr(ib.getData().getLicenseNumber()));
|
||||
} else {
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("ORCRoadLicZj");
|
||||
}
|
||||
|
||||
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
UploadBean ub = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
@@ -118,22 +134,29 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 5);
|
||||
break;
|
||||
case 3:
|
||||
//道路运输证ocr识别
|
||||
new OCRRequest().ORCRoadLicZj(con, hd, ub.getData().getUrl());
|
||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 2);
|
||||
break;
|
||||
case 4:
|
||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 7);
|
||||
break;
|
||||
default:
|
||||
if (customDialog != null && customDialog.isShowing())
|
||||
customDialog.dismiss();
|
||||
break;
|
||||
}
|
||||
url = ub.getData().getUrl();
|
||||
// Glide.with(con).load(url).into(img);
|
||||
Glide.with(con).load(path).into(img);
|
||||
|
||||
if (customDialog != null && customDialog.isShowing())
|
||||
customDialog.dismiss();
|
||||
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("saveCarImg") != null) {
|
||||
if (customDialog != null && customDialog.isShowing())
|
||||
customDialog.dismiss();
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("saveCarImg"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
switch (type) {
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.home;
|
||||
|
||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Outline;
|
||||
import android.location.Location;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
@@ -23,6 +28,7 @@ import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.alct.mdp.MDPLocationCollectionManager;
|
||||
import com.alct.mdp.callback.OnDownloadResultListener;
|
||||
@@ -51,6 +57,8 @@ import com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivi
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.news.NewActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.wallet.UpBankActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.OneDayShowUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PermissionUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
import com.bumptech.glide.Glide;
|
||||
@@ -103,8 +111,11 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import pub.devrel.easypermissions.EasyPermissions;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
@@ -138,6 +149,8 @@ public class HomeFragment extends BaseFragment {
|
||||
private ImageConfig ic;
|
||||
private DriverExpireBean deb;
|
||||
|
||||
private XToast xToast;
|
||||
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
@@ -175,13 +188,13 @@ public class HomeFragment extends BaseFragment {
|
||||
MsgUtil.addHdMsgWat(hd, 33);
|
||||
|
||||
//新用户注册,需弹窗提示注册
|
||||
if ("0".equals(ub.getData().getRealAuthentication())) {
|
||||
new MessageUtils().showSimCenPop(con, "该司机还未认证,未认证无法接单。是否去注册!", () -> {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 0);
|
||||
startActivity(in);
|
||||
});
|
||||
}
|
||||
// if ("0".equals(ub.getData().getRealAuthentication())) {
|
||||
// new MessageUtils().showSimCenPop(con, "该司机还未认证,未认证无法接单。是否去注册!", () -> {
|
||||
// Intent in = new Intent(con, CertificatesActivity.class);
|
||||
// in.putExtra("index", 0);
|
||||
// startActivity(in);
|
||||
// });
|
||||
// }
|
||||
} else {
|
||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -195,10 +208,22 @@ public class HomeFragment extends BaseFragment {
|
||||
initStart();
|
||||
StartOrderParts.setStartOrder(con, sob);
|
||||
if (sob.getData() != null && !sob.getData().getWaybillStatus().equals("已取消")) {
|
||||
dealCurWay(sob.getData());
|
||||
ur.getJtts(sob.getData().getShippingNoteNumber());
|
||||
StartOrderBean.DataDTO.WayChildrenDTO xData = null;
|
||||
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
||||
if (2 == sob.getData().getWayChildren().get(i).getType()) {
|
||||
xData = sob.getData().getWayChildren().get(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (xData != null && xData.getStatus() == 3) {
|
||||
SPUtils.remove(con, "curWaybillId");
|
||||
llCurWay.setVisibility(View.GONE);
|
||||
} else {
|
||||
dealCurWay(sob.getData());
|
||||
ur.getJtts(sob.getData().getShippingNoteNumber());
|
||||
}
|
||||
} else {
|
||||
SPUtils.remove(con,"curWaybillId");
|
||||
SPUtils.remove(con, "curWaybillId");
|
||||
llCurWay.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
@@ -233,6 +258,35 @@ public class HomeFragment extends BaseFragment {
|
||||
if (CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA) != null) {
|
||||
DriverAuthDataBean dad = gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA), DriverAuthDataBean.class);
|
||||
if (dad.getCode() == 200) {
|
||||
if (dad.getData() == null) {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少身份证,未认证无法接单。是否去添加!","去添加", () -> {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 0);
|
||||
startActivity(in);
|
||||
});
|
||||
CacheGroup.cacheList.remove(WoDeFragment.AUTH_DATA);
|
||||
return;
|
||||
}
|
||||
if (dad.getData() != null && TextUtils.isEmpty(dad.getData().getIdcard())) {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少身份证,未认证无法接单。是否去添加!", "去添加",() -> {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 0);
|
||||
startActivity(in);
|
||||
});
|
||||
} else if (dad.getData() != null && TextUtils.isEmpty(dad.getData().getCardNo())) {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少银行卡,未认证无法接单。是否去添加!", "去添加",() -> {
|
||||
Intent in333 = new Intent(con, UpBankActivity.class);
|
||||
in333.putExtra("type", 1);
|
||||
startActivity(in333);
|
||||
});
|
||||
} else if (dad.getData() != null && TextUtils.isEmpty(dad.getData().getDriverLicense())) {
|
||||
new MessageUtils().showSimCenPop(con, "该司机缺少驾驶证,未认证无法接单。是否去添加!", "去添加",() -> {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 0);
|
||||
startActivity(in);
|
||||
});
|
||||
}
|
||||
|
||||
SPUtil.insSP(con, "data", "authdata", CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA));
|
||||
if (dad.getData() != null && 100003 == dad.getData().getAuditStatus()) {
|
||||
initAlct();
|
||||
@@ -277,8 +331,12 @@ public class HomeFragment extends BaseFragment {
|
||||
if (!TextUtils.isEmpty(deb.getData().getDriverLicenseUpdateUrl()) || !TextUtils.isEmpty(deb.getData().getIdCardUpdateUrl()) ||
|
||||
!TextUtils.isEmpty(deb.getData().getQualificationUpdateUrl()) || !TextUtils.isEmpty(deb.getData().getRoadLicenseUpdateUrl()) ||
|
||||
!TextUtils.isEmpty(deb.getData().getInsuranceUpdateUrl())) {
|
||||
new XToast<>(act)
|
||||
.setContentView(R.layout.view_bc)
|
||||
if (xToast == null) {
|
||||
xToast = new XToast(act);
|
||||
} else if (xToast != null && xToast.isShow()) {
|
||||
xToast.cancel();
|
||||
}
|
||||
xToast.setContentView(R.layout.view_bc)
|
||||
// 设置成可拖拽的
|
||||
.setDraggable()
|
||||
// 设置显示时长
|
||||
@@ -293,6 +351,22 @@ public class HomeFragment extends BaseFragment {
|
||||
// 设置窗口背景阴影强度
|
||||
//.setBackgroundDimAmount(0.5f)
|
||||
.showAsDropDown(home_top, Gravity.BOTTOM, 1200, 1000);
|
||||
// new XToast<>(act)
|
||||
// .setContentView(R.layout.view_bc)
|
||||
// // 设置成可拖拽的
|
||||
// .setDraggable()
|
||||
// // 设置显示时长
|
||||
// .setDuration(1000 * 60 * 60 * 12)
|
||||
// .setOnClickListener(R.id.img_kf, (toast, view) -> {
|
||||
// toast.startActivity(in);
|
||||
// Log.e("-is-", view.isInTouchMode() + "");
|
||||
// })
|
||||
// // 设置动画样式
|
||||
// //.setAnimStyle(android.R.style.Animation_Translucent)
|
||||
// // 设置外层是否能被触摸
|
||||
// // 设置窗口背景阴影强度
|
||||
// //.setBackgroundDimAmount(0.5f)
|
||||
// .showAsDropDown(home_top, Gravity.BOTTOM, 1200, 1000);
|
||||
}
|
||||
CacheGroup.cacheList.remove("driverExpire");
|
||||
}
|
||||
@@ -521,18 +595,35 @@ public class HomeFragment extends BaseFragment {
|
||||
v1.setOnClickListener(v2 -> {
|
||||
switch (position) {
|
||||
case 0:
|
||||
//startActivity(new Intent(con, OrderListActivity.class));
|
||||
PermissionX.init(getActivity())
|
||||
.permissions(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
PermissionUtils.Companion.getInstance().showPermissionMessage(getActivity(), "位置权限使用说明", "用于向您推荐可能感兴趣的住宿、饮食、加油站、汽车维修等",
|
||||
new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
|
||||
(allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
Intent in = new Intent(con, BusinessActivity.class);
|
||||
in.putExtra("type", "餐饮");
|
||||
startActivity(in);
|
||||
} else {
|
||||
Toast.makeText(act.getBaseContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
||||
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(act.getBaseContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
//startActivity(new Intent(con, OrderListActivity.class));
|
||||
// PermissionX.init(getActivity())
|
||||
// .permissions(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
// .request((allGranted, grantedList, deniedList) -> {
|
||||
// if (allGranted) {
|
||||
// Intent in = new Intent(con, BusinessActivity.class);
|
||||
// in.putExtra("type", "餐饮");
|
||||
// startActivity(in);
|
||||
// } else {
|
||||
// Toast.makeText(act.getBaseContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
||||
// }
|
||||
// });
|
||||
//Toast.makeText(con,"定位开启失败,请检查配置项",Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
case 1:
|
||||
@@ -556,6 +647,11 @@ public class HomeFragment extends BaseFragment {
|
||||
in5.putExtra("url", "https://ks.wjx.top/vm/h6Jqu8A.aspx");
|
||||
in5.putExtra("title", "知识竞猜");
|
||||
startActivity(in5);
|
||||
|
||||
// Intent in = new Intent(getContext(), WebActivity.class);
|
||||
// in.putExtra("url", "http://192.168.1.152:8080");
|
||||
// in.putExtra("title", "隐私政策");
|
||||
// getContext().startActivity(in);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -594,7 +690,7 @@ public class HomeFragment extends BaseFragment {
|
||||
|
||||
llCurWay.setVisibility(View.VISIBLE);
|
||||
tvWaybill.setText(data.getShippingNoteNumber());
|
||||
tvGo.setText(getGoText(zData.getStatus(),xData.getStatus()));
|
||||
tvGo.setText(getGoText(zData.getStatus(), xData.getStatus()));
|
||||
if (data.getWaybillStatus().equals("待装货")) {
|
||||
tvZX.setText(zData.getAddress());
|
||||
ivType.setBackgroundResource(R.mipmap.zhuang);
|
||||
@@ -641,8 +737,8 @@ public class HomeFragment extends BaseFragment {
|
||||
in.putExtra("sob", gson.toJson(sob));
|
||||
in.putExtra("keys", true);
|
||||
startActivity(in);
|
||||
}else{
|
||||
ToastUtils.showToast(con,"已完成该运单");
|
||||
} else {
|
||||
ToastUtils.showToast(con, "已完成该运单");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -684,9 +780,13 @@ public class HomeFragment extends BaseFragment {
|
||||
if (UiAuxiliary.isLogin(con)) {
|
||||
int curWaybillId = (int) SPUtils.get(con, "curWaybillId", -1);
|
||||
ur.User();
|
||||
qr.getBankCardList();
|
||||
// if (!OneDayShowUtils.getInstance().todayIsShow(con)) {
|
||||
// qr.getBankCardList();
|
||||
// }
|
||||
ur.getDriverExpire();
|
||||
hyr.startOrder(curWaybillId==-1 ? 0 : curWaybillId);
|
||||
hyr.startOrder(curWaybillId == -1 ? 0 : curWaybillId);
|
||||
// hyr.startOrder(0);
|
||||
//获取权限 应用市场审核不通过
|
||||
ur.driverAuthData();
|
||||
}
|
||||
// oldTime= Calendar.getInstance().getTimeInMillis();
|
||||
@@ -745,8 +845,13 @@ public class HomeFragment extends BaseFragment {
|
||||
Log.e("开始轨迹上传服务", "-----");
|
||||
orderNum.setText("运单号:" + sob.getData().getShippingNoteNumber());
|
||||
order_state.setText("" + sob.getData().getWaybillStatus());
|
||||
Intent serviceIn = new Intent(con, TrackService.class);
|
||||
getActivity().startService(serviceIn);
|
||||
try {
|
||||
Intent serviceIn = new Intent(con, TrackService.class);
|
||||
getActivity().startService(serviceIn);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else {
|
||||
SPUtil.insSP(con, "order", "ShippingNoteNumber", "");
|
||||
order_start.setVisibility(View.GONE);
|
||||
@@ -1036,29 +1141,64 @@ public class HomeFragment extends BaseFragment {
|
||||
// }
|
||||
|
||||
public void initAlct() {
|
||||
PermissionX.init(getActivity())
|
||||
.permissions(Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.RECORD_AUDIO)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
// if (!OneDayShowUtils.getInstance().todayIsShowQx(con)){
|
||||
// boolean b = EasyPermissions.hasPermissions(getActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
// Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
// Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
// Manifest.permission.ACCESS_COARSE_LOCATION);
|
||||
// if (b) {
|
||||
// ALProcess.verification(con);
|
||||
// }
|
||||
PermissionX.init(getActivity())
|
||||
.permissions(Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
ALProcess.verification(con);
|
||||
} else {
|
||||
boolean accessCoarseLocation = deniedList.contains("android.permission.ACCESS_FINE_LOCATION");
|
||||
boolean contains = deniedList.contains("android.permission.WRITE_EXTERNAL_STORAGE");
|
||||
boolean camear = deniedList.contains("android.permission.CAMERA");
|
||||
if (accessCoarseLocation | contains) {
|
||||
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);
|
||||
});
|
||||
} else if (camear) {
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
}
|
||||
});
|
||||
// }
|
||||
|
||||
}
|
||||
});
|
||||
ALProcess.verification(con);
|
||||
MDPLocationCollectionManager.getInvoices(con, 10, 1, new OnDownloadResultListener() {
|
||||
@Override
|
||||
public void onSuccess(Object o) {
|
||||
Log.e("--成功信息--", new Gson().toJson(o));
|
||||
}
|
||||
} else {
|
||||
ALProcess.verification(con);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("--失败信息--", s + s1);
|
||||
}
|
||||
});
|
||||
// ALProcess.verification(con);
|
||||
// MDPLocationCollectionManager.getInvoices(con, 10, 1, new OnDownloadResultListener() {
|
||||
// @Override
|
||||
// public void onSuccess(Object o) {
|
||||
// Log.e("--成功信息--", new Gson().toJson(o));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailure(String s, String s1) {
|
||||
// Log.e("--失败信息--", s + s1);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
private MyLocationStyle myLocationStyle;//地图定位样式
|
||||
@@ -1136,8 +1276,14 @@ public class HomeFragment extends BaseFragment {
|
||||
|
||||
@Subscribe
|
||||
public void processResult(HomeWaybillEvent home) {
|
||||
int curWaybillId = (int) SPUtils.get(con, "curWaybillId", -1);
|
||||
hyr.startOrder(curWaybillId==-1 ? 0 : curWaybillId);
|
||||
if (home.getMessage() == 1) {
|
||||
hyr.getHuoYuan(1, 100);
|
||||
} else {
|
||||
int curWaybillId = (int) SPUtils.get(con, "curWaybillId", -1);
|
||||
hyr.startOrder(curWaybillId == -1 ? 0 : curWaybillId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class Model {
|
||||
|
||||
+103
-48
@@ -1,5 +1,7 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.home;
|
||||
|
||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
@@ -8,6 +10,7 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.provider.Settings;
|
||||
import android.text.Html;
|
||||
import android.text.Layout;
|
||||
import android.text.TextUtils;
|
||||
@@ -29,16 +32,18 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.ToH5Bean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.WaybillStatusBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.FaceEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.PdfResEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeWaybillEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.PersonalAuthActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.img.ImageGetUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
@@ -69,6 +74,7 @@ import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||
import com.permissionx.guolindev.PermissionX;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -112,16 +118,17 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
//Toast.makeText(con,"接单成功",Toast.LENGTH_SHORT).show();
|
||||
customDialog.dismiss();
|
||||
// EsignSdk.getInstance().startH5Activity(act, (String) bb.getData());
|
||||
if (null==bb.getData()){
|
||||
if (null == bb.getData()) {
|
||||
UiAuxiliary.homeRequest("接单");
|
||||
Intent in = new Intent(con, StartYunDanActivity.class);
|
||||
in.putExtra("id", "0");
|
||||
startActivity(in);
|
||||
finish();
|
||||
}else{
|
||||
} else {
|
||||
Intent intent = new Intent(this, H5Activity.class);
|
||||
intent.putExtra("url", (String) bb.getData());
|
||||
intent.putExtra("view_file", false);
|
||||
intent.putExtra("title", "合同签署");
|
||||
startActivity(intent);
|
||||
}
|
||||
//finish();
|
||||
@@ -143,6 +150,38 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
CacheGroup.cacheList.remove("jttRes");
|
||||
}
|
||||
|
||||
|
||||
if (CacheGroup.cacheList.get("orderStatus") != null) {
|
||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
Log.e("orderStatus", CacheGroup.cacheList.get("orderStatus"));
|
||||
WaybillStatusBean status = gson.fromJson(CacheGroup.cacheList.get("orderStatus"), WaybillStatusBean.class);
|
||||
if (status.getCode() == 200) {
|
||||
if (status.getData() != null) {
|
||||
//执行运单下一步操作
|
||||
new XPopup.Builder(con)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认接单", "是否确定承运此运单?",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
Log.e("--id--", "cid:" + cid + "---wid:" + id);
|
||||
hyr.confirm(cid, id);
|
||||
}, () -> customDialog.dismiss(), false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
} else {//订单已取消
|
||||
new MessageUtils().showSimCenPop(con, "运单异常将无法进行下步操作,请返回首页", "取消", "确定", () -> {
|
||||
SPUtils.remove(con, "curWaybillId");
|
||||
EventBus.getDefault().post(new HomeWaybillEvent(1));
|
||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(con, status.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("orderStatus");
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
int index = Integer.valueOf((String) m.obj);
|
||||
@@ -150,28 +189,18 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
car.setText("选择车辆:" + clb.getData().get(index).getCarNumber());
|
||||
cid = clb.getData().get(index).getCarId();
|
||||
break;
|
||||
|
||||
case 1111://安联用户验证通过,接单
|
||||
new XPopup.Builder(con)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认接单", "是否确定承运此运单?",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
ToH5Bean toH5Bean = new ToH5Bean();
|
||||
toH5Bean.setId(id);
|
||||
toH5Bean.setCarNumber(car.getText().toString().substring("选择车辆:".length()));
|
||||
toH5Bean.setCarId(cid);
|
||||
Log.e("--id--", "cid:" + cid + "---wid:" + id);
|
||||
Intent in = new Intent(con, WebActivity.class);
|
||||
in.putExtra("url", "https://platform.test.dahehuoyun.com/contract/dist/#/contracttemplate");
|
||||
in.putExtra("id", id);
|
||||
in.putExtra("ToH5Bean",toH5Bean);
|
||||
in.putExtra("title", "合同签署");
|
||||
// startActivity(in);
|
||||
|
||||
startActivityForResult(in,1);
|
||||
|
||||
}, () -> customDialog.dismiss(), false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
hyr.getOrderStatus(id);
|
||||
// new XPopup.Builder(con)
|
||||
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
// .asConfirm("请确认接单", "是否确定承运此运单?",
|
||||
// "取消", "确认",
|
||||
// () -> {
|
||||
// Log.e("--id--", "cid:" + cid + "---wid:" + id);
|
||||
// hyr.confirm(cid, id);
|
||||
// }, () -> customDialog.dismiss(), false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
// .show();
|
||||
break;
|
||||
case 2222://安联用户验证不通过
|
||||
customDialog.dismiss();
|
||||
@@ -235,9 +264,9 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
});
|
||||
totalFreight.setText("****");
|
||||
checkBox.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
if (isChecked){
|
||||
if (isChecked) {
|
||||
totalFreight.setText(hyd.getData().getTotalFreight());
|
||||
}else{
|
||||
} else {
|
||||
totalFreight.setText("****");
|
||||
}
|
||||
// totalFreight.setTransformationMethod(isChecked? HideReturnsTransformationMethod.getInstance(): PasswordTransformationMethod.getInstance());
|
||||
@@ -390,7 +419,6 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
// }, 2500);
|
||||
|
||||
|
||||
|
||||
// new Handler().postDelayed(() -> {
|
||||
//
|
||||
//
|
||||
@@ -450,31 +478,58 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (resultCode == RESULT_OK&&requestCode==1){
|
||||
//签合同后接单
|
||||
// String pdfUrl = data.getStringExtra("pdfUrl");
|
||||
// hyr.confirm(cid,pdfUrl, id);
|
||||
|
||||
UiAuxiliary.homeRequest("接单");
|
||||
Intent in = new Intent(con, StartYunDanActivity.class);
|
||||
in.putExtra("id", "0");
|
||||
startActivity(in);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 接单
|
||||
* 先判断安联用户信息验证,随后接单
|
||||
*/
|
||||
private void reOrder() {
|
||||
customDialog = new CustomDialog(con, "正在接单...");
|
||||
customDialog.show();
|
||||
//验证安联用户是否通过
|
||||
ALProcess.verification(con, hd);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
try {
|
||||
PermissionX.init(this)
|
||||
.permissions(Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
customDialog = new CustomDialog(con, "正在接单...");
|
||||
customDialog.show();
|
||||
//验证安联用户是否通过
|
||||
ALProcess.verification(con, hd);
|
||||
} else {
|
||||
boolean accessCoarseLocation = deniedList.contains("android.permission.ACCESS_FINE_LOCATION");
|
||||
boolean contains = deniedList.contains("android.permission.WRITE_EXTERNAL_STORAGE");
|
||||
if (accessCoarseLocation | contains) {
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
customDialog = new CustomDialog(con, "正在接单...");
|
||||
customDialog.show();
|
||||
//验证安联用户是否通过
|
||||
ALProcess.verification(con, hd);
|
||||
}
|
||||
|
||||
} else {
|
||||
customDialog = new CustomDialog(con, "正在接单...");
|
||||
customDialog.show();
|
||||
//验证安联用户是否通过
|
||||
ALProcess.verification(con, hd);
|
||||
}
|
||||
|
||||
|
||||
// customDialog = new CustomDialog(con, "正在接单...");
|
||||
// customDialog.show();
|
||||
// //验证安联用户是否通过
|
||||
// ALProcess.verification(con, hd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -186,9 +186,11 @@ public class OrderAllActivity extends BaseActivity {
|
||||
case 200006:
|
||||
state4.setTextColor(getResources().getColor(R.color.blue));
|
||||
state4.setText(" 已评价");
|
||||
case 200005:
|
||||
state3.setTextColor(getResources().getColor(R.color.blue));
|
||||
state3.setText(" 已结算");
|
||||
case 200005:
|
||||
// state3.setTextColor(getResources().getColor(R.color.blue));
|
||||
// state3.setText(" 已结算");
|
||||
case 200004:
|
||||
state2.setTextColor(getResources().getColor(R.color.blue));
|
||||
state2.setText(" 已卸货");
|
||||
|
||||
+18
-7
@@ -3,6 +3,7 @@ package com.arpa.hndahesudintocctmsdriver.ui.home;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.animation.AlphaAnimation;
|
||||
@@ -106,10 +107,10 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
switch (m.what) {
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
//获取页面数据
|
||||
if (CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER) != null && CacheGroup.cacheList.get(GET_EVALUTE) != null) {
|
||||
if (CacheGroup.cacheList.get("refreshorderDetail") != null && CacheGroup.cacheList.get(GET_EVALUTE) != null) {
|
||||
Log.e("-评论-", CacheGroup.cacheList.get(GET_EVALUTE));
|
||||
Log.e("-运单-", CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER));
|
||||
sob = gson.fromJson(CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER), StartOrderBean.class);
|
||||
Log.e("-运单-", CacheGroup.cacheList.get("refreshorderDetail"));
|
||||
sob = gson.fromJson(CacheGroup.cacheList.get("refreshorderDetail"), StartOrderBean.class);
|
||||
wnb = gson.fromJson(CacheGroup.cacheList.get(GET_EVALUTE), WNewsBean.class);
|
||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
@@ -125,7 +126,7 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
} else {
|
||||
Toast.makeText(con, sob.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(HuoYuanFragmengt.START_ORDER);
|
||||
CacheGroup.cacheList.remove("refreshorderDetail");
|
||||
CacheGroup.cacheList.remove(GET_EVALUTE);
|
||||
}
|
||||
//保存评价
|
||||
@@ -483,9 +484,15 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
if (map != null) {
|
||||
map.onResume();
|
||||
}
|
||||
customDialog = new CustomDialog(con, "网络请求中...");
|
||||
customDialog.show();
|
||||
hyr.startOrder(id);
|
||||
if (customDialog==null){
|
||||
customDialog = new CustomDialog(con, "网络请求中...");
|
||||
customDialog.show();
|
||||
}else{
|
||||
if (!customDialog.isShowing()){
|
||||
customDialog.show();
|
||||
}
|
||||
}
|
||||
hyr.startOrder2(id);
|
||||
hyr.getEvaluate(id);
|
||||
}
|
||||
|
||||
@@ -596,6 +603,10 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
|
||||
|
||||
public void search() {
|
||||
String latitude = sob.getData().getWayChildren().get((sob.getData().getWayChildren().size() - 1)).getLatitude();
|
||||
if (TextUtils.isEmpty(latitude)) {
|
||||
return;
|
||||
}
|
||||
// try {
|
||||
// AMapLocationClient.updatePrivacyShow(con,true,true);
|
||||
// AMapLocationClient.updatePrivacyAgree(con,true);
|
||||
|
||||
+132
-8
@@ -1,8 +1,12 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan;
|
||||
|
||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
||||
|
||||
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;
|
||||
@@ -15,16 +19,19 @@ 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.alct.mdp.model.ShipmentStatusEnum;
|
||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.CarInfoBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.WaybillStatusBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeWaybillEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.BitmapUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.NfcUtils;
|
||||
@@ -35,6 +42,8 @@ import com.arpa.hndahesudintocctmsdriver.util.location.LocationUtil;
|
||||
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;
|
||||
@@ -92,6 +101,8 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
||||
private boolean locationKey = false;
|
||||
private TextView tv_loaction;
|
||||
|
||||
private boolean isFinish = false;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
@@ -116,6 +127,28 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
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);
|
||||
@@ -129,8 +162,18 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
||||
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]);
|
||||
@@ -155,6 +198,9 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
||||
if (sob.getData().getCarNumber().equals(value)) {
|
||||
hyr.uploadFile(new File(path));
|
||||
} else {
|
||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
new MessageUtils().showCenMessage(ShangChuangImgActivity.this, "车牌号不匹配!", "请重新拍照或联系管理员");
|
||||
}
|
||||
} else {
|
||||
@@ -191,7 +237,16 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
tv_loaction.setText("定位失败,点击重试");
|
||||
tv_loaction.setTextColor(getResources().getColor(R.color.loaction_no_color, null));
|
||||
Toast.makeText(con, "定位失败,请确认开启定位后重试!", Toast.LENGTH_LONG).show();
|
||||
|
||||
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;
|
||||
@@ -255,6 +310,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
||||
sobStr = getIntent().getExtras().getString("sob");
|
||||
//Log.e("---sdwStr--",sdwStr);
|
||||
sob = new Gson().fromJson(sobStr, StartOrderBean.class);
|
||||
|
||||
initView(null);
|
||||
customDialog = new CustomDialog(con, "正在定位当前位置...");
|
||||
customDialog.show();
|
||||
@@ -299,7 +355,9 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
submit.setOnClickListener(v -> {
|
||||
if (imgIds.size() != 0) {
|
||||
typeRequest();
|
||||
//判断运单是否已取消
|
||||
hyr.getWaybillStatus(sob.getData().getWaybillId());
|
||||
// typeRequest();
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传一张图片", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -398,16 +456,47 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
||||
Log.e("--装货信息", gson.toJson(lub));
|
||||
if (locationKey) {//高德定位
|
||||
if (keys) {
|
||||
nfc();
|
||||
loadInfo();
|
||||
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;
|
||||
@@ -422,16 +511,45 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
||||
Log.e("--卸货信息", gson.toJson(lub));
|
||||
if (locationKey) {
|
||||
if (keys) {
|
||||
nfc();
|
||||
uploadInfo();
|
||||
MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
||||
@Override
|
||||
public void onSuccess(Object o) {
|
||||
if (o.toString().equals("UNLOADED")) {//安联装货,单平台未装货
|
||||
//卸货状态-平台
|
||||
isFinish = true;
|
||||
hyr.dischargeCargo(lub);
|
||||
} else {
|
||||
nfc();
|
||||
uploadInfo();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showToast(con, s1);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// nfc();
|
||||
// uploadInfo();
|
||||
|
||||
}
|
||||
|
||||
} 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;
|
||||
@@ -456,9 +574,15 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
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;
|
||||
@@ -648,7 +772,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
SPUtils.remove(con,"curWaybillId");
|
||||
SPUtils.remove(con, "curWaybillId");
|
||||
EventBus.getDefault().post(new HomeWaybillEvent());
|
||||
Log.e("上报安联", "回单照片上传成功");
|
||||
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||
|
||||
@@ -103,7 +103,7 @@ public class LoginActivity extends BaseActivity {
|
||||
SPUtil.insSP(con, USER, USER_UNAME, loginBean.getData().getUname());
|
||||
SPUtil.insSP(con, USER, USER_RNAME, loginBean.getData().getRname());
|
||||
SPUtil.insSP(con, USER, USER_ID, loginBean.getData().getId() + "");
|
||||
JPushInterface.setAlias(con, 0, loginBean.getData().getUname());
|
||||
// JPushInterface.setAlias(con, 0, loginBean.getData().getUname());
|
||||
appInfoBean.setStatus("0");
|
||||
appInfoBean.setUserPhone(String.valueOf(input_phone.getText()));
|
||||
ur.postAppInfo(appInfoBean,"post");
|
||||
|
||||
@@ -343,8 +343,8 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
||||
// 路由初始化
|
||||
JVerificationInterface.setDebugMode(true);
|
||||
JVerificationInterface.init(con, 5000, (code, msg) -> Log.d("tag", "code = " + code + " msg = " + msg));
|
||||
// JVerificationInterface.setDebugMode(true);
|
||||
// JVerificationInterface.init(con, 5000, (code, msg) -> Log.d("tag", "code = " + code + " msg = " + msg));
|
||||
//友盟
|
||||
//设置非debug版本开启
|
||||
if (!isDebugVersion(con)) {
|
||||
|
||||
@@ -13,8 +13,14 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverAuthDataBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.AuthRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.my.WoDeFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickHelper;
|
||||
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickListener;
|
||||
import com.bumptech.glide.Glide;
|
||||
@@ -35,6 +41,8 @@ import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
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 java.io.File;
|
||||
import java.util.List;
|
||||
@@ -54,8 +62,12 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
public GetImageAlert gia = new GetImageAlert();
|
||||
String path;
|
||||
private OCRBankBean ib;
|
||||
DriverAuthDataBean dad;
|
||||
|
||||
boolean isAuth = false;
|
||||
private WalletRequest qr;
|
||||
private TextView tp;
|
||||
private String imageId;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
@@ -65,15 +77,37 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
if (CacheGroup.cacheList.get("OCR_BANK") != null) {
|
||||
ib = new Gson().fromJson(CacheGroup.cacheList.get("OCR_BANK"), OCRBankBean.class);
|
||||
customDialog.dismiss();
|
||||
if (ib.getCode() == 200) {
|
||||
if (ib.getCode() == 200&&ib.getData()!=null) {
|
||||
initView(null);
|
||||
WalletFragment.isInsBank = true;
|
||||
} else {
|
||||
Toast.makeText(con, ib.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("OCR_BANK");
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA) != null) {
|
||||
dad = new Gson().fromJson(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA), DriverAuthDataBean.class);
|
||||
if (dad.getCode() == 200) {
|
||||
if (dad.getData() != null && !TextUtils.isEmpty(dad.getData().getCardNo())) {
|
||||
isAuth = true;
|
||||
skip.setVisibility(View.GONE);
|
||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||
bank_name.setText(dad.getData().getBankName());
|
||||
bank_number.setText(dad.getData().getCardNo());
|
||||
Glide.with(con).load(dad.getData().getBankImgUrl()).into(up_bank_img);
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(con, dad.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(WoDeFragment.AUTH_DATA);
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("insBank") != null) {
|
||||
if (customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
BaseBean bb = new Gson().fromJson(CacheGroup.cacheList.get("insBank"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
if (type == 1) {
|
||||
@@ -81,7 +115,6 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
in.putExtra("index", 1);
|
||||
startActivity(in);
|
||||
}
|
||||
customDialog.dismiss();
|
||||
Toast.makeText(con, "绑定成功", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
} else {
|
||||
@@ -89,12 +122,26 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
}
|
||||
CacheGroup.cacheList.remove("insBank");
|
||||
}
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
UploadBean ub = new Gson().fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
imageId = ub.getData().getId()+"";
|
||||
new OCRRequest().ORCBankZj(con, hd, ub.getData().getUrl());
|
||||
|
||||
} else {
|
||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
}
|
||||
break;
|
||||
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||
customDialog = new CustomDialog(con, "上传识别中...");
|
||||
customDialog.show();
|
||||
path = (String) m.obj;
|
||||
new OCRRequest().ORCBank(con, hd, new File(path));
|
||||
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
|
||||
// new OCRRequest().ORCBank(con, hd, new File(path));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -127,7 +174,13 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
return_btn = findViewById(R.id.return_btn);
|
||||
qr = new WalletRequest(con, hd);
|
||||
up_bank_img.setOnClickListener(v -> {
|
||||
gia.showPopueWindow(this);
|
||||
if (isAuth) {
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(up_bank_img, dad.getData().getBankImgUrl(), new SmartGlideImageLoader(R.mipmap.ic_launcher_round))
|
||||
.show();
|
||||
} else {
|
||||
gia.showPopueWindow(this);
|
||||
}
|
||||
});
|
||||
submit.setOnClickListener(new OnLimitClickHelper(this));
|
||||
skip.setOnClickListener(new OnLimitClickHelper(this));
|
||||
@@ -140,14 +193,16 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
} else {
|
||||
skip.setVisibility(View.GONE);
|
||||
}
|
||||
UserRequset ur = new UserRequset(con, hd);
|
||||
ur.driverAuthData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
bank_name.setText(ib.getData().getBankName());
|
||||
bank_number.setText(ib.getData().getBankCardNumber());
|
||||
Glide.with(con).load(ib.getData().getUrl()).into(up_bank_img);
|
||||
bank_number.setText(ib.getData().getCardNumber());
|
||||
Glide.with(con).load(path).into(up_bank_img);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -186,10 +241,11 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
}
|
||||
InsBankInputBean ibib = new InsBankInputBean();
|
||||
ibib.setCardNo(bankNumber);
|
||||
ibib.setCardType(Integer.parseInt(ib.getData().getBankCardType()));
|
||||
// ibib.setCardType(Integer.parseInt(ib.getData().getType()));
|
||||
ibib.setCardType(1);
|
||||
ibib.setBankName(bankName);
|
||||
ibib.setCardUserType(1);
|
||||
ibib.setImageId(ib.getData().getId());
|
||||
ibib.setImageId(Integer.parseInt(imageId));
|
||||
Log.e("-res-", new Gson().toJson(ibib));
|
||||
qr.insBankCard(ibib);
|
||||
}
|
||||
@@ -198,6 +254,13 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.submit:
|
||||
if (isAuth) {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 1);
|
||||
startActivity(in);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
if (ib != null) {
|
||||
submit();
|
||||
} else {
|
||||
@@ -205,7 +268,7 @@ public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClic
|
||||
}
|
||||
break;
|
||||
case R.id.skip:
|
||||
new MessageUtils().showSimCenPop(con, "确定跳过银行卡?,可能会导致运费无法结算!","取消","确认", () -> {
|
||||
new MessageUtils().showSimCenPop(con, "确定跳过银行卡?,可能会导致运费无法结算!", "取消", "确认", () -> {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 1);
|
||||
startActivity(in);
|
||||
|
||||
@@ -15,6 +15,8 @@ import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.WalletEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
@@ -32,6 +34,8 @@ import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
@@ -123,6 +127,7 @@ public class WalletFragment extends BaseFragment{
|
||||
@Override
|
||||
public View onCreateView(@NonNull @NotNull LayoutInflater inflater, @Nullable @org.jetbrains.annotations.Nullable ViewGroup container, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
|
||||
root=inflater.inflate(R.layout.fragmengt_qianbao,container,false);
|
||||
EventBus.getDefault().register(this);
|
||||
dataName2="bcb";
|
||||
con=root.getContext();
|
||||
rv=root.findViewById(R.id.rv);
|
||||
@@ -317,5 +322,14 @@ public class WalletFragment extends BaseFragment{
|
||||
// .show();
|
||||
// }
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void processResult(WalletEvent event) {
|
||||
Log.e("-msg-", event.getMessage());
|
||||
refreshLayout.autoRefresh();
|
||||
}
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,26 +15,18 @@ import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.ToH5Bean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.UserBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.PdfResEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PaxWebChromeClient;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
@@ -46,12 +38,9 @@ public class WebActivity extends BaseActivity {
|
||||
|
||||
private String url = "";
|
||||
private String title = "";
|
||||
private int id = -1;
|
||||
private WebView wv;
|
||||
private TextView title_tv;
|
||||
private ProgressBar progressBar;
|
||||
private PaxWebChromeClient chromeClient;
|
||||
private ToH5Bean toH5Bean;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
@@ -61,15 +50,11 @@ public class WebActivity extends BaseActivity {
|
||||
con=this;
|
||||
initHardwareAccelerate();
|
||||
wv = findViewById(R.id.wv);
|
||||
progressBar = findViewById(R.id.progressBar);
|
||||
title_tv = findViewById(R.id.title);
|
||||
Intent in = getIntent();
|
||||
url = in.getExtras().getString("url");
|
||||
title = in.getExtras().getString("title");
|
||||
toH5Bean = (ToH5Bean)in.getSerializableExtra("ToH5Bean");
|
||||
String carNumber = toH5Bean.getCarNumber();
|
||||
id = in.getExtras().getInt("id");
|
||||
chromeClient = new PaxWebChromeClient(this,progressBar,null);
|
||||
chromeClient = new PaxWebChromeClient(this,null,null);
|
||||
if ("咨询建议".equals(title)) {
|
||||
initOpinion();
|
||||
} else {
|
||||
@@ -223,32 +208,13 @@ public class WebActivity extends BaseActivity {
|
||||
return UserParts.getUser(con).getData().getToken();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public int getOrderId(){
|
||||
return id;
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public String getOrderinfo(){
|
||||
return new Gson().toJson(toH5Bean);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void isSuccess(){
|
||||
finish();
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void isPdfSuccess(String pdfUrl){
|
||||
// Toast.makeText(con, "签署成功", Toast.LENGTH_SHORT).show();
|
||||
// EventBus.getDefault().post(new PdfResEvent(pdfUrl));
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("pdfUrl",pdfUrl);
|
||||
setResult(RESULT_OK,intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void isFail(){
|
||||
public void isPdfSuccess(){
|
||||
Toast.makeText(con, "签署成功", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ class MessageUtils {
|
||||
fun showSimCenPop(
|
||||
ctx: Context,
|
||||
message: String,
|
||||
titleRight:String = "去注册",
|
||||
onMyItemClickListener: SimCenterPop.OnMyItemClickListener
|
||||
) {
|
||||
|
||||
@@ -68,7 +69,7 @@ class MessageUtils {
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.asCustom(SimCenterPop(ctx, message).setOnMyItemClickListener(onMyItemClickListener))
|
||||
.asCustom(SimCenterPop(ctx, message, titleRight = titleRight).setOnMyItemClickListener(onMyItemClickListener))
|
||||
.show()
|
||||
|
||||
}
|
||||
@@ -96,6 +97,7 @@ class MessageUtils {
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.dismissOnTouchOutside(false)
|
||||
.asCustom(SimCenterPop(ctx, message,left,right).setOnMyItemClickListener(onMyItemClickListener))
|
||||
.show()
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
import com.dahe.mylibrary.utils.TimeUtil;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* @ClassName OneDayShowUtils
|
||||
* @Author john
|
||||
* @Date 2024/9/11 15:33
|
||||
* @Description TODO
|
||||
*/
|
||||
public class OneDayShowUtils {
|
||||
|
||||
private static class SingletonHolder {
|
||||
private static final OneDayShowUtils INSTANCE = new OneDayShowUtils();
|
||||
}
|
||||
|
||||
private OneDayShowUtils() {
|
||||
}
|
||||
|
||||
public static final OneDayShowUtils getInstance() {
|
||||
return OneDayShowUtils.SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ctx
|
||||
* @return true:当天已弹出 false:当天未弹出
|
||||
*/
|
||||
public boolean todayIsShow(Context ctx) {
|
||||
String preday = (String) SPUtils.get(ctx, "PREDAY", "");
|
||||
if (TextUtils.isEmpty(preday)) {
|
||||
String nowString = TimeUtil.getNowString("yyyy-MM-dd");
|
||||
SPUtils.put(ctx, "PREDAY", nowString);
|
||||
return false;
|
||||
} else {
|
||||
boolean today = TimeUtil.isToday(preday, new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()));
|
||||
if (!today) {
|
||||
String nowString = TimeUtil.getNowString("yyyy-MM-dd");
|
||||
SPUtils.put(ctx, "PREDAY", nowString);
|
||||
}
|
||||
return today;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ctx
|
||||
* @return true:当天已弹出 false:当天未弹出
|
||||
*/
|
||||
public boolean todayIsShowQx(Context ctx) {
|
||||
String preday = (String) SPUtils.get(ctx, "permission", "");
|
||||
if (TextUtils.isEmpty(preday)) {
|
||||
String nowString = TimeUtil.getNowString("yyyy-MM-dd");
|
||||
SPUtils.put(ctx, "permission", nowString);
|
||||
return false;
|
||||
} else {
|
||||
boolean today = TimeUtil.isToday(preday, new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()));
|
||||
if (!today) {
|
||||
String nowString = TimeUtil.getNowString("yyyy-MM-dd");
|
||||
SPUtils.put(ctx, "permission", nowString);
|
||||
}
|
||||
return today;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.view.View;
|
||||
import android.webkit.PermissionRequest;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
@@ -39,12 +38,12 @@ public class PaxWebChromeClient extends WebChromeClient {
|
||||
@Override
|
||||
public void onProgressChanged(WebView view, int newProgress) {
|
||||
if (newProgress == 100) {
|
||||
bar.setVisibility(View.INVISIBLE);
|
||||
//bar.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
if (View.INVISIBLE == bar.getVisibility()) {
|
||||
bar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
bar.setProgress(newProgress);
|
||||
// if (View.INVISIBLE == bar.getVisibility()) {
|
||||
// bar.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
// bar.setProgress(newProgress);
|
||||
}
|
||||
super.onProgressChanged(view, newProgress);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.util
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import androidx.annotation.NonNull
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.MessagePop
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.MyRequestCallback
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.TopMsgPopup
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.SimCenterPop
|
||||
import com.lxj.xpopup.XPopup
|
||||
import com.lxj.xpopup.core.BasePopupView
|
||||
import com.permissionx.guolindev.PermissionX
|
||||
import com.permissionx.guolindev.callback.RequestCallback
|
||||
|
||||
/**
|
||||
* @ClassName MessageUtils
|
||||
* @Author 用户
|
||||
* @Date 2023/8/15 09:51
|
||||
* @Description TODO
|
||||
*/
|
||||
class PermissionUtils {
|
||||
|
||||
companion object {
|
||||
fun getInstance() = InstanceHelper.sSingle
|
||||
}
|
||||
|
||||
object InstanceHelper {
|
||||
val sSingle = PermissionUtils()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示权限申请
|
||||
* @param activity AppCompatActivity
|
||||
* @param message String
|
||||
* @param permission List<String>
|
||||
* @param callback RequestCallback
|
||||
* @return BasePopupView?
|
||||
*/
|
||||
fun showPermissionMessage(activity: FragmentActivity,title:String, message: String,vararg permission:String,callback: MyRequestCallback){
|
||||
val show = XPopup.Builder(activity)
|
||||
.hasShadowBg(false)
|
||||
.hasBlurBg(false)
|
||||
.isTouchThrough(true)
|
||||
.isCenterHorizontal(true)
|
||||
.offsetY(140)
|
||||
.asCustom(
|
||||
TopMsgPopup(
|
||||
activity,
|
||||
title,
|
||||
message
|
||||
)
|
||||
)
|
||||
.show()
|
||||
|
||||
PermissionX.init(activity)
|
||||
.permissions(listOf(*permission))
|
||||
.request { allGranted, grantedList, deniedList ->
|
||||
show.dismiss()
|
||||
if (callback!=null){
|
||||
callback.onResult(allGranted,grantedList,deniedList)
|
||||
}
|
||||
}
|
||||
}
|
||||
fun showCenMessage(ctx: Context, message: String, message2: String) {
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.asCustom(MessagePop(ctx, message, message2).setOnMyItemClickListener(object :
|
||||
MessagePop.OnMyItemClickListener {
|
||||
override fun onItemClick(startTime: String, endTime: String) {
|
||||
}
|
||||
}))
|
||||
.show()
|
||||
}
|
||||
|
||||
fun showSimCenPop(
|
||||
ctx: Context,
|
||||
message: String,
|
||||
onMyItemClickListener: SimCenterPop.OnMyItemClickListener
|
||||
) {
|
||||
|
||||
// XPopup.Builder(ctx) //
|
||||
// .hasNavigationBar(false)
|
||||
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
// .asCustom(SimCenterPop(ctx,message).setOnMyItemClickListener(object : SimCenterPop.OnMyItemClickListener{
|
||||
// override fun onItemClick() {
|
||||
// val intent = Intent(ctx, CertificatesActivity::class.java)
|
||||
// intent.putExtra("index", type)
|
||||
// ctx.startActivity(intent)
|
||||
// }
|
||||
// }))
|
||||
// .show()
|
||||
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.asCustom(SimCenterPop(ctx, message).setOnMyItemClickListener(onMyItemClickListener))
|
||||
.show()
|
||||
|
||||
}
|
||||
|
||||
fun showSimCenPop(
|
||||
ctx: Context,
|
||||
message: String,
|
||||
left: String,
|
||||
right: String,
|
||||
onMyItemClickListener: SimCenterPop.OnMyItemClickListener
|
||||
) {
|
||||
|
||||
// XPopup.Builder(ctx) //
|
||||
// .hasNavigationBar(false)
|
||||
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
// .asCustom(SimCenterPop(ctx,message).setOnMyItemClickListener(object : SimCenterPop.OnMyItemClickListener{
|
||||
// override fun onItemClick() {
|
||||
// val intent = Intent(ctx, CertificatesActivity::class.java)
|
||||
// intent.putExtra("index", type)
|
||||
// ctx.startActivity(intent)
|
||||
// }
|
||||
// }))
|
||||
// .show()
|
||||
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.asCustom(
|
||||
SimCenterPop(ctx, message, left, right).setOnMyItemClickListener(
|
||||
onMyItemClickListener
|
||||
)
|
||||
)
|
||||
.show()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.util.img;
|
||||
|
||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.provider.Settings;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
@@ -13,6 +18,7 @@ import android.widget.Toast;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
||||
import com.permissionx.guolindev.PermissionX;
|
||||
|
||||
@@ -56,12 +62,17 @@ public class GetCarImageAlert {
|
||||
}
|
||||
btn_xiangce.setOnClickListener(v -> {
|
||||
PermissionX.init(act)
|
||||
.permissions(Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
.permissions(Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
PicturlUtil.selectPicter(act, new ArrayList<>(), 1);
|
||||
} else {
|
||||
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
new MessageUtils().showSimCenPop(act, "缺少媒体和文件权限,将无法选择照片,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
act.startActivity(intent);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -74,7 +85,12 @@ public class GetCarImageAlert {
|
||||
// file=ImageGetUtil.createImageFile(act);
|
||||
// ImageGetUtil.cameraAlbumGetImage(act,file);
|
||||
} else {
|
||||
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
new MessageUtils().showSimCenPop(act, "缺少相机权限,将无法进行拍照或选择照片,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
act.startActivity(intent);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -86,7 +102,12 @@ public class GetCarImageAlert {
|
||||
if (allGranted) {
|
||||
openCam(act);
|
||||
} else {
|
||||
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
new MessageUtils().showSimCenPop(act, "缺少相机权限,将无法进行拍照或选择照片,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
act.startActivity(intent);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.util.img;
|
||||
|
||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.provider.Settings;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
@@ -10,6 +15,7 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.permissionx.guolindev.PermissionX;
|
||||
@@ -45,25 +51,37 @@ public class GetImageAlert {
|
||||
|
||||
btn_xiangce.setOnClickListener(v -> {
|
||||
PermissionX.init(act)
|
||||
.permissions(Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
.permissions(Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.CAMERA)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
PicturlUtil.selectPicter(act, new ArrayList<>(), 1);
|
||||
} else {
|
||||
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
new MessageUtils().showSimCenPop(act, "缺少相机,媒体权限,将无法为您提供服务,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
act.startActivity(intent);
|
||||
});
|
||||
// Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
btn_paizhao.setOnClickListener(v -> {
|
||||
|
||||
PermissionX.init(act)
|
||||
.permissions(Manifest.permission.CAMERA)
|
||||
.permissions(Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.CAMERA)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
file = ImageGetUtil.createImageFile(act);
|
||||
ImageGetUtil.cameraAlbumGetImage(act, file);
|
||||
} else {
|
||||
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
new MessageUtils().showSimCenPop(act, "缺少相机,媒体权限,将无法为您提供服务,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
act.startActivity(intent);
|
||||
});
|
||||
// Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_10"/>
|
||||
<solid android:color="#fff"/>
|
||||
</shape>
|
||||
@@ -47,6 +47,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="请输入手机号码"
|
||||
android:inputType="phone"
|
||||
android:textColor="#ff000000"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:maxLength="11"
|
||||
@@ -65,6 +66,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<EditText
|
||||
android:inputType="number"
|
||||
android:id="@+id/input_code"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
|
||||
@@ -3,24 +3,11 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
<WebView
|
||||
android:layout_marginTop="@dimen/dp_88"
|
||||
android:id="@+id/wv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<WebView
|
||||
android:id="@+id/wv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:visibility="invisible"
|
||||
android:layout_alignParentTop="true" />
|
||||
</RelativeLayout>
|
||||
|
||||
android:layout_height="match_parent" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:background="@drawable/bg_round2"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginRight="@dimen/dp_16"
|
||||
android:padding="20dp"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="提示"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tvMessage"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:text=""
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.arpa.hndahesudintocctmsdriver
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.dahe.mylibrary.utils;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class PatternUtils {
|
||||
@@ -25,4 +26,13 @@ public class PatternUtils {
|
||||
public static boolean isLetter(String password){
|
||||
return Pattern.matches(REGEX_WORD, password);
|
||||
}
|
||||
|
||||
public static String getNumByStr(String str){
|
||||
Pattern compile = Pattern.compile("\\d+");
|
||||
Matcher matcher = compile.matcher(str);
|
||||
while (matcher.find()) {
|
||||
return matcher.group();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user