Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea1cf08736 | ||
|
|
205ea6aab8 | ||
|
|
c39513ce13 | ||
|
|
9345621309 | ||
|
|
c686fb4e8f | ||
|
|
8a03631c5e | ||
|
|
278b795190 | ||
|
|
4ceefc82ab | ||
|
|
1ba81f4de4 | ||
|
|
da9bc38e0d | ||
|
|
70fbe8eb6c |
+11
-8
@@ -3,6 +3,7 @@ plugins {
|
|||||||
id 'kotlin-android'
|
id 'kotlin-android'
|
||||||
id 'kotlin-kapt'
|
id 'kotlin-kapt'
|
||||||
id 'com.huawei.agconnect'
|
id 'com.huawei.agconnect'
|
||||||
|
id 'kotlin-android-extensions'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -32,10 +33,10 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.arpa.hndahesudintocctmsdriver"
|
applicationId "com.arpa.hndahesudintocctmsdriver"
|
||||||
minSdkVersion 22
|
minSdkVersion 23
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 51
|
versionCode 57
|
||||||
versionName "3.2.0"
|
versionName "3.2.7"
|
||||||
flavorDimensions "CHANNEL_VALUE"
|
flavorDimensions "CHANNEL_VALUE"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
javaCompileOptions {
|
javaCompileOptions {
|
||||||
@@ -49,7 +50,7 @@ android {
|
|||||||
ndk {
|
ndk {
|
||||||
|
|
||||||
//选择要添加的对应 cpu 类型的 .so 库。
|
//选择要添加的对应 cpu 类型的 .so 库。
|
||||||
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
abiFilters 'arm64-v8a'
|
||||||
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64' , 'arm64-v8a'
|
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64' , 'arm64-v8a'
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -111,14 +112,16 @@ android {
|
|||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
qa {
|
qa {
|
||||||
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机"]
|
manifestPlaceholders = [CHANNEL_VALUE: "好运司机测试"]
|
||||||
buildConfigField("String", "OPEN_API_URL", "\"http://192.168.111.244:4009\"")
|
buildConfigField("String", "OPEN_AL_URL", "\"https://oapi-staging.alct56.com/api/v1/openapi/\"")
|
||||||
buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"")
|
buildConfigField("String", "BASE_URL", "\"http://app.test.dahehuoyun.com/api/\"")
|
||||||
|
buildConfigField "boolean", "isTest", "true"
|
||||||
}
|
}
|
||||||
product {
|
product {
|
||||||
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机"]
|
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机"]
|
||||||
buildConfigField("String", "OPEN_API_URL", "\"https://oapi.alct56.com\"")
|
buildConfigField("String", "OPEN_AL_URL", "\"https://oapi.alct56.com\"")
|
||||||
buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"")
|
buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"")
|
||||||
|
buildConfigField "boolean", "isTest", "false"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,6 +2,7 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="com.arpa.hndahesudintocctmsdriver">
|
package="com.arpa.hndahesudintocctmsdriver">
|
||||||
|
<uses-permission android:name="android.permission.CALL_PHONE" />
|
||||||
<!-- 白名单 -->
|
<!-- 白名单 -->
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
<!-- 基础权限 -->
|
<!-- 基础权限 -->
|
||||||
@@ -108,6 +109,20 @@
|
|||||||
<data android:mimeType="*/*" />
|
<data android:mimeType="*/*" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivity2"
|
||||||
|
android:screenOrientation="portrait">
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
|
<data android:mimeType="*/*" />
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.GetShangChuanActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.GetShangChuanActivity"
|
||||||
@@ -326,6 +341,27 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".H5Activity"
|
||||||
|
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
|
<service
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.push.XService"
|
android:name="com.arpa.hndahesudintocctmsdriver.push.XService"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
|
|||||||
@@ -2,7 +2,10 @@ package com.arpa.hndahesudintocctmsdriver;
|
|||||||
|
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
|
import android.app.PendingIntent;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.IntentFilter;
|
||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
@@ -11,17 +14,26 @@ import android.util.Log;
|
|||||||
import com.alct.mdp.MDPLocationCollectionManager;
|
import com.alct.mdp.MDPLocationCollectionManager;
|
||||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.net.Api;
|
import com.arpa.hndahesudintocctmsdriver.request.net.Api;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.BillLocationUtils;
|
||||||
import com.dahe.mylibrary.CommonBaseLibrary;
|
import com.dahe.mylibrary.CommonBaseLibrary;
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
import com.esign.esignsdk.EsignSdk;
|
import com.esign.esignsdk.EsignSdk;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||||
|
import com.gyf.cactus.Cactus;
|
||||||
|
import com.gyf.cactus.callback.CactusBackgroundCallback;
|
||||||
|
import com.gyf.cactus.callback.CactusCallback;
|
||||||
import com.umeng.commonsdk.UMConfigure;
|
import com.umeng.commonsdk.UMConfigure;
|
||||||
|
|
||||||
import cn.jiguang.verifysdk.api.JVerificationInterface;
|
import cn.jiguang.verifysdk.api.JVerificationInterface;
|
||||||
|
|
||||||
public class App extends Application {
|
public class App extends Application {
|
||||||
|
|
||||||
String key = "f9d35b1133cff1f6e3960c89b249e03f";
|
// String key = "f9d35b1133cff1f6e3960c89b249e03f";
|
||||||
String license = "eQQm7gCZPF58Cy4i9OGkqSdFdDnFF0VSUVpw92WcrNLx7zVbpGJwjQhnKL8b0piApIbOTog5log/S1ZIxoUQogueaG84BQlJfRwKjtvpVWImlmhthQyQd2ogRqGkm3rkVGeG9wK49fzP3g5AtghNF05je2rQWd/Tyy/wutXq0e0rvR/bEckFaZ4BesQaYd0MejFC3lA8BjxNWiuvCKs15e1aRUOU5vwN5wsaTsTHokBIYhioSxOoGgHn6NrX6K9Dsl9uTWZ2dOVK/jEzYsNt6E/1Ww2ck1XmIWdRCQNmCpgikuPT0ACAL/w7UaRoWzM/Pm+akWqyp+bEavHT1Vhug3HAHOSGfOghGw2NerNlyEg8h6cVneMx+TsidnQ0ZG29aqdcLBRsvi26BYJJCA8+0WXjT+73RhS8g97Rfb6h0/W//5Az8UNZ6dp6XvUi2EJXQRhY5hkHiuwWT2W1ik+6wiiURkkrBACKbO1kmZWbVpRIe3Y3pcr3Q/V+oAcyPHRXCxu+JIe/j40/epuRrCyf8yvKsZ2Dnkl4QQmlwNqlW1F/arS+19G6zOG+6VKwtbI01A1R9SU1TYOA5UL/Qpo6Gyi3Ec3/irgQlzkq1rZrOIS4oo6tghul/zcG8rjno3luqHYwIZf8vAVfpwBesIVcANCOIuTRPU3A8vdmUoK/twGIchPapmjlAzLhjZ4KoAbNeMsWu3sN6kF44xofLMghos2X8OtvUA9CMD37v2FpYoM75qavyoivsBAbb6mG0p5TmkZ37BxfaGGP6SYrCa9ygQ==";
|
String key = "19ac0aa74338e487e45057faf7212401";
|
||||||
|
String license = "HF41uGxM/1i3CtW98DimoA97BlNTAnQ+DiEAihYmZ2jR1jqC4be253joEJbOJgFDIzp5aIoeuXSWWHFaDVfaHL2Pksbq5f8M8EqsVhP9q/i1xGYSYf6MJVlHdMAVLWgR0Kra+n8dVzkSDuZeyJuDsskAmZaGFQN1CqnWYCI1tmV1Tk4A57e9LQMed0U11QWjdshdU2DGqBXKmGE419PdW3NmIxOR2u9iB1OKBmvzCUT8RAYyBzSn/yhU++YJ25g5a8Pb5kOvi+eOh+PEFEcQL6oOp/CF4Iw5nadlsLhc+XEnVJpwL2myZBoSlVcKxrJKbRn1/DIgXBueKKnqhyHKdJlpqI9eghAlRF0p2Q4f23m89mWRZf4nhKzTeXGIjCTFO4TNVucrlGU7tyJcrRCDVdfV24fziH+hB3QGckpuYzzjefr7hZalLRJ/w8dPw/8dCY1wnWq3AJ3zw2g1PzMxl51q7AgdKvwc1ERcGBns0zb8PK6vGKCnJq3uHiJEnslbTI0MEosje+h+OPO7hf2QofErewjI19wHEOv4dTvuFLh3VmGFMObAmov5kI47705fjSxCvAPGATBrfUSwim+5EQ1hanc5IcXe0/nOTiRUNEpZ+x65zVydqAs7490yqQiIUQvPazEwcal7vH2OD54lCcgpxKxqdmGc5/bp5UnqB45+n+iuInV/Q9DMOQVk15uaVZmhS8VaCqH21CmfH/ZGLb9wiEpaRLrPZLKX3bK7MT9Z0/OlDnb2QUKU8LMMIhLuQQntzsf0Wn4kA/0e9QAJJQ==";
|
||||||
|
|
||||||
|
// String license = "eQQm7gCZPF58Cy4i9OGkqSdFdDnFF0VSUVpw92WcrNLx7zVbpGJwjQhnKL8b0piApIbOTog5log/S1ZIxoUQogueaG84BQlJfRwKjtvpVWImlmhthQyQd2ogRqGkm3rkVGeG9wK49fzP3g5AtghNF05je2rQWd/Tyy/wutXq0e0rvR/bEckFaZ4BesQaYd0MejFC3lA8BjxNWiuvCKs15e1aRUOU5vwN5wsaTsTHokBIYhioSxOoGgHn6NrX6K9Dsl9uTWZ2dOVK/jEzYsNt6E/1Ww2ck1XmIWdRCQNmCpgikuPT0ACAL/w7UaRoWzM/Pm+akWqyp+bEavHT1Vhug3HAHOSGfOghGw2NerNlyEg8h6cVneMx+TsidnQ0ZG29aqdcLBRsvi26BYJJCA8+0WXjT+73RhS8g97Rfb6h0/W//5Az8UNZ6dp6XvUi2EJXQRhY5hkHiuwWT2W1ik+6wiiURkkrBACKbO1kmZWbVpRIe3Y3pcr3Q/V+oAcyPHRXCxu+JIe/j40/epuRrCyf8yvKsZ2Dnkl4QQmlwNqlW1F/arS+19G6zOG+6VKwtbI01A1R9SU1TYOA5UL/Qpo6Gyi3Ec3/irgQlzkq1rZrOIS4oo6tghul/zcG8rjno3luqHYwIZf8vAVfpwBesIVcANCOIuTRPU3A8vdmUoK/twGIchPapmjlAzLhjZ4KoAbNeMsWu3sN6kF44xofLMghos2X8OtvUA9CMD37v2FpYoM75qavyoivsBAbb6mG0p5TmkZ37BxfaGGP6SYrCa9ygQ==";
|
||||||
|
|
||||||
public final static int APP_STATUS_KILLED = 0; // 表示应用是被杀死后在启动的
|
public final static int APP_STATUS_KILLED = 0; // 表示应用是被杀死后在启动的
|
||||||
public final static int APP_STATUS_NORMAL = 1; // 表示应用时正常的启动流程
|
public final static int APP_STATUS_NORMAL = 1; // 表示应用时正常的启动流程
|
||||||
@@ -45,7 +57,7 @@ public class App extends Application {
|
|||||||
//安联初始化
|
//安联初始化
|
||||||
if (context.getPackageName().equals(getCurrentProcessName(context))) {
|
if (context.getPackageName().equals(getCurrentProcessName(context))) {
|
||||||
//Log.e("--使用的测试环境--",BuildConfig.OPEN_API_URL);
|
//Log.e("--使用的测试环境--",BuildConfig.OPEN_API_URL);
|
||||||
MDPLocationCollectionManager.initialize(this, "https://oapi.alct56.com");
|
MDPLocationCollectionManager.initialize(this, BuildConfig.OPEN_AL_URL);
|
||||||
}
|
}
|
||||||
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
||||||
// 路由初始化
|
// 路由初始化
|
||||||
@@ -63,6 +75,30 @@ public class App extends Application {
|
|||||||
Log.e("-error-", "初始化失败sss");
|
Log.e("-error-", "初始化失败sss");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PendingIntent pendingIntent =
|
||||||
|
// PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
// Cactus.getInstance()
|
||||||
|
// .isDebug(true)
|
||||||
|
// //可选,设置通知栏点击事件
|
||||||
|
// .setPendingIntent(pendingIntent)
|
||||||
|
//// .setBackgroundMusicEnabled(true)//可选,退到后台是否可以播放音乐
|
||||||
|
//// .setMusicId(R.raw.main) //可选,设置音乐
|
||||||
|
//// .setPendingIntent(pendingIntent)//可选,设置通知栏点击事件
|
||||||
|
//// .addCallback(new CactusCallback())//可选,运行时回调
|
||||||
|
// .setCrashRestartUIEnabled(true) //可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
||||||
|
// .setCrashRestartUIEnabled(true)//可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
||||||
|
// .setTitle("大河好运")
|
||||||
|
// .setSmallIcon(R.drawable.diver_logo)
|
||||||
|
// .addBackgroundCallback(new CactusBackgroundCallback() {
|
||||||
|
// @Override
|
||||||
|
// public void onBackground(boolean b) {
|
||||||
|
// if (b){
|
||||||
|
// getBillLocation();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// .register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static App getApp() {
|
public static App getApp() {
|
||||||
@@ -83,6 +119,10 @@ public class App extends Application {
|
|||||||
UMConfigure.init(getApplicationContext(), UMConfigure.DEVICE_TYPE_PHONE, "");
|
UMConfigure.init(getApplicationContext(), UMConfigure.DEVICE_TYPE_PHONE, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void getBillLocation() {
|
||||||
|
BillLocationUtils.getInstance().getBillLocation(con);
|
||||||
|
}
|
||||||
|
|
||||||
private static String getCurrentProcessName(Context context) {
|
private static String getCurrentProcessName(Context context) {
|
||||||
String currentProcessName = "";
|
String currentProcessName = "";
|
||||||
int pid = android.os.Process.myPid();
|
int pid = android.os.Process.myPid();
|
||||||
|
|||||||
@@ -0,0 +1,499 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver;
|
||||||
|
|
||||||
|
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.view.View;
|
||||||
|
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.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
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.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.ToastUtils;
|
||||||
|
import com.esign.esignsdk.EsignSdk;
|
||||||
|
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 static android.webkit.WebSettings.LOAD_NO_CACHE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xingtian on 2019/3/25
|
||||||
|
*/
|
||||||
|
public class H5Activity 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);
|
||||||
|
|
||||||
|
|
||||||
|
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 (url.contains("callback")) {
|
||||||
|
// // 实名认证结束 返回按钮/倒计时返回/暂不认证
|
||||||
|
// boolean status = uri.getBooleanQueryParameter("passed", false);
|
||||||
|
// if (status) {
|
||||||
|
//
|
||||||
|
// new Handler().postDelayed(() -> {
|
||||||
|
// FaceEvent he = new FaceEvent("刷脸成功");
|
||||||
|
// EventBus.getDefault().post(he);
|
||||||
|
// finish();
|
||||||
|
// }, 4000);
|
||||||
|
// }else{
|
||||||
|
// if (mWebView.canGoBack()) {
|
||||||
|
// mWebView.goBack();
|
||||||
|
// }
|
||||||
|
// Toast.makeText(H5Activity.this, "认证失败,请重新刷脸认证", Toast.LENGTH_SHORT).show();
|
||||||
|
// }
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
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(H5Activity.this, "签署结果: " + " signResult = " + signResult, Toast.LENGTH_LONG).show();
|
||||||
|
} else {
|
||||||
|
String tsignCode = uri.getQueryParameter("tsignCode");
|
||||||
|
if ("0".equals(tsignCode)) {
|
||||||
|
tsignCode = "签署成功";
|
||||||
|
} else {
|
||||||
|
tsignCode = "签署失败";
|
||||||
|
}
|
||||||
|
Toast.makeText(H5Activity.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) {
|
||||||
|
//认证成功返回
|
||||||
|
Toast.makeText(H5Activity.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) {
|
||||||
|
//认证成功返回
|
||||||
|
Toast.makeText(H5Activity.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(H5Activity.this, "签署结果: " + " signResult = " + signResult, Toast.LENGTH_LONG).show();
|
||||||
|
} else {
|
||||||
|
String tsignCode = uri.getQueryParameter("tsignCode");
|
||||||
|
if ("0".equals(tsignCode)) {
|
||||||
|
FaceEvent he = new FaceEvent("刷脸成功");
|
||||||
|
EventBus.getDefault().post(he);
|
||||||
|
finish();
|
||||||
|
tsignCode = "签署成功";
|
||||||
|
} else {
|
||||||
|
tsignCode = "签署失败";
|
||||||
|
}
|
||||||
|
Toast.makeText(H5Activity.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(H5Activity.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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -77,6 +77,15 @@ public class CarDelBean {
|
|||||||
private String registerNo;
|
private String registerNo;
|
||||||
private String carEnergyTypValue;
|
private String carEnergyTypValue;
|
||||||
private String carPlateColorValue;
|
private String carPlateColorValue;
|
||||||
|
private String needUpQCPhoto;
|
||||||
|
|
||||||
|
public String getNeedUpQCPhoto() {
|
||||||
|
return needUpQCPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNeedUpQCPhoto(String needUpQCPhoto) {
|
||||||
|
this.needUpQCPhoto = needUpQCPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCarPlateColorValue() {
|
public String getCarPlateColorValue() {
|
||||||
return carPlateColorValue;
|
return carPlateColorValue;
|
||||||
|
|||||||
@@ -0,0 +1,150 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName CarInfoBean
|
||||||
|
* @Author 用户
|
||||||
|
* @Date 2023/8/17 15:35
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class CarInfoBean {
|
||||||
|
|
||||||
|
|
||||||
|
private int code;
|
||||||
|
private DataDTO data;
|
||||||
|
private String msg;
|
||||||
|
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 int getRes() {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRes(int res) {
|
||||||
|
this.res = res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getSuccess() {
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuccess(Boolean success) {
|
||||||
|
this.success = success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class DataDTO {
|
||||||
|
private Object code;
|
||||||
|
private DataDTO.DataDTO2 data;
|
||||||
|
private Object message;
|
||||||
|
private String forceMatching;
|
||||||
|
|
||||||
|
|
||||||
|
public String getForceMatching() {
|
||||||
|
return forceMatching;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setForceMatching(String forceMatching) {
|
||||||
|
this.forceMatching = forceMatching;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Object code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataDTO2 getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(DataDTO2 data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(Object message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class DataDTO2 {
|
||||||
|
private List<DataDTO.DataDTO2.PrismKeyValueInfoDTO> prism_keyValueInfo;
|
||||||
|
|
||||||
|
public List<DataDTO.DataDTO2.PrismKeyValueInfoDTO> getPrism_keyValueInfo() {
|
||||||
|
return prism_keyValueInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrism_keyValueInfo(List<DataDTO.DataDTO2.PrismKeyValueInfoDTO> prism_keyValueInfo) {
|
||||||
|
this.prism_keyValueInfo = prism_keyValueInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class PrismKeyValueInfoDTO {
|
||||||
|
private int keyProb;
|
||||||
|
private int valueProb;
|
||||||
|
private String value;
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
public int getKeyProb() {
|
||||||
|
return keyProb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKeyProb(int keyProb) {
|
||||||
|
this.keyProb = keyProb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getValueProb() {
|
||||||
|
return valueProb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValueProb(int valueProb) {
|
||||||
|
this.valueProb = valueProb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKey(String key) {
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -56,6 +56,33 @@ public class CarZhengBean {
|
|||||||
|
|
||||||
public static class DataDTO {
|
public static class DataDTO {
|
||||||
private int carId;
|
private int carId;
|
||||||
|
private String needUpQCPhoto;
|
||||||
|
private String isTrailer;
|
||||||
|
private String needUpRLPhoto;
|
||||||
|
|
||||||
|
public String getNeedUpRLPhoto() {
|
||||||
|
return needUpRLPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNeedUpRLPhoto(String needUpRLPhoto) {
|
||||||
|
this.needUpRLPhoto = needUpRLPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsTrailer() {
|
||||||
|
return isTrailer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsTrailer(String isTrailer) {
|
||||||
|
this.isTrailer = isTrailer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNeedUpQCPhoto() {
|
||||||
|
return needUpQCPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNeedUpQCPhoto(String needUpQCPhoto) {
|
||||||
|
this.needUpQCPhoto = needUpQCPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
public int getCarId() {
|
public int getCarId() {
|
||||||
return carId;
|
return carId;
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ public class StartOrderBean {
|
|||||||
private String realityTimeDate;
|
private String realityTimeDate;
|
||||||
private int status;
|
private int status;
|
||||||
private String longitude;
|
private String longitude;
|
||||||
|
private String imageTakenDate;
|
||||||
private String latitude;
|
private String latitude;
|
||||||
private List<GoodsDTO> goods;
|
private List<GoodsDTO> goods;
|
||||||
private int report;
|
private int report;
|
||||||
@@ -280,6 +281,14 @@ public class StartOrderBean {
|
|||||||
private String distance;
|
private String distance;
|
||||||
private int isEvaluation;
|
private int isEvaluation;
|
||||||
|
|
||||||
|
public String getImageTakenDate() {
|
||||||
|
return imageTakenDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageTakenDate(String imageTakenDate) {
|
||||||
|
this.imageTakenDate = imageTakenDate;
|
||||||
|
}
|
||||||
|
|
||||||
public long getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName HYConstant
|
||||||
|
* @Author 用户
|
||||||
|
* @Date 2023/8/29 09:32
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class HYConstant {
|
||||||
|
|
||||||
|
//-------------安联---------------start
|
||||||
|
//企业代码
|
||||||
|
private static final String ENTERPRISE_CODE="E0019169";
|
||||||
|
//企业app的身份码
|
||||||
|
private static final String APP_IDENTITY="b4a472a025e443b383970cdd5465552e";
|
||||||
|
//企业app验证码
|
||||||
|
private static final String APP_KEY="b948efbb4c2a4ba0805c534f2fba0c89";
|
||||||
|
|
||||||
|
//企业代码-测试
|
||||||
|
private static final String ENTERPRISE_CODE_TEXT="E0019093";
|
||||||
|
//企业app的身份码-测试
|
||||||
|
private static final String APP_IDENTITY_TEXT="a15b4ba5bd2542cc9a6bea9bdadf9ef9";
|
||||||
|
//企业app验证码-测试
|
||||||
|
private static final String APP_KEY_TEXT="07a6256cad5642138ed6e962a5a157be";
|
||||||
|
//-------------安联---------------end
|
||||||
|
|
||||||
|
|
||||||
|
//-------------交通厅---------------start
|
||||||
|
public final static String JTT_DATA_NAME="jtt_data";
|
||||||
|
public final static String JTT_DATA_JTTORDER_KEY="JTT_order_key";
|
||||||
|
public final static String JTT_DATA_ORDER_KEY="order_key";
|
||||||
|
//-------------交通厅---------------end
|
||||||
|
|
||||||
|
//--------------E签宝--------------start
|
||||||
|
String key = "19ac0aa74338e487e45057faf7212401";
|
||||||
|
String license = "HF41uGxM/1i3CtW98DimoA97BlNTAnQ+DiEAihYmZ2jR1jqC4be253joEJbOJgFDIzp5aIoeuXSWWHFaDVfaHL2Pksbq5f8M8EqsVhP9q/i1xGYSYf6MJVlHdMAVLWgR0Kra+n8dVzkSDuZeyJuDsskAmZaGFQN1CqnWYCI1tmV1Tk4A57e9LQMed0U11QWjdshdU2DGqBXKmGE419PdW3NmIxOR2u9iB1OKBmvzCUT8RAYyBzSn/yhU++YJ25g5a8Pb5kOvi+eOh+PEFEcQL6oOp/CF4Iw5nadlsLhc+XEnVJpwL2myZBoSlVcKxrJKbRn1/DIgXBueKKnqhyHKdJlpqI9eghAlRF0p2Q4f23m89mWRZf4nhKzTeXGIjCTFO4TNVucrlGU7tyJcrRCDVdfV24fziH+hB3QGckpuYzzjefr7hZalLRJ/w8dPw/8dCY1wnWq3AJ3zw2g1PzMxl51q7AgdKvwc1ERcGBns0zb8PK6vGKCnJq3uHiJEnslbTI0MEosje+h+OPO7hf2QofErewjI19wHEOv4dTvuFLh3VmGFMObAmov5kI47705fjSxCvAPGATBrfUSwim+5EQ1hanc5IcXe0/nOTiRUNEpZ+x65zVydqAs7490yqQiIUQvPazEwcal7vH2OD54lCcgpxKxqdmGc5/bp5UnqB45+n+iuInV/Q9DMOQVk15uaVZmhS8VaCqH21CmfH/ZGLb9wiEpaRLrPZLKX3bK7MT9Z0/OlDnb2QUKU8LMMIhLuQQntzsf0Wn4kA/0e9QAJJQ==";
|
||||||
|
//-------------E签宝---------------end
|
||||||
|
|
||||||
|
//--------------交通厅--------------start
|
||||||
|
private final static String APPID="com.arpa.hndahesudintocctmsdriver";
|
||||||
|
private final static String APP_SECURITY="01e20fc6585a42738ac88a12321dc41bff473b4b20184aacbbcee7d7864359a6";
|
||||||
|
private final static String CODE="41110447";
|
||||||
|
private final static String ENVIRONMENT="release";
|
||||||
|
//-------------交通厅---------------end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.cuspop
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.net.Uri
|
||||||
|
import android.view.View
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
|
import com.dahe.mylibrary.utils.BaseUtils
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils
|
||||||
|
import com.lxj.xpopup.core.CenterPopupView
|
||||||
|
import kotlinx.android.synthetic.main.load.view.*
|
||||||
|
import kotlinx.android.synthetic.main.pop_message_center.view.*
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName MessagePop
|
||||||
|
* @Author 用户
|
||||||
|
* @Date 2023/8/14 18:01
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
class MessagePop(context: Context) : CenterPopupView(context), View.OnClickListener {
|
||||||
|
|
||||||
|
lateinit var content :String
|
||||||
|
var secMessage :String? = ""
|
||||||
|
|
||||||
|
constructor(context: Context,message : String) :this(context) {
|
||||||
|
content = message
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(context: Context,message : String,message2 : String) :this(context) {
|
||||||
|
content = message
|
||||||
|
secMessage = message2
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getImplLayoutId() = R.layout.pop_message_center
|
||||||
|
|
||||||
|
override fun onCreate() {
|
||||||
|
super.onCreate()
|
||||||
|
tvCancel.setOnClickListener(this)
|
||||||
|
tvOk.setOnClickListener(this)
|
||||||
|
tvPhone.setOnClickListener(this)
|
||||||
|
tvContent.text = "$content"
|
||||||
|
tvMessage2.text =secMessage
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onClick(v: View?) {
|
||||||
|
when(v?.id){
|
||||||
|
R.id.tvCancel -> {
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
R.id.tvOk,R.id.tvPhone -> {
|
||||||
|
dismiss()
|
||||||
|
val toString = tvPhone.text.toString()
|
||||||
|
val intent = Intent(Intent.ACTION_CALL)
|
||||||
|
val data = Uri.parse("tel:$toString")
|
||||||
|
intent.data = data
|
||||||
|
context.startActivity(intent)
|
||||||
|
dismiss()
|
||||||
|
// BaseUtils.callPhone(content as Activity, tvPhone.text.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private var listener: OnMyItemClickListener? = null
|
||||||
|
fun setOnMyItemClickListener(listener: OnMyItemClickListener?): MessagePop {
|
||||||
|
this.listener = listener
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
interface OnMyItemClickListener {
|
||||||
|
fun onItemClick(startTime: String, endTime: String)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.cuspop
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.View
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity
|
||||||
|
import com.lxj.xpopup.core.CenterPopupView
|
||||||
|
import kotlinx.android.synthetic.main.pop_sim_center.view.*
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName MessagePop
|
||||||
|
* @Author 用户
|
||||||
|
* @Date 2023/8/14 18:01
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
class SimCenterPop(context: Context) : CenterPopupView(context), View.OnClickListener {
|
||||||
|
|
||||||
|
lateinit var content: String
|
||||||
|
lateinit var secMessage: String
|
||||||
|
|
||||||
|
constructor(context: Context, message: String) : this(context) {
|
||||||
|
content = message
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun getImplLayoutId() = R.layout.pop_sim_center
|
||||||
|
|
||||||
|
override fun onCreate() {
|
||||||
|
super.onCreate()
|
||||||
|
tvCancel.setOnClickListener(this)
|
||||||
|
tvOk.setOnClickListener(this)
|
||||||
|
tvContent.text = "$content"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onClick(v: View?) {
|
||||||
|
when (v?.id) {
|
||||||
|
R.id.tvCancel -> {
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
R.id.tvOk -> {
|
||||||
|
dismiss()
|
||||||
|
listener?.onItemClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private var listener: OnMyItemClickListener? = null
|
||||||
|
fun setOnMyItemClickListener(listener: OnMyItemClickListener): SimCenterPop {
|
||||||
|
this.listener = listener
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
interface OnMyItemClickListener {
|
||||||
|
fun onItemClick()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.event;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hlh
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2021/10/20 14:43
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
public class FaceEvent {
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public FaceEvent(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,11 @@ import com.alct.mdp.MDPLocationCollectionManager;
|
|||||||
import com.alct.mdp.callback.OnDownloadResultListener;
|
import com.alct.mdp.callback.OnDownloadResultListener;
|
||||||
import com.alct.mdp.callback.OnResultListener;
|
import com.alct.mdp.callback.OnResultListener;
|
||||||
import com.alct.mdp.model.Identity;
|
import com.alct.mdp.model.Identity;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.App;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.AuthParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.AuthParts;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.msg.MsgUtil;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverAuthDataBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.DriverAuthDataBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.FqBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.FqBean;
|
||||||
@@ -28,15 +32,23 @@ public class ALProcess {
|
|||||||
//企业app验证码
|
//企业app验证码
|
||||||
private static final String APP_KEY="b948efbb4c2a4ba0805c534f2fba0c89";
|
private static final String APP_KEY="b948efbb4c2a4ba0805c534f2fba0c89";
|
||||||
|
|
||||||
|
//企业代码-测试
|
||||||
|
private static final String ENTERPRISE_CODE_TEXT="E0019093";
|
||||||
|
//企业app的身份码-测试
|
||||||
|
private static final String APP_IDENTITY_TEXT="07a6256cad5642138ed6e962a5a157be";
|
||||||
|
//企业app验证码-测试
|
||||||
|
private static final String APP_KEY_TEXT="a15b4ba5bd2542cc9a6bea9bdadf9ef9";
|
||||||
|
|
||||||
|
|
||||||
public static void verification(Context con){
|
public static void verification(Context con){
|
||||||
DriverAuthDataBean auth= AuthParts.getAuth(con);
|
DriverAuthDataBean auth= AuthParts.getAuth(con);
|
||||||
Identity idy=new Identity();
|
Identity idy=new Identity();
|
||||||
//企业代码
|
//企业代码
|
||||||
idy.setEnterpriseCode(ENTERPRISE_CODE);
|
idy.setEnterpriseCode(BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE);
|
||||||
//企业app的身份码
|
//企业app的身份码
|
||||||
idy.setAppIdentity(APP_IDENTITY);
|
idy.setAppIdentity(BuildConfig.isTest?APP_IDENTITY_TEXT:APP_IDENTITY);
|
||||||
//企业app验证码
|
//企业app验证码
|
||||||
idy.setAppKey(APP_KEY);
|
idy.setAppKey(BuildConfig.isTest?APP_KEY_TEXT:APP_KEY);
|
||||||
//司机身份证
|
//司机身份证
|
||||||
idy.setDriverIdentity(auth.getData().getIdcard());
|
idy.setDriverIdentity(auth.getData().getIdcard());
|
||||||
//idy.setDriverIdentity("410725198311042012");
|
//idy.setDriverIdentity("410725198311042012");
|
||||||
@@ -50,6 +62,7 @@ public class ALProcess {
|
|||||||
@Override
|
@Override
|
||||||
public void onFailure(java.lang.String s, java.lang.String s1) {
|
public void onFailure(java.lang.String s, java.lang.String s1) {
|
||||||
Log.e("--error--",s+s1+"");
|
Log.e("--error--",s+s1+"");
|
||||||
|
new MessageUtils().showCenMessage(con,s1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -78,7 +91,7 @@ public class ALProcess {
|
|||||||
|
|
||||||
public static void applyFq(Context con,FqBean fb){
|
public static void applyFq(Context con,FqBean fb){
|
||||||
for (FqBean.Invoice driverInvoice : fb.getDriverInvoices()) {
|
for (FqBean.Invoice driverInvoice : fb.getDriverInvoices()) {
|
||||||
MDPLocationCollectionManager.confirmInvoice(con, ENTERPRISE_CODE, driverInvoice.getDriverInvoiceCode(), new OnResultListener() {
|
MDPLocationCollectionManager.confirmInvoice(con, BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE, driverInvoice.getDriverInvoiceCode(), new OnResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
|
|
||||||
@@ -113,4 +126,32 @@ public class ALProcess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void verification(Context con,Handler hd){
|
||||||
|
DriverAuthDataBean auth= AuthParts.getAuth(con);
|
||||||
|
Identity idy=new Identity();
|
||||||
|
//企业代码
|
||||||
|
idy.setEnterpriseCode(BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE);
|
||||||
|
//企业app的身份码
|
||||||
|
idy.setAppIdentity(BuildConfig.isTest?APP_IDENTITY_TEXT:APP_IDENTITY);
|
||||||
|
//企业app验证码
|
||||||
|
idy.setAppKey(BuildConfig.isTest?APP_KEY_TEXT:APP_KEY);
|
||||||
|
//司机身份证
|
||||||
|
idy.setDriverIdentity(auth.getData().getIdcard());
|
||||||
|
//idy.setDriverIdentity("410725198311042012");
|
||||||
|
MDPLocationCollectionManager.register(con, idy, new OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("--success--","验证成功");
|
||||||
|
getFq(con);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(java.lang.String s, java.lang.String s1) {
|
||||||
|
Log.e("--error--",s+s1+"");
|
||||||
|
MsgUtil.addHdMsgWatBody(hd, 2222,s1);
|
||||||
|
// new MessageUtils().showCenMessage(con,s1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,4 +59,9 @@ public class OCRRequest {
|
|||||||
RequestUtil.start(12, "carName",re,con,hd);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request;
|
package com.arpa.hndahesudintocctmsdriver.request;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||||
|
|
||||||
public class RequestConstant {
|
public class RequestConstant {
|
||||||
|
|
||||||
public static String TOKEN="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MzA0MDE3OTIsInVzZXJJZCI6ODAsImlhdCI6MTYyNzcyMzM5Mn0.f9Q-UZVduW6nt1s0L-3vYsrOJJ8iuSCSlJ9uu8yIxBI";
|
public static String TOKEN="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MzA0MDE3OTIsInVzZXJJZCI6ODAsImlhdCI6MTYyNzcyMzM5Mn0.f9Q-UZVduW6nt1s0L-3vYsrOJJ8iuSCSlJ9uu8yIxBI";
|
||||||
//域名地址http://request.one-clouds.com/api https://huoyun.mzxd56.com/api http://app.dahehuoyun.com/api
|
//域名地址http://request.one-clouds.com/api https://huoyun.mzxd56.com/api http://app.dahehuoyun.com/api
|
||||||
public static String BASE_URL ="http://app.dahehuoyun.com/api";
|
public static String BASE_URL = BuildConfig.BASE_URL;
|
||||||
//版本更新/app/check/version
|
//版本更新/app/check/version
|
||||||
public static String VERSION ="/app/check/version";
|
public static String VERSION ="/app/check/version";
|
||||||
//全部代码
|
//全部代码
|
||||||
@@ -133,6 +135,9 @@ public class RequestConstant {
|
|||||||
//车牌号
|
//车牌号
|
||||||
private static final String PLATE_LICENSE="/common/ocr/plateLicense";
|
private static final String PLATE_LICENSE="/common/ocr/plateLicense";
|
||||||
|
|
||||||
|
//车牌号2
|
||||||
|
private static final String PLATE_LICENSE2="/common/aliyun/ocr/RecognizeCarNumber";
|
||||||
|
|
||||||
//添加挂车
|
//添加挂车
|
||||||
private static final String SAVE_DRAW_CAR="/app/carDriver/saveDrawCar";
|
private static final String SAVE_DRAW_CAR="/app/carDriver/saveDrawCar";
|
||||||
//提现记录
|
//提现记录
|
||||||
@@ -390,6 +395,10 @@ public class RequestConstant {
|
|||||||
return BASE_URL+PLATE_LICENSE;
|
return BASE_URL+PLATE_LICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getPlateLicense2() {
|
||||||
|
return BASE_URL+PLATE_LICENSE2;
|
||||||
|
}
|
||||||
|
|
||||||
public static String getGetImage() {
|
public static String getGetImage() {
|
||||||
return BASE_URL+GET_IMAGE;
|
return BASE_URL+GET_IMAGE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ public interface Api {
|
|||||||
//获取版本
|
//获取版本
|
||||||
String VERSION = BASE_URL + "app/version";
|
String VERSION = BASE_URL + "app/version";
|
||||||
|
|
||||||
@POST(BASE_URL+"/common/register")
|
// @POST(BASE_URL+"/common/register")
|
||||||
Observable<CommonResponseBean> log(@Body LoginRegInputBean bean);
|
// Observable<CommonResponseBean> log(@Body LoginRegInputBean bean);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui
|
package com.arpa.hndahesudintocctmsdriver.ui
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
@@ -20,8 +21,11 @@ import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BottomTabUtil
|
import com.arpa.hndahesudintocctmsdriver.util.view.BottomTabUtil
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.PanDuanUtil
|
import com.arpa.hndahesudintocctmsdriver.util.view.PanDuanUtil
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
|
import com.gyf.cactus.ext.cactusUpdateNotification
|
||||||
import com.permissionx.guolindev.PermissionX
|
import com.permissionx.guolindev.PermissionX
|
||||||
|
|
||||||
|
@Suppress("DIVISION_BY_ZERO")
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
class MainActivity : BaseAppCompatActivity() {
|
class MainActivity : BaseAppCompatActivity() {
|
||||||
|
|
||||||
private var ibs = arrayOf<ImageView>()
|
private var ibs = arrayOf<ImageView>()
|
||||||
@@ -37,7 +41,8 @@ class MainActivity : BaseAppCompatActivity() {
|
|||||||
1 -> {
|
1 -> {
|
||||||
isExit = false;
|
isExit = false;
|
||||||
}
|
}
|
||||||
RequsetCodeConstants.SUCCESS -> {}
|
RequsetCodeConstants.SUCCESS -> {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,6 +50,10 @@ class MainActivity : BaseAppCompatActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
StateStyleUtil.stateTextColor(this)
|
StateStyleUtil.stateTextColor(this)
|
||||||
setContentView(R.layout.activity_main)
|
setContentView(R.layout.activity_main)
|
||||||
|
cactusUpdateNotification {
|
||||||
|
setTitle("好运司机")
|
||||||
|
setContent("您的接单小助手")
|
||||||
|
}
|
||||||
con = this
|
con = this
|
||||||
act = this
|
act = this
|
||||||
//隐藏标题栏
|
//隐藏标题栏
|
||||||
@@ -126,7 +135,11 @@ class MainActivity : BaseAppCompatActivity() {
|
|||||||
PermissionX.init(this)
|
PermissionX.init(this)
|
||||||
.permissions(Manifest.permission.ACCESS_FINE_LOCATION,
|
.permissions(Manifest.permission.ACCESS_FINE_LOCATION,
|
||||||
Manifest.permission.ACCESS_COARSE_LOCATION,
|
Manifest.permission.ACCESS_COARSE_LOCATION,
|
||||||
Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
Manifest.permission.ACCESS_BACKGROUND_LOCATION,
|
||||||
|
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||||
|
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||||
|
Manifest.permission.RECORD_AUDIO,
|
||||||
|
Manifest.permission.CAMERA)
|
||||||
.request { allGranted, grantedList, deniedList ->
|
.request { allGranted, grantedList, deniedList ->
|
||||||
if (allGranted) {
|
if (allGranted) {
|
||||||
|
|
||||||
@@ -147,6 +160,7 @@ class MainActivity : BaseAppCompatActivity() {
|
|||||||
fun jumpLogin() {
|
fun jumpLogin() {
|
||||||
var inl = Intent(con, LoginActivity::class.java)
|
var inl = Intent(con, LoginActivity::class.java)
|
||||||
startActivity(inl)
|
startActivity(inl)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+36
-6
@@ -43,6 +43,7 @@ import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
|
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -100,8 +101,9 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthQualification"), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthQualification"), BaseBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
// initAuth();
|
// initAuth();
|
||||||
|
//判断是否从车辆进来 carId为空从个人认证进来需跳转实名认证,不为空车辆信息进入,需跳转车辆照片
|
||||||
|
if (TextUtils.isEmpty(carId)) {
|
||||||
//从业资格证->实名认证
|
//从业资格证->实名认证
|
||||||
// finish();
|
|
||||||
if (key) {
|
if (key) {
|
||||||
key = false;
|
key = false;
|
||||||
new AuthRequest().getAuthUrl(con, hd);
|
new AuthRequest().getAuthUrl(con, hd);
|
||||||
@@ -109,6 +111,21 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
key = true;
|
key = true;
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
finish();
|
||||||
|
if (isOverCar){//从业资格证=》道路运输许可证
|
||||||
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
|
in.putExtra("type", 3);
|
||||||
|
in.putExtra("carId", carId);
|
||||||
|
startActivity(in);
|
||||||
|
}else{//资料传完 补传情况
|
||||||
|
Intent in = new Intent(con, AddCarSuccActivity.class);
|
||||||
|
in.putExtra("type", 3);
|
||||||
|
con.startActivity(in);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Toast.makeText(con, "资格证上传成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "资格证上传成功", Toast.LENGTH_SHORT).show();
|
||||||
} else {
|
} else {
|
||||||
@@ -135,7 +152,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("url", CacheGroup.cacheList.get("authUrl"));
|
Log.e("url", CacheGroup.cacheList.get("authUrl"));
|
||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("authUrl"), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("authUrl"), BaseBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
finish();
|
// finish();
|
||||||
EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||||
@@ -153,6 +170,8 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String type = "0";
|
private String type = "0";
|
||||||
|
private String carId = "";
|
||||||
|
private boolean isOverCar = false;
|
||||||
private UserBean userBean;
|
private UserBean userBean;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -178,6 +197,8 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
vs = findViewById(R.id.vs);
|
vs = findViewById(R.id.vs);
|
||||||
data_view = findViewById(R.id.data_view);
|
data_view = findViewById(R.id.data_view);
|
||||||
type = getIntent().getExtras().getString("type");
|
type = getIntent().getExtras().getString("type");
|
||||||
|
carId = getIntent().getExtras().getString("carId", "");
|
||||||
|
isOverCar = getIntent().getExtras().getBoolean("isOverCar",false);
|
||||||
ur = new UserRequset(con, hd);
|
ur = new UserRequset(con, hd);
|
||||||
initView(null);
|
initView(null);
|
||||||
if ("0".equals(type)) {
|
if ("0".equals(type)) {
|
||||||
@@ -189,6 +210,11 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
//new RZRequest().isDriverAuthQualification(con,hd);
|
//new RZRequest().isDriverAuthQualification(con,hd);
|
||||||
}
|
}
|
||||||
|
if (TextUtils.isEmpty(carId)){//carId不为空 从添加车辆进入 该操作不能跳过
|
||||||
|
tvSkip.setVisibility(View.VISIBLE);
|
||||||
|
}else{
|
||||||
|
tvSkip.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean key = true;
|
private boolean key = true;
|
||||||
@@ -205,9 +231,10 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
});
|
});
|
||||||
img.setOnClickListener(v -> {
|
img.setOnClickListener(v -> {
|
||||||
if (!"".equals(url)) {
|
if (!"".equals(url)) {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con).asImageViewer(img, url, new SmartGlideImageLoader(R.mipmap.ic_launcher_round)).show();
|
||||||
.asImageViewer(img, url, true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
// new XPopup.Builder(con)
|
||||||
.show();
|
// .asImageViewer(img, url, true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
value2.setOnClickListener(v -> {
|
value2.setOnClickListener(v -> {
|
||||||
@@ -226,7 +253,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
if (!"".equals(id) && !"".equals(date) && !"".equals(url)) {
|
if (!"".equals(id) && !"".equals(date) && !"".equals(url)) {
|
||||||
new AuthRequest().driverAuthQualification(con, hd, id, ub.getData().getId(), date);
|
new AuthRequest().driverAuthQualification(con, hd, id, ub.getData().getId(), date);
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "提交信息不完整", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!"".equals(url)) {
|
if (!"".equals(url)) {
|
||||||
@@ -257,6 +284,9 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tvSkip.setOnClickListener(v -> {
|
tvSkip.setOnClickListener(v -> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (type.equals("0")) {
|
if (type.equals("0")) {
|
||||||
// finish();
|
// finish();
|
||||||
if (key) {
|
if (key) {
|
||||||
|
|||||||
+198
-41
@@ -4,6 +4,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -20,17 +21,24 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.cardview.widget.CardView;
|
import androidx.cardview.widget.CardView;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.DicBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.DicBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.SinglePickBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.SinglePickBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.cuspop.SimCenterPop;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.PickerUtils;
|
import com.arpa.hndahesudintocctmsdriver.util.PickerUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.map.MapUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.map.MapUtil;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.bumptech.glide.request.RequestOptions;
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.bumptech.glide.request.target.Target;
|
import com.bumptech.glide.request.target.Target;
|
||||||
|
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||||
|
import com.esign.esignsdk.EsignSdk;
|
||||||
|
import com.esign.esignsdk.data.AuthEvent;
|
||||||
import com.github.gzuliyujiang.wheelpicker.contract.OnOptionPickedListener;
|
import com.github.gzuliyujiang.wheelpicker.contract.OnOptionPickedListener;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.luck.picture.lib.PictureSelector;
|
import com.luck.picture.lib.PictureSelector;
|
||||||
@@ -68,8 +76,10 @@ import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||||
import com.lxj.xpopup.photoview.PhotoView;
|
import com.lxj.xpopup.photoview.PhotoView;
|
||||||
|
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -121,6 +131,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
private String url2 = "";
|
private String url2 = "";
|
||||||
private String url3 = "";
|
private String url3 = "";
|
||||||
private boolean[] keys = {false, false, false};
|
private boolean[] keys = {false, false, false};
|
||||||
|
private boolean key = true;
|
||||||
|
|
||||||
public void FalseKeys() {
|
public void FalseKeys() {
|
||||||
for (int i = 0; i < keys.length; i++) {
|
for (int i = 0; i < keys.length; i++) {
|
||||||
@@ -143,7 +154,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
break;
|
break;
|
||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
if (CacheGroup.cacheList.get("driverAuthIdCard") != null || CacheGroup.cacheList.get("driverAuthLicense") != null
|
if (CacheGroup.cacheList.get("driverAuthIdCard") != null || CacheGroup.cacheList.get("driverAuthLicense") != null
|
||||||
|| CacheGroup.cacheList.get("saveVehicleLicense") != null || CacheGroup.cacheList.get("saveDrawCar") != null) {
|
|| CacheGroup.cacheList.get("saveVehicleLicense") != null || CacheGroup.cacheList.get("authUrl") != null
|
||||||
|
|| CacheGroup.cacheList.get("saveDrawCar") != null) {
|
||||||
if (CacheGroup.cacheList.get("driverAuthIdCard") != null) {
|
if (CacheGroup.cacheList.get("driverAuthIdCard") != null) {
|
||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthIdCard"), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthIdCard"), BaseBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
@@ -165,12 +177,16 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthLicense"), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthLicense"), BaseBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show();
|
||||||
finish();
|
|
||||||
|
|
||||||
//上传驾驶证信息页面 跳转资格证信息页面
|
//上传驾驶证信息页面 进行实名认证操作
|
||||||
Intent in = new Intent(con, AuthQualificationActivity.class);
|
if (key) {
|
||||||
in.putExtra("type", "0");
|
key = false;
|
||||||
startActivity(in);
|
new AuthRequest().getAuthUrl(con, hd);
|
||||||
|
new Handler().postDelayed(() -> {
|
||||||
|
key = true;
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
@@ -178,19 +194,69 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
CacheGroup.cacheList.remove("driverAuthLicense");
|
CacheGroup.cacheList.remove("driverAuthLicense");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CacheGroup.cacheList.get("authUrl") != null) {
|
||||||
|
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()), ""));
|
||||||
|
} else {
|
||||||
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||||
|
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||||
|
CacheGroup.cacheList.remove("authUrl");
|
||||||
|
}
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("saveVehicleLicense") != null) {
|
if (CacheGroup.cacheList.get("saveVehicleLicense") != null) {
|
||||||
CarZhengBean czb = gson.fromJson(CacheGroup.cacheList.get("saveVehicleLicense"), CarZhengBean.class);
|
CarZhengBean czb = gson.fromJson(CacheGroup.cacheList.get("saveVehicleLicense"), CarZhengBean.class);
|
||||||
if (czb.getCode() == 200) {
|
if (czb.getCode() == 200) {
|
||||||
|
String needUpQCPhoto = czb.getData().getNeedUpQCPhoto();//是否需要上传从业资格证
|
||||||
|
String isTrailer = czb.getData().getIsTrailer();//是否需要上传挂车
|
||||||
|
String needUpRLPhoto = czb.getData().getNeedUpRLPhoto();//是否需要上传道路运输证到
|
||||||
Toast.makeText(con, "车辆行驶证保存成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "车辆行驶证保存成功", Toast.LENGTH_SHORT).show();
|
||||||
finish();
|
|
||||||
VehicleEvent ve = new VehicleEvent(String.valueOf(czb.getData().getCarId()));
|
VehicleEvent ve = new VehicleEvent(String.valueOf(czb.getData().getCarId()));
|
||||||
EventBus.getDefault().post(ve);
|
EventBus.getDefault().post(ve);
|
||||||
|
|
||||||
//上传行驶证信息后 跳转车辆照片页面
|
// TODO: 2023/8/23
|
||||||
|
if ("1".equals(isTrailer)) {//判断是否跳转挂车行驶证
|
||||||
|
Intent in = new Intent(con, CertificatesActivity.class);
|
||||||
|
in.putExtra("index", 3);
|
||||||
|
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
||||||
|
startActivity(in);
|
||||||
|
} else if ("1".equals(needUpQCPhoto)) {//判断是否跳转从业资格证
|
||||||
|
Intent in = new Intent(con, AuthQualificationActivity.class);
|
||||||
|
in.putExtra("type", "0");
|
||||||
|
in.putExtra("isOverCar", true);
|
||||||
|
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
||||||
|
startActivity(in);
|
||||||
|
} else if ("1".equals(needUpRLPhoto)) {//判断是否跳转道路运输许可证
|
||||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
in.putExtra("type", 0);
|
in.putExtra("type", 3);
|
||||||
|
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
||||||
|
startActivity(in);
|
||||||
|
} else {
|
||||||
|
//跳转成功页面
|
||||||
|
Intent in = new Intent(con, AddCarSuccActivity.class);
|
||||||
|
in.putExtra("type", 3);
|
||||||
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
||||||
con.startActivity(in);
|
con.startActivity(in);
|
||||||
|
}
|
||||||
|
finish();
|
||||||
|
// if ("1".equals(needUpQCPhoto)) {
|
||||||
|
// //现逻辑:上传行驶证信息后 判断是否跳转从业资格证
|
||||||
|
// Intent in = new Intent(con, AuthQualificationActivity.class);
|
||||||
|
// in.putExtra("type", "0");
|
||||||
|
// in.putExtra("isOverCar", false);
|
||||||
|
// in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
||||||
|
// startActivity(in);
|
||||||
|
// } else {
|
||||||
|
// //原逻辑:上传行驶证信息后 跳转车辆照片页面
|
||||||
|
// Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
|
// in.putExtra("type", 0);
|
||||||
|
// in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
||||||
|
// con.startActivity(in);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, czb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, czb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -198,20 +264,34 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("saveDrawCar") != null) {
|
if (CacheGroup.cacheList.get("saveDrawCar") != null) {
|
||||||
Log.e("-saveDrawCar-", CacheGroup.cacheList.get("saveDrawCar"));
|
Log.e("-saveDrawCar-", CacheGroup.cacheList.get("saveDrawCar"));
|
||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("saveDrawCar"), BaseBean.class);
|
CarZhengBean bb = gson.fromJson(CacheGroup.cacheList.get("saveDrawCar"), CarZhengBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
|
String needUpQCPhoto = bb.getData().getNeedUpQCPhoto();
|
||||||
|
String needUpRLPhoto = bb.getData().getNeedUpRLPhoto();//是否需要上传道路运输证到
|
||||||
Toast.makeText(con, "挂车信息保存成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "挂车信息保存成功", Toast.LENGTH_SHORT).show();
|
||||||
finish();
|
finish();
|
||||||
VehicleEvent ve = new VehicleEvent("挂");
|
VehicleEvent ve = new VehicleEvent("挂");
|
||||||
EventBus.getDefault().post(ve);
|
EventBus.getDefault().post(ve);
|
||||||
|
|
||||||
//挂车信息保存成功跳转成功页面
|
if ("1".equals(needUpQCPhoto)) {
|
||||||
|
//现逻辑:上传挂车保信息后 判断是否跳转从业资格证
|
||||||
|
Intent in = new Intent(con, AuthQualificationActivity.class);
|
||||||
|
in.putExtra("type", "0");
|
||||||
|
in.putExtra("carId", carId);
|
||||||
|
in.putExtra("isOverCar", true);
|
||||||
|
startActivity(in);
|
||||||
|
} else if ("1".equals(needUpRLPhoto)) {//现判断是否跳转道路运输许可证
|
||||||
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
|
in.putExtra("type", 3);
|
||||||
|
in.putExtra("carId", carId);
|
||||||
|
startActivity(in);
|
||||||
|
} else {
|
||||||
|
//原逻辑:挂车信息保存成功跳转成功页面
|
||||||
Intent in = new Intent(con, AddCarSuccActivity.class);
|
Intent in = new Intent(con, AddCarSuccActivity.class);
|
||||||
in.putExtra("type", 3);
|
in.putExtra("type", 3);
|
||||||
in.putExtra("carId", carId);
|
in.putExtra("carId", carId);
|
||||||
con.startActivity(in);
|
con.startActivity(in);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "挂车信息保存失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "挂车信息保存失败", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -245,6 +325,16 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove(CAR_ENERGY_TYPE);
|
CacheGroup.cacheList.remove(CAR_ENERGY_TYPE);
|
||||||
|
} else if (CacheGroup.cacheList.get("authUrl") != null) {
|
||||||
|
//实名认证校验
|
||||||
|
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()), ""));
|
||||||
|
} else {
|
||||||
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||||
|
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||||
|
CacheGroup.cacheList.remove("authUrl");
|
||||||
} else {
|
} else {
|
||||||
initView(null);
|
initView(null);
|
||||||
initData();
|
initData();
|
||||||
@@ -265,6 +355,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
StateStyleUtil.stateTextColor(this);
|
StateStyleUtil.stateTextColor(this);
|
||||||
setContentView(R.layout.activity_shangchuan_xsz);
|
setContentView(R.layout.activity_shangchuan_xsz);
|
||||||
|
EventBus.getDefault().register(this);
|
||||||
llColor = findViewById(R.id.llColor);
|
llColor = findViewById(R.id.llColor);
|
||||||
llCarName = findViewById(R.id.llCarName);
|
llCarName = findViewById(R.id.llCarName);
|
||||||
llType = findViewById(R.id.llType);
|
llType = findViewById(R.id.llType);
|
||||||
@@ -332,8 +423,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
llCarName.setVisibility(View.GONE);
|
llCarName.setVisibility(View.GONE);
|
||||||
llColor.setVisibility(View.VISIBLE);
|
// llColor.setVisibility(View.VISIBLE);
|
||||||
llType.setVisibility(View.VISIBLE);
|
// llType.setVisibility(View.VISIBLE);
|
||||||
type_img.setImageResource(R.mipmap.auth_icon_3);
|
type_img.setImageResource(R.mipmap.auth_icon_3);
|
||||||
// there_div.setVisibility(View.VISIBLE);
|
// there_div.setVisibility(View.VISIBLE);
|
||||||
if (c_str != null && !c_str.equals("")) {
|
if (c_str != null && !c_str.equals("")) {
|
||||||
@@ -372,8 +463,11 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
img1.setOnClickListener(v -> {
|
img1.setOnClickListener(v -> {
|
||||||
if (!url1.equals("")) {
|
if (!url1.equals("")) {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(img1, url1, true, -1, -1, 50, false, new ImageLoader())
|
.asImageViewer(img1, url1, new SmartGlideImageLoader(R.mipmap.ic_launcher_round))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(img1, url1, true, -1, -1, 50, false, new ImageLoader())
|
||||||
|
// .show();
|
||||||
} else {
|
} else {
|
||||||
if (!isAuth) {
|
if (!isAuth) {
|
||||||
FalseKeys();
|
FalseKeys();
|
||||||
@@ -386,8 +480,11 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
img2.setOnClickListener(v -> {
|
img2.setOnClickListener(v -> {
|
||||||
if (!url2.equals("")) {
|
if (!url2.equals("")) {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(img2, url2, true, -1, -1, 50, false, new ImageLoader())
|
.asImageViewer(img2, url2, new SmartGlideImageLoader(R.mipmap.ic_launcher_round))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(img2, url2, true, -1, -1, 50, false, new ImageLoader())
|
||||||
|
// .show();
|
||||||
} else {
|
} else {
|
||||||
if (!isAuth) {
|
if (!isAuth) {
|
||||||
FalseKeys();
|
FalseKeys();
|
||||||
@@ -430,8 +527,11 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
gia.showPopueWindow(this);
|
gia.showPopueWindow(this);
|
||||||
} else if (!url3.equals("")) {
|
} else if (!url3.equals("")) {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(img3, url3, true, -1, -1, 50, false, new ImageLoader())
|
.asImageViewer(img3, url3, new SmartGlideImageLoader(R.mipmap.ic_launcher_round))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(img3, url3, true, -1, -1, 50, false, new ImageLoader())
|
||||||
|
// .show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
value5.setOnClickListener(v -> {
|
value5.setOnClickListener(v -> {
|
||||||
@@ -459,11 +559,21 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
startActivity(in1);
|
startActivity(in1);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
finish();
|
//传驾驶证信息页面 跳转实名认证
|
||||||
|
// finish();
|
||||||
|
if (key) {
|
||||||
|
key = false;
|
||||||
|
new AuthRequest().getAuthUrl(con, hd);
|
||||||
|
new Handler().postDelayed(() -> {
|
||||||
|
key = true;
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
//上传驾驶证信息页面 跳转资格证信息页面
|
//上传驾驶证信息页面 跳转资格证信息页面
|
||||||
Intent in2 = new Intent(con, AuthQualificationActivity.class);
|
// finish();
|
||||||
in2.putExtra("type", "0");
|
// Intent in2 = new Intent(con, AuthQualificationActivity.class);
|
||||||
startActivity(in2);
|
// in2.putExtra("type", "0");
|
||||||
|
// startActivity(in2);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
finish();
|
finish();
|
||||||
@@ -478,6 +588,12 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
EventBus.getDefault().unregister(this);
|
||||||
|
}
|
||||||
|
|
||||||
boolean isAuth = false;
|
boolean isAuth = false;
|
||||||
|
|
||||||
public void initData() {
|
public void initData() {
|
||||||
@@ -635,6 +751,9 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
Glide.with(con).load(url2).into(img2);
|
Glide.with(con).load(url2).into(img2);
|
||||||
startTime = ocbb.getData().getStartTime();
|
startTime = ocbb.getData().getStartTime();
|
||||||
backId = ocbb.getData().getId();
|
backId = ocbb.getData().getId();
|
||||||
|
|
||||||
|
//自动调取提交功能,实现页面自动跳转
|
||||||
|
subimt();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -666,6 +785,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
url2 = odlb.getData().getUrl();
|
url2 = odlb.getData().getUrl();
|
||||||
backId = odlb.getData().getId();
|
backId = odlb.getData().getId();
|
||||||
Glide.with(con).load(url2).into(img2);
|
Glide.with(con).load(url2).into(img2);
|
||||||
|
//自动调取提交功能,实现页面自动跳转
|
||||||
|
subimt();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -699,6 +820,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
url2 = oblb.getData().getUrl();
|
url2 = oblb.getData().getUrl();
|
||||||
backId = oblb.getData().getId();
|
backId = oblb.getData().getId();
|
||||||
Glide.with(con).load(url2).into(img2);
|
Glide.with(con).load(url2).into(img2);
|
||||||
|
//自动调取提交功能,实现页面自动跳转
|
||||||
|
subimt();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, oblb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, oblb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -831,10 +954,10 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (olb != null && oblb != null) {
|
if (olb != null && oblb != null) {
|
||||||
if (curColor==null||curEnergy==null){
|
// if (curColor == null || curEnergy == null) {
|
||||||
Toast.makeText(con,"请完善内容",Toast.LENGTH_SHORT).show();
|
// Toast.makeText(con, "请完善内容", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
if ("".equals(url3)) {
|
if ("".equals(url3)) {
|
||||||
map.put("imgId", fid);
|
map.put("imgId", fid);
|
||||||
@@ -844,8 +967,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
map.put("type", str2);
|
map.put("type", str2);
|
||||||
map.put("owner", str3);
|
map.put("owner", str3);
|
||||||
map.put("vehicleNumber", str4);
|
map.put("vehicleNumber", str4);
|
||||||
map.put("carPlateColor", curColor.getValue());
|
// map.put("carPlateColor", curColor.getValue());
|
||||||
map.put("carEnergyTyp", curEnergy.getValue());
|
// map.put("carEnergyTyp", curEnergy.getValue());
|
||||||
new AuthRequest().saveVehicleLicense(con, hd, MapUtil.mapJson(map));
|
new AuthRequest().saveVehicleLicense(con, hd, MapUtil.mapJson(map));
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||||
@@ -883,22 +1006,56 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
EventBus.getDefault().post(he);
|
EventBus.getDefault().post(he);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ImageLoader implements XPopupImageLoader {
|
@Subscribe
|
||||||
@Override
|
public void processResult(AuthEvent auth) {
|
||||||
public void loadImage(int position, @NonNull Object url, @NonNull ImageView imageView) {
|
//添加实名/意愿/签署完成之后的逻辑
|
||||||
//必须指定Target.SIZE_ORIGINAL,否则无法拿到原图,就无法享用天衣无缝的动画
|
Log.e("-回调信息-", auth.result);
|
||||||
Glide.with(imageView).load(url).apply(new RequestOptions().placeholder(R.mipmap.ic_launcher_round).override(Target.SIZE_ORIGINAL)).into(imageView);
|
JSONObject jsonObject = JSON.parseObject(auth.result);
|
||||||
}
|
if ("success".equalsIgnoreCase(jsonObject.getString("res"))) {
|
||||||
|
EsignSdk.getInstance().finishH5Activity();
|
||||||
|
new MessageUtils().showSimCenPop(con, "个人信息上传成功,请添加车辆信息!", () -> {
|
||||||
|
finish();
|
||||||
|
Intent in = new Intent(con, CertificatesActivity.class);
|
||||||
|
in.putExtra("index", 2);
|
||||||
|
startActivity(in);
|
||||||
|
|
||||||
@Override
|
});
|
||||||
public File getImageFile(@NonNull Context context, @NonNull Object uri) {
|
if ("sign".equalsIgnoreCase(jsonObject.getString("key"))) {
|
||||||
try {
|
Toast.makeText(con, "签署场景成功", Toast.LENGTH_SHORT).show();
|
||||||
return Glide.with(context).downloadOnly().load(uri).submit().get();
|
} else if ("realName".equalsIgnoreCase(jsonObject.getString("key"))) {
|
||||||
} catch (Exception e) {
|
Toast.makeText(con, "实名认证成功", Toast.LENGTH_SHORT).show();
|
||||||
e.printStackTrace();
|
} else {
|
||||||
|
Toast.makeText(con, "意愿认证成功", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
return null;
|
} else {
|
||||||
|
if ("sign".equalsIgnoreCase(jsonObject.getString("key"))) {
|
||||||
|
Toast.makeText(con, "签署场景失败", Toast.LENGTH_SHORT).show();
|
||||||
|
} else if ("realName".equalsIgnoreCase(jsonObject.getString("key"))) {
|
||||||
|
Toast.makeText(con, "实名认证失败", Toast.LENGTH_SHORT).show();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(con, "意愿认证失败", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
EsignSdk.getInstance().finishH5Activity();
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public static class ImageLoader implements XPopupImageLoader {
|
||||||
|
// @Override
|
||||||
|
// public void loadImage(int position, @NonNull Object url, @NonNull ImageView imageView) {
|
||||||
|
// //必须指定Target.SIZE_ORIGINAL,否则无法拿到原图,就无法享用天衣无缝的动画
|
||||||
|
// Glide.with(imageView).load(url).apply(new RequestOptions().placeholder(R.mipmap.ic_launcher_round).override(Target.SIZE_ORIGINAL)).into(imageView);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public File getImageFile(@NonNull Context context, @NonNull Object uri) {
|
||||||
|
// try {
|
||||||
|
// return Glide.with(context).downloadOnly().load(uri).submit().get();
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-1
@@ -15,6 +15,7 @@ import androidx.annotation.Nullable;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
@@ -40,6 +41,7 @@ import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
|
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
@@ -95,6 +97,11 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("url", CacheGroup.cacheList.get("authUrl"));
|
Log.e("url", CacheGroup.cacheList.get("authUrl"));
|
||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("authUrl"), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("authUrl"), BaseBean.class);
|
||||||
if (bb.getCode() == 200) {
|
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()), ""));
|
EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||||
@@ -161,6 +168,8 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
// startActivityForResult(in, 12);
|
// startActivityForResult(in, 12);
|
||||||
//EsignSdk.getInstance().startH5Activity(act,"https://smlh5.esign.cn/usercenterFront/oemAuth/v3/realName/index?contextKey=b7b103b15b866ec4c72beef1dfe20828&appId=7438873235");
|
//EsignSdk.getInstance().startH5Activity(act,"https://smlh5.esign.cn/usercenterFront/oemAuth/v3/realName/index?contextKey=b7b103b15b866ec4c72beef1dfe20828&appId=7438873235");
|
||||||
if (key) {
|
if (key) {
|
||||||
|
// EsignSdk.getInstance().startH5Activity(act, "");
|
||||||
|
|
||||||
key = false;
|
key = false;
|
||||||
new AuthRequest().getAuthUrl(con, hd);
|
new AuthRequest().getAuthUrl(con, hd);
|
||||||
new Handler().postDelayed(() -> {
|
new Handler().postDelayed(() -> {
|
||||||
@@ -175,8 +184,11 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
up_head.setOnClickListener(v -> {
|
up_head.setOnClickListener(v -> {
|
||||||
if (ub.getData().getHeadportraitUrl() != null && !ub.getData().getHeadportraitUrl().equals("")) {
|
if (ub.getData().getHeadportraitUrl() != null && !ub.getData().getHeadportraitUrl().equals("")) {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(up_head, ub.getData().getHeadportraitUrl(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
.asImageViewer(up_head, ub.getData().getHeadportraitUrl(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(up_head, ub.getData().getHeadportraitUrl(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
hyr = new HuoYuanRequset(con, hd);
|
hyr = new HuoYuanRequset(con, hd);
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import com.luck.picture.lib.PictureSelector;
|
|||||||
import com.luck.picture.lib.config.PictureConfig;
|
import com.luck.picture.lib.config.PictureConfig;
|
||||||
import com.luck.picture.lib.entity.LocalMedia;
|
import com.luck.picture.lib.entity.LocalMedia;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -52,12 +53,12 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
private String[] name1 = {"车辆照片", "NFC照片", "车辆登记证书照片", "道路运输许可证照片"};
|
private String[] name1 = {"车辆照片", "NFC照片", "车辆登记证书照片", "道路运输许可证照片"};
|
||||||
private String[] name2 = {"请上传车辆照片", "请上传NFC照片", "请上传车辆登记证书照片", "请上传道路运输许可证照片"};
|
private String[] name2 = {"请上传车辆照片", "请上传NFC照片", "请上传车辆登记证书照片", "请上传道路运输许可证照片"};
|
||||||
private Boolean[] isShowEdit = {false, false, true, true};
|
private Boolean[] isShowEdit = {false, false, true, true};
|
||||||
private Boolean[] isShowSkip = {true, false, false, false};
|
private Boolean[] isShowSkip = {true, false, false, true};
|
||||||
private String[] tips = {
|
private String[] tips = {
|
||||||
"",
|
"",
|
||||||
"*注意: 没有粘贴NFC芯片的车辆无需上传,可直接跳过",
|
"*注意: 没有粘贴NFC芯片的车辆无需上传,可直接跳过",
|
||||||
"*注意: 没有可直接跳过,等候下次上传",
|
"*注意: 没有可直接跳过,等候下次上传",
|
||||||
"*注意: 4.5吨一下车辆不需要上传,可直接跳过"};
|
"*注意: 4.5吨以下车辆不需要上传,可直接跳过"};
|
||||||
|
|
||||||
|
|
||||||
private BaseRecyclerView brv;
|
private BaseRecyclerView brv;
|
||||||
@@ -157,8 +158,13 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
IsAuthDriverAuthQualificationBean ib = gson.fromJson(CacheGroup.cacheList.get("saveCarRoadLicenseNo"), IsAuthDriverAuthQualificationBean.class);
|
IsAuthDriverAuthQualificationBean ib = gson.fromJson(CacheGroup.cacheList.get("saveCarRoadLicenseNo"), IsAuthDriverAuthQualificationBean.class);
|
||||||
if (ib.getCode() == 200) {
|
if (ib.getCode() == 200) {
|
||||||
//判断是否需要跳转挂车行驶证页面
|
//判断是否需要跳转挂车行驶证页面
|
||||||
if (!"".equals(carId) && cdb.getData().getIsTrailer() == 1) {
|
|
||||||
if (!"".equals(carId) ){
|
if (!"".equals(carId) ){
|
||||||
|
if (cdb.getData().getIsTrailer() == 1&&!TextUtils.isEmpty(cdb.getData().getTrailerResVo().getCarNumber())){//需要挂车,并且传过挂车直接结束
|
||||||
|
finish();
|
||||||
|
Intent in = new Intent(con, AddCarSuccActivity.class);
|
||||||
|
in.putExtra("type", 3);
|
||||||
|
con.startActivity(in);
|
||||||
|
}else if(cdb.getData().getIsTrailer() == 1&&TextUtils.isEmpty(cdb.getData().getTrailerResVo().getCarNumber())){//需要挂车,没传过挂车,到挂车页面
|
||||||
finish();
|
finish();
|
||||||
Intent in = new Intent(con, CertificatesActivity.class);
|
Intent in = new Intent(con, CertificatesActivity.class);
|
||||||
in.putExtra("index", 3);
|
in.putExtra("index", 3);
|
||||||
@@ -167,15 +173,41 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
in.putExtra("cheData", new Gson().toJson(cdb));
|
in.putExtra("cheData", new Gson().toJson(cdb));
|
||||||
}
|
}
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
} else {
|
}else if(cdb.getData().getIsTrailer() == 0){//不需要挂车
|
||||||
Toast.makeText(con, "请先绑定行驶证", Toast.LENGTH_SHORT).show();
|
if ("1".equals(cdb.getData().getNeedUpQCPhoto())){//需要从业资格证
|
||||||
}
|
Intent in = new Intent(con, AuthQualificationActivity.class);
|
||||||
|
in.putExtra("type", "0");
|
||||||
|
in.putExtra("carId", carId);
|
||||||
|
in.putExtra("isOverCar", false);
|
||||||
|
startActivity(in);
|
||||||
}else{
|
}else{
|
||||||
finish();
|
finish();
|
||||||
Intent in = new Intent(con, AddCarSuccActivity.class);
|
Intent in = new Intent(con, AddCarSuccActivity.class);
|
||||||
in.putExtra("type", 3);
|
in.putExtra("type", 3);
|
||||||
con.startActivity(in);
|
con.startActivity(in);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (!"".equals(carId) && cdb.getData().getIsTrailer() == 1) {
|
||||||
|
// if (!"".equals(carId)) {
|
||||||
|
// finish();
|
||||||
|
// Intent in = new Intent(con, CertificatesActivity.class);
|
||||||
|
// in.putExtra("index", 3);
|
||||||
|
// in.putExtra("carId", carId);
|
||||||
|
// if (cdb != null) {
|
||||||
|
// in.putExtra("cheData", new Gson().toJson(cdb));
|
||||||
|
// }
|
||||||
|
// startActivity(in);
|
||||||
|
// } else {
|
||||||
|
// Toast.makeText(con, "请先绑定行驶证", Toast.LENGTH_SHORT).show();
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// finish();
|
||||||
|
// Intent in = new Intent(con, AddCarSuccActivity.class);
|
||||||
|
// in.putExtra("type", 3);
|
||||||
|
// con.startActivity(in);
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, ib.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, ib.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -287,30 +319,42 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
case 0:
|
case 0:
|
||||||
if (cdb.getData().getRoadLicensePhoto() != null && !cdb.getData().getCarImage().equals("")) {
|
if (cdb.getData().getRoadLicensePhoto() != null && !cdb.getData().getCarImage().equals("")) {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(img, cdb.getData().getCarImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
.asImageViewer(img, cdb.getData().getCarImage(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(img, cdb.getData().getCarImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (cdb.getData().getRoadLicensePhoto() != null && !cdb.getData().getNfcImage().equals("")) {
|
if (cdb.getData().getRoadLicensePhoto() != null && !cdb.getData().getNfcImage().equals("")) {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(img, cdb.getData().getNfcImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
.asImageViewer(img, cdb.getData().getNfcImage(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(img, cdb.getData().getNfcImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (cdb.getData().getRoadLicensePhoto() != null && !cdb.getData().getRegisterImage().equals("")) {
|
if (cdb.getData().getRoadLicensePhoto() != null && !cdb.getData().getRegisterImage().equals("")) {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(img, cdb.getData().getRegisterImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
.asImageViewer(img, cdb.getData().getRegisterImage(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(img, cdb.getData().getRegisterImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (cdb.getData().getRoadLicensePhoto() != null && !"".equals(cdb.getData().getRoadLicensePhoto())) {
|
if (cdb.getData().getRoadLicensePhoto() != null && !"".equals(cdb.getData().getRoadLicensePhoto())) {
|
||||||
//roadLicensePhoto
|
//roadLicensePhoto
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(img, cdb.getData().getRoadLicensePhoto(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
.asImageViewer(img, cdb.getData().getRoadLicensePhoto(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(img, cdb.getData().getRoadLicensePhoto(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -332,7 +376,8 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
if (!TextUtils.isEmpty(url)||(cdb!=null&&!TextUtils.isEmpty(cdb.getData().getCarImage()))){
|
if (!TextUtils.isEmpty(url)||(cdb!=null&&!TextUtils.isEmpty(cdb.getData().getCarImage()))){
|
||||||
finish();
|
finish();
|
||||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
in.putExtra("type", 1);
|
// in.putExtra("type", 1);
|
||||||
|
in.putExtra("type", 3);
|
||||||
in.putExtra("carId", carId);
|
in.putExtra("carId", carId);
|
||||||
con.startActivity(in);
|
con.startActivity(in);
|
||||||
} else{
|
} else{
|
||||||
@@ -349,7 +394,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
case 2:
|
case 2:
|
||||||
String s = value1.getText().toString();
|
String s = value1.getText().toString();
|
||||||
if (TextUtils.isEmpty(s)) {
|
if (TextUtils.isEmpty(s)) {
|
||||||
Toast.makeText(this, "请完善证号", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new AuthRequest().saveCarRegisterNo(con,hd,carId,s);
|
new AuthRequest().saveCarRegisterNo(con,hd,carId,s);
|
||||||
@@ -357,7 +402,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
case 3:
|
case 3:
|
||||||
String s1 = value1.getText().toString();
|
String s1 = value1.getText().toString();
|
||||||
if (TextUtils.isEmpty(s1)) {
|
if (TextUtils.isEmpty(s1)) {
|
||||||
Toast.makeText(this, "请完善证号", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new AuthRequest().saveCarRoadLicenseNo(con,hd,carId,s1);
|
new AuthRequest().saveCarRoadLicenseNo(con,hd,carId,s1);
|
||||||
@@ -425,7 +470,8 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
if (0 == type) {
|
if (0 == type) {
|
||||||
finish();
|
finish();
|
||||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
in.putExtra("type", 1);
|
// in.putExtra("type", 1);
|
||||||
|
in.putExtra("type", 3);
|
||||||
in.putExtra("carId", carId);
|
in.putExtra("carId", carId);
|
||||||
con.startActivity(in);
|
con.startActivity(in);
|
||||||
} else if (1 == type) {
|
} else if (1 == type) {
|
||||||
|
|||||||
+5
-1
@@ -33,6 +33,7 @@ import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||||
|
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@@ -221,8 +222,11 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
carImage.setOnClickListener(v14 -> {
|
carImage.setOnClickListener(v14 -> {
|
||||||
if(cdb!=null && cdb.getData()!=null && cdb.getData().getCarImage()!=null && !cdb.getData().getCarImage().equals("")){
|
if(cdb!=null && cdb.getData()!=null && cdb.getData().getCarImage()!=null && !cdb.getData().getCarImage().equals("")){
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(carImage,cdb.getData().getCarImage(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
.asImageViewer(carImage,cdb.getData().getCarImage(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(carImage,cdb.getData().getCarImage(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
r1.setOnClickListener(v12 -> {
|
r1.setOnClickListener(v12 -> {
|
||||||
|
|||||||
+93
-8
@@ -2,6 +2,7 @@ package com.arpa.hndahesudintocctmsdriver.ui.business;
|
|||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@@ -9,6 +10,15 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.amap.api.services.core.AMapException;
|
||||||
|
import com.amap.api.services.core.LatLonPoint;
|
||||||
|
import com.amap.api.services.core.PoiItem;
|
||||||
|
import com.amap.api.services.core.SuggestionCity;
|
||||||
|
import com.amap.api.services.poisearch.PoiResult;
|
||||||
|
import com.amap.api.services.poisearch.PoiSearch;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||||
|
import com.dahe.mylibrary.utils.ImageLoader;
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.BusinessBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.BusinessBean;
|
||||||
@@ -39,7 +49,7 @@ import okhttp3.Response;
|
|||||||
* @date 2021/9/6 9:59
|
* @date 2021/9/6 9:59
|
||||||
* @description:
|
* @description:
|
||||||
*/
|
*/
|
||||||
public class BusinessActivity extends BaseActivity {
|
public class BusinessActivity extends BaseActivity implements PoiSearch.OnPoiSearchListener {
|
||||||
|
|
||||||
private BaseRecyclerView business_type;
|
private BaseRecyclerView business_type;
|
||||||
private BaseRecyclerView business_list;
|
private BaseRecyclerView business_list;
|
||||||
@@ -51,6 +61,9 @@ public class BusinessActivity extends BaseActivity {
|
|||||||
private CustomDialog customDialog;
|
private CustomDialog customDialog;
|
||||||
private int sum = 0;
|
private int sum = 0;
|
||||||
private String type = "餐饮";
|
private String type = "餐饮";
|
||||||
|
private PoiSearch.Query query;
|
||||||
|
private List<PoiItem> poiItems;// poi数据
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
super.msgMethod(m);
|
super.msgMethod(m);
|
||||||
@@ -69,7 +82,21 @@ public class BusinessActivity extends BaseActivity {
|
|||||||
break;
|
break;
|
||||||
case LocationGDUtil.RES:
|
case LocationGDUtil.RES:
|
||||||
address.setText(ld.getAddress());
|
address.setText(ld.getAddress());
|
||||||
new BusinessRequest().GetBusinessList(con,hd,ld.getLongitude()+"",ld.getLatitude()+"",type);
|
// new BusinessRequest().GetBusinessList(con,hd,ld.getLongitude()+"",ld.getLatitude()+"",type);
|
||||||
|
|
||||||
|
try {
|
||||||
|
customDialog.dismiss();
|
||||||
|
LatLonPoint lp = new LatLonPoint(ld.getLatitude(), ld.getLongitude());
|
||||||
|
PoiSearch poiSearch = new PoiSearch(this, query);
|
||||||
|
poiSearch.setOnPoiSearchListener(this);
|
||||||
|
poiSearch.setBound(new PoiSearch.SearchBound(lp, 5000, true));//
|
||||||
|
// 设置搜索区域为以lp点为圆心,其周围5000米范围
|
||||||
|
poiSearch.searchPOIAsyn();// 异步搜索
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
BusinessBean.DataDTO bds = gson.fromJson((String) m.obj, BusinessBean.DataDTO.class);
|
BusinessBean.DataDTO bds = gson.fromJson((String) m.obj, BusinessBean.DataDTO.class);
|
||||||
@@ -112,9 +139,13 @@ public class BusinessActivity extends BaseActivity {
|
|||||||
customDialog.show();
|
customDialog.show();
|
||||||
ld = new LocationGDUtil(con, hd);
|
ld = new LocationGDUtil(con, hd);
|
||||||
ld.onCreate();
|
ld.onCreate();
|
||||||
|
|
||||||
|
changeType(type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Object> list_type = new ArrayList<>();
|
List<Object> list_type = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initView(Object obj) {
|
public void initView(Object obj) {
|
||||||
super.initView(obj);
|
super.initView(obj);
|
||||||
@@ -132,11 +163,52 @@ public class BusinessActivity extends BaseActivity {
|
|||||||
bbs = new ArrayList<>();
|
bbs = new ArrayList<>();
|
||||||
customDialog = new CustomDialog(con, "正在切换...");
|
customDialog = new CustomDialog(con, "正在切换...");
|
||||||
customDialog.show();
|
customDialog.show();
|
||||||
new BusinessRequest().GetBusinessList(con,hd,ld.getLongitude()+"",ld.getLatitude()+"",m.getType_name());
|
changeType(m.getType_name());
|
||||||
|
// new BusinessRequest().GetBusinessList(con,hd,ld.getLongitude()+"",ld.getLatitude()+"",m.getType_name());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPoiSearched(PoiResult poiResult, int i) {
|
||||||
|
if (poiResult != null && poiResult.getQuery() != null) {// 搜索poi的结果
|
||||||
|
poiItems = poiResult.getPois();// 当搜索不到poiitem数据时,会返回含有搜索关键字的城市信息
|
||||||
|
if (poiItems != null && poiItems.size() > 0) {
|
||||||
|
initBusListDel();
|
||||||
|
} else {
|
||||||
|
ToastUtils.showToast(con, "对不起,没有搜索到相关数据!");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ToastUtils.showToast(con, "对不起,没有搜索到相关数据!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPoiItemSearched(PoiItem poiItem, int i) {
|
||||||
|
System.out.println(poiItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void changeType(String type) {
|
||||||
|
query = new PoiSearch.Query(type, "", "");
|
||||||
|
query.setExtensions("all");
|
||||||
|
query.setPageSize(20);// 设置每页最多返回多少条poiitem
|
||||||
|
query.setPageNum(0);// 设置查第一页
|
||||||
|
|
||||||
|
if (ld.getLatitude() != 0) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
LatLonPoint lp = new LatLonPoint(ld.getLatitude(), ld.getLongitude());
|
||||||
|
PoiSearch poiSearch = new PoiSearch(this, query);
|
||||||
|
poiSearch.setOnPoiSearchListener(this);
|
||||||
|
poiSearch.setBound(new PoiSearch.SearchBound(lp, 5000, true));//
|
||||||
|
// 设置搜索区域为以lp点为圆心,其周围5000米范围
|
||||||
|
poiSearch.searchPOIAsyn();// 异步搜索
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void forGetBusDel() {
|
public void forGetBusDel() {
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
//business_list.remo
|
//business_list.remo
|
||||||
@@ -150,15 +222,29 @@ public class BusinessActivity extends BaseActivity {
|
|||||||
|
|
||||||
|
|
||||||
public void initBusListDel() {
|
public void initBusListDel() {
|
||||||
|
customDialog.dismiss();
|
||||||
//开始渲染
|
//开始渲染
|
||||||
business_list.createV(con,bbs,R.layout.item_business_list).setOnItemViewListener((position, o, v) -> {
|
business_list.createV(con, poiItems, R.layout.item_business_list).setOnItemViewListener((position, o, v) -> {
|
||||||
BusinessBean.DataDTO bd= (BusinessBean.DataDTO) o;
|
PoiItem bd = (PoiItem) o;
|
||||||
v.setOnClickListener(v1 -> {
|
ImageView img = v.findViewById(R.id.photo_url);
|
||||||
|
TextView name = v.findViewById(R.id.name);
|
||||||
|
TextView address = v.findViewById(R.id.address);
|
||||||
|
TextView taste = v.findViewById(R.id.taste);
|
||||||
|
|
||||||
|
if (bd.getPhotos().size() > 0 && !TextUtils.isEmpty(bd.getPhotos().get(0).getUrl())) {
|
||||||
|
ImageLoader.getInstance().loadRoundImage(con, bd.getPhotos().get(0).getUrl(), 10, img);
|
||||||
|
}
|
||||||
|
|
||||||
|
name.setText(bd.getTitle());
|
||||||
|
address.setText(bd.getSnippet());
|
||||||
|
taste.setText(bd.getTel());
|
||||||
|
|
||||||
|
// v.setOnClickListener(v1 -> {
|
||||||
// Intent in=new Intent(con, WebActivity.class);
|
// Intent in=new Intent(con, WebActivity.class);
|
||||||
// in.putExtra("url",bd.getBusiness_url());
|
// in.putExtra("url",bd.getBusiness_url());
|
||||||
// in.putExtra("title",bd.getName());
|
// in.putExtra("title",bd.getName());
|
||||||
// startActivity(in);
|
// startActivity(in);
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,7 +287,6 @@ public class BusinessActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Model {
|
class Model {
|
||||||
private String type_name;
|
private String type_name;
|
||||||
private int type_img;
|
private int type_img;
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ import java.util.Set;
|
|||||||
* @description:
|
* @description:
|
||||||
*/
|
*/
|
||||||
public class Md5Util {
|
public class Md5Util {
|
||||||
static String app_key="3d4c1b5592f9ae09";
|
static String app_key="1000055";
|
||||||
static String appSecret="642cc46b385264595df7cce271250a1cb782b39c";
|
static String appSecret="4e0d1be81540c4d1f0868d329b3229467f071f6c";
|
||||||
static String[] strs={"app_key","deviceId","longitude","latitude","keyword","timestamp","format","v","sign_method","session","sign"};
|
static String[] strs={"app_key","deviceId","longitude","latitude","keyword","timestamp","format","v","sign_method","session","sign"};
|
||||||
static String[] strsDel={"app_key","deviceId","openshopid","timestamp","format","v","sign_method","session","sign"};
|
static String[] strsDel={"app_key","deviceId","openshopid","timestamp","format","v","sign_method","session","sign"};
|
||||||
public static String resUrl(String longitude,String latitude,String keyword){
|
public static String resUrl(String longitude,String latitude,String keyword){
|
||||||
@@ -35,7 +35,7 @@ public class Md5Util {
|
|||||||
requestParam.put("format", "json");
|
requestParam.put("format", "json");
|
||||||
requestParam.put("v", "1");
|
requestParam.put("v", "1");
|
||||||
requestParam.put("sign_method", "MD5");
|
requestParam.put("sign_method", "MD5");
|
||||||
requestParam.put("session", "cb2007c78d055247f7f242760173268caef1183a");
|
requestParam.put("session", "c1fc1773a27d47e988725bc6df150626dbda0b4d");
|
||||||
requestParam.put("sign", generateSign(requestParam,appSecret,"MD5"));
|
requestParam.put("sign", generateSign(requestParam,appSecret,"MD5"));
|
||||||
str+="?";
|
str+="?";
|
||||||
for(int i=0;i<requestParam.size();i++){
|
for(int i=0;i<requestParam.size();i++){
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import android.graphics.Outline;
|
|||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@@ -42,11 +43,13 @@ import com.arpa.hndahesudintocctmsdriver.constant.JTTConstant;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.StartOrderParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.StartOrderParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.news.NewActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.news.NewActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
import com.gyf.cactus.Cactus;
|
||||||
import com.hjq.xtoast.XToast;
|
import com.hjq.xtoast.XToast;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.lxj.xpopup.interfaces.OnConfirmListener;
|
import com.lxj.xpopup.interfaces.OnConfirmListener;
|
||||||
@@ -123,6 +126,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
private ImageConfig ic;
|
private ImageConfig ic;
|
||||||
private DriverExpireBean deb;
|
private DriverExpireBean deb;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
super.msgMethod(m);
|
super.msgMethod(m);
|
||||||
@@ -140,6 +144,15 @@ public class HomeFragment extends BaseFragment {
|
|||||||
if (ub.getCode() == 200) {
|
if (ub.getCode() == 200) {
|
||||||
SPUtil.insSP(con, "data", "userdata", CacheGroup.cacheList.get("userdata"));
|
SPUtil.insSP(con, "data", "userdata", CacheGroup.cacheList.get("userdata"));
|
||||||
MsgUtil.addHdMsgWat(hd, 33);
|
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);
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -383,6 +396,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void initView(Object obj) {
|
public void initView(Object obj) {
|
||||||
super.initView(obj);
|
super.initView(obj);
|
||||||
|
Cactus.getInstance().updateNotification(getActivity());
|
||||||
List<ManyBean> list = new ArrayList<>();
|
List<ManyBean> list = new ArrayList<>();
|
||||||
list.add(new ManyBean(new Model(), R.layout.item_home));
|
list.add(new ManyBean(new Model(), R.layout.item_home));
|
||||||
as = brv.creates(con, list);
|
as = brv.creates(con, list);
|
||||||
@@ -467,7 +481,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
case 0:
|
case 0:
|
||||||
//startActivity(new Intent(con, OrderListActivity.class));
|
//startActivity(new Intent(con, OrderListActivity.class));
|
||||||
PermissionX.init(getActivity())
|
PermissionX.init(getActivity())
|
||||||
.permissions(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
.permissions(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||||
.request((allGranted, grantedList, deniedList) -> {
|
.request((allGranted, grantedList, deniedList) -> {
|
||||||
if (allGranted) {
|
if (allGranted) {
|
||||||
Intent in = new Intent(con, BusinessActivity.class);
|
Intent in = new Intent(con, BusinessActivity.class);
|
||||||
@@ -529,6 +543,9 @@ public class HomeFragment extends BaseFragment {
|
|||||||
ur.upApp();
|
ur.upApp();
|
||||||
hyr.getHuoYuan(1, 100);
|
hyr.getHuoYuan(1, 100);
|
||||||
ur.getImage(1);
|
ur.getImage(1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (UiAuxiliary.isLogin(con)) {
|
if (UiAuxiliary.isLogin(con)) {
|
||||||
ur.User();
|
ur.User();
|
||||||
ur.getDriverExpire();
|
ur.getDriverExpire();
|
||||||
@@ -783,9 +800,11 @@ public class HomeFragment extends BaseFragment {
|
|||||||
private class MyLoader extends ImageLoader {
|
private class MyLoader extends ImageLoader {
|
||||||
@Override
|
@Override
|
||||||
public void displayImage(Context context, Object path, ImageView imageView) {
|
public void displayImage(Context context, Object path, ImageView imageView) {
|
||||||
|
if (HomeFragment.this != null && getActivity() != null && !getActivity().isDestroyed()) {
|
||||||
Glide.with(con).load(path).into(imageView);
|
Glide.with(con).load(path).into(imageView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void addMap(double latitude, double longitude, String title, String price, int id) {
|
public void addMap(double latitude, double longitude, String title, String price, int id) {
|
||||||
if (aMap != null) {
|
if (aMap != null) {
|
||||||
@@ -882,6 +901,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
public void initAlct() {
|
public void initAlct() {
|
||||||
PermissionX.init(getActivity())
|
PermissionX.init(getActivity())
|
||||||
.permissions(Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
.permissions(Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||||
|
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||||
Manifest.permission.RECORD_AUDIO)
|
Manifest.permission.RECORD_AUDIO)
|
||||||
.request((allGranted, grantedList, deniedList) -> {
|
.request((allGranted, grantedList, deniedList) -> {
|
||||||
if (allGranted) {
|
if (allGranted) {
|
||||||
|
|||||||
+89
-15
@@ -1,6 +1,7 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui.home;
|
package com.arpa.hndahesudintocctmsdriver.ui.home;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -18,20 +19,27 @@ import androidx.annotation.Nullable;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.event.FaceEvent;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
||||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.PersonalAuthActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.auth.PersonalAuthActivity;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.img.ImageGetUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.img.ImageGetUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
|
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||||
import com.esign.esignsdk.EsignSdk;
|
import com.esign.esignsdk.EsignSdk;
|
||||||
import com.esign.esignsdk.data.AuthEvent;
|
import com.esign.esignsdk.data.AuthEvent;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.lxj.xpopup.core.BasePopupView;
|
import com.lxj.xpopup.core.BasePopupView;
|
||||||
|
import com.lxj.xpopup.interfaces.OnCancelListener;
|
||||||
import com.lxj.xpopup.interfaces.OnConfirmListener;
|
import com.lxj.xpopup.interfaces.OnConfirmListener;
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||||
@@ -93,7 +101,15 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
//Toast.makeText(con,"接单成功",Toast.LENGTH_SHORT).show();
|
//Toast.makeText(con,"接单成功",Toast.LENGTH_SHORT).show();
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
EsignSdk.getInstance().startH5Activity(act, (String) bb.getData());
|
// EsignSdk.getInstance().startH5Activity(act, (String) bb.getData());
|
||||||
|
|
||||||
|
|
||||||
|
Intent intent = new Intent(this, H5Activity.class);
|
||||||
|
intent.putExtra("url", (String) bb.getData());
|
||||||
|
intent.putExtra("view_file", false);
|
||||||
|
startActivity(intent);
|
||||||
|
|
||||||
|
|
||||||
//finish();
|
//finish();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
@@ -120,6 +136,21 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
car.setText("选择车辆:" + clb.getData().get(index).getCarNumber());
|
car.setText("选择车辆:" + clb.getData().get(index).getCarNumber());
|
||||||
cid = clb.getData().get(index).getCarId();
|
cid = clb.getData().get(index).getCarId();
|
||||||
break;
|
break;
|
||||||
|
case 1111://安联用户验证通过,接单
|
||||||
|
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();
|
||||||
|
new MessageUtils().showCenMessage(con, (String) m.obj);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,20 +267,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
if (cid != null) {
|
if (cid != null) {
|
||||||
// if (fpKey){
|
// if (fpKey){
|
||||||
if (key) {
|
if (key) {
|
||||||
new XPopup.Builder(con)
|
reOrder();
|
||||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
|
||||||
.asConfirm("请确认接单", "是否确定承运此运单?",
|
|
||||||
"取消", "确认",
|
|
||||||
new OnConfirmListener() {
|
|
||||||
@Override
|
|
||||||
public void onConfirm() {
|
|
||||||
Log.e("--id--", "cid:" + cid + "---wid:" + id);
|
|
||||||
customDialog = new CustomDialog(con, "正在接单...");
|
|
||||||
customDialog.show();
|
|
||||||
hyr.confirm(cid, id);
|
|
||||||
}
|
|
||||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
|
||||||
.show();
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "请先同意并签署运输合同", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "请先同意并签署运输合同", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -316,6 +334,51 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void faceResult(FaceEvent home) {
|
||||||
|
Log.e("-res-", home.getMessage());
|
||||||
|
|
||||||
|
UiAuxiliary.homeRequest("接单");
|
||||||
|
Intent in = new Intent(con, StartYunDanActivity.class);
|
||||||
|
in.putExtra("id", "0");
|
||||||
|
startActivity(in);
|
||||||
|
finish();
|
||||||
|
|
||||||
|
// new Handler().postDelayed(() -> {
|
||||||
|
// UiAuxiliary.homeRequest("接单");
|
||||||
|
// Intent in = new Intent(con, StartYunDanActivity.class);
|
||||||
|
// in.putExtra("id", "0");
|
||||||
|
// startActivity(in);
|
||||||
|
// finish();
|
||||||
|
// }, 2500);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// new Handler().postDelayed(() -> {
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// UiAuxiliary.homeRequest("接单");
|
||||||
|
//// //ur.getJtt(hyd.getData().getId());
|
||||||
|
//
|
||||||
|
// Intent in = new Intent(con, StartYunDanActivity.class);
|
||||||
|
// in.putExtra("id", "0");
|
||||||
|
// startActivity(in);
|
||||||
|
//
|
||||||
|
// ActivityUtils.finishActivity(H5Activity.class);
|
||||||
|
// finish();
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// }, 1500);
|
||||||
|
|
||||||
|
// UiAuxiliary.homeRequest("接单");
|
||||||
|
|
||||||
|
// Intent in = new Intent(con, StartYunDanActivity.class);
|
||||||
|
// in.putExtra("id", "0");
|
||||||
|
// startActivity(in);
|
||||||
|
// finish();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void processResult(AuthEvent auth) {
|
public void processResult(AuthEvent auth) {
|
||||||
//添加实名/意愿/签署完成之后的逻辑
|
//添加实名/意愿/签署完成之后的逻辑
|
||||||
@@ -350,4 +413,15 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接单
|
||||||
|
* 先判断安联用户信息验证,随后接单
|
||||||
|
*/
|
||||||
|
private void reOrder() {
|
||||||
|
customDialog = new CustomDialog(con, "正在接单...");
|
||||||
|
customDialog.show();
|
||||||
|
//验证安联用户是否通过
|
||||||
|
ALProcess.verification(con, hd);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public class OrderAllActivity extends BaseActivity {
|
|||||||
}else{
|
}else{
|
||||||
Toast.makeText(con,"抢单",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,"抢单",Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
xp.dismiss();
|
// xp.dismiss();
|
||||||
break;
|
break;
|
||||||
default:break;
|
default:break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -359,12 +359,16 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
Toast.makeText(con,"您还没有装货",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,"您还没有装货",Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}else if(sdw.getStatus()==1){//装货回单
|
}else if(sdw.getStatus()==1){//装货回单
|
||||||
|
if(type==0){
|
||||||
Intent in=new Intent(con, ShangChuangImgActivity.class);
|
Intent in=new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type",2);
|
in.putExtra("type",2);
|
||||||
in.putExtra("wid",wid);
|
in.putExtra("wid",wid);
|
||||||
in.putExtra("h_type",type);
|
in.putExtra("h_type",type);
|
||||||
in.putExtra("sob",gson.toJson(sob));
|
in.putExtra("sob",gson.toJson(sob));
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,"您还没有上传回单信息",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
}else if(sdw.getStatus()==2){//上传收货单(卸货回单)
|
}else if(sdw.getStatus()==2){//上传收货单(卸货回单)
|
||||||
Intent in=new Intent(con, ShangChuangImgActivity.class);
|
Intent in=new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type",2);
|
in.putExtra("type",2);
|
||||||
|
|||||||
+9
-2
@@ -16,6 +16,7 @@ import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||||
|
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author hlh
|
* @author hlh
|
||||||
@@ -74,16 +75,22 @@ public class GetShangChuanActivity extends BaseActivity {
|
|||||||
Glide.with(con).load(sdw.getSendPutImagesUrl().get(0)).into(img1);
|
Glide.with(con).load(sdw.getSendPutImagesUrl().get(0)).into(img1);
|
||||||
img1.setOnClickListener(v -> {
|
img1.setOnClickListener(v -> {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(img1,sdw.getSendPutImagesUrl().get(0), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
.asImageViewer(img1,sdw.getSendPutImagesUrl().get(0), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(img1,sdw.getSendPutImagesUrl().get(0), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(sdw.getReceiptUrl()!=null && sdw.getReceiptUrl().size()>=1){
|
if(sdw.getReceiptUrl()!=null && sdw.getReceiptUrl().size()>=1){
|
||||||
Glide.with(con).load(sdw.getReceiptUrl().get(0)).into(img2);
|
Glide.with(con).load(sdw.getReceiptUrl().get(0)).into(img2);
|
||||||
img2.setOnClickListener(v -> {
|
img2.setOnClickListener(v -> {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(img2,sdw.getReceiptUrl().get(0), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
.asImageViewer(img2,sdw.getReceiptUrl().get(0), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(img2,sdw.getReceiptUrl().get(0), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//new GlideUrl(sdw.getSendPutImagesUrl().toString(), new LazyHeaders.Builder().addHeader("Cookie", AppCurrentUser.getInstance().getUserCookie()).build());
|
//new GlideUrl(sdw.getSendPutImagesUrl().toString(), new LazyHeaders.Builder().addHeader("Cookie", AppCurrentUser.getInstance().getUserCookie()).build());
|
||||||
|
|||||||
+126
-11
@@ -19,11 +19,17 @@ import com.alct.mdp.callback.OnResultListener;
|
|||||||
import com.alct.mdp.model.Goods;
|
import com.alct.mdp.model.Goods;
|
||||||
import com.alct.mdp.model.Image;
|
import com.alct.mdp.model.Image;
|
||||||
import com.alct.mdp.model.Location;
|
import com.alct.mdp.model.Location;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.CarInfoBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
||||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.BitmapUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.BitmapUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.NfcUtils;
|
import com.arpa.hndahesudintocctmsdriver.util.NfcUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.img.GetCarImageAlert;
|
import com.arpa.hndahesudintocctmsdriver.util.img.GetCarImageAlert;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.location.LocationUtil;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.luck.picture.lib.PictureSelector;
|
import com.luck.picture.lib.PictureSelector;
|
||||||
@@ -39,7 +45,6 @@ import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.UploadReceiptInputBean;
|
import com.arpa.hndahesudintocctmsdriver.request.bean.UploadReceiptInputBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.location.LocationGDUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.location.LocationGDUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.location.LocationUtil;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.file.FileUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.file.FileUtil;
|
||||||
@@ -48,6 +53,7 @@ import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
|
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
@@ -68,7 +74,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
private LUInputBean lub = new LUInputBean();
|
private LUInputBean lub = new LUInputBean();
|
||||||
private UploadReceiptInputBean urib = new UploadReceiptInputBean();
|
private UploadReceiptInputBean urib = new UploadReceiptInputBean();
|
||||||
private LocationGDUtil lgdu;
|
private LocationGDUtil lgdu;
|
||||||
private LocationUtil lu;
|
public LocationUtil lu;
|
||||||
private List<Integer> imgIds = new ArrayList<>();
|
private List<Integer> imgIds = new ArrayList<>();
|
||||||
private UploadBean ub;
|
private UploadBean ub;
|
||||||
private HuoYuanRequset hyr;
|
private HuoYuanRequset hyr;
|
||||||
@@ -125,6 +131,32 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("carName");
|
CacheGroup.cacheList.remove("carName");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CacheGroup.cacheList.get("carNum") != null) {
|
||||||
|
Log.e("upload", CacheGroup.cacheList.get("carNum"));
|
||||||
|
CarInfoBean ub = gson.fromJson(CacheGroup.cacheList.remove("carNum"), CarInfoBean.class);
|
||||||
|
if (ub.getCode() == 200 && ub.getData().getData().getPrism_keyValueInfo().size() > 0) {
|
||||||
|
String value = ub.getData().getData().getPrism_keyValueInfo().get(0).getValue();
|
||||||
|
String forceMatching = ub.getData().getForceMatching();
|
||||||
|
if ("1".equals(forceMatching)) {//是否强校验车牌号 1:强校验
|
||||||
|
if (sob.getData().getCarNumber().equals(value)) {
|
||||||
|
hyr.uploadFile(new File(path));
|
||||||
|
} else {
|
||||||
|
new MessageUtils().showCenMessage(ShangChuangImgActivity.this, "车牌号不匹配!", "请重新拍照或联系管理员");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
hyr.uploadFile(new File(path));
|
||||||
|
}
|
||||||
|
} else {//识别失败后返回code500
|
||||||
|
if (index == 0) {//装卸货车辆需要识别车牌号){
|
||||||
|
Toast.makeText(con, "装货照片包含车牌号、三分之二车身或者装卸货场景。", Toast.LENGTH_SHORT).show();
|
||||||
|
} else if (index == 1) {
|
||||||
|
Toast.makeText(con, "卸货照片包含车牌号、三分之二车身或者装卸货场景。", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
CacheGroup.cacheList.remove("carNum");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 14://定位成功
|
case 14://定位成功
|
||||||
locationKey = true;
|
locationKey = true;
|
||||||
@@ -153,9 +185,14 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
// if(index==1 || index==2){
|
// if(index==1 || index==2){
|
||||||
// new OCRRequest().OCRPlateLicense(con,hd,new File(path));
|
// new OCRRequest().OCRPlateLicense(con,hd,new File(path));
|
||||||
// }
|
// }
|
||||||
|
if (index == 0 || index == 1) {//装卸货车辆需要识别车牌号
|
||||||
|
new OCRRequest().OCRCarPlateLicense(con, hd, new File(path));
|
||||||
|
} else {
|
||||||
hyr.uploadFile(new File(path));
|
hyr.uploadFile(new File(path));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
default:break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,8 +278,11 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
gia.showPopueWindow(this, index == 2);
|
gia.showPopueWindow(this, index == 2);
|
||||||
} else {
|
} else {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(res_img, ub.getData().getUrl(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
.asImageViewer(res_img, ub.getData().getUrl(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(res_img, ub.getData().getUrl(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
Toast.makeText(con, "查看了照片", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "查看了照片", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -309,11 +349,12 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
lub.setWaybillId(wid);
|
lub.setWaybillId(wid);
|
||||||
Log.e("--装货信息", gson.toJson(lub));
|
Log.e("--装货信息", gson.toJson(lub));
|
||||||
if (locationKey) {
|
if (locationKey) {
|
||||||
hyr.loading(lub);
|
|
||||||
if (keys) {
|
if (keys) {
|
||||||
nfc();
|
nfc();
|
||||||
up_traffic_start();
|
loadInfo();
|
||||||
up_image_z();
|
// up_traffic_start();
|
||||||
|
// up_image_z();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||||
@@ -335,10 +376,10 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
if (locationKey) {
|
if (locationKey) {
|
||||||
if (keys) {
|
if (keys) {
|
||||||
nfc();
|
nfc();
|
||||||
up_traffic_end();
|
uploadInfo();
|
||||||
up_image();
|
|
||||||
}
|
}
|
||||||
hyr.dischargeCargo(lub);
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -374,7 +415,8 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Toast.makeText(con, "图片上传异常,请重新上传", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "图片上传异常,请重新上传", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,6 +440,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("上报安联失败(装货):", s + s1);
|
Log.e("上报安联失败(装货):", s + s1);
|
||||||
|
new MessageUtils().showCenMessage(con, s1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -640,5 +683,77 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("nfc", nfcStr);
|
Log.e("nfc", nfcStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传安联和交通厅,平台-装货
|
||||||
|
*/
|
||||||
|
private void loadInfo() {
|
||||||
|
//安联
|
||||||
|
if (sob.getData().getReportAlct() == 1) {
|
||||||
|
Location l = new Location();
|
||||||
|
l.setBaiduLongitude(lu.getLongitude());
|
||||||
|
l.setBaiduLatitude(lu.getLatitude());
|
||||||
|
l.setLocation(lu.getAddress());
|
||||||
|
l.setTime(Timer.getTimerT());
|
||||||
|
MDPLocationCollectionManager.pickup(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联", "装货上传成功");
|
||||||
|
//交通厅
|
||||||
|
if (sob.getData().getReport() == 1) {
|
||||||
|
JTTProcess.start(con, sob, "");
|
||||||
|
}
|
||||||
|
//装货照片
|
||||||
|
up_image_z();
|
||||||
|
//装货状态
|
||||||
|
hyr.loading(lub);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(装货):", s + s1);
|
||||||
|
new MessageUtils().showCenMessage(con, s1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传安联和交通厅,平台-卸货
|
||||||
|
*/
|
||||||
|
private void uploadInfo() {
|
||||||
|
|
||||||
|
//安联
|
||||||
|
if (sob.getData().getReportAlct() == 1) {
|
||||||
|
Location l = new Location();
|
||||||
|
l.setBaiduLongitude(lu.getLongitude());
|
||||||
|
l.setBaiduLatitude(lu.getLatitude());
|
||||||
|
l.setLocation(lu.getAddress());
|
||||||
|
l.setTime(Timer.getTimerT());
|
||||||
|
Log.e("-安联卸货信息-", gson.toJson(l));
|
||||||
|
MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联", "卸货上传成功");
|
||||||
|
//交通厅
|
||||||
|
if (sob.getData().getReport() == 1) {
|
||||||
|
JTTProcess.stop(con, sob, "");
|
||||||
|
}
|
||||||
|
//卸货照片-安联
|
||||||
|
up_image();
|
||||||
|
//卸货状态-平台
|
||||||
|
hyr.dischargeCargo(lub);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(卸货):", s + s1);
|
||||||
|
new MessageUtils().showCenMessage(con, s1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+713
@@ -0,0 +1,713 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Message;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.alct.mdp.MDPLocationCollectionManager;
|
||||||
|
import com.alct.mdp.callback.OnResultListener;
|
||||||
|
import com.alct.mdp.model.Goods;
|
||||||
|
import com.alct.mdp.model.Image;
|
||||||
|
import com.alct.mdp.model.Location;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.StartOrderBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.request.bean.UploadReceiptInputBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.BitmapUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.NfcUtils;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.file.FileUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.img.GetCarImageAlert;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.location.LocationGDUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.location.LocationUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.luck.picture.lib.PictureSelector;
|
||||||
|
import com.luck.picture.lib.config.PictureConfig;
|
||||||
|
import com.luck.picture.lib.entity.LocalMedia;
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ShangChuangImgActivity2 extends BaseAppCompatActivity {
|
||||||
|
|
||||||
|
private TextView submit,name_top,name_body,address,tips,tips_x;
|
||||||
|
private RelativeLayout getImg;
|
||||||
|
private ImageView res_img,img_icon,img_delete;
|
||||||
|
private String[] names={"装货","卸货","回单"};
|
||||||
|
public static String[] TYPE_NAME={"zhuanghuo","xiehuo","huidan"};
|
||||||
|
private int index=0;
|
||||||
|
//
|
||||||
|
private Gson gson=new Gson();
|
||||||
|
//
|
||||||
|
private LUInputBean lub=new LUInputBean();
|
||||||
|
private UploadReceiptInputBean urib=new UploadReceiptInputBean();
|
||||||
|
private LocationGDUtil lgdu;
|
||||||
|
private LocationUtil lu;
|
||||||
|
private List<Integer> imgIds=new ArrayList<>();
|
||||||
|
private UploadBean ub;
|
||||||
|
private HuoYuanRequset hyr;
|
||||||
|
//
|
||||||
|
private GetCarImageAlert gia=new GetCarImageAlert();
|
||||||
|
private CustomDialog customDialog;
|
||||||
|
private int id=0;
|
||||||
|
private boolean key=true;
|
||||||
|
private boolean keys=false;
|
||||||
|
private boolean locationKey=false;
|
||||||
|
private TextView tv_loaction;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void msgMethod(Message m) {
|
||||||
|
super.msgMethod(m);
|
||||||
|
switch (m.what){
|
||||||
|
case RequsetCodeConstants.SUCCESS:
|
||||||
|
if (CacheGroup.cacheList.get("upload")!=null) {
|
||||||
|
Log.e("upload",CacheGroup.cacheList.get("upload"));
|
||||||
|
ub=gson.fromJson(CacheGroup.cacheList.remove("upload"),UploadBean.class);
|
||||||
|
if(ub.getCode()==200){
|
||||||
|
imgIds.add(ub.getData().getId());
|
||||||
|
Glide.with(con).load(ub.getData().getUrl()).into(res_img);
|
||||||
|
res_img.setVisibility(View.VISIBLE);
|
||||||
|
img_delete.setVisibility(View.VISIBLE);
|
||||||
|
img_icon.setVisibility(View.GONE);
|
||||||
|
key=false;
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,ub.getMsg(),Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
CacheGroup.cacheList.remove("upload");
|
||||||
|
}
|
||||||
|
for(int i=0;i<TYPE_NAME.length;i++){
|
||||||
|
if (CacheGroup.cacheList.get(TYPE_NAME[i])!=null) {
|
||||||
|
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[i]),BaseBean.class);
|
||||||
|
if(bb.getCode()==200){
|
||||||
|
if(!keys){
|
||||||
|
Toast.makeText(con,"上传成功",Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,"上传成功",Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,bb.getMsg(),Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
CacheGroup.cacheList.remove(TYPE_NAME[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(CacheGroup.cacheList.get("carName")!=null){
|
||||||
|
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get("carName"),BaseBean.class);
|
||||||
|
if(bb.getCode()==200){
|
||||||
|
|
||||||
|
}
|
||||||
|
CacheGroup.cacheList.remove("carName");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 14://定位成功
|
||||||
|
locationKey=true;
|
||||||
|
customDialog.dismiss();
|
||||||
|
tv_loaction.setText("定位成功");
|
||||||
|
tv_loaction.setTextColor(getResources().getColor(R.color.theme_color,null));
|
||||||
|
initLocation();
|
||||||
|
break;
|
||||||
|
case 16://定位失败
|
||||||
|
locationKey=false;
|
||||||
|
customDialog.dismiss();
|
||||||
|
tv_loaction.setText("定位失败,点击重试");
|
||||||
|
tv_loaction.setTextColor(getResources().getColor(R.color.loaction_no_color,null));
|
||||||
|
Toast.makeText(con,"定位失败,请确认开启定位后重试!",Toast.LENGTH_LONG).show();
|
||||||
|
//定位结果接收
|
||||||
|
//finish();
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||||
|
path= (String) m.obj;
|
||||||
|
Log.e("res:","选定图片结果");
|
||||||
|
Log.e("res:",path);
|
||||||
|
//选定图片结果
|
||||||
|
// if(index==1 || index==2){
|
||||||
|
// new OCRRequest().OCRPlateLicense(con,hd,new File(path));
|
||||||
|
// }
|
||||||
|
hyr.uploadFile(new File(path));
|
||||||
|
break;
|
||||||
|
default:break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String wid;
|
||||||
|
private int h_type;
|
||||||
|
String sobStr="";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
StateStyleUtil.stateTextColor(this);
|
||||||
|
setContentView(R.layout.activity_shangchuan);
|
||||||
|
con=this;
|
||||||
|
submit=findViewById(R.id.submit);
|
||||||
|
name_top=findViewById(R.id.name_top);
|
||||||
|
name_body=findViewById(R.id.name_body);
|
||||||
|
address=findViewById(R.id.address);
|
||||||
|
getImg=findViewById(R.id.getImg);
|
||||||
|
res_img=findViewById(R.id.res_img);
|
||||||
|
img_icon=findViewById(R.id.img_icon);
|
||||||
|
img_delete=findViewById(R.id.img_delete);
|
||||||
|
tv_loaction=findViewById(R.id.tv_loaction);
|
||||||
|
tips=findViewById(R.id.tips);
|
||||||
|
tips_x=findViewById(R.id.tips_x);
|
||||||
|
Bundle ins=getIntent().getExtras();
|
||||||
|
index=ins.getInt("type");
|
||||||
|
wid=ins.getString("wid");
|
||||||
|
h_type=ins.getInt("h_type");
|
||||||
|
keys=ins.getBoolean("keys");
|
||||||
|
sobStr=getIntent().getExtras().getString("sob");
|
||||||
|
//Log.e("---sdwStr--",sdwStr);
|
||||||
|
sob=new Gson().fromJson(sobStr, StartOrderBean.class);
|
||||||
|
initView(null);
|
||||||
|
customDialog=new CustomDialog(con, "正在定位当前位置...");
|
||||||
|
customDialog.show();
|
||||||
|
lgdu=new LocationGDUtil(con,hd);
|
||||||
|
//启动定位
|
||||||
|
lgdu.onCreate();
|
||||||
|
lu=new LocationUtil(con,hd);
|
||||||
|
lu.onCreate();
|
||||||
|
if (keys){
|
||||||
|
lu=new LocationUtil(con,hd);
|
||||||
|
lu.onCreate();
|
||||||
|
}
|
||||||
|
tv_loaction.setOnClickListener(v -> {
|
||||||
|
if (!locationKey){
|
||||||
|
customDialog.show();
|
||||||
|
lgdu.onCreate();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
hyr=new HuoYuanRequset(con,hd);
|
||||||
|
// if (!NfcUtils.hasNfc(con)) {
|
||||||
|
// Toast.makeText(con,"请先开启nfc",Toast.LENGTH_LONG).show();
|
||||||
|
// }else{
|
||||||
|
// initData();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initData() {
|
||||||
|
//nfc初始化设置
|
||||||
|
NfcUtils nfcUtils = new NfcUtils(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initView(Object obj) {
|
||||||
|
super.initView(obj);
|
||||||
|
name_top.setText("上传"+names[index]+"照片");
|
||||||
|
name_body.setText(names[index]+"照片");
|
||||||
|
if(index==1){
|
||||||
|
tips.setVisibility(View.VISIBLE);
|
||||||
|
tips_x.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
submit.setOnClickListener(v -> {
|
||||||
|
if(imgIds.size()!=0){
|
||||||
|
typeRequest();
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,"请先上传一张图片",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
getImg.setOnClickListener(v -> {
|
||||||
|
if(key){
|
||||||
|
Log.e("--imgIds.size()--",imgIds.size()+"");
|
||||||
|
gia.showPopueWindow(this,true);
|
||||||
|
// gia.showPopueWindow(this,index==2);
|
||||||
|
}else{
|
||||||
|
new XPopup.Builder(con)
|
||||||
|
.asImageViewer(res_img, ub.getData().getUrl(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(res_img, ub.getData().getUrl(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
|
Toast.makeText(con,"查看了照片", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
img_delete.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
imgIds=new ArrayList<>();
|
||||||
|
ub=new UploadBean();
|
||||||
|
res_img.setVisibility(View.GONE);
|
||||||
|
img_delete.setVisibility(View.GONE);
|
||||||
|
img_icon.setVisibility(View.VISIBLE);
|
||||||
|
key=true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
String path;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
if (requestCode == 12 && resultCode == RESULT_OK) {
|
||||||
|
if (null==gia.getFile()){
|
||||||
|
new ToastUtil(con, Gravity.CENTER,"图片选择失败").show(Toast.LENGTH_SHORT);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
path=gia.getFile().getPath();
|
||||||
|
Log.e("图片地址:",path);
|
||||||
|
gia.dis();
|
||||||
|
ImageFileCompressUtil.imageFileCompress(con,new File(path),hd);
|
||||||
|
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
||||||
|
List<LocalMedia> imgs = PictureSelector.obtainMultipleResult(data);
|
||||||
|
if (imgs != null && imgs.size() > 0) {
|
||||||
|
LocalMedia image = imgs.get(0);
|
||||||
|
|
||||||
|
String paths = image.getAndroidQToPath();
|
||||||
|
if (TextUtils.isEmpty(paths)) {
|
||||||
|
paths = image.getPath();
|
||||||
|
}
|
||||||
|
path=paths;
|
||||||
|
Log.e("图片地址:",path);
|
||||||
|
gia.dis();
|
||||||
|
ImageFileCompressUtil.imageFileCompress(con,new File(path),hd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initLocation(){
|
||||||
|
address.setText(lgdu.getAddress());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void typeRequest(){
|
||||||
|
// for(int i=0;i<imgIds.size();i++){
|
||||||
|
// Log.e("--imgIds--",imgIds.get(i)+"");
|
||||||
|
// }
|
||||||
|
switch (index){
|
||||||
|
case 0:
|
||||||
|
//装货
|
||||||
|
if(imgIds!=null && imgIds.size()>0) {
|
||||||
|
lub.setLatitude(lgdu.getLatitude() + "");
|
||||||
|
lub.setLongitude(lgdu.getLongitude() + "");
|
||||||
|
lub.setLocationAddress(lgdu.getAddress());
|
||||||
|
lub.setImageId(imgIds);
|
||||||
|
lub.setWaybillId(wid);
|
||||||
|
Log.e("--装货信息", gson.toJson(lub));
|
||||||
|
if(locationKey){
|
||||||
|
// hyr.loading(lub);
|
||||||
|
if(keys){
|
||||||
|
nfc();
|
||||||
|
up_traffic_start();
|
||||||
|
up_image_z();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,"定位异常,请重新定位",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,"图片上传异常,请重新上传",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if(imgIds!=null && imgIds.size()>0) {
|
||||||
|
//卸货
|
||||||
|
lub.setLatitude(lgdu.getLatitude() + "");
|
||||||
|
lub.setLongitude(lgdu.getLongitude() + "");
|
||||||
|
lub.setLocationAddress(lgdu.getAddress());
|
||||||
|
lub.setImageId(imgIds);
|
||||||
|
lub.setWaybillId(wid);
|
||||||
|
Log.e("--卸货信息", gson.toJson(lub));
|
||||||
|
if(locationKey){
|
||||||
|
if(keys){
|
||||||
|
nfc();
|
||||||
|
up_traffic_end();
|
||||||
|
up_image();
|
||||||
|
}
|
||||||
|
// hyr.dischargeCargo(lub);
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,"定位异常,请重新定位",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,"图片上传异常,请重新上传",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if(imgIds!=null && imgIds.size()>0){//卸货回单
|
||||||
|
//上传回单
|
||||||
|
urib.setLatitude(lgdu.getLatitude()+"");
|
||||||
|
urib.setLongitude(lgdu.getLongitude()+"");
|
||||||
|
urib.setLocationAddress(lgdu.getAddress());
|
||||||
|
//装卸货类型
|
||||||
|
urib.setType(h_type+1);
|
||||||
|
//回单id 数组
|
||||||
|
urib.setReceiptId(imgIds);
|
||||||
|
//子运运单ID
|
||||||
|
urib.setWaybillId(wid);
|
||||||
|
Log.e("--回单信息",gson.toJson(urib));
|
||||||
|
if(locationKey) {
|
||||||
|
if (index == 2 && keys) {
|
||||||
|
up_trafficSign();
|
||||||
|
up_trafficReceipt();
|
||||||
|
receipt_image();
|
||||||
|
}
|
||||||
|
// hyr.receipt(urib);
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,"定位异常,请重新定位",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,"图片上传异常,请重新上传",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private StartOrderBean sob;
|
||||||
|
|
||||||
|
//上传安联和交通厅-装货
|
||||||
|
public void up_traffic_start(){
|
||||||
|
//安联
|
||||||
|
if(sob.getData().getReportAlct()==1) {
|
||||||
|
|
||||||
|
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||||
|
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||||
|
if (wayChild.getType()==1){
|
||||||
|
data = wayChild;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Location l = new Location();
|
||||||
|
l.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||||
|
l.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||||
|
l.setLocation(data.getAddress());
|
||||||
|
l.setTime(data.getImageTakenDate());
|
||||||
|
MDPLocationCollectionManager.pickup(con,sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联", "装货上传成功");
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,"装货上传成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(装货):", s + s1);
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,s + s1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//交通厅
|
||||||
|
if(sob.getData().getReport()==1){
|
||||||
|
JTTProcess.start(con,sob,"");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void nfc(){
|
||||||
|
// if(sob.getData().getNfcId().equals(nfcStr)){
|
||||||
|
// Toast.makeText(con,"nfcId匹配失败",Toast.LENGTH_LONG).show();
|
||||||
|
// }
|
||||||
|
if("".equals(sob.getData().getNfcId()) || sob.getData().getNfcId()==null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
MDPLocationCollectionManager.checkNfc(con, sob.getData().getShippingNoteNumber(),
|
||||||
|
sob.getData().getNfcId(), new OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Toast.makeText(con,"nfcId匹配成功",Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("不匹配",""+s+s1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//上传安联和交通厅-卸货
|
||||||
|
public void up_traffic_end(){
|
||||||
|
//安联
|
||||||
|
if(sob.getData().getReportAlct()==1){
|
||||||
|
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||||
|
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||||
|
if (wayChild.getType()==2){
|
||||||
|
data = wayChild;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Location l=new Location();
|
||||||
|
l.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||||
|
l.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||||
|
l.setLocation(data.getAddress());
|
||||||
|
l.setTime(data.getImageTakenDate());
|
||||||
|
Log.e("-安联卸货信息-",gson.toJson(l));
|
||||||
|
MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联","卸货上传成功");
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,"卸货上传成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(卸货):",s+s1);
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//交通厅
|
||||||
|
if(sob.getData().getReport()==1){
|
||||||
|
JTTProcess.stop(con,sob,"");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//上传安联-签收
|
||||||
|
public void up_trafficSign(){
|
||||||
|
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||||
|
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||||
|
if (wayChild.getType()==2){
|
||||||
|
data = wayChild;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//安联
|
||||||
|
Location l=new Location();
|
||||||
|
l.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||||
|
l.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||||
|
l.setLocation(data.getAddress());
|
||||||
|
l.setTime(data.getImageTakenDate());
|
||||||
|
List<Goods> gs=new ArrayList<>();
|
||||||
|
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||||
|
if(wid.equals(wayChild.getId()+"")){
|
||||||
|
for (StartOrderBean.DataDTO.WayChildrenDTO.GoodsDTO good : wayChild.getGoods()) {
|
||||||
|
Goods g=new Goods();
|
||||||
|
g.setGoodsName(good.getGoodName());
|
||||||
|
g.setUnit(good.getGoodUnit());
|
||||||
|
g.setItemNo(good.getId());
|
||||||
|
//实收
|
||||||
|
g.setQuantity(1);
|
||||||
|
//应收
|
||||||
|
g.setReceivedQuantity(1);
|
||||||
|
//破损
|
||||||
|
g.setDamageQuantity(1);
|
||||||
|
//丢失
|
||||||
|
g.setQuantity(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MDPLocationCollectionManager.sign(con, sob.getData().getShippingNoteNumber(), l,gs, new OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联","签收成功");
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,"签收成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||||
|
Log.e("上报安联失败(签收):",s+s1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//上传安联-回单
|
||||||
|
public void up_trafficReceipt(){
|
||||||
|
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||||
|
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||||
|
if (wayChild.getType()==2){
|
||||||
|
data = wayChild;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//安联
|
||||||
|
Location l=new Location();
|
||||||
|
l.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||||
|
l.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||||
|
l.setLocation(data.getAddress());
|
||||||
|
l.setTime(data.getImageTakenDate());
|
||||||
|
MDPLocationCollectionManager.pod(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联","回单上传成功");
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,"回单上传成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(回单):",s+s1);
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void up_image_z(){
|
||||||
|
///storage/emulated/0/Android/data/com.oneclouds.wangluohuoyun/files/Pictures/163124593063154.jpg
|
||||||
|
|
||||||
|
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||||
|
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||||
|
if (wayChild.getType()==1){
|
||||||
|
data = wayChild;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
File file=new File(path);
|
||||||
|
Image image=new Image();
|
||||||
|
String base= BitmapUtil.imageToBase64(path);
|
||||||
|
image.setFileData("data:image/"+ FileUtil.lastName(file) +";base64,"+base);
|
||||||
|
image.setFileExt(FileUtil.lastName(file));
|
||||||
|
image.setFileName(FileUtil.fileName(file));
|
||||||
|
image.setImageTakenDate(data.getImageTakenDate());
|
||||||
|
image.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||||
|
image.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||||
|
image.setLocation(data.getAddress());
|
||||||
|
MDPLocationCollectionManager.uploadPickupImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联","装货照片上传成功");
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,"装货照片上传成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(装货照片):",s+s1);
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||||
|
// SPUtil.insSP(con,"make","装货",sob.getData().getShippingNoteNumber());
|
||||||
|
// SPUtil.insSP(con,"make","装货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||||
|
// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||||
|
// startService(serviceIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void up_image(){
|
||||||
|
|
||||||
|
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||||
|
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||||
|
if (wayChild.getType()==2){
|
||||||
|
data = wayChild;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
File file=new File(path);
|
||||||
|
Image image=new Image();
|
||||||
|
String base= BitmapUtil.imageToBase64(path);
|
||||||
|
image.setFileData("data:image/"+ FileUtil.lastName(file) +";base64,"+base);
|
||||||
|
image.setFileExt(FileUtil.lastName(file));
|
||||||
|
image.setFileName(FileUtil.fileName(file));
|
||||||
|
image.setImageTakenDate(data.getImageTakenDate());
|
||||||
|
image.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||||
|
image.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||||
|
image.setLocation(data.getAddress());
|
||||||
|
MDPLocationCollectionManager.uploadUnloadImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联","卸货照片上传成功");
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,"卸货照片上传成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(卸货照片):",s+s1);
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||||
|
// SPUtil.insSP(con,"make","卸货",sob.getData().getShippingNoteNumber());
|
||||||
|
// SPUtil.insSP(con,"make","卸货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||||
|
// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||||
|
// startService(serviceIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void receipt_image(){
|
||||||
|
///storage/emulated/0/Android/data/com.oneclouds.wangluohuoyun/files/Pictures/163124593063154.jpg
|
||||||
|
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||||
|
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||||
|
if (wayChild.getType()==2){
|
||||||
|
data = wayChild;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
File file=new File(path);
|
||||||
|
Image image=new Image();
|
||||||
|
String base= BitmapUtil.imageToBase64(path);
|
||||||
|
image.setFileData("data:image/"+ FileUtil.lastName(file) +";base64,"+base);
|
||||||
|
image.setFileExt(FileUtil.lastName(file));
|
||||||
|
image.setFileName(FileUtil.fileName(file));
|
||||||
|
image.setImageTakenDate(data.getImageTakenDate());
|
||||||
|
image.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||||
|
image.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||||
|
image.setLocation(data.getAddress());
|
||||||
|
MDPLocationCollectionManager.uploadPODImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Log.e("上报安联","回单照片上传成功");
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,"回单照片上传成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
Log.e("上报安联失败(回单照片):",s+s1);
|
||||||
|
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||||
|
// SPUtil.insSP(con,"make","回单",sob.getData().getShippingNoteNumber());
|
||||||
|
//// SPUtil.insSP(con,"make","回单-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||||
|
//// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||||
|
//// startService(serviceIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
//开启前台调度系统
|
||||||
|
//NfcUtils.mNfcAdapter.enableForegroundDispatch(this, NfcUtils.mPendingIntent, NfcUtils.mIntentFilter, NfcUtils.mTechList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
//关闭前台调度系统
|
||||||
|
//NfcUtils.mNfcAdapter.disableForegroundDispatch(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
String nfcStr="";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onNewIntent(Intent intent) {
|
||||||
|
super.onNewIntent(intent);
|
||||||
|
//当该Activity接收到NFC标签时,运行该方法
|
||||||
|
//调用工具方法,读取NFC数据
|
||||||
|
try {
|
||||||
|
nfcStr = NfcUtils.readNFCId(intent);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
Log.e("nfc",nfcStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -29,6 +29,7 @@ import androidx.cardview.widget.CardView;
|
|||||||
import androidx.core.app.ActivityCompat;
|
import androidx.core.app.ActivityCompat;
|
||||||
|
|
||||||
import com.alct.mdp.MDPLocationCollectionManager;
|
import com.alct.mdp.MDPLocationCollectionManager;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.ImageConfig;
|
import com.arpa.hndahesudintocctmsdriver.bean.ImageConfig;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||||
@@ -84,9 +85,6 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
super.msgMethod(m);
|
super.msgMethod(m);
|
||||||
System.out.println("csdf");
|
|
||||||
System.out.println("csdf");
|
|
||||||
System.out.println("csdf");
|
|
||||||
switch (m.what) {
|
switch (m.what) {
|
||||||
case 200:
|
case 200:
|
||||||
if (CacheGroup.cacheList.get("getImage") != null) {
|
if (CacheGroup.cacheList.get("getImage") != null) {
|
||||||
@@ -310,8 +308,12 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
|||||||
}, cd * 1000);
|
}, cd * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
String keys = "f9d35b1133cff1f6e3960c89b249e03f";
|
// String keys = "f9d35b1133cff1f6e3960c89b249e03f";
|
||||||
String license = "eQQm7gCZPF58Cy4i9OGkqSdFdDnFF0VSUVpw92WcrNLx7zVbpGJwjQhnKL8b0piApIbOTog5log/S1ZIxoUQogueaG84BQlJfRwKjtvpVWImlmhthQyQd2ogRqGkm3rkVGeG9wK49fzP3g5AtghNF05je2rQWd/Tyy/wutXq0e0rvR/bEckFaZ4BesQaYd0MejFC3lA8BjxNWiuvCKs15e1aRUOU5vwN5wsaTsTHokBIYhioSxOoGgHn6NrX6K9Dsl9uTWZ2dOVK/jEzYsNt6E/1Ww2ck1XmIWdRCQNmCpgikuPT0ACAL/w7UaRoWzM/Pm+akWqyp+bEavHT1Vhug3HAHOSGfOghGw2NerNlyEg8h6cVneMx+TsidnQ0ZG29aqdcLBRsvi26BYJJCA8+0WXjT+73RhS8g97Rfb6h0/W//5Az8UNZ6dp6XvUi2EJXQRhY5hkHiuwWT2W1ik+6wiiURkkrBACKbO1kmZWbVpRIe3Y3pcr3Q/V+oAcyPHRXCxu+JIe/j40/epuRrCyf8yvKsZ2Dnkl4QQmlwNqlW1F/arS+19G6zOG+6VKwtbI01A1R9SU1TYOA5UL/Qpo6Gyi3Ec3/irgQlzkq1rZrOIS4oo6tghul/zcG8rjno3luqHYwIZf8vAVfpwBesIVcANCOIuTRPU3A8vdmUoK/twGIchPapmjlAzLhjZ4KoAbNeMsWu3sN6kF44xofLMghos2X8OtvUA9CMD37v2FpYoM75qavyoivsBAbb6mG0p5TmkZ37BxfaGGP6SYrCa9ygQ==";
|
// String license = "eQQm7gCZPF58Cy4i9OGkqSdFdDnFF0VSUVpw92WcrNLx7zVbpGJwjQhnKL8b0piApIbOTog5log/S1ZIxoUQogueaG84BQlJfRwKjtvpVWImlmhthQyQd2ogRqGkm3rkVGeG9wK49fzP3g5AtghNF05je2rQWd/Tyy/wutXq0e0rvR/bEckFaZ4BesQaYd0MejFC3lA8BjxNWiuvCKs15e1aRUOU5vwN5wsaTsTHokBIYhioSxOoGgHn6NrX6K9Dsl9uTWZ2dOVK/jEzYsNt6E/1Ww2ck1XmIWdRCQNmCpgikuPT0ACAL/w7UaRoWzM/Pm+akWqyp+bEavHT1Vhug3HAHOSGfOghGw2NerNlyEg8h6cVneMx+TsidnQ0ZG29aqdcLBRsvi26BYJJCA8+0WXjT+73RhS8g97Rfb6h0/W//5Az8UNZ6dp6XvUi2EJXQRhY5hkHiuwWT2W1ik+6wiiURkkrBACKbO1kmZWbVpRIe3Y3pcr3Q/V+oAcyPHRXCxu+JIe/j40/epuRrCyf8yvKsZ2Dnkl4QQmlwNqlW1F/arS+19G6zOG+6VKwtbI01A1R9SU1TYOA5UL/Qpo6Gyi3Ec3/irgQlzkq1rZrOIS4oo6tghul/zcG8rjno3luqHYwIZf8vAVfpwBesIVcANCOIuTRPU3A8vdmUoK/twGIchPapmjlAzLhjZ4KoAbNeMsWu3sN6kF44xofLMghos2X8OtvUA9CMD37v2FpYoM75qavyoivsBAbb6mG0p5TmkZ37BxfaGGP6SYrCa9ygQ==";
|
||||||
|
|
||||||
|
String keys = "19ac0aa74338e487e45057faf7212401";
|
||||||
|
String license = "HF41uGxM/1i3CtW98DimoA97BlNTAnQ+DiEAihYmZ2jR1jqC4be253joEJbOJgFDIzp5aIoeuXSWWHFaDVfaHL2Pksbq5f8M8EqsVhP9q/i1xGYSYf6MJVlHdMAVLWgR0Kra+n8dVzkSDuZeyJuDsskAmZaGFQN1CqnWYCI1tmV1Tk4A57e9LQMed0U11QWjdshdU2DGqBXKmGE419PdW3NmIxOR2u9iB1OKBmvzCUT8RAYyBzSn/yhU++YJ25g5a8Pb5kOvi+eOh+PEFEcQL6oOp/CF4Iw5nadlsLhc+XEnVJpwL2myZBoSlVcKxrJKbRn1/DIgXBueKKnqhyHKdJlpqI9eghAlRF0p2Q4f23m89mWRZf4nhKzTeXGIjCTFO4TNVucrlGU7tyJcrRCDVdfV24fziH+hB3QGckpuYzzjefr7hZalLRJ/w8dPw/8dCY1wnWq3AJ3zw2g1PzMxl51q7AgdKvwc1ERcGBns0zb8PK6vGKCnJq3uHiJEnslbTI0MEosje+h+OPO7hf2QofErewjI19wHEOv4dTvuFLh3VmGFMObAmov5kI47705fjSxCvAPGATBrfUSwim+5EQ1hanc5IcXe0/nOTiRUNEpZ+x65zVydqAs7490yqQiIUQvPazEwcal7vH2OD54lCcgpxKxqdmGc5/bp5UnqB45+n+iuInV/Q9DMOQVk15uaVZmhS8VaCqH21CmfH/ZGLb9wiEpaRLrPZLKX3bK7MT9Z0/OlDnb2QUKU8LMMIhLuQQntzsf0Wn4kA/0e9QAJJQ==";
|
||||||
|
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
String state = SPUtil.getSP(con, "state_data", "authorization_state");
|
String state = SPUtil.getSP(con, "state_data", "authorization_state");
|
||||||
@@ -325,7 +327,7 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
|||||||
//安联初始化
|
//安联初始化
|
||||||
if (context.getPackageName().equals(getCurrentProcessName(context))) {
|
if (context.getPackageName().equals(getCurrentProcessName(context))) {
|
||||||
//Log.e("--使用的测试环境--",BuildConfig.OPEN_API_URL);
|
//Log.e("--使用的测试环境--",BuildConfig.OPEN_API_URL);
|
||||||
MDPLocationCollectionManager.initialize(getApplicationContext(), "https://oapi.alct56.com");
|
MDPLocationCollectionManager.initialize(getApplicationContext(), BuildConfig.OPEN_AL_URL);
|
||||||
}
|
}
|
||||||
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
||||||
// 路由初始化
|
// 路由初始化
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseFragment;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseFragment;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||||
|
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||||
import com.zhpan.bannerview.BannerViewPager;
|
import com.zhpan.bannerview.BannerViewPager;
|
||||||
import com.zhpan.bannerview.constants.PageStyle;
|
import com.zhpan.bannerview.constants.PageStyle;
|
||||||
|
|
||||||
@@ -176,8 +177,11 @@ public class WoDeFragment extends BaseFragment {
|
|||||||
headportraitUrl.setOnClickListener(v1 -> {
|
headportraitUrl.setOnClickListener(v1 -> {
|
||||||
if(ub.getData().getHeadportraitUrl()!=null && !ub.getData().getHeadportraitUrl().equals("")){
|
if(ub.getData().getHeadportraitUrl()!=null && !ub.getData().getHeadportraitUrl().equals("")){
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(headportraitUrl,ub.getData().getHeadportraitUrl(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
.asImageViewer(headportraitUrl,ub.getData().getHeadportraitUrl(),new SmartGlideImageLoader(R.mipmap.ic_launcher_round))
|
||||||
.show();
|
.show();
|
||||||
|
// new XPopup.Builder(con)
|
||||||
|
// .asImageViewer(headportraitUrl,ub.getData().getHeadportraitUrl(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
}else{
|
}else{
|
||||||
Intent in=new Intent(con, PersonalAuthActivity.class);
|
Intent in=new Intent(con, PersonalAuthActivity.class);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
|||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
|
||||||
public class WalletFragment extends BaseFragment{
|
public class WalletFragment extends BaseFragment{
|
||||||
|
|
||||||
public static UserBean userBean;
|
public static UserBean userBean;
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.util;
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Message;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.StartOrderBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.constant.JTTConstant;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.parts.StartOrderParts;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.service.TrackService;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.ui.home.HuoYuanFragmengt;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||||
|
import com.dahe.mylibrary.utils.SelectPhotoUtils5;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName BillLocationUtils
|
||||||
|
* @Author 用户
|
||||||
|
* @Date 2022/10/17 10:24
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class BillLocationUtils {
|
||||||
|
|
||||||
|
private Context con;
|
||||||
|
|
||||||
|
|
||||||
|
private static class SingletonHolder {
|
||||||
|
private static final BillLocationUtils INSTANCE = new BillLocationUtils();
|
||||||
|
}
|
||||||
|
|
||||||
|
private BillLocationUtils() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final BillLocationUtils getInstance() {
|
||||||
|
return SingletonHolder.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private HuoYuanRequset hyr;
|
||||||
|
private UserRequset ur;
|
||||||
|
public void getBillLocation(Context con) {
|
||||||
|
this.con = con;
|
||||||
|
hyr = new HuoYuanRequset(con, hd);
|
||||||
|
ur = new UserRequset(con, hd);
|
||||||
|
//获取执行中的运单
|
||||||
|
hyr.startOrder(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Handler hd = new Handler(msg -> {
|
||||||
|
msgMethod(msg);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
public void msgMethod(Message m) {
|
||||||
|
switch (m.what) {
|
||||||
|
case RequsetCodeConstants.SUCCESS:
|
||||||
|
Gson gson = new Gson();
|
||||||
|
// Toast.makeText(con,RequsetCodeConstants.FEEDBACK_TEXT,Toast.LENGTH_SHORT).show();
|
||||||
|
if (CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER) != null) {
|
||||||
|
StartOrderBean sob = gson.fromJson(CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER), StartOrderBean.class);
|
||||||
|
if (sob.getCode() == 200) {
|
||||||
|
if (sob.getData() != null) {
|
||||||
|
SPUtil.insSP(con, JTTConstant.JTT_DATA_NAME, JTTConstant.JTT_DATA_ORDER_KEY, gson.toJson(sob));
|
||||||
|
initStart(sob);
|
||||||
|
StartOrderParts.setStartOrder(con, sob);
|
||||||
|
ur.getJtts(sob.getData().getShippingNoteNumber());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Toast.makeText(con, sob.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
CacheGroup.cacheList.remove(HuoYuanFragmengt.START_ORDER);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CacheGroup.cacheList.get("jttRes") != null) {
|
||||||
|
JTT jtt = gson.fromJson(CacheGroup.cacheList.get("jttRes"), JTT.class);
|
||||||
|
if (jtt.getCode() == 200) {
|
||||||
|
SPUtil.insSP(con, "data", "jtt", CacheGroup.cacheList.get("jttRes"));
|
||||||
|
JTTProcess.auth(con);
|
||||||
|
} else {
|
||||||
|
Toast.makeText(con, StringUtil.isNull(jtt.getMsg(), "返回错误"), Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
CacheGroup.cacheList.remove("jttRes");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initStart(StartOrderBean sob) {
|
||||||
|
if (sob.getData() != null) {
|
||||||
|
if (sob != null && sob.getData() != null && 0 < sob.getData().getWayChildren().size()) {
|
||||||
|
//order_start.setVisibility(View.VISIBLE);
|
||||||
|
SPUtil.insSP(con, "order", "ShippingNoteNumber", sob.getData().getShippingNoteNumber());
|
||||||
|
Log.e("开始轨迹上传服务", "-----");
|
||||||
|
Intent serviceIn = new Intent(con, TrackService.class);
|
||||||
|
con.startService(serviceIn);
|
||||||
|
} else {
|
||||||
|
SPUtil.insSP(con, "order", "ShippingNoteNumber", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.util
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.cuspop.MessagePop
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.cuspop.SimCenterPop
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity
|
||||||
|
import com.lxj.xpopup.XPopup
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName MessageUtils
|
||||||
|
* @Author 用户
|
||||||
|
* @Date 2023/8/15 09:51
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
class MessageUtils {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun getInstance() = InstanceHelper.sSingle
|
||||||
|
}
|
||||||
|
|
||||||
|
object InstanceHelper {
|
||||||
|
val sSingle = MessageUtils()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun showCenMessage(ctx: Context, message: String) {
|
||||||
|
XPopup.Builder(ctx) //
|
||||||
|
.hasNavigationBar(false)
|
||||||
|
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||||
|
.asCustom(MessagePop(ctx, message).setOnMyItemClickListener(object : MessagePop.OnMyItemClickListener{
|
||||||
|
override fun onItemClick(startTime: String, endTime: String) {
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
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()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -12,12 +12,12 @@ import android.os.Message;
|
|||||||
public class MsgUtil {
|
public class MsgUtil {
|
||||||
|
|
||||||
public static void addHdMsgWat(Handler hd,int what){
|
public static void addHdMsgWat(Handler hd,int what){
|
||||||
Message msg=new Message();
|
Message msg=Message.obtain();
|
||||||
msg.what=what;
|
msg.what=what;
|
||||||
hd.sendMessage(msg);
|
hd.sendMessage(msg);
|
||||||
}
|
}
|
||||||
public static void addHdMsgWatBody(Handler hd,int what,String body){
|
public static void addHdMsgWatBody(Handler hd,int what,String body){
|
||||||
Message msg=new Message();
|
Message msg=Message.obtain();
|
||||||
msg.what=what;
|
msg.what=what;
|
||||||
msg.obj=body;
|
msg.obj=body;
|
||||||
hd.sendMessage(msg);
|
hd.sendMessage(msg);
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.util.view;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.ColorMatrix;
|
||||||
|
import android.graphics.ColorMatrixColorFilter;
|
||||||
|
import android.graphics.Paint;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName GrayFrameLayout
|
||||||
|
* @Author 用户
|
||||||
|
* @Date 2023/1/29 15:28
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class GrayFrameLayout extends FrameLayout {
|
||||||
|
private Paint mPaint = new Paint();
|
||||||
|
|
||||||
|
public GrayFrameLayout(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
|
||||||
|
ColorMatrix cm = new ColorMatrix();
|
||||||
|
cm.setSaturation(0);
|
||||||
|
mPaint.setColorFilter(new ColorMatrixColorFilter(cm));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatchDraw(Canvas canvas) {
|
||||||
|
canvas.saveLayer(null, mPaint, Canvas.ALL_SAVE_FLAG);
|
||||||
|
super.dispatchDraw(canvas);
|
||||||
|
canvas.restore();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(Canvas canvas) {
|
||||||
|
canvas.saveLayer(null, mPaint, Canvas.ALL_SAVE_FLAG);
|
||||||
|
super.draw(canvas);
|
||||||
|
canvas.restore();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
@@ -176,10 +176,12 @@
|
|||||||
android:layout_centerVertical="true"/>
|
android:layout_centerVertical="true"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
<View
|
<View
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_2"
|
android:layout_height="@dimen/dp_2"
|
||||||
android:background="#F6F6F9"/>
|
android:background="#F6F6F9"/>
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/r6"
|
android:id="@+id/r6"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
@@ -202,10 +204,12 @@
|
|||||||
android:layout_centerVertical="true"/>
|
android:layout_centerVertical="true"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
<View
|
<View
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_2"
|
android:layout_height="@dimen/dp_2"
|
||||||
android:background="#F6F6F9"/>
|
android:background="#F6F6F9"/>
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/r7"
|
android:id="@+id/r7"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
@@ -227,44 +231,7 @@
|
|||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"/>
|
android:layout_centerVertical="true"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/dp_2"
|
|
||||||
android:background="#F6F6F9"/>
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/r3"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_marginTop="@dimen/dp_20"
|
|
||||||
android:layout_marginBottom="@dimen/dp_20"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="道路运输证信息"
|
|
||||||
android:textColor="#ff000000"
|
|
||||||
android:textSize="@dimen/sp_15"
|
|
||||||
/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="(4.5吨以上车辆需提交)"
|
|
||||||
android:textColor="#C4C4CE"
|
|
||||||
android:textSize="@dimen/sp_13"
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="@dimen/dp_6"
|
|
||||||
android:layout_height="@dimen/dp_10"
|
|
||||||
android:src="@mipmap/chevron"
|
|
||||||
android:scaleType="fitXY"
|
|
||||||
android:background="@null"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_2"
|
android:layout_height="@dimen/dp_2"
|
||||||
@@ -303,6 +270,45 @@
|
|||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"/>
|
android:layout_centerVertical="true"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_2"
|
||||||
|
android:background="#F6F6F9"/>
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/r3"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="道路运输证信息"
|
||||||
|
android:textColor="#ff000000"
|
||||||
|
android:textSize="@dimen/sp_15"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="(4.5吨以上车辆需提交)"
|
||||||
|
android:textColor="#C4C4CE"
|
||||||
|
android:textSize="@dimen/sp_13"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp_6"
|
||||||
|
android:layout_height="@dimen/dp_10"
|
||||||
|
android:src="@mipmap/chevron"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:background="@null"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
<View
|
<View
|
||||||
android:id="@+id/vs1"
|
android:id="@+id/vs1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
android:layout_width="@dimen/dp_90"
|
android:layout_width="@dimen/dp_90"
|
||||||
android:layout_height="@dimen/dp_90"
|
android:layout_height="@dimen/dp_90"
|
||||||
android:background="#EEEEEE">
|
android:background="#EEEEEE">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/img1"
|
android:id="@+id/img1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -477,7 +477,7 @@
|
|||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_102"/>
|
android:layout_height="@dimen/dp_40"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/submit"
|
android:id="@+id/submit"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
android:layout_marginLeft="@dimen/dp_13"
|
android:layout_marginLeft="@dimen/dp_13"
|
||||||
android:layout_width="@dimen/dp_290"
|
android:layout_width="@dimen/dp_290"
|
||||||
android:layout_height="@dimen/dp_56"
|
android:layout_height="@dimen/dp_56"
|
||||||
android:src="@mipmap/icon_home_1"
|
android:src="@drawable/icon_home_1"
|
||||||
android:scaleType="fitXY"/>
|
android:scaleType="fitXY"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginRight="@dimen/dp_13"
|
android:layout_marginRight="@dimen/dp_13"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@mipmap/icon_home_2" />
|
android:src="@drawable/icon_home_2" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
android:layout_marginLeft="@dimen/dp_10"
|
android:layout_marginLeft="@dimen/dp_10"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_marginTop="@dimen/dp_7"
|
android:layout_marginTop="@dimen/dp_7"
|
||||||
@@ -37,10 +38,11 @@
|
|||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
android:textSize="@dimen/sp_13" />
|
android:textSize="@dimen/sp_13" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_marginTop="@dimen/dp_7"
|
android:layout_marginTop="@dimen/dp_18"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
@@ -51,12 +53,13 @@
|
|||||||
android:text="店铺地址:"/>
|
android:text="店铺地址:"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/address"
|
android:id="@+id/address"
|
||||||
|
android:singleLine="true"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/sp_13" />
|
android:textSize="@dimen/sp_13" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_marginTop="@dimen/dp_7"
|
android:layout_marginTop="@dimen/dp_18"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
@@ -64,13 +67,15 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/sp_13"
|
android:textSize="@dimen/sp_13"
|
||||||
android:text="口味:"/>
|
android:text="联系方式:"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/taste"
|
android:id="@+id/taste"
|
||||||
|
android:singleLine="true"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/sp_13" />
|
android:textSize="@dimen/sp_13" />
|
||||||
<TextView
|
<TextView
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/sp_13"
|
android:textSize="@dimen/sp_13"
|
||||||
@@ -81,6 +86,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/sp_13" />
|
android:textSize="@dimen/sp_13" />
|
||||||
<TextView
|
<TextView
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/sp_13"
|
android:textSize="@dimen/sp_13"
|
||||||
|
|||||||
@@ -1,66 +1,68 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
android:id="@+id/item_huoyuan_new"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:id="@+id/item_huoyuan_new"
|
|
||||||
android:paddingBottom="@dimen/dp_78">
|
android:paddingBottom="@dimen/dp_78">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_200"
|
android:layout_height="@dimen/dp_200"
|
||||||
android:orientation="vertical"
|
android:background="@drawable/bg_banner"
|
||||||
android:background="@drawable/bg_banner">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.youth.banner.Banner
|
<com.youth.banner.Banner
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
android:id="@+id/banner"
|
android:id="@+id/banner"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_margin="@dimen/dp_25"/>
|
android:layout_margin="@dimen/dp_25"
|
||||||
|
android:layout_marginTop="@dimen/dp_12" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_marginTop="@dimen/dp_m_12"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_m_12">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/fun_left"
|
android:id="@+id/fun_left"
|
||||||
android:layout_marginLeft="@dimen/dp_8"
|
|
||||||
android:layout_width="@dimen/dp_176"
|
android:layout_width="@dimen/dp_176"
|
||||||
android:layout_height="@dimen/dp_116"
|
android:layout_height="@dimen/dp_116"
|
||||||
android:src="@mipmap/icon_home_3"
|
android:layout_marginLeft="@dimen/dp_8"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@mipmap/icon_home_3"
|
||||||
android:scaleType="fitXY" />
|
android:scaleType="fitXY" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/fun_right"
|
android:id="@+id/fun_right"
|
||||||
android:layout_width="@dimen/dp_176"
|
android:layout_width="@dimen/dp_176"
|
||||||
android:layout_height="@dimen/dp_116"
|
android:layout_height="@dimen/dp_116"
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_marginRight="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:scaleType="fitXY"
|
android:layout_weight="1"
|
||||||
android:src="@mipmap/icon_home_4" />
|
android:background="@mipmap/icon_home_4"
|
||||||
|
android:scaleType="fitXY" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_23"
|
android:layout_height="@dimen/dp_23"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="@dimen/dp_54"
|
android:layout_width="@dimen/dp_54"
|
||||||
android:layout_height="@dimen/dp_3"
|
android:layout_height="@dimen/dp_3"
|
||||||
android:background="#999999"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_centerHorizontal="true"/>
|
android:background="#999999" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -69,10 +71,10 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView
|
<com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView
|
||||||
android:layout_marginBottom="@dimen/dp_14"
|
|
||||||
android:id="@+id/brv_function"
|
android:id="@+id/brv_function"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_14"
|
||||||
android:overScrollMode="never" />
|
android:overScrollMode="never" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -81,54 +83,53 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/auth_box"
|
android:id="@+id/auth_box"
|
||||||
android:layout_marginTop="@dimen/dp_4"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
android:background="#fff"
|
android:background="#fff"
|
||||||
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_login"
|
android:id="@+id/text_login"
|
||||||
android:layout_marginTop="@dimen/dp_20"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
android:text="认证成功 开始接单"
|
android:text="认证成功 开始接单"
|
||||||
android:textColor="#ff666666"
|
android:textColor="#ff666666"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14" />
|
||||||
android:layout_gravity="center"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_auth"
|
android:id="@+id/btn_auth"
|
||||||
android:layout_marginTop="@dimen/dp_7"
|
|
||||||
android:layout_marginBottom="@dimen/dp_16"
|
|
||||||
android:layout_width="@dimen/dp_60"
|
android:layout_width="@dimen/dp_60"
|
||||||
android:layout_height="@dimen/dp_24"
|
android:layout_height="@dimen/dp_24"
|
||||||
android:text="去认证"
|
|
||||||
android:background="@drawable/bg_btn"
|
|
||||||
android:textColor="#ffffffff"
|
|
||||||
android:textSize="@dimen/sp_10"
|
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center" />
|
android:layout_marginTop="@dimen/dp_7"
|
||||||
|
android:layout_marginBottom="@dimen/dp_16"
|
||||||
|
android:background="@drawable/bg_btn"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="去认证"
|
||||||
|
android:textColor="#ffffffff"
|
||||||
|
android:textSize="@dimen/sp_10" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/order_box"
|
android:id="@+id/order_box"
|
||||||
android:layout_marginTop="@dimen/dp_4"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
android:background="#fff"
|
android:background="#fff"
|
||||||
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_marginTop="@dimen/dp_24"
|
|
||||||
android:layout_marginLeft="@dimen/dp_20"
|
|
||||||
android:layout_marginRight="@dimen/dp_20"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp_20"
|
||||||
|
android:layout_marginTop="@dimen/dp_24"
|
||||||
|
android:layout_marginRight="@dimen/dp_20">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -136,35 +137,36 @@
|
|||||||
android:text="执行中运单"
|
android:text="执行中运单"
|
||||||
android:textColor="#ff333333"
|
android:textColor="#ff333333"
|
||||||
android:textSize="@dimen/sp_16"
|
android:textSize="@dimen/sp_16"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/order_all"
|
android:id="@+id/order_all"
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="全部运单"
|
android:text="全部运单"
|
||||||
android:textColor="#ff999999"
|
android:textColor="#ff999999"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14" />
|
||||||
/>
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_marginLeft="@dimen/dp_4"
|
|
||||||
android:layout_width="@dimen/dp_7"
|
android:layout_width="@dimen/dp_7"
|
||||||
android:layout_height="@dimen/dp_12"
|
android:layout_height="@dimen/dp_12"
|
||||||
android:src="@mipmap/chevron"
|
android:layout_gravity="center"
|
||||||
android:layout_gravity="center"/>
|
android:layout_marginLeft="@dimen/dp_4"
|
||||||
|
android:src="@mipmap/chevron" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView
|
<com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView
|
||||||
android:layout_marginBottom="@dimen/dp_12"
|
|
||||||
android:id="@+id/brv_order"
|
android:id="@+id/brv_order"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_12" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!-- <LinearLayout
|
<!-- <LinearLayout
|
||||||
android:layout_marginTop="@dimen/dp_4"
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
@@ -251,6 +253,5 @@
|
|||||||
android:layout_marginBottom="@dimen/dp_5"
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
android:alpha="0.6"/>
|
android:alpha="0.6"/>
|
||||||
</LinearLayout>-->
|
</LinearLayout>-->
|
||||||
<include
|
<include layout="@layout/item_order_recommend" />
|
||||||
layout="@layout/item_order_recommend"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/dp_16"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:elevation="@dimen/dp_5"
|
||||||
|
|
||||||
|
app:cardCornerRadius="@dimen/dp_10">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="提示"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/red"
|
||||||
|
android:textSize="@dimen/sp_20"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:lineSpacingExtra="@dimen/dp_6"
|
||||||
|
android:gravity="center"
|
||||||
|
android:id="@+id/tvContent"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_14"
|
||||||
|
android:textColor="#D86B6B"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
tools:text="提示"></TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvMessage2"
|
||||||
|
android:lineSpacingExtra="@dimen/dp_6"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_14"
|
||||||
|
android:textColor="@color/color_9"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:text="请重新登录或联系管理员"></TextView>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="联系电话:"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_14"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvPhone"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="13783631930"
|
||||||
|
android:textColor="#009688"
|
||||||
|
android:textSize="@dimen/sp_16"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="@dimen/dp_10"
|
||||||
|
android:paddingBottom="@dimen/dp_10">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCancel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="取消"
|
||||||
|
android:textSize="@dimen/sp_16"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvOk"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="确认拨打"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:textSize="@dimen/sp_16"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/dp_16"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:elevation="@dimen/dp_5"
|
||||||
|
|
||||||
|
app:cardCornerRadius="@dimen/dp_10">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="提示"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_20"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:paddingLeft="@dimen/dp_10"
|
||||||
|
android:paddingRight="@dimen/dp_10"
|
||||||
|
android:lineSpacingExtra="@dimen/dp_6"
|
||||||
|
android:gravity="center"
|
||||||
|
android:id="@+id/tvContent"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_14"
|
||||||
|
android:textColor="#333"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
tools:text="提示"></TextView>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="@dimen/dp_10"
|
||||||
|
android:paddingBottom="@dimen/dp_10">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCancel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="取消"
|
||||||
|
android:textSize="@dimen/sp_16"></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvOk"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="去注册"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:textSize="@dimen/sp_16"></TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
|||||||
apply from: "compile.gradle"
|
apply from: "compile.gradle"
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = "1.5.0"
|
ext.kotlin_version = "1.5.0"
|
||||||
|
// ext.kotlin_version = "1.6.10"
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter() // 这个
|
jcenter() // 这个
|
||||||
|
|||||||
+2
-2
@@ -24,7 +24,7 @@ def MagicIndicator = '1.7.0'
|
|||||||
def PickerView = '4.1.9'
|
def PickerView = '4.1.9'
|
||||||
def NiceSpinner = '1.4.4'
|
def NiceSpinner = '1.4.4'
|
||||||
def Countdownview = '2.1.6'
|
def Countdownview = '2.1.6'
|
||||||
def Xpopup = '2.2.8'
|
def Xpopup = '2.9.19'
|
||||||
def CheckVersionLib = '2.4.1_androidx'
|
def CheckVersionLib = '2.4.1_androidx'
|
||||||
def GooglePlayVersion = '15.0.1'
|
def GooglePlayVersion = '15.0.1'
|
||||||
def Streamsupport = '1.7.3'
|
def Streamsupport = '1.7.3'
|
||||||
@@ -79,7 +79,7 @@ project.ext {
|
|||||||
"MagicIndicator" :"com.github.hackware1993:MagicIndicator:${MagicIndicator}",
|
"MagicIndicator" :"com.github.hackware1993:MagicIndicator:${MagicIndicator}",
|
||||||
"NiceSpinner" :"com.github.arcadefire:nice-spinner:${NiceSpinner}",
|
"NiceSpinner" :"com.github.arcadefire:nice-spinner:${NiceSpinner}",
|
||||||
"Countdownview" :"com.github.iwgang:countdownview:${Countdownview}",
|
"Countdownview" :"com.github.iwgang:countdownview:${Countdownview}",
|
||||||
"Xpopup" :"com.lxj:xpopup:${Xpopup}",
|
"Xpopup" :"com.github.li-xiaojun:XPopup:${Xpopup}",
|
||||||
"CheckVersionLib" :"com.github.AlexLiuSheng:CheckVersionLib:${CheckVersionLib}",
|
"CheckVersionLib" :"com.github.AlexLiuSheng:CheckVersionLib:${CheckVersionLib}",
|
||||||
"Bugly" :"com.tencent.bugly:crashreport:${BuglyVersion}",
|
"Bugly" :"com.tencent.bugly:crashreport:${BuglyVersion}",
|
||||||
"Streamsupport" :"net.sourceforge.streamsupport:streamsupport:${Streamsupport}",
|
"Streamsupport" :"net.sourceforge.streamsupport:streamsupport:${Streamsupport}",
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ dependencies {
|
|||||||
api rootProject.ext.dependencies["okhttp"]
|
api rootProject.ext.dependencies["okhttp"]
|
||||||
api rootProject.ext.dependencies["logging-interceptor"]
|
api rootProject.ext.dependencies["logging-interceptor"]
|
||||||
api rootProject.ext.dependencies["recyclerview"]
|
api rootProject.ext.dependencies["recyclerview"]
|
||||||
api rootProject.ext.dependencies["AutoSize"]
|
// api rootProject.ext.dependencies["AutoSize"]
|
||||||
api rootProject.ext.dependencies["statusbaruitl"]
|
api rootProject.ext.dependencies["statusbaruitl"]
|
||||||
api rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"]
|
api rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"]
|
||||||
api rootProject.ext.dependencies["PhotoPicker"]
|
api rootProject.ext.dependencies["PhotoPicker"]
|
||||||
@@ -77,7 +77,7 @@ dependencies {
|
|||||||
api rootProject.ext.dependencies["3Dmap"]
|
api rootProject.ext.dependencies["3Dmap"]
|
||||||
api rootProject.ext.dependencies["Location"]
|
api rootProject.ext.dependencies["Location"]
|
||||||
api rootProject.ext.dependencies["Search"]
|
api rootProject.ext.dependencies["Search"]
|
||||||
|
api 'com.gyf.cactus:cactus:1.1.3-beta13'
|
||||||
|
|
||||||
//友盟基础库(必须)
|
//友盟基础库(必须)
|
||||||
// api 'com.umeng.umsdk:common:9.4.4'
|
// api 'com.umeng.umsdk:common:9.4.4'
|
||||||
|
|||||||
@@ -13,12 +13,12 @@
|
|||||||
android:supportsRtl="true">
|
android:supportsRtl="true">
|
||||||
|
|
||||||
|
|
||||||
<meta-data
|
<!-- <meta-data-->
|
||||||
android:name="design_width_in_dp"
|
<!-- android:name="design_width_in_dp"-->
|
||||||
android:value="360" />
|
<!-- android:value="360" />-->
|
||||||
<meta-data
|
<!-- <meta-data-->
|
||||||
android:name="design_height_in_dp"
|
<!-- android:name="design_height_in_dp"-->
|
||||||
android:value="640" />
|
<!-- android:value="640" />-->
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.dahe.mylibrary.glide.AppGlideModule"
|
android:name="com.dahe.mylibrary.glide.AppGlideModule"
|
||||||
|
|||||||
Reference in New Issue
Block a user