Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
670bf385ac | ||
|
|
383f8a9a80 |
+82
-117
@@ -2,7 +2,7 @@ plugins {
|
|||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'kotlin-android'
|
id 'kotlin-android'
|
||||||
id 'kotlin-kapt'
|
id 'kotlin-kapt'
|
||||||
// id 'kotlin-android-extensions'
|
id 'com.huawei.agconnect'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -15,50 +15,60 @@ android {
|
|||||||
keyPassword '123456'
|
keyPassword '123456'
|
||||||
storeFile file('key.jks')
|
storeFile file('key.jks')
|
||||||
storePassword '123456'
|
storePassword '123456'
|
||||||
v1SigningEnabled true
|
|
||||||
v2SigningEnabled true
|
|
||||||
}
|
}
|
||||||
// debug {
|
debug {
|
||||||
// keyAlias 'key0'
|
keyAlias 'key0'
|
||||||
// keyPassword '123456'
|
keyPassword '123456'
|
||||||
// storeFile file('key.jks')
|
storeFile file('key.jks')
|
||||||
// storePassword '123456'
|
storePassword '123456'
|
||||||
// }
|
}
|
||||||
// release {
|
release {
|
||||||
// keyAlias 'key0'
|
keyAlias 'key0'
|
||||||
// keyPassword '123456'
|
keyPassword '123456'
|
||||||
// storeFile file('key.jks')
|
storeFile file('key.jks')
|
||||||
// storePassword '123456'
|
storePassword '123456'
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.arpa.hndahesudintocctmsdriver"
|
applicationId "com.arpa.hndahesudintocctmsdriver"
|
||||||
minSdkVersion 24
|
minSdkVersion 22
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 75
|
versionCode 50
|
||||||
versionName "3.4.5"
|
versionName "3.2.0"
|
||||||
flavorDimensions "CHANNEL_VALUE"
|
flavorDimensions "CHANNEL_VALUE"
|
||||||
flavorDimensions "app_icon"
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
javaCompileOptions {
|
javaCompileOptions {
|
||||||
|
|
||||||
// annotationProcessorOptions {
|
annotationProcessorOptions {
|
||||||
// includeCompileClasspath = true
|
includeCompileClasspath = true
|
||||||
// arguments = [moduleName: project.getName()]
|
arguments = [moduleName :project.getName() ]
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
|
|
||||||
//选择要添加的对应 cpu 类型的 .so 库。
|
//选择要添加的对应 cpu 类型的 .so 库。
|
||||||
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
abiFilters 'armeabi', 'armeabi-v7a'
|
||||||
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64' , 'arm64-v8a'
|
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64' , 'arm64-v8a'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
manifestPlaceholders = [
|
||||||
|
JPUSH_PKGNAME : applicationId,
|
||||||
|
JPUSH_APPKEY : "571d93ae5117da6dee848c92", //JPush 上注册的包名对应的 Appkey.
|
||||||
|
JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
|
||||||
|
MEIZU_APPKEY : "MZ-魅族的APPKEY",
|
||||||
|
MEIZU_APPID : "MZ-魅族的APPID",
|
||||||
|
XIAOMI_APPID : "MI-小米的APPID",
|
||||||
|
XIAOMI_APPKEY : "MI-小米的APPKEY",
|
||||||
|
OPPO_APPKEY : "OP-oppo的APPKEY",
|
||||||
|
OPPO_APPID : "OP-oppo的APPID",
|
||||||
|
OPPO_APPSECRET : "OP-oppo的APPSECRET",
|
||||||
|
VIVO_APPKEY : "vivo的APPKEY",
|
||||||
|
VIVO_APPID : "vivo的APPID"
|
||||||
|
]
|
||||||
|
}
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
jniLibs.srcDirs = ['libs']
|
jniLibs.srcDirs = ['libs']
|
||||||
@@ -69,10 +79,9 @@ android {
|
|||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
signingConfig signingConfigs.config
|
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
signingConfig signingConfigs.config
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
@@ -82,68 +91,42 @@ android {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = '1.8'
|
jvmTarget = '1.8'
|
||||||
}
|
}
|
||||||
// allprojects {
|
allprojects {
|
||||||
// repositories {
|
repositories {
|
||||||
// maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// repositories {
|
repositories{
|
||||||
// flatDir {
|
flatDir {
|
||||||
// dirs 'libs'
|
dirs 'libs'
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
qa {
|
qa {
|
||||||
applicationId "com.arpa.hndahesudintocctmsdriver.text"
|
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机"]
|
||||||
manifestPlaceholders = [CHANNEL_VALUE: "司机测试",
|
buildConfigField("String", "OPEN_API_URL", "\"http://192.168.111.244:4009\"")
|
||||||
app_icon : "@drawable/diver_logo_text",
|
buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"")
|
||||||
GAODEKEY : "6791d69f6221a0841b521763af86eb01",
|
|
||||||
JPUSH_PKGNAME: applicationId,
|
|
||||||
JPUSH_APPKEY : "fba6f55621c670d8c1fe9191", //JPush 上注册的包名对应的 Appkey.
|
|
||||||
JPUSH_CHANNEL: "developer-default"//暂时填写默认值即可.
|
|
||||||
]
|
|
||||||
buildConfigField("String", "OPEN_AL_URL", "\"https://oapi-staging.alct56.com\"")
|
|
||||||
buildConfigField("String", "BASE_URL", "\"http://192.168.1.118:8080/api/\"")
|
|
||||||
// buildConfigField("String", "BASE_URL", "\"http://linux.local:8080/api/\"")
|
|
||||||
buildConfigField "boolean", "isTest", "true"
|
|
||||||
//APP名称,可以在androidMainfest中引用
|
|
||||||
resValue "string", "appName", "司机测试"
|
|
||||||
}
|
}
|
||||||
product {
|
product {
|
||||||
applicationId "com.arpa.hndahesudintocctmsdriver"
|
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机"]
|
||||||
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机",
|
buildConfigField("String", "AL_BASE", "\"https://oapi.alct56.com\"")
|
||||||
app_icon : "@drawable/diver_logo",
|
|
||||||
GAODEKEY : "9480fd96746922630e9bf6c75a101059",
|
|
||||||
JPUSH_PKGNAME: applicationId,
|
|
||||||
JPUSH_APPKEY : "fba6f55621c670d8c1fe9191", //JPush 上注册的包名对应的 Appkey.
|
|
||||||
JPUSH_CHANNEL: "developer-default"//暂时填写默认值即可.
|
|
||||||
]
|
|
||||||
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"
|
|
||||||
//APP名称,可以在androidMainfest中引用
|
|
||||||
resValue "string", "appName", "大河好运司机"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// productFlavors.all { flavor ->
|
productFlavors.all { flavor ->
|
||||||
// flavor.manifestPlaceholders = [CHANNEL_VALUE: name]
|
flavor.manifestPlaceholders = [CHANNEL_VALUE: name]
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
android.applicationVariants.all { variant ->
|
android.applicationVariants.all { variant ->
|
||||||
variant.outputs.all {
|
variant.outputs.all {
|
||||||
def date = new Date().format("MMdd_HH-mm", TimeZone.getTimeZone("GMT+08"))
|
def date = new Date().format("MMdd_HH-mm" , TimeZone.getTimeZone("GMT+08"))
|
||||||
def isText = variant.productFlavors[0].properties.get("buildConfigFields").getAt("isTest").properties.get("value")
|
if(variant.buildType.name.equals('release')){
|
||||||
def appName = null
|
outputFileName = "dhhy-driver-"+date+"-${versionName}.apk"
|
||||||
if (isText == "true") {
|
|
||||||
appName = '大河好运司机测试_'
|
|
||||||
} else {
|
|
||||||
appName = '大河好运司机_'
|
|
||||||
}
|
}
|
||||||
outputFileName = appName + "${variant.buildType.name}_${defaultConfig.versionName}_${date}.apk"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lintOptions {
|
lintOptions {
|
||||||
@@ -156,47 +139,40 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
// implementation(fileTree("libs"))
|
|
||||||
// implementation(name: 'mdp-release', ext: 'aar')
|
|
||||||
|
|
||||||
implementation 'com.google.android.material:material:1.2.1'
|
implementation 'com.google.android.material:material:1.2.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
|
||||||
implementation 'com.caverock:androidsvg-aar:1.3'
|
implementation 'com.caverock:androidsvg-aar:1.3'
|
||||||
|
|
||||||
//当引入的与之前引入的库有重复冲突部分的时候,使用compileOnly
|
|
||||||
implementation files('libs\\mdp_sdk.jar')
|
|
||||||
//压缩工具
|
//压缩工具
|
||||||
implementation 'top.zibin:Luban:1.1.3'
|
implementation 'top.zibin:Luban:1.1.3'
|
||||||
//角标
|
//角标
|
||||||
implementation 'com.haozhang.libary:android-slanted-textview:1.2'
|
implementation 'com.haozhang.libary:android-slanted-textview:1.2'
|
||||||
//刷新头部,底部样式
|
//刷新头部,底部样式
|
||||||
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1'
|
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1'
|
||||||
implementation 'com.scwang.smart:refresh-header-material:2.0.1'
|
implementation 'com.scwang.smart:refresh-header-material:2.0.1'
|
||||||
implementation 'com.scwang.smart:refresh-footer-ball:2.0.1' //球脉冲加载
|
implementation 'com.scwang.smart:refresh-footer-ball:2.0.1' //球脉冲加载
|
||||||
implementation 'com.scwang.smart:refresh-footer-classics:2.0.1' //经典加载
|
implementation 'com.scwang.smart:refresh-footer-classics:2.0.1' //经典加载
|
||||||
//更新版本
|
//更新版本
|
||||||
implementation 'com.github.jenly1314.AppUpdater:app-updater:1.2.0'
|
implementation 'com.github.jenly1314.AppUpdater:app-updater:1.1.0'
|
||||||
implementation 'com.github.jenly1314.AppUpdater:app-dialog:1.2.0'
|
implementation 'com.github.jenly1314.AppUpdater:app-dialog:1.1.0'
|
||||||
//轮播插件
|
//轮播插件
|
||||||
implementation 'com.github.zhpanvip:BannerViewPager:3.5.4'
|
implementation 'com.github.zhpanvip:BannerViewPager:3.5.4'
|
||||||
//
|
//弹出框
|
||||||
// implementation 'com.lxj:xpopup:2.2.8'
|
// implementation 'com.lxj:xpopup:2.2.8'
|
||||||
//工具类
|
// implementation 'com.github.li-xiaojun:XPopup:2.8.15'
|
||||||
//implementation 'cn.hutool:hutool-all:5.7.11'
|
|
||||||
//交通厅
|
//交通厅
|
||||||
implementation 'com.lzy.net:okgo:3.0.4'
|
implementation 'com.lzy.net:okgo:3.0.4'
|
||||||
implementation 'com.alibaba:fastjson:1.2.61'
|
implementation 'com.alibaba:fastjson:1.2.61'
|
||||||
implementation 'org.bouncycastle:bcprov-jdk15on:1.55'
|
implementation 'org.bouncycastle:bcprov-jdk15on:1.55'
|
||||||
implementation 'org.apache.commons:commons-lang3:3.5'
|
implementation 'org.apache.commons:commons-lang3:3.5'
|
||||||
// implementation(name: 'locationgd-androidx_2.1.0', ext: 'aar')//交通厅
|
implementation (name:'locationgd-androidx_2.1.0', ext:'aar')//交通厅
|
||||||
implementation files('libs/locationgd-androidx_2.1.0.aar')
|
|
||||||
//安联
|
//安联
|
||||||
// implementation 'com.google.code.gson:gson:2.8.6'
|
|
||||||
implementation 'com.loopj.android:android-async-http:1.4.9'
|
implementation 'com.loopj.android:android-async-http:1.4.9'
|
||||||
implementation 'com.j256.ormlite:ormlite-android:4.48'
|
implementation 'com.j256.ormlite:ormlite-android:4.48'
|
||||||
implementation 'com.j256.ormlite:ormlite-core:4.48'
|
implementation 'com.j256.ormlite:ormlite-core:4.48'
|
||||||
compileOnly 'com.github.hotchemi:permissionsdispatcher:2.3.1'
|
implementation "org.permissionsdispatcher:permissionsdispatcher:4.6.0"
|
||||||
annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.3.1'
|
kapt "org.permissionsdispatcher:permissionsdispatcher-processor:4.6.0"
|
||||||
|
|
||||||
//极光认证
|
//极光认证
|
||||||
implementation 'cn.jiguang.sdk:jverification:2.7.1' // 此处以2.7.1 版本为例。a
|
implementation 'cn.jiguang.sdk:jverification:2.7.1' // 此处以2.7.1 版本为例。a
|
||||||
implementation 'cn.jiguang.sdk:jpush:4.2.4' // 此处以JPush 4.2.4 版本为例。
|
implementation 'cn.jiguang.sdk:jpush:4.2.4' // 此处以JPush 4.2.4 版本为例。
|
||||||
@@ -204,39 +180,28 @@ dependencies {
|
|||||||
//友盟
|
//友盟
|
||||||
// 下面各SDK根据宿主App是否使用相关业务按需引入。
|
// 下面各SDK根据宿主App是否使用相关业务按需引入。
|
||||||
// 友盟统计SDK
|
// 友盟统计SDK
|
||||||
implementation 'com.umeng.umsdk:common:9.4.2'// 必选
|
implementation 'com.umeng.umsdk:common:9.4.2'// 必选
|
||||||
implementation 'com.umeng.umsdk:asms:1.4.1'// 必选
|
implementation 'com.umeng.umsdk:asms:1.4.1'// 必选
|
||||||
implementation 'com.umeng.umsdk:apm:1.4.2' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
|
implementation 'com.umeng.umsdk:apm:1.4.2' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
|
||||||
implementation 'com.umeng.umsdk:abtest:1.0.0'//使用U-App中ABTest能力,可选
|
implementation 'com.umeng.umsdk:abtest:1.0.0'//使用U-App中ABTest能力,可选
|
||||||
//动态权限获取
|
|
||||||
implementation "org.permissionsdispatcher:permissionsdispatcher:4.6.0"
|
|
||||||
kapt "org.permissionsdispatcher:permissionsdispatcher-processor:4.6.0"
|
|
||||||
//选择器
|
//选择器
|
||||||
implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:3.1.1'
|
implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:3.1.1'
|
||||||
//EventBus
|
//EventBus
|
||||||
implementation 'org.greenrobot:eventbus:3.1.1'
|
implementation 'org.greenrobot:eventbus:3.1.1'
|
||||||
//易签宝
|
|
||||||
// implementation(name: 'EsignSDK', ext: 'aar')
|
|
||||||
implementation 'pub.devrel:easypermissions:1.3.0'
|
|
||||||
implementation files('libs/EsignSDK.aar')
|
|
||||||
|
|
||||||
|
|
||||||
implementation "com.squareup.retrofit2:retrofit:2.4.0"
|
|
||||||
// implementation "com.squareup.retrofit2:converter-gson:2.4.0"
|
|
||||||
implementation "com.squareup.retrofit2:adapter-rxjava2:2.4.0"
|
|
||||||
// implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
|
|
||||||
|
|
||||||
implementation "io.reactivex.rxjava2:rxjava:2.1.5"
|
|
||||||
implementation "io.reactivex.rxjava2:rxandroid:2.0.1"
|
|
||||||
|
|
||||||
//pdf展示
|
//pdf展示
|
||||||
implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'
|
implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'
|
||||||
//
|
//工具类
|
||||||
|
//implementation 'cn.hutool:hutool-all:5.7.11'
|
||||||
implementation 'com.github.getActivity:XToast:8.2'
|
implementation 'com.github.getActivity:XToast:8.2'
|
||||||
|
|
||||||
implementation files('libs/mdp-release.aar')
|
//易签宝
|
||||||
// implementation(name: 'mdp-release', ext: 'aar')
|
implementation(name:'EsignSDK', ext:'aar')
|
||||||
|
|
||||||
|
//当引入的与之前引入的库有重复冲突部分的时候,使用compileOnly
|
||||||
|
implementation files('libs\\mdp_sdk.jar')
|
||||||
|
|
||||||
implementation project(path: ':mylibrary')
|
implementation project(path: ':mylibrary')
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,8 +2,6 @@
|
|||||||
<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" />
|
||||||
<!-- 基础权限 -->
|
<!-- 基础权限 -->
|
||||||
@@ -16,9 +14,7 @@
|
|||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
<!-- 极光 -->
|
<!-- 极光 -->
|
||||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
|
||||||
<uses-permission android:name="android.permission.READ_PROFILE" />
|
<uses-permission android:name="android.permission.READ_PROFILE" />
|
||||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
|
||||||
<uses-permission android:name="android.permission.CALL_PHONE" />
|
<uses-permission android:name="android.permission.CALL_PHONE" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
@@ -26,7 +22,6 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
|
|
||||||
|
|
||||||
<!-- Optional -->
|
<!-- Optional -->
|
||||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 用于开启 debug 版本的应用在6.0 系统上 层叠窗口权限 -->
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 用于开启 debug 版本的应用在6.0 系统上 层叠窗口权限 -->
|
||||||
@@ -52,16 +47,16 @@
|
|||||||
<uses-permission android:name="android.permission.NFC" />
|
<uses-permission android:name="android.permission.NFC" />
|
||||||
<application
|
<application
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.App"
|
android:name="com.arpa.hndahesudintocctmsdriver.App"
|
||||||
android:allowBackup="true"
|
android:allowBackup="false"
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:icon="@mipmap/diver_logo"
|
android:icon="@drawable/diver_logo"
|
||||||
android:label="@string/appName"
|
android:label="@string/app_name"
|
||||||
android:largeHeap="true"
|
android:largeHeap="true"
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
tools:replace="android:label,android:allowBackup">
|
tools:replace="android:icon,android:allowBackup">
|
||||||
|
|
||||||
<uses-library
|
<uses-library
|
||||||
android:name="com/alct/mdp"
|
android:name="com/alct/mdp"
|
||||||
@@ -70,16 +65,16 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.MainActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.MainActivity"
|
||||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||||
android:exported="true"
|
android:exported="false"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:screenOrientation="portrait"></activity>
|
android:screenOrientation="portrait" ></activity>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.wallet.WithdrawalActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.wallet.WithdrawalActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.wallet.UpBankActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.wallet.UpBankActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.OrderAllActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.OrderAllActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
@@ -94,61 +89,14 @@
|
|||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.PhotoCarActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.PhotoCarActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait" />
|
||||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.VehicleAuthActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.VehicleAuthActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.home.shangchuan.ShangChuangImgActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivity"
|
||||||
android:screenOrientation="portrait"
|
android:exported="false"
|
||||||
android:exported="true">
|
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
|
|
||||||
android:name=".ui.home.shangchuan.ShangChuangImgNewActivity"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:exported="true">
|
|
||||||
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
|
|
||||||
<data android:mimeType="*/*" />
|
|
||||||
</intent-filter>
|
|
||||||
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name=".ui.home.shangchuan.ShangChuangImgActivityBC"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:exported="true">
|
|
||||||
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
|
|
||||||
<data android:mimeType="*/*" />
|
|
||||||
</intent-filter>
|
|
||||||
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name=".ui.home.shangchuan.ShangChuangImgActivity2"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:exported="true">
|
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
||||||
@@ -161,13 +109,13 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.GetShangChuanActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.GetShangChuanActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.AuthQualificationActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.AuthQualificationActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.OrderListActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.OrderListActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.HuoYunDelActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.HuoYunDelActivity"
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
@@ -180,22 +128,15 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"/>
|
||||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.AddCarSuccActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.AddCarSuccActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.FaceSuccActivity"
|
|
||||||
android:exported="true"
|
|
||||||
android:screenOrientation="portrait" />
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.login.WelcomeActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.login.WelcomeActivity"
|
||||||
android:exported="true"
|
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
@@ -214,35 +155,28 @@
|
|||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.drivercircle.VideoReleaseActivity"
|
|
||||||
android:screenOrientation="portrait" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.WebPDFActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.WebPDFActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.StartYunDanActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.StartYunDanActivity"
|
||||||
android:launchMode="singleTop"
|
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.drivercircle.HomePageActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.drivercircle.HomePageActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.alert.VehicleChoiceActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.alert.VehicleChoiceActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.OrderComplaintActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.OrderComplaintActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.web.WebActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.web.WebActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="stateAlwaysHidden" />
|
android:windowSoftInputMode="stateAlwaysHidden" />
|
||||||
<activity
|
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.web.WebOnlyOneActivity"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:windowSoftInputMode="stateAlwaysHidden" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.web.WebKfActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.web.WebKfActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
@@ -252,7 +186,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".ui.news.NewActivity"
|
android:name=".ui.news.NewActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="stateAlwaysHidden" />
|
android:windowSoftInputMode="stateAlwaysHidden" />
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.service.TrackService"
|
android:name="com.arpa.hndahesudintocctmsdriver.service.TrackService"
|
||||||
@@ -272,19 +206,13 @@
|
|||||||
android:name="com.alct.mdp.MDPLocationService"
|
android:name="com.alct.mdp.MDPLocationService"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:process=":mdpLocation_v1" />
|
android:process=":mdpLocation_v1" />
|
||||||
|
|
||||||
<service
|
|
||||||
android:name="com.express.mdp.GpsService"
|
|
||||||
android:foregroundServiceType="location"
|
|
||||||
android:label="GPS服务"
|
|
||||||
android:priority="1000" />
|
|
||||||
<service
|
<service
|
||||||
android:name="com.baidu.location.f"
|
android:name="com.baidu.location.f"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:process=":remote"></service>
|
android:process=":remote"></service>
|
||||||
<service
|
<service
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.service.PlayerMusicService"
|
android:name="com.arpa.hndahesudintocctmsdriver.service.PlayerMusicService"
|
||||||
android:exported="true"
|
android:exported="false"
|
||||||
android:process=":music_v1" />
|
android:process=":music_v1" />
|
||||||
<service
|
<service
|
||||||
android:name="com.alct.mdp.job.LocationUploadJobService"
|
android:name="com.alct.mdp.job.LocationUploadJobService"
|
||||||
@@ -300,8 +228,8 @@
|
|||||||
<!--高德地图-->
|
<!--高德地图-->
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.amap.api.v2.apikey"
|
android:name="com.amap.api.v2.apikey"
|
||||||
android:value="${GAODEKEY}" />
|
android:value="78019612271411eca3af34db91930620" />
|
||||||
<!-- android:value="702eaa84675618b8eb69298d9fd42ca3" />-->
|
<!-- android:value="702eaa84675618b8eb69298d9fd42ca3" />-->
|
||||||
|
|
||||||
<service android:name="com.amap.api.location.APSService"></service>
|
<service android:name="com.amap.api.location.APSService"></service>
|
||||||
|
|
||||||
@@ -312,7 +240,7 @@
|
|||||||
<!-- 极光-->
|
<!-- 极光-->
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="JPUSH_APPKEY"
|
android:name="JPUSH_APPKEY"
|
||||||
android:value="fba6f55621c670d8c1fe9191" /> <!-- </>值来自开发者平台取得的AppKey -->
|
android:value="571d93ae5117da6dee848c92" /> <!-- </>值来自开发者平台取得的AppKey -->
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="JPUSH_CHANNEL"
|
android:name="JPUSH_CHANNEL"
|
||||||
@@ -342,8 +270,10 @@
|
|||||||
<!-- 易签宝 -->
|
<!-- 易签宝 -->
|
||||||
<activity
|
<activity
|
||||||
android:name="com.esign.esignsdk.h5.H5Activity"
|
android:name="com.esign.esignsdk.h5.H5Activity"
|
||||||
|
android:exported="false"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
|
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
|
||||||
|
tools:ignore="AppLinkUrlError">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
@@ -359,7 +289,7 @@
|
|||||||
<!-- 若您的业务中有使用极光富媒体功能,或者极光早上好功能,需要把此 Activity 的 exported 修改成 true 覆盖 mavenCentral 上的组件。 -->
|
<!-- 若您的业务中有使用极光富媒体功能,或者极光早上好功能,需要把此 Activity 的 exported 修改成 true 覆盖 mavenCentral 上的组件。 -->
|
||||||
<activity
|
<activity
|
||||||
android:name="cn.jpush.android.ui.PopWinActivity"
|
android:name="cn.jpush.android.ui.PopWinActivity"
|
||||||
android:exported="true"
|
android:exported="false"
|
||||||
android:theme="@style/MyDialogStyle"
|
android:theme="@style/MyDialogStyle"
|
||||||
tools:node="replace">
|
tools:node="replace">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -373,7 +303,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name="cn.jpush.android.ui.PushActivity"
|
android:name="cn.jpush.android.ui.PushActivity"
|
||||||
android:configChanges="orientation|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden"
|
||||||
android:exported="true"
|
android:exported="false"
|
||||||
android:theme="@android:style/Theme.NoTitleBar"
|
android:theme="@android:style/Theme.NoTitleBar"
|
||||||
tools:node="replace">
|
tools:node="replace">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -385,7 +315,7 @@
|
|||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name=".ui.NFCActivity"
|
<activity android:name=".ui.NFCActivity"
|
||||||
android:exported="true">
|
android:exported="false">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
||||||
|
|
||||||
@@ -395,58 +325,6 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name=".H5Activity"
|
|
||||||
android:launchMode="singleTask"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:exported="true">
|
|
||||||
<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" />
|
|
||||||
|
|
||||||
<data
|
|
||||||
android:host="driver"
|
|
||||||
android:path="/realBack"
|
|
||||||
android:port="8088"
|
|
||||||
android:scheme="dahe" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name=".H5Activity2"
|
|
||||||
android:launchMode="singleTask"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:exported="true">
|
|
||||||
<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"
|
||||||
@@ -467,7 +345,7 @@
|
|||||||
</receiver>
|
</receiver>
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="${applicationId}.fileprovider"
|
android:authorities="com.arpa.hndahesudintocctmsdriver.fileprovider"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true"
|
android:grantUriPermissions="true"
|
||||||
tools:ignore="WrongManifestParent">
|
tools:ignore="WrongManifestParent">
|
||||||
|
|||||||
@@ -2,10 +2,7 @@ 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;
|
||||||
@@ -14,27 +11,18 @@ 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.log.LogUtil;
|
||||||
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.tencent.bugly.crashreport.CrashReport;
|
|
||||||
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 key = "19ac0aa74338e487e45057faf7212401";
|
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 = "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,9 +33,10 @@ public class App extends Application {
|
|||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
mApplication = this;
|
mApplication = this;
|
||||||
|
//初始化log
|
||||||
|
LogUtil.init(BuildConfig.DEBUG);
|
||||||
con = getBaseContext();
|
con = getBaseContext();
|
||||||
CommonBaseLibrary.getInstance().init(this, Api.BASE_URL);
|
CommonBaseLibrary.getInstance().init(this, Api.BASE_URL);
|
||||||
CrashReport.initCrashReport(getApplicationContext(), "0fa55ffad8", false);
|
|
||||||
String state = SPUtil.getSP(con, "state_data", "authorization_state");
|
String state = SPUtil.getSP(con, "state_data", "authorization_state");
|
||||||
if ("1".equals(state)) {
|
if ("1".equals(state)) {
|
||||||
try {
|
try {
|
||||||
@@ -58,13 +47,13 @@ public class App extends Application {
|
|||||||
res.updateConfiguration(config, res.getDisplayMetrics());
|
res.updateConfiguration(config, res.getDisplayMetrics());
|
||||||
//安联初始化
|
//安联初始化
|
||||||
if (context.getPackageName().equals(getCurrentProcessName(context))) {
|
if (context.getPackageName().equals(getCurrentProcessName(context))) {
|
||||||
//Log.e("--使用的测试环境--",BuildConfig.OPEN_API_URL);
|
//LogUtil.e("--使用的测试环境--",BuildConfig.OPEN_API_URL);
|
||||||
MDPLocationCollectionManager.initialize(this, BuildConfig.OPEN_AL_URL);
|
MDPLocationCollectionManager.initialize(this, BuildConfig.AL_BASE);
|
||||||
}
|
}
|
||||||
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
||||||
// 路由初始化
|
// 路由初始化
|
||||||
// JVerificationInterface.setDebugMode(true);
|
JVerificationInterface.setDebugMode(true);
|
||||||
// JVerificationInterface.init(this, 5000, (code, msg) -> Log.d("tag", "code = " + code + " msg = " + msg));
|
JVerificationInterface.init(this, 5000, (code, msg) -> Log.d("tag", "code = " + code + " msg = " + msg));
|
||||||
//友盟
|
//友盟
|
||||||
//设置非debug版本开启
|
//设置非debug版本开启
|
||||||
if (!isDebugVersion(con)) {
|
if (!isDebugVersion(con)) {
|
||||||
@@ -74,33 +63,9 @@ public class App extends Application {
|
|||||||
JTTProcess.init(this);
|
JTTProcess.init(this);
|
||||||
//QupaiHttpFinal.getInstance().initOkHttpFinal();
|
//QupaiHttpFinal.getInstance().initOkHttpFinal();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e("-error-", "初始化失败sss");
|
LogUtil.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() {
|
||||||
@@ -121,10 +86,6 @@ 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();
|
||||||
|
|||||||
@@ -1,562 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver;
|
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.annotation.TargetApi;
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.graphics.Bitmap;
|
|
||||||
import android.net.Uri;
|
|
||||||
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.request.UserRequset;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.UiAuxiliary;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.FaceSuccActivity;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.home.StartYunDanActivity;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
|
||||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
|
||||||
import com.dahe.mylibrary.utils.ToastUtils;
|
|
||||||
import com.esign.esignsdk.EsignSdk;
|
|
||||||
import com.esign.esignsdk.h5.base.WBH5FaceVerifySDK;
|
|
||||||
|
|
||||||
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;
|
|
||||||
boolean isGoCar = false;
|
|
||||||
|
|
||||||
long time = System.currentTimeMillis();
|
|
||||||
|
|
||||||
ValueCallback<Uri> uploadMessage;
|
|
||||||
private ValueCallback<Uri[]> uploadMessageAboveL;
|
|
||||||
private final static int FILE_CHOOSER_RESULT_CODE = 10000;
|
|
||||||
private Context ctx;
|
|
||||||
private boolean isOk = false;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
super.setContentView(R.layout.activity_h5);
|
|
||||||
ctx = this;
|
|
||||||
|
|
||||||
mWebView = findViewById(R.id.webview);
|
|
||||||
ImageView back = findViewById(R.id.back);
|
|
||||||
TextView close = findViewById(R.id.close);
|
|
||||||
TextView tvTitle = findViewById(R.id.tv_title);
|
|
||||||
WebSettings webSetting = mWebView.getSettings();
|
|
||||||
|
|
||||||
String title = getIntent().getStringExtra("title");
|
|
||||||
if (!TextUtils.isEmpty(title)) {
|
|
||||||
tvTitle.setText(title);
|
|
||||||
}
|
|
||||||
|
|
||||||
back.setOnClickListener(v -> {
|
|
||||||
if (isOk) {
|
|
||||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (mWebView.canGoBack()) {
|
|
||||||
mWebView.goBack();
|
|
||||||
} else {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
close.setOnClickListener(v -> {
|
|
||||||
if (isOk) {
|
|
||||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
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);
|
|
||||||
webSetting.setAllowContentAccess(true);
|
|
||||||
webSetting.setLoadsImagesAutomatically(true);
|
|
||||||
webSetting.setMediaPlaybackRequiresUserGesture(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();
|
|
||||||
isGoCar = intent.getBooleanExtra("isGoCar", false);
|
|
||||||
Uri uri = intent.getData();
|
|
||||||
Log.e("test", "===" + uri);
|
|
||||||
if (uri != null) {
|
|
||||||
// 芝麻认证刷脸结束返回获取后续操作页面地址
|
|
||||||
// String callbackUrl = uri.getQueryParameter("callback");
|
|
||||||
String urlString = uri.toString();
|
|
||||||
if ("dahe://driver:8088/realBack".equals(urlString)) {
|
|
||||||
Intent in = new Intent(ctx, FaceSuccActivity.class);
|
|
||||||
in.putExtra("isGoCar", true);
|
|
||||||
startActivity(in);
|
|
||||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
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));
|
|
||||||
intent2.putExtra("isGoCar", isGoCar);
|
|
||||||
startActivity(intent2);
|
|
||||||
return;
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
// }else if (url.startsWith("https://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")) {
|
|
||||||
} else if (url.startsWith("https://agreement.dahehuoyun.com")) {
|
|
||||||
Intent in = new Intent(ctx, FaceSuccActivity.class);
|
|
||||||
startActivity(in);
|
|
||||||
if (isGoCar) {
|
|
||||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
|
||||||
} else {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (curUrl == null) {
|
|
||||||
curUrl = url;
|
|
||||||
}
|
|
||||||
mWebView.loadUrl(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private class MyWebViewClient extends WebViewClient {
|
|
||||||
@Override
|
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
|
||||||
if (url == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Uri uri = Uri.parse(url);
|
|
||||||
Log.e("test", "要加载的地址:" + uri.getScheme() + " " + url + " ");
|
|
||||||
if (uri.getScheme().equals("http") || uri.getScheme().equals("https")) {
|
|
||||||
// if (url.startsWith("https://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")) {
|
|
||||||
if (url.startsWith("https://agreement.dahehuoyun.com")) {
|
|
||||||
Intent in = new Intent(ctx, FaceSuccActivity.class);
|
|
||||||
in.putExtra("isGoCar", isGoCar);
|
|
||||||
startActivity(in);
|
|
||||||
if (isGoCar) {
|
|
||||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
|
||||||
} else {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if (isGoCar&&url.startsWith("https://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")){
|
|
||||||
// isOk = true;
|
|
||||||
// view.loadUrl(url);
|
|
||||||
// new MessageUtils().showSimCenPop(ctx, "个人信息上传成功,请添加车辆信息!", "去添加",() -> {
|
|
||||||
// Intent in = new Intent(ctx, CertificatesActivity.class);
|
|
||||||
// in.putExtra("index", 2);
|
|
||||||
// startActivity(in);
|
|
||||||
// ActivityUtils.finishToActivity(MainActivity.class,false);
|
|
||||||
// });
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
view.loadUrl(url);
|
|
||||||
return true;
|
|
||||||
} else if (uri.getScheme().equals("js") || uri.getScheme().equals("jsbridge")) {
|
|
||||||
|
|
||||||
// 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) {
|
|
||||||
//认证成功返回
|
|
||||||
new Handler().postDelayed(() -> {
|
|
||||||
FaceEvent he = new FaceEvent("刷脸成功");
|
|
||||||
EventBus.getDefault().post(he);
|
|
||||||
finish();
|
|
||||||
}, 800);
|
|
||||||
//认证成功返回
|
|
||||||
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) {
|
|
||||||
//认证成功返回
|
|
||||||
//认证成功返回
|
|
||||||
// new Handler().postDelayed(() -> {
|
|
||||||
// FaceEvent he = new FaceEvent("刷脸成功");
|
|
||||||
// EventBus.getDefault().post(he);
|
|
||||||
// finish();
|
|
||||||
// }, 800);
|
|
||||||
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)) {
|
|
||||||
//延时1.5秒跳转运单详情页面
|
|
||||||
new Handler().postDelayed(() -> {
|
|
||||||
FaceEvent he = new FaceEvent("刷脸成功");
|
|
||||||
EventBus.getDefault().post(he);
|
|
||||||
finish();
|
|
||||||
}, 800);
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,485 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver;
|
|
||||||
|
|
||||||
import static android.webkit.WebSettings.LOAD_NO_CACHE;
|
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.annotation.TargetApi;
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.graphics.Bitmap;
|
|
||||||
import android.net.Uri;
|
|
||||||
import android.net.http.SslError;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Handler;
|
|
||||||
import android.provider.MediaStore;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.KeyEvent;
|
|
||||||
import android.webkit.ConsoleMessage;
|
|
||||||
import android.webkit.CookieManager;
|
|
||||||
import android.webkit.CookieSyncManager;
|
|
||||||
import android.webkit.JsPromptResult;
|
|
||||||
import android.webkit.JsResult;
|
|
||||||
import android.webkit.PermissionRequest;
|
|
||||||
import android.webkit.SslErrorHandler;
|
|
||||||
import android.webkit.ValueCallback;
|
|
||||||
import android.webkit.WebChromeClient;
|
|
||||||
import android.webkit.WebResourceError;
|
|
||||||
import android.webkit.WebResourceRequest;
|
|
||||||
import android.webkit.WebSettings;
|
|
||||||
import android.webkit.WebView;
|
|
||||||
import android.webkit.WebViewClient;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.FaceEvent;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StatusBar;
|
|
||||||
import com.esign.esignsdk.h5.base.WBH5FaceVerifySDK;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLDecoder;
|
|
||||||
|
|
||||||
import pub.devrel.easypermissions.EasyPermissions;
|
|
||||||
import qiu.niorgai.StatusBarCompat;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author xingtian on 2019/3/25
|
|
||||||
*/
|
|
||||||
public class H5Activity2 extends AppCompatActivity {
|
|
||||||
|
|
||||||
public static final int REQUEST_PERMISSION_STORAGE = 0x00;
|
|
||||||
public static final int REQUEST_PERMISSION_CAMERA = 0x01;
|
|
||||||
|
|
||||||
public final static String SCHEMA_REAL = "esign://demo/realBack";
|
|
||||||
|
|
||||||
public final static String SCHEMA_SIGN = "esign://demo/signBack";
|
|
||||||
|
|
||||||
private WebView mWebView;
|
|
||||||
|
|
||||||
String curUrl = null;
|
|
||||||
boolean viewFile = false;
|
|
||||||
|
|
||||||
long time = System.currentTimeMillis();
|
|
||||||
|
|
||||||
ValueCallback<Uri> uploadMessage;
|
|
||||||
private ValueCallback<Uri[]> uploadMessageAboveL;
|
|
||||||
private final static int FILE_CHOOSER_RESULT_CODE = 10000;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
super.setContentView(R.layout.activity_h5);
|
|
||||||
StatusBarCompat.setStatusBarColor(this, ContextCompat.getColor(this, R.color.white), 0);
|
|
||||||
StatusBar.changeToLightStatusBar(this); //黑色 下边白色
|
|
||||||
|
|
||||||
mWebView = findViewById(R.id.webview);
|
|
||||||
// ImageView back = findViewById(R.id.back);
|
|
||||||
// TextView close = findViewById(R.id.close);
|
|
||||||
WebSettings webSetting = mWebView.getSettings();
|
|
||||||
|
|
||||||
// back.setOnClickListener(v -> {
|
|
||||||
// if (mWebView.canGoBack()) {
|
|
||||||
// mWebView.goBack();
|
|
||||||
// } else {
|
|
||||||
// finish();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
//
|
|
||||||
// close.setOnClickListener(v -> {
|
|
||||||
// if (mWebView.canGoBack()) {
|
|
||||||
// mWebView.goBack();
|
|
||||||
// } else {
|
|
||||||
// finish();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
webSetting.setJavaScriptEnabled(true);
|
|
||||||
webSetting.setDomStorageEnabled(true);
|
|
||||||
// webSetting.setAppCacheMaxSize(1024 * 1024 * 8);
|
|
||||||
webSetting.setUseWideViewPort(true);
|
|
||||||
webSetting.setLoadWithOverviewMode(true);
|
|
||||||
webSetting.setAllowFileAccess(true);
|
|
||||||
// webSetting.setAppCacheEnabled(true);
|
|
||||||
String appCachePath = getApplication().getCacheDir().getAbsolutePath();
|
|
||||||
// webSetting.setAppCachePath(appCachePath);
|
|
||||||
webSetting.setDatabaseEnabled(true);
|
|
||||||
webSetting.setCacheMode(LOAD_NO_CACHE);
|
|
||||||
webSetting.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
|
||||||
WebView.setWebContentsDebuggingEnabled(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
CookieSyncManager.createInstance(this);
|
|
||||||
CookieManager cookieManager = CookieManager.getInstance();
|
|
||||||
if (Build.VERSION.SDK_INT >= 21) {
|
|
||||||
cookieManager.setAcceptThirdPartyCookies(mWebView, true);
|
|
||||||
}
|
|
||||||
cookieManager.setAcceptCookie(true);
|
|
||||||
|
|
||||||
|
|
||||||
mWebView.setWebViewClient(new MyWebViewClient());
|
|
||||||
mWebView.setWebChromeClient(new H5FaceWebChromeClient(this));
|
|
||||||
|
|
||||||
WBH5FaceVerifySDK.getInstance().setWebViewSettings(mWebView, getApplicationContext());
|
|
||||||
|
|
||||||
processExtraData();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPause() {
|
|
||||||
super.onPause();
|
|
||||||
mWebView.onPause();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onResume() {
|
|
||||||
super.onResume();
|
|
||||||
mWebView.onResume();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onStop() {
|
|
||||||
super.onStop();
|
|
||||||
mWebView.stopLoading();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
try {
|
|
||||||
if (mWebView != null) {
|
|
||||||
mWebView.removeAllViews();
|
|
||||||
mWebView.destroy();
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onNewIntent(Intent intent) {
|
|
||||||
super.onNewIntent(intent);
|
|
||||||
setIntent(intent);
|
|
||||||
processExtraData();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void processExtraData() {
|
|
||||||
|
|
||||||
Intent intent = getIntent();
|
|
||||||
Uri uri = intent.getData();
|
|
||||||
Log.e("test", "===" + uri);
|
|
||||||
if (uri != null) {
|
|
||||||
// 芝麻认证刷脸结束返回获取后续操作页面地址
|
|
||||||
// String callbackUrl = uri.getQueryParameter("callback");
|
|
||||||
|
|
||||||
String callbackUrl = uri.getQueryParameter("realnameUrl");
|
|
||||||
if (!TextUtils.isEmpty(callbackUrl)) {
|
|
||||||
try {
|
|
||||||
mWebView.loadUrl(URLDecoder.decode(callbackUrl, "utf-8"));
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
String url = intent.getStringExtra("url");
|
|
||||||
viewFile = intent.getBooleanExtra("view_file", false);
|
|
||||||
if (url.startsWith("alipay")) {
|
|
||||||
|
|
||||||
try {
|
|
||||||
Intent intent2 = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
|
||||||
startActivity(intent2);
|
|
||||||
return;
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (curUrl == null) {
|
|
||||||
curUrl = url;
|
|
||||||
}
|
|
||||||
mWebView.loadUrl(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private class MyWebViewClient extends WebViewClient {
|
|
||||||
@Override
|
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
|
||||||
if (url == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Uri uri = Uri.parse(url);
|
|
||||||
Log.e("test", "要加载的地址:" + uri.getScheme() + " " + url + " ");
|
|
||||||
if (uri.getScheme().equals("http") || uri.getScheme().equals("https")) {
|
|
||||||
view.loadUrl(url);
|
|
||||||
return true;
|
|
||||||
} else if (uri.getScheme().equals("js") || uri.getScheme().equals("jsbridge")) {
|
|
||||||
|
|
||||||
// js://signCallback?signResult=true 签署结果
|
|
||||||
if (uri.getAuthority().equals("signCallback")) {
|
|
||||||
if (viewFile) {
|
|
||||||
view.loadUrl(curUrl);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
if (url.contains("signResult")) {
|
|
||||||
boolean signResult = uri.getBooleanQueryParameter("signResult", false);
|
|
||||||
Toast.makeText(H5Activity2.this, "签署结果: " + " signResult = " + signResult, Toast.LENGTH_LONG).show();
|
|
||||||
} else {
|
|
||||||
String tsignCode = uri.getQueryParameter("tsignCode");
|
|
||||||
if ("0".equals(tsignCode)) {
|
|
||||||
tsignCode = "签署成功";
|
|
||||||
} else {
|
|
||||||
tsignCode = "签署失败";
|
|
||||||
}
|
|
||||||
Toast.makeText(H5Activity2.this, "签署结果: " + tsignCode, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
//js://tsignRealBack?esignAppScheme=esign://app/callback&serviceId=854677892133554052&verifycode=4a52e2af0d0abfb7b285c4f05b5af133&status=true&passed=true
|
|
||||||
//实名结果
|
|
||||||
if (uri.getAuthority().equals("tsignRealBack")) {
|
|
||||||
//实名结果字段
|
|
||||||
if (uri.getQueryParameter("verifycode") != null) {
|
|
||||||
String realVerifyCode = uri.getQueryParameter("verifycode");
|
|
||||||
}
|
|
||||||
// 实名认证结束 返回按钮/倒计时返回/暂不认证
|
|
||||||
boolean status = uri.getBooleanQueryParameter("status", false);
|
|
||||||
if (status) {
|
|
||||||
//认证成功返回
|
|
||||||
new Handler().postDelayed(() -> {
|
|
||||||
FaceEvent he = new FaceEvent("刷脸成功");
|
|
||||||
EventBus.getDefault().post(he);
|
|
||||||
finish();
|
|
||||||
}, 800);
|
|
||||||
Toast.makeText(H5Activity2.this, "认证成功", Toast.LENGTH_LONG).show();
|
|
||||||
// finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} else if (url.startsWith(SCHEMA_REAL)) {
|
|
||||||
//esign://app/realBack&serviceId=854677892133554052&verifycode=4a52e2af0d0abfb7b285c4f05b5af133&status=true&passed=true
|
|
||||||
|
|
||||||
//实名结果
|
|
||||||
if (uri.getQueryParameter("verifycode") != null) {
|
|
||||||
String realVerifyCode = uri.getQueryParameter("verifycode");
|
|
||||||
}
|
|
||||||
// 实名认证结束 返回按钮/倒计时返回/暂不认证
|
|
||||||
boolean status = uri.getBooleanQueryParameter("status", false);
|
|
||||||
if (status) {
|
|
||||||
//认证成功返回
|
|
||||||
new Handler().postDelayed(() -> {
|
|
||||||
FaceEvent he = new FaceEvent("刷脸成功");
|
|
||||||
EventBus.getDefault().post(he);
|
|
||||||
finish();
|
|
||||||
}, 800);
|
|
||||||
Toast.makeText(H5Activity2.this, "认证成功", Toast.LENGTH_LONG).show();
|
|
||||||
// finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
} else if (url.startsWith(SCHEMA_SIGN)) {
|
|
||||||
// js://signCallback?signResult=true 签署结果
|
|
||||||
if (url.contains("signResult")) {
|
|
||||||
boolean signResult = uri.getBooleanQueryParameter("signResult", false);
|
|
||||||
Toast.makeText(H5Activity2.this, "签署结果: " + " signResult = " + signResult, Toast.LENGTH_LONG).show();
|
|
||||||
} else {
|
|
||||||
String tsignCode = uri.getQueryParameter("tsignCode");
|
|
||||||
if ("0".equals(tsignCode)) {
|
|
||||||
//延时1.5秒跳转运单详情页面
|
|
||||||
// new Handler().postDelayed(() -> {
|
|
||||||
// FaceEvent he = new FaceEvent("刷脸成功");
|
|
||||||
// EventBus.getDefault().post(he);
|
|
||||||
// finish();
|
|
||||||
// }, 800);
|
|
||||||
tsignCode = "签署成功";
|
|
||||||
} else {
|
|
||||||
tsignCode = "签署失败";
|
|
||||||
}
|
|
||||||
Toast.makeText(H5Activity2.this, "签署结果: " + tsignCode, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
// finish();
|
|
||||||
return true;
|
|
||||||
} else if (uri.getScheme().equals("alipays")) {
|
|
||||||
// 跳转到支付宝刷脸
|
|
||||||
// alipays://platformapi/startapp?appId=20000067&pd=NO&url=https%3A%2F%2Fzmcustprod.zmxy.com.cn%2Fcertify%2Fbegin.htm%3Ftoken%3DZM201811133000000050500431389414
|
|
||||||
try {
|
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
|
||||||
startActivity(intent);
|
|
||||||
return true;
|
|
||||||
} catch (Exception e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
|
|
||||||
super.onReceivedError(view, request, error);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
|
||||||
// super.onReceivedSslError(view, handler, error);
|
|
||||||
handler.proceed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
|
||||||
super.onPageStarted(view, url, favicon);
|
|
||||||
time = System.currentTimeMillis();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPageFinished(WebView view, String url) {
|
|
||||||
super.onPageFinished(view, url);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onLoadResource(WebView view, String url) {
|
|
||||||
super.onLoadResource(view, url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class H5FaceWebChromeClient extends WebChromeClient {
|
|
||||||
private Activity activity;
|
|
||||||
|
|
||||||
public H5FaceWebChromeClient(Activity mActivity) {
|
|
||||||
this.activity = mActivity;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onReceivedTitle(WebView view, String title) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) {
|
|
||||||
return super.onJsPrompt(view, url, message, defaultValue, result);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onJsConfirm(WebView view, String url, String message, JsResult result) {
|
|
||||||
return super.onJsConfirm(view, url, message, result);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TargetApi(8)
|
|
||||||
@Override
|
|
||||||
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
|
|
||||||
return super.onConsoleMessage(consoleMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
|
|
||||||
if (WBH5FaceVerifySDK.getInstance().recordVideoForApiBelow21(uploadMsg, acceptType, activity)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uploadMessage = uploadMsg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) {
|
|
||||||
if (WBH5FaceVerifySDK.getInstance().recordVideoForApiBelow21(uploadMsg, acceptType, activity)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uploadMessage = uploadMessage;
|
|
||||||
}
|
|
||||||
|
|
||||||
@TargetApi(21)
|
|
||||||
@Override
|
|
||||||
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
|
|
||||||
if (WBH5FaceVerifySDK.getInstance().recordVideoForApi21(webView, filePathCallback, activity, fileChooserParams)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
uploadMessageAboveL = filePathCallback;
|
|
||||||
recordVideo(H5Activity2.this);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPermissionRequest(PermissionRequest request) {
|
|
||||||
request.grant(request.getResources());
|
|
||||||
request.getOrigin();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void recordVideo(Activity activity) {
|
|
||||||
if (EasyPermissions.hasPermissions(activity, Manifest.permission.CAMERA)) {
|
|
||||||
try {
|
|
||||||
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
|
|
||||||
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
|
|
||||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
|
||||||
intent.putExtra("android.intent.extras.CAMERA_FACING", 1); // 调用前置摄像头
|
|
||||||
activity.startActivityForResult(intent, FILE_CHOOSER_RESULT_CODE);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
EasyPermissions.requestPermissions(activity, "请同意使用相机功能", REQUEST_PERMISSION_CAMERA, Manifest.permission.CAMERA);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
|
||||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
|
||||||
if (mWebView.canGoBack()) {
|
|
||||||
mWebView.goBack();
|
|
||||||
} else {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return super.onKeyDown(keyCode, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
||||||
super.onActivityResult(requestCode, resultCode, data);
|
|
||||||
|
|
||||||
if (WBH5FaceVerifySDK.getInstance().receiveH5FaceVerifyResult(requestCode, resultCode, data)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestCode == FILE_CHOOSER_RESULT_CODE) {
|
|
||||||
if (null == uploadMessage && null == uploadMessageAboveL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Uri result = data == null || resultCode != RESULT_OK ? null : data.getData();
|
|
||||||
if (uploadMessageAboveL != null) {
|
|
||||||
if (resultCode == RESULT_OK) {
|
|
||||||
uploadMessageAboveL.onReceiveValue(new Uri[]{result});
|
|
||||||
uploadMessageAboveL = null;
|
|
||||||
} else {
|
|
||||||
uploadMessageAboveL.onReceiveValue(new Uri[]{});
|
|
||||||
uploadMessageAboveL = null;
|
|
||||||
}
|
|
||||||
} else if (uploadMessage != null) {
|
|
||||||
if (resultCode == RESULT_OK) {
|
|
||||||
uploadMessage.onReceiveValue(result);
|
|
||||||
uploadMessage = null;
|
|
||||||
} else {
|
|
||||||
uploadMessage.onReceiveValue(Uri.EMPTY);
|
|
||||||
uploadMessage = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
|
||||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
|
||||||
WBH5FaceVerifySDK.getInstance().recordVideo(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,157 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
|
||||||
|
|
||||||
import android.os.Build;
|
|
||||||
import android.provider.Settings;
|
|
||||||
|
|
||||||
import androidx.activity.result.contract.ActivityResultContracts;
|
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.App;
|
|
||||||
import com.dahe.mylibrary.utils.AppUtils;
|
|
||||||
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName AppInfoBean
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/7/22 15:31
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class AppInfoBean {
|
|
||||||
private String userPhone;
|
|
||||||
private String macIpaddr = Settings.Secure.getString(App.getApp().getContentResolver(),Settings.Secure.ANDROID_ID);
|
|
||||||
// private String macIpaddr = android.os.Build.ID;
|
|
||||||
private String clientSource = "driver";
|
|
||||||
private String status = "";
|
|
||||||
private String mobilePhoneManufacturerName = android.os.Build.BRAND;
|
|
||||||
private String mobilePhoneProductName = android.os.Build.MODEL;
|
|
||||||
private String mobilePhoneMotherboardName = android.os.Build.BOARD;
|
|
||||||
private String mobilePhoneHardwareName = android.os.Build.DEVICE;
|
|
||||||
private String mobilePhoneMachineSystemLanguage = Locale.getDefault().getLanguage();
|
|
||||||
private String androidVersion=android.os.Build.VERSION.RELEASE;
|
|
||||||
private String androidSystemSdk = android.os.Build.VERSION.SDK_INT+"";
|
|
||||||
private String appVersionName = AppUtils.getAppVersionName();
|
|
||||||
private String appVersionNumber = AppUtils.getAppVersionCode()+"";
|
|
||||||
|
|
||||||
public String getUserPhone() {
|
|
||||||
return userPhone;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserPhone(String userPhone) {
|
|
||||||
this.userPhone = userPhone;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMacIpaddr() {
|
|
||||||
return macIpaddr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMacIpaddr(String macIpaddr) {
|
|
||||||
this.macIpaddr = macIpaddr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getClientSource() {
|
|
||||||
return clientSource;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClientSource(String clientSource) {
|
|
||||||
this.clientSource = clientSource;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus() {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(String status) {
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMobilePhoneManufacturerName() {
|
|
||||||
return mobilePhoneManufacturerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMobilePhoneManufacturerName(String mobilePhoneManufacturerName) {
|
|
||||||
this.mobilePhoneManufacturerName = mobilePhoneManufacturerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMobilePhoneProductName() {
|
|
||||||
return mobilePhoneProductName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMobilePhoneProductName(String mobilePhoneProductName) {
|
|
||||||
this.mobilePhoneProductName = mobilePhoneProductName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMobilePhoneMotherboardName() {
|
|
||||||
return mobilePhoneMotherboardName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMobilePhoneMotherboardName(String mobilePhoneMotherboardName) {
|
|
||||||
this.mobilePhoneMotherboardName = mobilePhoneMotherboardName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMobilePhoneHardwareName() {
|
|
||||||
return mobilePhoneHardwareName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMobilePhoneHardwareName(String mobilePhoneHardwareName) {
|
|
||||||
this.mobilePhoneHardwareName = mobilePhoneHardwareName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMobilePhoneMachineSystemLanguage() {
|
|
||||||
return mobilePhoneMachineSystemLanguage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMobilePhoneMachineSystemLanguage(String mobilePhoneMachineSystemLanguage) {
|
|
||||||
this.mobilePhoneMachineSystemLanguage = mobilePhoneMachineSystemLanguage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAndroidVersion() {
|
|
||||||
return androidVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAndroidVersion(String androidVersion) {
|
|
||||||
this.androidVersion = androidVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAndroidSystemSdk() {
|
|
||||||
return androidSystemSdk;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAndroidSystemSdk(String androidSystemSdk) {
|
|
||||||
this.androidSystemSdk = androidSystemSdk;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppVersionName() {
|
|
||||||
return appVersionName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppVersionName(String appVersionName) {
|
|
||||||
this.appVersionName = appVersionName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppVersionNumber() {
|
|
||||||
return appVersionNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppVersionNumber(String appVersionNumber) {
|
|
||||||
this.appVersionNumber = appVersionNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "AppInfoBean{" +
|
|
||||||
"userPhone='" + userPhone + '\'' +
|
|
||||||
", macIpaddr='" + macIpaddr + '\'' +
|
|
||||||
", clientSource='" + clientSource + '\'' +
|
|
||||||
", status='" + status + '\'' +
|
|
||||||
", mobilePhoneManufacturerName='" + mobilePhoneManufacturerName + '\'' +
|
|
||||||
", mobilePhoneProductName='" + mobilePhoneProductName + '\'' +
|
|
||||||
", mobilePhoneMotherboardName='" + mobilePhoneMotherboardName + '\'' +
|
|
||||||
", mobilePhoneHardwareName='" + mobilePhoneHardwareName + '\'' +
|
|
||||||
", mobilePhoneMachineSystemLanguage='" + mobilePhoneMachineSystemLanguage + '\'' +
|
|
||||||
", androidVersion='" + androidVersion + '\'' +
|
|
||||||
", androidSystemSdk='" + androidSystemSdk + '\'' +
|
|
||||||
", appVersionName='" + appVersionName + '\'' +
|
|
||||||
", appVersionNumber='" + appVersionNumber + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -66,11 +66,6 @@ public class CarDelBean {
|
|||||||
private String owner;
|
private String owner;
|
||||||
private String roadLicense;
|
private String roadLicense;
|
||||||
private String roadLicensePhoto;
|
private String roadLicensePhoto;
|
||||||
private String trailerLicenseId;
|
|
||||||
|
|
||||||
private String policyPhotoUrl;
|
|
||||||
private String insuranceCompany;
|
|
||||||
private String insuranceEndDay;
|
|
||||||
private String roadLicenseSend;
|
private String roadLicenseSend;
|
||||||
private String roadLicenseValidity;
|
private String roadLicenseValidity;
|
||||||
private String threeImage;
|
private String threeImage;
|
||||||
@@ -82,23 +77,6 @@ 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 getTrailerLicenseId() {
|
|
||||||
return trailerLicenseId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTrailerLicenseId(String trailerLicenseId) {
|
|
||||||
this.trailerLicenseId = trailerLicenseId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNeedUpQCPhoto() {
|
|
||||||
return needUpQCPhoto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNeedUpQCPhoto(String needUpQCPhoto) {
|
|
||||||
this.needUpQCPhoto = needUpQCPhoto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarPlateColorValue() {
|
public String getCarPlateColorValue() {
|
||||||
return carPlateColorValue;
|
return carPlateColorValue;
|
||||||
@@ -108,30 +86,6 @@ public class CarDelBean {
|
|||||||
this.carPlateColorValue = carPlateColorValue;
|
this.carPlateColorValue = carPlateColorValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPolicyPhotoUrl() {
|
|
||||||
return policyPhotoUrl == null ? "" : policyPhotoUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPolicyPhotoUrl(String policyPhotoUrl) {
|
|
||||||
this.policyPhotoUrl = policyPhotoUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInsuranceCompany() {
|
|
||||||
return insuranceCompany == null ? "" : insuranceCompany;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInsuranceCompany(String insuranceCompany) {
|
|
||||||
this.insuranceCompany = insuranceCompany;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInsuranceEndDay() {
|
|
||||||
return insuranceEndDay == null ? "" : insuranceEndDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInsuranceEndDay(String insuranceEndDay) {
|
|
||||||
this.insuranceEndDay = insuranceEndDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarEnergyTypValue() {
|
public String getCarEnergyTypValue() {
|
||||||
return carEnergyTypValue;
|
return carEnergyTypValue;
|
||||||
}
|
}
|
||||||
@@ -308,15 +262,6 @@ public class CarDelBean {
|
|||||||
private String threeImage;
|
private String threeImage;
|
||||||
private String type;
|
private String type;
|
||||||
private String vehicleNumber;
|
private String vehicleNumber;
|
||||||
private String trailerLicenseId;
|
|
||||||
|
|
||||||
public String getTrailerLicenseId() {
|
|
||||||
return trailerLicenseId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTrailerLicenseId(String trailerLicenseId) {
|
|
||||||
this.trailerLicenseId = trailerLicenseId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackImage() {
|
public String getBackImage() {
|
||||||
return backImage == null ? "" : backImage;
|
return backImage == null ? "" : backImage;
|
||||||
|
|||||||
@@ -1,150 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,395 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName CarInfoBean2
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/20 15:43
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class CarInfoBean2 implements Serializable {
|
|
||||||
|
|
||||||
|
|
||||||
private int code;
|
|
||||||
private DataDTO data;
|
|
||||||
private String msg;
|
|
||||||
private String remark;
|
|
||||||
private int res;
|
|
||||||
private boolean success;
|
|
||||||
|
|
||||||
public int getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCode(int code) {
|
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataDTO getData() {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setData(DataDTO data) {
|
|
||||||
this.data = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMsg() {
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMsg(String msg) {
|
|
||||||
this.msg = msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemark(String remark) {
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getRes() {
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRes(int res) {
|
|
||||||
this.res = res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSuccess() {
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSuccess(boolean success) {
|
|
||||||
this.success = success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class DataDTO {
|
|
||||||
private String allAuality;
|
|
||||||
private String allCapacity;
|
|
||||||
private String approvedCapacity;
|
|
||||||
private String auditStatus;
|
|
||||||
private String auditTime;
|
|
||||||
private String backImage;
|
|
||||||
private String backStatus;
|
|
||||||
private String backTime;
|
|
||||||
private String carId;
|
|
||||||
private String carNumber;
|
|
||||||
private String checkRecord;
|
|
||||||
private String createTime;
|
|
||||||
private String dateIssue;
|
|
||||||
private String engineNumber;
|
|
||||||
private String fileNumber;
|
|
||||||
private String frontImage;
|
|
||||||
private String frontStatus;
|
|
||||||
private String frontTime;
|
|
||||||
private String fuelType;
|
|
||||||
private String id;
|
|
||||||
private String model;
|
|
||||||
private String nature;
|
|
||||||
private String organizationName;
|
|
||||||
private String owner;
|
|
||||||
private String personCapacity;
|
|
||||||
private String registerDate;
|
|
||||||
private String remark;
|
|
||||||
private String size;
|
|
||||||
private String threeImage;
|
|
||||||
private String threeImageStatus;
|
|
||||||
private String towAuality;
|
|
||||||
private String trailer;
|
|
||||||
private String trailerId;
|
|
||||||
private String type;
|
|
||||||
private String vehicleAxis;
|
|
||||||
private String vehicleNumber;
|
|
||||||
|
|
||||||
public String getTrailerId() {
|
|
||||||
return trailerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTrailerId(String trailerId) {
|
|
||||||
this.trailerId = trailerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAllAuality() {
|
|
||||||
return allAuality;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAllAuality(String allAuality) {
|
|
||||||
this.allAuality = allAuality;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAllCapacity() {
|
|
||||||
return allCapacity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAllCapacity(String allCapacity) {
|
|
||||||
this.allCapacity = allCapacity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getApprovedCapacity() {
|
|
||||||
return approvedCapacity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApprovedCapacity(String approvedCapacity) {
|
|
||||||
this.approvedCapacity = approvedCapacity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAuditStatus() {
|
|
||||||
return auditStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAuditStatus(String auditStatus) {
|
|
||||||
this.auditStatus = auditStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAuditTime() {
|
|
||||||
return auditTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAuditTime(String auditTime) {
|
|
||||||
this.auditTime = auditTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackImage() {
|
|
||||||
return backImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBackImage(String backImage) {
|
|
||||||
this.backImage = backImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackStatus() {
|
|
||||||
return backStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBackStatus(String backStatus) {
|
|
||||||
this.backStatus = backStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackTime() {
|
|
||||||
return backTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBackTime(String backTime) {
|
|
||||||
this.backTime = backTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarId() {
|
|
||||||
return carId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarId(String carId) {
|
|
||||||
this.carId = carId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarNumber() {
|
|
||||||
return carNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarNumber(String carNumber) {
|
|
||||||
this.carNumber = carNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCheckRecord() {
|
|
||||||
return checkRecord;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCheckRecord(String checkRecord) {
|
|
||||||
this.checkRecord = checkRecord;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreateTime() {
|
|
||||||
return createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateTime(String createTime) {
|
|
||||||
this.createTime = createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDateIssue() {
|
|
||||||
return dateIssue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDateIssue(String dateIssue) {
|
|
||||||
this.dateIssue = dateIssue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEngineNumber() {
|
|
||||||
return engineNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEngineNumber(String engineNumber) {
|
|
||||||
this.engineNumber = engineNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileNumber() {
|
|
||||||
return fileNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileNumber(String fileNumber) {
|
|
||||||
this.fileNumber = fileNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFrontImage() {
|
|
||||||
return frontImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFrontImage(String frontImage) {
|
|
||||||
this.frontImage = frontImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFrontStatus() {
|
|
||||||
return frontStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFrontStatus(String frontStatus) {
|
|
||||||
this.frontStatus = frontStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFrontTime() {
|
|
||||||
return frontTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFrontTime(String frontTime) {
|
|
||||||
this.frontTime = frontTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFuelType() {
|
|
||||||
return fuelType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFuelType(String fuelType) {
|
|
||||||
this.fuelType = fuelType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(String id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getModel() {
|
|
||||||
return model;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setModel(String model) {
|
|
||||||
this.model = model;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNature() {
|
|
||||||
return nature;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNature(String nature) {
|
|
||||||
this.nature = nature;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOrganizationName() {
|
|
||||||
return organizationName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrganizationName(String organizationName) {
|
|
||||||
this.organizationName = organizationName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOwner() {
|
|
||||||
return owner;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOwner(String owner) {
|
|
||||||
this.owner = owner;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPersonCapacity() {
|
|
||||||
return personCapacity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPersonCapacity(String personCapacity) {
|
|
||||||
this.personCapacity = personCapacity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRegisterDate() {
|
|
||||||
return registerDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRegisterDate(String registerDate) {
|
|
||||||
this.registerDate = registerDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemark(String remark) {
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSize() {
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSize(String size) {
|
|
||||||
this.size = size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getThreeImage() {
|
|
||||||
return threeImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setThreeImage(String threeImage) {
|
|
||||||
this.threeImage = threeImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getThreeImageStatus() {
|
|
||||||
return threeImageStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setThreeImageStatus(String threeImageStatus) {
|
|
||||||
this.threeImageStatus = threeImageStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTowAuality() {
|
|
||||||
return towAuality;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTowAuality(String towAuality) {
|
|
||||||
this.towAuality = towAuality;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTrailer() {
|
|
||||||
return trailer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTrailer(String trailer) {
|
|
||||||
this.trailer = trailer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVehicleAxis() {
|
|
||||||
return vehicleAxis;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVehicleAxis(String vehicleAxis) {
|
|
||||||
this.vehicleAxis = vehicleAxis;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVehicleNumber() {
|
|
||||||
return vehicleNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVehicleNumber(String vehicleNumber) {
|
|
||||||
this.vehicleNumber = vehicleNumber;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -56,33 +56,6 @@ 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;
|
||||||
|
|||||||
@@ -57,15 +57,12 @@ public class DriverAuthDataBean {
|
|||||||
private String idcardValidity;
|
private String idcardValidity;
|
||||||
private String dirverAllowType;
|
private String dirverAllowType;
|
||||||
private int idcardPhoto;
|
private int idcardPhoto;
|
||||||
private String bankImgUrl;
|
|
||||||
private String bankName;
|
|
||||||
private String cardNo;
|
|
||||||
private int idcardBackPhoto;
|
private int idcardBackPhoto;
|
||||||
private Object idcardPhotoHold;
|
private Object idcardPhotoHold;
|
||||||
private String idcardAddress;
|
private String idcardAddress;
|
||||||
private String idcardName;
|
private String idcardName;
|
||||||
private int idcardSex;
|
private int idcardSex;
|
||||||
private int idCardStatus;//身份证认证状态;-1未提交 0待认证 1认证通过 2认证失败
|
private int idCardStatus;
|
||||||
private int driverLicenseStatus;
|
private int driverLicenseStatus;
|
||||||
private int qualificationCertificateStatus;
|
private int qualificationCertificateStatus;
|
||||||
private String idCardReason;
|
private String idCardReason;
|
||||||
@@ -144,30 +141,6 @@ public class DriverAuthDataBean {
|
|||||||
private Object mbindStatus;
|
private Object mbindStatus;
|
||||||
private Object mreason;
|
private Object mreason;
|
||||||
|
|
||||||
public String getBankImgUrl() {
|
|
||||||
return bankImgUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBankImgUrl(String bankImgUrl) {
|
|
||||||
this.bankImgUrl = bankImgUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBankName() {
|
|
||||||
return bankName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBankName(String bankName) {
|
|
||||||
this.bankName = bankName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCardNo() {
|
|
||||||
return cardNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCardNo(String cardNo) {
|
|
||||||
this.cardNo = cardNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,33 +48,6 @@ public class DriverExpireBean {
|
|||||||
public static class DataDTO {
|
public static class DataDTO {
|
||||||
private String driverLicenseUpdateUrl;
|
private String driverLicenseUpdateUrl;
|
||||||
private String idCardUpdateUrl;
|
private String idCardUpdateUrl;
|
||||||
private String qualificationUpdateUrl;
|
|
||||||
private String roadLicenseUpdateUrl;
|
|
||||||
private String insuranceUpdateUrl;
|
|
||||||
|
|
||||||
public String getRoadLicenseUpdateUrl() {
|
|
||||||
return roadLicenseUpdateUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRoadLicenseUpdateUrl(String roadLicenseUpdateUrl) {
|
|
||||||
this.roadLicenseUpdateUrl = roadLicenseUpdateUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInsuranceUpdateUrl() {
|
|
||||||
return insuranceUpdateUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInsuranceUpdateUrl(String insuranceUpdateUrl) {
|
|
||||||
this.insuranceUpdateUrl = insuranceUpdateUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getQualificationUpdateUrl() {
|
|
||||||
return qualificationUpdateUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQualificationUpdateUrl(String qualificationUpdateUrl) {
|
|
||||||
this.qualificationUpdateUrl = qualificationUpdateUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDriverLicenseUpdateUrl() {
|
public String getDriverLicenseUpdateUrl() {
|
||||||
return driverLicenseUpdateUrl;
|
return driverLicenseUpdateUrl;
|
||||||
|
|||||||
@@ -1,328 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName DriverUpBean
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/20 09:20
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class DriverUpBean implements Serializable {
|
|
||||||
|
|
||||||
private String frontImageUrl;
|
|
||||||
private String backImageUrl;
|
|
||||||
private String carNumber;
|
|
||||||
private String type;
|
|
||||||
private String owner;
|
|
||||||
private String vehicleNumber;
|
|
||||||
private String carLong;
|
|
||||||
private String carWidth;
|
|
||||||
private String carHeight;
|
|
||||||
private String carId;
|
|
||||||
private String carPlateColor;
|
|
||||||
private String carEnergyTyp;
|
|
||||||
|
|
||||||
private DataDTO zjObj;
|
|
||||||
|
|
||||||
public String getCarId() {
|
|
||||||
return carId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarId(String carId) {
|
|
||||||
this.carId = carId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFrontImageUrl() {
|
|
||||||
return frontImageUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFrontImageUrl(String frontImageUrl) {
|
|
||||||
this.frontImageUrl = frontImageUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackImageUrl() {
|
|
||||||
return backImageUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBackImageUrl(String backImageUrl) {
|
|
||||||
this.backImageUrl = backImageUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarNumber() {
|
|
||||||
return carNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarNumber(String carNumber) {
|
|
||||||
this.carNumber = carNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOwner() {
|
|
||||||
return owner;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOwner(String owner) {
|
|
||||||
this.owner = owner;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVehicleNumber() {
|
|
||||||
return vehicleNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVehicleNumber(String vehicleNumber) {
|
|
||||||
this.vehicleNumber = vehicleNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarLong() {
|
|
||||||
return carLong;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarLong(String carLong) {
|
|
||||||
this.carLong = carLong;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarWidth() {
|
|
||||||
return carWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarWidth(String carWidth) {
|
|
||||||
this.carWidth = carWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarHeight() {
|
|
||||||
return carHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarHeight(String carHeight) {
|
|
||||||
this.carHeight = carHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarPlateColor() {
|
|
||||||
return carPlateColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarPlateColor(String carPlateColor) {
|
|
||||||
this.carPlateColor = carPlateColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarEnergyTyp() {
|
|
||||||
return carEnergyTyp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarEnergyTyp(String carEnergyTyp) {
|
|
||||||
this.carEnergyTyp = carEnergyTyp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataDTO getZjObj() {
|
|
||||||
return zjObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setZjObj(DataDTO zjObj) {
|
|
||||||
this.zjObj = zjObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class DataDTO {
|
|
||||||
|
|
||||||
private String approveTon;
|
|
||||||
private String recordId;
|
|
||||||
private String note;
|
|
||||||
private String passengers;
|
|
||||||
private String vclDrwTn;
|
|
||||||
private String overallDimen;
|
|
||||||
private String vclN;
|
|
||||||
private String enTn;
|
|
||||||
private String loadTon;
|
|
||||||
private String inspectionRecord;
|
|
||||||
private String barCode;
|
|
||||||
private String issuingAuthority;
|
|
||||||
private String regTime;
|
|
||||||
private String address;
|
|
||||||
private String ownerName;
|
|
||||||
private String engine;
|
|
||||||
private String vin;
|
|
||||||
private String licensedateOfissue;
|
|
||||||
private String vcltype;
|
|
||||||
private String vclBrand;
|
|
||||||
private String natureOfUsage;
|
|
||||||
|
|
||||||
public String getApproveTon() {
|
|
||||||
return approveTon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApproveTon(String approveTon) {
|
|
||||||
this.approveTon = approveTon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRecordId() {
|
|
||||||
return recordId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRecordId(String recordId) {
|
|
||||||
this.recordId = recordId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNote() {
|
|
||||||
return note;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNote(String note) {
|
|
||||||
this.note = note;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPassengers() {
|
|
||||||
return passengers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPassengers(String passengers) {
|
|
||||||
this.passengers = passengers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVclDrwTn() {
|
|
||||||
return vclDrwTn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVclDrwTn(String vclDrwTn) {
|
|
||||||
this.vclDrwTn = vclDrwTn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOverallDimen() {
|
|
||||||
return overallDimen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOverallDimen(String overallDimen) {
|
|
||||||
this.overallDimen = overallDimen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVclN() {
|
|
||||||
return vclN;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVclN(String vclN) {
|
|
||||||
this.vclN = vclN;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEnTn() {
|
|
||||||
return enTn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnTn(String enTn) {
|
|
||||||
this.enTn = enTn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLoadTon() {
|
|
||||||
return loadTon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoadTon(String loadTon) {
|
|
||||||
this.loadTon = loadTon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInspectionRecord() {
|
|
||||||
return inspectionRecord;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInspectionRecord(String inspectionRecord) {
|
|
||||||
this.inspectionRecord = inspectionRecord;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBarCode() {
|
|
||||||
return barCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBarCode(String barCode) {
|
|
||||||
this.barCode = barCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIssuingAuthority() {
|
|
||||||
return issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssuingAuthority(String issuingAuthority) {
|
|
||||||
this.issuingAuthority = issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRegTime() {
|
|
||||||
return regTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRegTime(String regTime) {
|
|
||||||
this.regTime = regTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddress() {
|
|
||||||
return address;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAddress(String address) {
|
|
||||||
this.address = address;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOwnerName() {
|
|
||||||
return ownerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOwnerName(String ownerName) {
|
|
||||||
this.ownerName = ownerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEngine() {
|
|
||||||
return engine;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEngine(String engine) {
|
|
||||||
this.engine = engine;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVin() {
|
|
||||||
return vin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVin(String vin) {
|
|
||||||
this.vin = vin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLicensedateOfissue() {
|
|
||||||
return licensedateOfissue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLicensedateOfissue(String licensedateOfissue) {
|
|
||||||
this.licensedateOfissue = licensedateOfissue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVcltype() {
|
|
||||||
return vcltype;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVcltype(String vcltype) {
|
|
||||||
this.vcltype = vcltype;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVclBrand() {
|
|
||||||
return vclBrand;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVclBrand(String vclBrand) {
|
|
||||||
this.vclBrand = vclBrand;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNatureOfUsage() {
|
|
||||||
return natureOfUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNatureOfUsage(String natureOfUsage) {
|
|
||||||
this.natureOfUsage = natureOfUsage;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName GDImage
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/27 14:04
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class GDImage extends GDLocation{
|
|
||||||
|
|
||||||
|
|
||||||
private String fileName;
|
|
||||||
|
|
||||||
private String fileData;
|
|
||||||
|
|
||||||
private String fileExt;
|
|
||||||
|
|
||||||
private String imageTakenDate;
|
|
||||||
|
|
||||||
public String getFileName() {
|
|
||||||
return fileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileName(String fileName) {
|
|
||||||
this.fileName = fileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileData() {
|
|
||||||
return fileData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileData(String fileData) {
|
|
||||||
this.fileData = fileData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileExt() {
|
|
||||||
return fileExt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileExt(String fileExt) {
|
|
||||||
this.fileExt = fileExt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getImageTakenDate() {
|
|
||||||
return imageTakenDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setImageTakenDate(String imageTakenDate) {
|
|
||||||
this.imageTakenDate = imageTakenDate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName GDLocation
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/27 13:59
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class GDLocation implements Serializable {
|
|
||||||
|
|
||||||
private double baiduLongitude;
|
|
||||||
private double baiduLatitude;
|
|
||||||
private String location;
|
|
||||||
private String time;
|
|
||||||
private double altitude;
|
|
||||||
private float speed;
|
|
||||||
private float direction;
|
|
||||||
private int interval;
|
|
||||||
|
|
||||||
public double getBaiduLongitude() {
|
|
||||||
return baiduLongitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBaiduLongitude(double baiduLongitude) {
|
|
||||||
this.baiduLongitude = baiduLongitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getBaiduLatitude() {
|
|
||||||
return baiduLatitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBaiduLatitude(double baiduLatitude) {
|
|
||||||
this.baiduLatitude = baiduLatitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLocation() {
|
|
||||||
return location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLocation(String location) {
|
|
||||||
this.location = location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTime() {
|
|
||||||
return time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTime(String time) {
|
|
||||||
this.time = time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getAltitude() {
|
|
||||||
return altitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAltitude(double altitude) {
|
|
||||||
this.altitude = altitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getSpeed() {
|
|
||||||
return speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSpeed(float speed) {
|
|
||||||
this.speed = speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getDirection() {
|
|
||||||
return direction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDirection(float direction) {
|
|
||||||
this.direction = direction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getInterval() {
|
|
||||||
return interval;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInterval(int interval) {
|
|
||||||
this.interval = interval;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -83,8 +83,6 @@ public class HuoYuanDelBean {
|
|||||||
private String vehicleTypeName;
|
private String vehicleTypeName;
|
||||||
private int vehicleLength;
|
private int vehicleLength;
|
||||||
private String vehicleLengthName;
|
private String vehicleLengthName;
|
||||||
private String carNumber;
|
|
||||||
private String carId;
|
|
||||||
private String namedDrivers;
|
private String namedDrivers;
|
||||||
private String requirement;
|
private String requirement;
|
||||||
private String totalFreight;
|
private String totalFreight;
|
||||||
@@ -99,23 +97,6 @@ public class HuoYuanDelBean {
|
|||||||
private Object contactName;
|
private Object contactName;
|
||||||
private Object contactPhone;
|
private Object contactPhone;
|
||||||
|
|
||||||
|
|
||||||
public String getCarNumber() {
|
|
||||||
return carNumber == null ? "" : carNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarNumber(String carNumber) {
|
|
||||||
this.carNumber = carNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarId() {
|
|
||||||
return carId == null ? "" : carId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarId(String carId) {
|
|
||||||
this.carId = carId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,33 +55,6 @@ public class OCRBankBean {
|
|||||||
private String validDate;
|
private String validDate;
|
||||||
private String bankCardType;
|
private String bankCardType;
|
||||||
private String bankName;
|
private String bankName;
|
||||||
private String expiryDate;
|
|
||||||
private String type;
|
|
||||||
private String cardNumber;
|
|
||||||
|
|
||||||
public String getExpiryDate() {
|
|
||||||
return expiryDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExpiryDate(String expiryDate) {
|
|
||||||
this.expiryDate = expiryDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCardNumber() {
|
|
||||||
return cardNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCardNumber(String cardNumber) {
|
|
||||||
this.cardNumber = cardNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
|
|||||||
@@ -60,33 +60,6 @@ public class OCRCardBackBean {
|
|||||||
private String startTime;
|
private String startTime;
|
||||||
private String endTime;
|
private String endTime;
|
||||||
private String organizationName;
|
private String organizationName;
|
||||||
private String validFrom;
|
|
||||||
private String validTo;
|
|
||||||
private String issue;
|
|
||||||
|
|
||||||
public String getIssue() {
|
|
||||||
return issue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssue(String issue) {
|
|
||||||
this.issue = issue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValidFrom() {
|
|
||||||
return validFrom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValidFrom(String validFrom) {
|
|
||||||
this.validFrom = validFrom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValidTo() {
|
|
||||||
return validTo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValidTo(String validTo) {
|
|
||||||
this.validTo = validTo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
|
|||||||
@@ -63,51 +63,6 @@ public class OCRCardBean {
|
|||||||
private String cardId;
|
private String cardId;
|
||||||
private String birthday;
|
private String birthday;
|
||||||
private String sex;
|
private String sex;
|
||||||
private String ethnicity;
|
|
||||||
private String idcard;
|
|
||||||
private String birth;
|
|
||||||
private String validFrom;
|
|
||||||
private String validTo;
|
|
||||||
|
|
||||||
public String getEthnicity() {
|
|
||||||
return ethnicity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEthnicity(String ethnicity) {
|
|
||||||
this.ethnicity = ethnicity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIdcard() {
|
|
||||||
return idcard;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIdcard(String idcard) {
|
|
||||||
this.idcard = idcard;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBirth() {
|
|
||||||
return birth;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBirth(String birth) {
|
|
||||||
this.birth = birth;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValidFrom() {
|
|
||||||
return validFrom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValidFrom(String validFrom) {
|
|
||||||
this.validFrom = validFrom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValidTo() {
|
|
||||||
return validTo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValidTo(String validTo) {
|
|
||||||
this.validTo = validTo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
|
|||||||
-36
@@ -58,42 +58,6 @@ public class OCRDrivingLicenseBackBean {
|
|||||||
private int id;
|
private int id;
|
||||||
private String url;
|
private String url;
|
||||||
private String archivesName;
|
private String archivesName;
|
||||||
private String fileNumber;
|
|
||||||
private String record;
|
|
||||||
private String name;
|
|
||||||
private String issuingAuthority;
|
|
||||||
|
|
||||||
public String getFileNumber() {
|
|
||||||
return fileNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileNumber(String fileNumber) {
|
|
||||||
this.fileNumber = fileNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRecord() {
|
|
||||||
return record;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRecord(String record) {
|
|
||||||
this.record = record;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIssuingAuthority() {
|
|
||||||
return issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssuingAuthority(String issuingAuthority) {
|
|
||||||
this.issuingAuthority = issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
|
|||||||
@@ -68,70 +68,6 @@ public class OCRDrivingLicenseBean {
|
|||||||
private String allowType;
|
private String allowType;
|
||||||
private String sex;
|
private String sex;
|
||||||
private String startTime;
|
private String startTime;
|
||||||
private String beginDate;
|
|
||||||
private String endDate;
|
|
||||||
private String firstGetDocDate;
|
|
||||||
private String idcard;
|
|
||||||
private String quasiDriveType;
|
|
||||||
private String issuingAuthority;
|
|
||||||
private String nationality;
|
|
||||||
|
|
||||||
|
|
||||||
public String getBeginDate() {
|
|
||||||
return beginDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBeginDate(String beginDate) {
|
|
||||||
this.beginDate = beginDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEndDate() {
|
|
||||||
return endDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEndDate(String endDate) {
|
|
||||||
this.endDate = endDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFirstGetDocDate() {
|
|
||||||
return firstGetDocDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFirstGetDocDate(String firstGetDocDate) {
|
|
||||||
this.firstGetDocDate = firstGetDocDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIdcard() {
|
|
||||||
return idcard;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIdcard(String idcard) {
|
|
||||||
this.idcard = idcard;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getQuasiDriveType() {
|
|
||||||
return quasiDriveType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQuasiDriveType(String quasiDriveType) {
|
|
||||||
this.quasiDriveType = quasiDriveType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIssuingAuthority() {
|
|
||||||
return issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssuingAuthority(String issuingAuthority) {
|
|
||||||
this.issuingAuthority = issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNationality() {
|
|
||||||
return nationality;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNationality(String nationality) {
|
|
||||||
this.nationality = nationality;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
|
|||||||
@@ -1,200 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName OCRQualiBean
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/19 15:53
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class OCRQualiBean {
|
|
||||||
|
|
||||||
|
|
||||||
private int code;
|
|
||||||
private DataDTO data;
|
|
||||||
private String msg;
|
|
||||||
private String remark;
|
|
||||||
private int res;
|
|
||||||
private boolean success;
|
|
||||||
|
|
||||||
public int getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCode(int code) {
|
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataDTO getData() {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setData(DataDTO data) {
|
|
||||||
this.data = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMsg() {
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMsg(String msg) {
|
|
||||||
this.msg = msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemark(String remark) {
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getRes() {
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRes(int res) {
|
|
||||||
this.res = res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSuccess() {
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSuccess(boolean success) {
|
|
||||||
this.success = success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class DataDTO {
|
|
||||||
private String address;
|
|
||||||
private List<QualificationCategoryListDTO> qualification_category_list;
|
|
||||||
private String nationality;
|
|
||||||
private String issuing_authority;
|
|
||||||
private String sex;
|
|
||||||
private String birth_date;
|
|
||||||
private String integrity_assessment_info;
|
|
||||||
private String name;
|
|
||||||
private String driving_class;
|
|
||||||
private String certificate_number;
|
|
||||||
private String continuing_education_info;
|
|
||||||
|
|
||||||
public String getAddress() {
|
|
||||||
return address;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAddress(String address) {
|
|
||||||
this.address = address;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<QualificationCategoryListDTO> getQualification_category_list() {
|
|
||||||
return qualification_category_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQualification_category_list(List<QualificationCategoryListDTO> qualification_category_list) {
|
|
||||||
this.qualification_category_list = qualification_category_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNationality() {
|
|
||||||
return nationality;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNationality(String nationality) {
|
|
||||||
this.nationality = nationality;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIssuing_authority() {
|
|
||||||
return issuing_authority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssuing_authority(String issuing_authority) {
|
|
||||||
this.issuing_authority = issuing_authority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSex() {
|
|
||||||
return sex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSex(String sex) {
|
|
||||||
this.sex = sex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBirth_date() {
|
|
||||||
return birth_date;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBirth_date(String birth_date) {
|
|
||||||
this.birth_date = birth_date;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIntegrity_assessment_info() {
|
|
||||||
return integrity_assessment_info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIntegrity_assessment_info(String integrity_assessment_info) {
|
|
||||||
this.integrity_assessment_info = integrity_assessment_info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDriving_class() {
|
|
||||||
return driving_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDriving_class(String driving_class) {
|
|
||||||
this.driving_class = driving_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCertificate_number() {
|
|
||||||
return certificate_number;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCertificate_number(String certificate_number) {
|
|
||||||
this.certificate_number = certificate_number;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getContinuing_education_info() {
|
|
||||||
return continuing_education_info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setContinuing_education_info(String continuing_education_info) {
|
|
||||||
this.continuing_education_info = continuing_education_info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class QualificationCategoryListDTO {
|
|
||||||
private String issue_date;
|
|
||||||
private String expiry_date;
|
|
||||||
private String category;
|
|
||||||
|
|
||||||
public String getIssue_date() {
|
|
||||||
return issue_date;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssue_date(String issue_date) {
|
|
||||||
this.issue_date = issue_date;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getExpiry_date() {
|
|
||||||
return expiry_date;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExpiry_date(String expiry_date) {
|
|
||||||
this.expiry_date = expiry_date;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCategory() {
|
|
||||||
return category;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCategory(String category) {
|
|
||||||
this.category = category;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName OCRRoadBean
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/19 17:05
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class OCRRoadBean {
|
|
||||||
|
|
||||||
|
|
||||||
private int code;
|
|
||||||
private DataDTO data;
|
|
||||||
private String msg;
|
|
||||||
private String remark;
|
|
||||||
private int res;
|
|
||||||
private boolean success;
|
|
||||||
|
|
||||||
public int getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCode(int code) {
|
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataDTO getData() {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setData(DataDTO data) {
|
|
||||||
this.data = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMsg() {
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMsg(String msg) {
|
|
||||||
this.msg = msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemark(String remark) {
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getRes() {
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRes(int res) {
|
|
||||||
this.res = res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSuccess() {
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSuccess(boolean success) {
|
|
||||||
this.success = success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class DataDTO {
|
|
||||||
private String vehicleWeight;
|
|
||||||
private String issuingAuthority;
|
|
||||||
private String ownerName;
|
|
||||||
private String businessCertificate;
|
|
||||||
private String economicType;
|
|
||||||
private String businessScope;
|
|
||||||
private String vehicleNumber;
|
|
||||||
private String licenseNumber;
|
|
||||||
private String vehicleSize;
|
|
||||||
private String ownerAddress;
|
|
||||||
private String issueDate;
|
|
||||||
private String vehicleType;
|
|
||||||
|
|
||||||
public String getVehicleWeight() {
|
|
||||||
return vehicleWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVehicleWeight(String vehicleWeight) {
|
|
||||||
this.vehicleWeight = vehicleWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIssuingAuthority() {
|
|
||||||
return issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssuingAuthority(String issuingAuthority) {
|
|
||||||
this.issuingAuthority = issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOwnerName() {
|
|
||||||
return ownerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOwnerName(String ownerName) {
|
|
||||||
this.ownerName = ownerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBusinessCertificate() {
|
|
||||||
return businessCertificate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBusinessCertificate(String businessCertificate) {
|
|
||||||
this.businessCertificate = businessCertificate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEconomicType() {
|
|
||||||
return economicType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEconomicType(String economicType) {
|
|
||||||
this.economicType = economicType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBusinessScope() {
|
|
||||||
return businessScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBusinessScope(String businessScope) {
|
|
||||||
this.businessScope = businessScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVehicleNumber() {
|
|
||||||
return vehicleNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVehicleNumber(String vehicleNumber) {
|
|
||||||
this.vehicleNumber = vehicleNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLicenseNumber() {
|
|
||||||
return licenseNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLicenseNumber(String licenseNumber) {
|
|
||||||
this.licenseNumber = licenseNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVehicleSize() {
|
|
||||||
return vehicleSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVehicleSize(String vehicleSize) {
|
|
||||||
this.vehicleSize = vehicleSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOwnerAddress() {
|
|
||||||
return ownerAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOwnerAddress(String ownerAddress) {
|
|
||||||
this.ownerAddress = ownerAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIssueDate() {
|
|
||||||
return issueDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssueDate(String issueDate) {
|
|
||||||
this.issueDate = issueDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVehicleType() {
|
|
||||||
return vehicleType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVehicleType(String vehicleType) {
|
|
||||||
this.vehicleType = vehicleType;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-117
@@ -59,7 +59,6 @@ public class OCRVehicleBackLicenseBean {
|
|||||||
private int id;
|
private int id;
|
||||||
private String url;
|
private String url;
|
||||||
private String checkRecord;
|
private String checkRecord;
|
||||||
private String isSave;
|
|
||||||
private String approvedCapacity;
|
private String approvedCapacity;
|
||||||
private String allCapacity;
|
private String allCapacity;
|
||||||
private String size;
|
private String size;
|
||||||
@@ -71,122 +70,6 @@ public class OCRVehicleBackLicenseBean {
|
|||||||
private String fileNumber;
|
private String fileNumber;
|
||||||
private String carNumber;
|
private String carNumber;
|
||||||
private int licenseId;
|
private int licenseId;
|
||||||
private String note;
|
|
||||||
private String passengers;
|
|
||||||
private String vclDrwTn;
|
|
||||||
private String overallDimen;
|
|
||||||
private String vclN;
|
|
||||||
private String enTn;
|
|
||||||
private String loadTon;
|
|
||||||
private String inspectionRecord;
|
|
||||||
private String barCode;
|
|
||||||
private String approveTon;
|
|
||||||
private String recordId;
|
|
||||||
private String issuingAuthority;
|
|
||||||
|
|
||||||
public String getNote() {
|
|
||||||
return note;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNote(String note) {
|
|
||||||
this.note = note;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPassengers() {
|
|
||||||
return passengers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPassengers(String passengers) {
|
|
||||||
this.passengers = passengers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVclDrwTn() {
|
|
||||||
return vclDrwTn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVclDrwTn(String vclDrwTn) {
|
|
||||||
this.vclDrwTn = vclDrwTn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOverallDimen() {
|
|
||||||
return overallDimen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOverallDimen(String overallDimen) {
|
|
||||||
this.overallDimen = overallDimen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVclN() {
|
|
||||||
return vclN;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVclN(String vclN) {
|
|
||||||
this.vclN = vclN;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEnTn() {
|
|
||||||
return enTn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnTn(String enTn) {
|
|
||||||
this.enTn = enTn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLoadTon() {
|
|
||||||
return loadTon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoadTon(String loadTon) {
|
|
||||||
this.loadTon = loadTon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInspectionRecord() {
|
|
||||||
return inspectionRecord;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInspectionRecord(String inspectionRecord) {
|
|
||||||
this.inspectionRecord = inspectionRecord;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBarCode() {
|
|
||||||
return barCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBarCode(String barCode) {
|
|
||||||
this.barCode = barCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getApproveTon() {
|
|
||||||
return approveTon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApproveTon(String approveTon) {
|
|
||||||
this.approveTon = approveTon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRecordId() {
|
|
||||||
return recordId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRecordId(String recordId) {
|
|
||||||
this.recordId = recordId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIssuingAuthority() {
|
|
||||||
return issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssuingAuthority(String issuingAuthority) {
|
|
||||||
this.issuingAuthority = issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIsSave() {
|
|
||||||
return isSave;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsSave(String isSave) {
|
|
||||||
this.isSave = isSave;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getLicenseId() {
|
public int getLicenseId() {
|
||||||
return licenseId;
|
return licenseId;
|
||||||
|
|||||||
@@ -49,9 +49,7 @@ public class OCRVehicleLicenseBean {
|
|||||||
private String address;
|
private String address;
|
||||||
private int carId;
|
private int carId;
|
||||||
private String carNumber;
|
private String carNumber;
|
||||||
private boolean carExist;
|
|
||||||
private String dateIssue;
|
private String dateIssue;
|
||||||
private String backImage;
|
|
||||||
private String engineNumber;
|
private String engineNumber;
|
||||||
private int id;
|
private int id;
|
||||||
private String model;
|
private String model;
|
||||||
@@ -62,131 +60,6 @@ public class OCRVehicleLicenseBean {
|
|||||||
private String type;
|
private String type;
|
||||||
private String url;
|
private String url;
|
||||||
private String vehicleNumber;
|
private String vehicleNumber;
|
||||||
private String licenseId;
|
|
||||||
private String ownerName;
|
|
||||||
private String regTime;
|
|
||||||
private String issuingAuthority;
|
|
||||||
private String engine;
|
|
||||||
private String vclN;
|
|
||||||
private String licensedateOfissue;
|
|
||||||
private String vin;
|
|
||||||
private String vcltype;
|
|
||||||
private String vclBrand;
|
|
||||||
private String natureOfUsage;
|
|
||||||
|
|
||||||
public String getOwnerName() {
|
|
||||||
return ownerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOwnerName(String ownerName) {
|
|
||||||
this.ownerName = ownerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRegTime() {
|
|
||||||
return regTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRegTime(String regTime) {
|
|
||||||
this.regTime = regTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIssuingAuthority() {
|
|
||||||
return issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssuingAuthority(String issuingAuthority) {
|
|
||||||
this.issuingAuthority = issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEngine() {
|
|
||||||
return engine;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEngine(String engine) {
|
|
||||||
this.engine = engine;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVclN() {
|
|
||||||
return vclN;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVclN(String vclN) {
|
|
||||||
this.vclN = vclN;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLicensedateOfissue() {
|
|
||||||
return licensedateOfissue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLicensedateOfissue(String licensedateOfissue) {
|
|
||||||
this.licensedateOfissue = licensedateOfissue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVin() {
|
|
||||||
return vin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVin(String vin) {
|
|
||||||
this.vin = vin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVcltype() {
|
|
||||||
return vcltype;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVcltype(String vcltype) {
|
|
||||||
this.vcltype = vcltype;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVclBrand() {
|
|
||||||
return vclBrand;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVclBrand(String vclBrand) {
|
|
||||||
this.vclBrand = vclBrand;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNatureOfUsage() {
|
|
||||||
return natureOfUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNatureOfUsage(String natureOfUsage) {
|
|
||||||
this.natureOfUsage = natureOfUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLicenseId() {
|
|
||||||
return licenseId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLicenseId(String licenseId) {
|
|
||||||
this.licenseId = licenseId;
|
|
||||||
}
|
|
||||||
|
|
||||||
private DataDto2 existCarInfo;
|
|
||||||
|
|
||||||
public DataDto2 getExistCarInfo() {
|
|
||||||
return existCarInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExistCarInfo(DataDto2 existCarInfo) {
|
|
||||||
this.existCarInfo = existCarInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isCarExist() {
|
|
||||||
return carExist;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackImage() {
|
|
||||||
return backImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBackImage(String backImage) {
|
|
||||||
this.backImage = backImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarExist(boolean carExist) {
|
|
||||||
this.carExist = carExist;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
return address == null ? "" : address;
|
return address == null ? "" : address;
|
||||||
@@ -300,44 +173,4 @@ public class OCRVehicleLicenseBean {
|
|||||||
this.vehicleNumber = vehicleNumber;
|
this.vehicleNumber = vehicleNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class DataDto2 {
|
|
||||||
private String backImage;
|
|
||||||
private String carId;
|
|
||||||
private String licenseId;
|
|
||||||
|
|
||||||
private CarDelBean.DataDTO trailerResVo;
|
|
||||||
|
|
||||||
public CarDelBean.DataDTO getTrailerResVo() {
|
|
||||||
return trailerResVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTrailerResVo(CarDelBean.DataDTO trailerResVo) {
|
|
||||||
this.trailerResVo = trailerResVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLicenseId() {
|
|
||||||
return licenseId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLicenseId(String licenseId) {
|
|
||||||
this.licenseId = licenseId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackImage() {
|
|
||||||
return backImage == null ? "" : backImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBackImage(String backImage) {
|
|
||||||
this.backImage = backImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCarId() {
|
|
||||||
return carId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCarId(String carId) {
|
|
||||||
this.carId = carId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,7 +257,6 @@ 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;
|
||||||
@@ -281,14 +280,6 @@ 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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName WaybillStatusBean
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/10/14 15:40
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class WaybillStatusBean {
|
|
||||||
|
|
||||||
private int res;
|
|
||||||
private int code;
|
|
||||||
private boolean success;
|
|
||||||
private String msg;
|
|
||||||
private String data;
|
|
||||||
|
|
||||||
public int getRes() {
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRes(int res) {
|
|
||||||
this.res = res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCode(int code) {
|
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSuccess() {
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSuccess(boolean success) {
|
|
||||||
this.success = success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMsg() {
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMsg(String msg) {
|
|
||||||
this.msg = msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getData() {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setData(String data) {
|
|
||||||
this.data = data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.constant;
|
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hlh
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2022/1/10 11:34
|
|
||||||
* @description:交通厅参数
|
|
||||||
*/
|
|
||||||
public class NewLJConstant {
|
|
||||||
|
|
||||||
public final static String ENTER_PRISE_CODE ="E0019169";
|
|
||||||
|
|
||||||
public final static String ENTER_PRISE_IDENTITY = BuildConfig.isTest?"95033cc3492e420d83d7f09eea1400ac":"9179388b0e0847e1862d6400f9cbc778";
|
|
||||||
|
|
||||||
public final static String ENTER_PRISE_KEY =BuildConfig.isTest?"e9844a9b0bba417e89cb8623489abd2f":"156d724e9701420198fcbd52cb1ca529";
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.net.Uri
|
|
||||||
import android.view.View
|
|
||||||
import android.widget.TextView
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
|
||||||
import com.lxj.xpopup.core.CenterPopupView
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @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
|
|
||||||
private lateinit var tvPhone : TextView
|
|
||||||
override fun onCreate() {
|
|
||||||
super.onCreate()
|
|
||||||
val tvCancel = findViewById<View>(R.id.tvCancel) as TextView
|
|
||||||
val tvOk = findViewById<View>(R.id.tvOk) as TextView
|
|
||||||
tvPhone = findViewById<View>(R.id.tvPhone) as TextView
|
|
||||||
val tvContent = findViewById<View>(R.id.tvContent) as TextView
|
|
||||||
val tvMessage2 = findViewById<View>(R.id.tvMessage2) as TextView
|
|
||||||
tvCancel.setOnClickListener(this)
|
|
||||||
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()
|
|
||||||
// if (XPermission.create(context).isGranted(Manifest.permission.CALL_PHONE)){
|
|
||||||
val toString = tvPhone.text.toString()
|
|
||||||
val intent = Intent(Intent.ACTION_DIAL)
|
|
||||||
val data = Uri.parse("tel:$toString")
|
|
||||||
intent.data = data
|
|
||||||
context.startActivity(intent)
|
|
||||||
// }else{
|
|
||||||
// ToastUtils.showToast(context,"请开启电话权限")
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 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)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName MyRequestCallback
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/10/28 17:19
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
interface MyRequestCallback{
|
|
||||||
fun onResult(allGranted: Boolean, grantedList: List<String?>, deniedList: List<String?>)
|
|
||||||
}
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.view.View
|
|
||||||
import android.widget.TextView
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
|
||||||
import com.lxj.xpopup.core.CenterPopupView
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @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 titleLeft: String
|
|
||||||
lateinit var titleReft: String
|
|
||||||
lateinit var secMessage: String
|
|
||||||
|
|
||||||
constructor(context: Context, message: String,titleLeft:String = "取消",titleRight: String = "去注册") : this(context) {
|
|
||||||
content = message
|
|
||||||
this.titleReft = titleRight
|
|
||||||
this.titleLeft = titleLeft
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
override fun getImplLayoutId() = R.layout.pop_sim_center
|
|
||||||
|
|
||||||
override fun onCreate() {
|
|
||||||
super.onCreate()
|
|
||||||
val tvCancel = findViewById<View>(R.id.tvCancel) as TextView
|
|
||||||
val tvOk = findViewById<View>(R.id.tvOk) as TextView
|
|
||||||
val tvContent = findViewById<View>(R.id.tvContent) as TextView
|
|
||||||
|
|
||||||
tvCancel.text = titleLeft
|
|
||||||
tvOk.text = titleReft
|
|
||||||
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()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.view.View
|
|
||||||
import android.widget.TextView
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
|
||||||
import com.lxj.xpopup.core.PositionPopupView
|
|
||||||
import com.lxj.xpopup.enums.DragOrientation
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Description: 自定义自由定位Position弹窗
|
|
||||||
* Create by dance, at 2019/6/14
|
|
||||||
*/
|
|
||||||
class TopMsgPopup(context: Context,title:String, message: String) : PositionPopupView(context) {
|
|
||||||
|
|
||||||
private var message: String
|
|
||||||
private var title: String
|
|
||||||
|
|
||||||
init {
|
|
||||||
this.message = message
|
|
||||||
this.title = title
|
|
||||||
}
|
|
||||||
override fun getImplLayoutId(): Int {
|
|
||||||
return R.layout.popup_qq_msg
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getDragOrientation(): DragOrientation {
|
|
||||||
return DragOrientation.DragToLeft
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreate() {
|
|
||||||
super.onCreate()
|
|
||||||
val tvMessage = findViewById<View>(R.id.tvMessage) as TextView
|
|
||||||
val tvTitle = findViewById<View>(R.id.tvTitle) as TextView
|
|
||||||
|
|
||||||
tvMessage.text = message
|
|
||||||
tvTitle.text = title
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.event;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hlh
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2021/10/20 14:43
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
public class HomeWaybillEvent {
|
|
||||||
|
|
||||||
private int message;
|
|
||||||
|
|
||||||
|
|
||||||
public int getMessage() {
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMessage(int message) {
|
|
||||||
this.message = message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HomeWaybillEvent() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param message 1:刷新运单列表
|
|
||||||
*/
|
|
||||||
public HomeWaybillEvent(int message) {
|
|
||||||
this.message = message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.event;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hlh
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2021/11/2 18:51
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
public class RefreshCarListEvent {
|
|
||||||
private String message;
|
|
||||||
|
|
||||||
public RefreshCarListEvent(String message) {
|
|
||||||
this.message = message;
|
|
||||||
}
|
|
||||||
public String getMessage() {
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
public void setMessage(String message) {
|
|
||||||
this.message = message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.event;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hlh
|
|
||||||
* @version 1.0.0
|
|
||||||
* @date 2021/10/20 14:43
|
|
||||||
* @description:
|
|
||||||
*/
|
|
||||||
public class WalletEvent {
|
|
||||||
|
|
||||||
private String message;
|
|
||||||
|
|
||||||
public WalletEvent(String message) {
|
|
||||||
this.message = message;
|
|
||||||
}
|
|
||||||
public String getMessage() {
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
public void setMessage(String message) {
|
|
||||||
this.message = message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,6 +3,7 @@ package com.arpa.hndahesudintocctmsdriver.parts;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
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.util.sp.SPUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||||
@@ -19,7 +20,7 @@ public class AuthParts {
|
|||||||
|
|
||||||
public static DriverAuthDataBean getAuth(Context con){
|
public static DriverAuthDataBean getAuth(Context con){
|
||||||
String authData=SPUtil.getSP(con,"data","authdata");
|
String authData=SPUtil.getSP(con,"data","authdata");
|
||||||
Log.e("--data--",authData);
|
LogUtil.e("--data--",authData);
|
||||||
if("".equals(authData)){
|
if("".equals(authData)){
|
||||||
return null;
|
return null;
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.arpa.hndahesudintocctmsdriver.service.MakeUpService;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.ui.home.HuoYunDelActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.home.HuoYunDelActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.home.StartYunDanActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.home.StartYunDanActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.login.WelcomeActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.login.WelcomeActivity;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@@ -25,7 +26,7 @@ public class PushMessageReceiver extends JPushMessageReceiver {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMessage(Context context, CustomMessage customMessage) {
|
public void onMessage(Context context, CustomMessage customMessage) {
|
||||||
Log.e(TAG, "[onMessage] " + customMessage);
|
LogUtil.e(TAG, "[onMessage] " + customMessage);
|
||||||
Intent intent = new Intent("com.jiguang.demo.message");
|
Intent intent = new Intent("com.jiguang.demo.message");
|
||||||
intent.putExtra("msg", customMessage.message);
|
intent.putExtra("msg", customMessage.message);
|
||||||
context.sendBroadcast(intent);
|
context.sendBroadcast(intent);
|
||||||
@@ -33,7 +34,7 @@ public class PushMessageReceiver extends JPushMessageReceiver {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNotifyMessageOpened(Context context, NotificationMessage message) {
|
public void onNotifyMessageOpened(Context context, NotificationMessage message) {
|
||||||
Log.e(TAG, "[onNotifyMessageOpened] " + message);
|
LogUtil.e(TAG, "[onNotifyMessageOpened] " + message);
|
||||||
try{
|
try{
|
||||||
//打开自定义的Activity
|
//打开自定义的Activity
|
||||||
JSONObject json=new JSONObject(message.notificationExtras);
|
JSONObject json=new JSONObject(message.notificationExtras);
|
||||||
@@ -41,7 +42,7 @@ public class PushMessageReceiver extends JPushMessageReceiver {
|
|||||||
String url=json.getString("url");
|
String url=json.getString("url");
|
||||||
if(url.indexOf("driver/detail")!=-1){
|
if(url.indexOf("driver/detail")!=-1){
|
||||||
int id=Integer.parseInt(url.split("=")[1]);
|
int id=Integer.parseInt(url.split("=")[1]);
|
||||||
Log.e("-url-",url+"_"+id);
|
LogUtil.e("-url-",url+"_"+id);
|
||||||
Intent in=new Intent(context, HuoYunDelActivity.class);
|
Intent in=new Intent(context, HuoYunDelActivity.class);
|
||||||
in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
|
in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
|
||||||
in.putExtra("id",Integer.parseInt(url.split("=")[1]));
|
in.putExtra("id",Integer.parseInt(url.split("=")[1]));
|
||||||
@@ -54,7 +55,7 @@ public class PushMessageReceiver extends JPushMessageReceiver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}catch (Throwable throwable){
|
}catch (Throwable throwable){
|
||||||
Log.e("123", "[onNotifyMessageOpened] " + message);
|
LogUtil.e("123", "[onNotifyMessageOpened] " + message);
|
||||||
Intent in=new Intent(context, WelcomeActivity.class);
|
Intent in=new Intent(context, WelcomeActivity.class);
|
||||||
in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
|
in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
|
||||||
context.startActivity(in);
|
context.startActivity(in);
|
||||||
@@ -63,7 +64,7 @@ public class PushMessageReceiver extends JPushMessageReceiver {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMultiActionClicked(Context context, Intent intent) {
|
public void onMultiActionClicked(Context context, Intent intent) {
|
||||||
Log.e(TAG, "[onMultiActionClicked] 用户点击了通知栏按钮");
|
LogUtil.e(TAG, "[onMultiActionClicked] 用户点击了通知栏按钮");
|
||||||
String nActionExtra = intent.getExtras().getString(JPushInterface.EXTRA_NOTIFICATION_ACTION_EXTRA);
|
String nActionExtra = intent.getExtras().getString(JPushInterface.EXTRA_NOTIFICATION_ACTION_EXTRA);
|
||||||
|
|
||||||
//开发者根据不同 Action 携带的 extra 字段来分配不同的动作。
|
//开发者根据不同 Action 携带的 extra 字段来分配不同的动作。
|
||||||
@@ -72,19 +73,19 @@ public class PushMessageReceiver extends JPushMessageReceiver {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (nActionExtra.equals("my_extra1")) {
|
if (nActionExtra.equals("my_extra1")) {
|
||||||
Log.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮一");
|
LogUtil.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮一");
|
||||||
} else if (nActionExtra.equals("my_extra2")) {
|
} else if (nActionExtra.equals("my_extra2")) {
|
||||||
Log.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮二");
|
LogUtil.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮二");
|
||||||
} else if (nActionExtra.equals("my_extra3")) {
|
} else if (nActionExtra.equals("my_extra3")) {
|
||||||
Log.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮三");
|
LogUtil.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮三");
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮未定义");
|
LogUtil.e(TAG, "[onMultiActionClicked] 用户点击通知栏按钮未定义");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNotifyMessageArrived(Context context,NotificationMessage message) {
|
public void onNotifyMessageArrived(Context context,NotificationMessage message) {
|
||||||
Log.e(TAG, "[onNotifyMessageArrived] " + message);
|
LogUtil.e(TAG, "[onNotifyMessageArrived] " + message);
|
||||||
JSONObject json= null;
|
JSONObject json= null;
|
||||||
String str="";
|
String str="";
|
||||||
try {
|
try {
|
||||||
@@ -103,24 +104,24 @@ public class PushMessageReceiver extends JPushMessageReceiver {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNotifyMessageDismiss(Context context, NotificationMessage message) {
|
public void onNotifyMessageDismiss(Context context, NotificationMessage message) {
|
||||||
Log.e(TAG, "[onNotifyMessageDismiss] " + message);
|
LogUtil.e(TAG, "[onNotifyMessageDismiss] " + message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRegister(Context context, String registrationId) {
|
public void onRegister(Context context, String registrationId) {
|
||||||
Log.e(TAG, "[onRegister] " + registrationId);
|
LogUtil.e(TAG, "[onRegister] " + registrationId);
|
||||||
Intent intent = new Intent("com.jiguang.demo.register");
|
Intent intent = new Intent("com.jiguang.demo.register");
|
||||||
context.sendBroadcast(intent);
|
context.sendBroadcast(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConnected(Context context, boolean isConnected) {
|
public void onConnected(Context context, boolean isConnected) {
|
||||||
Log.e(TAG, "[onConnected] " + isConnected);
|
LogUtil.e(TAG, "[onConnected] " + isConnected);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCommandResult(Context context, CmdMessage cmdMessage) {
|
public void onCommandResult(Context context, CmdMessage cmdMessage) {
|
||||||
Log.e(TAG, "[onCommandResult] " + cmdMessage);
|
LogUtil.e(TAG, "[onCommandResult] " + cmdMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -150,7 +151,7 @@ public class PushMessageReceiver extends JPushMessageReceiver {
|
|||||||
@Override
|
@Override
|
||||||
public void onNotificationSettingsCheck(Context context, boolean isOn, int source) {
|
public void onNotificationSettingsCheck(Context context, boolean isOn, int source) {
|
||||||
super.onNotificationSettingsCheck(context, isOn, source);
|
super.onNotificationSettingsCheck(context, isOn, source);
|
||||||
Log.e(TAG, "[onNotificationSettingsCheck] isOn:" + isOn + ",source:" + source);
|
LogUtil.e(TAG, "[onNotificationSettingsCheck] isOn:" + isOn + ",source:" + source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+6
-4
@@ -3,6 +3,8 @@ package com.arpa.hndahesudintocctmsdriver.push;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
|
|
||||||
import cn.jpush.android.api.JPushMessage;
|
import cn.jpush.android.api.JPushMessage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,7 +51,7 @@ public class TagAliasOperatorHelper {
|
|||||||
logs += ", tags is exceed limit need to clean";
|
logs += ", tags is exceed limit need to clean";
|
||||||
}
|
}
|
||||||
logs += ", errorCode:" + jPushMessage.getErrorCode();
|
logs += ", errorCode:" + jPushMessage.getErrorCode();
|
||||||
Log.e(TAG, logs);
|
LogUtil.e(TAG, logs);
|
||||||
//ToastHelper.showOther(context,logs);
|
//ToastHelper.showOther(context,logs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -63,7 +65,7 @@ public class TagAliasOperatorHelper {
|
|||||||
//ToastHelper.showOk(context,"modify success");
|
//ToastHelper.showOk(context,"modify success");
|
||||||
}else{
|
}else{
|
||||||
String logs = "Failed to modify tags, errorCode:" + jPushMessage.getErrorCode();
|
String logs = "Failed to modify tags, errorCode:" + jPushMessage.getErrorCode();
|
||||||
Log.e(TAG, logs);
|
LogUtil.e(TAG, logs);
|
||||||
//ToastHelper.showOther(context,logs);
|
//ToastHelper.showOther(context,logs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,7 +79,7 @@ public class TagAliasOperatorHelper {
|
|||||||
//ToastHelper.showOk(context,"modify success");
|
//ToastHelper.showOk(context,"modify success");
|
||||||
}else{
|
}else{
|
||||||
String logs = "Failed to modify alias, errorCode:" + jPushMessage.getErrorCode();
|
String logs = "Failed to modify alias, errorCode:" + jPushMessage.getErrorCode();
|
||||||
Log.e(TAG, logs);
|
LogUtil.e(TAG, logs);
|
||||||
//ToastHelper.showOther(context,logs);
|
//ToastHelper.showOther(context,logs);
|
||||||
//MMKV.defaultMMKV().putString(AdvActivity.ALIAS_DATA, "");
|
//MMKV.defaultMMKV().putString(AdvActivity.ALIAS_DATA, "");
|
||||||
}
|
}
|
||||||
@@ -92,7 +94,7 @@ public class TagAliasOperatorHelper {
|
|||||||
//ToastHelper.showOk(context,"modify success");
|
//ToastHelper.showOk(context,"modify success");
|
||||||
}else{
|
}else{
|
||||||
String logs = "Failed to set mobile number, errorCode:" + jPushMessage.getErrorCode();
|
String logs = "Failed to set mobile number, errorCode:" + jPushMessage.getErrorCode();
|
||||||
Log.e(TAG, logs);
|
LogUtil.e(TAG, logs);
|
||||||
//ToastHelper.showOther(context,logs);
|
//ToastHelper.showOther(context,logs);
|
||||||
//MMKV.defaultMMKV().putString(AdvActivity.MN_DATA, "");
|
//MMKV.defaultMMKV().putString(AdvActivity.MN_DATA, "");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,15 +8,8 @@ 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.log.LogUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.NewLJUtils;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.msg.MsgUtil;
|
|
||||||
import com.dahe.mylibrary.callback.OnGDDownloadResultListener;
|
|
||||||
import com.dahe.mylibrary.callback.OnGDResultListener;
|
|
||||||
import com.dahe.mylibrary.utils.ToastUtils;
|
|
||||||
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;
|
||||||
@@ -36,63 +29,26 @@ 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="a15b4ba5bd2542cc9a6bea9bdadf9ef9";
|
|
||||||
//企业app验证码-测试
|
|
||||||
private static final String APP_KEY_TEXT="07a6256cad5642138ed6e962a5a157be";
|
|
||||||
|
|
||||||
|
|
||||||
public static void verification(Context con){
|
public static void verification(Context con){
|
||||||
DriverAuthDataBean auth= AuthParts.getAuth(con);
|
DriverAuthDataBean auth= AuthParts.getAuth(con);
|
||||||
if (auth==null){
|
Identity idy=new Identity();
|
||||||
return;
|
//企业代码
|
||||||
}
|
idy.setEnterpriseCode(ENTERPRISE_CODE);
|
||||||
|
//企业app的身份码
|
||||||
// Identity idy=new Identity();
|
idy.setAppIdentity(APP_IDENTITY);
|
||||||
// //企业代码
|
//企业app验证码
|
||||||
// idy.setEnterpriseCode(BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE);
|
idy.setAppKey(APP_KEY);
|
||||||
// //企业app的身份码
|
//司机身份证
|
||||||
// idy.setAppIdentity(BuildConfig.isTest?APP_IDENTITY_TEXT:APP_IDENTITY);
|
idy.setDriverIdentity(auth.getData().getIdcard());
|
||||||
// //企业app验证码
|
//idy.setDriverIdentity("410725198311042012");
|
||||||
// idy.setAppKey(BuildConfig.isTest?APP_KEY_TEXT:APP_KEY);
|
MDPLocationCollectionManager.register(con, idy, new OnResultListener() {
|
||||||
// //司机身份证
|
|
||||||
// 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+"");
|
|
||||||
// new MessageUtils().showCenMessage(con,s1);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
NewLJUtils.getInstance().getToken(con, new OnGDResultListener() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
NewLJUtils.getInstance().confirmInvoice(con, new OnGDResultListener() {
|
getFq(con);
|
||||||
@Override
|
|
||||||
public void onSuccess() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(String var1, String var2) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String var1, String var2) {
|
public void onFailure(java.lang.String s, java.lang.String s1) {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -101,18 +57,18 @@ public class ALProcess {
|
|||||||
MDPLocationCollectionManager.getInvoices(con, 100, 1, new OnDownloadResultListener() {
|
MDPLocationCollectionManager.getInvoices(con, 100, 1, new OnDownloadResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Object o) {
|
public void onSuccess(Object o) {
|
||||||
Log.e("--获取发票列表成功--",new Gson().toJson(o));
|
LogUtil.e("--获取发票列表成功--",new Gson().toJson(o));
|
||||||
try{
|
try{
|
||||||
FqBean fb=new Gson().fromJson(new Gson().toJson(o),FqBean.class);
|
FqBean fb=new Gson().fromJson(new Gson().toJson(o),FqBean.class);
|
||||||
applyFq(con,fb);
|
applyFq(con,fb);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
Log.e("--失败--","数据解析失败");
|
LogUtil.e("--失败--","数据解析失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("--获取发票列表失败--",s+s1+"");
|
LogUtil.e("--获取发票列表失败--",s+s1+"");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -121,16 +77,16 @@ 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, BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE, driverInvoice.getDriverInvoiceCode(), new OnResultListener() {
|
MDPLocationCollectionManager.confirmInvoice(con, ENTERPRISE_CODE, driverInvoice.getDriverInvoiceCode(), new OnResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
|
|
||||||
Log.e("--成功--","申请发票成功");
|
LogUtil.e("--成功--","申请发票成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("--失败--","申请发票失败"+s+s1);
|
LogUtil.e("--失败--","申请发票失败"+s+s1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -142,7 +98,7 @@ public class ALProcess {
|
|||||||
// @param enterpriseCode 企业号
|
// @param enterpriseCode 企业号
|
||||||
// @param nfcId NFC id
|
// @param nfcId NFC id
|
||||||
// @param listener 回调函数
|
// @param listener 回调函数
|
||||||
MDPLocationCollectionManager.checkNfc(con, shipmentCode,ENTERPRISE_CODE, nfcId, new OnResultListener() {
|
MDPLocationCollectionManager.checkNfc(con, shipmentCode,ENTERPRISE_CODE, nfcId, new OnResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
|
|
||||||
@@ -156,71 +112,4 @@ public class ALProcess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void verification(Context con,Handler hd){
|
|
||||||
DriverAuthDataBean auth= AuthParts.getAuth(con);
|
|
||||||
if (auth==null){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 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() {
|
|
||||||
// MsgUtil.addHdMsgWatBody(hd, 1111,"认证成功");
|
|
||||||
// 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);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
NewLJUtils.getInstance().searchDriver(con, auth.getData().getIdcard(), new OnGDDownloadResultListener(){
|
|
||||||
@Override
|
|
||||||
public void onSuccess(String var1) {
|
|
||||||
MsgUtil.addHdMsgWatBody(hd, 1111,"认证成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(String var1, String var2) {
|
|
||||||
MsgUtil.addHdMsgWatBody(hd, 2222,var2);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// NewLJUtils.getInstance().getToken(con, new OnGDResultListener() {
|
|
||||||
// @Override
|
|
||||||
// public void onSuccess() {
|
|
||||||
// NewLJUtils.getInstance().confirmInvoice(con, new OnGDResultListener() {
|
|
||||||
// @Override
|
|
||||||
// public void onSuccess() {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onFailure(String var1, String var2) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onFailure(String var1, String var2) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.arpa.hndahesudintocctmsdriver.report;
|
|||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.amap.api.location.AMapLocationClient;
|
import com.amap.api.location.AMapLocationClient;
|
||||||
@@ -11,6 +10,7 @@ import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.constant.JTTConstant;
|
import com.arpa.hndahesudintocctmsdriver.constant.JTTConstant;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.service.JTTSendService;
|
import com.arpa.hndahesudintocctmsdriver.service.JTTSendService;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
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.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@@ -57,12 +57,10 @@ public class JTTProcess {
|
|||||||
ENVIRONMENT, new OnResultListener() {
|
ENVIRONMENT, new OnResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("交通厅-获取授权",s+s1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<ShippingNoteInfo> list) {
|
public void onSuccess(List<ShippingNoteInfo> list) {
|
||||||
Log.e("交通厅-获取授权",gson.toJson(list));
|
|
||||||
if(list.size()>0){
|
if(list.size()>0){
|
||||||
SPUtil.insSP(con,JTTConstant.JTT_DATA_NAME,JTTConstant.JTT_DATA_JTTORDER_KEY,gson.toJson(list.get(0)));
|
SPUtil.insSP(con,JTTConstant.JTT_DATA_NAME,JTTConstant.JTT_DATA_JTTORDER_KEY,gson.toJson(list.get(0)));
|
||||||
Intent in=new Intent(con, JTTSendService.class);
|
Intent in=new Intent(con, JTTSendService.class);
|
||||||
@@ -79,9 +77,6 @@ public class JTTProcess {
|
|||||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||||
sni.setSerialNumber("0000");
|
sni.setSerialNumber("0000");
|
||||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||||
@@ -93,19 +88,19 @@ public class JTTProcess {
|
|||||||
sni.setEndLocationText(endWay.getAddress());
|
sni.setEndLocationText(endWay.getAddress());
|
||||||
sni.setEndCountrySubdivisionCode(sob.getData().getEndCountrySubdivisionCode());
|
sni.setEndCountrySubdivisionCode(sob.getData().getEndCountrySubdivisionCode());
|
||||||
snis[0]=sni;
|
snis[0]=sni;
|
||||||
Log.e("起点代码",sob.getData().getStartCountrySubdivisionCode());
|
LogUtil.e("起点代码",sob.getData().getStartCountrySubdivisionCode());
|
||||||
Log.e("终点代码",sob.getData().getEndCountrySubdivisionCode());
|
LogUtil.e("终点代码",sob.getData().getEndCountrySubdivisionCode());
|
||||||
// AMapLocationClient.updatePrivacyShow(con,true,true);
|
// AMapLocationClient.updatePrivacyShow(con,true,true);
|
||||||
// AMapLocationClient.updatePrivacyAgree(con,true);
|
// AMapLocationClient.updatePrivacyAgree(con,true);
|
||||||
LocationOpenApi.start(con, sob.getData().getCarNumber(), UserParts.getUser(con).getData().getRname(), remark,snis, new OnResultListener() {
|
LocationOpenApi.start(con, sob.getData().getCarNumber(), UserParts.getUser(con).getData().getRname(), remark,snis, new OnResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("交通厅-开启定位失败",s+s1+"");
|
LogUtil.e("交通厅-开启定位失败",s+s1+"");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<ShippingNoteInfo> list) {
|
public void onSuccess(List<ShippingNoteInfo> list) {
|
||||||
Log.e("交通厅-开启定位成功",gson.toJson(list));
|
LogUtil.e("交通厅-开启定位成功",gson.toJson(list));
|
||||||
if(list.size()>0){
|
if(list.size()>0){
|
||||||
SPUtil.insSP(con, JTTConstant.JTT_DATA_NAME,JTTConstant.JTT_DATA_JTTORDER_KEY,gson.toJson(list.get(0)));
|
SPUtil.insSP(con, JTTConstant.JTT_DATA_NAME,JTTConstant.JTT_DATA_JTTORDER_KEY,gson.toJson(list.get(0)));
|
||||||
Intent in=new Intent(con, JTTSendService.class);
|
Intent in=new Intent(con, JTTSendService.class);
|
||||||
@@ -129,12 +124,12 @@ public class JTTProcess {
|
|||||||
LocationOpenApi.send(con,sob.getData().getCarNumber(), UserParts.getUser(con).getData().getRname(), remark,snis, new OnSendResultListener() {
|
LocationOpenApi.send(con,sob.getData().getCarNumber(), UserParts.getUser(con).getData().getRname(), remark,snis, new OnSendResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1, List<ShippingNoteInfo> list) {
|
public void onFailure(String s, String s1, List<ShippingNoteInfo> list) {
|
||||||
Log.e("交通厅-发送定位失败",s+s1+"");
|
LogUtil.e("交通厅-发送定位失败",s+s1+"");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<ShippingNoteInfo> list) {
|
public void onSuccess(List<ShippingNoteInfo> list) {
|
||||||
Log.e("交通厅-发送定位成功",gson.toJson(list));
|
LogUtil.e("交通厅-发送定位成功",gson.toJson(list));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -147,9 +142,6 @@ public class JTTProcess {
|
|||||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||||
sni.setSerialNumber("0000");
|
sni.setSerialNumber("0000");
|
||||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||||
@@ -165,12 +157,12 @@ public class JTTProcess {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("交通厅-暂停定位失败",s+s1+"");
|
LogUtil.e("交通厅-暂停定位失败",s+s1+"");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<ShippingNoteInfo> list) {
|
public void onSuccess(List<ShippingNoteInfo> list) {
|
||||||
Log.e("交通厅-暂停定位成功",gson.toJson(list));
|
LogUtil.e("交通厅-暂停定位成功",gson.toJson(list));
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -183,9 +175,6 @@ public class JTTProcess {
|
|||||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||||
sni.setSerialNumber("0000");
|
sni.setSerialNumber("0000");
|
||||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||||
@@ -201,12 +190,12 @@ public class JTTProcess {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("交通厅-重启定位失败",s+s1+"");
|
LogUtil.e("交通厅-重启定位失败",s+s1+"");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<ShippingNoteInfo> list) {
|
public void onSuccess(List<ShippingNoteInfo> list) {
|
||||||
Log.e("交通厅-重启定位成功",gson.toJson(list));
|
LogUtil.e("交通厅-重启定位成功",gson.toJson(list));
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -218,9 +207,6 @@ public class JTTProcess {
|
|||||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||||
sni.setSerialNumber("0000");
|
sni.setSerialNumber("0000");
|
||||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||||
@@ -237,12 +223,12 @@ public class JTTProcess {
|
|||||||
LocationOpenApi.stop(con, sob.getData().getCarNumber(),UserParts.getUser(con).getData().getRname(), remark,snis, new OnResultListener() {
|
LocationOpenApi.stop(con, sob.getData().getCarNumber(),UserParts.getUser(con).getData().getRname(), remark,snis, new OnResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("交通厅-结束定位失败",s+s1+"");
|
LogUtil.e("交通厅-结束定位失败",s+s1+"");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<ShippingNoteInfo> list) {
|
public void onSuccess(List<ShippingNoteInfo> list) {
|
||||||
Log.e("交通厅-结束定位成功",gson.toJson(list));
|
LogUtil.e("交通厅-结束定位成功",gson.toJson(list));
|
||||||
Intent stopIntent = new Intent(con,JTTSendService.class);
|
Intent stopIntent = new Intent(con,JTTSendService.class);
|
||||||
con.stopService(stopIntent);
|
con.stopService(stopIntent);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import android.content.Context;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.map.MapUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.map.MapUtil;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.IDInputBean;
|
import com.arpa.hndahesudintocctmsdriver.request.bean.IDInputBean;
|
||||||
@@ -64,7 +63,6 @@ public class AuthRequest {
|
|||||||
|
|
||||||
//驾驶证认证
|
//驾驶证认证
|
||||||
public void driverAuthLicense(Context con, Handler hd, LicenseInputBean iib) {
|
public void driverAuthLicense(Context con, Handler hd, LicenseInputBean iib) {
|
||||||
Log.e("--认证信息--", gson.toJson(iib));
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getDRIVERAUTHLICENSE(), gson.toJson(iib)), getToken(con), con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getDRIVERAUTHLICENSE(), gson.toJson(iib)), getToken(con), con);
|
||||||
RequestUtil.start(1, "driverAuthLicense", re, con, hd);
|
RequestUtil.start(1, "driverAuthLicense", re, con, hd);
|
||||||
}
|
}
|
||||||
@@ -75,22 +73,6 @@ public class AuthRequest {
|
|||||||
RequestUtil.start(1, "saveVehicleLicense", re, con, hd);
|
RequestUtil.start(1, "saveVehicleLicense", re, con, hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询车辆信息-行驶证/app/carDriver/saveVehicleLicense
|
|
||||||
public void getCarInfo(Context con, Handler hd, String carNum) {
|
|
||||||
Map<String,Object> map=new HashMap<>();
|
|
||||||
map.put("carNum",carNum);
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"app/carDriver/onlyGetVehicleLicense", MapUtil.mapJson(map)), getToken(con), con);
|
|
||||||
RequestUtil.start(1, "getCarInfo", re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//绑定车辆信息-行驶证/app/carDriver/saveVehicleLicense
|
|
||||||
public void bindCar(Context con, Handler hd, String carId) {
|
|
||||||
Map<String,Object> map=new HashMap<>();
|
|
||||||
map.put("carId",carId);
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"app/carDriver/bindCar", MapUtil.mapJson(map)), getToken(con), con);
|
|
||||||
RequestUtil.start(1, "bindCarInfo", re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//上传头像
|
//上传头像
|
||||||
public void upHeadImg(Context con, Handler hd, String imgUrl) {
|
public void upHeadImg(Context con, Handler hd, String imgUrl) {
|
||||||
String mt = "{\"headportrait\": \"" + imgUrl + "\"}";
|
String mt = "{\"headportrait\": \"" + imgUrl + "\"}";
|
||||||
@@ -141,17 +123,6 @@ public class AuthRequest {
|
|||||||
RequestUtil.start(1, "saveCarRoadLicenseNo", re, con, hd);
|
RequestUtil.start(1, "saveCarRoadLicenseNo", re, con, hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//车辆交强保险
|
|
||||||
public void saveTrafficInsurance(Context con, Handler hd, String id, String insuranceEndDay, String insuranceCompany) {
|
|
||||||
String mt = "{\n" +
|
|
||||||
"\t\"carId\": \"" + id + "\",\n" +
|
|
||||||
"\t\"insuranceEndDay\": \"" + insuranceEndDay + "\",\n" +
|
|
||||||
"\t\"insuranceCompany\": \"" + insuranceCompany + "\",\n" +
|
|
||||||
"}";
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getTrafficInsurance(), mt), getToken(con), con);
|
|
||||||
RequestUtil.start(1, "saveTrafficInsurance", re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取资格证认证信息
|
//获取资格证认证信息
|
||||||
public void isDriverAuthQualification(Context con, Handler hd) {
|
public void isDriverAuthQualification(Context con, Handler hd) {
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIsAuthDriverAuthQualification(), ""), getToken(con), con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIsAuthDriverAuthQualification(), ""), getToken(con), con);
|
||||||
@@ -169,7 +140,6 @@ public class AuthRequest {
|
|||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAuthUrl(), ""), getToken(con), con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAuthUrl(), ""), getToken(con), con);
|
||||||
RequestUtil.start(1, "authUrl", re, con, hd);
|
RequestUtil.start(1, "authUrl", re, con, hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取车牌颜色
|
//获取车牌颜色
|
||||||
public void getCarColor(Context con, Handler hd) {
|
public void getCarColor(Context con, Handler hd) {
|
||||||
// Map<String, Object> map = new HashMap<>();
|
// Map<String, Object> map = new HashMap<>();
|
||||||
|
|||||||
@@ -25,10 +25,5 @@ public class BusinessRequest {
|
|||||||
Request re = OkHttpUtil.get(new OkDate(url+ Md5Util.resUrl(longitude,latitude,name), "post", ""));
|
Request re = OkHttpUtil.get(new OkDate(url+ Md5Util.resUrl(longitude,latitude,name), "post", ""));
|
||||||
RequestUtil.start(12, "business_list",re,con,hd);
|
RequestUtil.start(12, "business_list",re,con,hd);
|
||||||
}
|
}
|
||||||
public void GetBusiness(Context con, Handler hd, String id){
|
|
||||||
String url="https://openapi.dianping.com/router/poiinfo/detailinfo";
|
|
||||||
Request re = OkHttpUtil.get(new OkDate(url+Md5Util.resDelUrl(id), "post", ""));
|
|
||||||
RequestUtil.start(1, "business",re,con,hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request;
|
package com.arpa.hndahesudintocctmsdriver.request;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.TrackInputBean;
|
import com.arpa.hndahesudintocctmsdriver.request.bean.TrackInputBean;
|
||||||
@@ -73,17 +72,6 @@ public class HuoYuanRequset{
|
|||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAgreeOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAgreeOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||||
RequestUtil.start(1, HuoYunDelActivity.END,re,con,hd);
|
RequestUtil.start(1, HuoYunDelActivity.END,re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void confirm2(String cid,int wid){
|
|
||||||
// Map<String,Object> map=new HashMap<>();
|
|
||||||
// map.put("carId",cid);
|
|
||||||
// map.put("orderId",wid);
|
|
||||||
// map.put("status",2);
|
|
||||||
// map.put("imgUrl","");
|
|
||||||
// Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"/app/driver/waybill/grab",MapUtil.mapJson(map)),getToken(con),con);
|
|
||||||
// RequestUtil.start(1, "jfaklsdjfklasjdflk",re,con,hd);
|
|
||||||
// }
|
|
||||||
|
|
||||||
//获取执行中的运单
|
//获取执行中的运单
|
||||||
public void startOrder(int id){
|
public void startOrder(int id){
|
||||||
Map<String,Object> map=new HashMap<>();
|
Map<String,Object> map=new HashMap<>();
|
||||||
@@ -91,13 +79,6 @@ public class HuoYuanRequset{
|
|||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetStartOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetStartOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||||
RequestUtil.start(1, HuoYuanFragmengt.START_ORDER,re,con,hd);
|
RequestUtil.start(1, HuoYuanFragmengt.START_ORDER,re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startOrder2(int id){
|
|
||||||
Map<String,Object> map=new HashMap<>();
|
|
||||||
map.put("waybillId",id);
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetStartOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
|
||||||
RequestUtil.start(1, "refreshorderDetail",re,con,hd);
|
|
||||||
}
|
|
||||||
//装货
|
//装货
|
||||||
public void loading(LUInputBean lub){
|
public void loading(LUInputBean lub){
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getLOADING(), gson.toJson(lub)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getLOADING(), gson.toJson(lub)),getToken(con),con);
|
||||||
@@ -108,11 +89,6 @@ public class HuoYuanRequset{
|
|||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUNLOADING(), gson.toJson(lub)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUNLOADING(), gson.toJson(lub)),getToken(con),con);
|
||||||
RequestUtil.start(1, ShangChuangImgActivity.TYPE_NAME[1],re,con,hd);
|
RequestUtil.start(1, ShangChuangImgActivity.TYPE_NAME[1],re,con,hd);
|
||||||
}
|
}
|
||||||
//卸货-补传
|
|
||||||
public void dischargeCargo4(LUInputBean lub){
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUNLOADING4(), gson.toJson(lub)),getToken(con),con);
|
|
||||||
RequestUtil.start(1, ShangChuangImgActivity.TYPE_NAME[1],re,con,hd);
|
|
||||||
}
|
|
||||||
//回单
|
//回单
|
||||||
public void receipt(UploadReceiptInputBean urib){
|
public void receipt(UploadReceiptInputBean urib){
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUploadReceipt(), gson.toJson(urib)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUploadReceipt(), gson.toJson(urib)),getToken(con),con);
|
||||||
@@ -161,32 +137,6 @@ public class HuoYuanRequset{
|
|||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getEvaluationV2(),MapUtil.mapJson(map)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getEvaluationV2(),MapUtil.mapJson(map)),getToken(con),con);
|
||||||
RequestUtil.start(1, StartYunDanActivity.KEEP_EVALUTE,re,con,hd);
|
RequestUtil.start(1, StartYunDanActivity.KEEP_EVALUTE,re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取运单状态
|
|
||||||
* @param waybillId
|
|
||||||
*/
|
|
||||||
public void getWaybillStatus(int waybillId){
|
|
||||||
// Map<String,Object> map=new HashMap<>();
|
|
||||||
// map.put("waybillId",waybillId);
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetWaybillStatus()+"?waybillId="+waybillId,""),getToken(con),con);
|
|
||||||
RequestUtil.start(1, "waybillStatus",re,con,hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取货源状态
|
|
||||||
* @param orderId
|
|
||||||
*/
|
|
||||||
public void getOrderStatus(int orderId){
|
|
||||||
// Map<String,Object> map=new HashMap<>();
|
|
||||||
// map.put("waybillId",waybillId);
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetOrderStatus()+"?orderId="+orderId,""),getToken(con),con);
|
|
||||||
RequestUtil.start(1, "orderStatus",re,con,hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public final static String ASYMMETRYWAYBILL="waybill_getAsymmetryWaybill";
|
public final static String ASYMMETRYWAYBILL="waybill_getAsymmetryWaybill";
|
||||||
|
|
||||||
//获取装货失败信息
|
//获取装货失败信息
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ public class NewsRequest {
|
|||||||
public void delNewsAll(Context con, Handler hd,Model m){
|
public void delNewsAll(Context con, Handler hd,Model m){
|
||||||
m.setId(0);
|
m.setId(0);
|
||||||
token= SPUtil.getSP(con, LoginActivity.USER,LoginActivity.USER_TOKEN);
|
token= SPUtil.getSP(con, LoginActivity.USER,LoginActivity.USER_TOKEN);
|
||||||
Log.e("-xm-",gson.toJson(m));
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getXiaoxiDelAll(),gson.toJson(m)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getXiaoxiDelAll(),gson.toJson(m)),getToken(con),con);
|
||||||
RequestUtil.start(1, NewsActivity.NEWS_DEL,re,con,hd);
|
RequestUtil.start(1, NewsActivity.NEWS_DEL,re,con,hd);
|
||||||
///app/message/setReadAll
|
///app/message/setReadAll
|
||||||
|
|||||||
@@ -3,132 +3,60 @@ package com.arpa.hndahesudintocctmsdriver.request;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.http.OkDate;
|
import com.arpa.hndahesudintocctmsdriver.util.http.OkDate;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.http.OkHttpUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.http.OkHttpUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequestUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.http.RequestUtil;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
|
|
||||||
public class OCRRequest {
|
public class OCRRequest {
|
||||||
|
|
||||||
public String getToken(Context con) {
|
public String getToken(Context con) {
|
||||||
return SPUtil.getSP(con, LoginActivity.USER, LoginActivity.USER_TOKEN);
|
return SPUtil.getSP(con, LoginActivity.USER,LoginActivity.USER_TOKEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
//银行卡识别
|
//银行卡识别
|
||||||
public void ORCBank(Context con, Handler hd, File file) {
|
public void ORCBank(Context con, Handler hd, File file){
|
||||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getOrcBank()), getToken(con), file);
|
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getOrcBank()),getToken(con),file);
|
||||||
RequestUtil.start(12, "OCR_BANK", re, con, hd);
|
RequestUtil.start(12, "OCR_BANK",re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//银行卡识别-中交
|
|
||||||
public void ORCBankZj(Context con, Handler hd, String imgUrl) {
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getOrcBank() + "?imgurl=" + imgUrl, ""), getToken(con), con);
|
|
||||||
RequestUtil.start(1, "OCR_BANK", re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//从业资格证-中交
|
|
||||||
public void ORCQualificaZj(Context con, Handler hd, String imgUrl) {
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"sinoiov/ocr/getTransQualificationCertOCR" + "?imgurl=" + imgUrl, ""), getToken(con), con);
|
|
||||||
RequestUtil.start(1, "ORCQualificaZj", re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//道路运输许可证-中交
|
|
||||||
public void ORCRoadLicZj(Context con, Handler hd, String imgUrl) {
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"sinoiov/ocr/getVehicleRoadLicenseOCR" + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
|
||||||
RequestUtil.start(1, "ORCRoadLicZj", re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//身份证正面识别
|
//身份证正面识别
|
||||||
public void OCRCard(Context con, Handler hd, File file) {
|
public void OCRCard(Context con, Handler hd, File file){
|
||||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardFront()), getToken(con), file);
|
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardFront()),getToken(con),file);
|
||||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[0], re, con, hd);
|
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[0],re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//身份证背面识别
|
//身份证背面识别
|
||||||
public void OCRCardBack(Context con, Handler hd, File file) {
|
public void OCRCardBack(Context con, Handler hd, File file){
|
||||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardBack()), getToken(con), file);
|
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardBack()),getToken(con),file);
|
||||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[0], re, con, hd);
|
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[0], re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//身份证正面识别-中交
|
|
||||||
public void OCRZjCard(Context con, Handler hd, String imgUrl) {
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIdCardFront() + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
|
||||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[0], re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//身份证背面识别-中交
|
|
||||||
public void OCRZjCardBack(Context con, Handler hd, String imgUrl) {
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIdCardFront() + "?backDataUrl=" + imgUrl, ""), getToken(con), con);
|
|
||||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[0], re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//驾驶证正面识别
|
//驾驶证正面识别
|
||||||
public void OCRDrivingLicense(Context con, Handler hd, File file) {
|
public void OCRDrivingLicense(Context con, Handler hd, File file){
|
||||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicense()), getToken(con), file);
|
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicense()),getToken(con),file);
|
||||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[1], re, con, hd);
|
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[1],re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//驾驶证背面识别
|
//驾驶证背面识别
|
||||||
public void OCRDrivingLicenseBack(Context con, Handler hd, File file) {
|
public void OCRDrivingLicenseBack(Context con, Handler hd, File file){
|
||||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicenseBack()), getToken(con), file);
|
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicenseBack()),getToken(con),file);
|
||||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[1], re, con, hd);
|
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[1],re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//驾驶证正面识别-中交
|
|
||||||
public void OCRDrivingLicenseZj(Context con, Handler hd, String imgUrl){
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getDrivingLicense()+"?faceDataUrl="+imgUrl,""),getToken(con),con);
|
|
||||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[1],re,con,hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//驾驶证背面识别-中交
|
|
||||||
public void OCRDrivingLicenseBackZj(Context con, Handler hd, String imgUrl){
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getDrivingLicense()+"?backDataUrl="+imgUrl,""),getToken(con),con);
|
|
||||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[1],re,con,hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//行驶证正面识别
|
//行驶证正面识别
|
||||||
public void OCRVehicleLicense(Context con, Handler hd, File file) {
|
public void OCRVehicleLicense(Context con, Handler hd, File file){
|
||||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getVehicleLicense()), getToken(con), file);
|
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getVehicleLicense()),getToken(con),file);
|
||||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[2], re, con, hd);
|
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[2],re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//行驶证背面识别
|
//行驶证背面识别
|
||||||
public void OCRVehicleLicenseBack(Context con, Handler hd, File file, String carId, String carNum, boolean isSave) {
|
public void OCRVehicleLicenseBack(Context con, Handler hd, File file,String carId,String carNum){
|
||||||
Request re = OkHttpUtil.postFiles(new OkDate(RequestConstant.getVehicleLicenseBack()), file, getToken(con), carId, carNum, isSave);
|
Request re = OkHttpUtil.postFiles(new OkDate(RequestConstant.getVehicleLicenseBack()),file,getToken(con),carId,carNum);
|
||||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[2], re, con, hd);
|
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[2],re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OCRPlateLicense(Context con, Handler hd, File file){
|
||||||
//行驶证正面识别-中交
|
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getPlateLicense()),getToken(con),file);
|
||||||
public void OCRVehicleLicenseZj(Context con, Handler hd, String imgUrl) {
|
RequestUtil.start(12, "carName",re,con,hd);
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getVehicleLicense() + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
|
||||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[2], re, con, hd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//行驶证背面识别-中交
|
|
||||||
public void OCRVehicleLicenseBackZj(Context con, Handler hd, String imgUrl) {
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getVehicleLicense() + "?backDataUrl=" + imgUrl, ""), getToken(con), con);
|
|
||||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[2], re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OCRPlateLicense(Context con, Handler hd, File file) {
|
|
||||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getPlateLicense()), getToken(con), file);
|
|
||||||
RequestUtil.start(12, "carName", re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void OCRCarPlateLicense(Context con, Handler hd, File file) {
|
|
||||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getPlateLicense2()), getToken(con), file);
|
|
||||||
RequestUtil.start(12, "carNum", re, con, hd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+139
-215
@@ -1,217 +1,195 @@
|
|||||||
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 = BuildConfig.BASE_URL;
|
public static String BASE_URL ="http://app.dahehuoyun.com/api";
|
||||||
//版本更新/app/check/version
|
//版本更新/app/check/version
|
||||||
public static String VERSION = "/app/check/version";
|
public static String VERSION ="/app/check/version";
|
||||||
//全部代码
|
//全部代码
|
||||||
public static String CODE_DATA = "/common/dic/listdata";
|
public static String CODE_DATA ="/common/dic/listdata";
|
||||||
//短信验证码
|
//短信验证码
|
||||||
private static final String SEND_CODE = "/common/sendcode";
|
private static final String SEND_CODE = "/common/sendcode";
|
||||||
//登录
|
//登录
|
||||||
private static final String REG = "/common/register";
|
private static final String REG="/common/register";
|
||||||
//注册
|
//注册
|
||||||
private static final String LOGIN = "/common/register";
|
private static final String LOGIN="/common/register";
|
||||||
//上传文件
|
//上传文件
|
||||||
private static final String UPLOAD = "/common/resource/upload";
|
private static final String UPLOAD="/common/resource/upload";
|
||||||
//配置项信息
|
//配置项信息
|
||||||
private static final String CONFIG = "/common/config/list";
|
private static final String CONFIG="/common/config/list";
|
||||||
//获取开屏页图片和轮播图
|
//获取开屏页图片和轮播图
|
||||||
private static final String GET_IMAGE = "/common/resource/image/config";
|
private static final String GET_IMAGE="/common/resource/image/config";
|
||||||
//司机认证信息
|
//司机认证信息
|
||||||
private static final String DRIVER_AUTH_INFO = "/app/driver/auth/authInfo";
|
private static final String DRIVER_AUTH_INFO="/app/driver/auth/authInfo";
|
||||||
//货源大厅
|
//货源大厅
|
||||||
private static final String GOODS_HALL = "/app/driver/order/getHallList";
|
private static final String GOODS_HALL="/app/driver/order/getHallList";
|
||||||
//历史成交货源
|
//历史成交货源
|
||||||
private static final String GET_EXAMPLE_LIST = "/app/driver/order/getExampleList";
|
private static final String GET_EXAMPLE_LIST="/app/driver/order/getExampleList";
|
||||||
//货源详情
|
//货源详情
|
||||||
private static final String GOODS_DEL = "/app/driver/order/findOrderInfoV2";
|
private static final String GOODS_DEL="/app/driver/order/findOrderInfoV2";
|
||||||
//账户信息
|
//账户信息
|
||||||
private static final String USER = "/app/user/getUserInfo";
|
private static final String USER="/app/user/getUserInfo";
|
||||||
//银行卡列表
|
//银行卡列表
|
||||||
private static final String BANK_CARD_LIST = "/app/bankCard/findPage";
|
private static final String BANK_CARD_LIST="/app/bankCard/findPage";
|
||||||
//绑定银行卡
|
//绑定银行卡
|
||||||
private static final String INS_BANKCARD = "/app/bankCard/bandCard";
|
private static final String INS_BANKCARD="/app/bankCard/bandCard";
|
||||||
// private static final String INS_BANKCARD="/app/bankCard/save";
|
// private static final String INS_BANKCARD="/app/bankCard/save";
|
||||||
//删除银行卡
|
//删除银行卡
|
||||||
// private static final String DELETE_BANKCARD="/app/bankCard/deleteCard";
|
// private static final String DELETE_BANKCARD="/app/bankCard/deleteCard";
|
||||||
private static final String DELETE_BANKCARD = "/app/bankCard/unBandCard";
|
private static final String DELETE_BANKCARD="/app/bankCard/unBandCard";
|
||||||
//生成电子账户
|
//生成电子账户
|
||||||
private static final String ADD_CONTRACTS = "/app/bank/addContracts";
|
private static final String ADD_CONTRACTS="/app/bank/addContracts";
|
||||||
//获取电子账户
|
//获取电子账户
|
||||||
private static final String GET_CONTRACTS = "/app/bank/getContracts";
|
private static final String GET_CONTRACTS="/app/bank/getContracts";
|
||||||
//获取账户未读消息
|
//获取账户未读消息
|
||||||
private static final String XIAOXI_LIST = "/app/message/findCurrentUserNotReadCount";
|
private static final String XIAOXI_LIST="/app/message/findCurrentUserNotReadCount";
|
||||||
//获取账户消息
|
//获取账户消息
|
||||||
private static final String XIAOXI_ALL = "/app/message/findPage";
|
private static final String XIAOXI_ALL="/app/message/findPage";
|
||||||
//已读消息
|
//已读消息
|
||||||
private static final String XIAOXI_DEL = "/app/message/setReadById";
|
private static final String XIAOXI_DEL="/app/message/setReadById";
|
||||||
//已读全部消息
|
//已读全部消息
|
||||||
private static final String XIAOXI_DEL_ALL = "/app/message/setReadAll";
|
private static final String XIAOXI_DEL_ALL="/app/message/setReadAll";
|
||||||
//运单列表
|
//运单列表
|
||||||
private static final String ORDER_LIST = "/app/driver/waybill/listV2";
|
private static final String ORDER_LIST="/app/driver/waybill/listV2";
|
||||||
//抢单
|
//抢单
|
||||||
private static final String AGREE_ORDER = "/app/driver/waybill/grabDriverOrdersContructV2";
|
private static final String AGREE_ORDER="/app/driver/waybill/grabDriverOrdersContruct";
|
||||||
//获取正在执行的运单/运单详情
|
//获取正在执行的运单/运单详情
|
||||||
private static final String GET_START_ORDER = "/app/driver/waybill/getExecuteWaybill";
|
private static final String GET_START_ORDER="/app/driver/waybill/getExecuteWaybill";
|
||||||
//查看承运合同
|
//查看承运合同
|
||||||
private static final String GET_CARRY_CONTRACT = "/common/appContract/findCarrierContract";
|
private static final String GET_CARRY_CONTRACT="/common/appContract/findCarrierContract";
|
||||||
//评价信息保存
|
//评价信息保存
|
||||||
private static final String EVALUATIONV2 = "/app/driver/waybill/evaluationV2";
|
private static final String EVALUATIONV2="/app/driver/waybill/evaluationV2";
|
||||||
//装货
|
//装货
|
||||||
private static final String LOADING = "/app/driver/waybill/loadingV2";
|
private static final String LOADING="/app/driver/waybill/loadingV2";
|
||||||
//卸货
|
//卸货
|
||||||
private static final String UNLOADING = "/app/driver/waybill/unloadV2";
|
private static final String UNLOADING="/app/driver/waybill/unloadV2";
|
||||||
//卸货-补传
|
|
||||||
private static final String UNLOADING4 = "/app/driver/waybill/unloadV4";
|
|
||||||
//上传回单
|
//上传回单
|
||||||
private static final String UPLOAD_RECEIPT = "/app/driver/waybill/uploadReceipt";
|
private static final String UPLOAD_RECEIPT="/app/driver/waybill/uploadReceipt";
|
||||||
//轨迹跟踪
|
//轨迹跟踪
|
||||||
private static final String TRACK_TRACKING = "/app/driver/waybill/addAppLocation";
|
private static final String TRACK_TRACKING="/app/driver/waybill/addAppLocation";
|
||||||
//获取评价信息
|
//获取评价信息
|
||||||
private static final String GET_EVALUATE = "/app/driver/waybill/listAppraises";
|
private static final String GET_EVALUATE="/app/driver/waybill/listAppraises";
|
||||||
//获取投诉信息
|
//获取投诉信息
|
||||||
private static final String GET_COMPLAINT = "/app/driver/waybill/listComplaint";
|
private static final String GET_COMPLAINT="/app/driver/waybill/listComplaint";
|
||||||
//保存投诉信息
|
//保存投诉信息
|
||||||
private static final String COMPLAINT = "/app/driver/waybill/complaintV2";
|
private static final String COMPLAINT="/app/driver/waybill/complaintV2";
|
||||||
//保存评价信息
|
//保存评价信息
|
||||||
private static final String EVALUATION_V2 = "/app/driver/waybill/evaluationV2";
|
private static final String EVALUATION_V2="/app/driver/waybill/evaluationV2";
|
||||||
private static final String GET_WAYBILL_STATUS = "/app/driver/waybill/getWaybillStatus";
|
|
||||||
private static final String GET_ORDER_STATUS = "/app/driver/order/getOrderStatus";
|
|
||||||
//车辆列表
|
//车辆列表
|
||||||
private static final String GET_CAR_LIST = "/app/carDriver/getCarList";
|
private static final String GET_CAR_LIST="/app/carDriver/getCarList";
|
||||||
//车辆详情
|
//车辆详情
|
||||||
private static final String GET_CAR_DEL = "/app/carDriver/getCarInfo";
|
private static final String GET_CAR_DEL="/app/carDriver/getCarInfo";
|
||||||
//删除车辆
|
//删除车辆
|
||||||
private static final String DEL_CAR = "/app/carDriver/unBindCar";
|
private static final String DEL_CAR="/app/carDriver/removeCar";
|
||||||
//上传车辆照片
|
//上传车辆照片
|
||||||
private static final String SAVECARIMG = "/app/carDriver/saveCarImg";
|
private static final String SAVECARIMG="/app/carDriver/saveCarImg";
|
||||||
//上传头像保存
|
//上传头像保存
|
||||||
private static final String UPLOAD_HEAD = "/app/user/uploadHeadportrait";
|
private static final String UPLOAD_HEAD="/app/user/uploadHeadportrait";
|
||||||
//获取上传失败的订单
|
//获取上传失败的订单
|
||||||
private static final String GET_ERROR_ORDER = "/app/driver/waybill/getAsymmetryWaybill";
|
private static final String GET_ERROR_ORDER="/app/driver/waybill/getAsymmetryWaybill";
|
||||||
//提现
|
//提现
|
||||||
private static final String TIXIAN = "/app/account/cashApply/bank/charge";
|
private static final String TIXIAN="/app/account/cashApply/bank/charge";
|
||||||
//--ORC识别--
|
//--ORC识别--
|
||||||
|
|
||||||
//银行卡识别
|
//银行卡识别
|
||||||
// private static final String ORC_BANK = "/common/ocr/bank";
|
private static final String ORC_BANK="/common/ocr/bank";
|
||||||
private static final String ORC_BANK = "sinoiov/ocr/getBankcardOCR";
|
|
||||||
//身份证正面
|
//身份证正面
|
||||||
// private static final String ID_CARD_FRONT = "/common/ocr/idCardFront";
|
private static final String ID_CARD_FRONT="/common/ocr/idCardFront";
|
||||||
private static final String ID_CARD_FRONT = "sinoiov/ocr/getIdCardLicenseV2";
|
|
||||||
//身份证识别反面
|
//身份证识别反面
|
||||||
private static final String ID_CARD_BACK = "/common/ocr/idCardBack";
|
private static final String ID_CARD_BACK="/common/ocr/idCardBack";
|
||||||
//驾驶证正面
|
//驾驶证正面
|
||||||
// private static final String DRIVING_LICENSE = "/common/ocr/drivingLicense";
|
private static final String DRIVING_LICENSE="/common/ocr/drivingLicense";
|
||||||
private static final String DRIVING_LICENSE = "sinoiov/ocr/getDrivingLicenseOCRV2";
|
|
||||||
//驾驶证副页
|
//驾驶证副页
|
||||||
private static final String DRIVING_LICENSE_BACK = "/common/ocr/drivingLicenseBack";
|
private static final String DRIVING_LICENSE_BACK="/common/ocr/drivingLicenseBack";
|
||||||
//行驶证正面
|
//行驶证正面
|
||||||
// private static final String VEHICLE_LICENSE = "/common/ocr/vehicleLicense";
|
private static final String VEHICLE_LICENSE="/common/ocr/vehicleLicense";
|
||||||
private static final String VEHICLE_LICENSE = "sinoiov/ocr/getVehicleLicenseOCRV2";
|
|
||||||
//行驶证副页
|
//行驶证副页
|
||||||
private static final String VEHICLE_LICENSE_BACK = "/common/ocr/v2/vehicleBackLicenseV3";
|
private static final String VEHICLE_LICENSE_BACK="/common/ocr/v2/vehicleBackLicenseV3";
|
||||||
//身份证认证信息
|
//身份证认证信息
|
||||||
private static final String ISAUTH_IDCARD = "/app/driver/auth/isAuthIdCard";
|
private static final String ISAUTH_IDCARD="/app/driver/auth/isAuthIdCard";
|
||||||
//驾驶证认证信息
|
//驾驶证认证信息
|
||||||
private static final String ISAUTH_DRIVERAUTH_LICENSE = "/app/driver/auth/isAuthDriverAuthLicense";
|
private static final String ISAUTH_DRIVERAUTH_LICENSE="/app/driver/auth/isAuthDriverAuthLicense";
|
||||||
//资格证认证信息
|
//资格证认证信息
|
||||||
private static final String IS_AUTH_DRIVER_AUTH_QUALIFICATION = "/app/driver/auth/isAuthDriverAuthQualification";
|
private static final String IS_AUTH_DRIVER_AUTH_QUALIFICATION="/app/driver/auth/isAuthDriverAuthQualification";
|
||||||
//行驶证认证信息
|
//行驶证认证信息
|
||||||
//身份证认证
|
//身份证认证
|
||||||
private static final String DRIVERAUTHIDCARD = "/app/driver/auth/driverAuthIdCard";
|
private static final String DRIVERAUTHIDCARD="/app/driver/auth/driverAuthIdCard";
|
||||||
//驾驶证认证
|
//驾驶证认证
|
||||||
private static final String DRIVERAUTHLICENSE = "/app/driver/auth/driverAuthLicense";
|
private static final String DRIVERAUTHLICENSE="/app/driver/auth/driverAuthLicense";
|
||||||
//行驶证认证
|
//行驶证认证
|
||||||
private static final String SAVEVEHICLELICENSE = "/app/carDriver/saveVehicleLicense";
|
private static final String SAVEVEHICLELICENSE="/app/carDriver/saveVehicleLicense";
|
||||||
// private static final String SAVEVEHICLELICENSE = "app/carDriver/save";
|
|
||||||
//从业资格证认证
|
//从业资格证认证
|
||||||
private static final String DRIVER_AUTH_QUALIFICATION = "/app/driver/auth/driverAuthQualification";
|
private static final String DRIVER_AUTH_QUALIFICATION="/app/driver/auth/driverAuthQualification";
|
||||||
//车辆等级证书
|
//车辆等级证书
|
||||||
private static final String DRIVER_AUTH_SAVECARREGISTERNO = "/app/carDriver/saveCarRegisterNo";
|
private static final String DRIVER_AUTH_SAVECARREGISTERNO="/app/carDriver/saveCarRegisterNo";
|
||||||
//道路运输信息
|
//道路运输信息
|
||||||
private static final String DRIVER_AUTH_SAVECARROADLICENSENO = "/app/carDriver/saveCarRoadLicenseNo";
|
private static final String DRIVER_AUTH_SAVECARROADLICENSENO="/app/carDriver/saveCarRoadLicenseNo";
|
||||||
|
|
||||||
//交强险
|
|
||||||
private static final String DRIVER_TRAFFIC_INSU = "/app/carDriver/saveCarInsurace";
|
|
||||||
//党员认证
|
//党员认证
|
||||||
private static final String PARTY_MEMBER = "/app/user/partyMember";
|
private static final String PARTY_MEMBER="/app/user/partyMember";
|
||||||
//实名认证
|
//实名认证
|
||||||
private static final String AUTH_URL = "/app/driver/auth/getAuthUrl";
|
private static final String AUTH_URL="/app/driver/auth/getAuthUrl";
|
||||||
//车牌号
|
//车牌号
|
||||||
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";
|
||||||
//提现记录
|
//提现记录
|
||||||
private static final String CHANGE_RECORD = "/app/account/change/record";
|
private static final String CHANGE_RECORD="/app/account/change/record";
|
||||||
|
|
||||||
//提现手续费
|
//提现手续费
|
||||||
private static final String WITHDRAWALS_CHARGE = "/app/account/withdrawals/charge";
|
private static final String WITHDRAWALS_CHARGE="/app/account/withdrawals/charge";
|
||||||
|
|
||||||
//提现配置信息
|
//提现配置信息
|
||||||
private static final String WITHDRAWALS_CONFIG = "/app/account/withdrawals/config";
|
private static final String WITHDRAWALS_CONFIG="/app/account/withdrawals/config";
|
||||||
|
|
||||||
//获取车辆颜色
|
//获取车辆颜色
|
||||||
private static final String CAR_COLOR = "/app/common/carColorTypeList";
|
private static final String CAR_COLOR="/app/common/carColorTypeList";
|
||||||
|
|
||||||
//获取车辆颜色
|
//获取车辆颜色
|
||||||
private static final String CAR_ENERGYTYPE = "/app/common/carEnergyTypeList";
|
private static final String CAR_ENERGYTYPE="/app/common/carEnergyTypeList";
|
||||||
|
|
||||||
//车辆自动审核触发器
|
//车辆自动审核触发器
|
||||||
private static final String CAR_AUDIT = "/app/carDriver/carAutomaticAudit";
|
private static final String CAR_AUDIT="/app/carDriver/carAutomaticAudit";
|
||||||
private static final String APP_INFO = "/common/app/logininfor";
|
|
||||||
|
|
||||||
public static String getCarAudit() {
|
public static String getCarAudit(){
|
||||||
return BASE_URL + CAR_AUDIT;
|
return BASE_URL +CAR_AUDIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String postAppInfo() {
|
public static String getCarColor(){
|
||||||
return BASE_URL + APP_INFO;
|
return BASE_URL +CAR_COLOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCarColor() {
|
public static String getCarEnergyType(){
|
||||||
return BASE_URL + CAR_COLOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getCarEnergyType() {
|
|
||||||
return BASE_URL + CAR_ENERGYTYPE;
|
return BASE_URL + CAR_ENERGYTYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//app/driver/auth/driverExpire
|
//app/driver/auth/driverExpire
|
||||||
public static final String GET_CERTIFICATE_EXPIRED = "/app/driver/auth/driverExpire";
|
public static final String GET_CERTIFICATE_EXPIRED="/app/driver/auth/driverExpire";
|
||||||
|
|
||||||
public static String getSendCodeUrl() {
|
public static String getSendCodeUrl() {
|
||||||
return BASE_URL + SEND_CODE;
|
return BASE_URL +SEND_CODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getREGUrl() {
|
public static String getREGUrl() {
|
||||||
return BASE_URL + REG;
|
return BASE_URL +REG;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getLoginUrl() {
|
public static String getLoginUrl() {
|
||||||
return BASE_URL + LOGIN;
|
return BASE_URL +LOGIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDriverAuthInfoUrl() {
|
public static String getDriverAuthInfoUrl() {
|
||||||
return BASE_URL + DRIVER_AUTH_INFO;
|
return BASE_URL +DRIVER_AUTH_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGoodsHallUrl() {
|
public static String getGoodsHallUrl() {
|
||||||
return BASE_URL + GOODS_HALL;
|
return BASE_URL +GOODS_HALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGoodsDelUrl() {
|
public static String getGoodsDelUrl() {
|
||||||
return BASE_URL + GOODS_DEL;
|
return BASE_URL +GOODS_DEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getUserUrl() {
|
public static String getUserUrl() {
|
||||||
@@ -226,251 +204,197 @@ public class RequestConstant {
|
|||||||
return BASE_URL + BANK_CARD_LIST;
|
return BASE_URL + BANK_CARD_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getXiaoXiListUrl() {
|
public static String getXiaoXiListUrl() { return BASE_URL + XIAOXI_LIST; }
|
||||||
return BASE_URL + XIAOXI_LIST;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getXiaoxiAll() {
|
public static String getXiaoxiAll() { return BASE_URL +XIAOXI_ALL; }
|
||||||
return BASE_URL + XIAOXI_ALL;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getOrderList() {
|
public static String getOrderList() {
|
||||||
return BASE_URL + ORDER_LIST;
|
return BASE_URL +ORDER_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getAgreeOrder() {
|
public static String getAgreeOrder() {
|
||||||
return BASE_URL + AGREE_ORDER;
|
return BASE_URL +AGREE_ORDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetStartOrder() {
|
public static String getGetStartOrder() {
|
||||||
return BASE_URL + GET_START_ORDER;
|
return BASE_URL +GET_START_ORDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetCarryContract() {
|
public static String getGetCarryContract() {
|
||||||
return BASE_URL + GET_CARRY_CONTRACT;
|
return BASE_URL +GET_CARRY_CONTRACT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getEVALUATIONV2() {
|
public static String getEVALUATIONV2() {
|
||||||
return BASE_URL + EVALUATIONV2;
|
return BASE_URL +EVALUATIONV2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getLOADING() {
|
public static String getLOADING() {
|
||||||
return BASE_URL + LOADING;
|
return BASE_URL +LOADING;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getUNLOADING() {
|
public static String getUNLOADING() {
|
||||||
return BASE_URL + UNLOADING;
|
return BASE_URL +UNLOADING;
|
||||||
}
|
|
||||||
|
|
||||||
public static String getUNLOADING4() {
|
|
||||||
return BASE_URL + UNLOADING4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetEvaluate() {
|
public static String getGetEvaluate() {
|
||||||
return BASE_URL + GET_EVALUATE;
|
return BASE_URL +GET_EVALUATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetComplaint() {
|
public static String getGetComplaint() {
|
||||||
return BASE_URL + GET_COMPLAINT;
|
return BASE_URL +GET_COMPLAINT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getOrcBank() {
|
public static String getOrcBank() {
|
||||||
return BASE_URL + ORC_BANK;
|
return BASE_URL +ORC_BANK;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getIdCardFront() {
|
public static String getIdCardFront() {
|
||||||
return BASE_URL + ID_CARD_FRONT;
|
return BASE_URL +ID_CARD_FRONT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getIdCardBack() {
|
public static String getIdCardBack() {
|
||||||
return BASE_URL + ID_CARD_BACK;
|
return BASE_URL +ID_CARD_BACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDrivingLicense() {
|
public static String getDrivingLicense() {
|
||||||
return BASE_URL + DRIVING_LICENSE;
|
return BASE_URL +DRIVING_LICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDrivingLicenseBack() {
|
public static String getDrivingLicenseBack() {
|
||||||
return BASE_URL + DRIVING_LICENSE_BACK;
|
return BASE_URL +DRIVING_LICENSE_BACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getVehicleLicense() {
|
public static String getVehicleLicense() {
|
||||||
return BASE_URL + VEHICLE_LICENSE;
|
return BASE_URL +VEHICLE_LICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getVehicleLicenseBack() {
|
public static String getVehicleLicenseBack() {
|
||||||
return BASE_URL + VEHICLE_LICENSE_BACK;
|
return BASE_URL +VEHICLE_LICENSE_BACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetCarList() {
|
public static String getGetCarList() {
|
||||||
return BASE_URL + GET_CAR_LIST;
|
return BASE_URL +GET_CAR_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetCarDel() {
|
public static String getGetCarDel() {
|
||||||
return BASE_URL + GET_CAR_DEL;
|
return BASE_URL +GET_CAR_DEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCodeData() {
|
public static String getCodeData() {
|
||||||
return BASE_URL + CODE_DATA;
|
return BASE_URL +CODE_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getIsauthIdcard() {
|
public static String getIsauthIdcard() {
|
||||||
return BASE_URL + ISAUTH_IDCARD;
|
return BASE_URL +ISAUTH_IDCARD;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getIsauthDriverauthLicense() {
|
public static String getIsauthDriverauthLicense() { return BASE_URL +ISAUTH_DRIVERAUTH_LICENSE; }
|
||||||
return BASE_URL + ISAUTH_DRIVERAUTH_LICENSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getUploadReceipt() {
|
public static String getUploadReceipt() { return BASE_URL +UPLOAD_RECEIPT; }
|
||||||
return BASE_URL + UPLOAD_RECEIPT;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getUPLOAD() {
|
public static String getUPLOAD() { return BASE_URL +UPLOAD; }
|
||||||
return BASE_URL + UPLOAD;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getTrackTracking() {
|
public static String getTrackTracking() {return BASE_URL +TRACK_TRACKING; }
|
||||||
return BASE_URL + TRACK_TRACKING;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getEvaluationV2() {
|
public static String getEvaluationV2() { return BASE_URL +EVALUATION_V2; }
|
||||||
return BASE_URL + EVALUATION_V2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getGetWaybillStatus() {
|
|
||||||
return BASE_URL + GET_WAYBILL_STATUS;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getGetOrderStatus() {
|
|
||||||
return BASE_URL + GET_ORDER_STATUS;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getDRIVERAUTHIDCARD() {
|
public static String getDRIVERAUTHIDCARD() {
|
||||||
return BASE_URL + DRIVERAUTHIDCARD;
|
return BASE_URL +DRIVERAUTHIDCARD;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDRIVERAUTHLICENSE() {
|
public static String getDRIVERAUTHLICENSE() {
|
||||||
return BASE_URL + DRIVERAUTHLICENSE;
|
return BASE_URL +DRIVERAUTHLICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getSAVEVEHICLELICENSE() {
|
public static String getSAVEVEHICLELICENSE() {
|
||||||
return BASE_URL + SAVEVEHICLELICENSE;
|
return BASE_URL +SAVEVEHICLELICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getSAVECARIMG() {
|
public static String getSAVECARIMG() {
|
||||||
return BASE_URL + SAVECARIMG;
|
return BASE_URL +SAVECARIMG;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getUploadHead() {
|
public static String getUploadHead() { return BASE_URL +UPLOAD_HEAD; }
|
||||||
return BASE_URL + UPLOAD_HEAD;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getInsBankcard() {
|
public static String getInsBankcard() {
|
||||||
return BASE_URL + INS_BANKCARD;
|
return BASE_URL +INS_BANKCARD;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDelCar() {
|
public static String getDelCar() { return BASE_URL +DEL_CAR; }
|
||||||
return BASE_URL + DEL_CAR;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getXiaoxiDel() {
|
public static String getXiaoxiDel() { return BASE_URL +XIAOXI_DEL; }
|
||||||
return BASE_URL + XIAOXI_DEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getCOMPLAINT() {
|
public static String getCOMPLAINT() { return BASE_URL+COMPLAINT; }
|
||||||
return BASE_URL + COMPLAINT;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getXiaoxiDelAll() {
|
public static String getXiaoxiDelAll() { return BASE_URL+XIAOXI_DEL_ALL; }
|
||||||
return BASE_URL + XIAOXI_DEL_ALL;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getDriverAuthQualification() {
|
public static String getDriverAuthQualification() { return BASE_URL+DRIVER_AUTH_QUALIFICATION; }
|
||||||
return BASE_URL + DRIVER_AUTH_QUALIFICATION;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getDriverSaveCarRegisterNo() {
|
public static String getDriverSaveCarRegisterNo() { return BASE_URL+DRIVER_AUTH_SAVECARREGISTERNO; }
|
||||||
return BASE_URL + DRIVER_AUTH_SAVECARREGISTERNO;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getDriverSaveCarRoadLicenseNo() {
|
public static String getDriverSaveCarRoadLicenseNo() { return BASE_URL+DRIVER_AUTH_SAVECARROADLICENSENO; }
|
||||||
return BASE_URL + DRIVER_AUTH_SAVECARROADLICENSENO;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getTrafficInsurance() {
|
public static String getSaveDrawCar() { return BASE_URL+SAVE_DRAW_CAR; }
|
||||||
return BASE_URL + DRIVER_TRAFFIC_INSU;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getSaveDrawCar() {
|
|
||||||
return BASE_URL + SAVE_DRAW_CAR;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getIsAuthDriverAuthQualification() {
|
public static String getIsAuthDriverAuthQualification() {
|
||||||
return BASE_URL + IS_AUTH_DRIVER_AUTH_QUALIFICATION;
|
return BASE_URL+IS_AUTH_DRIVER_AUTH_QUALIFICATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getVERSION() {
|
public static String getVERSION() {
|
||||||
return BASE_URL + VERSION;
|
return BASE_URL+VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getAddContracts() {
|
public static String getAddContracts() {
|
||||||
return BASE_URL + ADD_CONTRACTS;
|
return BASE_URL+ADD_CONTRACTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetContracts() {
|
public static String getGetContracts() {
|
||||||
return BASE_URL + GET_CONTRACTS;
|
return BASE_URL+GET_CONTRACTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getTIXIAN() {
|
public static String getTIXIAN() {
|
||||||
return BASE_URL + TIXIAN;
|
return BASE_URL+TIXIAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getPartyMember() {
|
public static String getPartyMember() {
|
||||||
return BASE_URL + PARTY_MEMBER;
|
return BASE_URL+PARTY_MEMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCONFIG() {
|
public static String getCONFIG() {
|
||||||
return BASE_URL + CONFIG;
|
return BASE_URL+CONFIG;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getChangeRecord() {
|
public static String getChangeRecord() {
|
||||||
return BASE_URL + CHANGE_RECORD;
|
return BASE_URL+CHANGE_RECORD;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getChangeCharge() {
|
public static String getChangeCharge() {
|
||||||
return BASE_URL + WITHDRAWALS_CHARGE;
|
return BASE_URL+WITHDRAWALS_CHARGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getChangeConfig() {
|
public static String getChangeConfig() {
|
||||||
return BASE_URL + WITHDRAWALS_CONFIG;
|
return BASE_URL+WITHDRAWALS_CONFIG;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetErrorOrder() {
|
public static String getGetErrorOrder() { return BASE_URL+GET_ERROR_ORDER; }
|
||||||
return BASE_URL + GET_ERROR_ORDER;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getGetExampleList() {
|
public static String getGetExampleList() {
|
||||||
return BASE_URL + GET_EXAMPLE_LIST;
|
return BASE_URL+GET_EXAMPLE_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getAuthUrl() {
|
public static String getAuthUrl() {
|
||||||
return BASE_URL + AUTH_URL;
|
return BASE_URL+AUTH_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getPlateLicense() {
|
public static String getPlateLicense() {
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetCertificateExpired() {
|
public static String getGetCertificateExpired() {
|
||||||
return BASE_URL + GET_CERTIFICATE_EXPIRED;
|
return BASE_URL+GET_CERTIFICATE_EXPIRED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import android.provider.Settings;
|
|||||||
|
|
||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.AppInfoBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.business.Md5Util;
|
import com.arpa.hndahesudintocctmsdriver.ui.business.Md5Util;
|
||||||
@@ -80,12 +79,6 @@ public class UserRequset {
|
|||||||
RequestUtil.start(1, "userdata", re, con, hd);
|
RequestUtil.start(1, "userdata", re, con, hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//账户信息
|
|
||||||
public void User2() {
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUserUrl(), ""), getToken(con), con);
|
|
||||||
RequestUtil.start(1, "userdata2", re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//司机认证信息
|
//司机认证信息
|
||||||
public void driverAuthData() {
|
public void driverAuthData() {
|
||||||
String mt = "{}";
|
String mt = "{}";
|
||||||
@@ -125,14 +118,6 @@ public class UserRequset {
|
|||||||
RequestUtil.start(1, WoDeFragment.VEHICLE_DEL, re, con, hd);
|
RequestUtil.start(1, WoDeFragment.VEHICLE_DEL, re, con, hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//车辆详情
|
|
||||||
public void vehicleDelTwo(String id) {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("carId", id);
|
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetCarDel(), MapUtil.mapJson(map)), getToken(con), con);
|
|
||||||
RequestUtil.start(1, "onlyGetDetail", re, con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//司机身份证认证
|
//司机身份证认证
|
||||||
public void driverIDAuth() {
|
public void driverIDAuth() {
|
||||||
String url = RequestConstant.BASE_URL + "/app/driver/auth/authInfo";
|
String url = RequestConstant.BASE_URL + "/app/driver/auth/authInfo";
|
||||||
@@ -169,7 +154,7 @@ public class UserRequset {
|
|||||||
/**
|
/**
|
||||||
* 判断是否开启未知应用安装权限
|
* 判断是否开启未知应用安装权限
|
||||||
*/
|
*/
|
||||||
private void isOpenAppNoRe() {
|
private void isOpenAppNoRe(){
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
boolean b = con.getPackageManager().canRequestPackageInstalls();
|
boolean b = con.getPackageManager().canRequestPackageInstalls();
|
||||||
if (!b) {
|
if (!b) {
|
||||||
@@ -184,8 +169,8 @@ public class UserRequset {
|
|||||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||||
private void startInstallPermissionSettingActivity() {
|
private void startInstallPermissionSettingActivity() {
|
||||||
//注意这个是8.0新API
|
//注意这个是8.0新API
|
||||||
Uri packageURI = Uri.parse("package:" + con.getPackageName());
|
Uri packageURI = Uri.parse("package:" +con.getPackageName());
|
||||||
Intent intent = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES, packageURI);
|
Intent intent = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES,packageURI);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
con.startActivity(intent);
|
con.startActivity(intent);
|
||||||
}
|
}
|
||||||
@@ -236,18 +221,7 @@ public class UserRequset {
|
|||||||
public void carAudit(String carId) {
|
public void carAudit(String carId) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("carId", carId);
|
map.put("carId", carId);
|
||||||
Request re = OkHttpUtil.get(new OkDate(RequestConstant.getCarAudit(), "get", Md5Util.resNoUrl(map)), getToken(con));
|
Request re = OkHttpUtil.get(new OkDate(RequestConstant.getCarAudit(),"get", Md5Util.resNoUrl(map)),getToken(con));
|
||||||
RequestUtil.start(1, VehicleAuthActivity.CAR_AUDIO, re, con, hd);
|
RequestUtil.start(1, VehicleAuthActivity.CAR_AUDIO, re, con, hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void postAppInfo(AppInfoBean appInfoBean, String type) {
|
|
||||||
// Request re = OkHttpUtil.get(new OkDate(RequestConstant.getCarAudit(),"get", gson.toJson(appInfoBean)),getToken(con));
|
|
||||||
Request re;
|
|
||||||
if ("put".equals(type)) {
|
|
||||||
re = OkHttpUtil.put(new OkDate(RequestConstant.postAppInfo(), type, gson.toJson(appInfoBean)), con);
|
|
||||||
} else {
|
|
||||||
re = OkHttpUtil.post(new OkDate(RequestConstant.postAppInfo(), type, gson.toJson(appInfoBean)), con);
|
|
||||||
}
|
|
||||||
RequestUtil.start(1, VehicleAuthActivity.APP_INFO, re, con, hd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,15 +15,6 @@ public class LUInputBean {
|
|||||||
private String locationAddress;
|
private String locationAddress;
|
||||||
private String longitude;
|
private String longitude;
|
||||||
private String waybillId;
|
private String waybillId;
|
||||||
private String realLoadTime;
|
|
||||||
|
|
||||||
public String getRealLoadTime() {
|
|
||||||
return realLoadTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRealLoadTime(String realLoadTime) {
|
|
||||||
this.realLoadTime = realLoadTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Integer> getImageId() {
|
public List<Integer> getImageId() {
|
||||||
return imageId;
|
return imageId;
|
||||||
|
|||||||
-115
@@ -16,123 +16,8 @@ public class LicenseInputBean {
|
|||||||
private int driverLicensePhoto;
|
private int driverLicensePhoto;
|
||||||
private String endTime;
|
private String endTime;
|
||||||
private String firstTime;
|
private String firstTime;
|
||||||
private String address;
|
|
||||||
private String quasiDriveType;
|
|
||||||
private String beginDate;
|
|
||||||
private String endDate;
|
|
||||||
private String fileNumber;
|
|
||||||
private String issuingAuthority;
|
|
||||||
private String sex;
|
|
||||||
private String name;
|
|
||||||
private String idcard;
|
|
||||||
private String organizationName;
|
|
||||||
private String startTime;
|
|
||||||
private String birthday;
|
|
||||||
private String country;
|
|
||||||
|
|
||||||
public String getBirthday() {
|
|
||||||
return birthday;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBirthday(String birthday) {
|
|
||||||
this.birthday = birthday;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCountry() {
|
|
||||||
return country;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCountry(String country) {
|
|
||||||
this.country = country;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStartTime() {
|
|
||||||
return startTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStartTime(String startTime) {
|
|
||||||
this.startTime = startTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOrganizationName() {
|
|
||||||
return organizationName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrganizationName(String organizationName) {
|
|
||||||
this.organizationName = organizationName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddress() {
|
|
||||||
return address;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAddress(String address) {
|
|
||||||
this.address = address;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getQuasiDriveType() {
|
|
||||||
return quasiDriveType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQuasiDriveType(String quasiDriveType) {
|
|
||||||
this.quasiDriveType = quasiDriveType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBeginDate() {
|
|
||||||
return beginDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBeginDate(String beginDate) {
|
|
||||||
this.beginDate = beginDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEndDate() {
|
|
||||||
return endDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEndDate(String endDate) {
|
|
||||||
this.endDate = endDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileNumber() {
|
|
||||||
return fileNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileNumber(String fileNumber) {
|
|
||||||
this.fileNumber = fileNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIssuingAuthority() {
|
|
||||||
return issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssuingAuthority(String issuingAuthority) {
|
|
||||||
this.issuingAuthority = issuingAuthority;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSex() {
|
|
||||||
return sex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSex(String sex) {
|
|
||||||
this.sex = sex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIdcard() {
|
|
||||||
return idcard;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIdcard(String idcard) {
|
|
||||||
this.idcard = idcard;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAllowType() {
|
public String getAllowType() {
|
||||||
return allowType;
|
return allowType;
|
||||||
|
|||||||
-40
@@ -1,40 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request.bean.newlj;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName InvoiceBean
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/25 17:06
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class InvoiceBean implements Serializable {
|
|
||||||
private String driverIdentification;
|
|
||||||
private String driverInvoiceCode;
|
|
||||||
private String enterpriseCode;
|
|
||||||
|
|
||||||
|
|
||||||
public String getDriverIdentification() {
|
|
||||||
return driverIdentification;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDriverIdentification(String driverIdentification) {
|
|
||||||
this.driverIdentification = driverIdentification;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDriverInvoiceCode() {
|
|
||||||
return driverInvoiceCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDriverInvoiceCode(String driverInvoiceCode) {
|
|
||||||
this.driverInvoiceCode = driverInvoiceCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEnterpriseCode() {
|
|
||||||
return enterpriseCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnterpriseCode(String enterpriseCode) {
|
|
||||||
this.enterpriseCode = enterpriseCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-135
@@ -1,135 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request.bean.newlj;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName InvoicesBean
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/29 13:08
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class InvoicesBean implements Serializable {
|
|
||||||
private String totalPage;
|
|
||||||
private String totalCount;
|
|
||||||
private String pageSize;
|
|
||||||
private String currentPage;
|
|
||||||
private String sortField;
|
|
||||||
private String sortDirection;
|
|
||||||
private List<DataDTO> driverInvoices;
|
|
||||||
|
|
||||||
public String getTotalPage() {
|
|
||||||
return totalPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalPage(String totalPage) {
|
|
||||||
this.totalPage = totalPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTotalCount() {
|
|
||||||
return totalCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalCount(String totalCount) {
|
|
||||||
this.totalCount = totalCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPageSize() {
|
|
||||||
return pageSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPageSize(String pageSize) {
|
|
||||||
this.pageSize = pageSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCurrentPage() {
|
|
||||||
return currentPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCurrentPage(String currentPage) {
|
|
||||||
this.currentPage = currentPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSortField() {
|
|
||||||
return sortField;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSortField(String sortField) {
|
|
||||||
this.sortField = sortField;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSortDirection() {
|
|
||||||
return sortDirection;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSortDirection(String sortDirection) {
|
|
||||||
this.sortDirection = sortDirection;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<DataDTO> getDriverInvoices() {
|
|
||||||
return driverInvoices;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDriverInvoices(List<DataDTO> driverInvoices) {
|
|
||||||
this.driverInvoices = driverInvoices;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class DataDTO{
|
|
||||||
|
|
||||||
private String taxAmount;
|
|
||||||
private String totalAmount;
|
|
||||||
private String invoiceReceiverName;
|
|
||||||
private String totalAmountIncludeTax;
|
|
||||||
private String driverInvoiceCode;
|
|
||||||
private String taxRate;
|
|
||||||
|
|
||||||
|
|
||||||
public String getTaxAmount() {
|
|
||||||
return taxAmount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTaxAmount(String taxAmount) {
|
|
||||||
this.taxAmount = taxAmount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTotalAmount() {
|
|
||||||
return totalAmount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalAmount(String totalAmount) {
|
|
||||||
this.totalAmount = totalAmount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInvoiceReceiverName() {
|
|
||||||
return invoiceReceiverName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInvoiceReceiverName(String invoiceReceiverName) {
|
|
||||||
this.invoiceReceiverName = invoiceReceiverName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTotalAmountIncludeTax() {
|
|
||||||
return totalAmountIncludeTax;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalAmountIncludeTax(String totalAmountIncludeTax) {
|
|
||||||
this.totalAmountIncludeTax = totalAmountIncludeTax;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDriverInvoiceCode() {
|
|
||||||
return driverInvoiceCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDriverInvoiceCode(String driverInvoiceCode) {
|
|
||||||
this.driverInvoiceCode = driverInvoiceCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTaxRate() {
|
|
||||||
return taxRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTaxRate(String taxRate) {
|
|
||||||
this.taxRate = taxRate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-41
@@ -1,41 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request.bean.newlj;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName LjTokenBean
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/25 10:05
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class LjTokenBean implements Serializable {
|
|
||||||
|
|
||||||
|
|
||||||
private String enterpriseCode;
|
|
||||||
private String enterpriseIdentity;
|
|
||||||
private String enterpriseKey;
|
|
||||||
|
|
||||||
public String getEnterpriseCode() {
|
|
||||||
return enterpriseCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnterpriseCode(String enterpriseCode) {
|
|
||||||
this.enterpriseCode = enterpriseCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEnterpriseIdentity() {
|
|
||||||
return enterpriseIdentity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnterpriseIdentity(String enterpriseIdentity) {
|
|
||||||
this.enterpriseIdentity = enterpriseIdentity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEnterpriseKey() {
|
|
||||||
return enterpriseKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnterpriseKey(String enterpriseKey) {
|
|
||||||
this.enterpriseKey = enterpriseKey;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-109
@@ -1,109 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request.bean.newlj;
|
|
||||||
|
|
||||||
import com.alct.mdp.model.Location;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.GDLocation;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName PickupBean
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/25 10:19
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class PickupBean implements Serializable {
|
|
||||||
|
|
||||||
private String shipmentCode;
|
|
||||||
private String enterpriseCode;
|
|
||||||
private GDLocation location;
|
|
||||||
|
|
||||||
public String getShipmentCode() {
|
|
||||||
return shipmentCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShipmentCode(String shipmentCode) {
|
|
||||||
this.shipmentCode = shipmentCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEnterpriseCode() {
|
|
||||||
return enterpriseCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnterpriseCode(String enterpriseCode) {
|
|
||||||
this.enterpriseCode = enterpriseCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GDLocation getLocation() {
|
|
||||||
return location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLocation(GDLocation location) {
|
|
||||||
this.location = location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class LocationDTO {
|
|
||||||
private String time;
|
|
||||||
private double baiduLatitude;
|
|
||||||
private double baiduLongitude;
|
|
||||||
private double altitude;
|
|
||||||
private double speed;
|
|
||||||
private double bearing;
|
|
||||||
private String location;
|
|
||||||
|
|
||||||
public String getTime() {
|
|
||||||
return time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTime(String time) {
|
|
||||||
this.time = time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getBaiduLatitude() {
|
|
||||||
return baiduLatitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBaiduLatitude(double baiduLatitude) {
|
|
||||||
this.baiduLatitude = baiduLatitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getBaiduLongitude() {
|
|
||||||
return baiduLongitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBaiduLongitude(double baiduLongitude) {
|
|
||||||
this.baiduLongitude = baiduLongitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getAltitude() {
|
|
||||||
return altitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAltitude(double altitude) {
|
|
||||||
this.altitude = altitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getSpeed() {
|
|
||||||
return speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSpeed(double speed) {
|
|
||||||
this.speed = speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getBearing() {
|
|
||||||
return bearing;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBearing(double bearing) {
|
|
||||||
this.bearing = bearing;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLocation() {
|
|
||||||
return location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLocation(String location) {
|
|
||||||
this.location = location;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-31
@@ -1,31 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request.bean.newlj;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName ShipmentStatusBean
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/25 17:16
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class ShipmentStatusBean implements Serializable {
|
|
||||||
private String shipmentCode;
|
|
||||||
private String enterpriseCode;
|
|
||||||
|
|
||||||
|
|
||||||
public String getShipmentCode() {
|
|
||||||
return shipmentCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShipmentCode(String shipmentCode) {
|
|
||||||
this.shipmentCode = shipmentCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEnterpriseCode() {
|
|
||||||
return enterpriseCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnterpriseCode(String enterpriseCode) {
|
|
||||||
this.enterpriseCode = enterpriseCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-118
@@ -1,118 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request.bean.newlj;
|
|
||||||
|
|
||||||
import com.alct.mdp.model.Image;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.GDImage;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName UpimgBean
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/25 14:36
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class UpimgBean implements Serializable {
|
|
||||||
|
|
||||||
private String shipmentCode;
|
|
||||||
private String enterpriseCode;
|
|
||||||
private GDImage image;
|
|
||||||
|
|
||||||
public String getShipmentCode() {
|
|
||||||
return shipmentCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShipmentCode(String shipmentCode) {
|
|
||||||
this.shipmentCode = shipmentCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEnterpriseCode() {
|
|
||||||
return enterpriseCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnterpriseCode(String enterpriseCode) {
|
|
||||||
this.enterpriseCode = enterpriseCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GDImage getImage() {
|
|
||||||
return image;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setImage(GDImage image) {
|
|
||||||
this.image = image;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class ImageDTO {
|
|
||||||
private String fileName;
|
|
||||||
private String fileExt;
|
|
||||||
private double baiduLongitude;
|
|
||||||
private double baiduLatitude;
|
|
||||||
private String location;
|
|
||||||
private String imageTakenDate;
|
|
||||||
private String time;
|
|
||||||
private String fileData;
|
|
||||||
|
|
||||||
public String getFileName() {
|
|
||||||
return fileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileName(String fileName) {
|
|
||||||
this.fileName = fileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileExt() {
|
|
||||||
return fileExt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileExt(String fileExt) {
|
|
||||||
this.fileExt = fileExt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getBaiduLongitude() {
|
|
||||||
return baiduLongitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBaiduLongitude(double baiduLongitude) {
|
|
||||||
this.baiduLongitude = baiduLongitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getBaiduLatitude() {
|
|
||||||
return baiduLatitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBaiduLatitude(double baiduLatitude) {
|
|
||||||
this.baiduLatitude = baiduLatitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLocation() {
|
|
||||||
return location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLocation(String location) {
|
|
||||||
this.location = location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getImageTakenDate() {
|
|
||||||
return imageTakenDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setImageTakenDate(String imageTakenDate) {
|
|
||||||
this.imageTakenDate = imageTakenDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTime() {
|
|
||||||
return time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTime(String time) {
|
|
||||||
this.time = time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileData() {
|
|
||||||
return fileData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileData(String fileData) {
|
|
||||||
this.fileData = fileData;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -4,23 +4,11 @@ package com.arpa.hndahesudintocctmsdriver.request.net;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.UserBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.UserBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.LoginRegInputBean;
|
import com.arpa.hndahesudintocctmsdriver.request.bean.LoginRegInputBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.InvoiceBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.InvoicesBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.LjTokenBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.PickupBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.ShipmentStatusBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.UpimgBean;
|
|
||||||
import com.dahe.mylibrary.net.CommonResponseBean;
|
import com.dahe.mylibrary.net.CommonResponseBean;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import io.reactivex.rxjava3.core.Observable;
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.GET;
|
|
||||||
import retrofit2.http.POST;
|
import retrofit2.http.POST;
|
||||||
import retrofit2.http.PUT;
|
|
||||||
import retrofit2.http.Path;
|
|
||||||
import retrofit2.http.Query;
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,128 +17,14 @@ import retrofit2.http.Query;
|
|||||||
|
|
||||||
public interface Api {
|
public interface Api {
|
||||||
|
|
||||||
String BASE_URL = BuildConfig.isTest? "http://api.kehui56.cn/api/v1/":"https://api.kehui56.com/api/v1/";
|
String BASE_URL = BuildConfig.BASE_URL;
|
||||||
|
|
||||||
|
|
||||||
//获取版本
|
//获取版本
|
||||||
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);
|
||||||
|
|
||||||
@POST(BASE_URL+"openapi/enterprises/login")
|
|
||||||
Observable<CommonResponseBean> getToken(@Body LjTokenBean bean);
|
|
||||||
|
|
||||||
@POST(BASE_URL+"openapi/enterprises/login")
|
|
||||||
Call<HashMap<String, String>> getRefreshToken(@Body LjTokenBean bean);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 刷新token
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@POST(BASE_URL+"openapi/enterprises/refresh-token/{refreshToken}")
|
|
||||||
Observable<CommonResponseBean> refreshToken(@Path("refreshToken") String refreshToken);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运单提货
|
|
||||||
* @param bean
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@POST(BASE_URL+"openapi/shipments/pickup")
|
|
||||||
Observable<CommonResponseBean> pickup(@Body PickupBean bean);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运单卸货
|
|
||||||
* @param bean
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@POST(BASE_URL+"openapi/shipments/unload")
|
|
||||||
Observable<CommonResponseBean> unload(@Body PickupBean bean);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运单签收
|
|
||||||
* @param bean
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@POST(BASE_URL+"openapi/shipments/sign")
|
|
||||||
Observable<CommonResponseBean> sign(@Body PickupBean bean);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运单回单
|
|
||||||
* @param bean
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@POST(BASE_URL+"openapi/shipments/pod")
|
|
||||||
Observable<CommonResponseBean> pod(@Body PickupBean bean);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运单提货照片上传
|
|
||||||
* @param bean
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@POST(BASE_URL+"openapi/shipments/uploadPickupImage")
|
|
||||||
Observable<CommonResponseBean> uploadPickupImage(@Body UpimgBean bean);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运单卸货照片上传
|
|
||||||
* @param bean
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@POST(BASE_URL+"openapi/shipments/uploadUnloadImage")
|
|
||||||
Observable<CommonResponseBean> uploadUnloadImage(@Body UpimgBean bean);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运单回单照片上传
|
|
||||||
* @param bean
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@POST(BASE_URL+"openapi/shipments/uploadPODImage")
|
|
||||||
Observable<CommonResponseBean> uploadPODImage(@Body UpimgBean bean);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 同意发票申请
|
|
||||||
* @param bean
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PUT(BASE_URL+"openapi/confirmInvoice")
|
|
||||||
Observable<CommonResponseBean> confirmInvoice(@Body InvoiceBean bean);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 待同意发票列表获取
|
|
||||||
* @param enterpriseCodeParam
|
|
||||||
* @param driverIdentification
|
|
||||||
* @param currentPage
|
|
||||||
* @param pageSize
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GET(BASE_URL+"openapi/getInvoices")
|
|
||||||
Observable<CommonResponseBean<InvoicesBean>> getInvoices(@Query("enterpriseCodeParam") String enterpriseCodeParam,
|
|
||||||
@Query("driverIdentification") String driverIdentification,
|
|
||||||
@Query("currentPage") int currentPage,
|
|
||||||
@Query("pageSize") int pageSize);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取运单状态
|
|
||||||
* @param bean
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@POST(BASE_URL+"/openapi/getShipmentStatus")
|
|
||||||
Observable<CommonResponseBean> getShipmentStatus(@Body ShipmentStatusBean bean);
|
|
||||||
|
|
||||||
@POST(BASE_URL+"/openapi/shipments/getPODImageNames")
|
|
||||||
Observable<CommonResponseBean> getPODImageNames(@Body ShipmentStatusBean bean);
|
|
||||||
|
|
||||||
|
|
||||||
@GET(BASE_URL+"/openapi/drivers")
|
|
||||||
Observable<CommonResponseBean> searchDriver(@Query("identityNo") String identityNo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,114 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request.net
|
|
||||||
|
|
||||||
import okhttp3.Interceptor
|
|
||||||
import okhttp3.Request
|
|
||||||
import okio.IOException
|
|
||||||
import retrofit2.Response
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName ApiInterceptor
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/11/29 17:05
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
class ApiInterceptor : Interceptor {
|
|
||||||
|
|
||||||
// 需要验证token的接口的路径集合
|
|
||||||
// private val checkTokenInterface = arrayListOf(
|
|
||||||
// "/example/user/info,
|
|
||||||
// "/example/user/info/edit"
|
|
||||||
// )
|
|
||||||
|
|
||||||
// 是否正在刷新token
|
|
||||||
// 使用AtomicBoolean,确保多线程中获取的值一致
|
|
||||||
// private var refreshingToken = AtomicBoolean(false)
|
|
||||||
//
|
|
||||||
// private val authHeaderKey = "token-key"
|
|
||||||
//
|
|
||||||
// // 当前token
|
|
||||||
// private var currentToken = "tokenValue"
|
|
||||||
|
|
||||||
// override fun intercept(chain: Interceptor.Chain): Response {
|
|
||||||
// 根据接口路径判断是否需要验证token
|
|
||||||
// val checkToken = checkTokenInterface.contains(chain.request().url.encodedPath)
|
|
||||||
// // 需要验证token则添加请求头,不需要则保持原样
|
|
||||||
// var request = if (checkToken) {
|
|
||||||
// chain.request().newBuilder()
|
|
||||||
// .addHeader(authHeaderKey, currentToken)
|
|
||||||
// .build()
|
|
||||||
// } else {
|
|
||||||
// chain.request()
|
|
||||||
// }
|
|
||||||
// // 获取响应
|
|
||||||
// var response = chain.proceed(request)
|
|
||||||
// if (checkToken) {
|
|
||||||
// // 需要验证token,处理响应,判断token是否过期
|
|
||||||
// response.body?.let { responseBody ->
|
|
||||||
// try {
|
|
||||||
// if (判断token过期的条件) {
|
|
||||||
// runBlocking {
|
|
||||||
// // 请求头中的token与currentToken仍然一样则需要刷新token
|
|
||||||
// // 确保多线程中不会重复刷新
|
|
||||||
// if (request.header(authHeaderKey) == currentToken){
|
|
||||||
// // 标记为正在刷新token
|
|
||||||
// if (refreshingToken.compareAndSet(false, true)) {
|
|
||||||
// refreshToken(chain).takeIf { it.isNotEmpty() && it.isNotBlank() }?.let { newToken ->
|
|
||||||
// // 保存newToken
|
|
||||||
// currentToken = newToken
|
|
||||||
// }
|
|
||||||
// // 标记为刷新token已结束
|
|
||||||
// refreshingToken.set(false)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// // async{}.await()会等待方法块内的代码执行完毕。
|
|
||||||
// // 等到refreshingToken为false时才会执行后续代码。
|
|
||||||
// if (async { stopRefreshingToken() }.await()) {
|
|
||||||
// // 携带newToken执行原请求获取响应
|
|
||||||
// response = chain.proceed(chain.request().newBuilder()
|
|
||||||
// .addHeader(authHeaderKey, currentToken)
|
|
||||||
// .build())
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } catch (e: Exception) {
|
|
||||||
// e.printStackTrace()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// // 返回最终的响应结果。
|
|
||||||
// // 刷新token也可能失败,此时返回原响应,可以让用户重新登录。
|
|
||||||
// return response
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private fun refreshToken(chain: Interceptor.Chain): String {
|
|
||||||
// // 创建刷新token的请求
|
|
||||||
// val refreshTokenRequest = Request.Builder()
|
|
||||||
// .url("refresh token url")
|
|
||||||
// .addHeader(authHeaderKey, currentToken)
|
|
||||||
// .get()
|
|
||||||
// .build()
|
|
||||||
// return try {
|
|
||||||
// // 获取响应并解析获得新token
|
|
||||||
// val refreshTokenResponse = chain.proceed(refreshTokenRequest)
|
|
||||||
// refreshTokenResponse.token
|
|
||||||
// } catch (e: IOException) {
|
|
||||||
// // 失败时返回空字符串
|
|
||||||
// ""
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private suspend fun stopRefreshingToken(): Boolean {
|
|
||||||
// return if (refreshingToken.get()) {
|
|
||||||
// // 仍在刷新token中,延迟1秒后再次执行此方法
|
|
||||||
// delay(1000)
|
|
||||||
// stopRefreshingToken()
|
|
||||||
// } else {
|
|
||||||
// true
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
override fun intercept(chain: Interceptor.Chain): okhttp3.Response {
|
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ public class BaseObserver<T> implements Observer<CommonResponseBean<T>> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(CommonResponseBean<T> tCommonResponseBean) {
|
public void onNext(CommonResponseBean<T> tCommonResponseBean) {
|
||||||
if ("0".equals(tCommonResponseBean.getCode())) {
|
if (200==tCommonResponseBean.getCode()) {
|
||||||
mRxHttpCallBack.onSuccess(tCommonResponseBean);
|
mRxHttpCallBack.onSuccess(tCommonResponseBean);
|
||||||
} else {
|
} else {
|
||||||
mRxHttpCallBack.onCodeError(mContext, tCommonResponseBean);
|
mRxHttpCallBack.onCodeError(mContext, tCommonResponseBean);
|
||||||
|
|||||||
+5
-4
@@ -2,6 +2,7 @@ package com.arpa.hndahesudintocctmsdriver.request.net;
|
|||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
import com.dahe.mylibrary.net.JsonUtils;
|
import com.dahe.mylibrary.net.JsonUtils;
|
||||||
import com.dahe.mylibrary.utils.MD5Utils;
|
import com.dahe.mylibrary.utils.MD5Utils;
|
||||||
import com.dahe.mylibrary.utils.StringUtils;
|
import com.dahe.mylibrary.utils.StringUtils;
|
||||||
@@ -70,7 +71,7 @@ public class CreateJsonUtils {
|
|||||||
map.put("api_key", "xccdb-power-bank");
|
map.put("api_key", "xccdb-power-bank");
|
||||||
map.put("sign", MD5Utils.md5(JsonUtils.getInstance().getGson().toJson(map)));
|
map.put("sign", MD5Utils.md5(JsonUtils.getInstance().getGson().toJson(map)));
|
||||||
map.put("time", TimeUtil.getNowMills());
|
map.put("time", TimeUtil.getNowMills());
|
||||||
Log.i(TAG, new Gson().toJson(map));
|
LogUtil.e(TAG, new Gson().toJson(map));
|
||||||
return new Gson().toJson(map);
|
return new Gson().toJson(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,15 +124,15 @@ public class CreateJsonUtils {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
signStr = (sign1(requestDataMap) + "&api_key=xccdb-power-bank").replaceFirst("&", "");
|
signStr = (sign1(requestDataMap) + "&api_key=xccdb-power-bank").replaceFirst("&", "");
|
||||||
Log.i(TAG, "createRequestBody: " + sign1(requestDataMap));
|
LogUtil.e(TAG, "createRequestBody: " + sign1(requestDataMap));
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
Log.i(TAG, "createRequestBody: " + signStr);
|
LogUtil.e(TAG, "createRequestBody: " + signStr);
|
||||||
for (String keySet : requestDataMap.keySet()) {
|
for (String keySet : requestDataMap.keySet()) {
|
||||||
requestBodyMap.put(keySet, RequestBody.create(MediaType.parse("multipart/form-data"), requestDataMap.get(keySet) + ""));
|
requestBodyMap.put(keySet, RequestBody.create(MediaType.parse("multipart/form-data"), requestDataMap.get(keySet) + ""));
|
||||||
}
|
}
|
||||||
Log.i(TAG, "createRequestBody: " + MD5Utils.md5((signStr)));
|
LogUtil.e(TAG, "createRequestBody: " + MD5Utils.md5((signStr)));
|
||||||
requestBodyMap.put("sign", RequestBody.create(MediaType.parse("multipart/form-data"),
|
requestBodyMap.put("sign", RequestBody.create(MediaType.parse("multipart/form-data"),
|
||||||
MD5Utils.md5((signStr))));
|
MD5Utils.md5((signStr))));
|
||||||
requestBodyMap.put("time", RequestBody.create(MediaType.parse("multipart/form-data"), TimeUtil.getNowMills() / 1000 + ""));
|
requestBodyMap.put("time", RequestBody.create(MediaType.parse("multipart/form-data"), TimeUtil.getNowMills() / 1000 + ""));
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.arpa.hndahesudintocctmsdriver.request.net;
|
|||||||
|
|
||||||
|
|
||||||
import com.dahe.mylibrary.CommonBaseLibrary;
|
import com.dahe.mylibrary.CommonBaseLibrary;
|
||||||
|
import com.dahe.mylibrary.net.JsonInterceptor;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
|||||||
@@ -1,119 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request.net;
|
|
||||||
|
|
||||||
import static com.dahe.mylibrary.utils.BaseSPUtils.NEW_LJ_TOKEN;
|
|
||||||
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.util.Log;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.App;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.constant.NewLJConstant;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.LjTokenBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.NewLJUtils;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
|
||||||
import com.dahe.mylibrary.CommonBaseLibrary;
|
|
||||||
import com.dahe.mylibrary.net.CommonResponseBean;
|
|
||||||
import com.dahe.mylibrary.net.ResultException;
|
|
||||||
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.charset.Charset;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
|
|
||||||
import io.reactivex.rxjava3.core.Observable;
|
|
||||||
import kotlin.jvm.Synchronized;
|
|
||||||
import okhttp3.Interceptor;
|
|
||||||
import okhttp3.MediaType;
|
|
||||||
import okhttp3.OkHttpClient;
|
|
||||||
import okhttp3.Request;
|
|
||||||
import okhttp3.Response;
|
|
||||||
import okhttp3.ResponseBody;
|
|
||||||
import okio.Buffer;
|
|
||||||
import okio.BufferedSource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* json的Interceptor
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class JsonInterceptor implements Interceptor {
|
|
||||||
private static final String TAG = "JsonInterceptor";
|
|
||||||
|
|
||||||
public JsonInterceptor() {
|
|
||||||
}
|
|
||||||
|
|
||||||
// 使用AtomicBoolean,确保多线程中获取的值一致
|
|
||||||
private AtomicBoolean refreshingToken = new AtomicBoolean(false);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Response intercept(Chain chain) throws IOException {
|
|
||||||
Request request = chain.request();
|
|
||||||
Response response = chain.proceed(request);
|
|
||||||
ResponseBody responseBody = response.body();
|
|
||||||
//为了不消耗buffer,我们这里使用source先获得buffer对象,然后clone()后使用
|
|
||||||
BufferedSource source = responseBody.source();
|
|
||||||
source.request(Long.MAX_VALUE); // Buffer the entire body.
|
|
||||||
//获得返回的数据
|
|
||||||
Buffer buffer = source.buffer();
|
|
||||||
//使用前clone()下,避免直接消耗
|
|
||||||
String responseBodyStr = buffer.clone().readString(Charset.forName("UTF-8"));
|
|
||||||
Log.i(TAG, "result-body= " + responseBodyStr);
|
|
||||||
try {
|
|
||||||
|
|
||||||
JSONObject jsonObject = new JSONObject(responseBodyStr);
|
|
||||||
String str = jsonObject.optString("data");
|
|
||||||
int code = jsonObject.optInt("code");
|
|
||||||
if (401 == code) {
|
|
||||||
refreshToken();
|
|
||||||
// if (execute.body() != null) {
|
|
||||||
// String refreshToken = execute.body().get("token");
|
|
||||||
// SPUtils.put(App.getApp(), NEW_LJ_TOKEN, refreshToken);
|
|
||||||
// }
|
|
||||||
response.close();
|
|
||||||
try {
|
|
||||||
return chain.proceed(request);
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (-1 == code) {
|
|
||||||
jsonObject.put("data", new JSONObject());
|
|
||||||
throw new ResultException();
|
|
||||||
} else {
|
|
||||||
if (TextUtils.isEmpty(str)) {
|
|
||||||
jsonObject.put("data", new JSONObject());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String data = jsonObject.toString();
|
|
||||||
responseBody = ResponseBody.create(MediaType.parse("application/json; charset=utf-8"), data);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
response = response.newBuilder().body(responseBody).build();
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Synchronized
|
|
||||||
private void refreshToken() throws IOException {
|
|
||||||
Api api = CommonBaseLibrary.getRetrofit().newBuilder()
|
|
||||||
.client(new OkHttpClient.Builder()
|
|
||||||
.connectTimeout(30, TimeUnit.SECONDS)
|
|
||||||
.readTimeout(30, TimeUnit.SECONDS)
|
|
||||||
.writeTimeout(30, TimeUnit.SECONDS)
|
|
||||||
.build())
|
|
||||||
// .addNetworkInterceptor(new TokenInterceptor())
|
|
||||||
.build().create(Api.class);
|
|
||||||
LjTokenBean ljTokenBean = new LjTokenBean();
|
|
||||||
ljTokenBean.setEnterpriseCode(NewLJConstant.ENTER_PRISE_CODE);
|
|
||||||
ljTokenBean.setEnterpriseIdentity(NewLJConstant.ENTER_PRISE_IDENTITY);
|
|
||||||
ljTokenBean.setEnterpriseKey(NewLJConstant.ENTER_PRISE_KEY);
|
|
||||||
retrofit2.Response<HashMap<String, String>> execute = api.getRefreshToken(ljTokenBean).execute();
|
|
||||||
if (execute.body() != null) {
|
|
||||||
String refreshToken = execute.body().get("token");
|
|
||||||
SPUtils.put(App.getApp(), NEW_LJ_TOKEN, refreshToken);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+2
-6
@@ -1,7 +1,5 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request.net;
|
package com.arpa.hndahesudintocctmsdriver.request.net;
|
||||||
|
|
||||||
import static com.dahe.mylibrary.utils.BaseSPUtils.NEW_LJ_TOKEN;
|
|
||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
@@ -29,10 +27,9 @@ public class RequestHeadInterceptor implements Interceptor {
|
|||||||
@Override
|
@Override
|
||||||
public Response intercept(Chain chain) throws IOException {
|
public Response intercept(Chain chain) throws IOException {
|
||||||
Request.Builder builder = chain.request().newBuilder();
|
Request.Builder builder = chain.request().newBuilder();
|
||||||
String token = SPUtils.get(App.getApp(), NEW_LJ_TOKEN, "").toString();
|
if (!TextUtils.isEmpty(SPUtil.getSP(App.getApp(), LoginActivity.USER,LoginActivity.USER_TOKEN))) {
|
||||||
if (!TextUtils.isEmpty(token)) {
|
|
||||||
// builder.addHeader("Authorization", SPUtils.getUserInfo(App.getApp()).getToken());
|
// builder.addHeader("Authorization", SPUtils.getUserInfo(App.getApp()).getToken());
|
||||||
builder.addHeader("token", token);
|
builder.addHeader("Authorization", SPUtil.getSP(App.getApp(), LoginActivity.USER,LoginActivity.USER_TOKEN));
|
||||||
}
|
}
|
||||||
Request request = builder
|
Request request = builder
|
||||||
.addHeader("versionCode", AppUtils.getAppVersionCode() + "")
|
.addHeader("versionCode", AppUtils.getAppVersionCode() + "")
|
||||||
@@ -40,7 +37,6 @@ public class RequestHeadInterceptor implements Interceptor {
|
|||||||
.addHeader("deviceType", "ANDROID")
|
.addHeader("deviceType", "ANDROID")
|
||||||
.addHeader("language", BaseUtils.getLanguage(App.getApp())+"")
|
.addHeader("language", BaseUtils.getLanguage(App.getApp())+"")
|
||||||
.build();
|
.build();
|
||||||
Log.i(TAG, "intercept: " + request.headers());
|
|
||||||
return chain.proceed(request);
|
return chain.proceed(request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import android.view.Window;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.UiAuxiliary;
|
import com.arpa.hndahesudintocctmsdriver.ui.UiAuxiliary;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.NewLJUtils;
|
|
||||||
import com.dahe.mylibrary.net.CommonResponseBean;
|
import com.dahe.mylibrary.net.CommonResponseBean;
|
||||||
import com.dahe.mylibrary.net.ResultException;
|
import com.dahe.mylibrary.net.ResultException;
|
||||||
import com.dahe.mylibrary.utils.ToastUtils;
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
@@ -87,15 +86,14 @@ public abstract class RxHttpCallBack<T> {
|
|||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|
||||||
}
|
}
|
||||||
if ("401".equals(t.getCode())) {
|
if (t.getCode() == 401) {
|
||||||
// NewLJUtils.getInstance().refreshToken(mContext);
|
UiAuxiliary.delLogin(mContext);
|
||||||
// UiAuxiliary.delLogin(mContext);
|
Intent intent = new Intent(mContext, MainActivity.class);
|
||||||
// Intent intent = new Intent(mContext, MainActivity.class);
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
mContext.startActivity(intent);
|
||||||
// mContext.startActivity(intent);
|
ToastUtils.showToast(mContext,"您的账号再异地登录,请重新登录");
|
||||||
// ToastUtils.showToast(mContext,"您的账号再异地登录,请重新登录");
|
|
||||||
}else{
|
}else{
|
||||||
// ToastUtils.showToast(mContext,t.getMessage());
|
ToastUtils.showToast(mContext,t.getMsg());
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (t.getMessage().getMsg_code() == 100 && SPUtils.hasUserInfo(mContext)) {
|
// if (t.getMessage().getMsg_code() == 100 && SPUtils.hasUserInfo(mContext)) {
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ public class JTTSendService extends Service {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
Log.e("交通厅","开启位置上传");
|
|
||||||
con=this;
|
con=this;
|
||||||
String str= SPUtil.getSP(con, JTTConstant.JTT_DATA_NAME,JTTConstant.JTT_DATA_JTTORDER_KEY);
|
String str= SPUtil.getSP(con, JTTConstant.JTT_DATA_NAME,JTTConstant.JTT_DATA_JTTORDER_KEY);
|
||||||
String str2=SPUtil.getSP(con,JTTConstant.JTT_DATA_NAME,JTTConstant.JTT_DATA_ORDER_KEY);
|
String str2=SPUtil.getSP(con,JTTConstant.JTT_DATA_NAME,JTTConstant.JTT_DATA_ORDER_KEY);
|
||||||
@@ -103,7 +102,6 @@ public class JTTSendService extends Service {
|
|||||||
//开始
|
//开始
|
||||||
@Override
|
@Override
|
||||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||||
Log.e("服务开启","-----");
|
|
||||||
return START_STICKY;
|
return START_STICKY;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import android.util.Log;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.TrackInputBean;
|
import com.arpa.hndahesudintocctmsdriver.request.bean.TrackInputBean;
|
||||||
@@ -54,7 +55,7 @@ public class LocationService extends Service {
|
|||||||
super.onCreate();
|
super.onCreate();
|
||||||
con=this;
|
con=this;
|
||||||
hyr=new HuoYuanRequset(con,hd);
|
hyr=new HuoYuanRequset(con,hd);
|
||||||
Log.e("开始循环上传,等待100ms","-----");
|
LogUtil.e("开始循环上传,等待100ms","-----");
|
||||||
new Timer().schedule(new TimerTask() {
|
new Timer().schedule(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -67,7 +68,6 @@ public class LocationService extends Service {
|
|||||||
//开始
|
//开始
|
||||||
@Override
|
@Override
|
||||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||||
Log.e("服务开启","-----");
|
|
||||||
return START_STICKY;
|
return START_STICKY;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -84,10 +84,8 @@ public class LocationService extends Service {
|
|||||||
tib.setLatitude(l.getLatitude()+"");
|
tib.setLatitude(l.getLatitude()+"");
|
||||||
//纬度
|
//纬度
|
||||||
tib.setLongitude(l.getLongitude()+"");
|
tib.setLongitude(l.getLongitude()+"");
|
||||||
Log.e("经度",l.getLatitude()+"");
|
|
||||||
Log.e("维度",l.getLongitude()+"");
|
|
||||||
sum+=3;
|
sum+=3;
|
||||||
Log.e("当前app后台服务存活时间(手机息屏状态)",sum+"秒");
|
LogUtil.e("当前app后台服务存活时间(手机息屏状态)",sum+"秒");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import androidx.annotation.Nullable;
|
|||||||
|
|
||||||
import com.alct.mdp.MDPLocationCollectionManager;
|
import com.alct.mdp.MDPLocationCollectionManager;
|
||||||
import com.alct.mdp.model.Image;
|
import com.alct.mdp.model.Image;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.msg.MsgUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.msg.MsgUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||||
@@ -55,7 +56,6 @@ public class MakeUpAlService extends Service {
|
|||||||
//开始
|
//开始
|
||||||
@Override
|
@Override
|
||||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||||
Log.e("服务开启","-----");
|
|
||||||
return START_STICKY;
|
return START_STICKY;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -90,12 +90,12 @@ public class MakeUpAlService extends Service {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
Log.e("上报安联","装货照片上传成功");
|
LogUtil.e("上报安联","装货照片上传成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("上报安联失败(装货照片):",s+s1);
|
LogUtil.e("上报安联失败(装货照片):",s+s1);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -106,12 +106,12 @@ public class MakeUpAlService extends Service {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
Log.e("上报安联","卸货照片上传成功");
|
LogUtil.e("上报安联","卸货照片上传成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("上报安联失败(卸货照片):",s+s1);
|
LogUtil.e("上报安联失败(卸货照片):",s+s1);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -122,12 +122,12 @@ public class MakeUpAlService extends Service {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
Log.e("上报安联","回单照片上传成功");
|
LogUtil.e("上报安联","回单照片上传成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("上报安联失败(回单照片):",s+s1);
|
LogUtil.e("上报安联失败(回单照片):",s+s1);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import android.util.Log;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||||
@@ -26,20 +25,14 @@ public class MakeUpService extends Service {
|
|||||||
|
|
||||||
private MediaPlayer mediaPlayer = new MediaPlayer();
|
private MediaPlayer mediaPlayer = new MediaPlayer();
|
||||||
public void palyMp3(){
|
public void palyMp3(){
|
||||||
Log.e("开始播放","-----");
|
|
||||||
try {
|
try {
|
||||||
MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.kujp9scu);
|
AssetFileDescriptor fd =getAssets().openFd("kujp9scu.mp3");
|
||||||
mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
|
mediaPlayer.setDataSource(fd);
|
||||||
@Override
|
mediaPlayer.setLooping(false);//设置为循环播放
|
||||||
public void onPrepared(MediaPlayer mediaPlayer) {
|
mediaPlayer.prepare();//初始化播放器MediaPlayer
|
||||||
mediaPlayer.start();
|
mediaPlayer.start();
|
||||||
}
|
|
||||||
});
|
|
||||||
mediaPlayer.prepareAsync();
|
|
||||||
Log.e("播放成功","-----");
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Log.e("播放失败","-----");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private Handler hd=new Handler(msg -> {
|
private Handler hd=new Handler(msg -> {
|
||||||
@@ -62,14 +55,13 @@ public class MakeUpService extends Service {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
// palyMp3();
|
palyMp3();
|
||||||
}
|
}
|
||||||
|
|
||||||
//开始
|
//开始
|
||||||
@Override
|
@Override
|
||||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||||
Log.e("服务开启","-----");
|
|
||||||
palyMp3();
|
|
||||||
return START_STICKY;
|
return START_STICKY;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ public class RestartService extends Service {
|
|||||||
|
|
||||||
//Service被启动的时候回调onStartCommand方法
|
//Service被启动的时候回调onStartCommand方法
|
||||||
public int onStartCommand(Intent intent, int flags, int startId){
|
public int onStartCommand(Intent intent, int flags, int startId){
|
||||||
Log.e("---static---","启动");
|
|
||||||
return START_STICKY;
|
return START_STICKY;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ public class TestService extends Service {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
notification("消息","您有一条新的订单");
|
notification("消息","您有一条新的订单");
|
||||||
Log.e("1234","1234");
|
|
||||||
}
|
}
|
||||||
},100,5000);
|
},100,5000);
|
||||||
}
|
}
|
||||||
@@ -67,14 +66,12 @@ public class TestService extends Service {
|
|||||||
|
|
||||||
//Service被启动的时候回调onStartCommand方法
|
//Service被启动的时候回调onStartCommand方法
|
||||||
public int onStartCommand(Intent intent, int flags, int startId){
|
public int onStartCommand(Intent intent, int flags, int startId){
|
||||||
Log.e("---static---","启动");
|
|
||||||
return START_STICKY;
|
return START_STICKY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Service被销毁的时候回调onDestroy方法
|
//Service被销毁的时候回调onDestroy方法
|
||||||
public void onDestroy(){
|
public void onDestroy(){
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
Log.e("---static---","关闭");
|
|
||||||
Intent intentOne = new Intent(con,TestService.class);
|
Intent intentOne = new Intent(con,TestService.class);
|
||||||
startService(intentOne);
|
startService(intentOne);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,89 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.service;
|
|
||||||
|
|
||||||
import android.app.Notification;
|
|
||||||
import android.app.NotificationChannel;
|
|
||||||
import android.app.NotificationManager;
|
|
||||||
import android.app.PendingIntent;
|
|
||||||
import android.app.Service;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.os.IBinder;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.core.app.NotificationCompat;
|
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
|
||||||
import com.express.mdp.gps.a;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName TrackForeService
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/12/2 13:12
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class TrackForeService extends Service {
|
|
||||||
@Nullable
|
|
||||||
@Override
|
|
||||||
public IBinder onBind(Intent intent) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate() {
|
|
||||||
super.onCreate();
|
|
||||||
|
|
||||||
// String var3 = "channelId" + System.currentTimeMillis();
|
|
||||||
// NotificationCompat.Builder var4;
|
|
||||||
// NotificationCompat.Builder var10001 = var4 = new NotificationCompat.Builder;
|
|
||||||
// var4.<init>(this, var3);
|
|
||||||
// var4.setContentText("运单轨迹服务");
|
|
||||||
// var4.setContentTitle("");
|
|
||||||
// var10001.setSmallIcon(var1);
|
|
||||||
// var10001.setAutoCancel(false);
|
|
||||||
// var10001.setShowWhen(true);
|
|
||||||
// var10001.setWhen(System.currentTimeMillis());
|
|
||||||
// var10001.setPriority(2);
|
|
||||||
// var10001.setOngoing(true);
|
|
||||||
// var10001.setDefaults(-1);
|
|
||||||
// NotificationManager var7 = (NotificationManager)this.getSystemService("notification");
|
|
||||||
// if (Build.VERSION.SDK_INT >= 26) {
|
|
||||||
// NotificationChannel var5;
|
|
||||||
// var5 = new NotificationChannel.<init>(var3, var2, 4);
|
|
||||||
// var7.createNotificationChannel(var5);
|
|
||||||
// var4.setChannelId(var3);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// a var10000 = this;
|
|
||||||
// Notification var6 = var4.build();
|
|
||||||
// var4.setContentIntent((PendingIntent)null);
|
|
||||||
// var7.notify(6, var6);
|
|
||||||
// var10000.startForeground(6, var6);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 判断是否为8.0版本以上
|
|
||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
|
||||||
// 获取系统服务管理器
|
|
||||||
NotificationManager manage = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
|
||||||
String id = "channelId" + System.currentTimeMillis();
|
|
||||||
String name = "通知分类名称";
|
|
||||||
// 建立通知通道
|
|
||||||
NotificationChannel notificationChannel = new NotificationChannel(id, name, NotificationManager.IMPORTANCE_DEFAULT);
|
|
||||||
manage.createNotificationChannel(notificationChannel);
|
|
||||||
|
|
||||||
Notification build = new NotificationCompat.Builder(this, id)
|
|
||||||
.setContentTitle("前台服务")
|
|
||||||
.setContentText("运单轨迹服务")
|
|
||||||
.setWhen(System.currentTimeMillis()) // 当前时间
|
|
||||||
.setSmallIcon(R.drawable.ic_launcher_background) // 图标
|
|
||||||
.setProgress(100, 10, false) // 进度
|
|
||||||
.build();
|
|
||||||
|
|
||||||
// 第一个参数唯一就好
|
|
||||||
startForeground(1, build);
|
|
||||||
manage.notify(1, build);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
@@ -9,6 +9,7 @@ import android.util.Log;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||||
@@ -30,22 +31,22 @@ import java.util.TimerTask;
|
|||||||
public class TrackService extends Service {
|
public class TrackService extends Service {
|
||||||
|
|
||||||
private Context con;
|
private Context con;
|
||||||
private TrackInputBean tib = new TrackInputBean();
|
private TrackInputBean tib=new TrackInputBean();
|
||||||
private LocationGDUtil l;
|
private LocationGDUtil l;
|
||||||
private int timeSum = 1000 * 60 * 3;
|
private int timeSum=1000*60*3;
|
||||||
private String snn = "";
|
private String snn="";
|
||||||
private Gson gson = new Gson();
|
private Gson gson=new Gson();
|
||||||
private HuoYuanRequset hyr;
|
private HuoYuanRequset hyr;
|
||||||
|
|
||||||
private Handler hd = new Handler(msg -> {
|
private Handler hd=new Handler(msg -> {
|
||||||
switch (msg.what) {
|
switch (msg.what){
|
||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
if (CacheGroup.cacheList.get("genzong") != null) {
|
if(CacheGroup.cacheList.get("genzong")!=null){
|
||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("genzong"), BaseBean.class);
|
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get("genzong"),BaseBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if(bb.getCode()==200){
|
||||||
Log.e("--轨迹上传--", "成功");
|
LogUtil.e("--轨迹上传--","成功");
|
||||||
} else {
|
}else{
|
||||||
Log.e("--轨迹上传失败:--", bb.getMsg());
|
LogUtil.e("--轨迹上传失败:--",bb.getMsg());
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("genzong");
|
CacheGroup.cacheList.remove("genzong");
|
||||||
}
|
}
|
||||||
@@ -59,34 +60,32 @@ public class TrackService extends Service {
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public IBinder onBind(Intent intent) {
|
public IBinder onBind(Intent intent) {return null; }
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
con = this;
|
con=this;
|
||||||
hyr = new HuoYuanRequset(con, hd);
|
hyr=new HuoYuanRequset(con,hd);
|
||||||
Log.e("开始循环上传,等待100ms", "-----");
|
LogUtil.e("开始循环上传,等待100ms","-----");
|
||||||
new Timer().schedule(new TimerTask() {
|
new Timer().schedule(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
snn = SPUtil.getSP(con, "order", "ShippingNoteNumber");
|
snn=SPUtil.getSP(con,"order","ShippingNoteNumber");
|
||||||
if (!snn.equals("")) {
|
if(!snn.equals("")) {
|
||||||
l = new LocationGDUtil(con, hd);
|
l = new LocationGDUtil(con, hd);
|
||||||
l.onCreate();
|
l.onCreate();
|
||||||
} else {
|
}else{
|
||||||
onDestroy();
|
onDestroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 100, timeSum);
|
},100,timeSum);
|
||||||
}
|
}
|
||||||
|
|
||||||
//开始
|
//开始
|
||||||
@Override
|
@Override
|
||||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||||
Log.e("服务开启", "-----");
|
LogUtil.e("服务开启","-----");
|
||||||
return START_STICKY;
|
return START_STICKY;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -96,19 +95,16 @@ public class TrackService extends Service {
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void genzong() {
|
public void genzong(){
|
||||||
if (l == null || l.getLatitude() == 0d) {
|
//经度
|
||||||
return;
|
tib.setLatitude(l.getLatitude()+"");
|
||||||
}
|
//纬度
|
||||||
//经度
|
tib.setLongitude(l.getLongitude()+"");
|
||||||
tib.setLatitude(l.getLatitude() + "");
|
LogUtil.e("经度",l.getLatitude()+"");
|
||||||
//纬度
|
LogUtil.e("维度",l.getLongitude()+"");
|
||||||
tib.setLongitude(l.getLongitude() + "");
|
//单号
|
||||||
Log.e("经度", l.getLatitude() + "");
|
tib.setShippingNoteNumber(snn);
|
||||||
Log.e("维度", l.getLongitude() + "");
|
hyr.trackTracking(tib);
|
||||||
//单号
|
|
||||||
tib.setShippingNoteNumber(snn);
|
|
||||||
hyr.trackTracking(tib);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
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
|
||||||
@@ -10,7 +9,6 @@ import android.view.KeyEvent
|
|||||||
import android.widget.*
|
import android.widget.*
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.WalletEvent
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.home.HomeFragment
|
import com.arpa.hndahesudintocctmsdriver.ui.home.HomeFragment
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity
|
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.my.MyFragment
|
import com.arpa.hndahesudintocctmsdriver.ui.my.MyFragment
|
||||||
@@ -21,13 +19,11 @@ 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.BottomTabUtil
|
import com.arpa.hndahesudintocctmsdriver.util.view.BottomTabUtil
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.PanDuanUtil
|
import com.arpa.hndahesudintocctmsdriver.util.view.PanDuanUtil
|
||||||
|
import com.dahe.mylibrary.utils.RootCheck
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.gyf.cactus.ext.cactusUpdateNotification
|
import com.lxj.xpopup.XPopup
|
||||||
import com.permissionx.guolindev.PermissionX
|
import com.permissionx.guolindev.PermissionX
|
||||||
import org.greenrobot.eventbus.EventBus
|
|
||||||
|
|
||||||
@Suppress("DIVISION_BY_ZERO")
|
|
||||||
@SuppressLint("SetTextI18n")
|
|
||||||
class MainActivity : BaseAppCompatActivity() {
|
class MainActivity : BaseAppCompatActivity() {
|
||||||
|
|
||||||
private var ibs = arrayOf<ImageView>()
|
private var ibs = arrayOf<ImageView>()
|
||||||
@@ -43,8 +39,7 @@ class MainActivity : BaseAppCompatActivity() {
|
|||||||
1 -> {
|
1 -> {
|
||||||
isExit = false;
|
isExit = false;
|
||||||
}
|
}
|
||||||
RequsetCodeConstants.SUCCESS -> {
|
RequsetCodeConstants.SUCCESS -> {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,10 +47,7 @@ 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 {
|
isRoot()
|
||||||
setTitle("好运司机")
|
|
||||||
setContent("您的接单小助手")
|
|
||||||
}
|
|
||||||
con = this
|
con = this
|
||||||
act = this
|
act = this
|
||||||
//隐藏标题栏
|
//隐藏标题栏
|
||||||
@@ -95,7 +87,6 @@ class MainActivity : BaseAppCompatActivity() {
|
|||||||
bt.hide(fs[bt.index])
|
bt.hide(fs[bt.index])
|
||||||
bt.selectItem(fs[1])
|
bt.selectItem(fs[1])
|
||||||
} else {
|
} else {
|
||||||
EventBus.getDefault().post(WalletEvent("refresh"))
|
|
||||||
bt.setDefaultFragment(fs[1])
|
bt.setDefaultFragment(fs[1])
|
||||||
}
|
}
|
||||||
bt.index = 1
|
bt.index = 1
|
||||||
@@ -129,21 +120,16 @@ class MainActivity : BaseAppCompatActivity() {
|
|||||||
bt.index = 3
|
bt.index = 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||||
// getPression()
|
getPression()
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getPression() {
|
fun getPression() {
|
||||||
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.CALL_PHONE,
|
|
||||||
Manifest.permission.RECORD_AUDIO,
|
|
||||||
Manifest.permission.CAMERA)
|
|
||||||
.request { allGranted, grantedList, deniedList ->
|
.request { allGranted, grantedList, deniedList ->
|
||||||
if (allGranted) {
|
if (allGranted) {
|
||||||
|
|
||||||
@@ -164,7 +150,6 @@ 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)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -192,4 +177,17 @@ class MainActivity : BaseAppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun isRoot() {
|
||||||
|
if (RootCheck.isRoot()) {
|
||||||
|
XPopup.Builder(this)
|
||||||
|
.isDestroyOnDismiss(true)
|
||||||
|
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||||
|
.asConfirm("警告", "该设备已ROOT,存在安全隐! 请更换安全设备后继续使用!",
|
||||||
|
"取消", "确定", {
|
||||||
|
System.exit(0)
|
||||||
|
// moveTaskToBack(true)
|
||||||
|
}, null, true).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,6 @@ public class NFCActivity extends BaseAppCompatActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Log.e("nfc",str);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui;
|
package com.arpa.hndahesudintocctmsdriver.ui;
|
||||||
|
|
||||||
import static com.dahe.mylibrary.utils.BaseSPUtils.NEW_LJ_TOKEN;
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@@ -41,9 +38,7 @@ public class UiAuxiliary {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void delLogin(Context con){
|
public static void delLogin(Context con){
|
||||||
// JPushInterface.deleteAlias(con,0);
|
JPushInterface.deleteAlias(con,0);
|
||||||
SPUtils.remove(con,"curWaybillId");
|
|
||||||
SPUtils.remove(con,NEW_LJ_TOKEN);
|
|
||||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_TOKEN,"");
|
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_TOKEN,"");
|
||||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_UNAME,"");
|
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_UNAME,"");
|
||||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_RNAME,"");
|
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_RNAME,"");
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import android.widget.TextView;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.web.WebOnlyOneActivity;
|
|
||||||
import com.lxj.xpopup.core.CenterPopupView;
|
import com.lxj.xpopup.core.CenterPopupView;
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.web.WebActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.web.WebActivity;
|
||||||
@@ -69,7 +68,7 @@ public class AgreementAlert extends CenterPopupView {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View widget) {
|
public void onClick(View widget) {
|
||||||
//用户服务协议点击事件
|
//用户服务协议点击事件
|
||||||
Intent in=new Intent(getContext(), WebOnlyOneActivity.class);
|
Intent in=new Intent(getContext(), WebActivity.class);
|
||||||
in.putExtra("url",url2);
|
in.putExtra("url",url2);
|
||||||
in.putExtra("title","用户服务协议");
|
in.putExtra("title","用户服务协议");
|
||||||
getContext().startActivity(in);
|
getContext().startActivity(in);
|
||||||
@@ -88,7 +87,7 @@ public class AgreementAlert extends CenterPopupView {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View widget) {
|
public void onClick(View widget) {
|
||||||
//用户服务协议点击事件
|
//用户服务协议点击事件
|
||||||
Intent in=new Intent(getContext(), WebOnlyOneActivity.class);
|
Intent in=new Intent(getContext(), WebActivity.class);
|
||||||
in.putExtra("url",url);
|
in.putExtra("url",url);
|
||||||
in.putExtra("title","隐私政策");
|
in.putExtra("title","隐私政策");
|
||||||
getContext().startActivity(in);
|
getContext().startActivity(in);
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui.alert;
|
package com.arpa.hndahesudintocctmsdriver.ui.alert;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.provider.Settings;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
@@ -16,8 +12,6 @@ import androidx.annotation.NonNull;
|
|||||||
|
|
||||||
import com.king.app.updater.AppUpdater;
|
import com.king.app.updater.AppUpdater;
|
||||||
import com.king.app.updater.callback.AppUpdateCallback;
|
import com.king.app.updater.callback.AppUpdateCallback;
|
||||||
import com.king.app.updater.constant.Constants;
|
|
||||||
import com.king.app.updater.util.AppUtils;
|
|
||||||
import com.lxj.xpopup.core.CenterPopupView;
|
import com.lxj.xpopup.core.CenterPopupView;
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
|
|
||||||
@@ -33,11 +27,11 @@ import java.io.File;
|
|||||||
*/
|
*/
|
||||||
public class UpAppAlert extends CenterPopupView {
|
public class UpAppAlert extends CenterPopupView {
|
||||||
|
|
||||||
private TextView content, vs, tvContent;
|
private TextView content,vs;
|
||||||
private Button tv_cancel, tv_confirm, tvOk;
|
private Button tv_cancel,tv_confirm;
|
||||||
private LinearLayout up_div;
|
private LinearLayout up_div;
|
||||||
private String url = "";
|
private String url="";
|
||||||
private String body = "";
|
private String body="";
|
||||||
private Context con;
|
private Context con;
|
||||||
private ProgressBar progress_view;
|
private ProgressBar progress_view;
|
||||||
private String version;
|
private String version;
|
||||||
@@ -45,20 +39,19 @@ public class UpAppAlert extends CenterPopupView {
|
|||||||
private LinearLayout force_box;
|
private LinearLayout force_box;
|
||||||
private ImageButton force_btn;
|
private ImageButton force_btn;
|
||||||
|
|
||||||
public UpAppAlert(@NonNull @NotNull Context context, String url, String body, String version, String force) {
|
public UpAppAlert(@NonNull @NotNull Context context, String url, String body,String version,String force) {
|
||||||
super(context);
|
super(context);
|
||||||
con = context;
|
con=context;
|
||||||
this.url = url;
|
this.url=url;
|
||||||
this.body = body;
|
this.body=body;
|
||||||
this.version = version;
|
this.version=version;
|
||||||
this.force = force;
|
this.force=force;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getImplLayoutId() {
|
protected int getImplLayoutId() {
|
||||||
return R.layout.alert_up_app;
|
return R.layout.alert_up_app;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UpAppAlert(@NonNull @NotNull Context context) {
|
public UpAppAlert(@NonNull @NotNull Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
|
|
||||||
@@ -67,17 +60,15 @@ public class UpAppAlert extends CenterPopupView {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
content = findViewById(R.id.tv_content);
|
content=findViewById(R.id.tv_content);
|
||||||
tv_cancel = findViewById(R.id.tv_cancel);
|
tv_cancel=findViewById(R.id.tv_cancel);
|
||||||
tv_confirm = findViewById(R.id.tv_confirm);
|
tv_confirm=findViewById(R.id.tv_confirm);
|
||||||
tvContent = findViewById(R.id.tvContent);
|
up_div=findViewById(R.id.up_div);
|
||||||
tvOk = findViewById(R.id.tvOk);
|
progress_view=findViewById(R.id.progress);
|
||||||
up_div = findViewById(R.id.up_div);
|
content=findViewById(R.id.tv_content);
|
||||||
progress_view = findViewById(R.id.progress);
|
force_box=findViewById(R.id.force_box);
|
||||||
content = findViewById(R.id.tv_content);
|
force_btn=findViewById(R.id.force_btn);
|
||||||
force_box = findViewById(R.id.force_box);
|
if(force.equals("1")){
|
||||||
force_btn = findViewById(R.id.force_btn);
|
|
||||||
if (force.equals("1")) {
|
|
||||||
force_box.setVisibility(GONE);
|
force_box.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
force_btn.setOnClickListener(v -> {
|
force_btn.setOnClickListener(v -> {
|
||||||
@@ -85,16 +76,16 @@ public class UpAppAlert extends CenterPopupView {
|
|||||||
dismiss();
|
dismiss();
|
||||||
//detachFromHost();
|
//detachFromHost();
|
||||||
});
|
});
|
||||||
vs = findViewById(R.id.vs);
|
vs=findViewById(R.id.vs);
|
||||||
content.setText(body);
|
content.setText(body);
|
||||||
vs.setText(version);
|
vs.setText(version);
|
||||||
tv_cancel.setOnClickListener(v -> {
|
tv_cancel.setOnClickListener(v -> {
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
});
|
});
|
||||||
tv_confirm.setOnClickListener(v -> {
|
tv_confirm.setOnClickListener(v -> {
|
||||||
new AppUpdater.Builder(con)
|
new AppUpdater.Builder()
|
||||||
.setUrl(url)
|
.setUrl(url)
|
||||||
.build()
|
.build(con)
|
||||||
.setUpdateCallback(new AppUpdateCallback() {
|
.setUpdateCallback(new AppUpdateCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onStart(String url) {
|
public void onStart(String url) {
|
||||||
@@ -102,28 +93,23 @@ public class UpAppAlert extends CenterPopupView {
|
|||||||
tv_confirm.setVisibility(GONE);
|
tv_confirm.setVisibility(GONE);
|
||||||
up_div.setVisibility(VISIBLE);
|
up_div.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onProgress(long progress, long total, boolean isChange) {
|
public void onProgress(long progress, long total, boolean isChange) {
|
||||||
// Log.e("progress",progress+"");
|
// Log.e("progress",progress+"");
|
||||||
// Log.e("total",total+"");
|
// Log.e("total",total+"");
|
||||||
// Log.e("isChange",isChange+"");
|
// Log.e("isChange",isChange+"");
|
||||||
float sum = progress;
|
float sum=progress;
|
||||||
float max = total;
|
float max=total;
|
||||||
if (progress > 0) {
|
if(progress>0){
|
||||||
float b = sum / max;
|
float b=sum/max;
|
||||||
Log.e("百分比", (100 * b) + "");
|
Log.e("百分比",(100*b)+"");
|
||||||
progress_view.setProgress((int) (100 * b));
|
progress_view.setProgress((int) (100*b));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish(File file) {
|
public void onFinish(File file) {
|
||||||
tvContent.setText("下载完成,请及时安装!");
|
|
||||||
tvOk.setVisibility(VISIBLE);
|
|
||||||
tvOk.setOnClickListener(v1 -> {
|
|
||||||
AppUtils.installApk(getContext(), file, getContext().getPackageName() + Constants.DEFAULT_FILE_PROVIDER);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.start();
|
.start();
|
||||||
|
|||||||
+32
-126
@@ -18,17 +18,11 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.OCRQualiBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
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.dahe.mylibrary.utils.ImageLoader;
|
|
||||||
import com.dahe.mylibrary.utils.TimeUtil;
|
|
||||||
import com.esign.esignsdk.EsignSdk;
|
import com.esign.esignsdk.EsignSdk;
|
||||||
import com.esign.esignsdk.data.AuthEvent;
|
|
||||||
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
||||||
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode;
|
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@@ -50,9 +44,6 @@ 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.Subscribe;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -69,7 +60,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
private RelativeLayout up_img, cow1;
|
private RelativeLayout up_img, cow1;
|
||||||
private LinearLayout data_view;
|
private LinearLayout data_view;
|
||||||
private ImageView img;
|
private ImageView img;
|
||||||
private TextView zjimg_name, upload_img, name2, title1, title2, tvSkip, tvTips;
|
private TextView zjimg_name, upload_img, name2, title1, title2, tvSkip,tvTips;
|
||||||
private View vs;
|
private View vs;
|
||||||
private EditText value1;
|
private EditText value1;
|
||||||
private Button submit;
|
private Button submit;
|
||||||
@@ -87,37 +78,15 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
if (CacheGroup.cacheList.get("upload") != null) {
|
if (CacheGroup.cacheList.get("upload") != null) {
|
||||||
ub = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
ub = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||||
if (ub.getCode() == 200) {
|
if (ub.getCode() == 200) {
|
||||||
if ("0".equals(type)) {//从业资格识别,党员认证不识别
|
|
||||||
new OCRRequest().ORCQualificaZj(con, hd, ub.getData().getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
url = ub.getData().getUrl();
|
url = ub.getData().getUrl();
|
||||||
ImageLoader.getInstance().loadImage(con,url,img);
|
Glide.with(con).load(url).into(img);
|
||||||
up_img.setVisibility(View.GONE);
|
up_img.setVisibility(View.GONE);
|
||||||
img.setVisibility(View.VISIBLE);
|
img.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("upload");
|
CacheGroup.cacheList.remove("upload");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("ORCQualificaZj") != null) {
|
|
||||||
OCRQualiBean ocrQualiBean = gson.fromJson(CacheGroup.cacheList.get("ORCQualificaZj"), OCRQualiBean.class);
|
|
||||||
if (ocrQualiBean.getCode() == 200 && ocrQualiBean.getData() != null) {
|
|
||||||
List<OCRQualiBean.DataDTO.QualificationCategoryListDTO> qualificationCategoryList = ocrQualiBean.getData().getQualification_category_list();
|
|
||||||
if (qualificationCategoryList != null && qualificationCategoryList.size() > 0) {
|
|
||||||
String expiryDate = qualificationCategoryList.get(0).getExpiry_date();
|
|
||||||
if (!TextUtils.isEmpty(expiryDate)&&expiryDate.contains("-")){
|
|
||||||
value2.setText(expiryDate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
CacheGroup.cacheList.remove("ORCQualificaZj");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("isAuthDriverAuthQualification") != null) {
|
if (CacheGroup.cacheList.get("isAuthDriverAuthQualification") != null) {
|
||||||
Log.e("is", CacheGroup.cacheList.get("isAuthDriverAuthQualification"));
|
LogUtil.e("is", CacheGroup.cacheList.get("isAuthDriverAuthQualification"));
|
||||||
ib = gson.fromJson(CacheGroup.cacheList.get("isAuthDriverAuthQualification"), IsAuthDriverAuthQualificationBean.class);
|
ib = gson.fromJson(CacheGroup.cacheList.get("isAuthDriverAuthQualification"), IsAuthDriverAuthQualificationBean.class);
|
||||||
if (ib.getCode() == 200) {
|
if (ib.getCode() == 200) {
|
||||||
if (ib.getData() != null) {
|
if (ib.getData() != null) {
|
||||||
@@ -132,32 +101,16 @@ 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();
|
||||||
isAuth = true;
|
//从业资格证->实名认证
|
||||||
//判断是否从车辆进来 carId为空从个人认证进来需跳转实名认证,不为空车辆信息进入,需跳转车辆照片
|
// finish();
|
||||||
if (TextUtils.isEmpty(carId)) {
|
if (key) {
|
||||||
//从业资格证->实名认证
|
key = false;
|
||||||
if (key) {
|
new AuthRequest().getAuthUrl(con, hd);
|
||||||
key = false;
|
new Handler().postDelayed(() -> {
|
||||||
new AuthRequest().getAuthUrl(con, hd);
|
key = true;
|
||||||
new Handler().postDelayed(() -> {
|
}, 3000);
|
||||||
key = true;
|
|
||||||
}, 3000);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
finish();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Toast.makeText(con, "资格证上传成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "资格证上传成功", Toast.LENGTH_SHORT).show();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
@@ -180,15 +133,14 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("authUrl") != null) {
|
if (CacheGroup.cacheList.get("authUrl") != null) {
|
||||||
Log.e("url", CacheGroup.cacheList.get("authUrl"));
|
LogUtil.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 {
|
||||||
finish();
|
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||||
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
}//LogUtil.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||||
CacheGroup.cacheList.remove("authUrl");
|
CacheGroup.cacheList.remove("authUrl");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -202,8 +154,6 @@ 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
|
||||||
@@ -212,7 +162,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
StateStyleUtil.stateTextColor(this);
|
StateStyleUtil.stateTextColor(this);
|
||||||
setContentView(R.layout.activity_auth_qualification);
|
setContentView(R.layout.activity_auth_qualification);
|
||||||
con = this;
|
con = this;
|
||||||
act = this;
|
act=this;
|
||||||
img = findViewById(R.id.img);
|
img = findViewById(R.id.img);
|
||||||
zjimg_name = findViewById(R.id.zjimg_name);
|
zjimg_name = findViewById(R.id.zjimg_name);
|
||||||
upload_img = findViewById(R.id.upload_img);
|
upload_img = findViewById(R.id.upload_img);
|
||||||
@@ -229,8 +179,6 @@ 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)) {
|
||||||
@@ -242,11 +190,6 @@ 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;
|
||||||
@@ -261,38 +204,30 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
gia.showPopueWindow(this);
|
gia.showPopueWindow(this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
up_img.setOnClickListener(v -> {
|
|
||||||
if (!isAuth) {
|
|
||||||
gia.showPopueWindow(this);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
img.setOnClickListener(v -> {
|
img.setOnClickListener(v -> {
|
||||||
if (!"".equals(url)) {
|
if (!"".equals(url)) {
|
||||||
new XPopup.Builder(con).asImageViewer(img, url, new SmartGlideImageLoader(R.mipmap.ic_launcher_round)).show();
|
new XPopup.Builder(con)
|
||||||
// new XPopup.Builder(con)
|
.asImageViewer(img, url, true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
// .asImageViewer(img, url, true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
.show();
|
||||||
// .show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
value2.setOnClickListener(v -> {
|
value2.setOnClickListener(v -> {
|
||||||
if (!isAuth) {
|
DatePicker picker = new DatePicker(this);
|
||||||
DatePicker picker = new DatePicker(this);
|
picker.setBodyWidth(300);
|
||||||
picker.setBodyWidth(300);
|
picker.setOnDatePickedListener((year, month, day) -> value2.setText(year + "-" + month + "-" + day));
|
||||||
picker.setOnDatePickedListener((year, month, day) -> value2.setText(year + "-" + month + "-" + day));
|
picker.getWheelLayout().setDateMode(DateMode.YEAR_MONTH_DAY);
|
||||||
picker.getWheelLayout().setDateMode(DateMode.YEAR_MONTH_DAY);
|
picker.getWheelLayout().setDateLabel("年", "月", "日");
|
||||||
picker.getWheelLayout().setDateLabel("年", "月", "日");
|
picker.show();
|
||||||
picker.show();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
submit.setOnClickListener(v -> {
|
submit.setOnClickListener(v -> {
|
||||||
if (!isAuth) {
|
if (!isAuth) {
|
||||||
String id = value1.getText() + "";
|
String id = value1.getText() + "";
|
||||||
String date = value2.getText() + "";
|
String date = value2.getText() + "";
|
||||||
if ("0".equals(type)) {
|
if ("0".equals(type)) {
|
||||||
if (!"".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)) {
|
||||||
@@ -323,8 +258,6 @@ 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) {
|
||||||
@@ -358,7 +291,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
zjimg_name.setText("党员证照片");
|
zjimg_name.setText("党员证照片");
|
||||||
data_view.setVisibility(View.GONE);
|
data_view.setVisibility(View.GONE);
|
||||||
title2.setVisibility(View.GONE);
|
title2.setVisibility(View.GONE);
|
||||||
} else {
|
}else{
|
||||||
tvTips.setVisibility(View.VISIBLE);
|
tvTips.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -372,13 +305,13 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
value2.setText(ib.getData().getQualificationCertificateValidity());
|
value2.setText(ib.getData().getQualificationCertificateValidity());
|
||||||
up_img.setVisibility(View.GONE);
|
up_img.setVisibility(View.GONE);
|
||||||
img.setVisibility(View.VISIBLE);
|
img.setVisibility(View.VISIBLE);
|
||||||
ImageLoader.getInstance().loadImage(con,url,img);
|
Glide.with(con).load(url).into(img);
|
||||||
upload_img.setText("已上传");
|
upload_img.setText("已上传");
|
||||||
} else {
|
} else {
|
||||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||||
isAuth = true;
|
isAuth = true;
|
||||||
url = userBean.getData().getPartyMemberUrl();
|
url = userBean.getData().getPartyMemberUrl();
|
||||||
ImageLoader.getInstance().loadImage(con,url,img);
|
Glide.with(con).load(url).into(img);
|
||||||
up_img.setVisibility(View.GONE);
|
up_img.setVisibility(View.GONE);
|
||||||
img.setVisibility(View.VISIBLE);
|
img.setVisibility(View.VISIBLE);
|
||||||
upload_img.setText("已上传");
|
upload_img.setText("已上传");
|
||||||
@@ -392,7 +325,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
if (requestCode == 12 && resultCode == RESULT_OK) {
|
if (requestCode == 12 && resultCode == RESULT_OK) {
|
||||||
path = gia.getFile().getPath();
|
path = gia.getFile().getPath();
|
||||||
Log.e("图片地址:", path);
|
LogUtil.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
||||||
@@ -405,38 +338,11 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
paths = image.getPath();
|
paths = image.getPath();
|
||||||
}
|
}
|
||||||
path = paths;
|
path = paths;
|
||||||
Log.e("图片地址:", path);
|
LogUtil.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Subscribe
|
|
||||||
public void processResult(AuthEvent auth) {
|
|
||||||
//添加实名/意愿/签署完成之后的逻辑
|
|
||||||
Log.e("-回调信息-", auth.result);
|
|
||||||
JSONObject jsonObject = JSON.parseObject(auth.result);
|
|
||||||
if ("success".equalsIgnoreCase(jsonObject.getString("res"))) {
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
finish();
|
|
||||||
} 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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+189
-851
File diff suppressed because it is too large
Load Diff
@@ -1,62 +0,0 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui.auth;
|
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
|
||||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName FaceSuccActivity
|
|
||||||
* @Author john
|
|
||||||
* @Date 2024/12/2 10:27
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
public class FaceSuccActivity extends BaseAppCompatActivity {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
StateStyleUtil.stateTextColor(this);
|
|
||||||
setContentView(R.layout.activity_face_succ_result);
|
|
||||||
con = this;
|
|
||||||
initView(null);
|
|
||||||
Button btnHome = findViewById(R.id.btnHome);
|
|
||||||
Button btnAddCar = findViewById(R.id.btnAddCar);
|
|
||||||
boolean isGoCar = getIntent().getBooleanExtra("isGoCar", false);
|
|
||||||
if (isGoCar) {
|
|
||||||
btnHome.setText("返回首页");
|
|
||||||
btnAddCar.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
btnHome.setText("返回");
|
|
||||||
btnAddCar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
btnHome.setOnClickListener(v -> {
|
|
||||||
finish();
|
|
||||||
});
|
|
||||||
btnAddCar.setOnClickListener(v -> {
|
|
||||||
Intent in = new Intent(con, CertificatesActivity.class);
|
|
||||||
in.putExtra("index", 2);
|
|
||||||
startActivity(in);
|
|
||||||
finish();
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPause() {
|
|
||||||
super.onPause();
|
|
||||||
EventBus.getDefault().post(new PersonEvent("刷脸成功"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+22
-87
@@ -1,16 +1,10 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui.auth;
|
package com.arpa.hndahesudintocctmsdriver.ui.auth;
|
||||||
|
|
||||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@@ -20,16 +14,10 @@ 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.H5Activity2;
|
|
||||||
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.ui.business.BusinessActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.PermissionUtils;
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
|
||||||
import com.dahe.mylibrary.utils.ImageLoader;
|
|
||||||
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;
|
||||||
@@ -52,8 +40,6 @@ 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 com.permissionx.guolindev.PermissionX;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
@@ -77,15 +63,15 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
super.msgMethod(m);
|
super.msgMethod(m);
|
||||||
switch (m.what) {
|
switch (m.what) {
|
||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
if (CacheGroup.cacheList.get("userdata2") != null) {
|
if (CacheGroup.cacheList.get("userdata") != null) {
|
||||||
ub = gson.fromJson(CacheGroup.cacheList.get("userdata2"), UserBean.class);
|
ub = gson.fromJson(CacheGroup.cacheList.get("userdata"), UserBean.class);
|
||||||
if (ub.getCode() == 200) {
|
if (ub.getCode() == 200) {
|
||||||
initView(ub);
|
initView(ub);
|
||||||
SPUtil.insSP(con, "data", "userdata", CacheGroup.cacheList.get("userdata2"));
|
SPUtil.insSP(con, "data", "userdata", CacheGroup.cacheList.get("userdata"));
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("userdata2");
|
CacheGroup.cacheList.remove("userdata");
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("upload") != null) {
|
if (CacheGroup.cacheList.get("upload") != null) {
|
||||||
upb = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
upb = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||||
@@ -106,25 +92,13 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
CacheGroup.cacheList.remove("upHeadImg");
|
CacheGroup.cacheList.remove("upHeadImg");
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("authUrl") != null) {
|
if (CacheGroup.cacheList.get("authUrl") != null) {
|
||||||
Log.e("url", CacheGroup.cacheList.get("authUrl"));
|
LogUtil.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) {
|
||||||
|
EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||||
Intent intent = new Intent(this, H5Activity.class);
|
|
||||||
intent.putExtra("url", (String) bb.getData());
|
|
||||||
intent.putExtra("view_file", false);
|
|
||||||
// intent.putExtra("isGoCar", true);
|
|
||||||
startActivity(intent);
|
|
||||||
|
|
||||||
// Bundle t = new Bundle();
|
|
||||||
// t.putString("url",(String) bb.getData());
|
|
||||||
// t.putBoolean("view_file", false);
|
|
||||||
// ActivityUtils.startActivity(con, H5Activity2.class,t);
|
|
||||||
|
|
||||||
// EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||||
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
}//LogUtil.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||||
CacheGroup.cacheList.remove("authUrl");
|
CacheGroup.cacheList.remove("authUrl");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -187,67 +161,30 @@ 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) {
|
||||||
PermissionX.init(this)
|
key = false;
|
||||||
.permissions(Manifest.permission.CAMERA)
|
new AuthRequest().getAuthUrl(con, hd);
|
||||||
.request((allGranted, grantedList, deniedList) -> {
|
new Handler().postDelayed(() -> {
|
||||||
if(allGranted) {
|
key = true;
|
||||||
key = false;
|
}, 3000);
|
||||||
new AuthRequest().getAuthUrl(con, hd);
|
|
||||||
new Handler().postDelayed(() -> {
|
|
||||||
key = true;
|
|
||||||
}, 3000);
|
|
||||||
} else{
|
|
||||||
new MessageUtils().showSimCenPop(con, "缺少相机权限,将无法为您提供服务,去开启!", "取消", "确认", () -> {
|
|
||||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
|
||||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
|
||||||
intent.setData(uri);
|
|
||||||
startActivity(intent);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//头像
|
//头像
|
||||||
up_img.setOnClickListener(v -> {
|
up_img.setOnClickListener(v -> {
|
||||||
PermissionUtils.Companion.getInstance().showPermissionMessage(this, "拍摄,媒体查询权限使用说明", "用于拍照或者选择图片用于上传头像功能",
|
gia.showPopueWindow(this);
|
||||||
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.CAMERA},
|
|
||||||
(allGranted, grantedList, deniedList) -> {
|
|
||||||
if (allGranted) {
|
|
||||||
gia.showPopueWindow(this);
|
|
||||||
} else {
|
|
||||||
new MessageUtils().showSimCenPop(con, "缺少拍摄,媒体查询权限,将无法为您提供服务,去开启!", "取消", "确认", () -> {
|
|
||||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
|
||||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
|
||||||
intent.setData(uri);
|
|
||||||
startActivity(intent);
|
|
||||||
});
|
|
||||||
// Toast.makeText(act.getBaseContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
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(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
.asImageViewer(up_head, ub.getData().getHeadportraitUrl(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
.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);
|
||||||
ur = new UserRequset(con, hd);
|
ur = new UserRequset(con, hd);
|
||||||
|
ur.User();
|
||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onStart() {
|
|
||||||
super.onStart();
|
|
||||||
ur.User2();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
@@ -263,15 +200,15 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
TextView name = findViewById(R.id.rname);
|
TextView name = findViewById(R.id.rname);
|
||||||
name.setText(StringUtil.isNull(ub.getData().getRname(), "未实名"));
|
name.setText(StringUtil.isNull(ub.getData().getRname(), "未实名"));
|
||||||
if (ub.getData().getHeadportraitUrl() != null && !ub.getData().getHeadportraitUrl().equals("")) {
|
if (ub.getData().getHeadportraitUrl() != null && !ub.getData().getHeadportraitUrl().equals("")) {
|
||||||
ImageLoader.getInstance().loadImage(con,ub.getData().getHeadportraitUrl(),up_head);
|
Glide.with(con).load(ub.getData().getHeadportraitUrl()).into(up_head);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void personResult(PersonEvent home) {
|
public void personResult(PersonEvent home) {
|
||||||
Log.e("-res-", home.getMessage());
|
LogUtil.e("-res-", home.getMessage());
|
||||||
if (ur != null) {
|
if (ur != null) {
|
||||||
ur.User2();
|
ur.User();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,7 +223,7 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
if (requestCode == 12 && resultCode == RESULT_OK) {
|
if (requestCode == 12 && resultCode == RESULT_OK) {
|
||||||
path = gia.getFile().getPath();
|
path = gia.getFile().getPath();
|
||||||
Log.e("图片地址:", path);
|
LogUtil.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
||||||
@@ -298,7 +235,7 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
paths = image.getPath();
|
paths = image.getPath();
|
||||||
}
|
}
|
||||||
path = paths;
|
path = paths;
|
||||||
Log.e("图片地址:", path);
|
LogUtil.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
}
|
}
|
||||||
@@ -320,15 +257,13 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void processResult(AuthEvent auth) {
|
public void processResult(AuthEvent auth) {
|
||||||
//添加实名/意愿/签署完成之后的逻辑
|
//添加实名/意愿/签署完成之后的逻辑
|
||||||
Log.e("-回调信息-", auth.result);
|
LogUtil.e("-回调信息-", auth.result);
|
||||||
JSONObject jsonObject = JSON.parseObject(auth.result);
|
JSONObject jsonObject = JSON.parseObject(auth.result);
|
||||||
if ("success".equalsIgnoreCase(jsonObject.getString("res"))) {
|
if ("success".equalsIgnoreCase(jsonObject.getString("res"))) {
|
||||||
if ("sign".equalsIgnoreCase(jsonObject.getString("key"))) {
|
if ("sign".equalsIgnoreCase(jsonObject.getString("key"))) {
|
||||||
Toast.makeText(con, "签署场景成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "签署场景成功", Toast.LENGTH_SHORT).show();
|
||||||
} else if ("realName".equalsIgnoreCase(jsonObject.getString("key"))) {
|
} else if ("realName".equalsIgnoreCase(jsonObject.getString("key"))) {
|
||||||
Toast.makeText(con, "实名认证成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "实名认证成功", Toast.LENGTH_SHORT).show();
|
||||||
EsignSdk.getInstance().finishH5Activity();
|
|
||||||
finish();
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "意愿认证成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "意愿认证成功", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|||||||
+42
-209
@@ -3,7 +3,6 @@ package com.arpa.hndahesudintocctmsdriver.ui.auth;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.text.InputType;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -21,31 +20,23 @@ import com.arpa.hndahesudintocctmsdriver.R;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.CarDelBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.CarDelBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.IsAuthDriverAuthQualificationBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.IsAuthDriverAuthQualificationBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.OCRBankBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.OCRRoadBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.AuthRequest;
|
import com.arpa.hndahesudintocctmsdriver.request.AuthRequest;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.my.WoDeFragment;
|
import com.arpa.hndahesudintocctmsdriver.ui.my.WoDeFragment;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.wallet.WalletFragment;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.img.GetImageAlert;
|
import com.arpa.hndahesudintocctmsdriver.util.img.GetImageAlert;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
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.dahe.mylibrary.utils.ImageLoader;
|
import com.bumptech.glide.Glide;
|
||||||
import com.dahe.mylibrary.utils.PatternUtils;
|
|
||||||
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
|
||||||
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.luck.picture.lib.PictureSelector;
|
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;
|
||||||
@@ -58,24 +49,23 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnClickListener {
|
public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnClickListener {
|
||||||
|
|
||||||
private String[] titles = {"车辆照片", "NFC照片", "车辆登记证书", "道路运输许可证", "车辆交强险"};
|
private String[] titles = {"车辆照片", "NFC照片", "车辆登记证书", "道路运输许可证"};
|
||||||
private String[] name1 = {"车辆照片", "NFC照片", "车辆登记证书照片", "道路运输许可证照片", "车辆交强险照片"};
|
private String[] name1 = {"车辆照片", "NFC照片", "车辆登记证书照片", "道路运输许可证照片"};
|
||||||
private String[] name2 = {"请上传车辆照片", "请上传NFC照片", "请上传车辆登记证书照片", "请上传道路运输许可证照片", "请上传车辆交强险照片"};
|
private String[] name2 = {"请上传车辆照片", "请上传NFC照片", "请上传车辆登记证书照片", "请上传道路运输许可证照片"};
|
||||||
private Boolean[] isShowEdit = {false, false, true, true, true};
|
private Boolean[] isShowEdit = {false, false, true, true};
|
||||||
private Boolean[] isShowSkip = {true, false, false, true, true};
|
private Boolean[] isShowSkip = {true, false, false, false};
|
||||||
private String[] tips = {
|
private String[] tips = {
|
||||||
"",
|
"",
|
||||||
"*注意: 没有粘贴NFC芯片的车辆无需上传,可直接跳过",
|
"*注意: 没有粘贴NFC芯片的车辆无需上传,可直接跳过",
|
||||||
"*注意: 没有可直接跳过,等候下次上传",
|
"*注意: 没有可直接跳过,等候下次上传",
|
||||||
"*注意: 4.5吨以下车辆不需要上传,可直接跳过",
|
"*注意: 4.5吨一下车辆不需要上传,可直接跳过"};
|
||||||
""};
|
|
||||||
|
|
||||||
|
|
||||||
private BaseRecyclerView brv;
|
private BaseRecyclerView brv;
|
||||||
private ImageView img;
|
private ImageView img;
|
||||||
private TextView title1, title2, title3, zjimg_name, upload_img, tvTips, tvSkip, value2;
|
private TextView title1, title2, title3, zjimg_name, upload_img, tvTips, tvSkip;
|
||||||
private EditText value1;
|
private EditText value1;
|
||||||
private LinearLayout llInfo, llDate;
|
private LinearLayout llInfo;
|
||||||
private RelativeLayout up_img;
|
private RelativeLayout up_img;
|
||||||
private Button submit;
|
private Button submit;
|
||||||
|
|
||||||
@@ -85,9 +75,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
private int type;//页面类型
|
private int type;//页面类型
|
||||||
private String path, carId, url;//图片路径
|
private String path, carId, url;//图片路径
|
||||||
private boolean carExist = false;
|
|
||||||
private GetImageAlert gia = new GetImageAlert();
|
private GetImageAlert gia = new GetImageAlert();
|
||||||
private CustomDialog customDialog;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
@@ -95,7 +83,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
switch (m.what) {
|
switch (m.what) {
|
||||||
case 200:
|
case 200:
|
||||||
if (CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL) != null) {
|
if (CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL) != null) {
|
||||||
Log.e("--res--", CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL));
|
LogUtil.e("--res--", CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL));
|
||||||
cdb = gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL), CarDelBean.class);
|
cdb = gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL), CarDelBean.class);
|
||||||
if (cdb.getCode() == 200) {
|
if (cdb.getCode() == 200) {
|
||||||
showImgToView();
|
showImgToView();
|
||||||
@@ -104,23 +92,6 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove(WoDeFragment.VEHICLE_DEL);
|
CacheGroup.cacheList.remove(WoDeFragment.VEHICLE_DEL);
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("onlyGetDetail") != null) {
|
|
||||||
Log.e("--res--", CacheGroup.cacheList.get("onlyGetDetail"));
|
|
||||||
cdb = gson.fromJson(CacheGroup.cacheList.get("onlyGetDetail"), CarDelBean.class);
|
|
||||||
CacheGroup.cacheList.remove("onlyGetDetail");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("ORCRoadLicZj") != null) {
|
|
||||||
if (customDialog != null && customDialog.isShowing())
|
|
||||||
customDialog.dismiss();
|
|
||||||
OCRRoadBean ib = new Gson().fromJson(CacheGroup.cacheList.get("ORCRoadLicZj"), OCRRoadBean.class);
|
|
||||||
if (ib.getCode() == 200 && ib.getData() != null&&!TextUtils.isEmpty(ib.getData().getLicenseNumber())) {
|
|
||||||
value1.setText(PatternUtils.getNumByStr(ib.getData().getLicenseNumber()));
|
|
||||||
} else {
|
|
||||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
CacheGroup.cacheList.remove("ORCRoadLicZj");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("upload") != null) {
|
if (CacheGroup.cacheList.get("upload") != null) {
|
||||||
@@ -136,31 +107,16 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 5);
|
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 5);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
//道路运输证ocr识别
|
|
||||||
new OCRRequest().ORCRoadLicZj(con, hd, ub.getData().getUrl());
|
|
||||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 2);
|
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 2);
|
||||||
break;
|
break;
|
||||||
case 4:
|
|
||||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 7);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (customDialog != null && customDialog.isShowing())
|
|
||||||
customDialog.dismiss();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
url = ub.getData().getUrl();
|
url = ub.getData().getUrl();
|
||||||
// Glide.with(con).load(url).into(img);
|
Glide.with(con).load(url).into(img);
|
||||||
ImageLoader.getInstance().loadImage(con,path,img);
|
|
||||||
|
|
||||||
|
|
||||||
CacheGroup.cacheList.remove("upload");
|
CacheGroup.cacheList.remove("upload");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("saveCarImg") != null) {
|
if (CacheGroup.cacheList.get("saveCarImg") != null) {
|
||||||
if (type!=3){
|
|
||||||
if (customDialog != null && customDialog.isShowing())
|
|
||||||
customDialog.dismiss();
|
|
||||||
}
|
|
||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("saveCarImg"), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("saveCarImg"), BaseBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@@ -174,11 +130,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
Toast.makeText(con, "上传车辆登记证书照片", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "上传车辆登记证书照片", Toast.LENGTH_SHORT).show();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
ur.vehicleDelTwo(carId);
|
Toast.makeText(con, "上传道路运输证成功", Toast.LENGTH_SHORT).show();
|
||||||
// Toast.makeText(con, "上传道路运输证成功", Toast.LENGTH_SHORT).show();
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
Toast.makeText(con, "交强险证件上传成功", Toast.LENGTH_SHORT).show();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -187,14 +139,14 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
CacheGroup.cacheList.remove("saveCarImg");
|
CacheGroup.cacheList.remove("saveCarImg");
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("saveCarRegisterNo") != null) {
|
if (CacheGroup.cacheList.get("saveCarRegisterNo") != null) {
|
||||||
Log.e("is", CacheGroup.cacheList.get("saveCarRegisterNo"));
|
LogUtil.e("is", CacheGroup.cacheList.get("saveCarRegisterNo"));
|
||||||
IsAuthDriverAuthQualificationBean ib = gson.fromJson(CacheGroup.cacheList.get("saveCarRegisterNo"), IsAuthDriverAuthQualificationBean.class);
|
IsAuthDriverAuthQualificationBean ib = gson.fromJson(CacheGroup.cacheList.get("saveCarRegisterNo"), IsAuthDriverAuthQualificationBean.class);
|
||||||
if (ib.getCode() == 200) {
|
if (ib.getCode() == 200) {
|
||||||
|
finish();
|
||||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
in.putExtra("type", 3);
|
in.putExtra("type", 3);
|
||||||
in.putExtra("carId", carId);
|
in.putExtra("carId", carId);
|
||||||
con.startActivity(in);
|
con.startActivity(in);
|
||||||
finish();
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, ib.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, ib.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -202,17 +154,13 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("saveCarRoadLicenseNo") != null) {
|
if (CacheGroup.cacheList.get("saveCarRoadLicenseNo") != null) {
|
||||||
Log.e("is", CacheGroup.cacheList.get("saveCarRoadLicenseNo"));
|
LogUtil.e("is", CacheGroup.cacheList.get("saveCarRoadLicenseNo"));
|
||||||
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() != null) {
|
if (!"".equals(carId) && cdb.getData().getIsTrailer() == 1) {
|
||||||
if (cdb.getData().getIsTrailer() == 1 && cdb.getData().getTrailerResVo() != null && !TextUtils.isEmpty(cdb.getData().getTrailerResVo().getCarNumber())) {//需要挂车,并且传过挂车直接结束
|
if (!"".equals(carId)) {
|
||||||
Intent in = new Intent(con, AddCarSuccActivity.class);
|
|
||||||
in.putExtra("type", 3);
|
|
||||||
con.startActivity(in);
|
|
||||||
finish();
|
finish();
|
||||||
} else if (cdb.getData().getIsTrailer() == 1 && cdb.getData().getTrailerResVo() != null && TextUtils.isEmpty(cdb.getData().getTrailerResVo().getCarNumber())) {//需要挂车,没传过挂车,到挂车页面
|
|
||||||
Intent in = new Intent(con, CertificatesActivity.class);
|
Intent in = new Intent(con, CertificatesActivity.class);
|
||||||
in.putExtra("index", 3);
|
in.putExtra("index", 3);
|
||||||
in.putExtra("carId", carId);
|
in.putExtra("carId", carId);
|
||||||
@@ -220,67 +168,22 @@ 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);
|
||||||
finish();
|
} 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 {
|
|
||||||
Intent in = new Intent(con, AddCarSuccActivity.class);
|
|
||||||
in.putExtra("type", 3);
|
|
||||||
con.startActivity(in);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
finish();
|
finish();
|
||||||
|
Intent in = new Intent(con, AddCarSuccActivity.class);
|
||||||
|
in.putExtra("type", 3);
|
||||||
|
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();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("saveCarRoadLicenseNo");
|
CacheGroup.cacheList.remove("saveCarRoadLicenseNo");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("saveTrafficInsurance") != null) {
|
|
||||||
Log.e("is", CacheGroup.cacheList.get("saveTrafficInsurance"));
|
|
||||||
IsAuthDriverAuthQualificationBean ddb = gson.fromJson(CacheGroup.cacheList.get("saveTrafficInsurance"), IsAuthDriverAuthQualificationBean.class);
|
|
||||||
if (ddb.getCode() == 200) {
|
|
||||||
Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show();
|
|
||||||
finish();
|
|
||||||
} else {
|
|
||||||
Toast.makeText(con, ddb.getMsg(), Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
|
|
||||||
CacheGroup.cacheList.remove("saveTrafficInsurance");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||||
customDialog = new CustomDialog(con, "加载中...");
|
|
||||||
customDialog.show();
|
|
||||||
path = (String) m.obj;
|
path = (String) m.obj;
|
||||||
new AuthRequest().upload(con, hd, new File(path));
|
new AuthRequest().upload(con, hd, new File(path));
|
||||||
break;
|
break;
|
||||||
@@ -299,7 +202,6 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
title1 = findViewById(R.id.title1);
|
title1 = findViewById(R.id.title1);
|
||||||
title2 = findViewById(R.id.title2);
|
title2 = findViewById(R.id.title2);
|
||||||
title3 = findViewById(R.id.name1);
|
title3 = findViewById(R.id.name1);
|
||||||
value2 = findViewById(R.id.value2);
|
|
||||||
up_img = findViewById(R.id.up_img);
|
up_img = findViewById(R.id.up_img);
|
||||||
img = findViewById(R.id.img);
|
img = findViewById(R.id.img);
|
||||||
zjimg_name = findViewById(R.id.zjimg_name);
|
zjimg_name = findViewById(R.id.zjimg_name);
|
||||||
@@ -307,7 +209,6 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
tvTips = findViewById(R.id.tvTips);
|
tvTips = findViewById(R.id.tvTips);
|
||||||
value1 = findViewById(R.id.value1);
|
value1 = findViewById(R.id.value1);
|
||||||
llInfo = findViewById(R.id.llInfo);
|
llInfo = findViewById(R.id.llInfo);
|
||||||
llDate = findViewById(R.id.llDate);
|
|
||||||
tvSkip = findViewById(R.id.tvSkip);
|
tvSkip = findViewById(R.id.tvSkip);
|
||||||
submit = findViewById(R.id.submit);
|
submit = findViewById(R.id.submit);
|
||||||
|
|
||||||
@@ -315,12 +216,10 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
submit.setOnClickListener(this);
|
submit.setOnClickListener(this);
|
||||||
upload_img.setOnClickListener(this);
|
upload_img.setOnClickListener(this);
|
||||||
img.setOnClickListener(this);
|
img.setOnClickListener(this);
|
||||||
value2.setOnClickListener(this);
|
|
||||||
|
|
||||||
|
|
||||||
type = getIntent().getExtras().getInt("type");
|
type = getIntent().getExtras().getInt("type");
|
||||||
carId = getIntent().getExtras().getString("carId", "");
|
carId = getIntent().getExtras().getString("carId", "");
|
||||||
carExist = getIntent().getExtras().getBoolean("carExist", false);
|
|
||||||
changeViewByType(type);
|
changeViewByType(type);
|
||||||
|
|
||||||
ur = new UserRequset(con, hd);
|
ur = new UserRequset(con, hd);
|
||||||
@@ -342,7 +241,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
if (requestCode == 12 && resultCode == RESULT_OK) {
|
if (requestCode == 12 && resultCode == RESULT_OK) {
|
||||||
path = gia.getFile().getPath();
|
path = gia.getFile().getPath();
|
||||||
Log.e("图片地址:", path);
|
LogUtil.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
||||||
@@ -355,7 +254,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
paths = image.getPath();
|
paths = image.getPath();
|
||||||
}
|
}
|
||||||
path = paths;
|
path = paths;
|
||||||
Log.e("图片地址:", path);
|
LogUtil.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
}
|
}
|
||||||
@@ -377,14 +276,6 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
case R.id.img:
|
case R.id.img:
|
||||||
showBigImg();
|
showBigImg();
|
||||||
break;
|
break;
|
||||||
case R.id.value2:
|
|
||||||
DatePicker picker = new DatePicker(this);
|
|
||||||
picker.setBodyWidth(300);
|
|
||||||
picker.setOnDatePickedListener((year, month, day) -> value2.setText(year + "-" + month + "-" + day));
|
|
||||||
picker.getWheelLayout().setDateMode(DateMode.YEAR_MONTH_DAY);
|
|
||||||
picker.getWheelLayout().setDateLabel("年", "月", "日");
|
|
||||||
picker.show();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -393,66 +284,37 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
* 展示大图片
|
* 展示大图片
|
||||||
*/
|
*/
|
||||||
private void showBigImg() {
|
private void showBigImg() {
|
||||||
if ((type == 3 && TextUtils.isEmpty(cdb.getData().getRoadLicensePhoto())) || (type == 4 && TextUtils.isEmpty(cdb.getData().getPolicyPhotoUrl()))) {
|
|
||||||
choicePhoto();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
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(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
.asImageViewer(img, cdb.getData().getCarImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
.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(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
.asImageViewer(img, cdb.getData().getNfcImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
.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(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
.asImageViewer(img, cdb.getData().getRegisterImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
.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(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
.asImageViewer(img, cdb.getData().getRoadLicensePhoto(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
.show();
|
.show();
|
||||||
// new XPopup.Builder(con)
|
|
||||||
// .asImageViewer(img, cdb.getData().getRoadLicensePhoto(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
|
||||||
// .show();
|
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
|
||||||
case 4:
|
|
||||||
if (cdb.getData().getPolicyPhotoUrl() != null && !"".equals(cdb.getData().getPolicyPhotoUrl())) {
|
|
||||||
//roadLicensePhoto
|
|
||||||
new XPopup.Builder(con)
|
|
||||||
.asImageViewer(img, cdb.getData().getPolicyPhotoUrl(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
|
||||||
.show();
|
|
||||||
// new XPopup.Builder(con)
|
|
||||||
// .asImageViewer(img, cdb.getData().getRoadLicensePhoto(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
|
||||||
// .show();
|
|
||||||
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -468,14 +330,13 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
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{
|
||||||
Toast.makeText(this, "请上传车辆照片", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "请上传车辆照片", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -489,27 +350,18 @@ 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);
|
||||||
break;
|
break;
|
||||||
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);
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
String s2 = value1.getText().toString();
|
|
||||||
String v2 = value2.getText().toString();
|
|
||||||
if (TextUtils.isEmpty(s2) || TextUtils.isEmpty(v2)) {
|
|
||||||
Toast.makeText(this, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
new AuthRequest().saveTrafficInsurance(con, hd, carId, v2, s2);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -521,38 +373,27 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
if (null != cdb) {
|
if (null != cdb) {
|
||||||
if (0 == type) {
|
if (0 == type) {
|
||||||
if (!TextUtils.isEmpty(cdb.getData().getCarImage())) {
|
if (!TextUtils.isEmpty(cdb.getData().getCarImage())) {
|
||||||
ImageLoader.getInstance().loadImage(con,cdb.getData().getCarImage(),img);
|
Glide.with(con).load(cdb.getData().getCarImage()).into(img);
|
||||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||||
upload_img.setText("已上传");
|
upload_img.setText("已上传");
|
||||||
}
|
}
|
||||||
} else if (1 == type) {
|
} else if (1 == type) {
|
||||||
if (!TextUtils.isEmpty(cdb.getData().getNfcImage())) {
|
if (!TextUtils.isEmpty(cdb.getData().getNfcImage())) {
|
||||||
ImageLoader.getInstance().loadImage(con,cdb.getData().getNfcImage(),img);
|
Glide.with(con).load(cdb.getData().getNfcImage()).into(img);
|
||||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||||
upload_img.setText("已上传");
|
upload_img.setText("已上传");
|
||||||
}
|
}
|
||||||
} else if (2 == type) {
|
} else if (2 == type) {
|
||||||
if (!TextUtils.isEmpty(cdb.getData().getRegisterImage())) {
|
if (!TextUtils.isEmpty(cdb.getData().getRegisterImage())) {
|
||||||
ImageLoader.getInstance().loadImage(con,cdb.getData().getRegisterImage(),img);
|
Glide.with(con).load(cdb.getData().getRegisterImage()).into(img);
|
||||||
value1.setText(cdb.getData().getRegisterNo());
|
value1.setText(cdb.getData().getRegisterNo());
|
||||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||||
upload_img.setText("已上传");
|
upload_img.setText("已上传");
|
||||||
}
|
}
|
||||||
} else if (3 == type) {
|
} else if (3 == type) {
|
||||||
if (!TextUtils.isEmpty(cdb.getData().getRoadLicensePhoto())) {
|
if (!TextUtils.isEmpty(cdb.getData().getRoadLicensePhoto())) {
|
||||||
ImageLoader.getInstance().loadImage(con,cdb.getData().getRoadLicensePhoto(),img);
|
Glide.with(con).load(cdb.getData().getRoadLicensePhoto()).into(img);
|
||||||
value1.setText(cdb.getData().getRoadLicense());
|
value1.setText(cdb.getData().getRoadLicense());
|
||||||
if (!carExist) {
|
|
||||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
|
||||||
upload_img.setText("已上传");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
} else if (4 == type) {
|
|
||||||
if (!TextUtils.isEmpty(cdb.getData().getPolicyPhotoUrl())) {
|
|
||||||
ImageLoader.getInstance().loadImage(con,cdb.getData().getPolicyPhotoUrl(),img);
|
|
||||||
value1.setText(cdb.getData().getInsuranceCompany());
|
|
||||||
value2.setText(cdb.getData().getInsuranceEndDay());
|
|
||||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||||
upload_img.setText("已上传");
|
upload_img.setText("已上传");
|
||||||
}
|
}
|
||||||
@@ -585,8 +426,7 @@ 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) {
|
||||||
@@ -638,13 +478,6 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
tvTips.setText(tips[type]);
|
tvTips.setText(tips[type]);
|
||||||
tvSkip.setVisibility(isShowSkip[type] ? View.GONE : View.VISIBLE);
|
tvSkip.setVisibility(isShowSkip[type] ? View.GONE : View.VISIBLE);
|
||||||
llInfo.setVisibility(isShowEdit[type] ? View.VISIBLE : View.GONE);
|
llInfo.setVisibility(isShowEdit[type] ? View.VISIBLE : View.GONE);
|
||||||
if (type == 4) {
|
|
||||||
value1.setInputType(InputType.TYPE_CLASS_TEXT);
|
|
||||||
llDate.setVisibility(View.VISIBLE);
|
|
||||||
title3.setText("保险公司");
|
|
||||||
}else {
|
|
||||||
value1.setInputType(InputType.TYPE_CLASS_NUMBER);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-39
@@ -14,10 +14,8 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.RefreshCarListEvent;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
import com.dahe.mylibrary.utils.ToastUtils;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.luck.picture.lib.PictureSelector;
|
import com.luck.picture.lib.PictureSelector;
|
||||||
import com.luck.picture.lib.config.PictureConfig;
|
import com.luck.picture.lib.config.PictureConfig;
|
||||||
@@ -36,12 +34,10 @@ 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;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -55,7 +51,6 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
public String carId="";
|
public String carId="";
|
||||||
public static final String DEL_CAR="delete_che";
|
public static final String DEL_CAR="delete_che";
|
||||||
public static final String CAR_AUDIO="CAR_AUDIO";
|
public static final String CAR_AUDIO="CAR_AUDIO";
|
||||||
public static final String APP_INFO="APP_INFO";
|
|
||||||
private int submitIndex=0;
|
private int submitIndex=0;
|
||||||
private BaseBean bb;
|
private BaseBean bb;
|
||||||
private ImageView show_img;
|
private ImageView show_img;
|
||||||
@@ -70,7 +65,7 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
CacheGroup.cacheList.remove(CAR_AUDIO);
|
CacheGroup.cacheList.remove(CAR_AUDIO);
|
||||||
}
|
}
|
||||||
if(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL)!=null){
|
if(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL)!=null){
|
||||||
Log.e("--res--lijia",CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL));
|
LogUtil.e("--res--",CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL));
|
||||||
cdb=gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL), CarDelBean.class);
|
cdb=gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL), CarDelBean.class);
|
||||||
if(cdb.getCode()==200){
|
if(cdb.getCode()==200){
|
||||||
initView(null);
|
initView(null);
|
||||||
@@ -84,8 +79,6 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
bb=gson.fromJson(CacheGroup.cacheList.get(DEL_CAR),BaseBean.class);
|
bb=gson.fromJson(CacheGroup.cacheList.get(DEL_CAR),BaseBean.class);
|
||||||
if (bb.getCode()==200) {
|
if (bb.getCode()==200) {
|
||||||
Toast.makeText(con,"删除成功",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,"删除成功",Toast.LENGTH_SHORT).show();
|
||||||
RefreshCarListEvent ve = new RefreshCarListEvent("");
|
|
||||||
EventBus.getDefault().post(ve);
|
|
||||||
finish();
|
finish();
|
||||||
}else{
|
}else{
|
||||||
Toast.makeText(con,"删除失败:"+bb.getMsg(),Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,"删除失败:"+bb.getMsg(),Toast.LENGTH_SHORT).show();
|
||||||
@@ -166,20 +159,13 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
refreshLayout=findViewById(R.id.srl);
|
refreshLayout=findViewById(R.id.srl);
|
||||||
carId=getIntent().getExtras().getString("carId");
|
carId=getIntent().getExtras().getString("carId");
|
||||||
ur=new UserRequset(con,hd);
|
ur=new UserRequset(con,hd);
|
||||||
Log.e("--carId--",carId+"--");
|
LogUtil.e("--carId--",carId+"--");
|
||||||
initRefreshLoad();
|
initRefreshLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
private GetImageAlert gia=new GetImageAlert();
|
private GetImageAlert gia=new GetImageAlert();
|
||||||
private boolean key1,key2,key3=false;
|
private boolean key1,key2,key3=false;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
EventBus.getDefault().unregister(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initView(Object obj) {
|
public void initView(Object obj) {
|
||||||
super.initView(obj);
|
super.initView(obj);
|
||||||
@@ -221,12 +207,11 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
RelativeLayout r5=v.findViewById(R.id.r5);
|
RelativeLayout r5=v.findViewById(R.id.r5);
|
||||||
RelativeLayout r6=v.findViewById(R.id.r6);
|
RelativeLayout r6=v.findViewById(R.id.r6);
|
||||||
RelativeLayout r7=v.findViewById(R.id.r7);
|
RelativeLayout r7=v.findViewById(R.id.r7);
|
||||||
RelativeLayout r8=v.findViewById(R.id.r8);
|
|
||||||
View vs1=v.findViewById(R.id.vs1);
|
View vs1=v.findViewById(R.id.vs1);
|
||||||
View vs2=v.findViewById(R.id.vs2);
|
View vs2=v.findViewById(R.id.vs2);
|
||||||
r4.setVisibility(View.GONE);
|
r4.setVisibility(View.GONE);
|
||||||
r5.setVisibility(View.GONE);
|
r5.setVisibility(View.GONE);
|
||||||
// vs1.setVisibility(View.GONE);
|
vs1.setVisibility(View.GONE);
|
||||||
vs2.setVisibility(View.GONE);
|
vs2.setVisibility(View.GONE);
|
||||||
if(!"".equals(carId) && cdb.getData().getIsTrailer()==1){
|
if(!"".equals(carId) && cdb.getData().getIsTrailer()==1){
|
||||||
r4.setVisibility(View.VISIBLE);
|
r4.setVisibility(View.VISIBLE);
|
||||||
@@ -237,11 +222,8 @@ 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(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
.asImageViewer(carImage,cdb.getData().getCarImage(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||||
.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 -> {
|
||||||
@@ -316,17 +298,6 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
Toast.makeText(con,"请先绑定挂车",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,"请先绑定挂车",Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
r8.setOnClickListener(v1->{
|
|
||||||
if(!"".equals(carId)){
|
|
||||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
|
||||||
in.putExtra("type", 4);
|
|
||||||
in.putExtra("carId", carId);
|
|
||||||
con.startActivity(in);
|
|
||||||
}else{
|
|
||||||
Toast.makeText(con,"请先绑定行驶证",Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
del.setOnClickListener(v13 -> {
|
del.setOnClickListener(v13 -> {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||||
@@ -366,7 +337,7 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
if (requestCode == 12 && resultCode == RESULT_OK) {
|
if (requestCode == 12 && resultCode == RESULT_OK) {
|
||||||
path=gia.getFile().getPath();
|
path=gia.getFile().getPath();
|
||||||
Log.e("图片地址:",path);
|
LogUtil.e("图片地址:",path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
ImageFileCompressUtil.imageFileCompress(con,new File(path),hd);
|
ImageFileCompressUtil.imageFileCompress(con,new File(path),hd);
|
||||||
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
||||||
@@ -379,7 +350,7 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
paths = image.getPath();
|
paths = image.getPath();
|
||||||
}
|
}
|
||||||
path=paths;
|
path=paths;
|
||||||
Log.e("图片地址:",path);
|
LogUtil.e("图片地址:",path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
ImageFileCompressUtil.imageFileCompress(con,new File(path),hd);
|
ImageFileCompressUtil.imageFileCompress(con,new File(path),hd);
|
||||||
}
|
}
|
||||||
@@ -394,7 +365,7 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
public void initRefreshLoad(){
|
public void initRefreshLoad(){
|
||||||
refreshLayout=findViewById(R.id.srl);
|
refreshLayout=findViewById(R.id.srl);
|
||||||
refreshLayout.setOnRefreshListener(refreshLayout -> {
|
refreshLayout.setOnRefreshListener(refreshLayout -> {
|
||||||
Log.e("下拉刷新","pps");
|
LogUtil.e("下拉刷新","pps");
|
||||||
if("".equals(carId)){
|
if("".equals(carId)){
|
||||||
initView(null);
|
initView(null);
|
||||||
refreshLayout.finishRefresh();
|
refreshLayout.finishRefresh();
|
||||||
@@ -410,9 +381,9 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
super.onResume();
|
super.onResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
|
@Subscribe
|
||||||
public void processResult(VehicleEvent event) {
|
public void processResult(VehicleEvent event) {
|
||||||
Log.e("-msg-",event.getMessage());
|
LogUtil.e("-msg-",event.getMessage());
|
||||||
if(!"挂".equals(event.getMessage())) {
|
if(!"挂".equals(event.getMessage())) {
|
||||||
carId = event.getMessage();
|
carId = event.getMessage();
|
||||||
}
|
}
|
||||||
|
|||||||
+67
-151
@@ -2,7 +2,6 @@ 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;
|
||||||
@@ -10,15 +9,7 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.amap.api.services.core.AMapException;
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
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;
|
||||||
@@ -49,70 +40,53 @@ import okhttp3.Response;
|
|||||||
* @date 2021/9/6 9:59
|
* @date 2021/9/6 9:59
|
||||||
* @description:
|
* @description:
|
||||||
*/
|
*/
|
||||||
public class BusinessActivity extends BaseActivity implements PoiSearch.OnPoiSearchListener {
|
public class BusinessActivity extends BaseActivity {
|
||||||
|
|
||||||
private BaseRecyclerView business_type;
|
private BaseRecyclerView business_type;
|
||||||
private BaseRecyclerView business_list;
|
private BaseRecyclerView business_list;
|
||||||
private LocationGDUtil ld;
|
private LocationGDUtil ld;
|
||||||
private TextView address;
|
private TextView address;
|
||||||
private BusinessListBean blb;
|
private BusinessListBean blb;
|
||||||
private Gson gson = new Gson();
|
private Gson gson=new Gson();
|
||||||
private List<Object> bbs = new ArrayList<>();
|
private List<Object> bbs=new ArrayList<>();
|
||||||
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);
|
||||||
switch (m.what) {
|
switch (m.what){
|
||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
if (CacheGroup.cacheList.get("business_list") != null) {
|
if(CacheGroup.cacheList.get("business_list")!=null){
|
||||||
Log.e("--res--", CacheGroup.cacheList.get("business_list") + "");
|
LogUtil.e("--res--",CacheGroup.cacheList.get("business_list")+"");
|
||||||
blb = gson.fromJson(CacheGroup.cacheList.get("business_list"), BusinessListBean.class);
|
blb=gson.fromJson(CacheGroup.cacheList.get("business_list"),BusinessListBean.class);
|
||||||
if (blb.getCode() == 200) {
|
if(blb.getCode()==200){
|
||||||
forGetBusDel();
|
forGetBusDel();
|
||||||
} else {
|
}else{
|
||||||
Toast.makeText(con, blb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,blb.getMsg(),Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("business_list");
|
CacheGroup.cacheList.remove("business_list");
|
||||||
}
|
}
|
||||||
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);
|
||||||
bbs.add(bds);
|
bbs.add(bds);
|
||||||
initBusListDel();
|
initBusListDel();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
Log.e("aaa", (String) m.obj);
|
LogUtil.e("aaa",(String) m.obj);
|
||||||
BusinessBean.DataDTO bd = gson.fromJson((String) m.obj, BusinessBean.DataDTO.class);
|
BusinessBean.DataDTO bd=gson.fromJson((String) m.obj,BusinessBean.DataDTO.class);
|
||||||
|
|
||||||
if (bd != null) {
|
if(bd!=null){
|
||||||
//if (BeanUtil.isBean(bd.getClass())) {
|
//if (BeanUtil.isBean(bd.getClass())) {
|
||||||
try {
|
try {
|
||||||
business_list.addItemV(bd);
|
business_list.addItemV(bd);
|
||||||
} catch (Exception e) {
|
}catch (Exception e){
|
||||||
Log.e("遇到了", bd.toString());
|
LogUtil.e("遇到了",bd.toString());
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
@@ -125,130 +99,71 @@ public class BusinessActivity extends BaseActivity implements PoiSearch.OnPoiSea
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
StateStyleUtil.stateTextColor(this);
|
StateStyleUtil.stateTextColor(this);
|
||||||
setContentView(R.layout.activity_business);
|
setContentView(R.layout.activity_business);
|
||||||
con = this;
|
con=this;
|
||||||
business_type = findViewById(R.id.business_type);
|
business_type=findViewById(R.id.business_type);
|
||||||
business_list = findViewById(R.id.business_list);
|
business_list=findViewById(R.id.business_list);
|
||||||
address = findViewById(R.id.address);
|
address=findViewById(R.id.address);
|
||||||
try {
|
try {
|
||||||
type = getIntent().getExtras().getString("type");
|
type=getIntent().getExtras().getString("type");
|
||||||
} catch (Exception e) {
|
}catch (Exception e){
|
||||||
type = "餐饮";
|
type="餐饮";
|
||||||
}
|
}
|
||||||
initView(null);
|
initView(null);
|
||||||
customDialog = new CustomDialog(con, "正在定位...");
|
customDialog=new CustomDialog(con, "正在定位...");
|
||||||
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);
|
||||||
list_type.add(new Model("餐饮", R.mipmap.icon_canguan));
|
list_type.add(new Model("餐饮",R.mipmap.icon_canguan));
|
||||||
list_type.add(new Model("住宿", R.mipmap.icon_jiudian));
|
list_type.add(new Model("住宿",R.mipmap.icon_jiudian));
|
||||||
list_type.add(new Model("商店", R.mipmap.icon_shangdian));
|
list_type.add(new Model("商店",R.mipmap.icon_shangdian));
|
||||||
list_type.add(new Model("加油站", R.mipmap.icon_jiayouzhan));
|
list_type.add(new Model("加油站",R.mipmap.icon_jiayouzhan));
|
||||||
list_type.add(new Model("汽车维修", R.mipmap.icon_xiuche));
|
list_type.add(new Model("汽车维修",R.mipmap.icon_xiuche));
|
||||||
business_type.createG(4, con, list_type, R.layout.item_business_type).setOnItemViewListener((position, o, v) -> {
|
business_type.createG(4,con,list_type,R.layout.item_business_type).setOnItemViewListener((position, o, v) -> {
|
||||||
Model m = (Model) o;
|
Model m= (Model) o;
|
||||||
ImageView type_img = v.findViewById(R.id.type_icon);
|
ImageView type_img=v.findViewById(R.id.type_icon);
|
||||||
type_img.setImageResource(m.getType_img());
|
type_img.setImageResource(m.getType_img());
|
||||||
v.setOnClickListener(v1 -> {
|
v.setOnClickListener(v1 -> {
|
||||||
sum = 0;
|
sum=0;
|
||||||
bbs = new ArrayList<>();
|
bbs=new ArrayList<>();
|
||||||
customDialog = new CustomDialog(con, "正在切换...");
|
customDialog=new CustomDialog(con, "正在切换...");
|
||||||
customDialog.show();
|
customDialog.show();
|
||||||
changeType(m.getType_name());
|
new BusinessRequest().GetBusinessList(con,hd,ld.getLongitude()+"",ld.getLatitude()+"",m.getType_name());
|
||||||
// new BusinessRequest().GetBusinessList(con,hd,ld.getLongitude()+"",ld.getLatitude()+"",m.getType_name());
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void forGetBusDel(){
|
||||||
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() {
|
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
//business_list.remo
|
//business_list.remo
|
||||||
Log.e("-数组-", gson.toJson(blb));
|
LogUtil.e("-数组-",gson.toJson(blb));
|
||||||
for (int i = 0; i < blb.getData().getResults().size(); i++) {
|
for (int i=0;i<blb.getData().getResults().size();i++) {
|
||||||
//new BusinessRequest().GetBusiness(con,hd,blb.getData().getResults().get(i).getOpenshopid());
|
//new BusinessRequest().GetBusiness(con,hd,blb.getData().getResults().get(i).getOpenshopid());
|
||||||
String url = "https://openapi.dianping.com/router/poiinfo/detailinfo";
|
String url="https://openapi.dianping.com/router/poiinfo/detailinfo";
|
||||||
requestGet(url + Md5Util.resDelUrl(blb.getData().getResults().get(i).getOpenshopid()));
|
requestGet(url+Md5Util.resDelUrl(blb.getData().getResults().get(i).getOpenshopid()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void initBusListDel() {
|
public void initBusListDel(){
|
||||||
customDialog.dismiss();
|
|
||||||
//开始渲染
|
//开始渲染
|
||||||
business_list.createV(con, poiItems, R.layout.item_business_list).setOnItemViewListener((position, o, v) -> {
|
business_list.createV(con,bbs,R.layout.item_business_list).setOnItemViewListener((position, o, v) -> {
|
||||||
PoiItem bd = (PoiItem) o;
|
BusinessBean.DataDTO bd= (BusinessBean.DataDTO) o;
|
||||||
ImageView img = v.findViewById(R.id.photo_url);
|
v.setOnClickListener(v1 -> {
|
||||||
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);
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void requestGet(String url) {
|
public void requestGet(String url){
|
||||||
OkHttpClient client = new OkHttpClient().newBuilder()
|
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||||
.build();
|
.build();
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
@@ -264,22 +179,22 @@ public class BusinessActivity extends BaseActivity implements PoiSearch.OnPoiSea
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call call, Response response) throws IOException {
|
public void onResponse(Call call, Response response) throws IOException {
|
||||||
if (response.code() == 200) {
|
if(response.code()==200){
|
||||||
String body = response.body().string();
|
String body=response.body().string();
|
||||||
Log.e("-body-", body);
|
LogUtil.e("-body-",body);
|
||||||
BusinessBean bb = gson.fromJson(body, BusinessBean.class);
|
BusinessBean bb=gson.fromJson(body,BusinessBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if(bb.getCode()==200){
|
||||||
sum++;
|
sum++;
|
||||||
//bbs.add(bb.getData());
|
//bbs.add(bb.getData());
|
||||||
if (sum == 1) {
|
if(sum==1){
|
||||||
Log.e("--添加--", bbs.size() + "_" + blb.getData().getResults().size());
|
LogUtil.e("--添加--",bbs.size()+"_"+blb.getData().getResults().size());
|
||||||
MsgUtil.addHdMsgWatBody(hd, 2, gson.toJson(bb.getData()));
|
MsgUtil.addHdMsgWatBody(hd,2,gson.toJson(bb.getData()));
|
||||||
} else {
|
}else{
|
||||||
Log.e("--添加--", bbs.size() + "_" + blb.getData().getResults().size());
|
LogUtil.e("--添加--",bbs.size()+"_"+blb.getData().getResults().size());
|
||||||
MsgUtil.addHdMsgWatBody(hd, 3, gson.toJson(bb.getData()));
|
MsgUtil.addHdMsgWatBody(hd,3,gson.toJson(bb.getData()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}else{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -287,7 +202,8 @@ public class BusinessActivity extends BaseActivity implements PoiSearch.OnPoiSea
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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="1000055";
|
static String app_key="3d4c1b5592f9ae09";
|
||||||
static String appSecret="4e0d1be81540c4d1f0868d329b3229467f071f6c";
|
static String appSecret="642cc46b385264595df7cce271250a1cb782b39c";
|
||||||
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", "c1fc1773a27d47e988725bc6df150626dbda0b4d");
|
requestParam.put("session", "cb2007c78d055247f7f242760173268caef1183a");
|
||||||
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++){
|
||||||
|
|||||||
@@ -1,18 +1,12 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui.home;
|
package com.arpa.hndahesudintocctmsdriver.ui.home;
|
||||||
|
|
||||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Outline;
|
import android.graphics.Outline;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.provider.Settings;
|
|
||||||
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;
|
||||||
@@ -28,7 +22,6 @@ import android.widget.Toast;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.cardview.widget.CardView;
|
import androidx.cardview.widget.CardView;
|
||||||
import androidx.fragment.app.FragmentActivity;
|
|
||||||
|
|
||||||
import com.alct.mdp.MDPLocationCollectionManager;
|
import com.alct.mdp.MDPLocationCollectionManager;
|
||||||
import com.alct.mdp.callback.OnDownloadResultListener;
|
import com.alct.mdp.callback.OnDownloadResultListener;
|
||||||
@@ -42,34 +35,21 @@ import com.amap.api.maps.model.LatLng;
|
|||||||
import com.amap.api.maps.model.Marker;
|
import com.amap.api.maps.model.Marker;
|
||||||
import com.amap.api.maps.model.MarkerOptions;
|
import com.amap.api.maps.model.MarkerOptions;
|
||||||
import com.amap.api.maps.model.MyLocationStyle;
|
import com.amap.api.maps.model.MyLocationStyle;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.BankCardListBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverExpireBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.DriverExpireBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.ImageConfig;
|
import com.arpa.hndahesudintocctmsdriver.bean.ImageConfig;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
||||||
import com.arpa.hndahesudintocctmsdriver.constant.JTTConstant;
|
import com.arpa.hndahesudintocctmsdriver.constant.JTTConstant;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.HomeWaybillEvent;
|
|
||||||
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.request.WalletRequest;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivity;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.news.NewActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.news.NewActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.wallet.UpBankActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.web.WebOnlyOneActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.OneDayShowUtils;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.PermissionUtils;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.dahe.mylibrary.utils.TimeUtil;
|
|
||||||
import com.dahe.mylibrary.utils.ToastUtils;
|
|
||||||
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.core.BasePopupView;
|
|
||||||
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.report.ALProcess;
|
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
||||||
@@ -103,7 +83,6 @@ 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.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.interfaces.SimpleCallback;
|
|
||||||
import com.permissionx.guolindev.PermissionX;
|
import com.permissionx.guolindev.PermissionX;
|
||||||
import com.youth.banner.Banner;
|
import com.youth.banner.Banner;
|
||||||
import com.youth.banner.BannerConfig;
|
import com.youth.banner.BannerConfig;
|
||||||
@@ -114,11 +93,8 @@ import org.greenrobot.eventbus.EventBus;
|
|||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import pub.devrel.easypermissions.EasyPermissions;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author hlh
|
* @author hlh
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
@@ -139,11 +115,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
private HuoYuanListBean hb;
|
private HuoYuanListBean hb;
|
||||||
private Gson gson = new Gson();
|
private Gson gson = new Gson();
|
||||||
private CardView btn_news, btn_loadin, btn_update;
|
private CardView btn_news, btn_loadin, btn_update;
|
||||||
private LinearLayout order_all, llCurWay;
|
private LinearLayout order_all;
|
||||||
|
|
||||||
private TextView tvWaybill, tvGo, tvZX;
|
|
||||||
|
|
||||||
private ImageView ivType;
|
|
||||||
private HuoYuanListBean uab;
|
private HuoYuanListBean uab;
|
||||||
private List<Marker> list = new ArrayList<>();
|
private List<Marker> list = new ArrayList<>();
|
||||||
private HuoYuanListDealBean hdb;
|
private HuoYuanListDealBean hdb;
|
||||||
@@ -152,11 +124,6 @@ public class HomeFragment extends BaseFragment {
|
|||||||
private ImageConfig ic;
|
private ImageConfig ic;
|
||||||
private DriverExpireBean deb;
|
private DriverExpireBean deb;
|
||||||
|
|
||||||
private XToast xToast;
|
|
||||||
|
|
||||||
private boolean isUpAppShow = false;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
super.msgMethod(m);
|
super.msgMethod(m);
|
||||||
@@ -169,67 +136,25 @@ public class HomeFragment extends BaseFragment {
|
|||||||
refreshLayout.finishRefresh(500);
|
refreshLayout.finishRefresh(500);
|
||||||
keys = false;
|
keys = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//银行卡信息接收
|
|
||||||
if (CacheGroup.cacheList.get(dataName2) != null) {
|
|
||||||
BankCardListBean bcb = new Gson().fromJson(CacheGroup.cacheList.get(dataName2), BankCardListBean.class);
|
|
||||||
if (bcb.getCode() == 200) {
|
|
||||||
if (bcb.getData() == null || bcb.getData().getRecords() == null || bcb.getData().getRecords().size() < 1) {
|
|
||||||
new MessageUtils().showSimCenPop(con, "缺少银行卡可能会导致运费无法结算,是否去添加!", "取消", "确认", () -> {
|
|
||||||
Intent in333 = new Intent(con, UpBankActivity.class);
|
|
||||||
startActivity(in333);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Toast.makeText(con, bcb.getMsg(), Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
CacheGroup.cacheList.remove(dataName2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("userdata") != null) {
|
if (CacheGroup.cacheList.get("userdata") != null) {
|
||||||
ub = gson.fromJson(CacheGroup.cacheList.get("userdata"), UserBean.class);
|
ub = gson.fromJson(CacheGroup.cacheList.get("userdata"), UserBean.class);
|
||||||
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();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("userdata");
|
CacheGroup.cacheList.remove("userdata");
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER) != null) {
|
if (CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER) != null) {
|
||||||
Log.e("--sob--", CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER));
|
LogUtil.e("--sob--", CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER));
|
||||||
sob = gson.fromJson(CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER), StartOrderBean.class);
|
sob = gson.fromJson(CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER), StartOrderBean.class);
|
||||||
if (sob.getCode() == 200) {
|
if (sob.getCode() == 200) {
|
||||||
SPUtil.insSP(con, JTTConstant.JTT_DATA_NAME, JTTConstant.JTT_DATA_ORDER_KEY, gson.toJson(sob));
|
SPUtil.insSP(con, JTTConstant.JTT_DATA_NAME, JTTConstant.JTT_DATA_ORDER_KEY, gson.toJson(sob));
|
||||||
initStart();
|
initStart();
|
||||||
StartOrderParts.setStartOrder(con, sob);
|
StartOrderParts.setStartOrder(con, sob);
|
||||||
if (sob.getData() != null && !sob.getData().getWaybillStatus().equals("已取消")) {
|
if (sob.getData() != null) {
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO xData = null;
|
ur.getJtts(sob.getData().getShippingNoteNumber());
|
||||||
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
|
||||||
if (2 == sob.getData().getWayChildren().get(i).getType()) {
|
|
||||||
xData = sob.getData().getWayChildren().get(i);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (xData != null && xData.getStatus() == 3) {
|
|
||||||
SPUtils.remove(con, "curWaybillId");
|
|
||||||
llCurWay.setVisibility(View.GONE);
|
|
||||||
} else {
|
|
||||||
dealCurWay(sob.getData());
|
|
||||||
ur.getJtts(sob.getData().getShippingNoteNumber());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
SPUtils.remove(con, "curWaybillId");
|
|
||||||
llCurWay.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, sob.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, sob.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
@@ -237,26 +162,13 @@ public class HomeFragment extends BaseFragment {
|
|||||||
CacheGroup.cacheList.remove(HuoYuanFragmengt.START_ORDER);
|
CacheGroup.cacheList.remove(HuoYuanFragmengt.START_ORDER);
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("up_app") != null) {
|
if (CacheGroup.cacheList.get("up_app") != null) {
|
||||||
Log.e("up_app", CacheGroup.cacheList.get("up_app"));
|
LogUtil.e("up_app", CacheGroup.cacheList.get("up_app"));
|
||||||
UpAppBean uab = new Gson().fromJson(CacheGroup.cacheList.get("up_app"), UpAppBean.class);
|
UpAppBean uab = new Gson().fromJson(CacheGroup.cacheList.get("up_app"), UpAppBean.class);
|
||||||
if (uab.getCode() == 200) {
|
if (uab.getCode() == 200) {
|
||||||
if (uab.getData() != null) {
|
if (uab.getData() != null) {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.dismissOnBackPressed(false)
|
.dismissOnBackPressed(false)
|
||||||
.dismissOnTouchOutside(false)
|
.dismissOnTouchOutside(false)
|
||||||
.setPopupCallback(new SimpleCallback() {
|
|
||||||
@Override
|
|
||||||
public void onShow(BasePopupView popupView) {
|
|
||||||
super.onShow(popupView);
|
|
||||||
isUpAppShow = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDismiss(BasePopupView popupView) {
|
|
||||||
super.onDismiss(popupView);
|
|
||||||
isUpAppShow = false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.asCustom(new UpAppAlert(con, uab.getData().getDownloadUrl(), uab.getData().getContent(), uab.getData().getVersion(), uab.getData().getForce()))
|
.asCustom(new UpAppAlert(con, uab.getData().getDownloadUrl(), uab.getData().getContent(), uab.getData().getVersion(), uab.getData().getForce()))
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
@@ -264,7 +176,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
CacheGroup.cacheList.remove("up_app");
|
CacheGroup.cacheList.remove("up_app");
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("hl") != null) {
|
if (CacheGroup.cacheList.get("hl") != null) {
|
||||||
Log.e("hl", CacheGroup.cacheList.get("hl"));
|
LogUtil.e("hl", CacheGroup.cacheList.get("hl"));
|
||||||
uab = new Gson().fromJson(CacheGroup.cacheList.get("hl"), HuoYuanListBean.class);
|
uab = new Gson().fromJson(CacheGroup.cacheList.get("hl"), HuoYuanListBean.class);
|
||||||
if (uab.getCode() == 200) {
|
if (uab.getCode() == 200) {
|
||||||
initOrder();
|
initOrder();
|
||||||
@@ -276,40 +188,6 @@ public class HomeFragment extends BaseFragment {
|
|||||||
if (CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA) != null) {
|
if (CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA) != null) {
|
||||||
DriverAuthDataBean dad = gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA), DriverAuthDataBean.class);
|
DriverAuthDataBean dad = gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA), DriverAuthDataBean.class);
|
||||||
if (dad.getCode() == 200) {
|
if (dad.getCode() == 200) {
|
||||||
if (isUpAppShow) {
|
|
||||||
CacheGroup.cacheList.remove(WoDeFragment.AUTH_DATA);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dad.getData() == null) {
|
|
||||||
new MessageUtils().showSimCenPop(con, "该司机缺少身份证,未认证无法接单。是否去添加!", "去添加", () -> {
|
|
||||||
Intent in = new Intent(con, CertificatesActivity.class);
|
|
||||||
in.putExtra("index", 0);
|
|
||||||
startActivity(in);
|
|
||||||
});
|
|
||||||
CacheGroup.cacheList.remove(WoDeFragment.AUTH_DATA);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (dad.getData() != null && TextUtils.isEmpty(dad.getData().getIdcard())) {
|
|
||||||
new MessageUtils().showSimCenPop(con, "该司机缺少身份证,未认证无法接单。是否去添加!", "去添加", () -> {
|
|
||||||
Intent in = new Intent(con, CertificatesActivity.class);
|
|
||||||
in.putExtra("index", 0);
|
|
||||||
startActivity(in);
|
|
||||||
});
|
|
||||||
} else if (dad.getData() != null && TextUtils.isEmpty(dad.getData().getCardNo())) {
|
|
||||||
new MessageUtils().showSimCenPop(con, "该司机缺少银行卡,未认证无法接单。是否去添加!", "去添加", () -> {
|
|
||||||
Intent in333 = new Intent(con, UpBankActivity.class);
|
|
||||||
in333.putExtra("type", 1);
|
|
||||||
startActivity(in333);
|
|
||||||
});
|
|
||||||
} else if (dad.getData() != null && TextUtils.isEmpty(dad.getData().getDriverLicense())) {
|
|
||||||
new MessageUtils().showSimCenPop(con, "该司机缺少驾驶证,未认证无法接单。是否去添加!", "去添加", () -> {
|
|
||||||
Intent in = new Intent(con, CertificatesActivity.class);
|
|
||||||
in.putExtra("index", 0);
|
|
||||||
startActivity(in);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
SPUtil.insSP(con, "data", "authdata", CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA));
|
SPUtil.insSP(con, "data", "authdata", CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA));
|
||||||
if (dad.getData() != null && 100003 == dad.getData().getAuditStatus()) {
|
if (dad.getData() != null && 100003 == dad.getData().getAuditStatus()) {
|
||||||
initAlct();
|
initAlct();
|
||||||
@@ -320,7 +198,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
CacheGroup.cacheList.remove(WoDeFragment.AUTH_DATA);
|
CacheGroup.cacheList.remove(WoDeFragment.AUTH_DATA);
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("dealList") != null) {
|
if (CacheGroup.cacheList.get("dealList") != null) {
|
||||||
Log.e("历史货源", CacheGroup.cacheList.get("dealList"));
|
LogUtil.e("历史货源", CacheGroup.cacheList.get("dealList"));
|
||||||
hdb = gson.fromJson(CacheGroup.cacheList.get("dealList"), HuoYuanListDealBean.class);
|
hdb = gson.fromJson(CacheGroup.cacheList.get("dealList"), HuoYuanListDealBean.class);
|
||||||
if (hdb.getCode() == 200) {
|
if (hdb.getCode() == 200) {
|
||||||
insDeal();
|
insDeal();
|
||||||
@@ -339,7 +217,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
CacheGroup.cacheList.remove("getImage");
|
CacheGroup.cacheList.remove("getImage");
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("driverExpire") != null) {
|
if (CacheGroup.cacheList.get("driverExpire") != null) {
|
||||||
Log.e("过期数据:", CacheGroup.cacheList.get("driverExpire"));
|
LogUtil.e("过期数据:", CacheGroup.cacheList.get("driverExpire"));
|
||||||
deb = gson.fromJson(CacheGroup.cacheList.get("driverExpire"), DriverExpireBean.class);
|
deb = gson.fromJson(CacheGroup.cacheList.get("driverExpire"), DriverExpireBean.class);
|
||||||
if (deb.getCode() == 200) {
|
if (deb.getCode() == 200) {
|
||||||
Intent in = new Intent(con, WebActivity.class);
|
Intent in = new Intent(con, WebActivity.class);
|
||||||
@@ -351,22 +229,16 @@ public class HomeFragment extends BaseFragment {
|
|||||||
in.putExtra("url", deb.getData().getIdCardUpdateUrl());
|
in.putExtra("url", deb.getData().getIdCardUpdateUrl());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!TextUtils.isEmpty(deb.getData().getDriverLicenseUpdateUrl()) || !TextUtils.isEmpty(deb.getData().getIdCardUpdateUrl()) ||
|
if (!"".equals(deb.getData().getDriverLicenseUpdateUrl()) || !"".equals(deb.getData().getIdCardUpdateUrl())) {
|
||||||
!TextUtils.isEmpty(deb.getData().getQualificationUpdateUrl()) || !TextUtils.isEmpty(deb.getData().getRoadLicenseUpdateUrl()) ||
|
new XToast<>(act)
|
||||||
!TextUtils.isEmpty(deb.getData().getInsuranceUpdateUrl())) {
|
.setContentView(R.layout.view_bc)
|
||||||
if (xToast == null) {
|
|
||||||
xToast = new XToast(act);
|
|
||||||
} else if (xToast != null && xToast.isShow()) {
|
|
||||||
xToast.cancel();
|
|
||||||
}
|
|
||||||
xToast.setContentView(R.layout.view_bc)
|
|
||||||
// 设置成可拖拽的
|
// 设置成可拖拽的
|
||||||
.setDraggable()
|
.setDraggable()
|
||||||
// 设置显示时长
|
// 设置显示时长
|
||||||
.setDuration(1000 * 60 * 60 * 12)
|
.setDuration(1000 * 60 * 60 * 12)
|
||||||
.setOnClickListener(R.id.img_kf, (toast, view) -> {
|
.setOnClickListener(R.id.img_kf, (toast, view) -> {
|
||||||
toast.startActivity(in);
|
toast.startActivity(in);
|
||||||
Log.e("-is-", view.isInTouchMode() + "");
|
LogUtil.e("-is-", view.isInTouchMode() + "");
|
||||||
})
|
})
|
||||||
// 设置动画样式
|
// 设置动画样式
|
||||||
//.setAnimStyle(android.R.style.Animation_Translucent)
|
//.setAnimStyle(android.R.style.Animation_Translucent)
|
||||||
@@ -374,22 +246,6 @@ public class HomeFragment extends BaseFragment {
|
|||||||
// 设置窗口背景阴影强度
|
// 设置窗口背景阴影强度
|
||||||
//.setBackgroundDimAmount(0.5f)
|
//.setBackgroundDimAmount(0.5f)
|
||||||
.showAsDropDown(home_top, Gravity.BOTTOM, 1200, 1000);
|
.showAsDropDown(home_top, Gravity.BOTTOM, 1200, 1000);
|
||||||
// new XToast<>(act)
|
|
||||||
// .setContentView(R.layout.view_bc)
|
|
||||||
// // 设置成可拖拽的
|
|
||||||
// .setDraggable()
|
|
||||||
// // 设置显示时长
|
|
||||||
// .setDuration(1000 * 60 * 60 * 12)
|
|
||||||
// .setOnClickListener(R.id.img_kf, (toast, view) -> {
|
|
||||||
// toast.startActivity(in);
|
|
||||||
// Log.e("-is-", view.isInTouchMode() + "");
|
|
||||||
// })
|
|
||||||
// // 设置动画样式
|
|
||||||
// //.setAnimStyle(android.R.style.Animation_Translucent)
|
|
||||||
// // 设置外层是否能被触摸
|
|
||||||
// // 设置窗口背景阴影强度
|
|
||||||
// //.setBackgroundDimAmount(0.5f)
|
|
||||||
// .showAsDropDown(home_top, Gravity.BOTTOM, 1200, 1000);
|
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("driverExpire");
|
CacheGroup.cacheList.remove("driverExpire");
|
||||||
}
|
}
|
||||||
@@ -450,8 +306,8 @@ public class HomeFragment extends BaseFragment {
|
|||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
hyr = new HuoYuanRequset(con, hd);
|
hyr = new HuoYuanRequset(con, hd);
|
||||||
ur = new UserRequset(con, hd);
|
ur = new UserRequset(con, hd);
|
||||||
initView(null);
|
|
||||||
initRefreshLoad();
|
initRefreshLoad();
|
||||||
|
initView(null);
|
||||||
btn_news.setOnClickListener(v -> {
|
btn_news.setOnClickListener(v -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -460,7 +316,6 @@ public class HomeFragment extends BaseFragment {
|
|||||||
});
|
});
|
||||||
btn_update.setOnClickListener(v -> {
|
btn_update.setOnClickListener(v -> {
|
||||||
getRequest();
|
getRequest();
|
||||||
refreshWaybills();
|
|
||||||
});
|
});
|
||||||
home_top.setOnClickListener(v -> {
|
home_top.setOnClickListener(v -> {
|
||||||
if (!UiAuxiliary.isLogin(con)) {
|
if (!UiAuxiliary.isLogin(con)) {
|
||||||
@@ -490,7 +345,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
.setDuration(1000 * 60 * 60 * 12)
|
.setDuration(1000 * 60 * 60 * 12)
|
||||||
.setOnClickListener(R.id.img_kf, (toast, view) -> {
|
.setOnClickListener(R.id.img_kf, (toast, view) -> {
|
||||||
toast.startActivity(in);
|
toast.startActivity(in);
|
||||||
Log.e("-is-", view.isInTouchMode() + "");
|
LogUtil.e("-is-", view.isInTouchMode() + "");
|
||||||
})
|
})
|
||||||
// 设置动画样式
|
// 设置动画样式
|
||||||
//.setAnimStyle(android.R.style.Animation_Translucent)
|
//.setAnimStyle(android.R.style.Animation_Translucent)
|
||||||
@@ -508,7 +363,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
// } catch (UnknownHostException e) {
|
// } catch (UnknownHostException e) {
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
// }
|
// }
|
||||||
// Log.e("-ip-",":"+str);
|
// LogUtil.e("-ip-",":"+str);
|
||||||
// }
|
// }
|
||||||
// }.start();
|
// }.start();
|
||||||
return root;
|
return root;
|
||||||
@@ -518,10 +373,9 @@ public class HomeFragment extends BaseFragment {
|
|||||||
public void initRefreshLoad() {
|
public void initRefreshLoad() {
|
||||||
refreshLayout = root.findViewById(R.id.srl);
|
refreshLayout = root.findViewById(R.id.srl);
|
||||||
refreshLayout.setOnRefreshListener(refreshLayout -> {
|
refreshLayout.setOnRefreshListener(refreshLayout -> {
|
||||||
Log.e("下拉刷新", "pps");
|
LogUtil.e("下拉刷新", "pps");
|
||||||
keys = true;
|
keys = true;
|
||||||
getRequest();
|
getRequest();
|
||||||
refreshWaybills();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -530,7 +384,6 @@ 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);
|
||||||
@@ -559,13 +412,6 @@ public class HomeFragment extends BaseFragment {
|
|||||||
order_box = v.findViewById(R.id.order_box);
|
order_box = v.findViewById(R.id.order_box);
|
||||||
auth_box = v.findViewById(R.id.auth_box);
|
auth_box = v.findViewById(R.id.auth_box);
|
||||||
order_all = v.findViewById(R.id.order_all);
|
order_all = v.findViewById(R.id.order_all);
|
||||||
|
|
||||||
llCurWay = v.findViewById(R.id.llCurWay);
|
|
||||||
tvWaybill = v.findViewById(R.id.tvWaybill);
|
|
||||||
tvGo = v.findViewById(R.id.tvGo);
|
|
||||||
tvZX = v.findViewById(R.id.loadingAddress);
|
|
||||||
ivType = v.findViewById(R.id.ivType);
|
|
||||||
|
|
||||||
ImageView fun_left = v.findViewById(R.id.fun_left);
|
ImageView fun_left = v.findViewById(R.id.fun_left);
|
||||||
ImageView fun_right = v.findViewById(R.id.fun_right);
|
ImageView fun_right = v.findViewById(R.id.fun_right);
|
||||||
fun_left.setOnClickListener(v16 -> startActivity(new Intent(con, OrderListActivity.class)));
|
fun_left.setOnClickListener(v16 -> startActivity(new Intent(con, OrderListActivity.class)));
|
||||||
@@ -620,35 +466,18 @@ public class HomeFragment extends BaseFragment {
|
|||||||
v1.setOnClickListener(v2 -> {
|
v1.setOnClickListener(v2 -> {
|
||||||
switch (position) {
|
switch (position) {
|
||||||
case 0:
|
case 0:
|
||||||
PermissionUtils.Companion.getInstance().showPermissionMessage(getActivity(), "位置权限使用说明", "用于向您推荐可能感兴趣的住宿、饮食、加油站、汽车维修等",
|
//startActivity(new Intent(con, OrderListActivity.class));
|
||||||
new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
|
PermissionX.init(getActivity())
|
||||||
(allGranted, grantedList, deniedList) -> {
|
.permissions(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||||
|
.request((allGranted, grantedList, deniedList) -> {
|
||||||
if (allGranted) {
|
if (allGranted) {
|
||||||
Intent in = new Intent(con, BusinessActivity.class);
|
Intent in = new Intent(con, BusinessActivity.class);
|
||||||
in.putExtra("type", "餐饮");
|
in.putExtra("type", "餐饮");
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
} else {
|
} else {
|
||||||
new MessageUtils().showSimCenPop(con, "缺少定位权限,将无法为您提供服务,去开启!", "取消", "确认", () -> {
|
Toast.makeText(act.getBaseContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
||||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
|
||||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
|
||||||
intent.setData(uri);
|
|
||||||
startActivity(intent);
|
|
||||||
});
|
|
||||||
// Toast.makeText(act.getBaseContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//startActivity(new Intent(con, OrderListActivity.class));
|
|
||||||
// PermissionX.init(getActivity())
|
|
||||||
// .permissions(Manifest.permission.ACCESS_FINE_LOCATION)
|
|
||||||
// .request((allGranted, grantedList, deniedList) -> {
|
|
||||||
// if (allGranted) {
|
|
||||||
// Intent in = new Intent(con, BusinessActivity.class);
|
|
||||||
// in.putExtra("type", "餐饮");
|
|
||||||
// startActivity(in);
|
|
||||||
// } else {
|
|
||||||
// Toast.makeText(act.getBaseContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
//Toast.makeText(con,"定位开启失败,请检查配置项",Toast.LENGTH_LONG).show();
|
//Toast.makeText(con,"定位开启失败,请检查配置项",Toast.LENGTH_LONG).show();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@@ -672,11 +501,6 @@ public class HomeFragment extends BaseFragment {
|
|||||||
in5.putExtra("url", "https://ks.wjx.top/vm/h6Jqu8A.aspx");
|
in5.putExtra("url", "https://ks.wjx.top/vm/h6Jqu8A.aspx");
|
||||||
in5.putExtra("title", "知识竞猜");
|
in5.putExtra("title", "知识竞猜");
|
||||||
startActivity(in5);
|
startActivity(in5);
|
||||||
|
|
||||||
// Intent in = new Intent(getContext(), WebActivity.class);
|
|
||||||
// in.putExtra("url", "http://192.168.1.152:8080");
|
|
||||||
// in.putExtra("title", "隐私政策");
|
|
||||||
// getContext().startActivity(in);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -687,106 +511,11 @@ public class HomeFragment extends BaseFragment {
|
|||||||
initMap();
|
initMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO zData = new StartOrderBean.DataDTO.WayChildrenDTO();
|
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO xData = new StartOrderBean.DataDTO.WayChildrenDTO();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 一装一卸逻辑
|
|
||||||
*
|
|
||||||
* @param data
|
|
||||||
*/
|
|
||||||
private void dealCurWay(StartOrderBean.DataDTO data) {
|
|
||||||
SPUtils.put(con, "curWaybillId", data.getWaybillId());
|
|
||||||
|
|
||||||
for (int i = 0; i < data.getWayChildren().size(); i++) {
|
|
||||||
if (1 == data.getWayChildren().get(i).getType()) {
|
|
||||||
zData = data.getWayChildren().get(i);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < data.getWayChildren().size(); i++) {
|
|
||||||
if (2 == data.getWayChildren().get(i).getType()) {
|
|
||||||
xData = data.getWayChildren().get(i);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
llCurWay.setVisibility(View.VISIBLE);
|
|
||||||
tvWaybill.setText(data.getShippingNoteNumber());
|
|
||||||
tvGo.setText(getGoText(zData.getStatus(), xData.getStatus()));
|
|
||||||
if (data.getWaybillStatus().equals("待装货")) {
|
|
||||||
tvZX.setText(zData.getAddress());
|
|
||||||
ivType.setBackgroundResource(R.mipmap.zhuang);
|
|
||||||
} else {
|
|
||||||
tvZX.setText(xData.getAddress());
|
|
||||||
ivType.setBackgroundResource(R.mipmap.xie);
|
|
||||||
}
|
|
||||||
|
|
||||||
tvGo.setOnClickListener(v -> {
|
|
||||||
int zStatus = zData.getStatus();
|
|
||||||
int xStatus = xData.getStatus();
|
|
||||||
if (zStatus == 0) {//未装货
|
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
|
||||||
in.putExtra("type", 0);
|
|
||||||
in.putExtra("wid", zData.getId() + "");
|
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
|
||||||
in.putExtra("keys", true);
|
|
||||||
startActivity(in);
|
|
||||||
} else if (zStatus == 1 && xStatus == 4) {//已装货未上传回单
|
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
|
||||||
in.putExtra("type", 2);
|
|
||||||
in.putExtra("wid", zData.getId() + "");
|
|
||||||
in.putExtra("h_type", 0);
|
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
|
||||||
startActivity(in);
|
|
||||||
} else if (zStatus == 3 && xStatus == 4) {//已上传装货回单,未卸货
|
|
||||||
int dis = TimeUtil.compareNowDate(TimeUtil.string2Millis(zData.getImageTakenDate(), TimeUtil.DEFAULT_FORMAT4));
|
|
||||||
if (dis > 5) {//大于五分钟可以接单
|
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
|
||||||
in.putExtra("type", 1);
|
|
||||||
in.putExtra("wid", xData.getId() + "");
|
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
|
||||||
in.putExtra("keys", true);
|
|
||||||
startActivity(in);
|
|
||||||
} else {
|
|
||||||
ToastUtils.showToast(con, "请到卸货地再进行卸货操作!");
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (zStatus == 3 && xStatus == 2) {//已卸货,未上传卸货回单
|
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
|
||||||
in.putExtra("type", 2);
|
|
||||||
in.putExtra("wid", xData.getId() + "");
|
|
||||||
in.putExtra("h_type", 1);
|
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
|
||||||
in.putExtra("keys", true);
|
|
||||||
startActivity(in);
|
|
||||||
} else {
|
|
||||||
ToastUtils.showToast(con, "已完成该运单");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getGoText(int zStatus, int xStatus) {
|
|
||||||
if (zStatus == 0) {//未装货
|
|
||||||
return "去装货";
|
|
||||||
} else if (zStatus == 1 && xStatus == 4) {//已装货未上传回单
|
|
||||||
return "装货回单";
|
|
||||||
} else if (zStatus == 3 && xStatus == 4) {//已上传装货回单,未卸货
|
|
||||||
return "去卸货";
|
|
||||||
} else if (zStatus == 3 && xStatus == 2) {//已卸货,未上传卸货回单
|
|
||||||
return "卸货回单";
|
|
||||||
}
|
|
||||||
return "已完成";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void initMap() {
|
public void initMap() {
|
||||||
getRequest();
|
getRequest();
|
||||||
refreshWaybills();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private CustomDialog customDialog;
|
private CustomDialog customDialog;
|
||||||
@@ -799,20 +528,12 @@ public class HomeFragment extends BaseFragment {
|
|||||||
// customDialog=new CustomDialog(con,"加载中...");
|
// customDialog=new CustomDialog(con,"加载中...");
|
||||||
// customDialog.show();
|
// customDialog.show();
|
||||||
ur.upApp();
|
ur.upApp();
|
||||||
// hyr.getHuoYuan(1, 100);
|
hyr.getHuoYuan(1, 100);
|
||||||
ur.getImage(1);
|
ur.getImage(1);
|
||||||
WalletRequest qr = new WalletRequest(con, hd);
|
|
||||||
|
|
||||||
if (UiAuxiliary.isLogin(con)) {
|
if (UiAuxiliary.isLogin(con)) {
|
||||||
// int curWaybillId = (int) SPUtils.get(con, "curWaybillId", -1);
|
|
||||||
ur.User();
|
ur.User();
|
||||||
// if (!OneDayShowUtils.getInstance().todayIsShow(con)) {
|
|
||||||
// qr.getBankCardList();
|
|
||||||
// }
|
|
||||||
ur.getDriverExpire();
|
ur.getDriverExpire();
|
||||||
// hyr.startOrder(curWaybillId == -1 ? 0 : curWaybillId);
|
hyr.startOrder(0);
|
||||||
// hyr.startOrder(0);
|
|
||||||
//获取权限 应用市场审核不通过
|
|
||||||
ur.driverAuthData();
|
ur.driverAuthData();
|
||||||
}
|
}
|
||||||
// oldTime= Calendar.getInstance().getTimeInMillis();
|
// oldTime= Calendar.getInstance().getTimeInMillis();
|
||||||
@@ -868,16 +589,11 @@ public class HomeFragment extends BaseFragment {
|
|||||||
if (sob != null && sob.getData() != null && 0 < sob.getData().getWayChildren().size()) {
|
if (sob != null && sob.getData() != null && 0 < sob.getData().getWayChildren().size()) {
|
||||||
//order_start.setVisibility(View.VISIBLE);
|
//order_start.setVisibility(View.VISIBLE);
|
||||||
SPUtil.insSP(con, "order", "ShippingNoteNumber", sob.getData().getShippingNoteNumber());
|
SPUtil.insSP(con, "order", "ShippingNoteNumber", sob.getData().getShippingNoteNumber());
|
||||||
Log.e("开始轨迹上传服务", "-----");
|
LogUtil.e("开始轨迹上传服务", "-----");
|
||||||
orderNum.setText("运单号:" + sob.getData().getShippingNoteNumber());
|
orderNum.setText("运单号:" + sob.getData().getShippingNoteNumber());
|
||||||
order_state.setText("" + sob.getData().getWaybillStatus());
|
order_state.setText("" + sob.getData().getWaybillStatus());
|
||||||
try {
|
Intent serviceIn = new Intent(con, TrackService.class);
|
||||||
Intent serviceIn = new Intent(con, TrackService.class);
|
getActivity().startService(serviceIn);
|
||||||
getActivity().startService(serviceIn);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
SPUtil.insSP(con, "order", "ShippingNoteNumber", "");
|
SPUtil.insSP(con, "order", "ShippingNoteNumber", "");
|
||||||
order_start.setVisibility(View.GONE);
|
order_start.setVisibility(View.GONE);
|
||||||
@@ -1048,7 +764,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
banner.isAutoPlay(true);
|
banner.isAutoPlay(true);
|
||||||
banner.setIndicatorGravity(BannerConfig.CENTER);
|
banner.setIndicatorGravity(BannerConfig.CENTER);
|
||||||
banner.setOnBannerListener(position -> {//System.out.println("跳转");
|
banner.setOnBannerListener(position -> {//System.out.println("跳转");
|
||||||
Intent in = new Intent(con, WebOnlyOneActivity.class);
|
Intent in = new Intent(con, WebActivity.class);
|
||||||
Intent inL = new Intent(con, LoginActivity.class);
|
Intent inL = new Intent(con, LoginActivity.class);
|
||||||
in.putExtra("url", ic.getData().get(position).getJumpUrl());
|
in.putExtra("url", ic.getData().get(position).getJumpUrl());
|
||||||
in.putExtra("title", ic.getData().get(position).getTitle());
|
in.putExtra("title", ic.getData().get(position).getTitle());
|
||||||
@@ -1068,16 +784,14 @@ 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);
|
||||||
com.dahe.mylibrary.utils.ImageLoader.getInstance().loadImage(con,path,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) {
|
||||||
Log.e("longitude", longitude + "");
|
LogUtil.e("longitude", longitude + "");
|
||||||
Log.e("latitude", latitude + "");
|
LogUtil.e("latitude", latitude + "");
|
||||||
MarkerOptions markerOption = new MarkerOptions();
|
MarkerOptions markerOption = new MarkerOptions();
|
||||||
markerOption.position(new LatLng(latitude, longitude));
|
markerOption.position(new LatLng(latitude, longitude));
|
||||||
View infoWindow = LayoutInflater.from(con).inflate(
|
View infoWindow = LayoutInflater.from(con).inflate(
|
||||||
@@ -1138,7 +852,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
//Log.e("--长度--",aMap.getMapScreenMarkers().size()+"个");
|
//LogUtil.e("--长度--",aMap.getMapScreenMarkers().size()+"个");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1167,65 +881,28 @@ public class HomeFragment extends BaseFragment {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
public void initAlct() {
|
public void initAlct() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
PermissionX.init(getActivity())
|
||||||
// if (!OneDayShowUtils.getInstance().todayIsShowQx(con)){
|
.permissions(Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||||
// boolean b = EasyPermissions.hasPermissions(getActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
Manifest.permission.RECORD_AUDIO)
|
||||||
// Manifest.permission.READ_EXTERNAL_STORAGE,
|
.request((allGranted, grantedList, deniedList) -> {
|
||||||
// Manifest.permission.ACCESS_FINE_LOCATION,
|
if (allGranted) {
|
||||||
// Manifest.permission.ACCESS_COARSE_LOCATION);
|
|
||||||
// if (b) {
|
|
||||||
// ALProcess.verification(con);
|
|
||||||
// }
|
|
||||||
PermissionX.init(getActivity())
|
|
||||||
.permissions(Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
|
||||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
|
||||||
Manifest.permission.ACCESS_FINE_LOCATION,
|
|
||||||
Manifest.permission.ACCESS_BACKGROUND_LOCATION,
|
|
||||||
Manifest.permission.CAMERA,
|
|
||||||
Manifest.permission.ACCESS_COARSE_LOCATION)
|
|
||||||
.request((allGranted, grantedList, deniedList) -> {
|
|
||||||
if (allGranted) {
|
|
||||||
ALProcess.verification(con);
|
|
||||||
} else {
|
|
||||||
boolean accessCoarseLocation = deniedList.contains("android.permission.ACCESS_FINE_LOCATION");
|
|
||||||
boolean contains = deniedList.contains("android.permission.WRITE_EXTERNAL_STORAGE");
|
|
||||||
boolean camear = deniedList.contains("android.permission.CAMERA");
|
|
||||||
if (accessCoarseLocation | contains) {
|
|
||||||
new MessageUtils().showSimCenPop(con, "缺少定位权限或媒体和文件权限,会导致无法结算运费,去开启!", "取消", "确认", () -> {
|
|
||||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
|
||||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
|
||||||
intent.setData(uri);
|
|
||||||
startActivity(intent);
|
|
||||||
});
|
|
||||||
} else if (camear) {
|
|
||||||
new MessageUtils().showSimCenPop(con, "缺少相机权限,会导致无法实名认证,去开启!", "取消", "确认", () -> {
|
|
||||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
|
||||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
|
||||||
intent.setData(uri);
|
|
||||||
startActivity(intent);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
} else {
|
||||||
});
|
|
||||||
// }
|
|
||||||
|
|
||||||
} else {
|
}
|
||||||
ALProcess.verification(con);
|
});
|
||||||
}
|
ALProcess.verification(con);
|
||||||
|
MDPLocationCollectionManager.getInvoices(con, 10, 1, new OnDownloadResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Object o) {
|
||||||
|
LogUtil.e("--成功信息--", new Gson().toJson(o));
|
||||||
|
}
|
||||||
|
|
||||||
// ALProcess.verification(con);
|
@Override
|
||||||
// MDPLocationCollectionManager.getInvoices(con, 10, 1, new OnDownloadResultListener() {
|
public void onFailure(String s, String s1) {
|
||||||
// @Override
|
LogUtil.e("--失败信息--", s + s1);
|
||||||
// public void onSuccess(Object o) {
|
}
|
||||||
// Log.e("--成功信息--", new Gson().toJson(o));
|
});
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onFailure(String s, String s1) {
|
|
||||||
// Log.e("--失败信息--", s + s1);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private MyLocationStyle myLocationStyle;//地图定位样式
|
private MyLocationStyle myLocationStyle;//地图定位样式
|
||||||
@@ -1280,8 +957,8 @@ public class HomeFragment extends BaseFragment {
|
|||||||
double lat = location.getLatitude();
|
double lat = location.getLatitude();
|
||||||
//纬度
|
//纬度
|
||||||
double lng = location.getLongitude();
|
double lng = location.getLongitude();
|
||||||
Log.e("定位信息1", location.getLatitude() + "");
|
LogUtil.e("定位信息1", location.getLatitude() + "");
|
||||||
Log.e("定位信息2", location.getLongitude() + "");
|
LogUtil.e("定位信息2", location.getLongitude() + "");
|
||||||
//实现第一次定位成功,将地图中心移动到定位点
|
//实现第一次定位成功,将地图中心移动到定位点
|
||||||
CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(new
|
CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(new
|
||||||
LatLng(lat, lng), 11);
|
LatLng(lat, lng), 11);
|
||||||
@@ -1289,7 +966,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
} else {
|
} else {
|
||||||
//错误信息
|
//错误信息
|
||||||
String error = bundle.get("errorInfo").toString();
|
String error = bundle.get("errorInfo").toString();
|
||||||
Log.e("Map", error);
|
LogUtil.e("Map", error);
|
||||||
Toast.makeText(con, "地图定位失败" + error, Toast.LENGTH_LONG).show();
|
Toast.makeText(con, "地图定位失败" + error, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1297,40 +974,10 @@ public class HomeFragment extends BaseFragment {
|
|||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void processResult(HomeEvent home) {
|
public void processResult(HomeEvent home) {
|
||||||
Log.e("-res-", home.getMessage());
|
LogUtil.e("-res-", home.getMessage());
|
||||||
initView(null);
|
initView(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart() {
|
|
||||||
super.onStart();
|
|
||||||
// ToastUtils.showToast(con,"onstart");
|
|
||||||
// refreshLayout.autoRefresh();
|
|
||||||
refreshWaybills();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void refreshWaybills() {
|
|
||||||
hyr.getHuoYuan(1, 100);
|
|
||||||
if (UiAuxiliary.isLogin(con)) {
|
|
||||||
int curWaybillId = (int) SPUtils.get(con, "curWaybillId", -1);
|
|
||||||
hyr.startOrder(curWaybillId == -1 ? 0 : curWaybillId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe
|
|
||||||
public void processResult(HomeWaybillEvent home) {
|
|
||||||
// if (home.getMessage() == 1) {
|
|
||||||
// int curWaybillId = (int) SPUtils.get(con, "curWaybillId", -1);
|
|
||||||
// hyr.startOrder(curWaybillId == -1 ? 0 : curWaybillId);
|
|
||||||
// hyr.getHuoYuan(1, 100);
|
|
||||||
// } else {
|
|
||||||
// int curWaybillId = (int) SPUtils.get(con, "curWaybillId", -1);
|
|
||||||
// hyr.startOrder(curWaybillId == -1 ? 0 : curWaybillId);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class Model {
|
class Model {
|
||||||
|
|
||||||
private int imageId;
|
private int imageId;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import androidx.annotation.Nullable;
|
|||||||
|
|
||||||
import com.alct.mdp.MDPLocationCollectionManager;
|
import com.alct.mdp.MDPLocationCollectionManager;
|
||||||
import com.alct.mdp.callback.OnDownloadResultListener;
|
import com.alct.mdp.callback.OnDownloadResultListener;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.haozhang.lib.SlantedTextView;
|
import com.haozhang.lib.SlantedTextView;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
@@ -86,7 +87,7 @@ public class HuoYuanFragmengt extends BaseFragment {
|
|||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
if (!UiAuxiliary.isLogin(con)){
|
if (!UiAuxiliary.isLogin(con)){
|
||||||
if (CacheGroup.cacheList.get("hl")!=null && CacheGroup.cacheList.get("up_app")!=null){
|
if (CacheGroup.cacheList.get("hl")!=null && CacheGroup.cacheList.get("up_app")!=null){
|
||||||
Log.e("未登录货源1",CacheGroup.cacheList.get("hl"));
|
LogUtil.e("未登录货源1",CacheGroup.cacheList.get("hl"));
|
||||||
hb=gson.fromJson(CacheGroup.cacheList.get("hl"),HuoYuanListBean.class);
|
hb=gson.fromJson(CacheGroup.cacheList.get("hl"),HuoYuanListBean.class);
|
||||||
if(hb.getCode()==200){
|
if(hb.getCode()==200){
|
||||||
initView(null);
|
initView(null);
|
||||||
@@ -110,9 +111,9 @@ public class HuoYuanFragmengt extends BaseFragment {
|
|||||||
}else{
|
}else{
|
||||||
if (CacheGroup.cacheList.get("hl")!=null && CacheGroup.cacheList.get(START_ORDER)!=null
|
if (CacheGroup.cacheList.get("hl")!=null && CacheGroup.cacheList.get(START_ORDER)!=null
|
||||||
&& CacheGroup.cacheList.get("userdata")!=null && CacheGroup.cacheList.get("up_app")!=null){
|
&& CacheGroup.cacheList.get("userdata")!=null && CacheGroup.cacheList.get("up_app")!=null){
|
||||||
Log.e("货源",CacheGroup.cacheList.get("hl"));
|
LogUtil.e("货源",CacheGroup.cacheList.get("hl"));
|
||||||
Log.e("user",CacheGroup.cacheList.get("userdata"));
|
LogUtil.e("user",CacheGroup.cacheList.get("userdata"));
|
||||||
Log.e("up_app",CacheGroup.cacheList.get("up_app"));
|
LogUtil.e("up_app",CacheGroup.cacheList.get("up_app"));
|
||||||
hb=gson.fromJson(CacheGroup.cacheList.get("hl"),HuoYuanListBean.class);
|
hb=gson.fromJson(CacheGroup.cacheList.get("hl"),HuoYuanListBean.class);
|
||||||
sob=gson.fromJson(CacheGroup.cacheList.get(START_ORDER),StartOrderBean.class);
|
sob=gson.fromJson(CacheGroup.cacheList.get(START_ORDER),StartOrderBean.class);
|
||||||
user=gson.fromJson(CacheGroup.cacheList.get("userdata"),UserBean.class);
|
user=gson.fromJson(CacheGroup.cacheList.get("userdata"),UserBean.class);
|
||||||
@@ -137,7 +138,7 @@ public class HuoYuanFragmengt extends BaseFragment {
|
|||||||
delCac();
|
delCac();
|
||||||
}
|
}
|
||||||
if(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA)!=null){
|
if(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA)!=null){
|
||||||
Log.e("--认证信息--",CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA));
|
LogUtil.e("--认证信息--",CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA));
|
||||||
DriverAuthDataBean dad=gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA),DriverAuthDataBean.class);
|
DriverAuthDataBean dad=gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA),DriverAuthDataBean.class);
|
||||||
if (dad.getCode()==200) {
|
if (dad.getCode()==200) {
|
||||||
SPUtil.insSP(con,"data","authdata",CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA));
|
SPUtil.insSP(con,"data","authdata",CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA));
|
||||||
@@ -207,7 +208,7 @@ public class HuoYuanFragmengt extends BaseFragment {
|
|||||||
public void initRefreshLoad(){
|
public void initRefreshLoad(){
|
||||||
refreshLayout=root.findViewById(R.id.srl);
|
refreshLayout=root.findViewById(R.id.srl);
|
||||||
refreshLayout.setOnRefreshListener(refreshLayout -> {
|
refreshLayout.setOnRefreshListener(refreshLayout -> {
|
||||||
Log.e("下拉刷新","pps");
|
LogUtil.e("下拉刷新","pps");
|
||||||
delCac();
|
delCac();
|
||||||
hd.sendEmptyMessageDelayed(10, 10000);
|
hd.sendEmptyMessageDelayed(10, 10000);
|
||||||
hyr.getHuoYuan(1,100);
|
hyr.getHuoYuan(1,100);
|
||||||
@@ -230,7 +231,7 @@ public class HuoYuanFragmengt extends BaseFragment {
|
|||||||
list.add(new ManyBean(new model(),R.layout.renzheng));
|
list.add(new ManyBean(new model(),R.layout.renzheng));
|
||||||
if(sob!=null && sob.getData()!=null && sob.getData().getWayChildren().size()>0){
|
if(sob!=null && sob.getData()!=null && sob.getData().getWayChildren().size()>0){
|
||||||
SPUtil.insSP(con,"order","ShippingNoteNumber",sob.getData().getShippingNoteNumber());
|
SPUtil.insSP(con,"order","ShippingNoteNumber",sob.getData().getShippingNoteNumber());
|
||||||
Log.e("开始轨迹上传服务","-----");
|
LogUtil.e("开始轨迹上传服务","-----");
|
||||||
Intent serviceIn=new Intent(con,TrackService.class);
|
Intent serviceIn=new Intent(con,TrackService.class);
|
||||||
getActivity().startService(serviceIn);
|
getActivity().startService(serviceIn);
|
||||||
list.add(new ManyBean(sob.getData(),R.layout.huoyuan_yundan));
|
list.add(new ManyBean(sob.getData(),R.layout.huoyuan_yundan));
|
||||||
@@ -263,11 +264,11 @@ public class HuoYuanFragmengt extends BaseFragment {
|
|||||||
MDPLocationCollectionManager.getInvoices(con, 10, 1, new OnDownloadResultListener() {
|
MDPLocationCollectionManager.getInvoices(con, 10, 1, new OnDownloadResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Object o) {
|
public void onSuccess(Object o) {
|
||||||
Log.e("--成功信息--",new Gson().toJson(o));
|
LogUtil.e("--成功信息--",new Gson().toJson(o));
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("--失败信息--",s+s1);
|
LogUtil.e("--失败信息--",s+s1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -281,7 +282,7 @@ public class HuoYuanFragmengt extends BaseFragment {
|
|||||||
user_state=1;
|
user_state=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.e("--登录状态--",UiAuxiliary.isLogin(con)+"");
|
LogUtil.e("--登录状态--",UiAuxiliary.isLogin(con)+"");
|
||||||
TextView rz=v.findViewById(R.id.rz);
|
TextView rz=v.findViewById(R.id.rz);
|
||||||
TextView state_body=v.findViewById(R.id.state_body);
|
TextView state_body=v.findViewById(R.id.state_body);
|
||||||
state_body.setText(states_body[user_state]);
|
state_body.setText(states_body[user_state]);
|
||||||
@@ -297,7 +298,7 @@ public class HuoYuanFragmengt extends BaseFragment {
|
|||||||
startActivity(in2);
|
startActivity(in2);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Log.e("路径",PushConstant.ORDER_ALL);
|
LogUtil.e("路径",PushConstant.ORDER_ALL);
|
||||||
//ARouter.getInstance().build(PushConstant.ORDER_ALL).navigation();
|
//ARouter.getInstance().build(PushConstant.ORDER_ALL).navigation();
|
||||||
Intent in3=new Intent(con, OrderAllActivity.class);
|
Intent in3=new Intent(con, OrderAllActivity.class);
|
||||||
startActivity(in3);
|
startActivity(in3);
|
||||||
@@ -345,12 +346,12 @@ public class HuoYuanFragmengt extends BaseFragment {
|
|||||||
Button qiang=v1.findViewById(R.id.qiang);
|
Button qiang=v1.findViewById(R.id.qiang);
|
||||||
TextView type_timer=v1.findViewById(R.id.type_timer);
|
TextView type_timer=v1.findViewById(R.id.type_timer);
|
||||||
qiang.setOnClickListener(v22 -> {
|
qiang.setOnClickListener(v22 -> {
|
||||||
Log.e("user",new Gson().toJson(user));
|
LogUtil.e("user",new Gson().toJson(user));
|
||||||
if(UiAuxiliary.isLogin(con) && user!=null){
|
if(UiAuxiliary.isLogin(con) && user!=null){
|
||||||
if(user.getData().getAuditStatus()==100003){
|
if(user.getData().getAuditStatus()==100003){
|
||||||
Intent in=new Intent(con,HuoYunDelActivity.class);
|
Intent in=new Intent(con,HuoYunDelActivity.class);
|
||||||
in.putExtra("id",hdr.getOrderId());
|
in.putExtra("id",hdr.getOrderId());
|
||||||
Log.e("---id---",hdr.getOrderId()+"");
|
LogUtil.e("---id---",hdr.getOrderId()+"");
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
}else{
|
}else{
|
||||||
new XPopup.Builder(act)
|
new XPopup.Builder(act)
|
||||||
@@ -393,12 +394,12 @@ public class HuoYuanFragmengt extends BaseFragment {
|
|||||||
qiang.setText("抢单");
|
qiang.setText("抢单");
|
||||||
}
|
}
|
||||||
v1.setOnClickListener(v2 -> {
|
v1.setOnClickListener(v2 -> {
|
||||||
Log.e("user",new Gson().toJson(user));
|
LogUtil.e("user",new Gson().toJson(user));
|
||||||
if(UiAuxiliary.isLogin(con) && user!=null){
|
if(UiAuxiliary.isLogin(con) && user!=null){
|
||||||
if(user.getData().getAuditStatus()==100003){
|
if(user.getData().getAuditStatus()==100003){
|
||||||
Intent in=new Intent(con,HuoYunDelActivity.class);
|
Intent in=new Intent(con,HuoYunDelActivity.class);
|
||||||
in.putExtra("id",hdr.getOrderId());
|
in.putExtra("id",hdr.getOrderId());
|
||||||
Log.e("---id---",hdr.getOrderId()+"");
|
LogUtil.e("---id---",hdr.getOrderId()+"");
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
}else{
|
}else{
|
||||||
Toast.makeText(con,"请认证之后再接单",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,"请认证之后再接单",Toast.LENGTH_SHORT).show();
|
||||||
|
|||||||
+22
-215
@@ -1,26 +1,14 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui.home;
|
package com.arpa.hndahesudintocctmsdriver.ui.home;
|
||||||
|
|
||||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
|
||||||
|
|
||||||
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.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.Layout;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.text.method.HideReturnsTransformationMethod;
|
|
||||||
import android.text.method.PasswordTransformationMethod;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.inputmethod.EditorInfo;
|
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
|
||||||
import android.widget.CompoundButton;
|
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@@ -30,31 +18,21 @@ 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.bean.WaybillStatusBean;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.FaceEvent;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.HomeWaybillEvent;
|
|
||||||
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.MainActivity;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.PersonalAuthActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.auth.PersonalAuthActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.img.ImageGetUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.img.ImageGetUtil;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
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;
|
||||||
@@ -74,7 +52,6 @@ import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||||
import com.permissionx.guolindev.PermissionX;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
@@ -112,29 +89,14 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
CacheGroup.cacheList.remove(WoDeFragment.VEHICLE_LIST);
|
CacheGroup.cacheList.remove(WoDeFragment.VEHICLE_LIST);
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get(END) != null) {
|
if (CacheGroup.cacheList.get(END) != null) {
|
||||||
Log.e("--end--", CacheGroup.cacheList.get(END));
|
LogUtil.e("--end--", CacheGroup.cacheList.get(END));
|
||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(END), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(END), BaseBean.class);
|
||||||
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());
|
||||||
if (null == bb.getData()) {
|
|
||||||
UiAuxiliary.homeRequest("接单");
|
|
||||||
Intent in = new Intent(con, StartYunDanActivity.class);
|
|
||||||
in.putExtra("id", "0");
|
|
||||||
startActivity(in);
|
|
||||||
finish();
|
|
||||||
} else {
|
|
||||||
Intent intent = new Intent(this, H5Activity.class);
|
|
||||||
intent.putExtra("url", (String) bb.getData());
|
|
||||||
intent.putExtra("view_file", false);
|
|
||||||
intent.putExtra("title", "合同签署");
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
//finish();
|
//finish();
|
||||||
} else {
|
} else {
|
||||||
EventBus.getDefault().post(new HomeWaybillEvent(1));
|
|
||||||
finish();
|
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
}
|
}
|
||||||
@@ -152,62 +114,13 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("jttRes");
|
CacheGroup.cacheList.remove("jttRes");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("orderStatus") != null) {
|
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
|
||||||
customDialog.dismiss();
|
|
||||||
}
|
|
||||||
Log.e("orderStatus", CacheGroup.cacheList.get("orderStatus"));
|
|
||||||
WaybillStatusBean status = gson.fromJson(CacheGroup.cacheList.get("orderStatus"), WaybillStatusBean.class);
|
|
||||||
if (status.getCode() == 200) {
|
|
||||||
if (status.getData() != null) {
|
|
||||||
//执行运单下一步操作
|
|
||||||
new XPopup.Builder(con)
|
|
||||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
|
||||||
.asConfirm("请确认接单", "是否确定承运此运单?",
|
|
||||||
"取消", "确认",
|
|
||||||
() -> {
|
|
||||||
Log.e("--id--", "cid:" + cid + "---wid:" + id);
|
|
||||||
hyr.confirm(cid, id);
|
|
||||||
}, () -> customDialog.dismiss(), false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
|
||||||
.show();
|
|
||||||
} else {//订单已取消
|
|
||||||
new MessageUtils().showSimCenPop(con, "运单异常将无法进行下步操作,请返回首页", "取消", "确定", () -> {
|
|
||||||
SPUtils.remove(con, "curWaybillId");
|
|
||||||
EventBus.getDefault().post(new HomeWaybillEvent(1));
|
|
||||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Toast.makeText(con, status.getMsg(), Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
CacheGroup.cacheList.remove("orderStatus");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
int index = Integer.valueOf((String) m.obj);
|
int index = Integer.valueOf((String) m.obj);
|
||||||
Log.e("--选择车辆--", clb.getData().get(index).getCarNumber());
|
LogUtil.e("--选择车辆--", clb.getData().get(index).getCarNumber());
|
||||||
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://安联用户验证通过,接单
|
|
||||||
hyr.getOrderStatus(id);
|
|
||||||
// new XPopup.Builder(con)
|
|
||||||
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
|
||||||
// .asConfirm("请确认接单", "是否确定承运此运单?",
|
|
||||||
// "取消", "确认",
|
|
||||||
// () -> {
|
|
||||||
// Log.e("--id--", "cid:" + cid + "---wid:" + id);
|
|
||||||
// hyr.confirm(cid, id);
|
|
||||||
// }, () -> customDialog.dismiss(), false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
|
||||||
// .show();
|
|
||||||
break;
|
|
||||||
case 2222://安联用户验证不通过
|
|
||||||
customDialog.dismiss();
|
|
||||||
new MessageUtils().showCenMessage(con, (String) m.obj);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,8 +165,6 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
//2021/02/27记,类型声明错误
|
//2021/02/27记,类型声明错误
|
||||||
ImageButton return_btn = v.findViewById(R.id.return_btn);
|
ImageButton return_btn = v.findViewById(R.id.return_btn);
|
||||||
ImageButton xuan = v.findViewById(R.id.xuan);
|
ImageButton xuan = v.findViewById(R.id.xuan);
|
||||||
CheckBox checkBox = v.findViewById(R.id.cb);
|
|
||||||
TextView totalFreight = v.findViewById(R.id.totalFreight);
|
|
||||||
ImageButton btnFp = v.findViewById(R.id.btnFp);
|
ImageButton btnFp = v.findViewById(R.id.btnFp);
|
||||||
TextView effectiveTime = v.findViewById(R.id.effectiveTime);
|
TextView effectiveTime = v.findViewById(R.id.effectiveTime);
|
||||||
TextView check_contract = v.findViewById(R.id.check_contract);
|
TextView check_contract = v.findViewById(R.id.check_contract);
|
||||||
@@ -264,15 +175,6 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
return_btn.setOnClickListener(v16 -> {
|
return_btn.setOnClickListener(v16 -> {
|
||||||
finish();
|
finish();
|
||||||
});
|
});
|
||||||
totalFreight.setText("****");
|
|
||||||
checkBox.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
|
||||||
if (isChecked) {
|
|
||||||
totalFreight.setText(hyd.getData().getTotalFreight());
|
|
||||||
} else {
|
|
||||||
totalFreight.setText("****");
|
|
||||||
}
|
|
||||||
// totalFreight.setTransformationMethod(isChecked? HideReturnsTransformationMethod.getInstance(): PasswordTransformationMethod.getInstance());
|
|
||||||
});
|
|
||||||
// String textSource = "同意在符合相关税务机关要求的情况下代开<font color='#ff0000'>增值税发票</font>";
|
// String textSource = "同意在符合相关税务机关要求的情况下代开<font color='#ff0000'>增值税发票</font>";
|
||||||
String textSource = "公司已对运输合同条款充分解释说明,本人已充分理解、认可并签署;同意符合税务机关要求下<font color='#ff0000'>代开增值税发票</font>,产生的增值税及附加税本人承担。";
|
String textSource = "公司已对运输合同条款充分解释说明,本人已充分理解、认可并签署;同意符合税务机关要求下<font color='#ff0000'>代开增值税发票</font>,产生的增值税及附加税本人承担。";
|
||||||
tvZzs.setText(Html.fromHtml(textSource));
|
tvZzs.setText(Html.fromHtml(textSource));
|
||||||
@@ -315,11 +217,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
});
|
});
|
||||||
//
|
//
|
||||||
ImageButton xuanze = v.findViewById(R.id.xuanze);
|
ImageButton xuanze = v.findViewById(R.id.xuanze);
|
||||||
|
if (clb != null && clb.getData().size() == 1) {
|
||||||
if (hyd!=null&&hyd.getData()!=null&& !TextUtils.isEmpty(hyd.getData().getCarNumber())){
|
|
||||||
cid = hyd.getData().getCarId();
|
|
||||||
car.setText("选择车辆:" + hyd.getData().getCarNumber());
|
|
||||||
}else if (clb != null && clb.getData().size() == 1) {
|
|
||||||
cid = clb.getData().get(0).getCarId();
|
cid = clb.getData().get(0).getCarId();
|
||||||
car.setText("选择车辆:" + clb.getData().get(0).getCarNumber());
|
car.setText("选择车辆:" + clb.getData().get(0).getCarNumber());
|
||||||
}
|
}
|
||||||
@@ -339,7 +237,20 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
if (cid != null) {
|
if (cid != null) {
|
||||||
// if (fpKey){
|
// if (fpKey){
|
||||||
if (key) {
|
if (key) {
|
||||||
reOrder();
|
new XPopup.Builder(con)
|
||||||
|
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||||
|
.asConfirm("请确认接单", "是否确定承运此运单?",
|
||||||
|
"取消", "确认",
|
||||||
|
new OnConfirmListener() {
|
||||||
|
@Override
|
||||||
|
public void onConfirm() {
|
||||||
|
LogUtil.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();
|
||||||
}
|
}
|
||||||
@@ -373,7 +284,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
HuoYuanDelBean.DataDTO.SendInfoDTO hdsg = (HuoYuanDelBean.DataDTO.SendInfoDTO) o1;
|
HuoYuanDelBean.DataDTO.SendInfoDTO hdsg = (HuoYuanDelBean.DataDTO.SendInfoDTO) o1;
|
||||||
type.setImageResource(R.mipmap.zhuang);
|
type.setImageResource(R.mipmap.zhuang);
|
||||||
String goodsData = "";
|
String goodsData = "";
|
||||||
Log.e("--goodsData--", goodsData);
|
LogUtil.e("--goodsData--", goodsData);
|
||||||
for (int i = 0; i < hdsg.getGoods().size(); i++) {
|
for (int i = 0; i < hdsg.getGoods().size(); i++) {
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
goodsData += "\n" + hdsg.getGoods().get(i).getGoodName() + "|" + hdsg.getGoods().get(i).getGoodNum() + hdsg.getGoods().get(i).getGoodUnit() + "|货物价值(元):" + hdsg.getGoods().get(i).getGoodPrice();
|
goodsData += "\n" + hdsg.getGoods().get(i).getGoodName() + "|" + hdsg.getGoods().get(i).getGoodNum() + hdsg.getGoods().get(i).getGoodUnit() + "|货物价值(元):" + hdsg.getGoods().get(i).getGoodPrice();
|
||||||
@@ -391,7 +302,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
HuoYuanDelBean.DataDTO.PutInfoDTO hdsg = (HuoYuanDelBean.DataDTO.PutInfoDTO) o1;
|
HuoYuanDelBean.DataDTO.PutInfoDTO hdsg = (HuoYuanDelBean.DataDTO.PutInfoDTO) o1;
|
||||||
type.setImageResource(R.mipmap.xie);
|
type.setImageResource(R.mipmap.xie);
|
||||||
String goodsData = "";
|
String goodsData = "";
|
||||||
Log.e("--goodsData--", goodsData);
|
LogUtil.e("--goodsData--", goodsData);
|
||||||
for (int i = 0; i < hdsg.getGoods().size(); i++) {
|
for (int i = 0; i < hdsg.getGoods().size(); i++) {
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
goodsData += "\n" + hdsg.getGoods().get(i).getGoodName() + "|" + hdsg.getGoods().get(i).getGoodNum() + hdsg.getGoods().get(i).getGoodUnit() + "|货物价值(元):" + hdsg.getGoods().get(i).getGoodPrice();
|
goodsData += "\n" + hdsg.getGoods().get(i).getGoodName() + "|" + hdsg.getGoods().get(i).getGoodNum() + hdsg.getGoods().get(i).getGoodUnit() + "|货物价值(元):" + hdsg.getGoods().get(i).getGoodPrice();
|
||||||
@@ -406,55 +317,10 @@ 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.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
|
||||||
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) {
|
||||||
//添加实名/意愿/签署完成之后的逻辑
|
//添加实名/意愿/签署完成之后的逻辑
|
||||||
Log.e("-回调信息-", auth.result);
|
LogUtil.e("-回调信息-", auth.result);
|
||||||
JSONObject jsonObject = JSON.parseObject(auth.result);
|
JSONObject jsonObject = JSON.parseObject(auth.result);
|
||||||
if ("success".equalsIgnoreCase(jsonObject.getString("res"))) {
|
if ("success".equalsIgnoreCase(jsonObject.getString("res"))) {
|
||||||
if ("sign".equalsIgnoreCase(jsonObject.getString("key"))) {
|
if ("sign".equalsIgnoreCase(jsonObject.getString("key"))) {
|
||||||
@@ -485,63 +351,4 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 接单
|
|
||||||
* 先判断安联用户信息验证,随后接单
|
|
||||||
*/
|
|
||||||
private void reOrder() {
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
||||||
try {
|
|
||||||
PermissionX.init(this)
|
|
||||||
.permissions(Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
|
||||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
|
||||||
Manifest.permission.ACCESS_FINE_LOCATION,
|
|
||||||
Manifest.permission.ACCESS_COARSE_LOCATION)
|
|
||||||
.request((allGranted, grantedList, deniedList) -> {
|
|
||||||
if (allGranted) {
|
|
||||||
customDialog = new CustomDialog(con, "正在接单...");
|
|
||||||
customDialog.show();
|
|
||||||
//验证安联用户是否通过
|
|
||||||
ALProcess.verification(con, hd);
|
|
||||||
} else {
|
|
||||||
boolean accessCoarseLocation = deniedList.contains("android.permission.ACCESS_FINE_LOCATION");
|
|
||||||
boolean contains = deniedList.contains("android.permission.WRITE_EXTERNAL_STORAGE");
|
|
||||||
if (accessCoarseLocation | contains) {
|
|
||||||
new MessageUtils().showSimCenPop(con, "缺少定位权限或媒体和文件权限,会导致无法接单,去开启!", "取消", "确认", () -> {
|
|
||||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
|
||||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
|
||||||
intent.setData(uri);
|
|
||||||
startActivity(intent);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
customDialog = new CustomDialog(con, "正在接单...");
|
|
||||||
customDialog.show();
|
|
||||||
//验证安联用户是否通过
|
|
||||||
ALProcess.verification(con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
customDialog = new CustomDialog(con, "正在接单...");
|
|
||||||
customDialog.show();
|
|
||||||
//验证安联用户是否通过
|
|
||||||
ALProcess.verification(con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// customDialog = new CustomDialog(con, "正在接单...");
|
|
||||||
// customDialog.show();
|
|
||||||
// //验证安联用户是否通过
|
|
||||||
// ALProcess.verification(con, hd);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
EventBus.getDefault().unregister(this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.log.LogUtil;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.haozhang.lib.SlantedTextView;
|
import com.haozhang.lib.SlantedTextView;
|
||||||
import com.lxj.xpopup.core.BasePopupView;
|
import com.lxj.xpopup.core.BasePopupView;
|
||||||
@@ -47,7 +48,7 @@ public class OrderAllActivity extends BaseActivity {
|
|||||||
switch (m.what){
|
switch (m.what){
|
||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
if (CacheGroup.cacheList.get(USER_ORDER_LIST)!=null && index==1) {
|
if (CacheGroup.cacheList.get(USER_ORDER_LIST)!=null && index==1) {
|
||||||
Log.e("结果2",CacheGroup.cacheList.get(USER_ORDER_LIST));
|
LogUtil.e("结果2",CacheGroup.cacheList.get(USER_ORDER_LIST));
|
||||||
olb=gson.fromJson(CacheGroup.cacheList.get(USER_ORDER_LIST),OrderListBean.class);
|
olb=gson.fromJson(CacheGroup.cacheList.get(USER_ORDER_LIST),OrderListBean.class);
|
||||||
if(olb.getCode()==200){
|
if(olb.getCode()==200){
|
||||||
initView(null);
|
initView(null);
|
||||||
@@ -81,7 +82,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;
|
||||||
}
|
}
|
||||||
@@ -91,14 +92,14 @@ public class OrderAllActivity extends BaseActivity {
|
|||||||
public void initRefreshLoad() {
|
public void initRefreshLoad() {
|
||||||
refreshLayout =findViewById(R.id.srl);
|
refreshLayout =findViewById(R.id.srl);
|
||||||
refreshLayout.setOnRefreshListener(refreshLayout -> {
|
refreshLayout.setOnRefreshListener(refreshLayout -> {
|
||||||
Log.e("下拉刷新", "pps");
|
LogUtil.e("下拉刷新", "pps");
|
||||||
index=1;
|
index=1;
|
||||||
dataKey=true;
|
dataKey=true;
|
||||||
timer="";
|
timer="";
|
||||||
ur.getListV2(index,10);
|
ur.getListV2(index,10);
|
||||||
});
|
});
|
||||||
refreshLayout.setOnLoadMoreListener(refreshLayout -> {
|
refreshLayout.setOnLoadMoreListener(refreshLayout -> {
|
||||||
Log.e("上拉加载", "次数"+index);
|
LogUtil.e("上拉加载", "次数"+index);
|
||||||
if(dataKey){
|
if(dataKey){
|
||||||
index++;
|
index++;
|
||||||
ur.getListV2(index,10);
|
ur.getListV2(index,10);
|
||||||
@@ -167,7 +168,7 @@ public class OrderAllActivity extends BaseActivity {
|
|||||||
v.setTop(getResources().getDimensionPixelOffset(R.dimen.dp_10));
|
v.setTop(getResources().getDimensionPixelOffset(R.dimen.dp_10));
|
||||||
OrderListBean.DataDTO.ListDTO idl= (OrderListBean.DataDTO.ListDTO) o;
|
OrderListBean.DataDTO.ListDTO idl= (OrderListBean.DataDTO.ListDTO) o;
|
||||||
v.setOnClickListener(v1 -> {
|
v.setOnClickListener(v1 -> {
|
||||||
Log.e("id",idl.getOrderId()+"");
|
LogUtil.e("id",idl.getOrderId()+"");
|
||||||
Intent in=new Intent(con,StartYunDanActivity.class);
|
Intent in=new Intent(con,StartYunDanActivity.class);
|
||||||
in.putExtra("id",idl.getOrderId());
|
in.putExtra("id",idl.getOrderId());
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
@@ -186,11 +187,9 @@ public class OrderAllActivity extends BaseActivity {
|
|||||||
case 200006:
|
case 200006:
|
||||||
state4.setTextColor(getResources().getColor(R.color.blue));
|
state4.setTextColor(getResources().getColor(R.color.blue));
|
||||||
state4.setText(" 已评价");
|
state4.setText(" 已评价");
|
||||||
|
case 200005:
|
||||||
state3.setTextColor(getResources().getColor(R.color.blue));
|
state3.setTextColor(getResources().getColor(R.color.blue));
|
||||||
state3.setText(" 已结算");
|
state3.setText(" 已结算");
|
||||||
case 200005:
|
|
||||||
// state3.setTextColor(getResources().getColor(R.color.blue));
|
|
||||||
// state3.setText(" 已结算");
|
|
||||||
case 200004:
|
case 200004:
|
||||||
state2.setTextColor(getResources().getColor(R.color.blue));
|
state2.setTextColor(getResources().getColor(R.color.blue));
|
||||||
state2.setText(" 已卸货");
|
state2.setText(" 已卸货");
|
||||||
@@ -207,7 +206,7 @@ public class OrderAllActivity extends BaseActivity {
|
|||||||
state4.setText(" 已评价");
|
state4.setText(" 已评价");
|
||||||
}
|
}
|
||||||
SlantedTextView states=v.findViewById(R.id.states);
|
SlantedTextView states=v.findViewById(R.id.states);
|
||||||
Log.e("类型",":"+ld.getDispatchType());
|
LogUtil.e("类型",":"+ld.getDispatchType());
|
||||||
if(ld.getDispatchType()==1){
|
if(ld.getDispatchType()==1){
|
||||||
states.setText("派单");
|
states.setText("派单");
|
||||||
} else if(ld.getDispatchType()==2) {
|
} else if(ld.getDispatchType()==2) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user