Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3b6ba4f1c | ||
|
|
58a3f502da | ||
|
|
80a257273b | ||
|
|
5a846d220d | ||
|
|
01bd0e03ff | ||
|
|
82b1413429 | ||
|
|
8b2007a11d | ||
|
|
d181d819b0 | ||
|
|
1042fbd283 | ||
|
|
f1ffdd31af | ||
|
|
3b7a77c45b | ||
|
|
7fdb48817f | ||
|
|
496319c04b | ||
|
|
86d3599110 | ||
|
|
23ca8f1411 | ||
|
|
cfc32bfe66 | ||
|
|
ab59be9f94 | ||
|
|
e59e2d0fa4 | ||
|
|
041bcaf2ec | ||
|
|
291578cd72 | ||
|
|
1ef4f3b9ca | ||
|
|
ab34920c8f | ||
|
|
63026819f8 | ||
|
|
83fc537c8d | ||
|
|
7a02706b75 | ||
|
|
d78ec09c04 | ||
|
|
40d344e245 | ||
|
|
866a46a7cb | ||
|
|
e4bdf1384f | ||
|
|
cabbe363a9 | ||
|
|
6fc87c0d2e | ||
|
|
61c22800f7 | ||
|
|
deb11d4d99 | ||
|
|
77481c73f6 | ||
|
|
2da410bcd4 | ||
|
|
c6005ee9a1 | ||
|
|
65994b8eda | ||
|
|
df7a29e54b | ||
|
|
7c63bb1d39 | ||
|
|
8bbae1cf92 | ||
|
|
97e0c5f629 | ||
|
|
95667723e9 | ||
|
|
1fd37db329 | ||
|
|
51075e72c8 | ||
|
|
5bc0a041de | ||
|
|
c11974e9c1 | ||
|
|
ccf70796a3 | ||
|
|
7b3abfeafc | ||
|
|
9dc92a1bc7 | ||
|
|
5fdaa0b213 | ||
|
|
446aed1574 | ||
|
|
6f573aee98 | ||
|
|
15bec78cb8 | ||
|
|
3a44129b03 | ||
|
|
96819e08b4 | ||
|
|
db9990eec0 | ||
|
|
a2be579ae9 | ||
|
|
873e0b81cf | ||
|
|
4cba8a8246 | ||
|
|
ba86cfb234 | ||
|
|
6d2656a1f7 | ||
|
|
d9ec95fbc8 | ||
|
|
3c65d1f691 | ||
|
|
c8b6e75d7d | ||
|
|
0e8ea7147f | ||
|
|
9364706365 | ||
|
|
d385764b56 | ||
|
|
eeadd1d196 | ||
|
|
0e9224a034 | ||
|
|
a20d49ecdf | ||
|
|
7a89c41ed2 | ||
|
|
894246456a | ||
|
|
212d12db47 | ||
|
|
9db4b16e24 | ||
|
|
361ad6111c | ||
|
|
8ba586c204 | ||
|
|
c45e623a58 | ||
|
|
b6d43b53e5 | ||
|
|
553dbeed41 | ||
|
|
3e67b50097 | ||
|
|
c6a5363cfe | ||
|
|
ba031f075c | ||
|
|
ef6247fc22 | ||
|
|
9766690957 | ||
|
|
1009561bde | ||
|
|
0d3e35d6f7 | ||
|
|
c1355629eb | ||
|
|
06cc3ba9db | ||
|
|
9202ba437c | ||
|
|
93b36a59b3 | ||
|
|
9600c213d4 | ||
|
|
bc86fdf444 | ||
|
|
bc135b9e98 | ||
|
|
141c38182f | ||
|
|
491c9b8c84 | ||
|
|
ce1356509b | ||
|
|
7e40fef702 | ||
|
|
6071e05014 | ||
|
|
dba86a51e9 | ||
|
|
4e38376f74 | ||
|
|
2842812fb0 | ||
|
|
4dddcc5d96 | ||
|
|
f352932fa9 | ||
|
|
b6645b7d1f | ||
|
|
109a713850 | ||
|
|
fb164ccb15 | ||
|
|
d3915a92a0 | ||
|
|
35c37fdf51 | ||
|
|
c3a3a5cfe6 | ||
|
|
a7aee4af57 | ||
|
|
1c3d20ac43 | ||
|
|
f37ffa779a | ||
|
|
7d60c08e61 | ||
|
|
45d8b3351d | ||
|
|
10a379ed8f | ||
|
|
a44df1ee8c | ||
|
|
50cc329a4d | ||
|
|
360f492b8a | ||
|
|
dc4f34efd7 | ||
|
|
3955131756 | ||
|
|
f4d2048d81 | ||
|
|
244a3f22eb | ||
|
|
205ea6aab8 | ||
|
|
c39513ce13 | ||
|
|
9345621309 | ||
|
|
c686fb4e8f | ||
|
|
8a03631c5e | ||
|
|
278b795190 | ||
|
|
4ceefc82ab | ||
|
|
1ba81f4de4 | ||
|
|
da9bc38e0d | ||
|
|
70fbe8eb6c | ||
|
|
e9179c925e | ||
|
|
ffdfe9cad4 |
+96
-70
@@ -2,8 +2,8 @@ plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-kapt'
|
||||
id 'kotlin-android-extensions'
|
||||
id 'com.huawei.agconnect'
|
||||
id 'kotlin-android-extensions'
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -16,60 +16,50 @@ android {
|
||||
keyPassword '123456'
|
||||
storeFile file('key.jks')
|
||||
storePassword '123456'
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
debug {
|
||||
keyAlias 'key0'
|
||||
keyPassword '123456'
|
||||
storeFile file('key.jks')
|
||||
storePassword '123456'
|
||||
}
|
||||
release {
|
||||
keyAlias 'key0'
|
||||
keyPassword '123456'
|
||||
storeFile file('key.jks')
|
||||
storePassword '123456'
|
||||
}
|
||||
// debug {
|
||||
// keyAlias 'key0'
|
||||
// keyPassword '123456'
|
||||
// storeFile file('key.jks')
|
||||
// storePassword '123456'
|
||||
// }
|
||||
// release {
|
||||
// keyAlias 'key0'
|
||||
// keyPassword '123456'
|
||||
// storeFile file('key.jks')
|
||||
// storePassword '123456'
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.arpa.hndahesudintocctmsdriver"
|
||||
minSdkVersion 22
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 30
|
||||
versionCode 49
|
||||
versionName "3.1.9"
|
||||
versionCode 76
|
||||
versionName "3.4.6"
|
||||
flavorDimensions "CHANNEL_VALUE"
|
||||
flavorDimensions "app_icon"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
javaCompileOptions {
|
||||
|
||||
annotationProcessorOptions {
|
||||
includeCompileClasspath = true
|
||||
arguments = [moduleName :project.getName() ]
|
||||
arguments = [moduleName: project.getName()]
|
||||
}
|
||||
}
|
||||
|
||||
ndk {
|
||||
|
||||
//选择要添加的对应 cpu 类型的 .so 库。
|
||||
abiFilters 'armeabi', 'armeabi-v7a'
|
||||
abiFilters 'armeabi-v7a', '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 {
|
||||
main {
|
||||
jniLibs.srcDirs = ['libs']
|
||||
@@ -80,9 +70,10 @@ android {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.config
|
||||
}
|
||||
debug {
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.config
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
@@ -98,7 +89,7 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
repositories{
|
||||
repositories {
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
}
|
||||
@@ -106,28 +97,54 @@ android {
|
||||
|
||||
productFlavors {
|
||||
qa {
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机"]
|
||||
buildConfigField("String", "OPEN_API_URL", "\"http://192.168.111.244:4009\"")
|
||||
buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"")
|
||||
applicationId "com.arpa.hndahesudintocctmsdriver.text"
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "司机测试",
|
||||
app_icon : "@drawable/diver_logo_text",
|
||||
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 {
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机"]
|
||||
buildConfigField("String", "OPEN_API_URL", "\"https://oapi.alct56.com\"")
|
||||
applicationId "com.arpa.hndahesudintocctmsdriver"
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机",
|
||||
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 "boolean", "isTest", "false"
|
||||
//APP名称,可以在androidMainfest中引用
|
||||
resValue "string", "appName", "大河好运司机"
|
||||
}
|
||||
|
||||
}
|
||||
productFlavors.all { flavor ->
|
||||
flavor.manifestPlaceholders = [CHANNEL_VALUE: name]
|
||||
}
|
||||
// productFlavors.all { flavor ->
|
||||
// flavor.manifestPlaceholders = [CHANNEL_VALUE: name]
|
||||
// }
|
||||
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.outputs.all {
|
||||
def date = new Date().format("MMdd_HH-mm" , TimeZone.getTimeZone("GMT+08"))
|
||||
if(variant.buildType.name.equals('release')){
|
||||
outputFileName = "dhhy-driver-"+date+"-${versionName}.apk"
|
||||
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")
|
||||
def appName = null
|
||||
if (isText == "true") {
|
||||
appName = '大河好运司机测试_'
|
||||
} else {
|
||||
appName = '大河好运司机_'
|
||||
}
|
||||
outputFileName = appName + "${variant.buildType.name}_${defaultConfig.versionName}_${date}.apk"
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
@@ -144,36 +161,39 @@ dependencies {
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
|
||||
implementation 'com.caverock:androidsvg-aar:1.3'
|
||||
|
||||
//当引入的与之前引入的库有重复冲突部分的时候,使用compileOnly
|
||||
implementation files('libs\\mdp_sdk.jar')
|
||||
//压缩工具
|
||||
implementation 'top.zibin:Luban:1.1.3'
|
||||
//角标
|
||||
implementation 'com.haozhang.libary:android-slanted-textview:1.2'
|
||||
//刷新头部,底部样式
|
||||
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-footer-ball:2.0.1' //球脉冲加载
|
||||
implementation 'com.scwang.smart:refresh-footer-classics: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-footer-ball:2.0.1' //球脉冲加载
|
||||
implementation 'com.scwang.smart:refresh-footer-classics:2.0.1' //经典加载
|
||||
//更新版本
|
||||
implementation 'com.github.jenly1314.AppUpdater:app-updater:1.1.0'
|
||||
implementation 'com.github.jenly1314.AppUpdater:app-dialog:1.1.0'
|
||||
implementation 'com.github.jenly1314.AppUpdater:app-updater:1.2.0'
|
||||
implementation 'com.github.jenly1314.AppUpdater:app-dialog:1.2.0'
|
||||
//轮播插件
|
||||
implementation 'com.github.zhpanvip:BannerViewPager:3.5.4'
|
||||
//弹出框
|
||||
//
|
||||
// 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.alibaba:fastjson:1.2.61'
|
||||
implementation 'org.bouncycastle:bcprov-jdk15on:1.55'
|
||||
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 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'com.loopj.android:android-async-http:1.4.9'
|
||||
implementation 'com.j256.ormlite:ormlite-android:4.48'
|
||||
implementation 'com.j256.ormlite:ormlite-core:4.48'
|
||||
implementation "org.permissionsdispatcher:permissionsdispatcher:4.6.0"
|
||||
kapt "org.permissionsdispatcher:permissionsdispatcher-processor:4.6.0"
|
||||
|
||||
compileOnly 'com.github.hotchemi:permissionsdispatcher:2.3.1'
|
||||
annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.3.1'
|
||||
//极光认证
|
||||
implementation 'cn.jiguang.sdk:jverification:2.7.1' // 此处以2.7.1 版本为例。a
|
||||
implementation 'cn.jiguang.sdk:jpush:4.2.4' // 此处以JPush 4.2.4 版本为例。
|
||||
@@ -181,28 +201,34 @@ dependencies {
|
||||
//友盟
|
||||
// 下面各SDK根据宿主App是否使用相关业务按需引入。
|
||||
// 友盟统计SDK
|
||||
implementation 'com.umeng.umsdk:common:9.4.2'// 必选
|
||||
implementation 'com.umeng.umsdk:asms:1.4.1'// 必选
|
||||
implementation 'com.umeng.umsdk:common:9.4.2'// 必选
|
||||
implementation 'com.umeng.umsdk:asms:1.4.1'// 必选
|
||||
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'
|
||||
//EventBus
|
||||
implementation 'org.greenrobot:eventbus:3.1.1'
|
||||
//易签宝
|
||||
implementation(name: 'EsignSDK', ext: 'aar')
|
||||
implementation 'pub.devrel:easypermissions:1.3.0'
|
||||
|
||||
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展示
|
||||
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(name:'EsignSDK', ext:'aar')
|
||||
|
||||
//当引入的与之前引入的库有重复冲突部分的时候,使用compileOnly
|
||||
implementation files('libs\\mdp_sdk.jar')
|
||||
|
||||
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.
@@ -2,6 +2,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.arpa.hndahesudintocctmsdriver">
|
||||
|
||||
<uses-permission android:name="android.permission.CALL_PHONE" />
|
||||
<!-- 白名单 -->
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||
<!-- 基础权限 -->
|
||||
@@ -52,14 +54,14 @@
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.App"
|
||||
android:allowBackup="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:icon="@drawable/diver_logo"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/diver_logo"
|
||||
android:label="@string/appName"
|
||||
android:largeHeap="true"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:replace="android:icon">
|
||||
tools:replace="android:label,android:allowBackup">
|
||||
|
||||
<uses-library
|
||||
android:name="com/alct/mdp"
|
||||
@@ -70,14 +72,14 @@
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait" ></activity>
|
||||
android:screenOrientation="portrait"></activity>
|
||||
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.wallet.WithdrawalActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.wallet.UpBankActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.OrderAllActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -92,10 +94,11 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.PhotoCarActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.VehicleAuthActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivity"
|
||||
android:screenOrientation="portrait">
|
||||
@@ -108,16 +111,45 @@
|
||||
<data android:mimeType="*/*" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivityBC"
|
||||
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="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivity2"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="*/*" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.GetShangChuanActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.AuthQualificationActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.OrderListActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.HuoYunDelActivity"
|
||||
android:screenOrientation="portrait">
|
||||
@@ -130,15 +162,22 @@
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
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
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.login.WelcomeActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
@@ -159,28 +198,33 @@
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.drivercircle.VideoReleaseActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.WebPDFActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.StartYunDanActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.drivercircle.HomePageActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.alert.VehicleChoiceActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.OrderComplaintActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.web.WebActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateAlwaysHidden" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.web.WebOnlyOneActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateAlwaysHidden" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.web.WebKfActivity"
|
||||
android:screenOrientation="portrait"
|
||||
@@ -190,7 +234,7 @@
|
||||
<activity
|
||||
android:name=".ui.news.NewActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateAlwaysHidden" />
|
||||
android:windowSoftInputMode="stateAlwaysHidden" />
|
||||
|
||||
<service
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.service.TrackService"
|
||||
@@ -232,8 +276,8 @@
|
||||
<!--高德地图-->
|
||||
<meta-data
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
android:value="78019612271411eca3af34db91930620" />
|
||||
<!-- android:value="702eaa84675618b8eb69298d9fd42ca3" />-->
|
||||
android:value="${GAODEKEY}" />
|
||||
<!-- android:value="702eaa84675618b8eb69298d9fd42ca3" />-->
|
||||
|
||||
<service android:name="com.amap.api.location.APSService"></service>
|
||||
|
||||
@@ -244,7 +288,7 @@
|
||||
<!-- 极光-->
|
||||
<meta-data
|
||||
android:name="JPUSH_APPKEY"
|
||||
android:value="571d93ae5117da6dee848c92" /> <!-- </>值来自开发者平台取得的AppKey -->
|
||||
android:value="fba6f55621c670d8c1fe9191" /> <!-- </>值来自开发者平台取得的AppKey -->
|
||||
|
||||
<meta-data
|
||||
android:name="JPUSH_CHANNEL"
|
||||
@@ -326,6 +370,56 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".H5Activity"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait">
|
||||
<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">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="demo"
|
||||
android:path="/signBack"
|
||||
android:scheme="esign" />
|
||||
<data
|
||||
android:host="demo"
|
||||
android:path="/realBack"
|
||||
android:scheme="esign" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.push.XService"
|
||||
android:enabled="true"
|
||||
@@ -346,7 +440,7 @@
|
||||
</receiver>
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="com.arpa.hndahesudintocctmsdriver.fileprovider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true"
|
||||
tools:ignore="WrongManifestParent">
|
||||
|
||||
@@ -2,7 +2,10 @@ package com.arpa.hndahesudintocctmsdriver;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.app.Application;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
@@ -11,17 +14,27 @@ import android.util.Log;
|
||||
import com.alct.mdp.MDPLocationCollectionManager;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.net.Api;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.BillLocationUtils;
|
||||
import com.dahe.mylibrary.CommonBaseLibrary;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.esign.esignsdk.EsignSdk;
|
||||
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 cn.jiguang.verifysdk.api.JVerificationInterface;
|
||||
|
||||
public class App extends Application {
|
||||
|
||||
String key = "f9d35b1133cff1f6e3960c89b249e03f";
|
||||
String license = "eQQm7gCZPF58Cy4i9OGkqSdFdDnFF0VSUVpw92WcrNLx7zVbpGJwjQhnKL8b0piApIbOTog5log/S1ZIxoUQogueaG84BQlJfRwKjtvpVWImlmhthQyQd2ogRqGkm3rkVGeG9wK49fzP3g5AtghNF05je2rQWd/Tyy/wutXq0e0rvR/bEckFaZ4BesQaYd0MejFC3lA8BjxNWiuvCKs15e1aRUOU5vwN5wsaTsTHokBIYhioSxOoGgHn6NrX6K9Dsl9uTWZ2dOVK/jEzYsNt6E/1Ww2ck1XmIWdRCQNmCpgikuPT0ACAL/w7UaRoWzM/Pm+akWqyp+bEavHT1Vhug3HAHOSGfOghGw2NerNlyEg8h6cVneMx+TsidnQ0ZG29aqdcLBRsvi26BYJJCA8+0WXjT+73RhS8g97Rfb6h0/W//5Az8UNZ6dp6XvUi2EJXQRhY5hkHiuwWT2W1ik+6wiiURkkrBACKbO1kmZWbVpRIe3Y3pcr3Q/V+oAcyPHRXCxu+JIe/j40/epuRrCyf8yvKsZ2Dnkl4QQmlwNqlW1F/arS+19G6zOG+6VKwtbI01A1R9SU1TYOA5UL/Qpo6Gyi3Ec3/irgQlzkq1rZrOIS4oo6tghul/zcG8rjno3luqHYwIZf8vAVfpwBesIVcANCOIuTRPU3A8vdmUoK/twGIchPapmjlAzLhjZ4KoAbNeMsWu3sN6kF44xofLMghos2X8OtvUA9CMD37v2FpYoM75qavyoivsBAbb6mG0p5TmkZ37BxfaGGP6SYrCa9ygQ==";
|
||||
// String key = "f9d35b1133cff1f6e3960c89b249e03f";
|
||||
String key = "19ac0aa74338e487e45057faf7212401";
|
||||
String license = "HF41uGxM/1i3CtW98DimoA97BlNTAnQ+DiEAihYmZ2jR1jqC4be253joEJbOJgFDIzp5aIoeuXSWWHFaDVfaHL2Pksbq5f8M8EqsVhP9q/i1xGYSYf6MJVlHdMAVLWgR0Kra+n8dVzkSDuZeyJuDsskAmZaGFQN1CqnWYCI1tmV1Tk4A57e9LQMed0U11QWjdshdU2DGqBXKmGE419PdW3NmIxOR2u9iB1OKBmvzCUT8RAYyBzSn/yhU++YJ25g5a8Pb5kOvi+eOh+PEFEcQL6oOp/CF4Iw5nadlsLhc+XEnVJpwL2myZBoSlVcKxrJKbRn1/DIgXBueKKnqhyHKdJlpqI9eghAlRF0p2Q4f23m89mWRZf4nhKzTeXGIjCTFO4TNVucrlGU7tyJcrRCDVdfV24fziH+hB3QGckpuYzzjefr7hZalLRJ/w8dPw/8dCY1wnWq3AJ3zw2g1PzMxl51q7AgdKvwc1ERcGBns0zb8PK6vGKCnJq3uHiJEnslbTI0MEosje+h+OPO7hf2QofErewjI19wHEOv4dTvuFLh3VmGFMObAmov5kI47705fjSxCvAPGATBrfUSwim+5EQ1hanc5IcXe0/nOTiRUNEpZ+x65zVydqAs7490yqQiIUQvPazEwcal7vH2OD54lCcgpxKxqdmGc5/bp5UnqB45+n+iuInV/Q9DMOQVk15uaVZmhS8VaCqH21CmfH/ZGLb9wiEpaRLrPZLKX3bK7MT9Z0/OlDnb2QUKU8LMMIhLuQQntzsf0Wn4kA/0e9QAJJQ==";
|
||||
|
||||
// String license = "eQQm7gCZPF58Cy4i9OGkqSdFdDnFF0VSUVpw92WcrNLx7zVbpGJwjQhnKL8b0piApIbOTog5log/S1ZIxoUQogueaG84BQlJfRwKjtvpVWImlmhthQyQd2ogRqGkm3rkVGeG9wK49fzP3g5AtghNF05je2rQWd/Tyy/wutXq0e0rvR/bEckFaZ4BesQaYd0MejFC3lA8BjxNWiuvCKs15e1aRUOU5vwN5wsaTsTHokBIYhioSxOoGgHn6NrX6K9Dsl9uTWZ2dOVK/jEzYsNt6E/1Ww2ck1XmIWdRCQNmCpgikuPT0ACAL/w7UaRoWzM/Pm+akWqyp+bEavHT1Vhug3HAHOSGfOghGw2NerNlyEg8h6cVneMx+TsidnQ0ZG29aqdcLBRsvi26BYJJCA8+0WXjT+73RhS8g97Rfb6h0/W//5Az8UNZ6dp6XvUi2EJXQRhY5hkHiuwWT2W1ik+6wiiURkkrBACKbO1kmZWbVpRIe3Y3pcr3Q/V+oAcyPHRXCxu+JIe/j40/epuRrCyf8yvKsZ2Dnkl4QQmlwNqlW1F/arS+19G6zOG+6VKwtbI01A1R9SU1TYOA5UL/Qpo6Gyi3Ec3/irgQlzkq1rZrOIS4oo6tghul/zcG8rjno3luqHYwIZf8vAVfpwBesIVcANCOIuTRPU3A8vdmUoK/twGIchPapmjlAzLhjZ4KoAbNeMsWu3sN6kF44xofLMghos2X8OtvUA9CMD37v2FpYoM75qavyoivsBAbb6mG0p5TmkZ37BxfaGGP6SYrCa9ygQ==";
|
||||
|
||||
public final static int APP_STATUS_KILLED = 0; // 表示应用是被杀死后在启动的
|
||||
public final static int APP_STATUS_NORMAL = 1; // 表示应用时正常的启动流程
|
||||
@@ -34,6 +47,7 @@ public class App extends Application {
|
||||
mApplication = this;
|
||||
con = getBaseContext();
|
||||
CommonBaseLibrary.getInstance().init(this, Api.BASE_URL);
|
||||
CrashReport.initCrashReport(getApplicationContext(), "0fa55ffad8", false);
|
||||
String state = SPUtil.getSP(con, "state_data", "authorization_state");
|
||||
if ("1".equals(state)) {
|
||||
try {
|
||||
@@ -45,12 +59,12 @@ public class App extends Application {
|
||||
//安联初始化
|
||||
if (context.getPackageName().equals(getCurrentProcessName(context))) {
|
||||
//Log.e("--使用的测试环境--",BuildConfig.OPEN_API_URL);
|
||||
MDPLocationCollectionManager.initialize(this, "https://oapi.alct56.com");
|
||||
MDPLocationCollectionManager.initialize(this, BuildConfig.OPEN_AL_URL);
|
||||
}
|
||||
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
||||
// 路由初始化
|
||||
JVerificationInterface.setDebugMode(true);
|
||||
JVerificationInterface.init(this, 5000, (code, msg) -> Log.d("tag", "code = " + code + " msg = " + msg));
|
||||
// JVerificationInterface.setDebugMode(true);
|
||||
// JVerificationInterface.init(this, 5000, (code, msg) -> Log.d("tag", "code = " + code + " msg = " + msg));
|
||||
//友盟
|
||||
//设置非debug版本开启
|
||||
if (!isDebugVersion(con)) {
|
||||
@@ -63,6 +77,30 @@ public class App extends Application {
|
||||
Log.e("-error-", "初始化失败sss");
|
||||
}
|
||||
}
|
||||
|
||||
// PendingIntent pendingIntent =
|
||||
// PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
// Cactus.getInstance()
|
||||
// .isDebug(true)
|
||||
// //可选,设置通知栏点击事件
|
||||
// .setPendingIntent(pendingIntent)
|
||||
//// .setBackgroundMusicEnabled(true)//可选,退到后台是否可以播放音乐
|
||||
//// .setMusicId(R.raw.main) //可选,设置音乐
|
||||
//// .setPendingIntent(pendingIntent)//可选,设置通知栏点击事件
|
||||
//// .addCallback(new CactusCallback())//可选,运行时回调
|
||||
// .setCrashRestartUIEnabled(true) //可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
||||
// .setCrashRestartUIEnabled(true)//可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
||||
// .setTitle("大河好运")
|
||||
// .setSmallIcon(R.drawable.diver_logo)
|
||||
// .addBackgroundCallback(new CactusBackgroundCallback() {
|
||||
// @Override
|
||||
// public void onBackground(boolean b) {
|
||||
// if (b){
|
||||
// getBillLocation();
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// .register(this);
|
||||
}
|
||||
|
||||
public static App getApp() {
|
||||
@@ -83,6 +121,10 @@ public class App extends Application {
|
||||
UMConfigure.init(getApplicationContext(), UMConfigure.DEVICE_TYPE_PHONE, "");
|
||||
}
|
||||
|
||||
private void getBillLocation() {
|
||||
BillLocationUtils.getInstance().getBillLocation(con);
|
||||
}
|
||||
|
||||
private static String getCurrentProcessName(Context context) {
|
||||
String currentProcessName = "";
|
||||
int pid = android.os.Process.myPid();
|
||||
|
||||
@@ -0,0 +1,566 @@
|
||||
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");
|
||||
if (TextUtils.isEmpty(url)) {
|
||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
||||
return;
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,485 @@
|
||||
package com.arpa.hndahesudintocctmsdriver;
|
||||
|
||||
import static android.webkit.WebSettings.LOAD_NO_CACHE;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.net.http.SslError;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.webkit.ConsoleMessage;
|
||||
import android.webkit.CookieManager;
|
||||
import android.webkit.CookieSyncManager;
|
||||
import android.webkit.JsPromptResult;
|
||||
import android.webkit.JsResult;
|
||||
import android.webkit.PermissionRequest;
|
||||
import android.webkit.SslErrorHandler;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebResourceError;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.event.FaceEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StatusBar;
|
||||
import com.esign.esignsdk.h5.base.WBH5FaceVerifySDK;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
import pub.devrel.easypermissions.EasyPermissions;
|
||||
import qiu.niorgai.StatusBarCompat;
|
||||
|
||||
/**
|
||||
* @author xingtian on 2019/3/25
|
||||
*/
|
||||
public class H5Activity2 extends AppCompatActivity {
|
||||
|
||||
public static final int REQUEST_PERMISSION_STORAGE = 0x00;
|
||||
public static final int REQUEST_PERMISSION_CAMERA = 0x01;
|
||||
|
||||
public final static String SCHEMA_REAL = "esign://demo/realBack";
|
||||
|
||||
public final static String SCHEMA_SIGN = "esign://demo/signBack";
|
||||
|
||||
private WebView mWebView;
|
||||
|
||||
String curUrl = null;
|
||||
boolean viewFile = false;
|
||||
|
||||
long time = System.currentTimeMillis();
|
||||
|
||||
ValueCallback<Uri> uploadMessage;
|
||||
private ValueCallback<Uri[]> uploadMessageAboveL;
|
||||
private final static int FILE_CHOOSER_RESULT_CODE = 10000;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
super.setContentView(R.layout.activity_h5);
|
||||
StatusBarCompat.setStatusBarColor(this, ContextCompat.getColor(this, R.color.white), 0);
|
||||
StatusBar.changeToLightStatusBar(this); //黑色 下边白色
|
||||
|
||||
mWebView = findViewById(R.id.webview);
|
||||
// ImageView back = findViewById(R.id.back);
|
||||
// TextView close = findViewById(R.id.close);
|
||||
WebSettings webSetting = mWebView.getSettings();
|
||||
|
||||
// back.setOnClickListener(v -> {
|
||||
// if (mWebView.canGoBack()) {
|
||||
// mWebView.goBack();
|
||||
// } else {
|
||||
// finish();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// close.setOnClickListener(v -> {
|
||||
// if (mWebView.canGoBack()) {
|
||||
// mWebView.goBack();
|
||||
// } else {
|
||||
// finish();
|
||||
// }
|
||||
// });
|
||||
|
||||
webSetting.setJavaScriptEnabled(true);
|
||||
webSetting.setDomStorageEnabled(true);
|
||||
// webSetting.setAppCacheMaxSize(1024 * 1024 * 8);
|
||||
webSetting.setUseWideViewPort(true);
|
||||
webSetting.setLoadWithOverviewMode(true);
|
||||
webSetting.setAllowFileAccess(true);
|
||||
// webSetting.setAppCacheEnabled(true);
|
||||
String appCachePath = getApplication().getCacheDir().getAbsolutePath();
|
||||
// webSetting.setAppCachePath(appCachePath);
|
||||
webSetting.setDatabaseEnabled(true);
|
||||
webSetting.setCacheMode(LOAD_NO_CACHE);
|
||||
webSetting.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
WebView.setWebContentsDebuggingEnabled(true);
|
||||
}
|
||||
|
||||
CookieSyncManager.createInstance(this);
|
||||
CookieManager cookieManager = CookieManager.getInstance();
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
cookieManager.setAcceptThirdPartyCookies(mWebView, true);
|
||||
}
|
||||
cookieManager.setAcceptCookie(true);
|
||||
|
||||
|
||||
mWebView.setWebViewClient(new MyWebViewClient());
|
||||
mWebView.setWebChromeClient(new H5FaceWebChromeClient(this));
|
||||
|
||||
WBH5FaceVerifySDK.getInstance().setWebViewSettings(mWebView, getApplicationContext());
|
||||
|
||||
processExtraData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
mWebView.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
mWebView.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
mWebView.stopLoading();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
try {
|
||||
if (mWebView != null) {
|
||||
mWebView.removeAllViews();
|
||||
mWebView.destroy();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
setIntent(intent);
|
||||
processExtraData();
|
||||
}
|
||||
|
||||
private void processExtraData() {
|
||||
|
||||
Intent intent = getIntent();
|
||||
Uri uri = intent.getData();
|
||||
Log.e("test", "===" + uri);
|
||||
if (uri != null) {
|
||||
// 芝麻认证刷脸结束返回获取后续操作页面地址
|
||||
// String callbackUrl = uri.getQueryParameter("callback");
|
||||
|
||||
String callbackUrl = uri.getQueryParameter("realnameUrl");
|
||||
if (!TextUtils.isEmpty(callbackUrl)) {
|
||||
try {
|
||||
mWebView.loadUrl(URLDecoder.decode(callbackUrl, "utf-8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
String url = intent.getStringExtra("url");
|
||||
viewFile = intent.getBooleanExtra("view_file", false);
|
||||
if (url.startsWith("alipay")) {
|
||||
|
||||
try {
|
||||
Intent intent2 = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
startActivity(intent2);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
if (curUrl == null) {
|
||||
curUrl = url;
|
||||
}
|
||||
mWebView.loadUrl(url);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class MyWebViewClient extends WebViewClient {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
if (url == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Uri uri = Uri.parse(url);
|
||||
Log.e("test", "要加载的地址:" + uri.getScheme() + " " + url + " ");
|
||||
if (uri.getScheme().equals("http") || uri.getScheme().equals("https")) {
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
} else if (uri.getScheme().equals("js") || uri.getScheme().equals("jsbridge")) {
|
||||
|
||||
// js://signCallback?signResult=true 签署结果
|
||||
if (uri.getAuthority().equals("signCallback")) {
|
||||
if (viewFile) {
|
||||
view.loadUrl(curUrl);
|
||||
return true;
|
||||
} else {
|
||||
if (url.contains("signResult")) {
|
||||
boolean signResult = uri.getBooleanQueryParameter("signResult", false);
|
||||
Toast.makeText(H5Activity2.this, "签署结果: " + " signResult = " + signResult, Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
String tsignCode = uri.getQueryParameter("tsignCode");
|
||||
if ("0".equals(tsignCode)) {
|
||||
tsignCode = "签署成功";
|
||||
} else {
|
||||
tsignCode = "签署失败";
|
||||
}
|
||||
Toast.makeText(H5Activity2.this, "签署结果: " + tsignCode, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
//js://tsignRealBack?esignAppScheme=esign://app/callback&serviceId=854677892133554052&verifycode=4a52e2af0d0abfb7b285c4f05b5af133&status=true&passed=true
|
||||
//实名结果
|
||||
if (uri.getAuthority().equals("tsignRealBack")) {
|
||||
//实名结果字段
|
||||
if (uri.getQueryParameter("verifycode") != null) {
|
||||
String realVerifyCode = uri.getQueryParameter("verifycode");
|
||||
}
|
||||
// 实名认证结束 返回按钮/倒计时返回/暂不认证
|
||||
boolean status = uri.getBooleanQueryParameter("status", false);
|
||||
if (status) {
|
||||
//认证成功返回
|
||||
new Handler().postDelayed(() -> {
|
||||
FaceEvent he = new FaceEvent("刷脸成功");
|
||||
EventBus.getDefault().post(he);
|
||||
finish();
|
||||
}, 800);
|
||||
Toast.makeText(H5Activity2.this, "认证成功", Toast.LENGTH_LONG).show();
|
||||
// finish();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else if (url.startsWith(SCHEMA_REAL)) {
|
||||
//esign://app/realBack&serviceId=854677892133554052&verifycode=4a52e2af0d0abfb7b285c4f05b5af133&status=true&passed=true
|
||||
|
||||
//实名结果
|
||||
if (uri.getQueryParameter("verifycode") != null) {
|
||||
String realVerifyCode = uri.getQueryParameter("verifycode");
|
||||
}
|
||||
// 实名认证结束 返回按钮/倒计时返回/暂不认证
|
||||
boolean status = uri.getBooleanQueryParameter("status", false);
|
||||
if (status) {
|
||||
//认证成功返回
|
||||
new Handler().postDelayed(() -> {
|
||||
FaceEvent he = new FaceEvent("刷脸成功");
|
||||
EventBus.getDefault().post(he);
|
||||
finish();
|
||||
}, 800);
|
||||
Toast.makeText(H5Activity2.this, "认证成功", Toast.LENGTH_LONG).show();
|
||||
// finish();
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if (url.startsWith(SCHEMA_SIGN)) {
|
||||
// js://signCallback?signResult=true 签署结果
|
||||
if (url.contains("signResult")) {
|
||||
boolean signResult = uri.getBooleanQueryParameter("signResult", false);
|
||||
Toast.makeText(H5Activity2.this, "签署结果: " + " signResult = " + signResult, Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
String tsignCode = uri.getQueryParameter("tsignCode");
|
||||
if ("0".equals(tsignCode)) {
|
||||
//延时1.5秒跳转运单详情页面
|
||||
// new Handler().postDelayed(() -> {
|
||||
// FaceEvent he = new FaceEvent("刷脸成功");
|
||||
// EventBus.getDefault().post(he);
|
||||
// finish();
|
||||
// }, 800);
|
||||
tsignCode = "签署成功";
|
||||
} else {
|
||||
tsignCode = "签署失败";
|
||||
}
|
||||
Toast.makeText(H5Activity2.this, "签署结果: " + tsignCode, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
// finish();
|
||||
return true;
|
||||
} else if (uri.getScheme().equals("alipays")) {
|
||||
// 跳转到支付宝刷脸
|
||||
// alipays://platformapi/startapp?appId=20000067&pd=NO&url=https%3A%2F%2Fzmcustprod.zmxy.com.cn%2Fcertify%2Fbegin.htm%3Ftoken%3DZM201811133000000050500431389414
|
||||
try {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
startActivity(intent);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
|
||||
super.onReceivedError(view, request, error);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
||||
// super.onReceivedSslError(view, handler, error);
|
||||
handler.proceed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
super.onPageStarted(view, url, favicon);
|
||||
time = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadResource(WebView view, String url) {
|
||||
super.onLoadResource(view, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class H5FaceWebChromeClient extends WebChromeClient {
|
||||
private Activity activity;
|
||||
|
||||
public H5FaceWebChromeClient(Activity mActivity) {
|
||||
this.activity = mActivity;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onReceivedTitle(WebView view, String title) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) {
|
||||
return super.onJsPrompt(view, url, message, defaultValue, result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onJsConfirm(WebView view, String url, String message, JsResult result) {
|
||||
return super.onJsConfirm(view, url, message, result);
|
||||
}
|
||||
|
||||
@TargetApi(8)
|
||||
@Override
|
||||
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
|
||||
return super.onConsoleMessage(consoleMessage);
|
||||
}
|
||||
|
||||
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
|
||||
if (WBH5FaceVerifySDK.getInstance().recordVideoForApiBelow21(uploadMsg, acceptType, activity)) {
|
||||
return;
|
||||
}
|
||||
uploadMessage = uploadMsg;
|
||||
}
|
||||
|
||||
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) {
|
||||
if (WBH5FaceVerifySDK.getInstance().recordVideoForApiBelow21(uploadMsg, acceptType, activity)) {
|
||||
return;
|
||||
}
|
||||
uploadMessage = uploadMessage;
|
||||
}
|
||||
|
||||
@TargetApi(21)
|
||||
@Override
|
||||
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
|
||||
if (WBH5FaceVerifySDK.getInstance().recordVideoForApi21(webView, filePathCallback, activity, fileChooserParams)) {
|
||||
return true;
|
||||
}
|
||||
uploadMessageAboveL = filePathCallback;
|
||||
recordVideo(H5Activity2.this);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPermissionRequest(PermissionRequest request) {
|
||||
request.grant(request.getResources());
|
||||
request.getOrigin();
|
||||
}
|
||||
}
|
||||
|
||||
public void recordVideo(Activity activity) {
|
||||
if (EasyPermissions.hasPermissions(activity, Manifest.permission.CAMERA)) {
|
||||
try {
|
||||
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.putExtra("android.intent.extras.CAMERA_FACING", 1); // 调用前置摄像头
|
||||
activity.startActivityForResult(intent, FILE_CHOOSER_RESULT_CODE);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
EasyPermissions.requestPermissions(activity, "请同意使用相机功能", REQUEST_PERMISSION_CAMERA, Manifest.permission.CAMERA);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
if (mWebView.canGoBack()) {
|
||||
mWebView.goBack();
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (WBH5FaceVerifySDK.getInstance().receiveH5FaceVerifyResult(requestCode, resultCode, data)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (requestCode == FILE_CHOOSER_RESULT_CODE) {
|
||||
if (null == uploadMessage && null == uploadMessageAboveL) {
|
||||
return;
|
||||
}
|
||||
Uri result = data == null || resultCode != RESULT_OK ? null : data.getData();
|
||||
if (uploadMessageAboveL != null) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
uploadMessageAboveL.onReceiveValue(new Uri[]{result});
|
||||
uploadMessageAboveL = null;
|
||||
} else {
|
||||
uploadMessageAboveL.onReceiveValue(new Uri[]{});
|
||||
uploadMessageAboveL = null;
|
||||
}
|
||||
} else if (uploadMessage != null) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
uploadMessage.onReceiveValue(result);
|
||||
uploadMessage = null;
|
||||
} else {
|
||||
uploadMessage.onReceiveValue(Uri.EMPTY);
|
||||
uploadMessage = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
WBH5FaceVerifySDK.getInstance().recordVideo(this);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
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,6 +66,11 @@ public class CarDelBean {
|
||||
private String owner;
|
||||
private String roadLicense;
|
||||
private String roadLicensePhoto;
|
||||
private String trailerLicenseId;
|
||||
|
||||
private String policyPhotoUrl;
|
||||
private String insuranceCompany;
|
||||
private String insuranceEndDay;
|
||||
private String roadLicenseSend;
|
||||
private String roadLicenseValidity;
|
||||
private String threeImage;
|
||||
@@ -77,6 +82,23 @@ public class CarDelBean {
|
||||
private String registerNo;
|
||||
private String carEnergyTypValue;
|
||||
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() {
|
||||
return carPlateColorValue;
|
||||
@@ -86,6 +108,30 @@ public class CarDelBean {
|
||||
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() {
|
||||
return carEnergyTypValue;
|
||||
}
|
||||
@@ -262,6 +308,15 @@ public class CarDelBean {
|
||||
private String threeImage;
|
||||
private String type;
|
||||
private String vehicleNumber;
|
||||
private String trailerLicenseId;
|
||||
|
||||
public String getTrailerLicenseId() {
|
||||
return trailerLicenseId;
|
||||
}
|
||||
|
||||
public void setTrailerLicenseId(String trailerLicenseId) {
|
||||
this.trailerLicenseId = trailerLicenseId;
|
||||
}
|
||||
|
||||
public String getBackImage() {
|
||||
return backImage == null ? "" : backImage;
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName CarInfoBean
|
||||
* @Author 用户
|
||||
* @Date 2023/8/17 15:35
|
||||
* @Description TODO
|
||||
*/
|
||||
public class CarInfoBean {
|
||||
|
||||
|
||||
private int code;
|
||||
private DataDTO data;
|
||||
private String msg;
|
||||
private int res;
|
||||
private Boolean success;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public DataDTO getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(DataDTO data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public Boolean getSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(Boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
private Object code;
|
||||
private DataDTO.DataDTO2 data;
|
||||
private Object message;
|
||||
private String forceMatching;
|
||||
|
||||
|
||||
public String getForceMatching() {
|
||||
return forceMatching;
|
||||
}
|
||||
|
||||
public void setForceMatching(String forceMatching) {
|
||||
this.forceMatching = forceMatching;
|
||||
}
|
||||
|
||||
public Object getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Object code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public DataDTO2 getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(DataDTO2 data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public Object getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(Object message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public static class DataDTO2 {
|
||||
private List<DataDTO.DataDTO2.PrismKeyValueInfoDTO> prism_keyValueInfo;
|
||||
|
||||
public List<DataDTO.DataDTO2.PrismKeyValueInfoDTO> getPrism_keyValueInfo() {
|
||||
return prism_keyValueInfo;
|
||||
}
|
||||
|
||||
public void setPrism_keyValueInfo(List<DataDTO.DataDTO2.PrismKeyValueInfoDTO> prism_keyValueInfo) {
|
||||
this.prism_keyValueInfo = prism_keyValueInfo;
|
||||
}
|
||||
|
||||
public static class PrismKeyValueInfoDTO {
|
||||
private int keyProb;
|
||||
private int valueProb;
|
||||
private String value;
|
||||
private String key;
|
||||
|
||||
public int getKeyProb() {
|
||||
return keyProb;
|
||||
}
|
||||
|
||||
public void setKeyProb(int keyProb) {
|
||||
this.keyProb = keyProb;
|
||||
}
|
||||
|
||||
public int getValueProb() {
|
||||
return valueProb;
|
||||
}
|
||||
|
||||
public void setValueProb(int valueProb) {
|
||||
this.valueProb = valueProb;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,395 @@
|
||||
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,6 +56,33 @@ public class CarZhengBean {
|
||||
|
||||
public static class DataDTO {
|
||||
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() {
|
||||
return carId;
|
||||
|
||||
@@ -57,12 +57,15 @@ public class DriverAuthDataBean {
|
||||
private String idcardValidity;
|
||||
private String dirverAllowType;
|
||||
private int idcardPhoto;
|
||||
private String bankImgUrl;
|
||||
private String bankName;
|
||||
private String cardNo;
|
||||
private int idcardBackPhoto;
|
||||
private Object idcardPhotoHold;
|
||||
private String idcardAddress;
|
||||
private String idcardName;
|
||||
private int idcardSex;
|
||||
private int idCardStatus;
|
||||
private int idCardStatus;//身份证认证状态;-1未提交 0待认证 1认证通过 2认证失败
|
||||
private int driverLicenseStatus;
|
||||
private int qualificationCertificateStatus;
|
||||
private String idCardReason;
|
||||
@@ -141,6 +144,30 @@ public class DriverAuthDataBean {
|
||||
private Object mbindStatus;
|
||||
private Object mreason;
|
||||
|
||||
public String getBankImgUrl() {
|
||||
return bankImgUrl;
|
||||
}
|
||||
|
||||
public void setBankImgUrl(String bankImgUrl) {
|
||||
this.bankImgUrl = bankImgUrl;
|
||||
}
|
||||
|
||||
public String getBankName() {
|
||||
return bankName;
|
||||
}
|
||||
|
||||
public void setBankName(String bankName) {
|
||||
this.bankName = bankName;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,33 @@ public class DriverExpireBean {
|
||||
public static class DataDTO {
|
||||
private String driverLicenseUpdateUrl;
|
||||
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() {
|
||||
return driverLicenseUpdateUrl;
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName DriverUpBean
|
||||
* @Author john
|
||||
* @Date 2024/11/20 09:20
|
||||
* @Description TODO
|
||||
*/
|
||||
public class DriverUpBean implements Serializable {
|
||||
|
||||
private String frontImageUrl;
|
||||
private String backImageUrl;
|
||||
private String carNumber;
|
||||
private String type;
|
||||
private String owner;
|
||||
private String vehicleNumber;
|
||||
private String carLong;
|
||||
private String carWidth;
|
||||
private String carHeight;
|
||||
private String carId;
|
||||
private String carPlateColor;
|
||||
private String carEnergyTyp;
|
||||
|
||||
private DataDTO zjObj;
|
||||
|
||||
public String getCarId() {
|
||||
return carId;
|
||||
}
|
||||
|
||||
public void setCarId(String carId) {
|
||||
this.carId = carId;
|
||||
}
|
||||
|
||||
public String getFrontImageUrl() {
|
||||
return frontImageUrl;
|
||||
}
|
||||
|
||||
public void setFrontImageUrl(String frontImageUrl) {
|
||||
this.frontImageUrl = frontImageUrl;
|
||||
}
|
||||
|
||||
public String getBackImageUrl() {
|
||||
return backImageUrl;
|
||||
}
|
||||
|
||||
public void setBackImageUrl(String backImageUrl) {
|
||||
this.backImageUrl = backImageUrl;
|
||||
}
|
||||
|
||||
public String getCarNumber() {
|
||||
return carNumber;
|
||||
}
|
||||
|
||||
public void setCarNumber(String carNumber) {
|
||||
this.carNumber = carNumber;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public String getVehicleNumber() {
|
||||
return vehicleNumber;
|
||||
}
|
||||
|
||||
public void setVehicleNumber(String vehicleNumber) {
|
||||
this.vehicleNumber = vehicleNumber;
|
||||
}
|
||||
|
||||
public String getCarLong() {
|
||||
return carLong;
|
||||
}
|
||||
|
||||
public void setCarLong(String carLong) {
|
||||
this.carLong = carLong;
|
||||
}
|
||||
|
||||
public String getCarWidth() {
|
||||
return carWidth;
|
||||
}
|
||||
|
||||
public void setCarWidth(String carWidth) {
|
||||
this.carWidth = carWidth;
|
||||
}
|
||||
|
||||
public String getCarHeight() {
|
||||
return carHeight;
|
||||
}
|
||||
|
||||
public void setCarHeight(String carHeight) {
|
||||
this.carHeight = carHeight;
|
||||
}
|
||||
|
||||
public String getCarPlateColor() {
|
||||
return carPlateColor;
|
||||
}
|
||||
|
||||
public void setCarPlateColor(String carPlateColor) {
|
||||
this.carPlateColor = carPlateColor;
|
||||
}
|
||||
|
||||
public String getCarEnergyTyp() {
|
||||
return carEnergyTyp;
|
||||
}
|
||||
|
||||
public void setCarEnergyTyp(String carEnergyTyp) {
|
||||
this.carEnergyTyp = carEnergyTyp;
|
||||
}
|
||||
|
||||
public DataDTO getZjObj() {
|
||||
return zjObj;
|
||||
}
|
||||
|
||||
public void setZjObj(DataDTO zjObj) {
|
||||
this.zjObj = zjObj;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
|
||||
private String approveTon;
|
||||
private String recordId;
|
||||
private String note;
|
||||
private String passengers;
|
||||
private String vclDrwTn;
|
||||
private String overallDimen;
|
||||
private String vclN;
|
||||
private String enTn;
|
||||
private String loadTon;
|
||||
private String inspectionRecord;
|
||||
private String barCode;
|
||||
private String issuingAuthority;
|
||||
private String regTime;
|
||||
private String address;
|
||||
private String ownerName;
|
||||
private String engine;
|
||||
private String vin;
|
||||
private String licensedateOfissue;
|
||||
private String vcltype;
|
||||
private String vclBrand;
|
||||
private String natureOfUsage;
|
||||
|
||||
public String getApproveTon() {
|
||||
return approveTon;
|
||||
}
|
||||
|
||||
public void setApproveTon(String approveTon) {
|
||||
this.approveTon = approveTon;
|
||||
}
|
||||
|
||||
public String getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setRecordId(String recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public String getPassengers() {
|
||||
return passengers;
|
||||
}
|
||||
|
||||
public void setPassengers(String passengers) {
|
||||
this.passengers = passengers;
|
||||
}
|
||||
|
||||
public String getVclDrwTn() {
|
||||
return vclDrwTn;
|
||||
}
|
||||
|
||||
public void setVclDrwTn(String vclDrwTn) {
|
||||
this.vclDrwTn = vclDrwTn;
|
||||
}
|
||||
|
||||
public String getOverallDimen() {
|
||||
return overallDimen;
|
||||
}
|
||||
|
||||
public void setOverallDimen(String overallDimen) {
|
||||
this.overallDimen = overallDimen;
|
||||
}
|
||||
|
||||
public String getVclN() {
|
||||
return vclN;
|
||||
}
|
||||
|
||||
public void setVclN(String vclN) {
|
||||
this.vclN = vclN;
|
||||
}
|
||||
|
||||
public String getEnTn() {
|
||||
return enTn;
|
||||
}
|
||||
|
||||
public void setEnTn(String enTn) {
|
||||
this.enTn = enTn;
|
||||
}
|
||||
|
||||
public String getLoadTon() {
|
||||
return loadTon;
|
||||
}
|
||||
|
||||
public void setLoadTon(String loadTon) {
|
||||
this.loadTon = loadTon;
|
||||
}
|
||||
|
||||
public String getInspectionRecord() {
|
||||
return inspectionRecord;
|
||||
}
|
||||
|
||||
public void setInspectionRecord(String inspectionRecord) {
|
||||
this.inspectionRecord = inspectionRecord;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return barCode;
|
||||
}
|
||||
|
||||
public void setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getRegTime() {
|
||||
return regTime;
|
||||
}
|
||||
|
||||
public void setRegTime(String regTime) {
|
||||
this.regTime = regTime;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getEngine() {
|
||||
return engine;
|
||||
}
|
||||
|
||||
public void setEngine(String engine) {
|
||||
this.engine = engine;
|
||||
}
|
||||
|
||||
public String getVin() {
|
||||
return vin;
|
||||
}
|
||||
|
||||
public void setVin(String vin) {
|
||||
this.vin = vin;
|
||||
}
|
||||
|
||||
public String getLicensedateOfissue() {
|
||||
return licensedateOfissue;
|
||||
}
|
||||
|
||||
public void setLicensedateOfissue(String licensedateOfissue) {
|
||||
this.licensedateOfissue = licensedateOfissue;
|
||||
}
|
||||
|
||||
public String getVcltype() {
|
||||
return vcltype;
|
||||
}
|
||||
|
||||
public void setVcltype(String vcltype) {
|
||||
this.vcltype = vcltype;
|
||||
}
|
||||
|
||||
public String getVclBrand() {
|
||||
return vclBrand;
|
||||
}
|
||||
|
||||
public void setVclBrand(String vclBrand) {
|
||||
this.vclBrand = vclBrand;
|
||||
}
|
||||
|
||||
public String getNatureOfUsage() {
|
||||
return natureOfUsage;
|
||||
}
|
||||
|
||||
public void setNatureOfUsage(String natureOfUsage) {
|
||||
this.natureOfUsage = natureOfUsage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,8 @@ public class HuoYuanDelBean {
|
||||
private String vehicleTypeName;
|
||||
private int vehicleLength;
|
||||
private String vehicleLengthName;
|
||||
private String carNumber;
|
||||
private String carId;
|
||||
private String namedDrivers;
|
||||
private String requirement;
|
||||
private String totalFreight;
|
||||
@@ -97,6 +99,23 @@ public class HuoYuanDelBean {
|
||||
private Object contactName;
|
||||
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() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,33 @@ public class OCRBankBean {
|
||||
private String validDate;
|
||||
private String bankCardType;
|
||||
private String bankName;
|
||||
private String expiryDate;
|
||||
private String type;
|
||||
private String cardNumber;
|
||||
|
||||
public String getExpiryDate() {
|
||||
return expiryDate;
|
||||
}
|
||||
|
||||
public void setExpiryDate(String expiryDate) {
|
||||
this.expiryDate = expiryDate;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getCardNumber() {
|
||||
return cardNumber;
|
||||
}
|
||||
|
||||
public void setCardNumber(String cardNumber) {
|
||||
this.cardNumber = cardNumber;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
||||
@@ -60,6 +60,33 @@ public class OCRCardBackBean {
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
private String organizationName;
|
||||
private String validFrom;
|
||||
private String validTo;
|
||||
private String issue;
|
||||
|
||||
public String getIssue() {
|
||||
return issue;
|
||||
}
|
||||
|
||||
public void setIssue(String issue) {
|
||||
this.issue = issue;
|
||||
}
|
||||
|
||||
public String getValidFrom() {
|
||||
return validFrom;
|
||||
}
|
||||
|
||||
public void setValidFrom(String validFrom) {
|
||||
this.validFrom = validFrom;
|
||||
}
|
||||
|
||||
public String getValidTo() {
|
||||
return validTo;
|
||||
}
|
||||
|
||||
public void setValidTo(String validTo) {
|
||||
this.validTo = validTo;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
||||
@@ -63,6 +63,51 @@ public class OCRCardBean {
|
||||
private String cardId;
|
||||
private String birthday;
|
||||
private String sex;
|
||||
private String ethnicity;
|
||||
private String idcard;
|
||||
private String birth;
|
||||
private String validFrom;
|
||||
private String validTo;
|
||||
|
||||
public String getEthnicity() {
|
||||
return ethnicity;
|
||||
}
|
||||
|
||||
public void setEthnicity(String ethnicity) {
|
||||
this.ethnicity = ethnicity;
|
||||
}
|
||||
|
||||
public String getIdcard() {
|
||||
return idcard;
|
||||
}
|
||||
|
||||
public void setIdcard(String idcard) {
|
||||
this.idcard = idcard;
|
||||
}
|
||||
|
||||
public String getBirth() {
|
||||
return birth;
|
||||
}
|
||||
|
||||
public void setBirth(String birth) {
|
||||
this.birth = birth;
|
||||
}
|
||||
|
||||
public String getValidFrom() {
|
||||
return validFrom;
|
||||
}
|
||||
|
||||
public void setValidFrom(String validFrom) {
|
||||
this.validFrom = validFrom;
|
||||
}
|
||||
|
||||
public String getValidTo() {
|
||||
return validTo;
|
||||
}
|
||||
|
||||
public void setValidTo(String validTo) {
|
||||
this.validTo = validTo;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
||||
+36
@@ -58,6 +58,42 @@ public class OCRDrivingLicenseBackBean {
|
||||
private int id;
|
||||
private String url;
|
||||
private String archivesName;
|
||||
private String fileNumber;
|
||||
private String record;
|
||||
private String name;
|
||||
private String issuingAuthority;
|
||||
|
||||
public String getFileNumber() {
|
||||
return fileNumber;
|
||||
}
|
||||
|
||||
public void setFileNumber(String fileNumber) {
|
||||
this.fileNumber = fileNumber;
|
||||
}
|
||||
|
||||
public String getRecord() {
|
||||
return record;
|
||||
}
|
||||
|
||||
public void setRecord(String record) {
|
||||
this.record = record;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
||||
@@ -68,6 +68,70 @@ public class OCRDrivingLicenseBean {
|
||||
private String allowType;
|
||||
private String sex;
|
||||
private String startTime;
|
||||
private String beginDate;
|
||||
private String endDate;
|
||||
private String firstGetDocDate;
|
||||
private String idcard;
|
||||
private String quasiDriveType;
|
||||
private String issuingAuthority;
|
||||
private String nationality;
|
||||
|
||||
|
||||
public String getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(String beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getFirstGetDocDate() {
|
||||
return firstGetDocDate;
|
||||
}
|
||||
|
||||
public void setFirstGetDocDate(String firstGetDocDate) {
|
||||
this.firstGetDocDate = firstGetDocDate;
|
||||
}
|
||||
|
||||
public String getIdcard() {
|
||||
return idcard;
|
||||
}
|
||||
|
||||
public void setIdcard(String idcard) {
|
||||
this.idcard = idcard;
|
||||
}
|
||||
|
||||
public String getQuasiDriveType() {
|
||||
return quasiDriveType;
|
||||
}
|
||||
|
||||
public void setQuasiDriveType(String quasiDriveType) {
|
||||
this.quasiDriveType = quasiDriveType;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getNationality() {
|
||||
return nationality;
|
||||
}
|
||||
|
||||
public void setNationality(String nationality) {
|
||||
this.nationality = nationality;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName OCRQualiBean
|
||||
* @Author john
|
||||
* @Date 2024/11/19 15:53
|
||||
* @Description TODO
|
||||
*/
|
||||
public class OCRQualiBean {
|
||||
|
||||
|
||||
private int code;
|
||||
private DataDTO data;
|
||||
private String msg;
|
||||
private String remark;
|
||||
private int res;
|
||||
private boolean success;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public DataDTO getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(DataDTO data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
private String address;
|
||||
private List<QualificationCategoryListDTO> qualification_category_list;
|
||||
private String nationality;
|
||||
private String issuing_authority;
|
||||
private String sex;
|
||||
private String birth_date;
|
||||
private String integrity_assessment_info;
|
||||
private String name;
|
||||
private String driving_class;
|
||||
private String certificate_number;
|
||||
private String continuing_education_info;
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public List<QualificationCategoryListDTO> getQualification_category_list() {
|
||||
return qualification_category_list;
|
||||
}
|
||||
|
||||
public void setQualification_category_list(List<QualificationCategoryListDTO> qualification_category_list) {
|
||||
this.qualification_category_list = qualification_category_list;
|
||||
}
|
||||
|
||||
public String getNationality() {
|
||||
return nationality;
|
||||
}
|
||||
|
||||
public void setNationality(String nationality) {
|
||||
this.nationality = nationality;
|
||||
}
|
||||
|
||||
public String getIssuing_authority() {
|
||||
return issuing_authority;
|
||||
}
|
||||
|
||||
public void setIssuing_authority(String issuing_authority) {
|
||||
this.issuing_authority = issuing_authority;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getBirth_date() {
|
||||
return birth_date;
|
||||
}
|
||||
|
||||
public void setBirth_date(String birth_date) {
|
||||
this.birth_date = birth_date;
|
||||
}
|
||||
|
||||
public String getIntegrity_assessment_info() {
|
||||
return integrity_assessment_info;
|
||||
}
|
||||
|
||||
public void setIntegrity_assessment_info(String integrity_assessment_info) {
|
||||
this.integrity_assessment_info = integrity_assessment_info;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDriving_class() {
|
||||
return driving_class;
|
||||
}
|
||||
|
||||
public void setDriving_class(String driving_class) {
|
||||
this.driving_class = driving_class;
|
||||
}
|
||||
|
||||
public String getCertificate_number() {
|
||||
return certificate_number;
|
||||
}
|
||||
|
||||
public void setCertificate_number(String certificate_number) {
|
||||
this.certificate_number = certificate_number;
|
||||
}
|
||||
|
||||
public String getContinuing_education_info() {
|
||||
return continuing_education_info;
|
||||
}
|
||||
|
||||
public void setContinuing_education_info(String continuing_education_info) {
|
||||
this.continuing_education_info = continuing_education_info;
|
||||
}
|
||||
|
||||
public static class QualificationCategoryListDTO {
|
||||
private String issue_date;
|
||||
private String expiry_date;
|
||||
private String category;
|
||||
|
||||
public String getIssue_date() {
|
||||
return issue_date;
|
||||
}
|
||||
|
||||
public void setIssue_date(String issue_date) {
|
||||
this.issue_date = issue_date;
|
||||
}
|
||||
|
||||
public String getExpiry_date() {
|
||||
return expiry_date;
|
||||
}
|
||||
|
||||
public void setExpiry_date(String expiry_date) {
|
||||
this.expiry_date = expiry_date;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
/**
|
||||
* @ClassName OCRRoadBean
|
||||
* @Author john
|
||||
* @Date 2024/11/19 17:05
|
||||
* @Description TODO
|
||||
*/
|
||||
public class OCRRoadBean {
|
||||
|
||||
|
||||
private int code;
|
||||
private DataDTO data;
|
||||
private String msg;
|
||||
private String remark;
|
||||
private int res;
|
||||
private boolean success;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public DataDTO getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(DataDTO data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
private String vehicleWeight;
|
||||
private String issuingAuthority;
|
||||
private String ownerName;
|
||||
private String businessCertificate;
|
||||
private String economicType;
|
||||
private String businessScope;
|
||||
private String vehicleNumber;
|
||||
private String licenseNumber;
|
||||
private String vehicleSize;
|
||||
private String ownerAddress;
|
||||
private String issueDate;
|
||||
private String vehicleType;
|
||||
|
||||
public String getVehicleWeight() {
|
||||
return vehicleWeight;
|
||||
}
|
||||
|
||||
public void setVehicleWeight(String vehicleWeight) {
|
||||
this.vehicleWeight = vehicleWeight;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getBusinessCertificate() {
|
||||
return businessCertificate;
|
||||
}
|
||||
|
||||
public void setBusinessCertificate(String businessCertificate) {
|
||||
this.businessCertificate = businessCertificate;
|
||||
}
|
||||
|
||||
public String getEconomicType() {
|
||||
return economicType;
|
||||
}
|
||||
|
||||
public void setEconomicType(String economicType) {
|
||||
this.economicType = economicType;
|
||||
}
|
||||
|
||||
public String getBusinessScope() {
|
||||
return businessScope;
|
||||
}
|
||||
|
||||
public void setBusinessScope(String businessScope) {
|
||||
this.businessScope = businessScope;
|
||||
}
|
||||
|
||||
public String getVehicleNumber() {
|
||||
return vehicleNumber;
|
||||
}
|
||||
|
||||
public void setVehicleNumber(String vehicleNumber) {
|
||||
this.vehicleNumber = vehicleNumber;
|
||||
}
|
||||
|
||||
public String getLicenseNumber() {
|
||||
return licenseNumber;
|
||||
}
|
||||
|
||||
public void setLicenseNumber(String licenseNumber) {
|
||||
this.licenseNumber = licenseNumber;
|
||||
}
|
||||
|
||||
public String getVehicleSize() {
|
||||
return vehicleSize;
|
||||
}
|
||||
|
||||
public void setVehicleSize(String vehicleSize) {
|
||||
this.vehicleSize = vehicleSize;
|
||||
}
|
||||
|
||||
public String getOwnerAddress() {
|
||||
return ownerAddress;
|
||||
}
|
||||
|
||||
public void setOwnerAddress(String ownerAddress) {
|
||||
this.ownerAddress = ownerAddress;
|
||||
}
|
||||
|
||||
public String getIssueDate() {
|
||||
return issueDate;
|
||||
}
|
||||
|
||||
public void setIssueDate(String issueDate) {
|
||||
this.issueDate = issueDate;
|
||||
}
|
||||
|
||||
public String getVehicleType() {
|
||||
return vehicleType;
|
||||
}
|
||||
|
||||
public void setVehicleType(String vehicleType) {
|
||||
this.vehicleType = vehicleType;
|
||||
}
|
||||
}
|
||||
}
|
||||
+117
@@ -59,6 +59,7 @@ public class OCRVehicleBackLicenseBean {
|
||||
private int id;
|
||||
private String url;
|
||||
private String checkRecord;
|
||||
private String isSave;
|
||||
private String approvedCapacity;
|
||||
private String allCapacity;
|
||||
private String size;
|
||||
@@ -70,6 +71,122 @@ public class OCRVehicleBackLicenseBean {
|
||||
private String fileNumber;
|
||||
private String carNumber;
|
||||
private int licenseId;
|
||||
private String note;
|
||||
private String passengers;
|
||||
private String vclDrwTn;
|
||||
private String overallDimen;
|
||||
private String vclN;
|
||||
private String enTn;
|
||||
private String loadTon;
|
||||
private String inspectionRecord;
|
||||
private String barCode;
|
||||
private String approveTon;
|
||||
private String recordId;
|
||||
private String issuingAuthority;
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public String getPassengers() {
|
||||
return passengers;
|
||||
}
|
||||
|
||||
public void setPassengers(String passengers) {
|
||||
this.passengers = passengers;
|
||||
}
|
||||
|
||||
public String getVclDrwTn() {
|
||||
return vclDrwTn;
|
||||
}
|
||||
|
||||
public void setVclDrwTn(String vclDrwTn) {
|
||||
this.vclDrwTn = vclDrwTn;
|
||||
}
|
||||
|
||||
public String getOverallDimen() {
|
||||
return overallDimen;
|
||||
}
|
||||
|
||||
public void setOverallDimen(String overallDimen) {
|
||||
this.overallDimen = overallDimen;
|
||||
}
|
||||
|
||||
public String getVclN() {
|
||||
return vclN;
|
||||
}
|
||||
|
||||
public void setVclN(String vclN) {
|
||||
this.vclN = vclN;
|
||||
}
|
||||
|
||||
public String getEnTn() {
|
||||
return enTn;
|
||||
}
|
||||
|
||||
public void setEnTn(String enTn) {
|
||||
this.enTn = enTn;
|
||||
}
|
||||
|
||||
public String getLoadTon() {
|
||||
return loadTon;
|
||||
}
|
||||
|
||||
public void setLoadTon(String loadTon) {
|
||||
this.loadTon = loadTon;
|
||||
}
|
||||
|
||||
public String getInspectionRecord() {
|
||||
return inspectionRecord;
|
||||
}
|
||||
|
||||
public void setInspectionRecord(String inspectionRecord) {
|
||||
this.inspectionRecord = inspectionRecord;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return barCode;
|
||||
}
|
||||
|
||||
public void setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public String getApproveTon() {
|
||||
return approveTon;
|
||||
}
|
||||
|
||||
public void setApproveTon(String approveTon) {
|
||||
this.approveTon = approveTon;
|
||||
}
|
||||
|
||||
public String getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setRecordId(String recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getIsSave() {
|
||||
return isSave;
|
||||
}
|
||||
|
||||
public void setIsSave(String isSave) {
|
||||
this.isSave = isSave;
|
||||
}
|
||||
|
||||
public int getLicenseId() {
|
||||
return licenseId;
|
||||
|
||||
@@ -49,7 +49,9 @@ public class OCRVehicleLicenseBean {
|
||||
private String address;
|
||||
private int carId;
|
||||
private String carNumber;
|
||||
private boolean carExist;
|
||||
private String dateIssue;
|
||||
private String backImage;
|
||||
private String engineNumber;
|
||||
private int id;
|
||||
private String model;
|
||||
@@ -60,6 +62,131 @@ public class OCRVehicleLicenseBean {
|
||||
private String type;
|
||||
private String url;
|
||||
private String vehicleNumber;
|
||||
private String licenseId;
|
||||
private String ownerName;
|
||||
private String regTime;
|
||||
private String issuingAuthority;
|
||||
private String engine;
|
||||
private String vclN;
|
||||
private String licensedateOfissue;
|
||||
private String vin;
|
||||
private String vcltype;
|
||||
private String vclBrand;
|
||||
private String natureOfUsage;
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getRegTime() {
|
||||
return regTime;
|
||||
}
|
||||
|
||||
public void setRegTime(String regTime) {
|
||||
this.regTime = regTime;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getEngine() {
|
||||
return engine;
|
||||
}
|
||||
|
||||
public void setEngine(String engine) {
|
||||
this.engine = engine;
|
||||
}
|
||||
|
||||
public String getVclN() {
|
||||
return vclN;
|
||||
}
|
||||
|
||||
public void setVclN(String vclN) {
|
||||
this.vclN = vclN;
|
||||
}
|
||||
|
||||
public String getLicensedateOfissue() {
|
||||
return licensedateOfissue;
|
||||
}
|
||||
|
||||
public void setLicensedateOfissue(String licensedateOfissue) {
|
||||
this.licensedateOfissue = licensedateOfissue;
|
||||
}
|
||||
|
||||
public String getVin() {
|
||||
return vin;
|
||||
}
|
||||
|
||||
public void setVin(String vin) {
|
||||
this.vin = vin;
|
||||
}
|
||||
|
||||
public String getVcltype() {
|
||||
return vcltype;
|
||||
}
|
||||
|
||||
public void setVcltype(String vcltype) {
|
||||
this.vcltype = vcltype;
|
||||
}
|
||||
|
||||
public String getVclBrand() {
|
||||
return vclBrand;
|
||||
}
|
||||
|
||||
public void setVclBrand(String vclBrand) {
|
||||
this.vclBrand = vclBrand;
|
||||
}
|
||||
|
||||
public String getNatureOfUsage() {
|
||||
return natureOfUsage;
|
||||
}
|
||||
|
||||
public void setNatureOfUsage(String natureOfUsage) {
|
||||
this.natureOfUsage = natureOfUsage;
|
||||
}
|
||||
|
||||
public String getLicenseId() {
|
||||
return licenseId;
|
||||
}
|
||||
|
||||
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() {
|
||||
return address == null ? "" : address;
|
||||
@@ -173,4 +300,44 @@ public class OCRVehicleLicenseBean {
|
||||
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,6 +257,7 @@ public class StartOrderBean {
|
||||
private String realityTimeDate;
|
||||
private int status;
|
||||
private String longitude;
|
||||
private String imageTakenDate;
|
||||
private String latitude;
|
||||
private List<GoodsDTO> goods;
|
||||
private int report;
|
||||
@@ -280,6 +281,14 @@ public class StartOrderBean {
|
||||
private String distance;
|
||||
private int isEvaluation;
|
||||
|
||||
public String getImageTakenDate() {
|
||||
return imageTakenDate;
|
||||
}
|
||||
|
||||
public void setImageTakenDate(String imageTakenDate) {
|
||||
this.imageTakenDate = imageTakenDate;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||
|
||||
/**
|
||||
* @ClassName WaybillStatusBean
|
||||
* @Author john
|
||||
* @Date 2024/10/14 15:40
|
||||
* @Description TODO
|
||||
*/
|
||||
public class WaybillStatusBean {
|
||||
|
||||
private int res;
|
||||
private int code;
|
||||
private boolean success;
|
||||
private String msg;
|
||||
private String data;
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.constant;
|
||||
|
||||
/**
|
||||
* @ClassName HYConstant
|
||||
* @Author 用户
|
||||
* @Date 2023/8/29 09:32
|
||||
* @Description TODO
|
||||
*/
|
||||
public class HYConstant {
|
||||
|
||||
//-------------安联---------------start
|
||||
//企业代码
|
||||
private static final String ENTERPRISE_CODE="E0019169";
|
||||
//企业app的身份码
|
||||
private static final String APP_IDENTITY="b4a472a025e443b383970cdd5465552e";
|
||||
//企业app验证码
|
||||
private static final String APP_KEY="b948efbb4c2a4ba0805c534f2fba0c89";
|
||||
|
||||
//企业代码-测试
|
||||
private static final String ENTERPRISE_CODE_TEXT="E0019093";
|
||||
//企业app的身份码-测试
|
||||
private static final String APP_IDENTITY_TEXT="a15b4ba5bd2542cc9a6bea9bdadf9ef9";
|
||||
//企业app验证码-测试
|
||||
private static final String APP_KEY_TEXT="07a6256cad5642138ed6e962a5a157be";
|
||||
//-------------安联---------------end
|
||||
|
||||
|
||||
//-------------交通厅---------------start
|
||||
public final static String JTT_DATA_NAME="jtt_data";
|
||||
public final static String JTT_DATA_JTTORDER_KEY="JTT_order_key";
|
||||
public final static String JTT_DATA_ORDER_KEY="order_key";
|
||||
//-------------交通厅---------------end
|
||||
|
||||
//--------------E签宝--------------start
|
||||
String key = "19ac0aa74338e487e45057faf7212401";
|
||||
String license = "HF41uGxM/1i3CtW98DimoA97BlNTAnQ+DiEAihYmZ2jR1jqC4be253joEJbOJgFDIzp5aIoeuXSWWHFaDVfaHL2Pksbq5f8M8EqsVhP9q/i1xGYSYf6MJVlHdMAVLWgR0Kra+n8dVzkSDuZeyJuDsskAmZaGFQN1CqnWYCI1tmV1Tk4A57e9LQMed0U11QWjdshdU2DGqBXKmGE419PdW3NmIxOR2u9iB1OKBmvzCUT8RAYyBzSn/yhU++YJ25g5a8Pb5kOvi+eOh+PEFEcQL6oOp/CF4Iw5nadlsLhc+XEnVJpwL2myZBoSlVcKxrJKbRn1/DIgXBueKKnqhyHKdJlpqI9eghAlRF0p2Q4f23m89mWRZf4nhKzTeXGIjCTFO4TNVucrlGU7tyJcrRCDVdfV24fziH+hB3QGckpuYzzjefr7hZalLRJ/w8dPw/8dCY1wnWq3AJ3zw2g1PzMxl51q7AgdKvwc1ERcGBns0zb8PK6vGKCnJq3uHiJEnslbTI0MEosje+h+OPO7hf2QofErewjI19wHEOv4dTvuFLh3VmGFMObAmov5kI47705fjSxCvAPGATBrfUSwim+5EQ1hanc5IcXe0/nOTiRUNEpZ+x65zVydqAs7490yqQiIUQvPazEwcal7vH2OD54lCcgpxKxqdmGc5/bp5UnqB45+n+iuInV/Q9DMOQVk15uaVZmhS8VaCqH21CmfH/ZGLb9wiEpaRLrPZLKX3bK7MT9Z0/OlDnb2QUKU8LMMIhLuQQntzsf0Wn4kA/0e9QAJJQ==";
|
||||
//-------------E签宝---------------end
|
||||
|
||||
//--------------交通厅--------------start
|
||||
private final static String APPID="com.arpa.hndahesudintocctmsdriver";
|
||||
private final static String APP_SECURITY="01e20fc6585a42738ac88a12321dc41bff473b4b20184aacbbcee7d7864359a6";
|
||||
private final static String CODE="41110447";
|
||||
private final static String ENVIRONMENT="release";
|
||||
//-------------交通厅---------------end
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.arpa.hndahesudintocctmsdriver.R
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil
|
||||
import com.dahe.mylibrary.utils.ToastUtils
|
||||
import com.lxj.xpopup.core.CenterPopupView
|
||||
import com.lxj.xpopup.util.XPermission
|
||||
import com.permissionx.guolindev.PermissionX
|
||||
import kotlinx.android.synthetic.main.load.view.*
|
||||
import kotlinx.android.synthetic.main.pop_message_center.view.*
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName MessagePop
|
||||
* @Author 用户
|
||||
* @Date 2023/8/14 18:01
|
||||
* @Description TODO
|
||||
*/
|
||||
class MessagePop(context: Context) : CenterPopupView(context), View.OnClickListener {
|
||||
|
||||
lateinit var content :String
|
||||
var secMessage :String? = ""
|
||||
|
||||
constructor(context: Context,message : String) :this(context) {
|
||||
content = message
|
||||
}
|
||||
|
||||
constructor(context: Context,message : String,message2 : String) :this(context) {
|
||||
content = message
|
||||
secMessage = message2
|
||||
}
|
||||
|
||||
override fun getImplLayoutId() = R.layout.pop_message_center
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
tvCancel.setOnClickListener(this)
|
||||
tvOk.setOnClickListener(this)
|
||||
tvPhone.setOnClickListener(this)
|
||||
tvContent.text = "$content"
|
||||
tvMessage2.text =secMessage
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
when(v?.id){
|
||||
R.id.tvCancel -> {
|
||||
dismiss()
|
||||
}
|
||||
R.id.tvOk,R.id.tvPhone -> {
|
||||
dismiss()
|
||||
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)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
||||
|
||||
/**
|
||||
* @ClassName MyRequestCallback
|
||||
* @Author john
|
||||
* @Date 2024/10/28 17:19
|
||||
* @Description TODO
|
||||
*/
|
||||
interface MyRequestCallback{
|
||||
fun onResult(allGranted: Boolean, grantedList: List<String?>, deniedList: List<String?>)
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import com.arpa.hndahesudintocctmsdriver.R
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity
|
||||
import com.lxj.xpopup.core.CenterPopupView
|
||||
import kotlinx.android.synthetic.main.pop_sim_center.view.*
|
||||
import org.bouncycastle.jcajce.provider.symmetric.Rijndael
|
||||
|
||||
|
||||
/**
|
||||
* @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()
|
||||
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()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
||||
|
||||
import android.content.Context
|
||||
import com.arpa.hndahesudintocctmsdriver.R
|
||||
import com.lxj.xpopup.core.PositionPopupView
|
||||
import com.lxj.xpopup.enums.DragOrientation
|
||||
import kotlinx.android.synthetic.main.popup_qq_msg.view.tvMessage
|
||||
import kotlinx.android.synthetic.main.popup_qq_msg.view.tvTitle
|
||||
|
||||
/**
|
||||
* Description: 自定义自由定位Position弹窗
|
||||
* Create by dance, at 2019/6/14
|
||||
*/
|
||||
class TopMsgPopup(context: Context,title:String, message: String) : PositionPopupView(context) {
|
||||
|
||||
private var message: String
|
||||
private var title: String
|
||||
|
||||
init {
|
||||
this.message = message
|
||||
this.title = title
|
||||
}
|
||||
override fun getImplLayoutId(): Int {
|
||||
return R.layout.popup_qq_msg
|
||||
}
|
||||
|
||||
override fun getDragOrientation(): DragOrientation {
|
||||
return DragOrientation.DragToLeft
|
||||
}
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
tvMessage.text = message
|
||||
tvTitle.text = title
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.event;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
* @date 2021/10/20 14:43
|
||||
* @description:
|
||||
*/
|
||||
public class FaceEvent {
|
||||
|
||||
private String message;
|
||||
|
||||
public FaceEvent(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,12 @@ import com.alct.mdp.MDPLocationCollectionManager;
|
||||
import com.alct.mdp.callback.OnDownloadResultListener;
|
||||
import com.alct.mdp.callback.OnResultListener;
|
||||
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.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.msg.MsgUtil;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverAuthDataBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.FqBean;
|
||||
@@ -28,15 +33,27 @@ public class ALProcess {
|
||||
//企业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";
|
||||
|
||||
|
||||
public static void verification(Context con){
|
||||
DriverAuthDataBean auth= AuthParts.getAuth(con);
|
||||
if (auth==null){
|
||||
return;
|
||||
}
|
||||
|
||||
Identity idy=new Identity();
|
||||
//企业代码
|
||||
idy.setEnterpriseCode(ENTERPRISE_CODE);
|
||||
idy.setEnterpriseCode(BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE);
|
||||
//企业app的身份码
|
||||
idy.setAppIdentity(APP_IDENTITY);
|
||||
idy.setAppIdentity(BuildConfig.isTest?APP_IDENTITY_TEXT:APP_IDENTITY);
|
||||
//企业app验证码
|
||||
idy.setAppKey(APP_KEY);
|
||||
idy.setAppKey(BuildConfig.isTest?APP_KEY_TEXT:APP_KEY);
|
||||
//司机身份证
|
||||
idy.setDriverIdentity(auth.getData().getIdcard());
|
||||
//idy.setDriverIdentity("410725198311042012");
|
||||
@@ -50,6 +67,7 @@ public class ALProcess {
|
||||
@Override
|
||||
public void onFailure(java.lang.String s, java.lang.String s1) {
|
||||
Log.e("--error--",s+s1+"");
|
||||
new MessageUtils().showCenMessage(con,s1);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -78,7 +96,7 @@ public class ALProcess {
|
||||
|
||||
public static void applyFq(Context con,FqBean fb){
|
||||
for (FqBean.Invoice driverInvoice : fb.getDriverInvoices()) {
|
||||
MDPLocationCollectionManager.confirmInvoice(con, ENTERPRISE_CODE, driverInvoice.getDriverInvoiceCode(), new OnResultListener() {
|
||||
MDPLocationCollectionManager.confirmInvoice(con, BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE, driverInvoice.getDriverInvoiceCode(), new OnResultListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
|
||||
@@ -99,7 +117,7 @@ public class ALProcess {
|
||||
// @param enterpriseCode 企业号
|
||||
// @param nfcId NFC id
|
||||
// @param listener 回调函数
|
||||
MDPLocationCollectionManager.checkNfc(con, shipmentCode,ENTERPRISE_CODE, nfcId, new OnResultListener() {
|
||||
MDPLocationCollectionManager.checkNfc(con, shipmentCode,ENTERPRISE_CODE, nfcId, new OnResultListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
|
||||
@@ -113,4 +131,33 @@ public class ALProcess {
|
||||
}
|
||||
|
||||
|
||||
public static void verification(Context con,Handler hd){
|
||||
DriverAuthDataBean auth= AuthParts.getAuth(con);
|
||||
Identity idy=new Identity();
|
||||
//企业代码
|
||||
idy.setEnterpriseCode(BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE);
|
||||
//企业app的身份码
|
||||
idy.setAppIdentity(BuildConfig.isTest?APP_IDENTITY_TEXT:APP_IDENTITY);
|
||||
//企业app验证码
|
||||
idy.setAppKey(BuildConfig.isTest?APP_KEY_TEXT:APP_KEY);
|
||||
//司机身份证
|
||||
idy.setDriverIdentity(auth.getData().getIdcard());
|
||||
//idy.setDriverIdentity("410725198311042012");
|
||||
MDPLocationCollectionManager.register(con, idy, new OnResultListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.arpa.hndahesudintocctmsdriver.report;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.amap.api.location.AMapLocationClient;
|
||||
@@ -78,6 +79,9 @@ public class JTTProcess {
|
||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
||||
return;
|
||||
}
|
||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||
sni.setSerialNumber("0000");
|
||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||
@@ -115,6 +119,9 @@ public class JTTProcess {
|
||||
//参数 ShippingNoteInfo 和 start 接口中的参数 ShippingNoteInfo 相
|
||||
//同,这里 shippingNoteInfo 信息只需传入运单号和分单号即可
|
||||
public static void send(Context con,StartOrderBean sob,String remark){
|
||||
if (sob.getData()==null){
|
||||
return;
|
||||
}
|
||||
ShippingNoteInfo[] snis=new ShippingNoteInfo[1];
|
||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||
@@ -143,6 +150,9 @@ public class JTTProcess {
|
||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
||||
return;
|
||||
}
|
||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||
sni.setSerialNumber("0000");
|
||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||
@@ -176,6 +186,9 @@ public class JTTProcess {
|
||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
||||
return;
|
||||
}
|
||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||
sni.setSerialNumber("0000");
|
||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||
@@ -208,6 +221,9 @@ public class JTTProcess {
|
||||
ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||
StartOrderBean.DataDTO.WayChildrenDTO startWay=sob.getData().getWayChildren().get(0);
|
||||
StartOrderBean.DataDTO.WayChildrenDTO endWay=sob.getData().getWayChildren().get(sob.getData().getWayChildren().size()-1);
|
||||
if (TextUtils.isEmpty(endWay.getLatitude())||TextUtils.isEmpty(endWay.getLongitude())){
|
||||
return;
|
||||
}
|
||||
sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||
sni.setSerialNumber("0000");
|
||||
sni.setStartLatitude(Double.parseDouble(startWay.getLatitude()));
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.map.MapUtil;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.IDInputBean;
|
||||
@@ -74,6 +75,22 @@ public class AuthRequest {
|
||||
RequestUtil.start(1, "saveVehicleLicense", re, con, hd);
|
||||
}
|
||||
|
||||
//查询车辆信息-行驶证/app/carDriver/saveVehicleLicense
|
||||
public void getCarInfo(Context con, Handler hd, String carNum) {
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("carNum",carNum);
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"app/carDriver/onlyGetVehicleLicense", MapUtil.mapJson(map)), getToken(con), con);
|
||||
RequestUtil.start(1, "getCarInfo", re, con, hd);
|
||||
}
|
||||
|
||||
//绑定车辆信息-行驶证/app/carDriver/saveVehicleLicense
|
||||
public void bindCar(Context con, Handler hd, String carId) {
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("carId",carId);
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"app/carDriver/bindCar", MapUtil.mapJson(map)), getToken(con), con);
|
||||
RequestUtil.start(1, "bindCarInfo", re, con, hd);
|
||||
}
|
||||
|
||||
//上传头像
|
||||
public void upHeadImg(Context con, Handler hd, String imgUrl) {
|
||||
String mt = "{\"headportrait\": \"" + imgUrl + "\"}";
|
||||
@@ -124,6 +141,17 @@ public class AuthRequest {
|
||||
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) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIsAuthDriverAuthQualification(), ""), getToken(con), con);
|
||||
@@ -141,6 +169,7 @@ public class AuthRequest {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAuthUrl(), ""), getToken(con), con);
|
||||
RequestUtil.start(1, "authUrl", re, con, hd);
|
||||
}
|
||||
|
||||
//获取车牌颜色
|
||||
public void getCarColor(Context con, Handler hd) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.request;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.TrackInputBean;
|
||||
@@ -72,6 +73,17 @@ public class HuoYuanRequset{
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAgreeOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestUtil.start(1, HuoYunDelActivity.END,re,con,hd);
|
||||
}
|
||||
|
||||
// public void confirm2(String cid,int wid){
|
||||
// Map<String,Object> map=new HashMap<>();
|
||||
// map.put("carId",cid);
|
||||
// map.put("orderId",wid);
|
||||
// map.put("status",2);
|
||||
// map.put("imgUrl","");
|
||||
// Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"/app/driver/waybill/grab",MapUtil.mapJson(map)),getToken(con),con);
|
||||
// RequestUtil.start(1, "jfaklsdjfklasjdflk",re,con,hd);
|
||||
// }
|
||||
|
||||
//获取执行中的运单
|
||||
public void startOrder(int id){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
@@ -79,6 +91,13 @@ public class HuoYuanRequset{
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetStartOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestUtil.start(1, HuoYuanFragmengt.START_ORDER,re,con,hd);
|
||||
}
|
||||
|
||||
public void startOrder2(int id){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("waybillId",id);
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetStartOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestUtil.start(1, "refreshorderDetail",re,con,hd);
|
||||
}
|
||||
//装货
|
||||
public void loading(LUInputBean lub){
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getLOADING(), gson.toJson(lub)),getToken(con),con);
|
||||
@@ -89,6 +108,11 @@ public class HuoYuanRequset{
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUNLOADING(), gson.toJson(lub)),getToken(con),con);
|
||||
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){
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUploadReceipt(), gson.toJson(urib)),getToken(con),con);
|
||||
@@ -137,6 +161,32 @@ public class HuoYuanRequset{
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getEvaluationV2(),MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestUtil.start(1, StartYunDanActivity.KEEP_EVALUTE,re,con,hd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取运单状态
|
||||
* @param waybillId
|
||||
*/
|
||||
public void getWaybillStatus(int waybillId){
|
||||
// Map<String,Object> map=new HashMap<>();
|
||||
// map.put("waybillId",waybillId);
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetWaybillStatus()+"?waybillId="+waybillId,""),getToken(con),con);
|
||||
RequestUtil.start(1, "waybillStatus",re,con,hd);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取货源状态
|
||||
* @param orderId
|
||||
*/
|
||||
public void getOrderStatus(int orderId){
|
||||
// Map<String,Object> map=new HashMap<>();
|
||||
// map.put("waybillId",waybillId);
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getGetOrderStatus()+"?orderId="+orderId,""),getToken(con),con);
|
||||
RequestUtil.start(1, "orderStatus",re,con,hd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public final static String ASYMMETRYWAYBILL="waybill_getAsymmetryWaybill";
|
||||
|
||||
//获取装货失败信息
|
||||
|
||||
@@ -3,60 +3,132 @@ package com.arpa.hndahesudintocctmsdriver.request;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.OkDate;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.OkHttpUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequestUtil;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import okhttp3.Request;
|
||||
|
||||
public class OCRRequest {
|
||||
|
||||
public String getToken(Context con) {
|
||||
return SPUtil.getSP(con, LoginActivity.USER,LoginActivity.USER_TOKEN);
|
||||
return SPUtil.getSP(con, LoginActivity.USER, LoginActivity.USER_TOKEN);
|
||||
}
|
||||
|
||||
//银行卡识别
|
||||
public void ORCBank(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getOrcBank()),getToken(con),file);
|
||||
RequestUtil.start(12, "OCR_BANK",re,con,hd);
|
||||
public void ORCBank(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getOrcBank()), getToken(con), file);
|
||||
RequestUtil.start(12, "OCR_BANK", re, con, hd);
|
||||
}
|
||||
|
||||
//银行卡识别-中交
|
||||
public void ORCBankZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getOrcBank() + "?imgurl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, "OCR_BANK", re, con, hd);
|
||||
}
|
||||
|
||||
//从业资格证-中交
|
||||
public void ORCQualificaZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"sinoiov/ocr/getTransQualificationCertOCR" + "?imgurl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, "ORCQualificaZj", re, con, hd);
|
||||
}
|
||||
|
||||
//道路运输许可证-中交
|
||||
public void ORCRoadLicZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(BuildConfig.BASE_URL+"sinoiov/ocr/getVehicleRoadLicenseOCR" + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, "ORCRoadLicZj", re, con, hd);
|
||||
}
|
||||
|
||||
//身份证正面识别
|
||||
public void OCRCard(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardFront()),getToken(con),file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[0],re,con,hd);
|
||||
public void OCRCard(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardFront()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[0], re, con, hd);
|
||||
}
|
||||
|
||||
//身份证背面识别
|
||||
public void OCRCardBack(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardBack()),getToken(con),file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[0], re,con,hd);
|
||||
public void OCRCardBack(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getIdCardBack()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[0], re, con, hd);
|
||||
}
|
||||
|
||||
//身份证正面识别-中交
|
||||
public void OCRZjCard(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIdCardFront() + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[0], re, con, hd);
|
||||
}
|
||||
|
||||
//身份证背面识别-中交
|
||||
public void OCRZjCardBack(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIdCardFront() + "?backDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[0], re, con, hd);
|
||||
}
|
||||
|
||||
//驾驶证正面识别
|
||||
public void OCRDrivingLicense(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicense()),getToken(con),file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[1],re,con,hd);
|
||||
public void OCRDrivingLicense(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicense()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[1], re, con, hd);
|
||||
}
|
||||
|
||||
//驾驶证背面识别
|
||||
public void OCRDrivingLicenseBack(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicenseBack()),getToken(con),file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[1],re,con,hd);
|
||||
public void OCRDrivingLicenseBack(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getDrivingLicenseBack()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[1], re, con, hd);
|
||||
}
|
||||
|
||||
//驾驶证正面识别-中交
|
||||
public void OCRDrivingLicenseZj(Context con, Handler hd, String imgUrl){
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getDrivingLicense()+"?faceDataUrl="+imgUrl,""),getToken(con),con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[1],re,con,hd);
|
||||
}
|
||||
|
||||
//驾驶证背面识别-中交
|
||||
public void OCRDrivingLicenseBackZj(Context con, Handler hd, String imgUrl){
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getDrivingLicense()+"?backDataUrl="+imgUrl,""),getToken(con),con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[1],re,con,hd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//行驶证正面识别
|
||||
public void OCRVehicleLicense(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getVehicleLicense()),getToken(con),file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[2],re,con,hd);
|
||||
public void OCRVehicleLicense(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getVehicleLicense()), getToken(con), file);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[2], re, con, hd);
|
||||
}
|
||||
|
||||
//行驶证背面识别
|
||||
public void OCRVehicleLicenseBack(Context con, Handler hd, File file,String carId,String carNum){
|
||||
Request re = OkHttpUtil.postFiles(new OkDate(RequestConstant.getVehicleLicenseBack()),file,getToken(con),carId,carNum);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[2],re,con,hd);
|
||||
public void OCRVehicleLicenseBack(Context con, Handler hd, File file, String carId, String carNum, boolean isSave) {
|
||||
Request re = OkHttpUtil.postFiles(new OkDate(RequestConstant.getVehicleLicenseBack()), file, getToken(con), carId, carNum, isSave);
|
||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[2], re, con, hd);
|
||||
}
|
||||
|
||||
public void OCRPlateLicense(Context con, Handler hd, File file){
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getPlateLicense()),getToken(con),file);
|
||||
RequestUtil.start(12, "carName",re,con,hd);
|
||||
|
||||
//行驶证正面识别-中交
|
||||
public void OCRVehicleLicenseZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getVehicleLicense() + "?faceDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME[2], re, con, hd);
|
||||
}
|
||||
|
||||
//行驶证背面识别-中交
|
||||
public void OCRVehicleLicenseBackZj(Context con, Handler hd, String imgUrl) {
|
||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getVehicleLicense() + "?backDataUrl=" + imgUrl, ""), getToken(con), con);
|
||||
RequestUtil.start(1, CertificatesActivity.TYPE_NAME_BANK[2], re, con, hd);
|
||||
}
|
||||
|
||||
public void OCRPlateLicense(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getPlateLicense()), getToken(con), file);
|
||||
RequestUtil.start(12, "carName", re, con, hd);
|
||||
}
|
||||
|
||||
|
||||
public void OCRCarPlateLicense(Context con, Handler hd, File file) {
|
||||
Request re = OkHttpUtil.postFile(new OkDate(RequestConstant.getPlateLicense2()), getToken(con), file);
|
||||
RequestUtil.start(12, "carNum", re, con, hd);
|
||||
}
|
||||
}
|
||||
|
||||
+215
-139
@@ -1,195 +1,217 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.request;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
|
||||
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
|
||||
public static String BASE_URL ="http://app.dahehuoyun.com/api";
|
||||
public static String BASE_URL = BuildConfig.BASE_URL;
|
||||
//版本更新/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 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/save";
|
||||
private static final String INS_BANKCARD = "/app/bankCard/bandCard";
|
||||
// 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/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/grabDriverOrdersContruct";
|
||||
private static final String AGREE_ORDER = "/app/driver/waybill/grabDriverOrdersContructV2";
|
||||
//获取正在执行的运单/运单详情
|
||||
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/removeCar";
|
||||
private static final String DEL_CAR = "/app/carDriver/unBindCar";
|
||||
//上传车辆照片
|
||||
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识别--
|
||||
|
||||
//银行卡识别
|
||||
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(){
|
||||
return BASE_URL +CAR_AUDIT;
|
||||
public static String getCarAudit() {
|
||||
return BASE_URL + CAR_AUDIT;
|
||||
}
|
||||
|
||||
public static String getCarColor(){
|
||||
return BASE_URL +CAR_COLOR;
|
||||
public static String postAppInfo() {
|
||||
return BASE_URL + APP_INFO;
|
||||
}
|
||||
|
||||
public static String getCarEnergyType(){
|
||||
public static String getCarColor() {
|
||||
return BASE_URL + CAR_COLOR;
|
||||
}
|
||||
|
||||
public static String getCarEnergyType() {
|
||||
return BASE_URL + CAR_ENERGYTYPE;
|
||||
}
|
||||
|
||||
//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() {
|
||||
return BASE_URL +SEND_CODE;
|
||||
return BASE_URL + SEND_CODE;
|
||||
}
|
||||
|
||||
public static String getREGUrl() {
|
||||
return BASE_URL +REG;
|
||||
return BASE_URL + REG;
|
||||
}
|
||||
|
||||
public static String getLoginUrl() {
|
||||
return BASE_URL +LOGIN;
|
||||
return BASE_URL + LOGIN;
|
||||
}
|
||||
|
||||
public static String getDriverAuthInfoUrl() {
|
||||
return BASE_URL +DRIVER_AUTH_INFO;
|
||||
return BASE_URL + DRIVER_AUTH_INFO;
|
||||
}
|
||||
|
||||
public static String getGoodsHallUrl() {
|
||||
return BASE_URL +GOODS_HALL;
|
||||
return BASE_URL + GOODS_HALL;
|
||||
}
|
||||
|
||||
public static String getGoodsDelUrl() {
|
||||
return BASE_URL +GOODS_DEL;
|
||||
return BASE_URL + GOODS_DEL;
|
||||
}
|
||||
|
||||
public static String getUserUrl() {
|
||||
@@ -204,197 +226,251 @@ public class RequestConstant {
|
||||
return BASE_URL + BANK_CARD_LIST;
|
||||
}
|
||||
|
||||
public static String getXiaoXiListUrl() { return BASE_URL + XIAOXI_LIST; }
|
||||
public static String getXiaoXiListUrl() {
|
||||
return BASE_URL + XIAOXI_LIST;
|
||||
}
|
||||
|
||||
public static String getXiaoxiAll() { return BASE_URL +XIAOXI_ALL; }
|
||||
public static String getXiaoxiAll() {
|
||||
return BASE_URL + XIAOXI_ALL;
|
||||
}
|
||||
|
||||
public static String getOrderList() {
|
||||
return BASE_URL +ORDER_LIST;
|
||||
return BASE_URL + ORDER_LIST;
|
||||
}
|
||||
|
||||
public static String getAgreeOrder() {
|
||||
return BASE_URL +AGREE_ORDER;
|
||||
return BASE_URL + AGREE_ORDER;
|
||||
}
|
||||
|
||||
public static String getGetStartOrder() {
|
||||
return BASE_URL +GET_START_ORDER;
|
||||
return BASE_URL + GET_START_ORDER;
|
||||
}
|
||||
|
||||
public static String getGetCarryContract() {
|
||||
return BASE_URL +GET_CARRY_CONTRACT;
|
||||
return BASE_URL + GET_CARRY_CONTRACT;
|
||||
}
|
||||
|
||||
public static String getEVALUATIONV2() {
|
||||
return BASE_URL +EVALUATIONV2;
|
||||
return BASE_URL + EVALUATIONV2;
|
||||
}
|
||||
|
||||
public static String getLOADING() {
|
||||
return BASE_URL +LOADING;
|
||||
return BASE_URL + LOADING;
|
||||
}
|
||||
|
||||
public static String getUNLOADING() {
|
||||
return BASE_URL +UNLOADING;
|
||||
return BASE_URL + UNLOADING;
|
||||
}
|
||||
|
||||
public static String getUNLOADING4() {
|
||||
return BASE_URL + UNLOADING4;
|
||||
}
|
||||
|
||||
public static String getGetEvaluate() {
|
||||
return BASE_URL +GET_EVALUATE;
|
||||
return BASE_URL + GET_EVALUATE;
|
||||
}
|
||||
|
||||
public static String getGetComplaint() {
|
||||
return BASE_URL +GET_COMPLAINT;
|
||||
return BASE_URL + GET_COMPLAINT;
|
||||
}
|
||||
|
||||
public static String getOrcBank() {
|
||||
return BASE_URL +ORC_BANK;
|
||||
return BASE_URL + ORC_BANK;
|
||||
}
|
||||
|
||||
public static String getIdCardFront() {
|
||||
return BASE_URL +ID_CARD_FRONT;
|
||||
return BASE_URL + ID_CARD_FRONT;
|
||||
}
|
||||
|
||||
public static String getIdCardBack() {
|
||||
return BASE_URL +ID_CARD_BACK;
|
||||
return BASE_URL + ID_CARD_BACK;
|
||||
}
|
||||
|
||||
public static String getDrivingLicense() {
|
||||
return BASE_URL +DRIVING_LICENSE;
|
||||
return BASE_URL + DRIVING_LICENSE;
|
||||
}
|
||||
|
||||
public static String getDrivingLicenseBack() {
|
||||
return BASE_URL +DRIVING_LICENSE_BACK;
|
||||
return BASE_URL + DRIVING_LICENSE_BACK;
|
||||
}
|
||||
|
||||
public static String getVehicleLicense() {
|
||||
return BASE_URL +VEHICLE_LICENSE;
|
||||
return BASE_URL + VEHICLE_LICENSE;
|
||||
}
|
||||
|
||||
public static String getVehicleLicenseBack() {
|
||||
return BASE_URL +VEHICLE_LICENSE_BACK;
|
||||
return BASE_URL + VEHICLE_LICENSE_BACK;
|
||||
}
|
||||
|
||||
public static String getGetCarList() {
|
||||
return BASE_URL +GET_CAR_LIST;
|
||||
return BASE_URL + GET_CAR_LIST;
|
||||
}
|
||||
|
||||
public static String getGetCarDel() {
|
||||
return BASE_URL +GET_CAR_DEL;
|
||||
return BASE_URL + GET_CAR_DEL;
|
||||
}
|
||||
|
||||
public static String getCodeData() {
|
||||
return BASE_URL +CODE_DATA;
|
||||
return BASE_URL + CODE_DATA;
|
||||
}
|
||||
|
||||
public static String getIsauthIdcard() {
|
||||
return BASE_URL +ISAUTH_IDCARD;
|
||||
return BASE_URL + ISAUTH_IDCARD;
|
||||
}
|
||||
|
||||
public static String getIsauthDriverauthLicense() { return BASE_URL +ISAUTH_DRIVERAUTH_LICENSE; }
|
||||
public static String getIsauthDriverauthLicense() {
|
||||
return BASE_URL + ISAUTH_DRIVERAUTH_LICENSE;
|
||||
}
|
||||
|
||||
public static String getUploadReceipt() { return BASE_URL +UPLOAD_RECEIPT; }
|
||||
public static String getUploadReceipt() {
|
||||
return BASE_URL + UPLOAD_RECEIPT;
|
||||
}
|
||||
|
||||
public static String getUPLOAD() { return BASE_URL +UPLOAD; }
|
||||
public static String getUPLOAD() {
|
||||
return BASE_URL + UPLOAD;
|
||||
}
|
||||
|
||||
public static String getTrackTracking() {return BASE_URL +TRACK_TRACKING; }
|
||||
public static String getTrackTracking() {
|
||||
return BASE_URL + TRACK_TRACKING;
|
||||
}
|
||||
|
||||
public static String getEvaluationV2() { return BASE_URL +EVALUATION_V2; }
|
||||
public static String getEvaluationV2() {
|
||||
return BASE_URL + EVALUATION_V2;
|
||||
}
|
||||
|
||||
public static String getGetWaybillStatus() {
|
||||
return BASE_URL + GET_WAYBILL_STATUS;
|
||||
}
|
||||
|
||||
public static String getGetOrderStatus() {
|
||||
return BASE_URL + GET_ORDER_STATUS;
|
||||
}
|
||||
|
||||
public static String getDRIVERAUTHIDCARD() {
|
||||
return BASE_URL +DRIVERAUTHIDCARD;
|
||||
return BASE_URL + DRIVERAUTHIDCARD;
|
||||
}
|
||||
|
||||
public static String getDRIVERAUTHLICENSE() {
|
||||
return BASE_URL +DRIVERAUTHLICENSE;
|
||||
return BASE_URL + DRIVERAUTHLICENSE;
|
||||
}
|
||||
|
||||
public static String getSAVEVEHICLELICENSE() {
|
||||
return BASE_URL +SAVEVEHICLELICENSE;
|
||||
return BASE_URL + SAVEVEHICLELICENSE;
|
||||
}
|
||||
|
||||
public static String getSAVECARIMG() {
|
||||
return BASE_URL +SAVECARIMG;
|
||||
return BASE_URL + SAVECARIMG;
|
||||
}
|
||||
|
||||
public static String getUploadHead() { return BASE_URL +UPLOAD_HEAD; }
|
||||
public static String getUploadHead() {
|
||||
return BASE_URL + UPLOAD_HEAD;
|
||||
}
|
||||
|
||||
public static String getInsBankcard() {
|
||||
return BASE_URL +INS_BANKCARD;
|
||||
return BASE_URL + INS_BANKCARD;
|
||||
}
|
||||
|
||||
public static String getDelCar() { return BASE_URL +DEL_CAR; }
|
||||
public static String getDelCar() {
|
||||
return BASE_URL + DEL_CAR;
|
||||
}
|
||||
|
||||
public static String getXiaoxiDel() { return BASE_URL +XIAOXI_DEL; }
|
||||
public static String getXiaoxiDel() {
|
||||
return BASE_URL + XIAOXI_DEL;
|
||||
}
|
||||
|
||||
public static String getCOMPLAINT() { return BASE_URL+COMPLAINT; }
|
||||
public static String getCOMPLAINT() {
|
||||
return BASE_URL + COMPLAINT;
|
||||
}
|
||||
|
||||
public static String getXiaoxiDelAll() { return BASE_URL+XIAOXI_DEL_ALL; }
|
||||
public static String getXiaoxiDelAll() {
|
||||
return BASE_URL + XIAOXI_DEL_ALL;
|
||||
}
|
||||
|
||||
public static String getDriverAuthQualification() { return BASE_URL+DRIVER_AUTH_QUALIFICATION; }
|
||||
public static String getDriverAuthQualification() {
|
||||
return BASE_URL + DRIVER_AUTH_QUALIFICATION;
|
||||
}
|
||||
|
||||
public static String getDriverSaveCarRegisterNo() { return BASE_URL+DRIVER_AUTH_SAVECARREGISTERNO; }
|
||||
public static String getDriverSaveCarRegisterNo() {
|
||||
return BASE_URL + DRIVER_AUTH_SAVECARREGISTERNO;
|
||||
}
|
||||
|
||||
public static String getDriverSaveCarRoadLicenseNo() { return BASE_URL+DRIVER_AUTH_SAVECARROADLICENSENO; }
|
||||
public static String getDriverSaveCarRoadLicenseNo() {
|
||||
return BASE_URL + DRIVER_AUTH_SAVECARROADLICENSENO;
|
||||
}
|
||||
|
||||
public static String getSaveDrawCar() { return BASE_URL+SAVE_DRAW_CAR; }
|
||||
public static String getTrafficInsurance() {
|
||||
return BASE_URL + DRIVER_TRAFFIC_INSU;
|
||||
}
|
||||
|
||||
public static String getSaveDrawCar() {
|
||||
return BASE_URL + SAVE_DRAW_CAR;
|
||||
}
|
||||
|
||||
public static String getIsAuthDriverAuthQualification() {
|
||||
return BASE_URL+IS_AUTH_DRIVER_AUTH_QUALIFICATION;
|
||||
return BASE_URL + IS_AUTH_DRIVER_AUTH_QUALIFICATION;
|
||||
}
|
||||
|
||||
public static String getVERSION() {
|
||||
return BASE_URL+VERSION;
|
||||
return BASE_URL + VERSION;
|
||||
}
|
||||
|
||||
public static String getAddContracts() {
|
||||
return BASE_URL+ADD_CONTRACTS;
|
||||
return BASE_URL + ADD_CONTRACTS;
|
||||
}
|
||||
|
||||
public static String getGetContracts() {
|
||||
return BASE_URL+GET_CONTRACTS;
|
||||
return BASE_URL + GET_CONTRACTS;
|
||||
}
|
||||
|
||||
public static String getTIXIAN() {
|
||||
return BASE_URL+TIXIAN;
|
||||
return BASE_URL + TIXIAN;
|
||||
}
|
||||
|
||||
public static String getPartyMember() {
|
||||
return BASE_URL+PARTY_MEMBER;
|
||||
return BASE_URL + PARTY_MEMBER;
|
||||
}
|
||||
|
||||
public static String getCONFIG() {
|
||||
return BASE_URL+CONFIG;
|
||||
return BASE_URL + CONFIG;
|
||||
}
|
||||
|
||||
public static String getChangeRecord() {
|
||||
return BASE_URL+CHANGE_RECORD;
|
||||
return BASE_URL + CHANGE_RECORD;
|
||||
}
|
||||
|
||||
public static String getChangeCharge() {
|
||||
return BASE_URL+WITHDRAWALS_CHARGE;
|
||||
return BASE_URL + WITHDRAWALS_CHARGE;
|
||||
}
|
||||
|
||||
public static String getChangeConfig() {
|
||||
return BASE_URL+WITHDRAWALS_CONFIG;
|
||||
return BASE_URL + WITHDRAWALS_CONFIG;
|
||||
}
|
||||
|
||||
public static String getGetErrorOrder() { return BASE_URL+GET_ERROR_ORDER; }
|
||||
public static String getGetErrorOrder() {
|
||||
return BASE_URL + GET_ERROR_ORDER;
|
||||
}
|
||||
|
||||
public static String getGetExampleList() {
|
||||
return BASE_URL+GET_EXAMPLE_LIST;
|
||||
return BASE_URL + GET_EXAMPLE_LIST;
|
||||
}
|
||||
|
||||
public static String getAuthUrl() {
|
||||
return BASE_URL+AUTH_URL;
|
||||
return BASE_URL + AUTH_URL;
|
||||
}
|
||||
|
||||
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() {
|
||||
return BASE_URL+GET_IMAGE;
|
||||
return BASE_URL + GET_IMAGE;
|
||||
}
|
||||
|
||||
public static String getGetCertificateExpired() {
|
||||
return BASE_URL+GET_CERTIFICATE_EXPIRED;
|
||||
return BASE_URL + GET_CERTIFICATE_EXPIRED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.provider.Settings;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.AppInfoBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.business.Md5Util;
|
||||
@@ -79,6 +80,12 @@ public class UserRequset {
|
||||
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() {
|
||||
String mt = "{}";
|
||||
@@ -118,6 +125,14 @@ public class UserRequset {
|
||||
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() {
|
||||
String url = RequestConstant.BASE_URL + "/app/driver/auth/authInfo";
|
||||
@@ -154,7 +169,7 @@ public class UserRequset {
|
||||
/**
|
||||
* 判断是否开启未知应用安装权限
|
||||
*/
|
||||
private void isOpenAppNoRe(){
|
||||
private void isOpenAppNoRe() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
boolean b = con.getPackageManager().canRequestPackageInstalls();
|
||||
if (!b) {
|
||||
@@ -169,8 +184,8 @@ public class UserRequset {
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
private void startInstallPermissionSettingActivity() {
|
||||
//注意这个是8.0新API
|
||||
Uri packageURI = Uri.parse("package:" +con.getPackageName());
|
||||
Intent intent = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES,packageURI);
|
||||
Uri packageURI = Uri.parse("package:" + con.getPackageName());
|
||||
Intent intent = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES, packageURI);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
con.startActivity(intent);
|
||||
}
|
||||
@@ -221,7 +236,18 @@ public class UserRequset {
|
||||
public void carAudit(String carId) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
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);
|
||||
}
|
||||
|
||||
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,6 +15,15 @@ public class LUInputBean {
|
||||
private String locationAddress;
|
||||
private String longitude;
|
||||
private String waybillId;
|
||||
private String realLoadTime;
|
||||
|
||||
public String getRealLoadTime() {
|
||||
return realLoadTime;
|
||||
}
|
||||
|
||||
public void setRealLoadTime(String realLoadTime) {
|
||||
this.realLoadTime = realLoadTime;
|
||||
}
|
||||
|
||||
public List<Integer> getImageId() {
|
||||
return imageId;
|
||||
|
||||
+115
@@ -16,8 +16,123 @@ public class LicenseInputBean {
|
||||
private int driverLicensePhoto;
|
||||
private String endTime;
|
||||
private String firstTime;
|
||||
private String address;
|
||||
private String quasiDriveType;
|
||||
private String beginDate;
|
||||
private String endDate;
|
||||
private String fileNumber;
|
||||
private String issuingAuthority;
|
||||
private String sex;
|
||||
private String name;
|
||||
private String idcard;
|
||||
private String organizationName;
|
||||
private String startTime;
|
||||
private String birthday;
|
||||
private String country;
|
||||
|
||||
public String getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthday(String birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getOrganizationName() {
|
||||
return organizationName;
|
||||
}
|
||||
|
||||
public void setOrganizationName(String organizationName) {
|
||||
this.organizationName = organizationName;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getQuasiDriveType() {
|
||||
return quasiDriveType;
|
||||
}
|
||||
|
||||
public void setQuasiDriveType(String quasiDriveType) {
|
||||
this.quasiDriveType = quasiDriveType;
|
||||
}
|
||||
|
||||
public String getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(String beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getFileNumber() {
|
||||
return fileNumber;
|
||||
}
|
||||
|
||||
public void setFileNumber(String fileNumber) {
|
||||
this.fileNumber = fileNumber;
|
||||
}
|
||||
|
||||
public String getIssuingAuthority() {
|
||||
return issuingAuthority;
|
||||
}
|
||||
|
||||
public void setIssuingAuthority(String issuingAuthority) {
|
||||
this.issuingAuthority = issuingAuthority;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getIdcard() {
|
||||
return idcard;
|
||||
}
|
||||
|
||||
public void setIdcard(String idcard) {
|
||||
this.idcard = idcard;
|
||||
}
|
||||
|
||||
public String getAllowType() {
|
||||
return allowType;
|
||||
|
||||
@@ -23,8 +23,8 @@ public interface Api {
|
||||
//获取版本
|
||||
String VERSION = BASE_URL + "app/version";
|
||||
|
||||
@POST(BASE_URL+"/common/register")
|
||||
Observable<CommonResponseBean> log(@Body LoginRegInputBean bean);
|
||||
// @POST(BASE_URL+"/common/register")
|
||||
// Observable<CommonResponseBean> log(@Body LoginRegInputBean bean);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
@@ -27,11 +28,14 @@ public class MakeUpService extends Service {
|
||||
public void palyMp3(){
|
||||
Log.e("开始播放","-----");
|
||||
try {
|
||||
AssetFileDescriptor fd =getAssets().openFd("kujp9scu.mp3");
|
||||
mediaPlayer.setDataSource(fd);
|
||||
mediaPlayer.setLooping(false);//设置为循环播放
|
||||
mediaPlayer.prepare();//初始化播放器MediaPlayer
|
||||
mediaPlayer.start();
|
||||
MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.kujp9scu);
|
||||
mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
|
||||
@Override
|
||||
public void onPrepared(MediaPlayer mediaPlayer) {
|
||||
mediaPlayer.start();
|
||||
}
|
||||
});
|
||||
mediaPlayer.prepareAsync();
|
||||
Log.e("播放成功","-----");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -58,14 +62,14 @@ public class MakeUpService extends Service {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
palyMp3();
|
||||
// palyMp3();
|
||||
}
|
||||
|
||||
//开始
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
Log.e("服务开启","-----");
|
||||
|
||||
palyMp3();
|
||||
return START_STICKY;
|
||||
|
||||
}
|
||||
|
||||
@@ -30,22 +30,22 @@ import java.util.TimerTask;
|
||||
public class TrackService extends Service {
|
||||
|
||||
private Context con;
|
||||
private TrackInputBean tib=new TrackInputBean();
|
||||
private TrackInputBean tib = new TrackInputBean();
|
||||
private LocationGDUtil l;
|
||||
private int timeSum=1000*60*3;
|
||||
private String snn="";
|
||||
private Gson gson=new Gson();
|
||||
private int timeSum = 1000 * 60 * 3;
|
||||
private String snn = "";
|
||||
private Gson gson = new Gson();
|
||||
private HuoYuanRequset hyr;
|
||||
|
||||
private Handler hd=new Handler(msg -> {
|
||||
switch (msg.what){
|
||||
private Handler hd = new Handler(msg -> {
|
||||
switch (msg.what) {
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
if(CacheGroup.cacheList.get("genzong")!=null){
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get("genzong"),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
Log.e("--轨迹上传--","成功");
|
||||
}else{
|
||||
Log.e("--轨迹上传失败:--",bb.getMsg());
|
||||
if (CacheGroup.cacheList.get("genzong") != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("genzong"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
Log.e("--轨迹上传--", "成功");
|
||||
} else {
|
||||
Log.e("--轨迹上传失败:--", bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove("genzong");
|
||||
}
|
||||
@@ -59,32 +59,34 @@ public class TrackService extends Service {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {return null; }
|
||||
public IBinder onBind(Intent intent) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
con=this;
|
||||
hyr=new HuoYuanRequset(con,hd);
|
||||
Log.e("开始循环上传,等待100ms","-----");
|
||||
con = this;
|
||||
hyr = new HuoYuanRequset(con, hd);
|
||||
Log.e("开始循环上传,等待100ms", "-----");
|
||||
new Timer().schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
snn=SPUtil.getSP(con,"order","ShippingNoteNumber");
|
||||
if(!snn.equals("")) {
|
||||
snn = SPUtil.getSP(con, "order", "ShippingNoteNumber");
|
||||
if (!snn.equals("")) {
|
||||
l = new LocationGDUtil(con, hd);
|
||||
l.onCreate();
|
||||
}else{
|
||||
} else {
|
||||
onDestroy();
|
||||
}
|
||||
}
|
||||
},100,timeSum);
|
||||
}, 100, timeSum);
|
||||
}
|
||||
|
||||
//开始
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
Log.e("服务开启","-----");
|
||||
Log.e("服务开启", "-----");
|
||||
return START_STICKY;
|
||||
|
||||
}
|
||||
@@ -94,16 +96,19 @@ public class TrackService extends Service {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
public void genzong(){
|
||||
//经度
|
||||
tib.setLatitude(l.getLatitude()+"");
|
||||
//纬度
|
||||
tib.setLongitude(l.getLongitude()+"");
|
||||
Log.e("经度",l.getLatitude()+"");
|
||||
Log.e("维度",l.getLongitude()+"");
|
||||
//单号
|
||||
tib.setShippingNoteNumber(snn);
|
||||
hyr.trackTracking(tib);
|
||||
public void genzong() {
|
||||
if (l == null || l.getLatitude() == 0d) {
|
||||
return;
|
||||
}
|
||||
//经度
|
||||
tib.setLatitude(l.getLatitude() + "");
|
||||
//纬度
|
||||
tib.setLongitude(l.getLongitude() + "");
|
||||
Log.e("经度", l.getLatitude() + "");
|
||||
Log.e("维度", l.getLongitude() + "");
|
||||
//单号
|
||||
tib.setShippingNoteNumber(snn);
|
||||
hyr.trackTracking(tib);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui
|
||||
|
||||
import android.Manifest
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
@@ -9,6 +10,7 @@ import android.view.KeyEvent
|
||||
import android.widget.*
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.arpa.hndahesudintocctmsdriver.R
|
||||
import com.arpa.hndahesudintocctmsdriver.event.WalletEvent
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.home.HomeFragment
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.my.MyFragment
|
||||
@@ -20,8 +22,12 @@ import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BottomTabUtil
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.PanDuanUtil
|
||||
import com.google.gson.Gson
|
||||
import com.gyf.cactus.ext.cactusUpdateNotification
|
||||
import com.permissionx.guolindev.PermissionX
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
@Suppress("DIVISION_BY_ZERO")
|
||||
@SuppressLint("SetTextI18n")
|
||||
class MainActivity : BaseAppCompatActivity() {
|
||||
|
||||
private var ibs = arrayOf<ImageView>()
|
||||
@@ -37,7 +43,8 @@ class MainActivity : BaseAppCompatActivity() {
|
||||
1 -> {
|
||||
isExit = false;
|
||||
}
|
||||
RequsetCodeConstants.SUCCESS -> {}
|
||||
RequsetCodeConstants.SUCCESS -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +52,10 @@ class MainActivity : BaseAppCompatActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
StateStyleUtil.stateTextColor(this)
|
||||
setContentView(R.layout.activity_main)
|
||||
cactusUpdateNotification {
|
||||
setTitle("好运司机")
|
||||
setContent("您的接单小助手")
|
||||
}
|
||||
con = this
|
||||
act = this
|
||||
//隐藏标题栏
|
||||
@@ -84,6 +95,7 @@ class MainActivity : BaseAppCompatActivity() {
|
||||
bt.hide(fs[bt.index])
|
||||
bt.selectItem(fs[1])
|
||||
} else {
|
||||
EventBus.getDefault().post(WalletEvent("refresh"))
|
||||
bt.setDefaultFragment(fs[1])
|
||||
}
|
||||
bt.index = 1
|
||||
@@ -117,16 +129,21 @@ class MainActivity : BaseAppCompatActivity() {
|
||||
bt.index = 3
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
getPression()
|
||||
}
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
// getPression()
|
||||
// }
|
||||
}
|
||||
|
||||
fun getPression() {
|
||||
PermissionX.init(this)
|
||||
.permissions(Manifest.permission.ACCESS_FINE_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 ->
|
||||
if (allGranted) {
|
||||
|
||||
@@ -147,6 +164,7 @@ class MainActivity : BaseAppCompatActivity() {
|
||||
fun jumpLogin() {
|
||||
var inl = Intent(con, LoginActivity::class.java)
|
||||
startActivity(inl)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -38,7 +39,8 @@ public class UiAuxiliary {
|
||||
}
|
||||
|
||||
public static void delLogin(Context con){
|
||||
JPushInterface.deleteAlias(con,0);
|
||||
// JPushInterface.deleteAlias(con,0);
|
||||
SPUtils.remove(con,"curWaybillId");
|
||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_TOKEN,"");
|
||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_UNAME,"");
|
||||
SPUtil.insSP(con,LoginActivity.USER,LoginActivity.USER_RNAME,"");
|
||||
|
||||
@@ -14,6 +14,7 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.web.WebOnlyOneActivity;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.web.WebActivity;
|
||||
@@ -68,7 +69,7 @@ public class AgreementAlert extends CenterPopupView {
|
||||
@Override
|
||||
public void onClick(View widget) {
|
||||
//用户服务协议点击事件
|
||||
Intent in=new Intent(getContext(), WebActivity.class);
|
||||
Intent in=new Intent(getContext(), WebOnlyOneActivity.class);
|
||||
in.putExtra("url",url2);
|
||||
in.putExtra("title","用户服务协议");
|
||||
getContext().startActivity(in);
|
||||
@@ -87,7 +88,7 @@ public class AgreementAlert extends CenterPopupView {
|
||||
@Override
|
||||
public void onClick(View widget) {
|
||||
//用户服务协议点击事件
|
||||
Intent in=new Intent(getContext(), WebActivity.class);
|
||||
Intent in=new Intent(getContext(), WebOnlyOneActivity.class);
|
||||
in.putExtra("url",url);
|
||||
in.putExtra("title","隐私政策");
|
||||
getContext().startActivity(in);
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.alert;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
@@ -12,6 +16,8 @@ import androidx.annotation.NonNull;
|
||||
|
||||
import com.king.app.updater.AppUpdater;
|
||||
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.arpa.hndahesudintocctmsdriver.R;
|
||||
|
||||
@@ -27,11 +33,11 @@ import java.io.File;
|
||||
*/
|
||||
public class UpAppAlert extends CenterPopupView {
|
||||
|
||||
private TextView content,vs;
|
||||
private Button tv_cancel,tv_confirm;
|
||||
private TextView content, vs, tvContent;
|
||||
private Button tv_cancel, tv_confirm, tvOk;
|
||||
private LinearLayout up_div;
|
||||
private String url="";
|
||||
private String body="";
|
||||
private String url = "";
|
||||
private String body = "";
|
||||
private Context con;
|
||||
private ProgressBar progress_view;
|
||||
private String version;
|
||||
@@ -39,19 +45,20 @@ public class UpAppAlert extends CenterPopupView {
|
||||
private LinearLayout force_box;
|
||||
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);
|
||||
con=context;
|
||||
this.url=url;
|
||||
this.body=body;
|
||||
this.version=version;
|
||||
this.force=force;
|
||||
con = context;
|
||||
this.url = url;
|
||||
this.body = body;
|
||||
this.version = version;
|
||||
this.force = force;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.alert_up_app;
|
||||
}
|
||||
|
||||
public UpAppAlert(@NonNull @NotNull Context context) {
|
||||
super(context);
|
||||
|
||||
@@ -60,15 +67,17 @@ public class UpAppAlert extends CenterPopupView {
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
content=findViewById(R.id.tv_content);
|
||||
tv_cancel=findViewById(R.id.tv_cancel);
|
||||
tv_confirm=findViewById(R.id.tv_confirm);
|
||||
up_div=findViewById(R.id.up_div);
|
||||
progress_view=findViewById(R.id.progress);
|
||||
content=findViewById(R.id.tv_content);
|
||||
force_box=findViewById(R.id.force_box);
|
||||
force_btn=findViewById(R.id.force_btn);
|
||||
if(force.equals("1")){
|
||||
content = findViewById(R.id.tv_content);
|
||||
tv_cancel = findViewById(R.id.tv_cancel);
|
||||
tv_confirm = findViewById(R.id.tv_confirm);
|
||||
tvContent = findViewById(R.id.tvContent);
|
||||
tvOk = findViewById(R.id.tvOk);
|
||||
up_div = findViewById(R.id.up_div);
|
||||
progress_view = findViewById(R.id.progress);
|
||||
content = findViewById(R.id.tv_content);
|
||||
force_box = findViewById(R.id.force_box);
|
||||
force_btn = findViewById(R.id.force_btn);
|
||||
if (force.equals("1")) {
|
||||
force_box.setVisibility(GONE);
|
||||
}
|
||||
force_btn.setOnClickListener(v -> {
|
||||
@@ -76,16 +85,16 @@ public class UpAppAlert extends CenterPopupView {
|
||||
dismiss();
|
||||
//detachFromHost();
|
||||
});
|
||||
vs=findViewById(R.id.vs);
|
||||
vs = findViewById(R.id.vs);
|
||||
content.setText(body);
|
||||
vs.setText(version);
|
||||
tv_cancel.setOnClickListener(v -> {
|
||||
System.exit(1);
|
||||
});
|
||||
tv_confirm.setOnClickListener(v -> {
|
||||
new AppUpdater.Builder()
|
||||
new AppUpdater.Builder(con)
|
||||
.setUrl(url)
|
||||
.build(con)
|
||||
.build()
|
||||
.setUpdateCallback(new AppUpdateCallback() {
|
||||
@Override
|
||||
public void onStart(String url) {
|
||||
@@ -93,23 +102,28 @@ public class UpAppAlert extends CenterPopupView {
|
||||
tv_confirm.setVisibility(GONE);
|
||||
up_div.setVisibility(VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgress(long progress, long total, boolean isChange) {
|
||||
// Log.e("progress",progress+"");
|
||||
// Log.e("total",total+"");
|
||||
// Log.e("isChange",isChange+"");
|
||||
float sum=progress;
|
||||
float max=total;
|
||||
if(progress>0){
|
||||
float b=sum/max;
|
||||
Log.e("百分比",(100*b)+"");
|
||||
progress_view.setProgress((int) (100*b));
|
||||
float sum = progress;
|
||||
float max = total;
|
||||
if (progress > 0) {
|
||||
float b = sum / max;
|
||||
Log.e("百分比", (100 * b) + "");
|
||||
progress_view.setProgress((int) (100 * b));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish(File file) {
|
||||
|
||||
tvContent.setText("下载完成,请及时安装!");
|
||||
tvOk.setVisibility(VISIBLE);
|
||||
tvOk.setOnClickListener(v1 -> {
|
||||
AppUtils.installApk(getContext(), file, getContext().getPackageName() + Constants.DEFAULT_FILE_PROVIDER);
|
||||
});
|
||||
}
|
||||
})
|
||||
.start();
|
||||
|
||||
+121
-26
@@ -18,10 +18,17 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.OCRQualiBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.ImageLoader;
|
||||
import com.dahe.mylibrary.utils.TimeUtil;
|
||||
import com.esign.esignsdk.EsignSdk;
|
||||
import com.esign.esignsdk.data.AuthEvent;
|
||||
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
||||
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode;
|
||||
import com.google.gson.Gson;
|
||||
@@ -43,6 +50,9 @@ import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
@@ -59,7 +69,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
private RelativeLayout up_img, cow1;
|
||||
private LinearLayout data_view;
|
||||
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 EditText value1;
|
||||
private Button submit;
|
||||
@@ -77,13 +87,35 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
ub = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
if ("0".equals(type)) {//从业资格识别,党员认证不识别
|
||||
new OCRRequest().ORCQualificaZj(con, hd, ub.getData().getUrl());
|
||||
}
|
||||
|
||||
url = ub.getData().getUrl();
|
||||
Glide.with(con).load(url).into(img);
|
||||
ImageLoader.getInstance().loadImage(con,url,img);
|
||||
up_img.setVisibility(View.GONE);
|
||||
img.setVisibility(View.VISIBLE);
|
||||
}
|
||||
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) {
|
||||
Log.e("is", CacheGroup.cacheList.get("isAuthDriverAuthQualification"));
|
||||
ib = gson.fromJson(CacheGroup.cacheList.get("isAuthDriverAuthQualification"), IsAuthDriverAuthQualificationBean.class);
|
||||
@@ -100,16 +132,32 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthQualification"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
// initAuth();
|
||||
//从业资格证->实名认证
|
||||
// finish();
|
||||
if (key) {
|
||||
key = false;
|
||||
new AuthRequest().getAuthUrl(con, hd);
|
||||
new Handler().postDelayed(() -> {
|
||||
key = true;
|
||||
}, 3000);
|
||||
isAuth = true;
|
||||
//判断是否从车辆进来 carId为空从个人认证进来需跳转实名认证,不为空车辆信息进入,需跳转车辆照片
|
||||
if (TextUtils.isEmpty(carId)) {
|
||||
//从业资格证->实名认证
|
||||
if (key) {
|
||||
key = false;
|
||||
new AuthRequest().getAuthUrl(con, hd);
|
||||
new Handler().postDelayed(() -> {
|
||||
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();
|
||||
} else {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
@@ -135,9 +183,10 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
Log.e("url", CacheGroup.cacheList.get("authUrl"));
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("authUrl"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
finish();
|
||||
// finish();
|
||||
EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||
} else {
|
||||
finish();
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||
CacheGroup.cacheList.remove("authUrl");
|
||||
@@ -153,6 +202,8 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
|
||||
private String type = "0";
|
||||
private String carId = "";
|
||||
private boolean isOverCar = false;
|
||||
private UserBean userBean;
|
||||
|
||||
@Override
|
||||
@@ -161,7 +212,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
StateStyleUtil.stateTextColor(this);
|
||||
setContentView(R.layout.activity_auth_qualification);
|
||||
con = this;
|
||||
act=this;
|
||||
act = this;
|
||||
img = findViewById(R.id.img);
|
||||
zjimg_name = findViewById(R.id.zjimg_name);
|
||||
upload_img = findViewById(R.id.upload_img);
|
||||
@@ -178,6 +229,8 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
vs = findViewById(R.id.vs);
|
||||
data_view = findViewById(R.id.data_view);
|
||||
type = getIntent().getExtras().getString("type");
|
||||
carId = getIntent().getExtras().getString("carId", "");
|
||||
isOverCar = getIntent().getExtras().getBoolean("isOverCar", false);
|
||||
ur = new UserRequset(con, hd);
|
||||
initView(null);
|
||||
if ("0".equals(type)) {
|
||||
@@ -189,6 +242,11 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
//new RZRequest().isDriverAuthQualification(con,hd);
|
||||
}
|
||||
if (TextUtils.isEmpty(carId)) {//carId不为空 从添加车辆进入 该操作不能跳过
|
||||
tvSkip.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
tvSkip.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean key = true;
|
||||
@@ -203,30 +261,38 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
gia.showPopueWindow(this);
|
||||
}
|
||||
});
|
||||
up_img.setOnClickListener(v -> {
|
||||
if (!isAuth) {
|
||||
gia.showPopueWindow(this);
|
||||
}
|
||||
});
|
||||
img.setOnClickListener(v -> {
|
||||
if (!"".equals(url)) {
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(img, url, true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||
.show();
|
||||
new XPopup.Builder(con).asImageViewer(img, url, new SmartGlideImageLoader(R.mipmap.ic_launcher_round)).show();
|
||||
// new XPopup.Builder(con)
|
||||
// .asImageViewer(img, url, true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||
// .show();
|
||||
}
|
||||
});
|
||||
value2.setOnClickListener(v -> {
|
||||
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();
|
||||
if (!isAuth) {
|
||||
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();
|
||||
}
|
||||
});
|
||||
submit.setOnClickListener(v -> {
|
||||
if (!isAuth) {
|
||||
String id = value1.getText() + "";
|
||||
String date = value2.getText() + "";
|
||||
if ("0".equals(type)) {
|
||||
if (!"".equals(id) && !"".equals(date) && !"".equals(url)) {
|
||||
if (!"".equals(date) && !"".equals(url)) {
|
||||
new AuthRequest().driverAuthQualification(con, hd, id, ub.getData().getId(), date);
|
||||
} else {
|
||||
Toast.makeText(con, "提交信息不完整", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(con, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
if (!"".equals(url)) {
|
||||
@@ -257,6 +323,8 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
});
|
||||
|
||||
tvSkip.setOnClickListener(v -> {
|
||||
|
||||
|
||||
if (type.equals("0")) {
|
||||
// finish();
|
||||
if (key) {
|
||||
@@ -290,7 +358,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
zjimg_name.setText("党员证照片");
|
||||
data_view.setVisibility(View.GONE);
|
||||
title2.setVisibility(View.GONE);
|
||||
}else{
|
||||
} else {
|
||||
tvTips.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
@@ -304,13 +372,13 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
value2.setText(ib.getData().getQualificationCertificateValidity());
|
||||
up_img.setVisibility(View.GONE);
|
||||
img.setVisibility(View.VISIBLE);
|
||||
Glide.with(con).load(url).into(img);
|
||||
ImageLoader.getInstance().loadImage(con,url,img);
|
||||
upload_img.setText("已上传");
|
||||
} else {
|
||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||
isAuth = true;
|
||||
url = userBean.getData().getPartyMemberUrl();
|
||||
Glide.with(con).load(url).into(img);
|
||||
ImageLoader.getInstance().loadImage(con,url,img);
|
||||
up_img.setVisibility(View.GONE);
|
||||
img.setVisibility(View.VISIBLE);
|
||||
upload_img.setText("已上传");
|
||||
@@ -344,4 +412,31 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+838
-180
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,62 @@
|
||||
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("刷脸成功"));
|
||||
}
|
||||
}
|
||||
+80
-15
@@ -1,9 +1,14 @@
|
||||
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.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.widget.ImageView;
|
||||
@@ -15,9 +20,16 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
||||
import com.arpa.hndahesudintocctmsdriver.H5Activity2;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.business.BusinessActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PermissionUtils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||
import com.dahe.mylibrary.utils.ImageLoader;
|
||||
import com.esign.esignsdk.EsignSdk;
|
||||
import com.esign.esignsdk.data.AuthEvent;
|
||||
import com.google.gson.Gson;
|
||||
@@ -40,6 +52,8 @@ import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||
import com.permissionx.guolindev.PermissionX;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -63,15 +77,15 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
||||
super.msgMethod(m);
|
||||
switch (m.what) {
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
if (CacheGroup.cacheList.get("userdata") != null) {
|
||||
ub = gson.fromJson(CacheGroup.cacheList.get("userdata"), UserBean.class);
|
||||
if (CacheGroup.cacheList.get("userdata2") != null) {
|
||||
ub = gson.fromJson(CacheGroup.cacheList.get("userdata2"), UserBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
initView(ub);
|
||||
SPUtil.insSP(con, "data", "userdata", CacheGroup.cacheList.get("userdata"));
|
||||
SPUtil.insSP(con, "data", "userdata", CacheGroup.cacheList.get("userdata2"));
|
||||
} else {
|
||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("userdata");
|
||||
CacheGroup.cacheList.remove("userdata2");
|
||||
}
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
upb = gson.fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
@@ -95,7 +109,19 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
||||
Log.e("url", CacheGroup.cacheList.get("authUrl"));
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("authUrl"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||
|
||||
Intent intent = new Intent(this, H5Activity.class);
|
||||
intent.putExtra("url", (String) bb.getData());
|
||||
intent.putExtra("view_file", false);
|
||||
// intent.putExtra("isGoCar", true);
|
||||
startActivity(intent);
|
||||
|
||||
// Bundle t = new Bundle();
|
||||
// t.putString("url",(String) bb.getData());
|
||||
// t.putBoolean("view_file", false);
|
||||
// ActivityUtils.startActivity(con, H5Activity2.class,t);
|
||||
|
||||
// EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||
} else {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||
@@ -161,30 +187,67 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
||||
// startActivityForResult(in, 12);
|
||||
//EsignSdk.getInstance().startH5Activity(act,"https://smlh5.esign.cn/usercenterFront/oemAuth/v3/realName/index?contextKey=b7b103b15b866ec4c72beef1dfe20828&appId=7438873235");
|
||||
if (key) {
|
||||
key = false;
|
||||
new AuthRequest().getAuthUrl(con, hd);
|
||||
new Handler().postDelayed(() -> {
|
||||
key = true;
|
||||
}, 3000);
|
||||
PermissionX.init(this)
|
||||
.permissions(Manifest.permission.CAMERA)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if(allGranted) {
|
||||
key = false;
|
||||
new AuthRequest().getAuthUrl(con, hd);
|
||||
new Handler().postDelayed(() -> {
|
||||
key = true;
|
||||
}, 3000);
|
||||
} else{
|
||||
new MessageUtils().showSimCenPop(con, "缺少相机权限,将无法为您提供服务,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
//头像
|
||||
up_img.setOnClickListener(v -> {
|
||||
gia.showPopueWindow(this);
|
||||
PermissionUtils.Companion.getInstance().showPermissionMessage(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 -> {
|
||||
if (ub.getData().getHeadportraitUrl() != null && !ub.getData().getHeadportraitUrl().equals("")) {
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(up_head, ub.getData().getHeadportraitUrl(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||
.asImageViewer(up_head, ub.getData().getHeadportraitUrl(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||
.show();
|
||||
// new XPopup.Builder(con)
|
||||
// .asImageViewer(up_head, ub.getData().getHeadportraitUrl(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||
// .show();
|
||||
}
|
||||
});
|
||||
hyr = new HuoYuanRequset(con, hd);
|
||||
ur = new UserRequset(con, hd);
|
||||
ur.User();
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
ur.User2();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
@@ -200,7 +263,7 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
||||
TextView name = findViewById(R.id.rname);
|
||||
name.setText(StringUtil.isNull(ub.getData().getRname(), "未实名"));
|
||||
if (ub.getData().getHeadportraitUrl() != null && !ub.getData().getHeadportraitUrl().equals("")) {
|
||||
Glide.with(con).load(ub.getData().getHeadportraitUrl()).into(up_head);
|
||||
ImageLoader.getInstance().loadImage(con,ub.getData().getHeadportraitUrl(),up_head);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +271,7 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
||||
public void personResult(PersonEvent home) {
|
||||
Log.e("-res-", home.getMessage());
|
||||
if (ur != null) {
|
||||
ur.User();
|
||||
ur.User2();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,6 +327,8 @@ public class PersonalAuthActivity extends BaseAppCompatActivity {
|
||||
Toast.makeText(con, "签署场景成功", Toast.LENGTH_SHORT).show();
|
||||
} else if ("realName".equalsIgnoreCase(jsonObject.getString("key"))) {
|
||||
Toast.makeText(con, "实名认证成功", Toast.LENGTH_SHORT).show();
|
||||
EsignSdk.getInstance().finishH5Activity();
|
||||
finish();
|
||||
} else {
|
||||
Toast.makeText(con, "意愿认证成功", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
+204
-36
@@ -3,6 +3,7 @@ package com.arpa.hndahesudintocctmsdriver.ui.auth;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -20,22 +21,31 @@ import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.CarDelBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.IsAuthDriverAuthQualificationBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.OCRBankBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.OCRRoadBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.AuthRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.my.WoDeFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.wallet.WalletFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.img.GetImageAlert;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.ImageLoader;
|
||||
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.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
@@ -48,23 +58,24 @@ import java.util.List;
|
||||
*/
|
||||
public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnClickListener {
|
||||
|
||||
private String[] titles = {"车辆照片", "NFC照片", "车辆登记证书", "道路运输许可证"};
|
||||
private String[] name1 = {"车辆照片", "NFC照片", "车辆登记证书照片", "道路运输许可证照片"};
|
||||
private String[] name2 = {"请上传车辆照片", "请上传NFC照片", "请上传车辆登记证书照片", "请上传道路运输许可证照片"};
|
||||
private Boolean[] isShowEdit = {false, false, true, true};
|
||||
private Boolean[] isShowSkip = {true, false, false, false};
|
||||
private String[] titles = {"车辆照片", "NFC照片", "车辆登记证书", "道路运输许可证", "车辆交强险"};
|
||||
private String[] name1 = {"车辆照片", "NFC照片", "车辆登记证书照片", "道路运输许可证照片", "车辆交强险照片"};
|
||||
private String[] name2 = {"请上传车辆照片", "请上传NFC照片", "请上传车辆登记证书照片", "请上传道路运输许可证照片", "请上传车辆交强险照片"};
|
||||
private Boolean[] isShowEdit = {false, false, true, true, true};
|
||||
private Boolean[] isShowSkip = {true, false, false, true, true};
|
||||
private String[] tips = {
|
||||
"",
|
||||
"*注意: 没有粘贴NFC芯片的车辆无需上传,可直接跳过",
|
||||
"*注意: 没有可直接跳过,等候下次上传",
|
||||
"*注意: 4.5吨一下车辆不需要上传,可直接跳过"};
|
||||
"*注意: 4.5吨以下车辆不需要上传,可直接跳过",
|
||||
""};
|
||||
|
||||
|
||||
private BaseRecyclerView brv;
|
||||
private ImageView img;
|
||||
private TextView title1, title2, title3, zjimg_name, upload_img, tvTips, tvSkip;
|
||||
private TextView title1, title2, title3, zjimg_name, upload_img, tvTips, tvSkip, value2;
|
||||
private EditText value1;
|
||||
private LinearLayout llInfo;
|
||||
private LinearLayout llInfo, llDate;
|
||||
private RelativeLayout up_img;
|
||||
private Button submit;
|
||||
|
||||
@@ -74,7 +85,9 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
|
||||
private int type;//页面类型
|
||||
private String path, carId, url;//图片路径
|
||||
private boolean carExist = false;
|
||||
private GetImageAlert gia = new GetImageAlert();
|
||||
private CustomDialog customDialog;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
@@ -91,6 +104,23 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
}
|
||||
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) {
|
||||
@@ -106,16 +136,31 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 5);
|
||||
break;
|
||||
case 3:
|
||||
//道路运输证ocr识别
|
||||
new OCRRequest().ORCRoadLicZj(con, hd, ub.getData().getUrl());
|
||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 2);
|
||||
break;
|
||||
case 4:
|
||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 7);
|
||||
break;
|
||||
default:
|
||||
if (customDialog != null && customDialog.isShowing())
|
||||
customDialog.dismiss();
|
||||
break;
|
||||
}
|
||||
url = ub.getData().getUrl();
|
||||
Glide.with(con).load(url).into(img);
|
||||
// Glide.with(con).load(url).into(img);
|
||||
ImageLoader.getInstance().loadImage(con,path,img);
|
||||
|
||||
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
}
|
||||
|
||||
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);
|
||||
if (bb.getCode() == 200) {
|
||||
switch (type) {
|
||||
@@ -129,7 +174,11 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
Toast.makeText(con, "上传车辆登记证书照片", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case 3:
|
||||
Toast.makeText(con, "上传道路运输证成功", Toast.LENGTH_SHORT).show();
|
||||
ur.vehicleDelTwo(carId);
|
||||
// Toast.makeText(con, "上传道路运输证成功", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case 4:
|
||||
Toast.makeText(con, "交强险证件上传成功", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -141,11 +190,11 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
Log.e("is", CacheGroup.cacheList.get("saveCarRegisterNo"));
|
||||
IsAuthDriverAuthQualificationBean ib = gson.fromJson(CacheGroup.cacheList.get("saveCarRegisterNo"), IsAuthDriverAuthQualificationBean.class);
|
||||
if (ib.getCode() == 200) {
|
||||
finish();
|
||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||
in.putExtra("type", 3);
|
||||
in.putExtra("carId", carId);
|
||||
con.startActivity(in);
|
||||
finish();
|
||||
} else {
|
||||
Toast.makeText(con, ib.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -157,9 +206,13 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
IsAuthDriverAuthQualificationBean ib = gson.fromJson(CacheGroup.cacheList.get("saveCarRoadLicenseNo"), IsAuthDriverAuthQualificationBean.class);
|
||||
if (ib.getCode() == 200) {
|
||||
//判断是否需要跳转挂车行驶证页面
|
||||
if (!"".equals(carId) && cdb.getData().getIsTrailer() == 1) {
|
||||
if (!"".equals(carId)) {
|
||||
if (!"".equals(carId) && cdb.getData() != null) {
|
||||
if (cdb.getData().getIsTrailer() == 1 && cdb.getData().getTrailerResVo() != null && !TextUtils.isEmpty(cdb.getData().getTrailerResVo().getCarNumber())) {//需要挂车,并且传过挂车直接结束
|
||||
Intent in = new Intent(con, AddCarSuccActivity.class);
|
||||
in.putExtra("type", 3);
|
||||
con.startActivity(in);
|
||||
finish();
|
||||
} else if (cdb.getData().getIsTrailer() == 1 && cdb.getData().getTrailerResVo() != null && TextUtils.isEmpty(cdb.getData().getTrailerResVo().getCarNumber())) {//需要挂车,没传过挂车,到挂车页面
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 3);
|
||||
in.putExtra("carId", carId);
|
||||
@@ -167,22 +220,67 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
in.putExtra("cheData", new Gson().toJson(cdb));
|
||||
}
|
||||
startActivity(in);
|
||||
} else {
|
||||
Toast.makeText(con, "请先绑定行驶证", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
} else if (cdb.getData().getIsTrailer() == 0) {//不需要挂车
|
||||
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 {
|
||||
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 {
|
||||
Toast.makeText(con, ib.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
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;
|
||||
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||
customDialog = new CustomDialog(con, "加载中...");
|
||||
customDialog.show();
|
||||
path = (String) m.obj;
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
break;
|
||||
@@ -201,6 +299,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
title1 = findViewById(R.id.title1);
|
||||
title2 = findViewById(R.id.title2);
|
||||
title3 = findViewById(R.id.name1);
|
||||
value2 = findViewById(R.id.value2);
|
||||
up_img = findViewById(R.id.up_img);
|
||||
img = findViewById(R.id.img);
|
||||
zjimg_name = findViewById(R.id.zjimg_name);
|
||||
@@ -208,6 +307,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
tvTips = findViewById(R.id.tvTips);
|
||||
value1 = findViewById(R.id.value1);
|
||||
llInfo = findViewById(R.id.llInfo);
|
||||
llDate = findViewById(R.id.llDate);
|
||||
tvSkip = findViewById(R.id.tvSkip);
|
||||
submit = findViewById(R.id.submit);
|
||||
|
||||
@@ -215,10 +315,12 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
submit.setOnClickListener(this);
|
||||
upload_img.setOnClickListener(this);
|
||||
img.setOnClickListener(this);
|
||||
value2.setOnClickListener(this);
|
||||
|
||||
|
||||
type = getIntent().getExtras().getInt("type");
|
||||
carId = getIntent().getExtras().getString("carId", "");
|
||||
carExist = getIntent().getExtras().getBoolean("carExist", false);
|
||||
changeViewByType(type);
|
||||
|
||||
ur = new UserRequset(con, hd);
|
||||
@@ -275,6 +377,14 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
case R.id.img:
|
||||
showBigImg();
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,37 +393,66 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
* 展示大图片
|
||||
*/
|
||||
private void showBigImg() {
|
||||
if ((type == 3 && TextUtils.isEmpty(cdb.getData().getRoadLicensePhoto())) || (type == 4 && TextUtils.isEmpty(cdb.getData().getPolicyPhotoUrl()))) {
|
||||
choicePhoto();
|
||||
return;
|
||||
}
|
||||
switch (type) {
|
||||
case 0:
|
||||
if (cdb.getData().getRoadLicensePhoto() != null && !cdb.getData().getCarImage().equals("")) {
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(img, cdb.getData().getCarImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||
.asImageViewer(img, cdb.getData().getCarImage(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||
.show();
|
||||
// new XPopup.Builder(con)
|
||||
// .asImageViewer(img, cdb.getData().getCarImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||
// .show();
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (cdb.getData().getRoadLicensePhoto() != null && !cdb.getData().getNfcImage().equals("")) {
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(img, cdb.getData().getNfcImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||
.asImageViewer(img, cdb.getData().getNfcImage(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||
.show();
|
||||
// new XPopup.Builder(con)
|
||||
// .asImageViewer(img, cdb.getData().getNfcImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||
// .show();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (cdb.getData().getRoadLicensePhoto() != null && !cdb.getData().getRegisterImage().equals("")) {
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(img, cdb.getData().getRegisterImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||
.asImageViewer(img, cdb.getData().getRegisterImage(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||
.show();
|
||||
// new XPopup.Builder(con)
|
||||
// .asImageViewer(img, cdb.getData().getRegisterImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||
// .show();
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (cdb.getData().getRoadLicensePhoto() != null && !"".equals(cdb.getData().getRoadLicensePhoto())) {
|
||||
//roadLicensePhoto
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(img, cdb.getData().getRoadLicensePhoto(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||
.asImageViewer(img, cdb.getData().getRoadLicensePhoto(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||
.show();
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,13 +468,14 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
|
||||
switch (type) {
|
||||
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();
|
||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||
in.putExtra("type", 1);
|
||||
// in.putExtra("type", 1);
|
||||
in.putExtra("type", 3);
|
||||
in.putExtra("carId", carId);
|
||||
con.startActivity(in);
|
||||
} else{
|
||||
} else {
|
||||
Toast.makeText(this, "请上传车辆照片", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
@@ -349,18 +489,27 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
case 2:
|
||||
String s = value1.getText().toString();
|
||||
if (TextUtils.isEmpty(s)) {
|
||||
Toast.makeText(this, "请完善证号", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(this, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
new AuthRequest().saveCarRegisterNo(con,hd,carId,s);
|
||||
new AuthRequest().saveCarRegisterNo(con, hd, carId, s);
|
||||
break;
|
||||
case 3:
|
||||
String s1 = value1.getText().toString();
|
||||
if (TextUtils.isEmpty(s1)) {
|
||||
Toast.makeText(this, "请完善证号", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(this, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -372,27 +521,38 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
if (null != cdb) {
|
||||
if (0 == type) {
|
||||
if (!TextUtils.isEmpty(cdb.getData().getCarImage())) {
|
||||
Glide.with(con).load(cdb.getData().getCarImage()).into(img);
|
||||
ImageLoader.getInstance().loadImage(con,cdb.getData().getCarImage(),img);
|
||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||
upload_img.setText("已上传");
|
||||
}
|
||||
} else if (1 == type) {
|
||||
if (!TextUtils.isEmpty(cdb.getData().getNfcImage())) {
|
||||
Glide.with(con).load(cdb.getData().getNfcImage()).into(img);
|
||||
ImageLoader.getInstance().loadImage(con,cdb.getData().getNfcImage(),img);
|
||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||
upload_img.setText("已上传");
|
||||
}
|
||||
} else if (2 == type) {
|
||||
if (!TextUtils.isEmpty(cdb.getData().getRegisterImage())) {
|
||||
Glide.with(con).load(cdb.getData().getRegisterImage()).into(img);
|
||||
ImageLoader.getInstance().loadImage(con,cdb.getData().getRegisterImage(),img);
|
||||
value1.setText(cdb.getData().getRegisterNo());
|
||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||
upload_img.setText("已上传");
|
||||
}
|
||||
} else if (3 == type) {
|
||||
if (!TextUtils.isEmpty(cdb.getData().getRoadLicensePhoto())) {
|
||||
Glide.with(con).load(cdb.getData().getRoadLicensePhoto()).into(img);
|
||||
ImageLoader.getInstance().loadImage(con,cdb.getData().getRoadLicensePhoto(),img);
|
||||
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);
|
||||
upload_img.setText("已上传");
|
||||
}
|
||||
@@ -425,7 +585,8 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
if (0 == type) {
|
||||
finish();
|
||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||
in.putExtra("type", 1);
|
||||
// in.putExtra("type", 1);
|
||||
in.putExtra("type", 3);
|
||||
in.putExtra("carId", carId);
|
||||
con.startActivity(in);
|
||||
} else if (1 == type) {
|
||||
@@ -477,6 +638,13 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
||||
tvTips.setText(tips[type]);
|
||||
tvSkip.setVisibility(isShowSkip[type] ? View.GONE : View.VISIBLE);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+34
-4
@@ -14,7 +14,10 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.event.RefreshCarListEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
@@ -33,10 +36,12 @@ import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@@ -50,6 +55,7 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
||||
public String carId="";
|
||||
public static final String DEL_CAR="delete_che";
|
||||
public static final String CAR_AUDIO="CAR_AUDIO";
|
||||
public static final String APP_INFO="APP_INFO";
|
||||
private int submitIndex=0;
|
||||
private BaseBean bb;
|
||||
private ImageView show_img;
|
||||
@@ -64,7 +70,7 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
||||
CacheGroup.cacheList.remove(CAR_AUDIO);
|
||||
}
|
||||
if(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL)!=null){
|
||||
Log.e("--res--",CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL));
|
||||
Log.e("--res--lijia",CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL));
|
||||
cdb=gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL), CarDelBean.class);
|
||||
if(cdb.getCode()==200){
|
||||
initView(null);
|
||||
@@ -78,6 +84,8 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
||||
bb=gson.fromJson(CacheGroup.cacheList.get(DEL_CAR),BaseBean.class);
|
||||
if (bb.getCode()==200) {
|
||||
Toast.makeText(con,"删除成功",Toast.LENGTH_SHORT).show();
|
||||
RefreshCarListEvent ve = new RefreshCarListEvent("");
|
||||
EventBus.getDefault().post(ve);
|
||||
finish();
|
||||
}else{
|
||||
Toast.makeText(con,"删除失败:"+bb.getMsg(),Toast.LENGTH_SHORT).show();
|
||||
@@ -165,6 +173,13 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
||||
private GetImageAlert gia=new GetImageAlert();
|
||||
private boolean key1,key2,key3=false;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
@@ -206,11 +221,12 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
||||
RelativeLayout r5=v.findViewById(R.id.r5);
|
||||
RelativeLayout r6=v.findViewById(R.id.r6);
|
||||
RelativeLayout r7=v.findViewById(R.id.r7);
|
||||
RelativeLayout r8=v.findViewById(R.id.r8);
|
||||
View vs1=v.findViewById(R.id.vs1);
|
||||
View vs2=v.findViewById(R.id.vs2);
|
||||
r4.setVisibility(View.GONE);
|
||||
r5.setVisibility(View.GONE);
|
||||
vs1.setVisibility(View.GONE);
|
||||
// vs1.setVisibility(View.GONE);
|
||||
vs2.setVisibility(View.GONE);
|
||||
if(!"".equals(carId) && cdb.getData().getIsTrailer()==1){
|
||||
r4.setVisibility(View.VISIBLE);
|
||||
@@ -221,8 +237,11 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
||||
carImage.setOnClickListener(v14 -> {
|
||||
if(cdb!=null && cdb.getData()!=null && cdb.getData().getCarImage()!=null && !cdb.getData().getCarImage().equals("")){
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(carImage,cdb.getData().getCarImage(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||
.asImageViewer(carImage,cdb.getData().getCarImage(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||
.show();
|
||||
// new XPopup.Builder(con)
|
||||
// .asImageViewer(carImage,cdb.getData().getCarImage(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||
// .show();
|
||||
}
|
||||
});
|
||||
r1.setOnClickListener(v12 -> {
|
||||
@@ -297,6 +316,17 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
||||
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 -> {
|
||||
new XPopup.Builder(con)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
@@ -380,7 +410,7 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
|
||||
public void processResult(VehicleEvent event) {
|
||||
Log.e("-msg-",event.getMessage());
|
||||
if(!"挂".equals(event.getMessage())) {
|
||||
|
||||
+151
-66
@@ -2,6 +2,7 @@ package com.arpa.hndahesudintocctmsdriver.ui.business;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@@ -9,6 +10,15 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.amap.api.services.core.AMapException;
|
||||
import com.amap.api.services.core.LatLonPoint;
|
||||
import com.amap.api.services.core.PoiItem;
|
||||
import com.amap.api.services.core.SuggestionCity;
|
||||
import com.amap.api.services.poisearch.PoiResult;
|
||||
import com.amap.api.services.poisearch.PoiSearch;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||
import com.dahe.mylibrary.utils.ImageLoader;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.BusinessBean;
|
||||
@@ -39,53 +49,70 @@ import okhttp3.Response;
|
||||
* @date 2021/9/6 9:59
|
||||
* @description:
|
||||
*/
|
||||
public class BusinessActivity extends BaseActivity {
|
||||
public class BusinessActivity extends BaseActivity implements PoiSearch.OnPoiSearchListener {
|
||||
|
||||
private BaseRecyclerView business_type;
|
||||
private BaseRecyclerView business_list;
|
||||
private LocationGDUtil ld;
|
||||
private TextView address;
|
||||
private BusinessListBean blb;
|
||||
private Gson gson=new Gson();
|
||||
private List<Object> bbs=new ArrayList<>();
|
||||
private Gson gson = new Gson();
|
||||
private List<Object> bbs = new ArrayList<>();
|
||||
private CustomDialog customDialog;
|
||||
private int sum=0;
|
||||
private String type="餐饮";
|
||||
private int sum = 0;
|
||||
private String type = "餐饮";
|
||||
private PoiSearch.Query query;
|
||||
private List<PoiItem> poiItems;// poi数据
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
switch (m.what){
|
||||
switch (m.what) {
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
if(CacheGroup.cacheList.get("business_list")!=null){
|
||||
Log.e("--res--",CacheGroup.cacheList.get("business_list")+"");
|
||||
blb=gson.fromJson(CacheGroup.cacheList.get("business_list"),BusinessListBean.class);
|
||||
if(blb.getCode()==200){
|
||||
if (CacheGroup.cacheList.get("business_list") != null) {
|
||||
Log.e("--res--", CacheGroup.cacheList.get("business_list") + "");
|
||||
blb = gson.fromJson(CacheGroup.cacheList.get("business_list"), BusinessListBean.class);
|
||||
if (blb.getCode() == 200) {
|
||||
forGetBusDel();
|
||||
}else{
|
||||
Toast.makeText(con,blb.getMsg(),Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(con, blb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("business_list");
|
||||
}
|
||||
break;
|
||||
case LocationGDUtil.RES:
|
||||
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;
|
||||
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);
|
||||
initBusListDel();
|
||||
break;
|
||||
case 3:
|
||||
Log.e("aaa",(String) m.obj);
|
||||
BusinessBean.DataDTO bd=gson.fromJson((String) m.obj,BusinessBean.DataDTO.class);
|
||||
Log.e("aaa", (String) m.obj);
|
||||
BusinessBean.DataDTO bd = gson.fromJson((String) m.obj, BusinessBean.DataDTO.class);
|
||||
|
||||
if(bd!=null){
|
||||
if (bd != null) {
|
||||
//if (BeanUtil.isBean(bd.getClass())) {
|
||||
try {
|
||||
business_list.addItemV(bd);
|
||||
}catch (Exception e){
|
||||
Log.e("遇到了",bd.toString());
|
||||
} catch (Exception e) {
|
||||
Log.e("遇到了", bd.toString());
|
||||
}
|
||||
//}
|
||||
}
|
||||
@@ -98,71 +125,130 @@ public class BusinessActivity extends BaseActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
StateStyleUtil.stateTextColor(this);
|
||||
setContentView(R.layout.activity_business);
|
||||
con=this;
|
||||
business_type=findViewById(R.id.business_type);
|
||||
business_list=findViewById(R.id.business_list);
|
||||
address=findViewById(R.id.address);
|
||||
con = this;
|
||||
business_type = findViewById(R.id.business_type);
|
||||
business_list = findViewById(R.id.business_list);
|
||||
address = findViewById(R.id.address);
|
||||
try {
|
||||
type=getIntent().getExtras().getString("type");
|
||||
}catch (Exception e){
|
||||
type="餐饮";
|
||||
type = getIntent().getExtras().getString("type");
|
||||
} catch (Exception e) {
|
||||
type = "餐饮";
|
||||
}
|
||||
initView(null);
|
||||
customDialog=new CustomDialog(con, "正在定位...");
|
||||
customDialog = new CustomDialog(con, "正在定位...");
|
||||
customDialog.show();
|
||||
ld=new LocationGDUtil(con,hd);
|
||||
ld = new LocationGDUtil(con, hd);
|
||||
ld.onCreate();
|
||||
|
||||
changeType(type);
|
||||
|
||||
}
|
||||
|
||||
List<Object> list_type=new ArrayList<>();
|
||||
List<Object> list_type = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
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_shangdian));
|
||||
list_type.add(new Model("加油站",R.mipmap.icon_jiayouzhan));
|
||||
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) -> {
|
||||
Model m= (Model) o;
|
||||
ImageView type_img=v.findViewById(R.id.type_icon);
|
||||
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_shangdian));
|
||||
list_type.add(new Model("加油站", R.mipmap.icon_jiayouzhan));
|
||||
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) -> {
|
||||
Model m = (Model) o;
|
||||
ImageView type_img = v.findViewById(R.id.type_icon);
|
||||
type_img.setImageResource(m.getType_img());
|
||||
v.setOnClickListener(v1 -> {
|
||||
sum=0;
|
||||
bbs=new ArrayList<>();
|
||||
customDialog=new CustomDialog(con, "正在切换...");
|
||||
sum = 0;
|
||||
bbs = new ArrayList<>();
|
||||
customDialog = new CustomDialog(con, "正在切换...");
|
||||
customDialog.show();
|
||||
new BusinessRequest().GetBusinessList(con,hd,ld.getLongitude()+"",ld.getLatitude()+"",m.getType_name());
|
||||
changeType(m.getType_name());
|
||||
// new BusinessRequest().GetBusinessList(con,hd,ld.getLongitude()+"",ld.getLatitude()+"",m.getType_name());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public void forGetBusDel(){
|
||||
@Override
|
||||
public void onPoiSearched(PoiResult poiResult, int i) {
|
||||
if (poiResult != null && poiResult.getQuery() != null) {// 搜索poi的结果
|
||||
poiItems = poiResult.getPois();// 当搜索不到poiitem数据时,会返回含有搜索关键字的城市信息
|
||||
if (poiItems != null && poiItems.size() > 0) {
|
||||
initBusListDel();
|
||||
} else {
|
||||
ToastUtils.showToast(con, "对不起,没有搜索到相关数据!");
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showToast(con, "对不起,没有搜索到相关数据!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPoiItemSearched(PoiItem poiItem, int i) {
|
||||
System.out.println(poiItem);
|
||||
}
|
||||
|
||||
private void changeType(String type) {
|
||||
query = new PoiSearch.Query(type, "", "");
|
||||
query.setExtensions("all");
|
||||
query.setPageSize(20);// 设置每页最多返回多少条poiitem
|
||||
query.setPageNum(0);// 设置查第一页
|
||||
|
||||
if (ld.getLatitude() != 0) {
|
||||
try {
|
||||
|
||||
LatLonPoint lp = new LatLonPoint(ld.getLatitude(), ld.getLongitude());
|
||||
PoiSearch poiSearch = new PoiSearch(this, query);
|
||||
poiSearch.setOnPoiSearchListener(this);
|
||||
poiSearch.setBound(new PoiSearch.SearchBound(lp, 5000, true));//
|
||||
// 设置搜索区域为以lp点为圆心,其周围5000米范围
|
||||
poiSearch.searchPOIAsyn();// 异步搜索
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void forGetBusDel() {
|
||||
customDialog.dismiss();
|
||||
//business_list.remo
|
||||
Log.e("-数组-",gson.toJson(blb));
|
||||
for (int i=0;i<blb.getData().getResults().size();i++) {
|
||||
Log.e("-数组-", gson.toJson(blb));
|
||||
for (int i = 0; i < blb.getData().getResults().size(); i++) {
|
||||
//new BusinessRequest().GetBusiness(con,hd,blb.getData().getResults().get(i).getOpenshopid());
|
||||
String url="https://openapi.dianping.com/router/poiinfo/detailinfo";
|
||||
requestGet(url+Md5Util.resDelUrl(blb.getData().getResults().get(i).getOpenshopid()));
|
||||
String url = "https://openapi.dianping.com/router/poiinfo/detailinfo";
|
||||
requestGet(url + Md5Util.resDelUrl(blb.getData().getResults().get(i).getOpenshopid()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void initBusListDel(){
|
||||
public void initBusListDel() {
|
||||
customDialog.dismiss();
|
||||
//开始渲染
|
||||
business_list.createV(con,bbs,R.layout.item_business_list).setOnItemViewListener((position, o, v) -> {
|
||||
BusinessBean.DataDTO bd= (BusinessBean.DataDTO) o;
|
||||
v.setOnClickListener(v1 -> {
|
||||
business_list.createV(con, poiItems, R.layout.item_business_list).setOnItemViewListener((position, o, v) -> {
|
||||
PoiItem bd = (PoiItem) o;
|
||||
ImageView img = v.findViewById(R.id.photo_url);
|
||||
TextView name = v.findViewById(R.id.name);
|
||||
TextView address = v.findViewById(R.id.address);
|
||||
TextView taste = v.findViewById(R.id.taste);
|
||||
|
||||
if (bd.getPhotos().size() > 0 && !TextUtils.isEmpty(bd.getPhotos().get(0).getUrl())) {
|
||||
ImageLoader.getInstance().loadRoundImage(con, bd.getPhotos().get(0).getUrl(), 10, img);
|
||||
}
|
||||
|
||||
name.setText(bd.getTitle());
|
||||
address.setText(bd.getSnippet());
|
||||
taste.setText(bd.getTel());
|
||||
|
||||
// v.setOnClickListener(v1 -> {
|
||||
// Intent in=new Intent(con, WebActivity.class);
|
||||
// in.putExtra("url",bd.getBusiness_url());
|
||||
// in.putExtra("title",bd.getName());
|
||||
// startActivity(in);
|
||||
});
|
||||
// });
|
||||
});
|
||||
}
|
||||
|
||||
public void requestGet(String url){
|
||||
public void requestGet(String url) {
|
||||
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||
.build();
|
||||
Request request = new Request.Builder()
|
||||
@@ -178,22 +264,22 @@ public class BusinessActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) throws IOException {
|
||||
if(response.code()==200){
|
||||
String body=response.body().string();
|
||||
Log.e("-body-",body);
|
||||
BusinessBean bb=gson.fromJson(body,BusinessBean.class);
|
||||
if(bb.getCode()==200){
|
||||
if (response.code() == 200) {
|
||||
String body = response.body().string();
|
||||
Log.e("-body-", body);
|
||||
BusinessBean bb = gson.fromJson(body, BusinessBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sum++;
|
||||
//bbs.add(bb.getData());
|
||||
if(sum==1){
|
||||
Log.e("--添加--",bbs.size()+"_"+blb.getData().getResults().size());
|
||||
MsgUtil.addHdMsgWatBody(hd,2,gson.toJson(bb.getData()));
|
||||
}else{
|
||||
Log.e("--添加--",bbs.size()+"_"+blb.getData().getResults().size());
|
||||
MsgUtil.addHdMsgWatBody(hd,3,gson.toJson(bb.getData()));
|
||||
if (sum == 1) {
|
||||
Log.e("--添加--", bbs.size() + "_" + blb.getData().getResults().size());
|
||||
MsgUtil.addHdMsgWatBody(hd, 2, gson.toJson(bb.getData()));
|
||||
} else {
|
||||
Log.e("--添加--", bbs.size() + "_" + blb.getData().getResults().size());
|
||||
MsgUtil.addHdMsgWatBody(hd, 3, gson.toJson(bb.getData()));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -201,8 +287,7 @@ public class BusinessActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Model{
|
||||
class Model {
|
||||
private String type_name;
|
||||
private int type_img;
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ import java.util.Set;
|
||||
* @description:
|
||||
*/
|
||||
public class Md5Util {
|
||||
static String app_key="3d4c1b5592f9ae09";
|
||||
static String appSecret="642cc46b385264595df7cce271250a1cb782b39c";
|
||||
static String app_key="1000055";
|
||||
static String appSecret="4e0d1be81540c4d1f0868d329b3229467f071f6c";
|
||||
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"};
|
||||
public static String resUrl(String longitude,String latitude,String keyword){
|
||||
@@ -35,7 +35,7 @@ public class Md5Util {
|
||||
requestParam.put("format", "json");
|
||||
requestParam.put("v", "1");
|
||||
requestParam.put("sign_method", "MD5");
|
||||
requestParam.put("session", "cb2007c78d055247f7f242760173268caef1183a");
|
||||
requestParam.put("session", "c1fc1773a27d47e988725bc6df150626dbda0b4d");
|
||||
requestParam.put("sign", generateSign(requestParam,appSecret,"MD5"));
|
||||
str+="?";
|
||||
for(int i=0;i<requestParam.size();i++){
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.home;
|
||||
|
||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Outline;
|
||||
import android.location.Location;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -22,6 +28,7 @@ import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.alct.mdp.MDPLocationCollectionManager;
|
||||
import com.alct.mdp.callback.OnDownloadResultListener;
|
||||
@@ -35,20 +42,34 @@ import com.amap.api.maps.model.LatLng;
|
||||
import com.amap.api.maps.model.Marker;
|
||||
import com.amap.api.maps.model.MarkerOptions;
|
||||
import com.amap.api.maps.model.MyLocationStyle;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.BankCardListBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverExpireBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.ImageConfig;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
||||
import com.arpa.hndahesudintocctmsdriver.constant.JTTConstant;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.HomeWaybillEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.StartOrderParts;
|
||||
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.util.PicturlUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.wallet.UpBankActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.web.WebOnlyOneActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.OneDayShowUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PermissionUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.TimeUtil;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.gyf.cactus.Cactus;
|
||||
import com.hjq.xtoast.XToast;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BasePopupView;
|
||||
import com.lxj.xpopup.interfaces.OnConfirmListener;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
||||
@@ -82,6 +103,7 @@ import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||
import com.lxj.xpopup.interfaces.SimpleCallback;
|
||||
import com.permissionx.guolindev.PermissionX;
|
||||
import com.youth.banner.Banner;
|
||||
import com.youth.banner.BannerConfig;
|
||||
@@ -92,8 +114,11 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import pub.devrel.easypermissions.EasyPermissions;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
@@ -114,7 +139,11 @@ public class HomeFragment extends BaseFragment {
|
||||
private HuoYuanListBean hb;
|
||||
private Gson gson = new Gson();
|
||||
private CardView btn_news, btn_loadin, btn_update;
|
||||
private LinearLayout order_all;
|
||||
private LinearLayout order_all, llCurWay;
|
||||
|
||||
private TextView tvWaybill, tvGo, tvZX;
|
||||
|
||||
private ImageView ivType;
|
||||
private HuoYuanListBean uab;
|
||||
private List<Marker> list = new ArrayList<>();
|
||||
private HuoYuanListDealBean hdb;
|
||||
@@ -123,6 +152,11 @@ public class HomeFragment extends BaseFragment {
|
||||
private ImageConfig ic;
|
||||
private DriverExpireBean deb;
|
||||
|
||||
private XToast xToast;
|
||||
|
||||
private boolean isUpAppShow = false;
|
||||
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
@@ -135,11 +169,37 @@ public class HomeFragment extends BaseFragment {
|
||||
refreshLayout.finishRefresh(500);
|
||||
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) {
|
||||
ub = gson.fromJson(CacheGroup.cacheList.get("userdata"), UserBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
SPUtil.insSP(con, "data", "userdata", CacheGroup.cacheList.get("userdata"));
|
||||
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 {
|
||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -152,8 +212,24 @@ public class HomeFragment extends BaseFragment {
|
||||
SPUtil.insSP(con, JTTConstant.JTT_DATA_NAME, JTTConstant.JTT_DATA_ORDER_KEY, gson.toJson(sob));
|
||||
initStart();
|
||||
StartOrderParts.setStartOrder(con, sob);
|
||||
if (sob.getData() != null) {
|
||||
ur.getJtts(sob.getData().getShippingNoteNumber());
|
||||
if (sob.getData() != null && !sob.getData().getWaybillStatus().equals("已取消")) {
|
||||
StartOrderBean.DataDTO.WayChildrenDTO xData = null;
|
||||
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
||||
if (2 == sob.getData().getWayChildren().get(i).getType()) {
|
||||
xData = sob.getData().getWayChildren().get(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (xData != null && xData.getStatus() == 3) {
|
||||
SPUtils.remove(con, "curWaybillId");
|
||||
llCurWay.setVisibility(View.GONE);
|
||||
} else {
|
||||
dealCurWay(sob.getData());
|
||||
ur.getJtts(sob.getData().getShippingNoteNumber());
|
||||
}
|
||||
} else {
|
||||
SPUtils.remove(con, "curWaybillId");
|
||||
llCurWay.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(con, sob.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
@@ -168,6 +244,19 @@ public class HomeFragment extends BaseFragment {
|
||||
new XPopup.Builder(con)
|
||||
.dismissOnBackPressed(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()))
|
||||
.show();
|
||||
}
|
||||
@@ -187,6 +276,40 @@ public class HomeFragment extends BaseFragment {
|
||||
if (CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA) != null) {
|
||||
DriverAuthDataBean dad = gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA), DriverAuthDataBean.class);
|
||||
if (dad.getCode() == 200) {
|
||||
if (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));
|
||||
if (dad.getData() != null && 100003 == dad.getData().getAuditStatus()) {
|
||||
initAlct();
|
||||
@@ -228,9 +351,15 @@ public class HomeFragment extends BaseFragment {
|
||||
in.putExtra("url", deb.getData().getIdCardUpdateUrl());
|
||||
}
|
||||
}
|
||||
if (!"".equals(deb.getData().getDriverLicenseUpdateUrl()) || !"".equals(deb.getData().getIdCardUpdateUrl())) {
|
||||
new XToast<>(act)
|
||||
.setContentView(R.layout.view_bc)
|
||||
if (!TextUtils.isEmpty(deb.getData().getDriverLicenseUpdateUrl()) || !TextUtils.isEmpty(deb.getData().getIdCardUpdateUrl()) ||
|
||||
!TextUtils.isEmpty(deb.getData().getQualificationUpdateUrl()) || !TextUtils.isEmpty(deb.getData().getRoadLicenseUpdateUrl()) ||
|
||||
!TextUtils.isEmpty(deb.getData().getInsuranceUpdateUrl())) {
|
||||
if (xToast == null) {
|
||||
xToast = new XToast(act);
|
||||
} else if (xToast != null && xToast.isShow()) {
|
||||
xToast.cancel();
|
||||
}
|
||||
xToast.setContentView(R.layout.view_bc)
|
||||
// 设置成可拖拽的
|
||||
.setDraggable()
|
||||
// 设置显示时长
|
||||
@@ -245,6 +374,22 @@ public class HomeFragment extends BaseFragment {
|
||||
// 设置窗口背景阴影强度
|
||||
//.setBackgroundDimAmount(0.5f)
|
||||
.showAsDropDown(home_top, Gravity.BOTTOM, 1200, 1000);
|
||||
// new XToast<>(act)
|
||||
// .setContentView(R.layout.view_bc)
|
||||
// // 设置成可拖拽的
|
||||
// .setDraggable()
|
||||
// // 设置显示时长
|
||||
// .setDuration(1000 * 60 * 60 * 12)
|
||||
// .setOnClickListener(R.id.img_kf, (toast, view) -> {
|
||||
// toast.startActivity(in);
|
||||
// Log.e("-is-", view.isInTouchMode() + "");
|
||||
// })
|
||||
// // 设置动画样式
|
||||
// //.setAnimStyle(android.R.style.Animation_Translucent)
|
||||
// // 设置外层是否能被触摸
|
||||
// // 设置窗口背景阴影强度
|
||||
// //.setBackgroundDimAmount(0.5f)
|
||||
// .showAsDropDown(home_top, Gravity.BOTTOM, 1200, 1000);
|
||||
}
|
||||
CacheGroup.cacheList.remove("driverExpire");
|
||||
}
|
||||
@@ -305,8 +450,8 @@ public class HomeFragment extends BaseFragment {
|
||||
EventBus.getDefault().register(this);
|
||||
hyr = new HuoYuanRequset(con, hd);
|
||||
ur = new UserRequset(con, hd);
|
||||
initRefreshLoad();
|
||||
initView(null);
|
||||
initRefreshLoad();
|
||||
btn_news.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
@@ -383,6 +528,7 @@ public class HomeFragment extends BaseFragment {
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
Cactus.getInstance().updateNotification(getActivity());
|
||||
List<ManyBean> list = new ArrayList<>();
|
||||
list.add(new ManyBean(new Model(), R.layout.item_home));
|
||||
as = brv.creates(con, list);
|
||||
@@ -411,6 +557,13 @@ public class HomeFragment extends BaseFragment {
|
||||
order_box = v.findViewById(R.id.order_box);
|
||||
auth_box = v.findViewById(R.id.auth_box);
|
||||
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_right = v.findViewById(R.id.fun_right);
|
||||
fun_left.setOnClickListener(v16 -> startActivity(new Intent(con, OrderListActivity.class)));
|
||||
@@ -465,18 +618,35 @@ public class HomeFragment extends BaseFragment {
|
||||
v1.setOnClickListener(v2 -> {
|
||||
switch (position) {
|
||||
case 0:
|
||||
//startActivity(new Intent(con, OrderListActivity.class));
|
||||
PermissionX.init(getActivity())
|
||||
.permissions(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
PermissionUtils.Companion.getInstance().showPermissionMessage(getActivity(), "位置权限使用说明", "用于向您推荐可能感兴趣的住宿、饮食、加油站、汽车维修等",
|
||||
new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
|
||||
(allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
Intent in = new Intent(con, BusinessActivity.class);
|
||||
in.putExtra("type", "餐饮");
|
||||
startActivity(in);
|
||||
} else {
|
||||
Toast.makeText(act.getBaseContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
||||
new MessageUtils().showSimCenPop(con, "缺少定位权限,将无法为您提供服务,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
startActivity(intent);
|
||||
});
|
||||
// Toast.makeText(act.getBaseContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
//startActivity(new Intent(con, OrderListActivity.class));
|
||||
// PermissionX.init(getActivity())
|
||||
// .permissions(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
// .request((allGranted, grantedList, deniedList) -> {
|
||||
// if (allGranted) {
|
||||
// Intent in = new Intent(con, BusinessActivity.class);
|
||||
// in.putExtra("type", "餐饮");
|
||||
// startActivity(in);
|
||||
// } else {
|
||||
// Toast.makeText(act.getBaseContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
||||
// }
|
||||
// });
|
||||
//Toast.makeText(con,"定位开启失败,请检查配置项",Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
case 1:
|
||||
@@ -500,6 +670,11 @@ public class HomeFragment extends BaseFragment {
|
||||
in5.putExtra("url", "https://ks.wjx.top/vm/h6Jqu8A.aspx");
|
||||
in5.putExtra("title", "知识竞猜");
|
||||
startActivity(in5);
|
||||
|
||||
// Intent in = new Intent(getContext(), WebActivity.class);
|
||||
// in.putExtra("url", "http://192.168.1.152:8080");
|
||||
// in.putExtra("title", "隐私政策");
|
||||
// getContext().startActivity(in);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -510,6 +685,100 @@ public class HomeFragment extends BaseFragment {
|
||||
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 "已完成";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -529,10 +798,18 @@ public class HomeFragment extends BaseFragment {
|
||||
ur.upApp();
|
||||
hyr.getHuoYuan(1, 100);
|
||||
ur.getImage(1);
|
||||
WalletRequest qr = new WalletRequest(con, hd);
|
||||
|
||||
if (UiAuxiliary.isLogin(con)) {
|
||||
int curWaybillId = (int) SPUtils.get(con, "curWaybillId", -1);
|
||||
ur.User();
|
||||
// if (!OneDayShowUtils.getInstance().todayIsShow(con)) {
|
||||
// qr.getBankCardList();
|
||||
// }
|
||||
ur.getDriverExpire();
|
||||
hyr.startOrder(0);
|
||||
hyr.startOrder(curWaybillId == -1 ? 0 : curWaybillId);
|
||||
// hyr.startOrder(0);
|
||||
//获取权限 应用市场审核不通过
|
||||
ur.driverAuthData();
|
||||
}
|
||||
// oldTime= Calendar.getInstance().getTimeInMillis();
|
||||
@@ -591,8 +868,13 @@ public class HomeFragment extends BaseFragment {
|
||||
Log.e("开始轨迹上传服务", "-----");
|
||||
orderNum.setText("运单号:" + sob.getData().getShippingNoteNumber());
|
||||
order_state.setText("" + sob.getData().getWaybillStatus());
|
||||
Intent serviceIn = new Intent(con, TrackService.class);
|
||||
getActivity().startService(serviceIn);
|
||||
try {
|
||||
Intent serviceIn = new Intent(con, TrackService.class);
|
||||
getActivity().startService(serviceIn);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else {
|
||||
SPUtil.insSP(con, "order", "ShippingNoteNumber", "");
|
||||
order_start.setVisibility(View.GONE);
|
||||
@@ -763,7 +1045,7 @@ public class HomeFragment extends BaseFragment {
|
||||
banner.isAutoPlay(true);
|
||||
banner.setIndicatorGravity(BannerConfig.CENTER);
|
||||
banner.setOnBannerListener(position -> {//System.out.println("跳转");
|
||||
Intent in = new Intent(con, WebActivity.class);
|
||||
Intent in = new Intent(con, WebOnlyOneActivity.class);
|
||||
Intent inL = new Intent(con, LoginActivity.class);
|
||||
in.putExtra("url", ic.getData().get(position).getJumpUrl());
|
||||
in.putExtra("title", ic.getData().get(position).getTitle());
|
||||
@@ -783,7 +1065,9 @@ public class HomeFragment extends BaseFragment {
|
||||
private class MyLoader extends ImageLoader {
|
||||
@Override
|
||||
public void displayImage(Context context, Object path, ImageView imageView) {
|
||||
Glide.with(con).load(path).into(imageView);
|
||||
if (HomeFragment.this != null && getActivity() != null && !getActivity().isDestroyed()) {
|
||||
com.dahe.mylibrary.utils.ImageLoader.getInstance().loadImage(con,path,imageView);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -880,28 +1164,64 @@ public class HomeFragment extends BaseFragment {
|
||||
// }
|
||||
|
||||
public void initAlct() {
|
||||
PermissionX.init(getActivity())
|
||||
.permissions(Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.RECORD_AUDIO)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
// if (!OneDayShowUtils.getInstance().todayIsShowQx(con)){
|
||||
// boolean b = EasyPermissions.hasPermissions(getActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
// Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
// Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
// Manifest.permission.ACCESS_COARSE_LOCATION);
|
||||
// if (b) {
|
||||
// ALProcess.verification(con);
|
||||
// }
|
||||
PermissionX.init(getActivity())
|
||||
.permissions(Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
ALProcess.verification(con);
|
||||
} else {
|
||||
boolean accessCoarseLocation = deniedList.contains("android.permission.ACCESS_FINE_LOCATION");
|
||||
boolean contains = deniedList.contains("android.permission.WRITE_EXTERNAL_STORAGE");
|
||||
boolean camear = deniedList.contains("android.permission.CAMERA");
|
||||
if (accessCoarseLocation | contains) {
|
||||
new MessageUtils().showSimCenPop(con, "缺少定位权限或媒体和文件权限,会导致无法结算运费,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
startActivity(intent);
|
||||
});
|
||||
} else if (camear) {
|
||||
new MessageUtils().showSimCenPop(con, "缺少相机权限,会导致无法实名认证,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
}
|
||||
});
|
||||
// }
|
||||
|
||||
}
|
||||
});
|
||||
ALProcess.verification(con);
|
||||
MDPLocationCollectionManager.getInvoices(con, 10, 1, new OnDownloadResultListener() {
|
||||
@Override
|
||||
public void onSuccess(Object o) {
|
||||
Log.e("--成功信息--", new Gson().toJson(o));
|
||||
}
|
||||
} else {
|
||||
ALProcess.verification(con);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("--失败信息--", s + s1);
|
||||
}
|
||||
});
|
||||
// ALProcess.verification(con);
|
||||
// MDPLocationCollectionManager.getInvoices(con, 10, 1, new OnDownloadResultListener() {
|
||||
// @Override
|
||||
// public void onSuccess(Object o) {
|
||||
// Log.e("--成功信息--", new Gson().toJson(o));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailure(String s, String s1) {
|
||||
// Log.e("--失败信息--", s + s1);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
private MyLocationStyle myLocationStyle;//地图定位样式
|
||||
@@ -977,6 +1297,33 @@ public class HomeFragment extends BaseFragment {
|
||||
initView(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
refreshWaybills();
|
||||
}
|
||||
|
||||
private void refreshWaybills() {
|
||||
// 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 {
|
||||
|
||||
private int imageId;
|
||||
|
||||
+210
-16
@@ -1,14 +1,26 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.home;
|
||||
|
||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.provider.Settings;
|
||||
import android.text.Html;
|
||||
import android.text.Layout;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.HideReturnsTransformationMethod;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.util.Log;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@@ -18,20 +30,31 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.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.UserParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.PersonalAuthActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.img.ImageGetUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||
import com.esign.esignsdk.EsignSdk;
|
||||
import com.esign.esignsdk.data.AuthEvent;
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BasePopupView;
|
||||
import com.lxj.xpopup.interfaces.OnCancelListener;
|
||||
import com.lxj.xpopup.interfaces.OnConfirmListener;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||
@@ -51,6 +74,7 @@ import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||
import com.permissionx.guolindev.PermissionX;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -93,9 +117,24 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
if (bb.getCode() == 200) {
|
||||
//Toast.makeText(con,"接单成功",Toast.LENGTH_SHORT).show();
|
||||
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();
|
||||
} else {
|
||||
EventBus.getDefault().post(new HomeWaybillEvent(1));
|
||||
finish();
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
customDialog.dismiss();
|
||||
}
|
||||
@@ -113,6 +152,38 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
CacheGroup.cacheList.remove("jttRes");
|
||||
}
|
||||
|
||||
|
||||
if (CacheGroup.cacheList.get("orderStatus") != null) {
|
||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
Log.e("orderStatus", CacheGroup.cacheList.get("orderStatus"));
|
||||
WaybillStatusBean status = gson.fromJson(CacheGroup.cacheList.get("orderStatus"), WaybillStatusBean.class);
|
||||
if (status.getCode() == 200) {
|
||||
if (status.getData() != null) {
|
||||
//执行运单下一步操作
|
||||
new XPopup.Builder(con)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认接单", "是否确定承运此运单?",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
Log.e("--id--", "cid:" + cid + "---wid:" + id);
|
||||
hyr.confirm(cid, id);
|
||||
}, () -> customDialog.dismiss(), false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
} else {//订单已取消
|
||||
new MessageUtils().showSimCenPop(con, "运单异常将无法进行下步操作,请返回首页", "取消", "确定", () -> {
|
||||
SPUtils.remove(con, "curWaybillId");
|
||||
EventBus.getDefault().post(new HomeWaybillEvent(1));
|
||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(con, status.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("orderStatus");
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
int index = Integer.valueOf((String) m.obj);
|
||||
@@ -120,6 +191,23 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
car.setText("选择车辆:" + clb.getData().get(index).getCarNumber());
|
||||
cid = clb.getData().get(index).getCarId();
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,6 +252,8 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
//2021/02/27记,类型声明错误
|
||||
ImageButton return_btn = v.findViewById(R.id.return_btn);
|
||||
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);
|
||||
TextView effectiveTime = v.findViewById(R.id.effectiveTime);
|
||||
TextView check_contract = v.findViewById(R.id.check_contract);
|
||||
@@ -174,6 +264,15 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
return_btn.setOnClickListener(v16 -> {
|
||||
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>,产生的增值税及附加税本人承担。";
|
||||
tvZzs.setText(Html.fromHtml(textSource));
|
||||
@@ -216,7 +315,11 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
});
|
||||
//
|
||||
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();
|
||||
car.setText("选择车辆:" + clb.getData().get(0).getCarNumber());
|
||||
}
|
||||
@@ -236,20 +339,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
if (cid != null) {
|
||||
// if (fpKey){
|
||||
if (key) {
|
||||
new XPopup.Builder(con)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认接单", "是否确定承运此运单?",
|
||||
"取消", "确认",
|
||||
new OnConfirmListener() {
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
Log.e("--id--", "cid:" + cid + "---wid:" + id);
|
||||
customDialog = new CustomDialog(con, "正在接单...");
|
||||
customDialog.show();
|
||||
hyr.confirm(cid, id);
|
||||
}
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
reOrder();
|
||||
} else {
|
||||
Toast.makeText(con, "请先同意并签署运输合同", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -316,6 +406,51 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void faceResult(FaceEvent home) {
|
||||
Log.e("-res-", home.getMessage());
|
||||
|
||||
UiAuxiliary.homeRequest("接单");
|
||||
Intent in = new Intent(con, StartYunDanActivity.class);
|
||||
in.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
|
||||
public void processResult(AuthEvent auth) {
|
||||
//添加实名/意愿/签署完成之后的逻辑
|
||||
@@ -350,4 +485,63 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class OrderAllActivity extends BaseActivity {
|
||||
}else{
|
||||
Toast.makeText(con,"抢单",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
xp.dismiss();
|
||||
// xp.dismiss();
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
@@ -186,9 +186,11 @@ public class OrderAllActivity extends BaseActivity {
|
||||
case 200006:
|
||||
state4.setTextColor(getResources().getColor(R.color.blue));
|
||||
state4.setText(" 已评价");
|
||||
case 200005:
|
||||
state3.setTextColor(getResources().getColor(R.color.blue));
|
||||
state3.setText(" 已结算");
|
||||
case 200005:
|
||||
// state3.setTextColor(getResources().getColor(R.color.blue));
|
||||
// state3.setText(" 已结算");
|
||||
case 200004:
|
||||
state2.setTextColor(getResources().getColor(R.color.blue));
|
||||
state2.setText(" 已卸货");
|
||||
|
||||
+267
-198
@@ -3,6 +3,7 @@ package com.arpa.hndahesudintocctmsdriver.ui.home;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.animation.AlphaAnimation;
|
||||
@@ -40,7 +41,12 @@ import com.amap.api.services.route.DriveStep;
|
||||
import com.amap.api.services.route.RideRouteResult;
|
||||
import com.amap.api.services.route.RouteSearch;
|
||||
import com.amap.api.services.route.WalkRouteResult;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.ImageLoader;
|
||||
import com.dahe.mylibrary.utils.TimeUtil;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
@@ -70,14 +76,15 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class StartYunDanActivity extends BaseActivity {
|
||||
|
||||
public static final String GET_EVALUTE="getEvalute";
|
||||
public static final String KEEP_EVALUTE="keepEvalte";
|
||||
public static final String GET_COMPLAINT="getComplaint";
|
||||
public static final String GET_EVALUTE = "getEvalute";
|
||||
public static final String KEEP_EVALUTE = "keepEvalte";
|
||||
public static final String GET_COMPLAINT = "getComplaint";
|
||||
|
||||
private String TAG="StartYunDanActivity";
|
||||
private String TAG = "StartYunDanActivity";
|
||||
private NestedScrollView bottomSheet;
|
||||
private MapView map;
|
||||
private BaseRecyclerView brv;
|
||||
@@ -85,57 +92,61 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
private LinearLayout protect;
|
||||
//private RelativeLayout title_rl;
|
||||
private TextView title;
|
||||
private ScoreView sv1,sv2;
|
||||
private Gson gson=new Gson();
|
||||
private ScoreView sv1, sv2;
|
||||
private Gson gson = new Gson();
|
||||
private StartOrderBean sob;
|
||||
private WNewsBean wnb;
|
||||
private HuoYuanRequset hyr;
|
||||
//是否处于展开状态
|
||||
private boolean key=false;
|
||||
private int id=0;
|
||||
private boolean key = false;
|
||||
private int id = 0;
|
||||
LocationGDUtil ld;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
switch (m.what){
|
||||
switch (m.what) {
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
//获取页面数据
|
||||
if (CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER)!=null && CacheGroup.cacheList.get(GET_EVALUTE)!=null) {
|
||||
Log.e("-评论-",CacheGroup.cacheList.get(GET_EVALUTE));
|
||||
Log.e("-运单-",CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER));
|
||||
sob=gson.fromJson(CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER), StartOrderBean.class);
|
||||
wnb=gson.fromJson(CacheGroup.cacheList.get(GET_EVALUTE), WNewsBean.class);
|
||||
if(sob.getCode()==200 && sob.getData()!=null){
|
||||
if (CacheGroup.cacheList.get("refreshorderDetail") != null && CacheGroup.cacheList.get(GET_EVALUTE) != null) {
|
||||
Log.e("-评论-", CacheGroup.cacheList.get(GET_EVALUTE));
|
||||
Log.e("-运单-", CacheGroup.cacheList.get("refreshorderDetail"));
|
||||
sob = gson.fromJson(CacheGroup.cacheList.get("refreshorderDetail"), StartOrderBean.class);
|
||||
wnb = gson.fromJson(CacheGroup.cacheList.get(GET_EVALUTE), WNewsBean.class);
|
||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
if (sob.getCode() == 200 && sob.getData() != null) {
|
||||
id = sob.getData().getWaybillId();
|
||||
initView(null);
|
||||
}else if(sob.getData()==null){
|
||||
} else if (sob.getData() == null) {
|
||||
// Toast.makeText(con,"运单执行结束",Toast.LENGTH_SHORT).show();
|
||||
SPUtil.insSP(con,"order","ShippingNoteNumber","");
|
||||
SPUtil.insSP(con, "order", "ShippingNoteNumber", "");
|
||||
UiAuxiliary.homeRequest("运单结束");
|
||||
// finish();
|
||||
}else{
|
||||
Toast.makeText(con,sob.getMsg(),Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(con, sob.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(HuoYuanFragmengt.START_ORDER);
|
||||
CacheGroup.cacheList.remove("refreshorderDetail");
|
||||
CacheGroup.cacheList.remove(GET_EVALUTE);
|
||||
}
|
||||
//保存评价
|
||||
if(CacheGroup.cacheList.get(KEEP_EVALUTE)!=null){
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(KEEP_EVALUTE),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
Toast.makeText(con,"评价保存成功",Toast.LENGTH_SHORT).show();
|
||||
if (CacheGroup.cacheList.get(KEEP_EVALUTE) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(KEEP_EVALUTE), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
Toast.makeText(con, "评价保存成功", Toast.LENGTH_SHORT).show();
|
||||
hyr.startOrder(id);
|
||||
hyr.getEvaluate(id);
|
||||
}else{
|
||||
Toast.makeText(con,bb.getMsg(),Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(KEEP_EVALUTE);
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
break;
|
||||
default:break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,28 +158,28 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
StateStyleUtil.stateTextColor(this);
|
||||
setContentView(R.layout.activity_yundan_start);
|
||||
con=this;
|
||||
id=getIntent().getExtras().getInt("id");
|
||||
brv=findViewById(R.id.brv);
|
||||
protect=findViewById(R.id.protect);
|
||||
title=findViewById(R.id.title);
|
||||
bottomSheet =findViewById(R.id.bottom_sheet);
|
||||
con = this;
|
||||
id = getIntent().getExtras().getInt("id");
|
||||
brv = findViewById(R.id.brv);
|
||||
protect = findViewById(R.id.protect);
|
||||
title = findViewById(R.id.title);
|
||||
bottomSheet = findViewById(R.id.bottom_sheet);
|
||||
BottomSheetBehavior mBottomSheetBehavior = BottomSheetBehavior.from(bottomSheet);
|
||||
mBottomSheetBehavior.setHideable(false);
|
||||
mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||
//mBottomSheetBehavior.set
|
||||
map=findViewById(R.id.map);
|
||||
map = findViewById(R.id.map);
|
||||
map.onCreate(savedInstanceState);
|
||||
if (aMap == null) {
|
||||
aMap = map.getMap();
|
||||
initLoaction();
|
||||
}
|
||||
Log.e("--id--",""+id);
|
||||
String userdata= SPUtil.getSP(con,"data","userdata");
|
||||
if(!userdata.equals("")){
|
||||
ub=gson.fromJson(userdata,UserBean.class);
|
||||
Log.e("--id--", "" + id);
|
||||
String userdata = SPUtil.getSP(con, "data", "userdata");
|
||||
if (!userdata.equals("")) {
|
||||
ub = gson.fromJson(userdata, UserBean.class);
|
||||
}
|
||||
hyr=new HuoYuanRequset(con,hd);
|
||||
hyr = new HuoYuanRequset(con, hd);
|
||||
// hyr.startOrder(id);
|
||||
// hyr.getEvaluate(id);
|
||||
}
|
||||
@@ -184,59 +195,84 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
//控件隐藏的动画
|
||||
mHiddenAmin = new AlphaAnimation(1.0f, 0.0f);
|
||||
mHiddenAmin.setDuration(1000);
|
||||
List<ManyBean> list=new ArrayList<>();
|
||||
List<ManyBean> list = new ArrayList<>();
|
||||
//list.add(new ManyBean(new model(),R.layout.yundan_start_top));
|
||||
list.add(new ManyBean(sob.getData(),R.layout.item_yundan_yunxing));
|
||||
list.add(new ManyBean(sob.getData(),R.layout.yundan_start_bottom));
|
||||
brv.creates(con,list).setOnItemViewListener((position, o, v, layout) -> {
|
||||
switch (layout){
|
||||
list.add(new ManyBean(sob.getData(), R.layout.item_yundan_yunxing));
|
||||
list.add(new ManyBean(sob.getData(), R.layout.yundan_start_bottom));
|
||||
brv.creates(con, list).setOnItemViewListener((position, o, v, layout) -> {
|
||||
switch (layout) {
|
||||
case R.layout.yundan_start_top:
|
||||
ImageButton return_btn=v.findViewById(R.id.return_btn);
|
||||
ImageButton return_btn = v.findViewById(R.id.return_btn);
|
||||
return_btn.setOnClickListener(v1 -> finish());
|
||||
break;
|
||||
case R.layout.yundan_start_bottom:
|
||||
initStartBody(v);
|
||||
break;
|
||||
case R.layout.item_yundan_yunxing:
|
||||
ImageView head_img=v.findViewById(R.id.head_img);
|
||||
if(ub!=null && ub.getData()!=null && !ub.getData().getHeadportraitUrl().equals("")){
|
||||
Glide.with(con).load(ub.getData().getHeadportraitUrl()).into(head_img);
|
||||
LinearLayout llMoney = v.findViewById(R.id.llMoney);
|
||||
if (!sob.getData().getWaybillStatus().equals("已装货")
|
||||
&& !sob.getData().getWaybillStatus().equals("待装货")
|
||||
&& !sob.getData().getWaybillStatus().equals("待接单")) {
|
||||
if (sob.getData().getWaybillStatus().equals("已装货")) {
|
||||
StartOrderBean.DataDTO.WayChildrenDTO mySdw = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
||||
StartOrderBean.DataDTO.WayChildrenDTO sdw = sob.getData().getWayChildren().get(i);
|
||||
if (sdw.getType() == 1) {
|
||||
mySdw = sdw;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (mySdw.getStatus() == 3) {
|
||||
llMoney.setVisibility(View.GONE);
|
||||
} else {
|
||||
llMoney.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
llMoney.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
llMoney.setVisibility(View.GONE);
|
||||
}
|
||||
ImageView head_img = v.findViewById(R.id.head_img);
|
||||
if (ub != null && ub.getData() != null && !ub.getData().getHeadportraitUrl().equals("")) {
|
||||
ImageLoader.getInstance().loadImage(con,ub.getData().getHeadportraitUrl(),head_img);
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private boolean iskey=false;
|
||||
private boolean iskey = false;
|
||||
|
||||
private void initStartBody(View v){
|
||||
LinearLayout jiesuan=v.findViewById(R.id.jiesuan);
|
||||
private void initStartBody(View v) {
|
||||
LinearLayout jiesuan = v.findViewById(R.id.jiesuan);
|
||||
// if(id==0){
|
||||
// jiesuan.setVisibility(View.GONE);
|
||||
// }else{
|
||||
// jiesuan.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
sv1=v.findViewById(R.id.score1);
|
||||
sv2=v.findViewById(R.id.score2);
|
||||
sv1 = v.findViewById(R.id.score1);
|
||||
sv2 = v.findViewById(R.id.score2);
|
||||
sv1.initView();
|
||||
sv2.initView();
|
||||
sv1.setScore(5);
|
||||
//设置是否可以修改评分,默认为true
|
||||
TextView pl_submit=v.findViewById(R.id.pl_submit);
|
||||
TextView m_pl_value=v.findViewById(R.id.m_pl_value);
|
||||
TextView pl_value=v.findViewById(R.id.pl_value);
|
||||
if(wnb.getData()!=null){
|
||||
TextView pl_submit = v.findViewById(R.id.pl_submit);
|
||||
TextView m_pl_value = v.findViewById(R.id.m_pl_value);
|
||||
TextView pl_value = v.findViewById(R.id.pl_value);
|
||||
if (wnb.getData() != null) {
|
||||
for (WNewsBean.DataDTO datum : wnb.getData()) {
|
||||
if(datum.getType()==0){
|
||||
if (datum.getType() == 0) {
|
||||
sv1.setScore(datum.getAttitudeScore());
|
||||
m_pl_value.setText(datum.getContent());
|
||||
pl_submit.setVisibility(View.GONE);
|
||||
sv1.setUpKey(false);
|
||||
m_pl_value.setEnabled(false);
|
||||
}
|
||||
if(datum.getType()==1){
|
||||
Log.e("分数",datum.getAttitudeScore()+"_");
|
||||
if (datum.getType() == 1) {
|
||||
Log.e("分数", datum.getAttitudeScore() + "_");
|
||||
sv2.setScore(datum.getAttitudeScore());
|
||||
pl_value.setText(datum.getContent());
|
||||
}
|
||||
@@ -244,45 +280,45 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
}
|
||||
sv2.setUpKey(false);
|
||||
pl_submit.setOnClickListener(v12 -> {
|
||||
String evaluate=m_pl_value.getText()+"";
|
||||
if(id!=0){
|
||||
if(evaluate.length()>=5){
|
||||
Log.e("星星",""+sv1.getScore());
|
||||
hyr.keepEvaluate(sv1.getScore(),m_pl_value.getText()+"",id);
|
||||
}else{
|
||||
Toast.makeText(con,"写够5个字才是好司机~",Toast.LENGTH_SHORT).show();
|
||||
String evaluate = m_pl_value.getText() + "";
|
||||
if (id != 0) {
|
||||
if (evaluate.length() >= 5) {
|
||||
Log.e("星星", "" + sv1.getScore());
|
||||
hyr.keepEvaluate(sv1.getScore(), m_pl_value.getText() + "", id);
|
||||
} else {
|
||||
Toast.makeText(con, "写够5个字才是好司机~", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(con,"运单尚未结束",Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(con, "运单尚未结束", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
Button complaint=v.findViewById(R.id.complaint);
|
||||
Button complaint = v.findViewById(R.id.complaint);
|
||||
complaint.setOnClickListener(v1 -> {
|
||||
Intent in=new Intent(con, OrderComplaintActivity.class);
|
||||
in.putExtra("id",id);
|
||||
Intent in = new Intent(con, OrderComplaintActivity.class);
|
||||
in.putExtra("id", id);
|
||||
startActivity(in);
|
||||
});
|
||||
BaseRecyclerView bv_zhuang=v.findViewById(R.id.bv_zhuang);
|
||||
BaseRecyclerView bv_xie=v.findViewById(R.id.bv_xie);
|
||||
BaseRecyclerView bv_zhuang = v.findViewById(R.id.bv_zhuang);
|
||||
BaseRecyclerView bv_xie = v.findViewById(R.id.bv_xie);
|
||||
//bv_zhuang.set
|
||||
List<Object> list_zhuang=new ArrayList<>();
|
||||
List<Object> list_xie=new ArrayList<>();
|
||||
for(int i=0;i<sob.getData().getWayChildren().size();i++){
|
||||
StartOrderBean.DataDTO.WayChildrenDTO sdw=sob.getData().getWayChildren().get(i);
|
||||
if(sdw.getType()==1){
|
||||
sdw.setUpdateTime(StringUtil.isNull((String) sdw.getUpdateTime(),"未装货"));
|
||||
List<Object> list_zhuang = new ArrayList<>();
|
||||
List<Object> list_xie = new ArrayList<>();
|
||||
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
||||
StartOrderBean.DataDTO.WayChildrenDTO sdw = sob.getData().getWayChildren().get(i);
|
||||
if (sdw.getType() == 1) {
|
||||
sdw.setUpdateTime(StringUtil.isNull((String) sdw.getUpdateTime(), "未装货"));
|
||||
list_zhuang.add(sdw);
|
||||
}else{
|
||||
sdw.setUpdateTime(StringUtil.isNull((String) sdw.getUpdateTime(),"未卸货"));
|
||||
} else {
|
||||
sdw.setUpdateTime(StringUtil.isNull((String) sdw.getUpdateTime(), "未卸货"));
|
||||
list_xie.add(sdw);
|
||||
}
|
||||
}
|
||||
TextView get_contract=v.findViewById(R.id.get_contract);
|
||||
TextView get_contract = v.findViewById(R.id.get_contract);
|
||||
get_contract.setOnClickListener(v13 -> {
|
||||
Intent in=new Intent(con, WebPDFActivity.class);
|
||||
in.putExtra("title","电子合同");
|
||||
Log.e("--地址--",sob.getData().getContractUrl());
|
||||
in.putExtra("url",sob.getData().getContractUrl());
|
||||
Intent in = new Intent(con, WebPDFActivity.class);
|
||||
in.putExtra("title", "电子合同");
|
||||
Log.e("--地址--", sob.getData().getContractUrl());
|
||||
in.putExtra("url", sob.getData().getContractUrl());
|
||||
startActivity(in);
|
||||
});
|
||||
// v.findViewById(R.id.upload_receipt).setOnClickListener(new View.OnClickListener() {
|
||||
@@ -294,148 +330,177 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
// startActivity(in);
|
||||
// }
|
||||
// });
|
||||
bv_zhuang.createV(con,list_zhuang,R.layout.item_huoyuan_start_zx).setOnItemViewListener((position, o, v14) -> {
|
||||
bv_zhuang.createV(con, list_zhuang, R.layout.item_huoyuan_start_zx).setOnItemViewListener((position, o, v14) -> {
|
||||
//
|
||||
boolean upkey=false;
|
||||
if(position==0){
|
||||
upkey=true;
|
||||
boolean upkey = false;
|
||||
if (position == 0) {
|
||||
upkey = true;
|
||||
}
|
||||
initZX(upkey, v14,position,o,0);
|
||||
initZX(upkey, v14, position, o, 0);
|
||||
});
|
||||
bv_xie.createV(con,list_xie,R.layout.item_huoyuan_start_zx).setOnItemViewListener((position, o, v15) -> {
|
||||
bv_xie.createV(con, list_xie, R.layout.item_huoyuan_start_zx).setOnItemViewListener((position, o, v15) -> {
|
||||
//
|
||||
boolean upkey=false;
|
||||
if(position==(list_xie.size()-1)){
|
||||
upkey=true;
|
||||
boolean upkey = false;
|
||||
if (position == (list_xie.size() - 1)) {
|
||||
upkey = true;
|
||||
}
|
||||
initZX(upkey, v15, position, o, 1);
|
||||
});
|
||||
search();
|
||||
}
|
||||
|
||||
public void initZX(boolean key,View v,int position,Object o,int type){
|
||||
StartOrderBean.DataDTO.WayChildrenDTO sdw= (StartOrderBean.DataDTO.WayChildrenDTO) o;
|
||||
TextView index=v.findViewById(R.id.index);
|
||||
TextView s_zx=v.findViewById(R.id.s_zx);
|
||||
TextView j_zx=v.findViewById(R.id.j_zx);
|
||||
if(type==1){
|
||||
public void initZX(boolean key, View v, int position, Object o, int type) {
|
||||
StartOrderBean.DataDTO.WayChildrenDTO sdw = (StartOrderBean.DataDTO.WayChildrenDTO) o;
|
||||
TextView index = v.findViewById(R.id.index);
|
||||
TextView s_zx = v.findViewById(R.id.s_zx);
|
||||
TextView j_zx = v.findViewById(R.id.j_zx);
|
||||
if (type == 1) {
|
||||
s_zx.setText("实际卸货时间:");
|
||||
j_zx.setText("计划卸货时间:");
|
||||
}
|
||||
if(position==0){
|
||||
if(type==0){
|
||||
if (position == 0) {
|
||||
if (type == 0) {
|
||||
index.setText("装货地");
|
||||
}else{
|
||||
} else {
|
||||
index.setText("卸货地");
|
||||
}
|
||||
}else{
|
||||
if(type==0) {
|
||||
} else {
|
||||
if (type == 0) {
|
||||
index.setText("第" + (position + 1) + "装货地");
|
||||
}else{
|
||||
} else {
|
||||
index.setText("第" + (position + 1) + "卸货地");
|
||||
}
|
||||
}
|
||||
TextView goodName=v.findViewById(R.id.goodName);
|
||||
TextView goodNum=v.findViewById(R.id.goodNum);
|
||||
TextView goodUnit=v.findViewById(R.id.goodUnit);
|
||||
TextView goodName = v.findViewById(R.id.goodName);
|
||||
TextView goodNum = v.findViewById(R.id.goodNum);
|
||||
TextView goodUnit = v.findViewById(R.id.goodUnit);
|
||||
goodName.setText(sdw.getGoods().get(0).getGoodName());
|
||||
goodNum.setText(sdw.getGoods().get(0).getGoodNum());
|
||||
goodUnit.setText(sdw.getGoods().get(0).getGoodUnit());
|
||||
TextView huoyuan_state=v.findViewById(R.id.huoyuan_state);
|
||||
huoyuan_state.setText(stateText(sdw.getStatus(),type));
|
||||
TextView huoyuan_state = v.findViewById(R.id.huoyuan_state);
|
||||
huoyuan_state.setText(stateText(sdw.getStatus(), type));
|
||||
huoyuan_state.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String wid= sdw.getId()+"";
|
||||
if(sdw.getStatus()==0){
|
||||
if(type==0){
|
||||
Intent in=new Intent(con, ShangChuangImgActivity.class);
|
||||
in.putExtra("type",type);
|
||||
in.putExtra("wid",wid);
|
||||
in.putExtra("sob",gson.toJson(sob));
|
||||
in.putExtra("keys",key);
|
||||
String wid = sdw.getId() + "";
|
||||
if (sdw.getStatus() == 0) {
|
||||
if (type == 0) {
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
in.putExtra("type", type);
|
||||
in.putExtra("wid", wid);
|
||||
in.putExtra("sob", gson.toJson(sob));
|
||||
in.putExtra("keys", key);
|
||||
startActivity(in);
|
||||
}else{
|
||||
Toast.makeText(con,"您还没有装货",Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(con, "您还没有装货", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}else if(sdw.getStatus()==1){
|
||||
Intent in=new Intent(con, ShangChuangImgActivity.class);
|
||||
in.putExtra("type",2);
|
||||
in.putExtra("wid",wid);
|
||||
in.putExtra("h_type",type);
|
||||
in.putExtra("sob",gson.toJson(sob));
|
||||
} else if (sdw.getStatus() == 1) {//装货回单
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
in.putExtra("type", 2);
|
||||
in.putExtra("wid", wid);
|
||||
in.putExtra("h_type", type);
|
||||
in.putExtra("sob", gson.toJson(sob));
|
||||
startActivity(in);
|
||||
}else if(sdw.getStatus()==2){
|
||||
Intent in=new Intent(con, ShangChuangImgActivity.class);
|
||||
in.putExtra("type",2);
|
||||
in.putExtra("wid",wid);
|
||||
in.putExtra("h_type",type);
|
||||
in.putExtra("sob",gson.toJson(sob));
|
||||
in.putExtra("keys",key);
|
||||
} else if (sdw.getStatus() == 2) {//上传收货单(卸货回单)
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
in.putExtra("type", 2);
|
||||
in.putExtra("wid", wid);
|
||||
in.putExtra("h_type", type);
|
||||
in.putExtra("sob", gson.toJson(sob));
|
||||
in.putExtra("keys", key);
|
||||
startActivity(in);
|
||||
}else if(sdw.getStatus()==3){
|
||||
Intent in=new Intent(con, GetShangChuanActivity.class);
|
||||
in.putExtra("sdwStr",gson.toJson(sdw));
|
||||
startActivity(in);
|
||||
}else{
|
||||
Intent in=new Intent(con, ShangChuangImgActivity.class);
|
||||
in.putExtra("type",type);
|
||||
in.putExtra("wid",wid);
|
||||
in.putExtra("sob",gson.toJson(sob));
|
||||
in.putExtra("keys",key);
|
||||
} else if (sdw.getStatus() == 3) {
|
||||
Intent in = new Intent(con, GetShangChuanActivity.class);
|
||||
in.putExtra("sdwStr", gson.toJson(sdw));
|
||||
startActivity(in);
|
||||
} else {//卸货照片
|
||||
StartOrderBean.DataDTO.WayChildrenDTO zInfo;
|
||||
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
||||
if (sob.getData().getWayChildren().get(i).getType() == 1) {
|
||||
zInfo = sob.getData().getWayChildren().get(i);
|
||||
if (zInfo.getReceiptUrl() != null && zInfo.getReceiptUrl().size() > 0) {
|
||||
int dis = TimeUtil.compareNowDate(TimeUtil.string2Millis(zInfo.getImageTakenDate(), TimeUtil.DEFAULT_FORMAT4));
|
||||
if (dis > 5) {//大于五分钟可以接单
|
||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||
in.putExtra("type", type);
|
||||
in.putExtra("wid", wid);
|
||||
in.putExtra("sob", gson.toJson(sob));
|
||||
in.putExtra("keys", key);
|
||||
startActivity(in);
|
||||
} else {
|
||||
ToastUtils.showToast(StartYunDanActivity.this, "请到卸货地再进行卸货操作!");
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
ToastUtils.showToast(StartYunDanActivity.this, "请先上传出货单,再进行卸货操作!");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public String stateText(int state,int type){
|
||||
String str="";
|
||||
public String stateText(int state, int type) {
|
||||
String str = "";
|
||||
//0待装货,1已装货 2已卸货 3已上传回单 4待卸货
|
||||
switch (state){
|
||||
switch (state) {
|
||||
case 0://str="待装货";
|
||||
if(type==0){
|
||||
str="立即装货";
|
||||
if (type == 0) {
|
||||
str = "立即装货";
|
||||
// str="确认装货";
|
||||
}else{
|
||||
str="请先装货";
|
||||
} else {
|
||||
str = "请先装货";
|
||||
}
|
||||
break;
|
||||
case 1://str="已装货";
|
||||
str="上传出货单";
|
||||
str = "上传出货单";
|
||||
// str="确认回单";
|
||||
break;
|
||||
case 2://str="已卸货";
|
||||
str="上传收货单";
|
||||
str = "上传收货单";
|
||||
// str="确认回单";
|
||||
break;
|
||||
case 3:
|
||||
//str="已上传回单";
|
||||
str="查看凭证";
|
||||
str = "查看凭证";
|
||||
break;
|
||||
case 4:
|
||||
//str="待卸货";
|
||||
str="确认卸货";
|
||||
str = "确认卸货";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
private CustomDialog customDialog;
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if(map!=null){
|
||||
if (map != null) {
|
||||
map.onResume();
|
||||
}
|
||||
hyr.startOrder(id);
|
||||
if (customDialog==null){
|
||||
customDialog = new CustomDialog(con, "网络请求中...");
|
||||
customDialog.show();
|
||||
}else{
|
||||
if (!customDialog.isShowing()){
|
||||
customDialog.show();
|
||||
}
|
||||
}
|
||||
hyr.startOrder2(id);
|
||||
hyr.getEvaluate(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
if(map!=null){
|
||||
if (map != null) {
|
||||
map.onPause();
|
||||
}
|
||||
}
|
||||
@@ -443,7 +508,7 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if(map!=null){
|
||||
if (map != null) {
|
||||
map.onDestroy();
|
||||
}
|
||||
}
|
||||
@@ -453,11 +518,12 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
super.onSaveInstanceState(outState);
|
||||
map.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
LocationSource.OnLocationChangedListener mListener;
|
||||
AMapLocationClient mlocationClient;
|
||||
AMapLocationClientOption mLocationOption;
|
||||
|
||||
public void initLoaction(){
|
||||
public void initLoaction() {
|
||||
// 设置定位监听
|
||||
aMap.setLocationSource(new LocationSource() {
|
||||
@Override
|
||||
@@ -476,13 +542,13 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
mlocationClient.setLocationListener(new AMapLocationListener() {
|
||||
@Override
|
||||
public void onLocationChanged(AMapLocation aMapLocation) {
|
||||
if (mListener != null&&aMapLocation != null) {
|
||||
if (mListener != null && aMapLocation != null) {
|
||||
if (aMapLocation != null
|
||||
&&aMapLocation.getErrorCode() == 0) {
|
||||
&& aMapLocation.getErrorCode() == 0) {
|
||||
mListener.onLocationChanged(aMapLocation);// 显示系统小蓝点
|
||||
} else {
|
||||
String errText = "定位失败," + aMapLocation.getErrorCode()+ ": " + aMapLocation.getErrorInfo();
|
||||
Log.e("AmapErr",errText);
|
||||
String errText = "定位失败," + aMapLocation.getErrorCode() + ": " + aMapLocation.getErrorInfo();
|
||||
Log.e("AmapErr", errText);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -534,45 +600,48 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
|
||||
|
||||
private RouteSearch mRouteSearch;//路线查询器
|
||||
private List<LatLonPoint> lists=new ArrayList<>();
|
||||
private List<LatLonPoint> lists = new ArrayList<>();
|
||||
|
||||
|
||||
public void search(){
|
||||
public void search() {
|
||||
String latitude = sob.getData().getWayChildren().get((sob.getData().getWayChildren().size() - 1)).getLatitude();
|
||||
if (TextUtils.isEmpty(latitude)) {
|
||||
return;
|
||||
}
|
||||
// try {
|
||||
// AMapLocationClient.updatePrivacyShow(con,true,true);
|
||||
// AMapLocationClient.updatePrivacyAgree(con,true);
|
||||
mRouteSearch = new RouteSearch(this);
|
||||
mRouteSearch = new RouteSearch(this);
|
||||
// } catch (AMapException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//设置数据回调监听器
|
||||
mRouteSearch.setRouteSearchListener(new OnRouteSearchListener());
|
||||
//设置开始位置坐标点(注意经纬度不能写反,会报错1800(只能规划到中国区域里的地图路线))
|
||||
LatLonPoint startPoint=new LatLonPoint(Double.parseDouble(sob.getData().getWayChildren().get(0).getLatitude()),
|
||||
LatLonPoint startPoint = new LatLonPoint(Double.parseDouble(sob.getData().getWayChildren().get(0).getLatitude()),
|
||||
Double.parseDouble(sob.getData().getWayChildren().get((0)).getLongitude()));
|
||||
//设置目的地坐标点
|
||||
LatLonPoint endPoint = new LatLonPoint(Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size()-1)).getLatitude()),
|
||||
Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size()-1)).getLongitude()));
|
||||
LatLonPoint endPoint = new LatLonPoint(Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size() - 1)).getLatitude()),
|
||||
Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size() - 1)).getLongitude()));
|
||||
//查询信息对象
|
||||
for (int i=0;i<sob.getData().getWayChildren().size();i++){
|
||||
if(i!=0 && i!=(sob.getData().getWayChildren().size()-1)){
|
||||
LatLonPoint sp=new LatLonPoint(Double.parseDouble(sob.getData().getWayChildren().get(i).getLatitude()),
|
||||
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
||||
if (i != 0 && i != (sob.getData().getWayChildren().size() - 1)) {
|
||||
LatLonPoint sp = new LatLonPoint(Double.parseDouble(sob.getData().getWayChildren().get(i).getLatitude()),
|
||||
Double.parseDouble(sob.getData().getWayChildren().get((i)).getLongitude()));
|
||||
lists.add(sp);
|
||||
}
|
||||
}
|
||||
RouteSearch.FromAndTo fromAndTo = new RouteSearch.FromAndTo(startPoint,endPoint);
|
||||
RouteSearch.FromAndTo fromAndTo = new RouteSearch.FromAndTo(startPoint, endPoint);
|
||||
//设置搜索参数 1.fromAndTo 路径的起点终点 2.路径规划的策略(这里是驾车模式,具体看高德API) 3.途
|
||||
//经点,可选 4.避让区域,可选, 5.避让道路 ,可选
|
||||
RouteSearch.DriveRouteQuery query = new
|
||||
RouteSearch.DriveRouteQuery(fromAndTo,RouteSearch.DRIVING_SINGLE_DEFAULT,lists,null,"");
|
||||
RouteSearch.DriveRouteQuery(fromAndTo, RouteSearch.DRIVING_SINGLE_DEFAULT, lists, null, "");
|
||||
//开始异步查询
|
||||
mRouteSearch.calculateDriveRouteAsyn(query);
|
||||
}
|
||||
|
||||
|
||||
|
||||
class OnRouteSearchListener implements RouteSearch.OnRouteSearchListener{
|
||||
class OnRouteSearchListener implements RouteSearch.OnRouteSearchListener {
|
||||
|
||||
@Override
|
||||
public void onBusRouteSearched(BusRouteResult busRouteResult, int i) {
|
||||
@@ -581,7 +650,7 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onDriveRouteSearched(DriveRouteResult driveRouteResult, int rCode) {
|
||||
if (rCode == 1000){//获取规划路线成功,获取到的是了,路线坐标点的集合
|
||||
if (rCode == 1000) {//获取规划路线成功,获取到的是了,路线坐标点的集合
|
||||
List<DrivePath> paths = driveRouteResult.getPaths();
|
||||
//创建存储坐标点的集合
|
||||
List<LatLng> latLngs = new ArrayList<>();
|
||||
@@ -590,7 +659,7 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
for (DriveStep mDriveStep : mDrivePath.getSteps()) {
|
||||
for (LatLonPoint mLatLonPoint : mDriveStep.getPolyline()) {
|
||||
latLngs.add(new
|
||||
LatLng(mLatLonPoint.getLatitude(),mLatLonPoint.getLongitude()));
|
||||
LatLng(mLatLonPoint.getLatitude(), mLatLonPoint.getLongitude()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -601,24 +670,24 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.qi))
|
||||
.position(new LatLng(Double.parseDouble(sob.getData().getWayChildren().get(0).getLatitude()),
|
||||
Double.parseDouble(sob.getData().getWayChildren().get(0).getLongitude()))));
|
||||
for(int i=0;i<sob.getData().getWayChildren().size();i++){
|
||||
if(i!=0 && i!=(sob.getData().getWayChildren().size()-1)){
|
||||
StartOrderBean.DataDTO.WayChildrenDTO sdw=sob.getData().getWayChildren().get(i);
|
||||
int icon=0;
|
||||
if(sdw.getType()==1){
|
||||
icon=R.mipmap.z_loc;
|
||||
}else{
|
||||
icon=R.mipmap.x_loc;
|
||||
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
||||
if (i != 0 && i != (sob.getData().getWayChildren().size() - 1)) {
|
||||
StartOrderBean.DataDTO.WayChildrenDTO sdw = sob.getData().getWayChildren().get(i);
|
||||
int icon = 0;
|
||||
if (sdw.getType() == 1) {
|
||||
icon = R.mipmap.z_loc;
|
||||
} else {
|
||||
icon = R.mipmap.x_loc;
|
||||
}
|
||||
aMap.addMarker(new MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(icon))
|
||||
.position(new LatLng(Double.parseDouble(sdw.getLatitude()),Double.parseDouble(sdw.getLongitude()))));
|
||||
.position(new LatLng(Double.parseDouble(sdw.getLatitude()), Double.parseDouble(sdw.getLongitude()))));
|
||||
}
|
||||
}
|
||||
aMap.addMarker(new MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.zhong))
|
||||
.position(new LatLng(Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size()-1)).getLatitude()),
|
||||
Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size()-1)).getLongitude()))));
|
||||
.position(new LatLng(Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size() - 1)).getLatitude()),
|
||||
Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size() - 1)).getLongitude()))));
|
||||
//绘制规划路径路线
|
||||
aMap.addPolyline(new PolylineOptions()
|
||||
//路线坐标点的集合
|
||||
@@ -629,15 +698,15 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
//设置画线的颜色
|
||||
|
||||
//显示完整包含所有marker地图路线
|
||||
LatLngBounds.Builder builder =LatLngBounds.builder();
|
||||
LatLngBounds.Builder builder = LatLngBounds.builder();
|
||||
for (int i = 0; i < latLngs.size(); i++) {
|
||||
builder.include(latLngs.get(i));
|
||||
}
|
||||
//显示全部marker,第二个参数是四周留空宽度
|
||||
aMap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(),200));
|
||||
aMap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), 200));
|
||||
LatLng latLng = new LatLng(Double.parseDouble(sob.getData().getWayChildren().get(0).getLatitude()),
|
||||
Double.parseDouble(sob.getData().getWayChildren().get((0)).getLongitude()));//构造一个位置
|
||||
aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng,6));
|
||||
aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 6));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -653,7 +722,7 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
public void up_traffic(){
|
||||
public void up_traffic() {
|
||||
// ShippingNoteInfo[] snis=new ShippingNoteInfo[1];
|
||||
// ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||
// sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||
|
||||
+2
-1
@@ -21,6 +21,7 @@ import com.bumptech.glide.Glide;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||
import com.dahe.mylibrary.utils.ImageLoader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
@@ -58,7 +59,7 @@ public class VideoReleaseActivity extends BaseActivity {
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
getFirstframe(videoPath);
|
||||
Glide.with(con).load(new File(coverPath)).into(video_cover);
|
||||
ImageLoader.getInstance().loadImage(con,new File(coverPath),video_cover);
|
||||
}
|
||||
|
||||
public void submit(View v){
|
||||
|
||||
+12
-4
@@ -8,6 +8,7 @@ import android.widget.TextView;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.ImageLoader;
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
@@ -16,6 +17,7 @@ import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
@@ -71,19 +73,25 @@ public class GetShangChuanActivity extends BaseActivity {
|
||||
//coordinate.setText(StringUtil.isNull(sdw.getLongitude(),"")+","+StringUtil.isNull(sdw.getLatitude(),""));
|
||||
//coordinate2.setText(StringUtil.isNull(sdw.getReceiptLongitude(),"")+","+StringUtil.isNull(sdw.getReceiptLatitude(),""));
|
||||
if(sdw.getSendPutImagesUrl()!=null && sdw.getSendPutImagesUrl().size()>=1){
|
||||
Glide.with(con).load(sdw.getSendPutImagesUrl().get(0)).into(img1);
|
||||
ImageLoader.getInstance().loadImage(con,sdw.getSendPutImagesUrl().get(0),img1);
|
||||
img1.setOnClickListener(v -> {
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(img1,sdw.getSendPutImagesUrl().get(0), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||
.asImageViewer(img1,sdw.getSendPutImagesUrl().get(0), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||
.show();
|
||||
// new XPopup.Builder(con)
|
||||
// .asImageViewer(img1,sdw.getSendPutImagesUrl().get(0), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||
// .show();
|
||||
});
|
||||
}
|
||||
if(sdw.getReceiptUrl()!=null && sdw.getReceiptUrl().size()>=1){
|
||||
Glide.with(con).load(sdw.getReceiptUrl().get(0)).into(img2);
|
||||
ImageLoader.getInstance().loadImage(con,sdw.getReceiptUrl().get(0),img2);
|
||||
img2.setOnClickListener(v -> {
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(img2,sdw.getReceiptUrl().get(0), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||
.asImageViewer(img2,sdw.getReceiptUrl().get(0), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||
.show();
|
||||
// new XPopup.Builder(con)
|
||||
// .asImageViewer(img2,sdw.getReceiptUrl().get(0), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||
// .show();
|
||||
});
|
||||
}
|
||||
//new GlideUrl(sdw.getSendPutImagesUrl().toString(), new LazyHeaders.Builder().addHeader("Cookie", AppCurrentUser.getInstance().getUserCookie()).build());
|
||||
|
||||
+548
-261
File diff suppressed because it is too large
Load Diff
+713
@@ -0,0 +1,713 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alct.mdp.MDPLocationCollectionManager;
|
||||
import com.alct.mdp.callback.OnResultListener;
|
||||
import com.alct.mdp.model.Goods;
|
||||
import com.alct.mdp.model.Image;
|
||||
import com.alct.mdp.model.Location;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.StartOrderBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.UploadReceiptInputBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.BitmapUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.NfcUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.file.FileUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.img.GetCarImageAlert;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.location.LocationGDUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.location.LocationUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ShangChuangImgActivity2 extends BaseAppCompatActivity {
|
||||
|
||||
private TextView submit,name_top,name_body,address,tips,tips_x;
|
||||
private RelativeLayout getImg;
|
||||
private ImageView res_img,img_icon,img_delete;
|
||||
private String[] names={"装货","卸货","回单"};
|
||||
public static String[] TYPE_NAME={"zhuanghuo","xiehuo","huidan"};
|
||||
private int index=0;
|
||||
//
|
||||
private Gson gson=new Gson();
|
||||
//
|
||||
private LUInputBean lub=new LUInputBean();
|
||||
private UploadReceiptInputBean urib=new UploadReceiptInputBean();
|
||||
private LocationGDUtil lgdu;
|
||||
private LocationUtil lu;
|
||||
private List<Integer> imgIds=new ArrayList<>();
|
||||
private UploadBean ub;
|
||||
private HuoYuanRequset hyr;
|
||||
//
|
||||
private GetCarImageAlert gia=new GetCarImageAlert();
|
||||
private CustomDialog customDialog;
|
||||
private int id=0;
|
||||
private boolean key=true;
|
||||
private boolean keys=false;
|
||||
private boolean locationKey=false;
|
||||
private TextView tv_loaction;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
switch (m.what){
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
if (CacheGroup.cacheList.get("upload")!=null) {
|
||||
Log.e("upload",CacheGroup.cacheList.get("upload"));
|
||||
ub=gson.fromJson(CacheGroup.cacheList.remove("upload"),UploadBean.class);
|
||||
if(ub.getCode()==200){
|
||||
imgIds.add(ub.getData().getId());
|
||||
Glide.with(con).load(ub.getData().getUrl()).into(res_img);
|
||||
res_img.setVisibility(View.VISIBLE);
|
||||
img_delete.setVisibility(View.VISIBLE);
|
||||
img_icon.setVisibility(View.GONE);
|
||||
key=false;
|
||||
}else{
|
||||
Toast.makeText(con,ub.getMsg(),Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
}
|
||||
for(int i=0;i<TYPE_NAME.length;i++){
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME[i])!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[i]),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
if(!keys){
|
||||
Toast.makeText(con,"上传成功",Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}else{
|
||||
Toast.makeText(con,"上传成功",Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(con,bb.getMsg(),Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(TYPE_NAME[i]);
|
||||
}
|
||||
}
|
||||
if(CacheGroup.cacheList.get("carName")!=null){
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get("carName"),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
|
||||
}
|
||||
CacheGroup.cacheList.remove("carName");
|
||||
}
|
||||
break;
|
||||
case 14://定位成功
|
||||
locationKey=true;
|
||||
customDialog.dismiss();
|
||||
tv_loaction.setText("定位成功");
|
||||
tv_loaction.setTextColor(getResources().getColor(R.color.theme_color,null));
|
||||
initLocation();
|
||||
break;
|
||||
case 16://定位失败
|
||||
locationKey=false;
|
||||
customDialog.dismiss();
|
||||
tv_loaction.setText("定位失败,点击重试");
|
||||
tv_loaction.setTextColor(getResources().getColor(R.color.loaction_no_color,null));
|
||||
Toast.makeText(con,"定位失败,请确认开启定位后重试!",Toast.LENGTH_LONG).show();
|
||||
//定位结果接收
|
||||
//finish();
|
||||
break;
|
||||
case 15:
|
||||
break;
|
||||
|
||||
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||
path= (String) m.obj;
|
||||
Log.e("res:","选定图片结果");
|
||||
Log.e("res:",path);
|
||||
//选定图片结果
|
||||
// if(index==1 || index==2){
|
||||
// new OCRRequest().OCRPlateLicense(con,hd,new File(path));
|
||||
// }
|
||||
hyr.uploadFile(new File(path));
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
|
||||
private String wid;
|
||||
private int h_type;
|
||||
String sobStr="";
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
StateStyleUtil.stateTextColor(this);
|
||||
setContentView(R.layout.activity_shangchuan);
|
||||
con=this;
|
||||
submit=findViewById(R.id.submit);
|
||||
name_top=findViewById(R.id.name_top);
|
||||
name_body=findViewById(R.id.name_body);
|
||||
address=findViewById(R.id.address);
|
||||
getImg=findViewById(R.id.getImg);
|
||||
res_img=findViewById(R.id.res_img);
|
||||
img_icon=findViewById(R.id.img_icon);
|
||||
img_delete=findViewById(R.id.img_delete);
|
||||
tv_loaction=findViewById(R.id.tv_loaction);
|
||||
tips=findViewById(R.id.tips);
|
||||
tips_x=findViewById(R.id.tips_x);
|
||||
Bundle ins=getIntent().getExtras();
|
||||
index=ins.getInt("type");
|
||||
wid=ins.getString("wid");
|
||||
h_type=ins.getInt("h_type");
|
||||
keys=ins.getBoolean("keys");
|
||||
sobStr=getIntent().getExtras().getString("sob");
|
||||
//Log.e("---sdwStr--",sdwStr);
|
||||
sob=new Gson().fromJson(sobStr, StartOrderBean.class);
|
||||
initView(null);
|
||||
customDialog=new CustomDialog(con, "正在定位当前位置...");
|
||||
customDialog.show();
|
||||
lgdu=new LocationGDUtil(con,hd);
|
||||
//启动定位
|
||||
lgdu.onCreate();
|
||||
lu=new LocationUtil(con,hd);
|
||||
lu.onCreate();
|
||||
if (keys){
|
||||
lu=new LocationUtil(con,hd);
|
||||
lu.onCreate();
|
||||
}
|
||||
tv_loaction.setOnClickListener(v -> {
|
||||
if (!locationKey){
|
||||
customDialog.show();
|
||||
lgdu.onCreate();
|
||||
}
|
||||
});
|
||||
hyr=new HuoYuanRequset(con,hd);
|
||||
// if (!NfcUtils.hasNfc(con)) {
|
||||
// Toast.makeText(con,"请先开启nfc",Toast.LENGTH_LONG).show();
|
||||
// }else{
|
||||
// initData();
|
||||
// }
|
||||
}
|
||||
|
||||
public void initData() {
|
||||
//nfc初始化设置
|
||||
NfcUtils nfcUtils = new NfcUtils(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
name_top.setText("上传"+names[index]+"照片");
|
||||
name_body.setText(names[index]+"照片");
|
||||
if(index==1){
|
||||
tips.setVisibility(View.VISIBLE);
|
||||
tips_x.setVisibility(View.VISIBLE);
|
||||
}
|
||||
submit.setOnClickListener(v -> {
|
||||
if(imgIds.size()!=0){
|
||||
typeRequest();
|
||||
}else{
|
||||
Toast.makeText(con,"请先上传一张图片",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
getImg.setOnClickListener(v -> {
|
||||
if(key){
|
||||
Log.e("--imgIds.size()--",imgIds.size()+"");
|
||||
gia.showPopueWindow(this,true);
|
||||
// gia.showPopueWindow(this,index==2);
|
||||
}else{
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(res_img, ub.getData().getUrl(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||
.show();
|
||||
// new XPopup.Builder(con)
|
||||
// .asImageViewer(res_img, ub.getData().getUrl(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||
// .show();
|
||||
Toast.makeText(con,"查看了照片", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
img_delete.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
imgIds=new ArrayList<>();
|
||||
ub=new UploadBean();
|
||||
res_img.setVisibility(View.GONE);
|
||||
img_delete.setVisibility(View.GONE);
|
||||
img_icon.setVisibility(View.VISIBLE);
|
||||
key=true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String path;
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 12 && resultCode == RESULT_OK) {
|
||||
if (null==gia.getFile()){
|
||||
new ToastUtil(con, Gravity.CENTER,"图片选择失败").show(Toast.LENGTH_SHORT);
|
||||
return;
|
||||
}
|
||||
path=gia.getFile().getPath();
|
||||
Log.e("图片地址:",path);
|
||||
gia.dis();
|
||||
ImageFileCompressUtil.imageFileCompress(con,new File(path),hd);
|
||||
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
||||
List<LocalMedia> imgs = PictureSelector.obtainMultipleResult(data);
|
||||
if (imgs != null && imgs.size() > 0) {
|
||||
LocalMedia image = imgs.get(0);
|
||||
|
||||
String paths = image.getAndroidQToPath();
|
||||
if (TextUtils.isEmpty(paths)) {
|
||||
paths = image.getPath();
|
||||
}
|
||||
path=paths;
|
||||
Log.e("图片地址:",path);
|
||||
gia.dis();
|
||||
ImageFileCompressUtil.imageFileCompress(con,new File(path),hd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void initLocation(){
|
||||
address.setText(lgdu.getAddress());
|
||||
}
|
||||
|
||||
public void typeRequest(){
|
||||
// for(int i=0;i<imgIds.size();i++){
|
||||
// Log.e("--imgIds--",imgIds.get(i)+"");
|
||||
// }
|
||||
switch (index){
|
||||
case 0:
|
||||
//装货
|
||||
if(imgIds!=null && imgIds.size()>0) {
|
||||
lub.setLatitude(lgdu.getLatitude() + "");
|
||||
lub.setLongitude(lgdu.getLongitude() + "");
|
||||
lub.setLocationAddress(lgdu.getAddress());
|
||||
lub.setImageId(imgIds);
|
||||
lub.setWaybillId(wid);
|
||||
Log.e("--装货信息", gson.toJson(lub));
|
||||
if(locationKey){
|
||||
// hyr.loading(lub);
|
||||
if(keys){
|
||||
nfc();
|
||||
up_traffic_start();
|
||||
up_image_z();
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(con,"定位异常,请重新定位",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}else{
|
||||
Toast.makeText(con,"图片上传异常,请重新上传",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if(imgIds!=null && imgIds.size()>0) {
|
||||
//卸货
|
||||
lub.setLatitude(lgdu.getLatitude() + "");
|
||||
lub.setLongitude(lgdu.getLongitude() + "");
|
||||
lub.setLocationAddress(lgdu.getAddress());
|
||||
lub.setImageId(imgIds);
|
||||
lub.setWaybillId(wid);
|
||||
Log.e("--卸货信息", gson.toJson(lub));
|
||||
if(locationKey){
|
||||
if(keys){
|
||||
nfc();
|
||||
up_traffic_end();
|
||||
up_image();
|
||||
}
|
||||
// hyr.dischargeCargo(lub);
|
||||
}else{
|
||||
Toast.makeText(con,"定位异常,请重新定位",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}else{
|
||||
Toast.makeText(con,"图片上传异常,请重新上传",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if(imgIds!=null && imgIds.size()>0){//卸货回单
|
||||
//上传回单
|
||||
urib.setLatitude(lgdu.getLatitude()+"");
|
||||
urib.setLongitude(lgdu.getLongitude()+"");
|
||||
urib.setLocationAddress(lgdu.getAddress());
|
||||
//装卸货类型
|
||||
urib.setType(h_type+1);
|
||||
//回单id 数组
|
||||
urib.setReceiptId(imgIds);
|
||||
//子运运单ID
|
||||
urib.setWaybillId(wid);
|
||||
Log.e("--回单信息",gson.toJson(urib));
|
||||
if(locationKey) {
|
||||
if (index == 2 && keys) {
|
||||
up_trafficSign();
|
||||
up_trafficReceipt();
|
||||
receipt_image();
|
||||
}
|
||||
// hyr.receipt(urib);
|
||||
}else{
|
||||
Toast.makeText(con,"定位异常,请重新定位",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(con,"图片上传异常,请重新上传",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
|
||||
private StartOrderBean sob;
|
||||
|
||||
//上传安联和交通厅-装货
|
||||
public void up_traffic_start(){
|
||||
//安联
|
||||
if(sob.getData().getReportAlct()==1) {
|
||||
|
||||
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||
if (wayChild.getType()==1){
|
||||
data = wayChild;
|
||||
}
|
||||
}
|
||||
|
||||
Location l = new Location();
|
||||
l.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||
l.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||
l.setLocation(data.getAddress());
|
||||
l.setTime(data.getImageTakenDate());
|
||||
MDPLocationCollectionManager.pickup(con,sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联", "装货上传成功");
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,"装货上传成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(装货):", s + s1);
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,s + s1);
|
||||
}
|
||||
});
|
||||
}
|
||||
//交通厅
|
||||
if(sob.getData().getReport()==1){
|
||||
JTTProcess.start(con,sob,"");
|
||||
}
|
||||
}
|
||||
|
||||
public void nfc(){
|
||||
// if(sob.getData().getNfcId().equals(nfcStr)){
|
||||
// Toast.makeText(con,"nfcId匹配失败",Toast.LENGTH_LONG).show();
|
||||
// }
|
||||
if("".equals(sob.getData().getNfcId()) || sob.getData().getNfcId()==null){
|
||||
return;
|
||||
}
|
||||
MDPLocationCollectionManager.checkNfc(con, sob.getData().getShippingNoteNumber(),
|
||||
sob.getData().getNfcId(), new OnResultListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Toast.makeText(con,"nfcId匹配成功",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("不匹配",""+s+s1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//上传安联和交通厅-卸货
|
||||
public void up_traffic_end(){
|
||||
//安联
|
||||
if(sob.getData().getReportAlct()==1){
|
||||
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||
if (wayChild.getType()==2){
|
||||
data = wayChild;
|
||||
}
|
||||
}
|
||||
Location l=new Location();
|
||||
l.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||
l.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||
l.setLocation(data.getAddress());
|
||||
l.setTime(data.getImageTakenDate());
|
||||
Log.e("-安联卸货信息-",gson.toJson(l));
|
||||
MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联","卸货上传成功");
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,"卸货上传成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(卸货):",s+s1);
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||
}
|
||||
});
|
||||
}
|
||||
//交通厅
|
||||
if(sob.getData().getReport()==1){
|
||||
JTTProcess.stop(con,sob,"");
|
||||
}
|
||||
}
|
||||
|
||||
//上传安联-签收
|
||||
public void up_trafficSign(){
|
||||
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||
if (wayChild.getType()==2){
|
||||
data = wayChild;
|
||||
}
|
||||
}
|
||||
//安联
|
||||
Location l=new Location();
|
||||
l.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||
l.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||
l.setLocation(data.getAddress());
|
||||
l.setTime(data.getImageTakenDate());
|
||||
List<Goods> gs=new ArrayList<>();
|
||||
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||
if(wid.equals(wayChild.getId()+"")){
|
||||
for (StartOrderBean.DataDTO.WayChildrenDTO.GoodsDTO good : wayChild.getGoods()) {
|
||||
Goods g=new Goods();
|
||||
g.setGoodsName(good.getGoodName());
|
||||
g.setUnit(good.getGoodUnit());
|
||||
g.setItemNo(good.getId());
|
||||
//实收
|
||||
g.setQuantity(1);
|
||||
//应收
|
||||
g.setReceivedQuantity(1);
|
||||
//破损
|
||||
g.setDamageQuantity(1);
|
||||
//丢失
|
||||
g.setQuantity(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
MDPLocationCollectionManager.sign(con, sob.getData().getShippingNoteNumber(), l,gs, new OnResultListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联","签收成功");
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,"签收成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||
Log.e("上报安联失败(签收):",s+s1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//上传安联-回单
|
||||
public void up_trafficReceipt(){
|
||||
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||
if (wayChild.getType()==2){
|
||||
data = wayChild;
|
||||
}
|
||||
}
|
||||
//安联
|
||||
Location l=new Location();
|
||||
l.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||
l.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||
l.setLocation(data.getAddress());
|
||||
l.setTime(data.getImageTakenDate());
|
||||
MDPLocationCollectionManager.pod(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联","回单上传成功");
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,"回单上传成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(回单):",s+s1);
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void up_image_z(){
|
||||
///storage/emulated/0/Android/data/com.oneclouds.wangluohuoyun/files/Pictures/163124593063154.jpg
|
||||
|
||||
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||
if (wayChild.getType()==1){
|
||||
data = wayChild;
|
||||
}
|
||||
}
|
||||
|
||||
File file=new File(path);
|
||||
Image image=new Image();
|
||||
String base= BitmapUtil.imageToBase64(path);
|
||||
image.setFileData("data:image/"+ FileUtil.lastName(file) +";base64,"+base);
|
||||
image.setFileExt(FileUtil.lastName(file));
|
||||
image.setFileName(FileUtil.fileName(file));
|
||||
image.setImageTakenDate(data.getImageTakenDate());
|
||||
image.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||
image.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||
image.setLocation(data.getAddress());
|
||||
MDPLocationCollectionManager.uploadPickupImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联","装货照片上传成功");
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,"装货照片上传成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(装货照片):",s+s1);
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||
// SPUtil.insSP(con,"make","装货",sob.getData().getShippingNoteNumber());
|
||||
// SPUtil.insSP(con,"make","装货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||
// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||
// startService(serviceIn);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void up_image(){
|
||||
|
||||
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||
if (wayChild.getType()==2){
|
||||
data = wayChild;
|
||||
}
|
||||
}
|
||||
|
||||
File file=new File(path);
|
||||
Image image=new Image();
|
||||
String base= BitmapUtil.imageToBase64(path);
|
||||
image.setFileData("data:image/"+ FileUtil.lastName(file) +";base64,"+base);
|
||||
image.setFileExt(FileUtil.lastName(file));
|
||||
image.setFileName(FileUtil.fileName(file));
|
||||
image.setImageTakenDate(data.getImageTakenDate());
|
||||
image.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||
image.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||
image.setLocation(data.getAddress());
|
||||
MDPLocationCollectionManager.uploadUnloadImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联","卸货照片上传成功");
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,"卸货照片上传成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(卸货照片):",s+s1);
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||
// SPUtil.insSP(con,"make","卸货",sob.getData().getShippingNoteNumber());
|
||||
// SPUtil.insSP(con,"make","卸货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||
// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||
// startService(serviceIn);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void receipt_image(){
|
||||
///storage/emulated/0/Android/data/com.oneclouds.wangluohuoyun/files/Pictures/163124593063154.jpg
|
||||
StartOrderBean.DataDTO.WayChildrenDTO data = new StartOrderBean.DataDTO.WayChildrenDTO();
|
||||
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||
if (wayChild.getType()==2){
|
||||
data = wayChild;
|
||||
}
|
||||
}
|
||||
|
||||
File file=new File(path);
|
||||
Image image=new Image();
|
||||
String base= BitmapUtil.imageToBase64(path);
|
||||
image.setFileData("data:image/"+ FileUtil.lastName(file) +";base64,"+base);
|
||||
image.setFileExt(FileUtil.lastName(file));
|
||||
image.setFileName(FileUtil.fileName(file));
|
||||
image.setImageTakenDate(data.getImageTakenDate());
|
||||
image.setBaiduLongitude(Double.parseDouble(data.getLongitude()));
|
||||
image.setBaiduLatitude(Double.parseDouble(data.getLatitude()));
|
||||
image.setLocation(data.getAddress());
|
||||
MDPLocationCollectionManager.uploadPODImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联","回单照片上传成功");
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,"回单照片上传成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(回单照片):",s+s1);
|
||||
ToastUtils.showToast(ShangChuangImgActivity2.this,s+s1);
|
||||
// SPUtil.insSP(con,"make","回单",sob.getData().getShippingNoteNumber());
|
||||
//// SPUtil.insSP(con,"make","回单-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||
//// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||
//// startService(serviceIn);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
//开启前台调度系统
|
||||
//NfcUtils.mNfcAdapter.enableForegroundDispatch(this, NfcUtils.mPendingIntent, NfcUtils.mIntentFilter, NfcUtils.mTechList);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
//关闭前台调度系统
|
||||
//NfcUtils.mNfcAdapter.disableForegroundDispatch(this);
|
||||
}
|
||||
|
||||
String nfcStr="";
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
//当该Activity接收到NFC标签时,运行该方法
|
||||
//调用工具方法,读取NFC数据
|
||||
try {
|
||||
nfcStr = NfcUtils.readNFCId(intent);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Log.e("nfc",nfcStr);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+889
@@ -0,0 +1,889 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.SimpleAdapter;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alct.mdp.MDPLocationCollectionManager;
|
||||
import com.alct.mdp.callback.OnResultListener;
|
||||
import com.alct.mdp.model.Goods;
|
||||
import com.alct.mdp.model.Image;
|
||||
import com.alct.mdp.model.Location;
|
||||
import com.amap.api.maps.CameraUpdateFactory;
|
||||
import com.amap.api.services.core.AMapException;
|
||||
import com.amap.api.services.core.LatLonPoint;
|
||||
import com.amap.api.services.geocoder.GeocodeAddress;
|
||||
import com.amap.api.services.geocoder.GeocodeQuery;
|
||||
import com.amap.api.services.geocoder.GeocodeResult;
|
||||
import com.amap.api.services.geocoder.GeocodeSearch;
|
||||
import com.amap.api.services.geocoder.RegeocodeResult;
|
||||
import com.amap.api.services.help.Inputtips;
|
||||
import com.amap.api.services.help.InputtipsQuery;
|
||||
import com.amap.api.services.help.Tip;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.CarInfoBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.StartOrderBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.UploadReceiptInputBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.BitmapUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.NfcUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.file.FileUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.img.GetCarImageAlert;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.location.LocationGDUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.location.LocationUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.baidu.mapapi.model.LatLng;
|
||||
import com.baidu.mapapi.utils.CoordinateConverter;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
||||
import com.github.gzuliyujiang.wheelpicker.DatimePicker;
|
||||
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode;
|
||||
import com.github.gzuliyujiang.wheelpicker.annotation.TimeMode;
|
||||
import com.github.gzuliyujiang.wheelpicker.contract.OnDatePickedListener;
|
||||
import com.github.gzuliyujiang.wheelpicker.contract.OnDatimePickedListener;
|
||||
import com.github.gzuliyujiang.wheelpicker.entity.DateEntity;
|
||||
import com.github.gzuliyujiang.wheelpicker.entity.DatimeEntity;
|
||||
import com.google.gson.Gson;
|
||||
import com.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.interfaces.OnSelectListener;
|
||||
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements Inputtips.InputtipsListener {
|
||||
|
||||
private TextView submit, name_top, name_body, address, tips, tips_x,tvDate,tvLocation;
|
||||
private RelativeLayout getImg;
|
||||
private EditText etAddress;
|
||||
private Button btnOk;
|
||||
private ImageView res_img, img_icon, img_delete;
|
||||
private String[] names = {"装货", "卸货", "回单"};
|
||||
public static String[] TYPE_NAME = {"zhuanghuo", "xiehuo", "huidan"};
|
||||
private int index = 0;
|
||||
//
|
||||
private Gson gson = new Gson();
|
||||
//
|
||||
private LUInputBean lub = new LUInputBean();
|
||||
private UploadReceiptInputBean urib = new UploadReceiptInputBean();
|
||||
private LocationGDUtil lgdu;
|
||||
public LocationUtil lu;
|
||||
private List<Integer> imgIds = new ArrayList<>();
|
||||
private UploadBean ub;
|
||||
private HuoYuanRequset hyr;
|
||||
//
|
||||
private GetCarImageAlert gia = new GetCarImageAlert();
|
||||
private CustomDialog customDialog;
|
||||
private int id = 0;
|
||||
private boolean key = true;
|
||||
private boolean keys = false;
|
||||
private boolean locationKey = false;
|
||||
private TextView tv_loaction;
|
||||
|
||||
|
||||
private String selDate;
|
||||
private GeocodeSearch geocoderSearch;
|
||||
|
||||
private TempLoca tempLoca = new TempLoca();
|
||||
private TempLoca tempLocaBd = new TempLoca();
|
||||
|
||||
|
||||
@Override
|
||||
public void onGetInputtips(List<Tip> tipList, int rCode) {
|
||||
if (rCode == AMapException.CODE_AMAP_SUCCESS) {
|
||||
List<String> names = new ArrayList<String>();
|
||||
if(tipList != null) {
|
||||
int size = tipList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
Tip tip = tipList.get(i);
|
||||
if(tip != null) {
|
||||
names.add(tip.getDistrict()+tip.getName());
|
||||
}
|
||||
}
|
||||
|
||||
new XPopup.Builder(this)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.hasShadowBg(false) // 去掉半透明背景
|
||||
.atView(etAddress)
|
||||
.asAttachList(names.toArray(new String[0]), new int[]{}, new OnSelectListener() {
|
||||
@Override
|
||||
public void onSelect(int position, String text) {
|
||||
Tip tip = tipList.get(position);
|
||||
etAddress.setText(tip.getDistrict()+tip.getAddress()+tip.getName());
|
||||
LatLonPoint latLonPoint = tip.getPoint();
|
||||
tempLoca.setAddress(etAddress.getText().toString());
|
||||
tempLoca.setLatitude(latLonPoint.getLatitude());
|
||||
tempLoca.setLongitude(latLonPoint.getLongitude());
|
||||
tempLoca.setTime(tvDate.getText().toString());
|
||||
|
||||
LatLng latLng = convertGPSToBaidu(new LatLng(latLonPoint.getLatitude(), latLonPoint.getLongitude()));
|
||||
tempLocaBd.setLongitude(latLng.longitude);
|
||||
tempLocaBd.setLatitude(latLng.latitude);
|
||||
tempLocaBd.setAddress(etAddress.getText().toString());
|
||||
tempLocaBd.setTime(tvDate.getText().toString());
|
||||
|
||||
}
|
||||
})
|
||||
.show();
|
||||
|
||||
|
||||
|
||||
// SimpleAdapter aAdapter = new SimpleAdapter(getApplicationContext(), listString, R.layout.item_layout,
|
||||
// new String[]{"name", "address"}, new int[]{R.id.poi_field_id, R.id.poi_value_id});
|
||||
//
|
||||
// minputlist.setAdapter(aAdapter);
|
||||
// aAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
class TempLoca{
|
||||
private double latitude;
|
||||
private double longitude;
|
||||
private String address;
|
||||
private String time;
|
||||
|
||||
public TempLoca() {
|
||||
|
||||
}
|
||||
|
||||
public TempLoca(double latitude, double longitude, String address, String time) {
|
||||
this.latitude = latitude;
|
||||
this.longitude = longitude;
|
||||
this.address = address;
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public double getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(double latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public double getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(double longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(String time) {
|
||||
this.time = time;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
switch (m.what) {
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
Log.e("upload", CacheGroup.cacheList.get("upload"));
|
||||
ub = gson.fromJson(CacheGroup.cacheList.remove("upload"), UploadBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
imgIds.add(ub.getData().getId());
|
||||
Glide.with(con).load(ub.getData().getUrl()).into(res_img);
|
||||
res_img.setVisibility(View.VISIBLE);
|
||||
img_delete.setVisibility(View.VISIBLE);
|
||||
img_icon.setVisibility(View.GONE);
|
||||
key = false;
|
||||
} else {
|
||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
}
|
||||
for (int i = 0; i < TYPE_NAME.length; i++) {
|
||||
if (CacheGroup.cacheList.get(TYPE_NAME[i]) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[i]), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
if (index == 2) {
|
||||
if (!keys){//装货回单
|
||||
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(TYPE_NAME[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (CacheGroup.cacheList.get("carName") != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("carName"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
|
||||
}
|
||||
CacheGroup.cacheList.remove("carName");
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("carNum") != null) {
|
||||
Log.e("upload", CacheGroup.cacheList.get("carNum"));
|
||||
CarInfoBean ub = gson.fromJson(CacheGroup.cacheList.remove("carNum"), CarInfoBean.class);
|
||||
if (ub.getCode() == 200 && ub.getData().getData().getPrism_keyValueInfo().size() > 0) {
|
||||
String value = ub.getData().getData().getPrism_keyValueInfo().get(0).getValue();
|
||||
String forceMatching = ub.getData().getForceMatching();
|
||||
if ("1".equals(forceMatching)) {//是否强校验车牌号 1:强校验
|
||||
if (sob.getData().getCarNumber().equals(value)) {
|
||||
hyr.uploadFile(new File(path));
|
||||
} else {
|
||||
new MessageUtils().showCenMessage(ShangChuangImgActivityBC.this, "车牌号不匹配!", "请重新拍照或联系管理员");
|
||||
}
|
||||
} else {
|
||||
hyr.uploadFile(new File(path));
|
||||
}
|
||||
} else {//识别失败后返回code500
|
||||
if (index == 0) {//装卸货车辆需要识别车牌号){
|
||||
Toast.makeText(con, "装货照片包含车牌号、三分之二车身或者装卸货场景。", Toast.LENGTH_SHORT).show();
|
||||
} else if (index == 1) {
|
||||
Toast.makeText(con, "卸货照片包含车牌号、三分之二车身或者装卸货场景。", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
CacheGroup.cacheList.remove("carNum");
|
||||
}
|
||||
break;
|
||||
case 14://定位成功
|
||||
locationKey = true;
|
||||
customDialog.dismiss();
|
||||
tv_loaction.setText("定位成功");
|
||||
tv_loaction.setTextColor(getResources().getColor(R.color.theme_color, null));
|
||||
latLng = convertGPSToBaidu(new LatLng(lgdu.getLatitude(), lgdu.getLongitude()));
|
||||
initLocation();
|
||||
break;
|
||||
case 16://定位失败
|
||||
locationKey = false;
|
||||
customDialog.dismiss();
|
||||
tv_loaction.setText("定位失败,点击重试");
|
||||
tv_loaction.setTextColor(getResources().getColor(R.color.loaction_no_color, null));
|
||||
Toast.makeText(con, "定位失败,请确认开启定位后重试!", Toast.LENGTH_LONG).show();
|
||||
//定位结果接收
|
||||
//finish();
|
||||
break;
|
||||
case 15:
|
||||
break;
|
||||
|
||||
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||
path = (String) m.obj;
|
||||
Log.e("res:", "选定图片结果");
|
||||
Log.e("res:", path);
|
||||
//选定图片结果
|
||||
// if(index==1 || index==2){
|
||||
// new OCRRequest().OCRPlateLicense(con,hd,new File(path));
|
||||
// }
|
||||
if (index == 0 || index == 1) {//装卸货车辆需要识别车牌号
|
||||
new OCRRequest().OCRCarPlateLicense(con, hd, new File(path));
|
||||
} else {
|
||||
hyr.uploadFile(new File(path));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
private LatLng latLng;
|
||||
|
||||
public LatLng convertGPSToBaidu(LatLng srLatLng) {
|
||||
CoordinateConverter converter = new CoordinateConverter();
|
||||
converter.from(CoordinateConverter.CoordType.COMMON);
|
||||
converter.coord(srLatLng);
|
||||
return converter.convert();
|
||||
}
|
||||
|
||||
private String wid;
|
||||
private int h_type;
|
||||
String sobStr = "";
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
StateStyleUtil.stateTextColor(this);
|
||||
setContentView(R.layout.activity_shangchuan_bc);
|
||||
con = this;
|
||||
submit = findViewById(R.id.submit);
|
||||
name_top = findViewById(R.id.name_top);
|
||||
name_body = findViewById(R.id.name_body);
|
||||
address = findViewById(R.id.address);
|
||||
getImg = findViewById(R.id.getImg);
|
||||
res_img = findViewById(R.id.res_img);
|
||||
img_icon = findViewById(R.id.img_icon);
|
||||
img_delete = findViewById(R.id.img_delete);
|
||||
tv_loaction = findViewById(R.id.tv_loaction);
|
||||
btnOk = findViewById(R.id.btnOk);
|
||||
etAddress = findViewById(R.id.etAddress);
|
||||
tvDate = findViewById(R.id.tvDate);
|
||||
tvLocation = findViewById(R.id.tvLocation);
|
||||
tips = findViewById(R.id.tips);
|
||||
tips_x = findViewById(R.id.tips_x);
|
||||
Bundle ins = getIntent().getExtras();
|
||||
index = ins.getInt("type");
|
||||
wid = ins.getString("wid");
|
||||
h_type = ins.getInt("h_type");
|
||||
keys = ins.getBoolean("keys");
|
||||
sobStr = getIntent().getExtras().getString("sob");
|
||||
//Log.e("---sdwStr--",sdwStr);
|
||||
sob = new Gson().fromJson(sobStr, StartOrderBean.class);
|
||||
initView(null);
|
||||
customDialog = new CustomDialog(con, "正在定位当前位置...");
|
||||
customDialog.show();
|
||||
lgdu = new LocationGDUtil(con, hd);
|
||||
//启动定位
|
||||
lgdu.onCreate();
|
||||
tv_loaction.setOnClickListener(v -> {
|
||||
if (!locationKey) {
|
||||
customDialog.show();
|
||||
lgdu.onCreate();
|
||||
}
|
||||
});
|
||||
|
||||
btnOk.setOnClickListener(v -> {
|
||||
String s = etAddress.getText().toString();
|
||||
if (TextUtils.isEmpty(selDate)){
|
||||
ToastUtils.showToast(this,"请先选择时间");
|
||||
return;
|
||||
}
|
||||
if (!TextUtils.isEmpty(s)&&s.length()>=4){
|
||||
|
||||
InputtipsQuery inputquery = new InputtipsQuery(s, "");
|
||||
// inputquery.setCityLimit(true);
|
||||
Inputtips inputTips = new Inputtips(this, inputquery);
|
||||
inputTips.setInputtipsListener(this);
|
||||
inputTips.requestInputtipsAsyn();
|
||||
|
||||
|
||||
// GeocodeQuery query = new GeocodeQuery(s, "100000");// 第一个参数表示地址,第二个参数表示查询城市,中文或者中文全拼,citycode、adcode,
|
||||
// geocoderSearch.getFromLocationNameAsyn(query);// 设置同步地理编码请求
|
||||
}else{
|
||||
ToastUtils.showToast(this,"请输入地址且长度大于4");
|
||||
}
|
||||
});
|
||||
|
||||
tvDate.setOnClickListener(v -> {
|
||||
|
||||
DatimePicker datimePicker = new DatimePicker(this);
|
||||
datimePicker.setBodyWidth(300);
|
||||
datimePicker.getWheelLayout().setRange(DatimeEntity.yearOnFuture(-1),DatimeEntity.yearOnFuture(10),DatimeEntity.now());
|
||||
datimePicker.setOnDatimePickedListener((year, month, day, hour, minute, second) -> {
|
||||
selDate = year+"-"+month+"-"+day+" "+ hour+":"+minute;
|
||||
tvDate.setText(selDate);
|
||||
});
|
||||
datimePicker.getWheelLayout().setDateLabel("年", "月", "日");
|
||||
datimePicker.getWheelLayout().setTimeLabel("时","分","");
|
||||
datimePicker.getWheelLayout().setTimeMode(TimeMode.HOUR_24_NO_SECOND);
|
||||
datimePicker.show();
|
||||
});
|
||||
|
||||
hyr = new HuoYuanRequset(con, hd);
|
||||
}
|
||||
|
||||
public void initData() {
|
||||
//nfc初始化设置
|
||||
NfcUtils nfcUtils = new NfcUtils(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
name_top.setText("上传" + names[index] + "照片");
|
||||
name_body.setText(names[index] + "照片");
|
||||
if (index == 1) {
|
||||
tips.setVisibility(View.VISIBLE);
|
||||
tips_x.setVisibility(View.VISIBLE);
|
||||
}
|
||||
submit.setOnClickListener(v -> {
|
||||
if (imgIds.size() != 0) {
|
||||
typeRequest();
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传一张图片", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
getImg.setOnClickListener(v -> {
|
||||
if (key) {
|
||||
Log.e("--imgIds.size()--", imgIds.size() + "");
|
||||
gia.showPopueWindow(this, true);
|
||||
} else {
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(res_img, ub.getData().getUrl(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||
.show();
|
||||
// new XPopup.Builder(con)
|
||||
// .asImageViewer(res_img, ub.getData().getUrl(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||
// .show();
|
||||
Toast.makeText(con, "查看了照片", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
img_delete.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
imgIds = new ArrayList<>();
|
||||
ub = new UploadBean();
|
||||
res_img.setVisibility(View.GONE);
|
||||
img_delete.setVisibility(View.GONE);
|
||||
img_icon.setVisibility(View.VISIBLE);
|
||||
key = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String path;
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 12 && resultCode == RESULT_OK) {
|
||||
if (null == gia.getFile()) {
|
||||
new ToastUtil(con, Gravity.CENTER, "图片选择失败").show(Toast.LENGTH_SHORT);
|
||||
return;
|
||||
}
|
||||
path = gia.getFile().getPath();
|
||||
Log.e("图片地址:", path);
|
||||
gia.dis();
|
||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
||||
List<LocalMedia> imgs = PictureSelector.obtainMultipleResult(data);
|
||||
if (imgs != null && imgs.size() > 0) {
|
||||
LocalMedia image = imgs.get(0);
|
||||
|
||||
String paths = image.getAndroidQToPath();
|
||||
if (TextUtils.isEmpty(paths)) {
|
||||
paths = image.getPath();
|
||||
}
|
||||
path = paths;
|
||||
Log.e("图片地址:", path);
|
||||
gia.dis();
|
||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void initLocation() {
|
||||
address.setText(lgdu.getAddress());
|
||||
}
|
||||
|
||||
public void typeRequest() {
|
||||
// for(int i=0;i<imgIds.size();i++){
|
||||
// Log.e("--imgIds--",imgIds.get(i)+"");
|
||||
// }
|
||||
switch (index) {
|
||||
case 0:
|
||||
//装货
|
||||
if (imgIds != null && imgIds.size() > 0) {
|
||||
lub.setLatitude(tempLoca.getLatitude() + "");
|
||||
lub.setLongitude(tempLoca.getLongitude() + "");
|
||||
lub.setLocationAddress(tempLoca.getAddress());
|
||||
lub.setImageId(imgIds);
|
||||
lub.setWaybillId(wid);
|
||||
Log.e("--装货信息", gson.toJson(lub));
|
||||
if (locationKey) {//高德定位
|
||||
if (keys) {
|
||||
nfc();
|
||||
loadInfo();
|
||||
// up_traffic_start();
|
||||
// up_image_z();
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(con, "图片上传异常,请重新上传", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (imgIds != null && imgIds.size() > 0) {
|
||||
//卸货
|
||||
lub.setLatitude(tempLoca.getLatitude() + "");
|
||||
lub.setLongitude(tempLoca.getLongitude() + "");
|
||||
lub.setLocationAddress(tempLoca.getAddress());
|
||||
lub.setImageId(imgIds);
|
||||
lub.setWaybillId(wid);
|
||||
lub.setRealLoadTime(tempLoca.getTime());
|
||||
Log.e("--卸货信息", gson.toJson(lub));
|
||||
if (locationKey&&!TextUtils.isEmpty(tempLoca.address)) {
|
||||
if (keys) {
|
||||
nfc();
|
||||
uploadInfo();
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(con, "图片上传异常,请重新上传", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (imgIds != null && imgIds.size() > 0) {//卸货回单
|
||||
//上传回单
|
||||
urib.setLatitude(lgdu.getLatitude() + "");
|
||||
urib.setLongitude(lgdu.getLongitude() + "");
|
||||
urib.setLocationAddress(lgdu.getAddress());
|
||||
//装卸货类型
|
||||
urib.setType(h_type + 1);
|
||||
//回单id 数组
|
||||
urib.setReceiptId(imgIds);
|
||||
//子运运单ID
|
||||
urib.setWaybillId(wid);
|
||||
Log.e("--回单信息", gson.toJson(urib));
|
||||
if (locationKey) {
|
||||
if (index == 2 && keys && !TextUtils.isEmpty(tempLoca.address)) {
|
||||
up_trafficSign();
|
||||
up_trafficReceipt();
|
||||
receipt_image();
|
||||
}
|
||||
hyr.receipt(urib);
|
||||
} else {
|
||||
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(con, "图片上传异常,请重新上传", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private StartOrderBean sob;
|
||||
|
||||
public void nfc() {
|
||||
// if(sob.getData().getNfcId().equals(nfcStr)){
|
||||
// Toast.makeText(con,"nfcId匹配失败",Toast.LENGTH_LONG).show();
|
||||
// }
|
||||
if ("".equals(sob.getData().getNfcId()) || sob.getData().getNfcId() == null) {
|
||||
return;
|
||||
}
|
||||
MDPLocationCollectionManager.checkNfc(con, sob.getData().getShippingNoteNumber(),
|
||||
sob.getData().getNfcId(), new OnResultListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Toast.makeText(con, "nfcId匹配成功", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("不匹配", "" + s + s1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//上传安联-签收
|
||||
public void up_trafficSign() {
|
||||
//安联
|
||||
Location l = new Location();
|
||||
l.setBaiduLongitude(tempLocaBd.longitude);
|
||||
l.setBaiduLatitude(tempLocaBd.latitude);
|
||||
l.setLocation(tempLocaBd.getAddress());
|
||||
l.setTime(tempLocaBd.getTime());
|
||||
List<Goods> gs = new ArrayList<>();
|
||||
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||
if (wid.equals(wayChild.getId() + "")) {
|
||||
for (StartOrderBean.DataDTO.WayChildrenDTO.GoodsDTO good : wayChild.getGoods()) {
|
||||
Goods g = new Goods();
|
||||
g.setGoodsName(good.getGoodName());
|
||||
g.setUnit(good.getGoodUnit());
|
||||
g.setItemNo(good.getId());
|
||||
//实收
|
||||
g.setQuantity(1);
|
||||
//应收
|
||||
g.setReceivedQuantity(1);
|
||||
//破损
|
||||
g.setDamageQuantity(1);
|
||||
//丢失
|
||||
g.setQuantity(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
MDPLocationCollectionManager.sign(con, sob.getData().getShippingNoteNumber(), l, gs, new OnResultListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联", "签收成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(签收):", s + s1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//上传安联-回单
|
||||
public void up_trafficReceipt() {
|
||||
//安联
|
||||
Location l = new Location();
|
||||
l.setBaiduLongitude(tempLocaBd.longitude);
|
||||
l.setBaiduLatitude(tempLocaBd.latitude);
|
||||
l.setLocation(tempLocaBd.getAddress());
|
||||
l.setTime(tempLocaBd.getTime());
|
||||
MDPLocationCollectionManager.pod(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联", "回单上传成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(回单):", s + s1);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void up_image_z() {
|
||||
///storage/emulated/0/Android/data/com.oneclouds.wangluohuoyun/files/Pictures/163124593063154.jpg
|
||||
File file = new File(path);
|
||||
Image image = new Image();
|
||||
String base = BitmapUtil.imageToBase64(path);
|
||||
image.setFileData("data:image/" + FileUtil.lastName(file) + ";base64," + base);
|
||||
image.setFileExt(FileUtil.lastName(file));
|
||||
image.setFileName(FileUtil.fileName(file));
|
||||
image.setImageTakenDate(Timer.getTimerT());
|
||||
image.setBaiduLongitude(tempLocaBd.longitude);
|
||||
image.setBaiduLatitude(tempLocaBd.latitude);
|
||||
image.setLocation(tempLocaBd.getAddress());
|
||||
MDPLocationCollectionManager.uploadPickupImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联", "装货照片上传成功");
|
||||
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(装货照片):", s + s1);
|
||||
// SPUtil.insSP(con,"make","装货",sob.getData().getShippingNoteNumber());
|
||||
// SPUtil.insSP(con,"make","装货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||
// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||
// startService(serviceIn);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void up_image() {
|
||||
File file = new File(path);
|
||||
Image image = new Image();
|
||||
String base = BitmapUtil.imageToBase64(path);
|
||||
image.setFileData("data:image/" + FileUtil.lastName(file) + ";base64," + base);
|
||||
image.setFileExt(FileUtil.lastName(file));
|
||||
image.setFileName(FileUtil.fileName(file));
|
||||
image.setImageTakenDate(tempLocaBd.getTime());
|
||||
image.setBaiduLongitude(tempLocaBd.longitude);
|
||||
image.setBaiduLatitude(tempLocaBd.latitude);
|
||||
image.setLocation(tempLocaBd.getAddress());
|
||||
MDPLocationCollectionManager.uploadUnloadImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联", "卸货照片上传成功");
|
||||
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(卸货照片):", s + s1);
|
||||
// SPUtil.insSP(con,"make","卸货",sob.getData().getShippingNoteNumber());
|
||||
// SPUtil.insSP(con,"make","卸货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||
// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||
// startService(serviceIn);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void receipt_image() {
|
||||
///storage/emulated/0/Android/data/com.oneclouds.wangluohuoyun/files/Pictures/163124593063154.jpg
|
||||
File file = new File(path);
|
||||
Image image = new Image();
|
||||
String base = BitmapUtil.imageToBase64(path);
|
||||
image.setFileData("data:image/" + FileUtil.lastName(file) + ";base64," + base);
|
||||
image.setFileExt(FileUtil.lastName(file));
|
||||
image.setFileName(FileUtil.fileName(file));
|
||||
image.setImageTakenDate(tempLocaBd.getTime());
|
||||
image.setBaiduLongitude(tempLocaBd.longitude);
|
||||
image.setBaiduLatitude(tempLocaBd.latitude);
|
||||
image.setLocation(tempLocaBd.getAddress());
|
||||
MDPLocationCollectionManager.uploadPODImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联", "回单照片上传成功");
|
||||
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(回单照片):", s + s1);
|
||||
// SPUtil.insSP(con,"make","回单",sob.getData().getShippingNoteNumber());
|
||||
//// SPUtil.insSP(con,"make","回单-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||
//// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||
//// startService(serviceIn);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
//开启前台调度系统
|
||||
//NfcUtils.mNfcAdapter.enableForegroundDispatch(this, NfcUtils.mPendingIntent, NfcUtils.mIntentFilter, NfcUtils.mTechList);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
//关闭前台调度系统
|
||||
//NfcUtils.mNfcAdapter.disableForegroundDispatch(this);
|
||||
}
|
||||
|
||||
String nfcStr = "";
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
//当该Activity接收到NFC标签时,运行该方法
|
||||
//调用工具方法,读取NFC数据
|
||||
try {
|
||||
nfcStr = NfcUtils.readNFCId(intent);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Log.e("nfc", nfcStr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 上传安联和交通厅,平台-装货
|
||||
*/
|
||||
private void loadInfo() {
|
||||
//安联
|
||||
if (sob.getData().getReportAlct() == 1) {
|
||||
Location l = new Location();
|
||||
l.setBaiduLongitude(tempLocaBd.longitude);
|
||||
l.setBaiduLatitude(tempLocaBd.latitude);
|
||||
l.setLocation(tempLocaBd.getAddress());
|
||||
l.setTime(tempLocaBd.getTime());
|
||||
MDPLocationCollectionManager.pickup(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联", "装货上传成功");
|
||||
//交通厅
|
||||
if (sob.getData().getReport() == 1) {
|
||||
JTTProcess.start(con, sob, "");
|
||||
}
|
||||
//装货状态
|
||||
hyr.loading(lub);
|
||||
//装货照片
|
||||
up_image_z();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(装货):", s + s1);
|
||||
new MessageUtils().showCenMessage(con, s1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传安联和交通厅,平台-卸货
|
||||
*/
|
||||
private void uploadInfo() {
|
||||
|
||||
//安联
|
||||
if (sob.getData().getReportAlct() == 1) {
|
||||
Location l = new Location();
|
||||
l.setBaiduLongitude(tempLocaBd.longitude);
|
||||
l.setBaiduLatitude(tempLocaBd.latitude);
|
||||
l.setLocation(tempLocaBd.getAddress());
|
||||
l.setTime(tempLocaBd.getTime());
|
||||
Log.e("-安联卸货信息-", gson.toJson(l));
|
||||
MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("上报安联", "卸货上传成功");
|
||||
//交通厅
|
||||
if (sob.getData().getReport() == 1) {
|
||||
JTTProcess.stop(con, sob, "");
|
||||
}
|
||||
//卸货状态-平台
|
||||
hyr.dischargeCargo4(lub);
|
||||
//卸货照片-安联
|
||||
up_image();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
Log.e("上报安联失败(卸货):", s + s1);
|
||||
// new MessageUtils().showCenMessage(con, s1);
|
||||
//运单状态不一致,平台更新状态
|
||||
hyr.dischargeCargo4(lub);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class WebPDFActivity extends BaseActivity {
|
||||
protected void onPostExecute(Void aVoid) {
|
||||
super.onPostExecute(aVoid);
|
||||
pdf_view.fromStream(input[0])
|
||||
.pages(0,1) // all pages are displayed by default
|
||||
// .pages(0,1,2,3,4,5,6,7) // all pages are displayed by default
|
||||
.enableAnnotationRendering(true)
|
||||
.load();
|
||||
}
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.login;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.provider.Settings;
|
||||
import android.telecom.TelecomManager;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.TextPaint;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
@@ -10,6 +16,8 @@ import android.text.style.ClickableSpan;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.TextView;
|
||||
@@ -18,10 +26,14 @@ import android.widget.Toast;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.AppInfoBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.net.BaseObserver;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.net.DataManager;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.net.RxHttpCallBack;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.web.WebOnlyOneActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickHelper;
|
||||
import com.dahe.mylibrary.net.CommonResponseBean;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
@@ -38,6 +50,7 @@ import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StatusBarUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import cn.jiguang.verifysdk.api.AuthPageEventListener;
|
||||
@@ -64,9 +77,9 @@ public class LoginActivity extends BaseActivity {
|
||||
private LoginBean loginBean;
|
||||
private TimerTask tt;
|
||||
private int timer_sum = 60;
|
||||
private ImageButton agree_btn;
|
||||
private CardView no_btn;
|
||||
private CheckBox cb;
|
||||
private UserRequset ur;
|
||||
private CustomDialog customDialog;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
@@ -85,23 +98,42 @@ public class LoginActivity extends BaseActivity {
|
||||
Log.e("--短信发送res--", "短信发送成功");
|
||||
}
|
||||
if (CacheGroup.cacheList.get(LOGIN_RESULT) != null) {
|
||||
if (customDialog != null && customDialog.isShowing())
|
||||
customDialog.dismiss();
|
||||
|
||||
btn_login.setEnabled(true);
|
||||
btn_login.setBackgroundResource(R.drawable.bg_btn);
|
||||
//存储登录记录
|
||||
loginBean = new Gson().fromJson(CacheGroup.cacheList.get(LOGIN_RESULT), LoginBean.class);
|
||||
Log.e("--登录信息--", new Gson().toJson(loginBean));
|
||||
AppInfoBean appInfoBean = new AppInfoBean();
|
||||
if (loginBean.getCode() == 200) {
|
||||
SPUtil.insSP(con, USER, USER_TOKEN, loginBean.getData().getToken());
|
||||
SPUtil.insSP(con, USER, USER_UNAME, loginBean.getData().getUname());
|
||||
SPUtil.insSP(con, USER, USER_RNAME, loginBean.getData().getRname());
|
||||
SPUtil.insSP(con, USER, USER_ID, loginBean.getData().getId() + "");
|
||||
JPushInterface.setAlias(con, 0, loginBean.getData().getUname());
|
||||
// JPushInterface.setAlias(con, 0, loginBean.getData().getUname());
|
||||
appInfoBean.setStatus("0");
|
||||
appInfoBean.setUserPhone(String.valueOf(input_phone.getText()));
|
||||
ur.postAppInfo(appInfoBean, "post");
|
||||
UiAuxiliary.homeRequest("登录成功");
|
||||
finish();
|
||||
} else {
|
||||
appInfoBean.setStatus("1");
|
||||
appInfoBean.setUserPhone(String.valueOf(input_phone.getText()));
|
||||
ur.postAppInfo(appInfoBean, "post");
|
||||
Toast.makeText(con, loginBean.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(LOGIN_RESULT);
|
||||
}
|
||||
break;
|
||||
|
||||
case RequsetCodeConstants.ERROR:
|
||||
if (customDialog != null && customDialog.isShowing())
|
||||
customDialog.dismiss();
|
||||
btn_login.setEnabled(true);
|
||||
btn_login.setBackgroundResource(R.drawable.bg_btn);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -118,8 +150,7 @@ public class LoginActivity extends BaseActivity {
|
||||
input_phone = findViewById(R.id.input_phone);
|
||||
input_code = findViewById(R.id.input_code);
|
||||
getCode = findViewById(R.id.getCode);
|
||||
agree_btn = findViewById(R.id.agree_btn);
|
||||
no_btn = findViewById(R.id.no_btn);
|
||||
cb = findViewById(R.id.cb);
|
||||
ur = new UserRequset(con, hd);
|
||||
initView(null);
|
||||
}
|
||||
@@ -132,21 +163,18 @@ public class LoginActivity extends BaseActivity {
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
agree_btn.setOnClickListener(v -> {
|
||||
agree_btn.setVisibility(View.GONE);
|
||||
no_btn.setVisibility(View.VISIBLE);
|
||||
key = false;
|
||||
cb.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
if (isChecked) {
|
||||
key = true;
|
||||
} else {
|
||||
key = false;
|
||||
}
|
||||
});
|
||||
no_btn.setOnClickListener(v -> {
|
||||
agree_btn.setVisibility(View.VISIBLE);
|
||||
no_btn.setVisibility(View.GONE);
|
||||
key = true;
|
||||
|
||||
});
|
||||
ConfigBean cb = ConfigParts.getConfigParts(con);
|
||||
if (cb != null) {
|
||||
url1 = cb.getData().getUserUrl();
|
||||
url2 = "https://agreement.dahehuoyun.com/huawei/#/private";
|
||||
url1 = "https://agreement.dahehuoyun.com/#/user";
|
||||
url2 = "https://agreement.dahehuoyun.com/currency/#/";
|
||||
}
|
||||
TextView tv_content = findViewById(R.id.tv_content);
|
||||
String str = "我已阅读并同意相关服务条款和隐私政策《用户服务协议》和《隐私政策》";
|
||||
@@ -159,7 +187,7 @@ public class LoginActivity extends BaseActivity {
|
||||
public void onClick(View widget) {
|
||||
Log.e("-用户服务协议-", url1);
|
||||
//用户服务协议点击事件
|
||||
Intent in = new Intent(con, WebActivity.class);
|
||||
Intent in = new Intent(con, WebOnlyOneActivity.class);
|
||||
in.putExtra("title", "用户服务协议");
|
||||
in.putExtra("url", url1);
|
||||
startActivity(in);
|
||||
@@ -179,7 +207,7 @@ public class LoginActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View widget) {
|
||||
//隐私协议点击事件
|
||||
Intent in = new Intent(con, WebActivity.class);
|
||||
Intent in = new Intent(con, WebOnlyOneActivity.class);
|
||||
in.putExtra("title", "隐私政策");
|
||||
in.putExtra("url", url2);
|
||||
startActivity(in);
|
||||
@@ -214,12 +242,16 @@ public class LoginActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
});
|
||||
btn_login.setOnClickListener(v -> {
|
||||
btn_login.setOnClickListener(new OnLimitClickHelper(v -> {
|
||||
String phone = String.valueOf(input_phone.getText());
|
||||
String code = String.valueOf(input_code.getText());
|
||||
Log.e("--code--", code);
|
||||
if (judgeFormat(phone, code)) {
|
||||
if (key) {
|
||||
btn_login.setEnabled(false);
|
||||
btn_login.setBackgroundResource(R.drawable.bg_btn_gray);
|
||||
customDialog = new CustomDialog(con, "登陆中...");
|
||||
customDialog.show();
|
||||
LoginRegInputBean lb = new LoginRegInputBean();
|
||||
lb.setRoleId(4);
|
||||
lb.setUname(phone);
|
||||
@@ -231,7 +263,7 @@ public class LoginActivity extends BaseActivity {
|
||||
Toast.makeText(con, "请先同意用户协议和隐私政策", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
auto_login.setOnClickListener(v -> {
|
||||
JVerificationInterface.getToken(con, 20000, (i, s, s1) -> {
|
||||
JVerifyUIConfig uiConfig = new JVerifyUIConfig.Builder()
|
||||
|
||||
@@ -29,10 +29,13 @@ import androidx.cardview.widget.CardView;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
|
||||
import com.alct.mdp.MDPLocationCollectionManager;
|
||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.AppInfoBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.ImageConfig;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.UiAuxiliary;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.business.BusinessActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||
@@ -84,9 +87,6 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
System.out.println("csdf");
|
||||
System.out.println("csdf");
|
||||
System.out.println("csdf");
|
||||
switch (m.what) {
|
||||
case 200:
|
||||
if (CacheGroup.cacheList.get("getImage") != null) {
|
||||
@@ -140,16 +140,17 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
||||
new XPopup.Builder(con)
|
||||
.dismissOnBackPressed(false)
|
||||
.dismissOnTouchOutside(false)
|
||||
.asCustom(new AgreementAlert(con, "https://agreement.dahehuoyun.com/huawei/#/private",
|
||||
"http://agreement.dahehuoyun.com/#/user", hd))
|
||||
.asCustom(new AgreementAlert(con, "https://agreement.dahehuoyun.com/currency/#/",
|
||||
"https://agreement.dahehuoyun.com/#/user", hd))
|
||||
.show();
|
||||
}
|
||||
Glide.with(con)
|
||||
.load(SPUtils.getPreWelPic(this))
|
||||
.placeholder(startImageUrl.getDrawable())
|
||||
.error(R.drawable.welcome_bg_default)
|
||||
.into(startImageUrl);
|
||||
|
||||
if (WelcomeActivity.this!=null&&!WelcomeActivity.this.isFinishing()){
|
||||
Glide.with(con)
|
||||
.load(SPUtils.getPreWelPic(this))
|
||||
.placeholder(startImageUrl.getDrawable())
|
||||
.error(R.drawable.welcome_bg_default)
|
||||
.into(startImageUrl);
|
||||
}
|
||||
//SystemUtil.get
|
||||
}
|
||||
|
||||
@@ -161,6 +162,16 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
||||
initRequest();
|
||||
}
|
||||
}, 1000);
|
||||
AppInfoBean appInfoBean = new AppInfoBean();
|
||||
|
||||
if (!UiAuxiliary.isLogin(con)) {
|
||||
ur.postAppInfo(appInfoBean, "post");
|
||||
}else{
|
||||
String sp = SPUtil.getSP(con, LoginActivity.USER, LoginActivity.USER_UNAME);
|
||||
appInfoBean.setUserPhone(sp);
|
||||
appInfoBean.setStatus("0");
|
||||
ur.postAppInfo(appInfoBean, "post");
|
||||
}
|
||||
|
||||
// String[] permissions=new String[]{
|
||||
// Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
@@ -282,10 +293,12 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
||||
|
||||
public void cdWelcome(String url) {
|
||||
if (!"".equals(url)) {
|
||||
Glide.with(con).load(url)
|
||||
.placeholder(startImageUrl.getDrawable())
|
||||
.error(R.drawable.welcome_bg_default)
|
||||
.into(startImageUrl);
|
||||
if (WelcomeActivity.this!=null&&!WelcomeActivity.this.isFinishing()){
|
||||
Glide.with(con).load(url)
|
||||
.placeholder(startImageUrl.getDrawable())
|
||||
.error(R.drawable.welcome_bg_default)
|
||||
.into(startImageUrl);
|
||||
}
|
||||
}
|
||||
SPUtils.setPreWelPic(this, url);
|
||||
cd_view.setVisibility(View.VISIBLE);
|
||||
@@ -310,8 +323,12 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
||||
}, cd * 1000);
|
||||
}
|
||||
|
||||
String keys = "f9d35b1133cff1f6e3960c89b249e03f";
|
||||
String license = "eQQm7gCZPF58Cy4i9OGkqSdFdDnFF0VSUVpw92WcrNLx7zVbpGJwjQhnKL8b0piApIbOTog5log/S1ZIxoUQogueaG84BQlJfRwKjtvpVWImlmhthQyQd2ogRqGkm3rkVGeG9wK49fzP3g5AtghNF05je2rQWd/Tyy/wutXq0e0rvR/bEckFaZ4BesQaYd0MejFC3lA8BjxNWiuvCKs15e1aRUOU5vwN5wsaTsTHokBIYhioSxOoGgHn6NrX6K9Dsl9uTWZ2dOVK/jEzYsNt6E/1Ww2ck1XmIWdRCQNmCpgikuPT0ACAL/w7UaRoWzM/Pm+akWqyp+bEavHT1Vhug3HAHOSGfOghGw2NerNlyEg8h6cVneMx+TsidnQ0ZG29aqdcLBRsvi26BYJJCA8+0WXjT+73RhS8g97Rfb6h0/W//5Az8UNZ6dp6XvUi2EJXQRhY5hkHiuwWT2W1ik+6wiiURkkrBACKbO1kmZWbVpRIe3Y3pcr3Q/V+oAcyPHRXCxu+JIe/j40/epuRrCyf8yvKsZ2Dnkl4QQmlwNqlW1F/arS+19G6zOG+6VKwtbI01A1R9SU1TYOA5UL/Qpo6Gyi3Ec3/irgQlzkq1rZrOIS4oo6tghul/zcG8rjno3luqHYwIZf8vAVfpwBesIVcANCOIuTRPU3A8vdmUoK/twGIchPapmjlAzLhjZ4KoAbNeMsWu3sN6kF44xofLMghos2X8OtvUA9CMD37v2FpYoM75qavyoivsBAbb6mG0p5TmkZ37BxfaGGP6SYrCa9ygQ==";
|
||||
// String keys = "f9d35b1133cff1f6e3960c89b249e03f";
|
||||
// String license = "eQQm7gCZPF58Cy4i9OGkqSdFdDnFF0VSUVpw92WcrNLx7zVbpGJwjQhnKL8b0piApIbOTog5log/S1ZIxoUQogueaG84BQlJfRwKjtvpVWImlmhthQyQd2ogRqGkm3rkVGeG9wK49fzP3g5AtghNF05je2rQWd/Tyy/wutXq0e0rvR/bEckFaZ4BesQaYd0MejFC3lA8BjxNWiuvCKs15e1aRUOU5vwN5wsaTsTHokBIYhioSxOoGgHn6NrX6K9Dsl9uTWZ2dOVK/jEzYsNt6E/1Ww2ck1XmIWdRCQNmCpgikuPT0ACAL/w7UaRoWzM/Pm+akWqyp+bEavHT1Vhug3HAHOSGfOghGw2NerNlyEg8h6cVneMx+TsidnQ0ZG29aqdcLBRsvi26BYJJCA8+0WXjT+73RhS8g97Rfb6h0/W//5Az8UNZ6dp6XvUi2EJXQRhY5hkHiuwWT2W1ik+6wiiURkkrBACKbO1kmZWbVpRIe3Y3pcr3Q/V+oAcyPHRXCxu+JIe/j40/epuRrCyf8yvKsZ2Dnkl4QQmlwNqlW1F/arS+19G6zOG+6VKwtbI01A1R9SU1TYOA5UL/Qpo6Gyi3Ec3/irgQlzkq1rZrOIS4oo6tghul/zcG8rjno3luqHYwIZf8vAVfpwBesIVcANCOIuTRPU3A8vdmUoK/twGIchPapmjlAzLhjZ4KoAbNeMsWu3sN6kF44xofLMghos2X8OtvUA9CMD37v2FpYoM75qavyoivsBAbb6mG0p5TmkZ37BxfaGGP6SYrCa9ygQ==";
|
||||
|
||||
String keys = "19ac0aa74338e487e45057faf7212401";
|
||||
String license = "HF41uGxM/1i3CtW98DimoA97BlNTAnQ+DiEAihYmZ2jR1jqC4be253joEJbOJgFDIzp5aIoeuXSWWHFaDVfaHL2Pksbq5f8M8EqsVhP9q/i1xGYSYf6MJVlHdMAVLWgR0Kra+n8dVzkSDuZeyJuDsskAmZaGFQN1CqnWYCI1tmV1Tk4A57e9LQMed0U11QWjdshdU2DGqBXKmGE419PdW3NmIxOR2u9iB1OKBmvzCUT8RAYyBzSn/yhU++YJ25g5a8Pb5kOvi+eOh+PEFEcQL6oOp/CF4Iw5nadlsLhc+XEnVJpwL2myZBoSlVcKxrJKbRn1/DIgXBueKKnqhyHKdJlpqI9eghAlRF0p2Q4f23m89mWRZf4nhKzTeXGIjCTFO4TNVucrlGU7tyJcrRCDVdfV24fziH+hB3QGckpuYzzjefr7hZalLRJ/w8dPw/8dCY1wnWq3AJ3zw2g1PzMxl51q7AgdKvwc1ERcGBns0zb8PK6vGKCnJq3uHiJEnslbTI0MEosje+h+OPO7hf2QofErewjI19wHEOv4dTvuFLh3VmGFMObAmov5kI47705fjSxCvAPGATBrfUSwim+5EQ1hanc5IcXe0/nOTiRUNEpZ+x65zVydqAs7490yqQiIUQvPazEwcal7vH2OD54lCcgpxKxqdmGc5/bp5UnqB45+n+iuInV/Q9DMOQVk15uaVZmhS8VaCqH21CmfH/ZGLb9wiEpaRLrPZLKX3bK7MT9Z0/OlDnb2QUKU8LMMIhLuQQntzsf0Wn4kA/0e9QAJJQ==";
|
||||
|
||||
|
||||
public void init() {
|
||||
String state = SPUtil.getSP(con, "state_data", "authorization_state");
|
||||
@@ -325,12 +342,12 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
||||
//安联初始化
|
||||
if (context.getPackageName().equals(getCurrentProcessName(context))) {
|
||||
//Log.e("--使用的测试环境--",BuildConfig.OPEN_API_URL);
|
||||
MDPLocationCollectionManager.initialize(getApplicationContext(), "https://oapi.alct56.com");
|
||||
MDPLocationCollectionManager.initialize(getApplicationContext(), BuildConfig.OPEN_AL_URL);
|
||||
}
|
||||
//在使用SDK各组件之前初始化context信息,传入ApplicationContext
|
||||
// 路由初始化
|
||||
JVerificationInterface.setDebugMode(true);
|
||||
JVerificationInterface.init(con, 5000, (code, msg) -> Log.d("tag", "code = " + code + " msg = " + msg));
|
||||
// JVerificationInterface.setDebugMode(true);
|
||||
// JVerificationInterface.init(con, 5000, (code, msg) -> Log.d("tag", "code = " + code + " msg = " + msg));
|
||||
//友盟
|
||||
//设置非debug版本开启
|
||||
if (!isDebugVersion(con)) {
|
||||
|
||||
@@ -17,14 +17,19 @@ import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.UpAppBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.RefreshCarListEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.StartOrderParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.alert.UpAppAlert;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.business.BusinessActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.ImageLoader;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
|
||||
@@ -47,6 +52,7 @@ import com.permissionx.guolindev.PermissionX;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -63,35 +69,54 @@ public class MyFragment extends BaseFragment {
|
||||
private UserBean userBean;
|
||||
private StartOrderBean sob;
|
||||
private CarListBean clb;
|
||||
private Gson gson=new Gson();
|
||||
private Gson gson = new Gson();
|
||||
private UserRequset ur;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
switch (m.what){
|
||||
switch (m.what) {
|
||||
case 200:
|
||||
refreshLayout.finishRefresh();
|
||||
if(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_LIST)!=null){
|
||||
clb=gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_LIST),CarListBean.class);
|
||||
if(clb.getCode()==200){
|
||||
if (CacheGroup.cacheList.get(WoDeFragment.VEHICLE_LIST) != null) {
|
||||
clb = gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_LIST), CarListBean.class);
|
||||
if (clb.getCode() == 200) {
|
||||
initVehicleList(true);
|
||||
}else{
|
||||
Toast.makeText(con,clb.getRes(),Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
Toast.makeText(con, clb.getRes(), Toast.LENGTH_LONG).show();
|
||||
initVehicleList(false);
|
||||
}
|
||||
CacheGroup.cacheList.remove(WoDeFragment.VEHICLE_LIST);
|
||||
}
|
||||
if (CacheGroup.cacheList.get("userdata")!=null){
|
||||
userBean=gson.fromJson(CacheGroup.cacheList.get("userdata"), UserBean.class);
|
||||
if(userBean.getCode()==200 ){
|
||||
SPUtil.insSP(con,"data","userdata",CacheGroup.cacheList.get("userdata"));
|
||||
if (CacheGroup.cacheList.get("userdata") != null) {
|
||||
userBean = gson.fromJson(CacheGroup.cacheList.get("userdata"), UserBean.class);
|
||||
if (userBean.getCode() == 200) {
|
||||
SPUtil.insSP(con, "data", "userdata", CacheGroup.cacheList.get("userdata"));
|
||||
initAuth();
|
||||
}else{
|
||||
Toast.makeText(con,userBean.getMsg(),Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(con, userBean.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("userdata");
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("up_app") != null) {
|
||||
Log.e("up_app", CacheGroup.cacheList.get("up_app"));
|
||||
UpAppBean uab = new Gson().fromJson(CacheGroup.cacheList.get("up_app"), UpAppBean.class);
|
||||
if (uab.getCode() == 200) {
|
||||
if (uab.getData() != null) {
|
||||
new XPopup.Builder(con)
|
||||
.dismissOnBackPressed(false)
|
||||
.dismissOnTouchOutside(false)
|
||||
.asCustom(new UpAppAlert(con, uab.getData().getDownloadUrl(), uab.getData().getContent(), uab.getData().getVersion(), uab.getData().getForce()))
|
||||
.show();
|
||||
}else{
|
||||
Toast.makeText(con, "当前已经是最新版本", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(con, uab.getMsg(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("up_app");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -100,12 +125,12 @@ public class MyFragment extends BaseFragment {
|
||||
@org.jetbrains.annotations.Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable @org.jetbrains.annotations.Nullable ViewGroup container, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
|
||||
root=inflater.inflate(R.layout.fragment_my,container,false);
|
||||
con=root.getContext();
|
||||
brv=root.findViewById(R.id.rv);
|
||||
root = inflater.inflate(R.layout.fragment_my, container, false);
|
||||
con = root.getContext();
|
||||
brv = root.findViewById(R.id.rv);
|
||||
EventBus.getDefault().register(this);
|
||||
userBean= UserParts.getUser(con);
|
||||
ur=new UserRequset(con,hd);
|
||||
userBean = UserParts.getUser(con);
|
||||
ur = new UserRequset(con, hd);
|
||||
getRequest();
|
||||
initId();
|
||||
initRefreshLoad();
|
||||
@@ -114,7 +139,7 @@ public class MyFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
public void initRefreshLoad() {
|
||||
refreshLayout =root.findViewById(R.id.srl);
|
||||
refreshLayout = root.findViewById(R.id.srl);
|
||||
refreshLayout.setOnRefreshListener(refreshLayout -> {
|
||||
getRequest();
|
||||
});
|
||||
@@ -123,7 +148,7 @@ public class MyFragment extends BaseFragment {
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
brv_vehicle=root.findViewById(R.id.brv_vehicle);
|
||||
brv_vehicle = root.findViewById(R.id.brv_vehicle);
|
||||
ur.vehicleList("1");
|
||||
}
|
||||
|
||||
@@ -131,83 +156,85 @@ public class MyFragment extends BaseFragment {
|
||||
//执行中订单
|
||||
|
||||
//车辆信息
|
||||
public void initVehicleList(boolean isSuccess){
|
||||
public void initVehicleList(boolean isSuccess) {
|
||||
//车辆信息
|
||||
List<ManyBean> list_vehicle=new ArrayList<>();
|
||||
List<ManyBean> list_vehicle = new ArrayList<>();
|
||||
for (CarListBean.DataDTO datum : clb.getData()) {
|
||||
list_vehicle.add(new ManyBean(datum,R.layout.my_item_vehicle));
|
||||
list_vehicle.add(new ManyBean(datum, R.layout.my_item_vehicle));
|
||||
}
|
||||
if(list_vehicle.size()==0){
|
||||
list_vehicle.add(new ManyBean(new Model(),R.layout.my_item_vehicle_null));
|
||||
if (list_vehicle.size() == 0) {
|
||||
list_vehicle.add(new ManyBean(new Model(), R.layout.my_item_vehicle_null));
|
||||
}
|
||||
brv_vehicle.creates(con,list_vehicle).setOnItemViewListener((position, o, v, layout) -> {
|
||||
switch (layout){
|
||||
brv_vehicle.creates(con, list_vehicle).setOnItemViewListener((position, o, v, layout) -> {
|
||||
switch (layout) {
|
||||
case R.layout.my_item_vehicle:
|
||||
CarListBean.DataDTO cd= (CarListBean.DataDTO) o;
|
||||
View br=v.findViewById(R.id.br);
|
||||
if(position==(clb.getData().size()-1) && position!=2){
|
||||
LinearLayout add_box=v.findViewById(R.id.add_box);
|
||||
TextView add_no=v.findViewById(R.id.add_no);
|
||||
CarListBean.DataDTO cd = (CarListBean.DataDTO) o;
|
||||
View br = v.findViewById(R.id.br);
|
||||
if (position == (clb.getData().size() - 1) && position != 2) {
|
||||
LinearLayout add_box = v.findViewById(R.id.add_box);
|
||||
TextView add_no = v.findViewById(R.id.add_no);
|
||||
add_no.setVisibility(View.GONE);
|
||||
add_box.setVisibility(View.VISIBLE);
|
||||
br.setVisibility(View.GONE);
|
||||
add_box.setOnClickListener(v1 -> {
|
||||
Intent in=new Intent(con, VehicleAuthActivity.class);
|
||||
in.putExtra("carId","");
|
||||
Intent in = new Intent(con, VehicleAuthActivity.class);
|
||||
in.putExtra("carId", "");
|
||||
startActivity(in);
|
||||
});
|
||||
}
|
||||
v.setOnClickListener(v1 -> {
|
||||
Intent in=new Intent(con, VehicleAuthActivity.class);
|
||||
in.putExtra("carId",cd.getCarId());
|
||||
Intent in = new Intent(con, VehicleAuthActivity.class);
|
||||
in.putExtra("carId", cd.getCarId());
|
||||
startActivity(in);
|
||||
});
|
||||
break;
|
||||
case R.layout.my_item_vehicle_null:
|
||||
v.setOnClickListener(v12 -> {
|
||||
Intent in=new Intent(con, VehicleAuthActivity.class);
|
||||
in.putExtra("carId","");
|
||||
Intent in = new Intent(con, VehicleAuthActivity.class);
|
||||
in.putExtra("carId", "");
|
||||
startActivity(in);
|
||||
});
|
||||
break;
|
||||
default:break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
class Model{ }
|
||||
class Model {
|
||||
}
|
||||
|
||||
public void getRequest(){
|
||||
sob= StartOrderParts.getStartOrder(con);
|
||||
public void getRequest() {
|
||||
sob = StartOrderParts.getStartOrder(con);
|
||||
ur.User();
|
||||
ur.vehicleList("1");
|
||||
}
|
||||
|
||||
private LinearLayout onGetUser,onAllOrder,onAuth,onDriverHome;
|
||||
private ImageView onContact,onOpinion,onUpdate,onSetUp;
|
||||
private TextView name,phone;
|
||||
private ImageView dang_auth,no_auth,name_auth;
|
||||
private LinearLayout onGetUser, onAllOrder, onAuth, onDriverHome;
|
||||
private ImageView onContact, onOpinion, onUpdate, onSetUp;
|
||||
private TextView name, phone;
|
||||
private ImageView dang_auth, no_auth, name_auth;
|
||||
private LinearLayout auth_box;
|
||||
private ImageView img_head;
|
||||
|
||||
public void initId(){
|
||||
public void initId() {
|
||||
//
|
||||
name=root.findViewById(R.id.name);
|
||||
phone=root.findViewById(R.id.phone);
|
||||
dang_auth=root.findViewById(R.id.dang_auth);
|
||||
no_auth=root.findViewById(R.id.no_auth);
|
||||
name_auth=root.findViewById(R.id.name_auth);
|
||||
auth_box=root.findViewById(R.id.auth_box);
|
||||
name = root.findViewById(R.id.name);
|
||||
phone = root.findViewById(R.id.phone);
|
||||
dang_auth = root.findViewById(R.id.dang_auth);
|
||||
no_auth = root.findViewById(R.id.no_auth);
|
||||
name_auth = root.findViewById(R.id.name_auth);
|
||||
auth_box = root.findViewById(R.id.auth_box);
|
||||
//
|
||||
onGetUser=root.findViewById(R.id.onGetUser);
|
||||
onAllOrder=root.findViewById(R.id.onAllOrder);
|
||||
onAuth=root.findViewById(R.id.onAuth);
|
||||
onDriverHome=root.findViewById(R.id.onDriverHome);
|
||||
onContact=root.findViewById(R.id.onContact);
|
||||
onOpinion=root.findViewById(R.id.onOpinion);
|
||||
onUpdate=root.findViewById(R.id.onUpdate);
|
||||
onSetUp=root.findViewById(R.id.onSetUp);
|
||||
img_head=root.findViewById(R.id.img_head);
|
||||
onGetUser = root.findViewById(R.id.onGetUser);
|
||||
onAllOrder = root.findViewById(R.id.onAllOrder);
|
||||
onAuth = root.findViewById(R.id.onAuth);
|
||||
onDriverHome = root.findViewById(R.id.onDriverHome);
|
||||
onContact = root.findViewById(R.id.onContact);
|
||||
onOpinion = root.findViewById(R.id.onOpinion);
|
||||
onUpdate = root.findViewById(R.id.onUpdate);
|
||||
onSetUp = root.findViewById(R.id.onSetUp);
|
||||
img_head = root.findViewById(R.id.img_head);
|
||||
//认证
|
||||
no_auth.setOnClickListener(v -> startActivity(new Intent(con, PersonalAuthActivity.class)));
|
||||
//用户信息
|
||||
@@ -222,27 +249,27 @@ public class MyFragment extends BaseFragment {
|
||||
.permissions(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
Intent in=new Intent(con, BusinessActivity.class);
|
||||
in.putExtra("type","餐饮");
|
||||
Intent in = new Intent(con, BusinessActivity.class);
|
||||
in.putExtra("type", "餐饮");
|
||||
startActivity(in);
|
||||
} else {
|
||||
Toast.makeText(getContext(),"请先开启定位权限",Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(getContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
//联系我们
|
||||
onContact.setOnClickListener(v -> {
|
||||
String serviceMobile="";
|
||||
if(ConfigParts.getConfigParts(con)!=null){
|
||||
serviceMobile=ConfigParts.getConfigParts(con).getData().getServiceMobile();
|
||||
serviceMobile=StringUtil.isNull(serviceMobile,"");
|
||||
String serviceMobile = "";
|
||||
if (ConfigParts.getConfigParts(con) != null) {
|
||||
serviceMobile = ConfigParts.getConfigParts(con).getData().getServiceMobile();
|
||||
serviceMobile = StringUtil.isNull(serviceMobile, "");
|
||||
}
|
||||
String[] title={"平台客服:"+serviceMobile};
|
||||
String[] value={serviceMobile};
|
||||
String[] title = {"平台客服:" + serviceMobile};
|
||||
String[] value = {serviceMobile};
|
||||
new XPopup.Builder(con)
|
||||
.isDarkTheme(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asCenterList("请选择",title,
|
||||
.asCenterList("请选择", title,
|
||||
(position1, text) -> {
|
||||
Intent intent = new Intent(Intent.ACTION_DIAL);
|
||||
Uri data = Uri.parse("tel:" + value[position1]);
|
||||
@@ -253,54 +280,85 @@ public class MyFragment extends BaseFragment {
|
||||
});
|
||||
//咨询建议
|
||||
onOpinion.setOnClickListener(v -> {
|
||||
Intent in=new Intent(con, WebActivity.class);
|
||||
in.putExtra("title","咨询建议");
|
||||
in.putExtra("url","");
|
||||
Intent in = new Intent(con, WebActivity.class);
|
||||
in.putExtra("title", "咨询建议");
|
||||
in.putExtra("url", "");
|
||||
startActivity(in);
|
||||
});
|
||||
//检查更新
|
||||
onUpdate.setOnClickListener(v -> Toast.makeText(con,"当前已经是最新版本",Toast.LENGTH_LONG).show());
|
||||
onUpdate.setOnClickListener(v -> {
|
||||
ur.upApp();
|
||||
}
|
||||
);
|
||||
//系统设置
|
||||
onSetUp.setOnClickListener(v -> startActivity(new Intent(con, SetupActivity.class)));
|
||||
}
|
||||
|
||||
public void initAuth(){
|
||||
if(userBean.getData()!=null){
|
||||
name.setText(StringUtil.isNull(userBean.getData().getUname(),"未实名"));
|
||||
phone.setText(StringUtil.isNull(userBean.getData().getRname(),""));
|
||||
if(2==userBean.getData().getPartyMemberStatus()){
|
||||
public void initAuth() {
|
||||
if (userBean.getData() != null) {
|
||||
name.setText(StringUtil.isNull(userBean.getData().getUname(), "未实名"));
|
||||
phone.setText(StringUtil.isNull(userBean.getData().getRname(), ""));
|
||||
if (2 == userBean.getData().getPartyMemberStatus()) {
|
||||
|
||||
}
|
||||
if("1".equals(userBean.getData().getRealAuthentication())){
|
||||
if ("1".equals(userBean.getData().getRealAuthentication())) {
|
||||
|
||||
}else{
|
||||
} else {
|
||||
|
||||
}
|
||||
if (!"".equals(userBean.getData().getHeadportraitUrl())){
|
||||
Glide.with(con).load(userBean.getData().getHeadportraitUrl()).into(img_head);
|
||||
if (!"".equals(userBean.getData().getHeadportraitUrl())) {
|
||||
ImageLoader.getInstance().loadImage(con,userBean.getData().getHeadportraitUrl(),img_head);
|
||||
}
|
||||
if(userBean!=null && 100003==userBean.getData().getAuditStatus()){
|
||||
auth_box.setVisibility(View.GONE);
|
||||
no_auth.setVisibility(View.GONE);
|
||||
}else{
|
||||
auth_box.setVisibility(View.GONE);
|
||||
no_auth.setVisibility(View.VISIBLE);
|
||||
|
||||
if (userBean != null) {
|
||||
if ("0".equals(userBean.getData().getRealAuthentication())) {
|
||||
no_auth.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
if (100003 == userBean.getData().getAuditStatus()) {
|
||||
no_auth.setVisibility(View.GONE);
|
||||
} else {
|
||||
no_auth.setBackgroundResource(R.mipmap.icon_auth_wsh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if (userBean != null && 100003 == userBean.getData().getAuditStatus()) {
|
||||
// auth_box.setVisibility(View.GONE);
|
||||
// no_auth.setVisibility(View.GONE);
|
||||
// } else {
|
||||
// auth_box.setVisibility(View.GONE);
|
||||
// no_auth.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void processResult(VehicleEvent event) {
|
||||
Log.e("-msg-",event.getMessage());
|
||||
if(!"挂".equals(event.getMessage())) {
|
||||
public void processResult(VehicleEvent event) {
|
||||
Log.e("-msg-", event.getMessage());
|
||||
if (!"挂".equals(event.getMessage())) {
|
||||
ur.vehicleList("1");
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void refreshCarListEvent(RefreshCarListEvent event) {
|
||||
Log.e("-msg-", event.getMessage());
|
||||
ur.vehicleList("1");
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void personResult(PersonEvent home) {
|
||||
Log.e("-res-", home.getMessage());
|
||||
if (ur != null) {
|
||||
ur.User();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
if (ur != null) {
|
||||
ur.User();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import android.widget.Toast;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.web.WebOnlyOneActivity;
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
@@ -35,7 +36,7 @@ public class SetupActivity extends BaseActivity {
|
||||
String url2="";
|
||||
String url3="";
|
||||
String kefu="";
|
||||
private RelativeLayout r1,r2,r3,r4,r5,r6,r7;
|
||||
private RelativeLayout r1,r2,r3,r4,r5,r6,r7,r8;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
@@ -73,8 +74,9 @@ public class SetupActivity extends BaseActivity {
|
||||
ConfigBean cb= ConfigParts.getConfigParts(con);
|
||||
if(cb!=null){
|
||||
// url1=cb.getData().getUserUrl();
|
||||
url1="https://agreement.dahehuoyun.com/huawei/#/private";
|
||||
url2=cb.getData().getPrivateUrl();
|
||||
url1="https://agreement.dahehuoyun.com/rule/serviceAgreement/dist/index.html#/";
|
||||
// url2=cb.getData().getPrivateUrl();
|
||||
url2="https://agreement.dahehuoyun.com/currency/#/";
|
||||
kefu=cb.getData().getServiceMobile();
|
||||
url3=cb.getData().getSecurityUrl();
|
||||
}
|
||||
@@ -85,6 +87,7 @@ public class SetupActivity extends BaseActivity {
|
||||
r5=findViewById(R.id.r5);
|
||||
r6=findViewById(R.id.r6);
|
||||
r7=findViewById(R.id.r7);
|
||||
r8=findViewById(R.id.r8);
|
||||
ur=new UserRequset(con,hd);
|
||||
initView(null);
|
||||
}
|
||||
@@ -92,19 +95,19 @@ public class SetupActivity extends BaseActivity {
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
r1.setOnClickListener(v12 -> {
|
||||
Intent in=new Intent(con,WebActivity.class);
|
||||
Intent in=new Intent(con, WebOnlyOneActivity.class);
|
||||
in.putExtra("title","隐私政策");
|
||||
in.putExtra("url",url2);
|
||||
startActivity(in);
|
||||
});
|
||||
r2.setOnClickListener(v12 -> {
|
||||
Intent in=new Intent(con,WebActivity.class);
|
||||
Intent in=new Intent(con,WebOnlyOneActivity.class);
|
||||
in.putExtra("title","用户协议");
|
||||
in.putExtra("url",url1);
|
||||
startActivity(in);
|
||||
});
|
||||
r3.setOnClickListener(v12 -> {
|
||||
Intent in=new Intent(con,WebActivity.class);
|
||||
Intent in=new Intent(con,WebOnlyOneActivity.class);
|
||||
in.putExtra("title","运输安全责任书");
|
||||
in.putExtra("url",url3);
|
||||
startActivity(in);
|
||||
@@ -118,9 +121,15 @@ public class SetupActivity extends BaseActivity {
|
||||
in.putExtra("url","https://smlt.esign.cn/hmfbZoeeGQqv");
|
||||
startActivity(in);
|
||||
});
|
||||
r8.setOnClickListener(v12 -> {
|
||||
Intent in=new Intent(con,WebOnlyOneActivity.class);
|
||||
in.putExtra("title","交易规则");
|
||||
in.putExtra("url","http://agreement.dahehuoyun.com/rule/transactionRules/dist/index.html#/");
|
||||
startActivity(in);
|
||||
});
|
||||
r6.setOnClickListener(v12 -> {
|
||||
String[] title={"平台客服:"+kefu,"银行客服:95528","技术咨询:13460042961"};
|
||||
String[] value={kefu,"95528","13460042961"};
|
||||
String[] title={"平台客服:"+kefu};
|
||||
String[] value={kefu};
|
||||
new XPopup.Builder(con)
|
||||
.isDarkTheme(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||
import com.zhpan.bannerview.BannerViewPager;
|
||||
import com.zhpan.bannerview.constants.PageStyle;
|
||||
|
||||
@@ -176,8 +177,11 @@ public class WoDeFragment extends BaseFragment {
|
||||
headportraitUrl.setOnClickListener(v1 -> {
|
||||
if(ub.getData().getHeadportraitUrl()!=null && !ub.getData().getHeadportraitUrl().equals("")){
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(headportraitUrl,ub.getData().getHeadportraitUrl(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||
.asImageViewer(headportraitUrl,ub.getData().getHeadportraitUrl(),new SmartGlideImageLoader(R.mipmap.ic_launcher_round))
|
||||
.show();
|
||||
// new XPopup.Builder(con)
|
||||
// .asImageViewer(headportraitUrl,ub.getData().getHeadportraitUrl(), true, -1, -1, 50, false,new CertificatesActivity.ImageLoader())
|
||||
// .show();
|
||||
}else{
|
||||
Intent in=new Intent(con, PersonalAuthActivity.class);
|
||||
startActivity(in);
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.test
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.R
|
||||
import com.kymjs.themvp.view.AppDelegate
|
||||
import kotlinx.android.synthetic.main.activity_get_shangchuan.*
|
||||
|
||||
/**
|
||||
* @ClassName SimpleDelegate
|
||||
* @Author 用户
|
||||
* @Date 2022/9/8 10:05
|
||||
* @Description TODO
|
||||
*/
|
||||
class SimpleDelegate : AppDelegate(){
|
||||
override fun getRootLayoutId() = R.layout.activity_get_shangchuan
|
||||
|
||||
override fun initWidget() {
|
||||
super.initWidget()
|
||||
|
||||
}
|
||||
|
||||
override fun getOptionsMenuId(): Int {
|
||||
image1
|
||||
return super.getOptionsMenuId()
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.test
|
||||
|
||||
import android.os.Bundle
|
||||
import com.arpa.hndahesudintocctmsdriver.R
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import kotlinx.android.synthetic.main.activity_get_shangchuan.*
|
||||
|
||||
/**
|
||||
* @ClassName Texasdfa
|
||||
* @Author 用户
|
||||
* @Date 2022/9/8 10:33
|
||||
* @Description TODO
|
||||
*/
|
||||
class Texasdfa : BaseActivity() {
|
||||
override fun getLayout() = R.layout.activity_get_shangchuan
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
img1
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.test
|
||||
|
||||
import android.os.Bundle
|
||||
import android.os.PersistableBundle
|
||||
import com.kymjs.themvp.presenter.ActivityPresenter
|
||||
|
||||
/**
|
||||
* @ClassName TextMVPActivtity
|
||||
* @Author 用户
|
||||
* @Date 2022/9/8 10:04
|
||||
* @Description TODO
|
||||
*/
|
||||
class TextMVPActivtity : ActivityPresenter<SimpleDelegate>() {
|
||||
override fun getDelegateClass(): Class<SimpleDelegate> {
|
||||
return SimpleDelegate::class.java
|
||||
}
|
||||
|
||||
override fun bindEvenListener() {
|
||||
super.bindEvenListener()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+162
-53
@@ -5,6 +5,7 @@ import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@@ -12,7 +13,18 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.DriverAuthDataBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.AuthRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.my.WoDeFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickHelper;
|
||||
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickListener;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.ImageLoader;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||
@@ -30,6 +42,8 @@ import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
@@ -40,100 +54,166 @@ import java.util.List;
|
||||
* @date 2021/8/26 19:06
|
||||
* @description:
|
||||
*/
|
||||
public class UpBankActivity extends BaseAppCompatActivity {
|
||||
public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClickListener {
|
||||
|
||||
private ImageView up_bank_img;
|
||||
private EditText bank_name,bank_number;
|
||||
private TextView submit;
|
||||
private EditText bank_name, bank_number;
|
||||
private TextView submit, skip;
|
||||
private ImageView return_btn;
|
||||
public GetImageAlert gia=new GetImageAlert();
|
||||
public GetImageAlert gia = new GetImageAlert();
|
||||
String path;
|
||||
private OCRBankBean ib;
|
||||
DriverAuthDataBean dad;
|
||||
|
||||
boolean isAuth = false;
|
||||
private WalletRequest qr;
|
||||
private TextView tp;
|
||||
private String imageId;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
switch (m.what){
|
||||
switch (m.what) {
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
if (CacheGroup.cacheList.get("OCR_BANK")!=null) {
|
||||
ib=new Gson().fromJson(CacheGroup.cacheList.get("OCR_BANK"),OCRBankBean.class);
|
||||
if(ib.getCode()==200){
|
||||
if (CacheGroup.cacheList.get("OCR_BANK") != null) {
|
||||
ib = new Gson().fromJson(CacheGroup.cacheList.get("OCR_BANK"), OCRBankBean.class);
|
||||
customDialog.dismiss();
|
||||
if (ib.getCode() == 200&&ib.getData()!=null) {
|
||||
initView(null);
|
||||
customDialog.dismiss();
|
||||
WalletFragment.isInsBank=true;
|
||||
}else{
|
||||
Toast.makeText(con,ib.getMsg(),Toast.LENGTH_SHORT).show();
|
||||
WalletFragment.isInsBank = true;
|
||||
} else {
|
||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("OCR_BANK");
|
||||
}
|
||||
if(CacheGroup.cacheList.get("insBank")!=null){
|
||||
BaseBean bb=new Gson().fromJson(CacheGroup.cacheList.get("insBank"),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
Toast.makeText(con,"绑定成功",Toast.LENGTH_SHORT).show();
|
||||
|
||||
if (CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA) != null) {
|
||||
dad = new Gson().fromJson(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA), DriverAuthDataBean.class);
|
||||
if (dad.getCode() == 200) {
|
||||
if (dad.getData() != null && !TextUtils.isEmpty(dad.getData().getCardNo())) {
|
||||
isAuth = true;
|
||||
skip.setVisibility(View.GONE);
|
||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||
bank_name.setText(dad.getData().getBankName());
|
||||
bank_number.setText(dad.getData().getCardNo());
|
||||
ImageLoader.getInstance().loadImage(con,dad.getData().getBankImgUrl(),up_bank_img);
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(con, dad.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(WoDeFragment.AUTH_DATA);
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("insBank") != null) {
|
||||
if (customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
BaseBean bb = new Gson().fromJson(CacheGroup.cacheList.get("insBank"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
if (type == 1) {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 1);
|
||||
startActivity(in);
|
||||
}
|
||||
Toast.makeText(con, "绑定成功", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}else{
|
||||
Toast.makeText(con,bb.getMsg(),Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("insBank");
|
||||
}
|
||||
if (CacheGroup.cacheList.get("upload") != null) {
|
||||
UploadBean ub = new Gson().fromJson(CacheGroup.cacheList.get("upload"), UploadBean.class);
|
||||
if (ub.getCode() == 200) {
|
||||
imageId = ub.getData().getId()+"";
|
||||
new OCRRequest().ORCBankZj(con, hd, ub.getData().getUrl());
|
||||
|
||||
} else {
|
||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("upload");
|
||||
}
|
||||
break;
|
||||
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||
customDialog=new CustomDialog(con, "上传识别中...");
|
||||
customDialog = new CustomDialog(con, "上传识别中...");
|
||||
customDialog.show();
|
||||
path = (String) m.obj;
|
||||
new OCRRequest().ORCBank(con,hd,new File(path));
|
||||
|
||||
new AuthRequest().upload(con, hd, new File(path));
|
||||
|
||||
// new OCRRequest().ORCBank(con, hd, new File(path));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private CustomDialog customDialog;
|
||||
|
||||
|
||||
/**
|
||||
* 1:司机注册自动跳转
|
||||
* 0:钱包添加银行卡
|
||||
*/
|
||||
private int type = 0;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
StateStyleUtil.stateTextColor(this);
|
||||
setContentView(R.layout.activity_bank_auth);
|
||||
act=this;
|
||||
con=this;
|
||||
up_bank_img=findViewById(R.id.up_bank_img);
|
||||
bank_name=findViewById(R.id.bank_name);
|
||||
bank_number=findViewById(R.id.bank_number);
|
||||
submit=findViewById(R.id.submit);
|
||||
return_btn=findViewById(R.id.return_btn);
|
||||
qr=new WalletRequest(con,hd);
|
||||
act = this;
|
||||
con = this;
|
||||
Bundle extras = getIntent().getExtras();
|
||||
if (extras != null) {
|
||||
type = getIntent().getExtras().getInt("type");
|
||||
}
|
||||
up_bank_img = findViewById(R.id.up_bank_img);
|
||||
bank_name = findViewById(R.id.bank_name);
|
||||
bank_number = findViewById(R.id.bank_number);
|
||||
submit = findViewById(R.id.submit);
|
||||
skip = findViewById(R.id.skip);
|
||||
return_btn = findViewById(R.id.return_btn);
|
||||
qr = new WalletRequest(con, hd);
|
||||
up_bank_img.setOnClickListener(v -> {
|
||||
gia.showPopueWindow(this);
|
||||
});
|
||||
submit.setOnClickListener(v -> {
|
||||
if(ib!=null){
|
||||
submit();
|
||||
}else{
|
||||
Toast.makeText(con,"请先上传图片",Toast.LENGTH_SHORT).show();
|
||||
if (isAuth) {
|
||||
new XPopup.Builder(con)
|
||||
.asImageViewer(up_bank_img, dad.getData().getBankImgUrl(), new SmartGlideImageLoader(R.mipmap.ic_launcher_round))
|
||||
.show();
|
||||
} else {
|
||||
gia.showPopueWindow(this);
|
||||
}
|
||||
});
|
||||
submit.setOnClickListener(new OnLimitClickHelper(this));
|
||||
skip.setOnClickListener(new OnLimitClickHelper(this));
|
||||
return_btn.setOnClickListener(v -> {
|
||||
finish();
|
||||
});
|
||||
|
||||
if (type == 1) {
|
||||
skip.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
skip.setVisibility(View.GONE);
|
||||
}
|
||||
UserRequset ur = new UserRequset(con, hd);
|
||||
ur.driverAuthData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
bank_name.setText(ib.getData().getBankName());
|
||||
bank_number.setText(ib.getData().getBankCardNumber());
|
||||
Glide.with(con).load(ib.getData().getUrl()).into(up_bank_img);
|
||||
bank_number.setText(ib.getData().getCardNumber());
|
||||
ImageLoader.getInstance().loadImage(con,path,up_bank_img);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 12 && resultCode == RESULT_OK) {
|
||||
path=gia.getFile().getPath();
|
||||
Log.e("图片地址:",path);
|
||||
if (requestCode == 12 && resultCode == RESULT_OK) {
|
||||
path = gia.getFile().getPath();
|
||||
Log.e("图片地址:", path);
|
||||
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) {
|
||||
List<LocalMedia> imgs = PictureSelector.obtainMultipleResult(data);
|
||||
if (imgs != null && imgs.size() > 0) {
|
||||
@@ -143,29 +223,58 @@ public class UpBankActivity extends BaseAppCompatActivity {
|
||||
if (TextUtils.isEmpty(paths)) {
|
||||
paths = image.getPath();
|
||||
}
|
||||
path=paths;
|
||||
Log.e("图片地址:",path);
|
||||
path = paths;
|
||||
Log.e("图片地址:", path);
|
||||
gia.dis();
|
||||
ImageFileCompressUtil.imageFileCompress(con,new File(path),hd);
|
||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void submit(){
|
||||
String bankName=bank_name.getText().toString().trim();
|
||||
String bankNumber=bank_number.getText().toString().trim();
|
||||
if("".equals(bankName) || "".equals(bankNumber)){
|
||||
Toast.makeText(con,"请先补充完整的银行卡信息",Toast.LENGTH_LONG).show();
|
||||
public void submit() {
|
||||
customDialog = new CustomDialog(con, "上传中,请稍后...");
|
||||
customDialog.show();
|
||||
String bankName = bank_name.getText().toString().trim();
|
||||
String bankNumber = bank_number.getText().toString().trim();
|
||||
if ("".equals(bankName) || "".equals(bankNumber)) {
|
||||
Toast.makeText(con, "请先补充完整的银行卡信息", Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
InsBankInputBean ibib =new InsBankInputBean();
|
||||
InsBankInputBean ibib = new InsBankInputBean();
|
||||
ibib.setCardNo(bankNumber);
|
||||
ibib.setCardType(Integer.parseInt(ib.getData().getBankCardType()));
|
||||
// ibib.setCardType(Integer.parseInt(ib.getData().getType()));
|
||||
ibib.setCardType(1);
|
||||
ibib.setBankName(bankName);
|
||||
ibib.setCardUserType(1);
|
||||
ibib.setImageId(ib.getData().getId());
|
||||
Log.e("-res-",new Gson().toJson(ibib));
|
||||
ibib.setImageId(Integer.parseInt(imageId));
|
||||
Log.e("-res-", new Gson().toJson(ibib));
|
||||
qr.insBankCard(ibib);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.submit:
|
||||
if (isAuth) {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 1);
|
||||
startActivity(in);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
if (ib != null) {
|
||||
submit();
|
||||
} else {
|
||||
Toast.makeText(con, "请先上传图片", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
case R.id.skip:
|
||||
new MessageUtils().showSimCenPop(con, "确定跳过银行卡?,可能会导致运费无法结算!", "取消", "确认", () -> {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 1);
|
||||
startActivity(in);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.event.WalletEvent;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
@@ -32,8 +34,11 @@ import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseFragment;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
public class WalletFragment extends BaseFragment{
|
||||
|
||||
public static UserBean userBean;
|
||||
@@ -122,6 +127,7 @@ public class WalletFragment extends BaseFragment{
|
||||
@Override
|
||||
public View onCreateView(@NonNull @NotNull LayoutInflater inflater, @Nullable @org.jetbrains.annotations.Nullable ViewGroup container, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
|
||||
root=inflater.inflate(R.layout.fragmengt_qianbao,container,false);
|
||||
EventBus.getDefault().register(this);
|
||||
dataName2="bcb";
|
||||
con=root.getContext();
|
||||
rv=root.findViewById(R.id.rv);
|
||||
@@ -220,8 +226,8 @@ public class WalletFragment extends BaseFragment{
|
||||
}
|
||||
}
|
||||
|
||||
//初始化银行卡信息
|
||||
public void initBack(){
|
||||
//初始化银行卡信息
|
||||
public void initBack(){
|
||||
if(bcb.getData() !=null && bcb.getData().getRecords()!=null && bcb.getData().getRecords().size()>=1){
|
||||
bank_title_1.setText(bcb.getData().getRecords().get(0).getBankName());
|
||||
bank_number.setText(bcb.getData().getRecords().get(0).getCardNo());
|
||||
@@ -230,20 +236,21 @@ public class WalletFragment extends BaseFragment{
|
||||
bank_remove.setVisibility(View.VISIBLE);
|
||||
} else{
|
||||
bank_number.setVisibility(View.GONE);
|
||||
bank_title_1.setText("未添加银行卡");
|
||||
bank_add.setVisibility(View.VISIBLE);
|
||||
bank_remove.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//初始化电子账户信息
|
||||
public void initContracts(){
|
||||
if(cb.getData()!=null && !StringUtil.isNull(cb.getData().getChildAcctNo(),"").equals("")) {
|
||||
bank_title_2.setText("浦发银行电子账户");
|
||||
bank2_number.setText(cb.getData().getChildAcctNo());
|
||||
bank2_number.setVisibility(View.VISIBLE);
|
||||
bank_add2.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
//初始化电子账户信息
|
||||
public void initContracts(){
|
||||
if(cb.getData()!=null && !StringUtil.isNull(cb.getData().getChildAcctNo(),"").equals("")) {
|
||||
bank_title_2.setText("浦发银行电子账户");
|
||||
bank2_number.setText(cb.getData().getChildAcctNo());
|
||||
bank2_number.setVisibility(View.VISIBLE);
|
||||
bank_add2.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isInsBank=false;
|
||||
|
||||
@@ -315,5 +322,14 @@ public class WalletFragment extends BaseFragment{
|
||||
// .show();
|
||||
// }
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void processResult(WalletEvent event) {
|
||||
Log.e("-msg-", event.getMessage());
|
||||
refreshLayout.autoRefresh();
|
||||
}
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,12 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.net.http.SslError;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.webkit.JavascriptInterface;
|
||||
import android.webkit.SslErrorHandler;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
@@ -81,6 +84,11 @@ public class WebActivity extends BaseActivity {
|
||||
webSettings.setJavaScriptEnabled(true);
|
||||
webSettings.setDomStorageEnabled(true);
|
||||
webSettings.setDefaultTextEncodingName("utf-8");
|
||||
// 特别注意:5.1以上默认禁止了https和http混用,以下方式是开启
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
|
||||
wv.addJavascriptInterface(new JavaScriptObject(con), "webObj");
|
||||
//PaxWebChromeClient chromeClient=new PaxWebChromeClient();
|
||||
//WebView加载web资源
|
||||
@@ -111,6 +119,12 @@ public class WebActivity extends BaseActivity {
|
||||
wv.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
||||
super.onReceivedSslError(view, handler, error);
|
||||
handler.proceed();
|
||||
}
|
||||
});
|
||||
wv.setWebChromeClient(chromeClient);
|
||||
wv.loadUrl(url);
|
||||
@@ -149,6 +163,12 @@ public class WebActivity extends BaseActivity {
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
||||
super.onReceivedSslError(view, handler, error);
|
||||
handler.proceed();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -183,7 +203,8 @@ public class WebActivity extends BaseActivity {
|
||||
|
||||
@JavascriptInterface
|
||||
public String getUserToken(){
|
||||
Log.e("-token-",UserParts.getUser(con).getData().getToken());
|
||||
// Log.e("-token-",UserParts.getUser(con).getData().getToken());
|
||||
// return "woshitoken-androidfasdf";
|
||||
return UserParts.getUser(con).getData().getToken();
|
||||
}
|
||||
|
||||
@@ -191,7 +212,11 @@ public class WebActivity extends BaseActivity {
|
||||
public void isSuccess(){
|
||||
finish();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void isPdfSuccess(){
|
||||
Toast.makeText(con, "签署成功", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,227 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.web;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.net.http.SslError;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.webkit.JavascriptInterface;
|
||||
import android.webkit.SslErrorHandler;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.UserBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PaxWebChromeClient;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
* @date 2021/8/6 16:48
|
||||
* @description:访问webview的activity
|
||||
*/
|
||||
public class WebOnlyOneActivity extends BaseActivity {
|
||||
|
||||
private String url = "";
|
||||
private String title = "";
|
||||
private WebView wv;
|
||||
private TextView title_tv;
|
||||
private PaxWebChromeClient chromeClient;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
StateStyleUtil.stateTextColor(this);
|
||||
setContentView(R.layout.activity_web);
|
||||
con = this;
|
||||
initHardwareAccelerate();
|
||||
wv = findViewById(R.id.wv);
|
||||
title_tv = findViewById(R.id.title);
|
||||
Intent in = getIntent();
|
||||
url = in.getExtras().getString("url");
|
||||
title = in.getExtras().getString("title");
|
||||
chromeClient = new PaxWebChromeClient(this, null, null);
|
||||
if ("咨询建议".equals(title)) {
|
||||
initOpinion();
|
||||
} else {
|
||||
initView(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void initHardwareAccelerate() {
|
||||
try {
|
||||
if (Integer.parseInt(Build.VERSION.SDK) >= 11) {
|
||||
getWindow()
|
||||
.setFlags(
|
||||
android.view.WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
|
||||
android.view.WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint({"JavascriptInterface", "SetJavaScriptEnabled"})
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
WebSettings webSettings = wv.getSettings();
|
||||
//设置网页有缓存的时候也继续读取新的地址
|
||||
webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
|
||||
webSettings.setJavaScriptEnabled(true);
|
||||
webSettings.setDomStorageEnabled(true);
|
||||
webSettings.setDefaultTextEncodingName("utf-8");
|
||||
// 特别注意:5.1以上默认禁止了https和http混用,以下方式是开启
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
|
||||
wv.addJavascriptInterface(new JavaScriptObject(con), "webObj");
|
||||
//PaxWebChromeClient chromeClient=new PaxWebChromeClient();
|
||||
//WebView加载web资源
|
||||
//覆盖WebView默认使用第三方或系统默认浏览器打开网页的行为,使网页用WebView打开
|
||||
wv.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
|
||||
return super.shouldOverrideUrlLoading(view, request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url1) {
|
||||
//返回值是true的时候控制去WebView打开,为false调用系统浏览器或第三方浏览器
|
||||
Log.d("test", "webactivity..url:" + url);
|
||||
// if(!url.startsWith("http"))
|
||||
// {
|
||||
// Log.d("test","非http开头..url:"+url);
|
||||
// Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse(url));
|
||||
// boolean isInstall = getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY).size()>0;
|
||||
// Log.d("test","是否安装要跳转的app:"+isInstall);
|
||||
// if(isInstall)
|
||||
// {
|
||||
// startActivity(intent);
|
||||
// finish();
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
if (!url1.equals(url))
|
||||
return true;
|
||||
wv.loadUrl(url1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
||||
super.onReceivedSslError(view, handler, error);
|
||||
handler.proceed();
|
||||
}
|
||||
});
|
||||
wv.setWebChromeClient(chromeClient);
|
||||
wv.loadUrl(url);
|
||||
title_tv.setText(title);
|
||||
}
|
||||
|
||||
public void initOpinion() {
|
||||
if (findViewById(R.id.return_btn) != null) {
|
||||
findViewById(R.id.return_btn).setOnClickListener(v -> {
|
||||
finish();
|
||||
});
|
||||
}
|
||||
title_tv.setText(title);
|
||||
UserBean ub = UserParts.getUser(con);
|
||||
wv.getSettings().setJavaScriptEnabled(true);
|
||||
wv.getSettings().setDomStorageEnabled(true); // 这个要加上
|
||||
String openid = ub.getData().getUname(); // 用户的openid
|
||||
String nickname = StringUtil.isNull(ub.getData().getRname(), "游客"); // 用户的nickname
|
||||
String headimgurl = StringUtil.isNull(ub.getData().getHeadportraitUrl(), ""); // 用户的头像url
|
||||
|
||||
/* 获得 webview url,请注意url单词是product而不是products,products是旧版本的参数,用错地址将不能成功提交 */
|
||||
String url = "https://support.qq.com/products/335639"; // 把1221数字换成你的产品ID,否则会不成功
|
||||
/* 准备post参数 */
|
||||
String postData = "nickname=" + nickname + "&avatar=" + headimgurl + "&openid=" + openid;
|
||||
wv.postUrl(url, postData.getBytes());
|
||||
wv.setWebChromeClient(chromeClient);
|
||||
wv.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
|
||||
return super.shouldOverrideUrlLoading(view, request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
//返回值是true的时候控制去WebView打开,为false调用系统浏览器或第三方浏览器
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
||||
super.onReceivedSslError(view, handler, error);
|
||||
handler.proceed();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
|
||||
chromeClient.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
public class JavaScriptObject {
|
||||
|
||||
Context mContxt;
|
||||
|
||||
public JavaScriptObject(Context mContxt) {
|
||||
this.mContxt = mContxt;
|
||||
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void getName() {
|
||||
Log.e("eeee-", "name");
|
||||
Toast.makeText(con, "hello", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public String getUserToken() {
|
||||
// Log.e("-token-",UserParts.getUser(con).getData().getToken());
|
||||
// return "woshitoken-androidfasdf";
|
||||
return UserParts.getUser(con).getData().getToken();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void isSuccess() {
|
||||
finish();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void isPdfSuccess() {
|
||||
Toast.makeText(con, "签署成功", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.util;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
||||
import com.arpa.hndahesudintocctmsdriver.bean.StartOrderBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.constant.JTTConstant;
|
||||
import com.arpa.hndahesudintocctmsdriver.parts.StartOrderParts;
|
||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.service.TrackService;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.home.HuoYuanFragmengt;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
import com.dahe.mylibrary.utils.SelectPhotoUtils5;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
/**
|
||||
* @ClassName BillLocationUtils
|
||||
* @Author 用户
|
||||
* @Date 2022/10/17 10:24
|
||||
* @Description TODO
|
||||
*/
|
||||
public class BillLocationUtils {
|
||||
|
||||
private Context con;
|
||||
|
||||
|
||||
private static class SingletonHolder {
|
||||
private static final BillLocationUtils INSTANCE = new BillLocationUtils();
|
||||
}
|
||||
|
||||
private BillLocationUtils() {
|
||||
}
|
||||
|
||||
public static final BillLocationUtils getInstance() {
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private HuoYuanRequset hyr;
|
||||
private UserRequset ur;
|
||||
public void getBillLocation(Context con) {
|
||||
this.con = con;
|
||||
hyr = new HuoYuanRequset(con, hd);
|
||||
ur = new UserRequset(con, hd);
|
||||
//获取执行中的运单
|
||||
hyr.startOrder(0);
|
||||
}
|
||||
|
||||
public Handler hd = new Handler(msg -> {
|
||||
msgMethod(msg);
|
||||
return false;
|
||||
});
|
||||
|
||||
public void msgMethod(Message m) {
|
||||
switch (m.what) {
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
Gson gson = new Gson();
|
||||
// Toast.makeText(con,RequsetCodeConstants.FEEDBACK_TEXT,Toast.LENGTH_SHORT).show();
|
||||
if (CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER) != null) {
|
||||
StartOrderBean sob = gson.fromJson(CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER), StartOrderBean.class);
|
||||
if (sob.getCode() == 200) {
|
||||
if (sob.getData() != null) {
|
||||
SPUtil.insSP(con, JTTConstant.JTT_DATA_NAME, JTTConstant.JTT_DATA_ORDER_KEY, gson.toJson(sob));
|
||||
initStart(sob);
|
||||
StartOrderParts.setStartOrder(con, sob);
|
||||
ur.getJtts(sob.getData().getShippingNoteNumber());
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(con, sob.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(HuoYuanFragmengt.START_ORDER);
|
||||
break;
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("jttRes") != null) {
|
||||
JTT jtt = gson.fromJson(CacheGroup.cacheList.get("jttRes"), JTT.class);
|
||||
if (jtt.getCode() == 200) {
|
||||
SPUtil.insSP(con, "data", "jtt", CacheGroup.cacheList.get("jttRes"));
|
||||
JTTProcess.auth(con);
|
||||
} else {
|
||||
Toast.makeText(con, StringUtil.isNull(jtt.getMsg(), "返回错误"), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("jttRes");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initStart(StartOrderBean sob) {
|
||||
if (sob.getData() != null) {
|
||||
if (sob != null && sob.getData() != null && 0 < sob.getData().getWayChildren().size()) {
|
||||
//order_start.setVisibility(View.VISIBLE);
|
||||
SPUtil.insSP(con, "order", "ShippingNoteNumber", sob.getData().getShippingNoteNumber());
|
||||
Log.e("开始轨迹上传服务", "-----");
|
||||
Intent serviceIn = new Intent(con, TrackService.class);
|
||||
con.startService(serviceIn);
|
||||
} else {
|
||||
SPUtil.insSP(con, "order", "ShippingNoteNumber", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.util
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.MessagePop
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.SimCenterPop
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity
|
||||
import com.lxj.xpopup.XPopup
|
||||
|
||||
/**
|
||||
* @ClassName MessageUtils
|
||||
* @Author 用户
|
||||
* @Date 2023/8/15 09:51
|
||||
* @Description TODO
|
||||
*/
|
||||
class MessageUtils {
|
||||
|
||||
companion object {
|
||||
fun getInstance() = InstanceHelper.sSingle
|
||||
}
|
||||
|
||||
object InstanceHelper {
|
||||
val sSingle = MessageUtils()
|
||||
}
|
||||
|
||||
fun showCenMessage(ctx: Context, message: String) {
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.asCustom(MessagePop(ctx, message).setOnMyItemClickListener(object :
|
||||
MessagePop.OnMyItemClickListener {
|
||||
override fun onItemClick(startTime: String, endTime: String) {
|
||||
}
|
||||
}))
|
||||
.show()
|
||||
}
|
||||
|
||||
fun showCenMessage(ctx: Context, message: String, message2: String) {
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.asCustom(MessagePop(ctx, message, message2).setOnMyItemClickListener(object :
|
||||
MessagePop.OnMyItemClickListener {
|
||||
override fun onItemClick(startTime: String, endTime: String) {
|
||||
}
|
||||
}))
|
||||
.show()
|
||||
}
|
||||
|
||||
fun showSimCenPop(
|
||||
ctx: Context,
|
||||
message: String,
|
||||
titleRight:String = "去注册",
|
||||
onMyItemClickListener: SimCenterPop.OnMyItemClickListener
|
||||
) {
|
||||
|
||||
// XPopup.Builder(ctx) //
|
||||
// .hasNavigationBar(false)
|
||||
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
// .asCustom(SimCenterPop(ctx,message).setOnMyItemClickListener(object : SimCenterPop.OnMyItemClickListener{
|
||||
// override fun onItemClick() {
|
||||
// val intent = Intent(ctx, CertificatesActivity::class.java)
|
||||
// intent.putExtra("index", type)
|
||||
// ctx.startActivity(intent)
|
||||
// }
|
||||
// }))
|
||||
// .show()
|
||||
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.asCustom(SimCenterPop(ctx, message, titleRight = titleRight).setOnMyItemClickListener(onMyItemClickListener))
|
||||
.show()
|
||||
|
||||
}
|
||||
|
||||
fun showSimCenPop(
|
||||
ctx: Context,
|
||||
message: String,
|
||||
left: String,
|
||||
right: String,
|
||||
onMyItemClickListener: SimCenterPop.OnMyItemClickListener
|
||||
) {
|
||||
|
||||
// XPopup.Builder(ctx) //
|
||||
// .hasNavigationBar(false)
|
||||
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
// .asCustom(SimCenterPop(ctx,message).setOnMyItemClickListener(object : SimCenterPop.OnMyItemClickListener{
|
||||
// override fun onItemClick() {
|
||||
// val intent = Intent(ctx, CertificatesActivity::class.java)
|
||||
// intent.putExtra("index", type)
|
||||
// ctx.startActivity(intent)
|
||||
// }
|
||||
// }))
|
||||
// .show()
|
||||
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.dismissOnTouchOutside(false)
|
||||
.asCustom(SimCenterPop(ctx, message,left,right).setOnMyItemClickListener(onMyItemClickListener))
|
||||
.show()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
import com.dahe.mylibrary.utils.TimeUtil;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* @ClassName OneDayShowUtils
|
||||
* @Author john
|
||||
* @Date 2024/9/11 15:33
|
||||
* @Description TODO
|
||||
*/
|
||||
public class OneDayShowUtils {
|
||||
|
||||
private static class SingletonHolder {
|
||||
private static final OneDayShowUtils INSTANCE = new OneDayShowUtils();
|
||||
}
|
||||
|
||||
private OneDayShowUtils() {
|
||||
}
|
||||
|
||||
public static final OneDayShowUtils getInstance() {
|
||||
return OneDayShowUtils.SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ctx
|
||||
* @return true:当天已弹出 false:当天未弹出
|
||||
*/
|
||||
public boolean todayIsShow(Context ctx) {
|
||||
String preday = (String) SPUtils.get(ctx, "PREDAY", "");
|
||||
if (TextUtils.isEmpty(preday)) {
|
||||
String nowString = TimeUtil.getNowString("yyyy-MM-dd");
|
||||
SPUtils.put(ctx, "PREDAY", nowString);
|
||||
return false;
|
||||
} else {
|
||||
boolean today = TimeUtil.isToday(preday, new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()));
|
||||
if (!today) {
|
||||
String nowString = TimeUtil.getNowString("yyyy-MM-dd");
|
||||
SPUtils.put(ctx, "PREDAY", nowString);
|
||||
}
|
||||
return today;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ctx
|
||||
* @return true:当天已弹出 false:当天未弹出
|
||||
*/
|
||||
public boolean todayIsShowQx(Context ctx) {
|
||||
String preday = (String) SPUtils.get(ctx, "permission", "");
|
||||
if (TextUtils.isEmpty(preday)) {
|
||||
String nowString = TimeUtil.getNowString("yyyy-MM-dd");
|
||||
SPUtils.put(ctx, "permission", nowString);
|
||||
return false;
|
||||
} else {
|
||||
boolean today = TimeUtil.isToday(preday, new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()));
|
||||
if (!today) {
|
||||
String nowString = TimeUtil.getNowString("yyyy-MM-dd");
|
||||
SPUtils.put(ctx, "permission", nowString);
|
||||
}
|
||||
return today;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.util
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import androidx.annotation.NonNull
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.MessagePop
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.MyRequestCallback
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.TopMsgPopup
|
||||
import com.arpa.hndahesudintocctmsdriver.cuspop.SimCenterPop
|
||||
import com.lxj.xpopup.XPopup
|
||||
import com.lxj.xpopup.core.BasePopupView
|
||||
import com.permissionx.guolindev.PermissionX
|
||||
import com.permissionx.guolindev.callback.RequestCallback
|
||||
|
||||
/**
|
||||
* @ClassName MessageUtils
|
||||
* @Author 用户
|
||||
* @Date 2023/8/15 09:51
|
||||
* @Description TODO
|
||||
*/
|
||||
class PermissionUtils {
|
||||
|
||||
companion object {
|
||||
fun getInstance() = InstanceHelper.sSingle
|
||||
}
|
||||
|
||||
object InstanceHelper {
|
||||
val sSingle = PermissionUtils()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示权限申请
|
||||
* @param activity AppCompatActivity
|
||||
* @param message String
|
||||
* @param permission List<String>
|
||||
* @param callback RequestCallback
|
||||
* @return BasePopupView?
|
||||
*/
|
||||
fun showPermissionMessage(activity: FragmentActivity,title:String, message: String,vararg permission:String,callback: MyRequestCallback){
|
||||
val show = XPopup.Builder(activity)
|
||||
.hasShadowBg(false)
|
||||
.hasBlurBg(false)
|
||||
.isTouchThrough(true)
|
||||
.isCenterHorizontal(true)
|
||||
.offsetY(140)
|
||||
.asCustom(
|
||||
TopMsgPopup(
|
||||
activity,
|
||||
title,
|
||||
message
|
||||
)
|
||||
)
|
||||
.show()
|
||||
|
||||
PermissionX.init(activity)
|
||||
.permissions(listOf(*permission))
|
||||
.request { allGranted, grantedList, deniedList ->
|
||||
show.dismiss()
|
||||
if (callback!=null){
|
||||
callback.onResult(allGranted,grantedList,deniedList)
|
||||
}
|
||||
}
|
||||
}
|
||||
fun showCenMessage(ctx: Context, message: String, message2: String) {
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.asCustom(MessagePop(ctx, message, message2).setOnMyItemClickListener(object :
|
||||
MessagePop.OnMyItemClickListener {
|
||||
override fun onItemClick(startTime: String, endTime: String) {
|
||||
}
|
||||
}))
|
||||
.show()
|
||||
}
|
||||
|
||||
fun showSimCenPop(
|
||||
ctx: Context,
|
||||
message: String,
|
||||
onMyItemClickListener: SimCenterPop.OnMyItemClickListener
|
||||
) {
|
||||
|
||||
// XPopup.Builder(ctx) //
|
||||
// .hasNavigationBar(false)
|
||||
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
// .asCustom(SimCenterPop(ctx,message).setOnMyItemClickListener(object : SimCenterPop.OnMyItemClickListener{
|
||||
// override fun onItemClick() {
|
||||
// val intent = Intent(ctx, CertificatesActivity::class.java)
|
||||
// intent.putExtra("index", type)
|
||||
// ctx.startActivity(intent)
|
||||
// }
|
||||
// }))
|
||||
// .show()
|
||||
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.asCustom(SimCenterPop(ctx, message).setOnMyItemClickListener(onMyItemClickListener))
|
||||
.show()
|
||||
|
||||
}
|
||||
|
||||
fun showSimCenPop(
|
||||
ctx: Context,
|
||||
message: String,
|
||||
left: String,
|
||||
right: String,
|
||||
onMyItemClickListener: SimCenterPop.OnMyItemClickListener
|
||||
) {
|
||||
|
||||
// XPopup.Builder(ctx) //
|
||||
// .hasNavigationBar(false)
|
||||
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
// .asCustom(SimCenterPop(ctx,message).setOnMyItemClickListener(object : SimCenterPop.OnMyItemClickListener{
|
||||
// override fun onItemClick() {
|
||||
// val intent = Intent(ctx, CertificatesActivity::class.java)
|
||||
// intent.putExtra("index", type)
|
||||
// ctx.startActivity(intent)
|
||||
// }
|
||||
// }))
|
||||
// .show()
|
||||
|
||||
XPopup.Builder(ctx) //
|
||||
.hasNavigationBar(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗对象,推荐设置这个
|
||||
.asCustom(
|
||||
SimCenterPop(ctx, message, left, right).setOnMyItemClickListener(
|
||||
onMyItemClickListener
|
||||
)
|
||||
)
|
||||
.show()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -51,6 +51,9 @@ public class AdapterAlls extends RecyclerView.Adapter<AdapterAlls.ViewHolder> {
|
||||
}
|
||||
|
||||
public void add(List<ManyBean> addMessageList) {
|
||||
if (object==null){
|
||||
return;
|
||||
}
|
||||
//增加数据
|
||||
int position = object.size();
|
||||
object.addAll(position, addMessageList);
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.arpa.hndahesudintocctmsdriver.util.http;
|
||||
import android.content.Context;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.util.app.VersionUtil;
|
||||
import com.dahe.mylibrary.utils.AppUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -41,6 +42,7 @@ public class OkHttpUtil {
|
||||
.post(body)
|
||||
.headers(hb.build())
|
||||
.addHeader("Version", VersionUtil.getVersion(con))
|
||||
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||
//.addHeader("sign",sign)
|
||||
.removeHeader("User-Agent")
|
||||
.addHeader("User-Agent",GetUtil.getUserAgent(con))
|
||||
@@ -71,6 +73,40 @@ public class OkHttpUtil {
|
||||
.addHeader("Authorization", token)
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.addHeader("Version", VersionUtil.getVersion(con))
|
||||
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||
//.addHeader("sign",sign)
|
||||
.removeHeader("User-Agent")
|
||||
.addHeader("User-Agent",GetUtil.getUserAgent(con))
|
||||
.build();
|
||||
return request;
|
||||
}
|
||||
|
||||
public static Request put(OkDate od, Context con){
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
if(od.getMadiaType()!=null && od.getMadiaType().equals("")){
|
||||
od.setMadiaType("{}");
|
||||
}
|
||||
// JSONObject jsonObject = JSON.parseObject(od.getMadiaType());
|
||||
// jsonObject.put("timestamp", DateUtil.current());
|
||||
// jsonObject.put("deviceId", GetUtil.getDeviceId(con));
|
||||
// String sign = SecureUtil.signParamsSha1(jsonObject,SIGN_PASSWORD);
|
||||
// Log.e("jsonObject",jsonObject.toString());
|
||||
// Log.e("sign",sign);
|
||||
// Map<String,Object> map=new HashMap<>();
|
||||
// map.put("data",SecurityUtil.encrypt(jsonObject.toString()));
|
||||
// Log.e("参数1",od.getMadiaType());
|
||||
// Log.e("参数2",MapUtil.mapJson(map));
|
||||
//MapUtil.mapJson(map)
|
||||
RequestBody body = RequestBody.create(mediaType,od.getMadiaType());
|
||||
Headers.Builder hb=new Headers.Builder();
|
||||
hb.add("Content-Type","application/json");
|
||||
hb.add("Cache-Control","no-cache");
|
||||
Request request = new Request.Builder()
|
||||
.url(od.getUrl())
|
||||
.put(body)
|
||||
.headers(hb.build())
|
||||
.addHeader("Version", VersionUtil.getVersion(con))
|
||||
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||
//.addHeader("sign",sign)
|
||||
.removeHeader("User-Agent")
|
||||
.addHeader("User-Agent",GetUtil.getUserAgent(con))
|
||||
@@ -86,6 +122,7 @@ public class OkHttpUtil {
|
||||
.url(od.getUrl())
|
||||
.get()
|
||||
.headers(hb.build())
|
||||
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||
.build();
|
||||
return request;
|
||||
}
|
||||
@@ -99,6 +136,7 @@ public class OkHttpUtil {
|
||||
Request request = new Request.Builder()
|
||||
.url(od.getUrl())
|
||||
.addHeader("Authorization", token)
|
||||
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||
.get()
|
||||
.headers(hb.build())
|
||||
.build();
|
||||
@@ -129,6 +167,7 @@ public class OkHttpUtil {
|
||||
.url(od.getUrl())
|
||||
.method("POST", body)
|
||||
.addHeader("Authorization", token)
|
||||
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||
.addHeader("Cookie", "JSESSIONID=NqpqKQstwceQurcNK5hjl4GnTgiF4eSzZSo5a1rz")
|
||||
.build();
|
||||
return request;
|
||||
@@ -145,23 +184,26 @@ public class OkHttpUtil {
|
||||
.url(od.getUrl())
|
||||
.method("POST", body)
|
||||
.addHeader("Authorization", token)
|
||||
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||
.addHeader("Cookie", "JSESSIONID=NqpqKQstwceQurcNK5hjl4GnTgiF4eSzZSo5a1rz")
|
||||
.build();
|
||||
return request;
|
||||
}
|
||||
|
||||
public static Request postFiles(OkDate od,File file,String token,String carId,String carNum) {
|
||||
public static Request postFiles(OkDate od,File file,String token,String carId,String carNum,boolean isSave) {
|
||||
MediaType mediaType = MediaType.parse("text/plain");
|
||||
RequestBody body = new MultipartBody.Builder()
|
||||
.setType(MultipartBody.FORM)
|
||||
.addFormDataPart("file",file.getPath(),RequestBody.create(MediaType.parse("application/octet-stream"), file))
|
||||
.addFormDataPart("carId",carId)
|
||||
.addFormDataPart("carNum",carNum)
|
||||
.addFormDataPart("isSave",isSave?"0":"1")
|
||||
.build();
|
||||
Request request = new Request.Builder()
|
||||
.url(od.getUrl())
|
||||
.method("POST", body)
|
||||
.addHeader("Authorization", token)
|
||||
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||
.addHeader("Cookie", "JSESSIONID=NqpqKQstwceQurcNK5hjl4GnTgiF4eSzZSo5a1rz")
|
||||
.build();
|
||||
return request;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.util.img;
|
||||
|
||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.provider.Settings;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
@@ -13,6 +18,7 @@ import android.widget.Toast;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
||||
import com.permissionx.guolindev.PermissionX;
|
||||
|
||||
@@ -56,12 +62,17 @@ public class GetCarImageAlert {
|
||||
}
|
||||
btn_xiangce.setOnClickListener(v -> {
|
||||
PermissionX.init(act)
|
||||
.permissions(Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
.permissions(Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
PicturlUtil.selectPicter(act, new ArrayList<>(), 1);
|
||||
} else {
|
||||
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
new MessageUtils().showSimCenPop(act, "缺少媒体和文件权限,将无法选择照片,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
act.startActivity(intent);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -70,13 +81,37 @@ public class GetCarImageAlert {
|
||||
.permissions(Manifest.permission.CAMERA)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
file=ImageGetUtil.createImageFile(act);
|
||||
ImageGetUtil.cameraAlbumGetImage(act,file);
|
||||
openCam(act);
|
||||
// file=ImageGetUtil.createImageFile(act);
|
||||
// ImageGetUtil.cameraAlbumGetImage(act,file);
|
||||
} else {
|
||||
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
new MessageUtils().showSimCenPop(act, "缺少相机权限,将无法进行拍照或选择照片,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
act.startActivity(intent);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
img.setOnClickListener(v -> {
|
||||
if (!key){
|
||||
PermissionX.init(act)
|
||||
.permissions(Manifest.permission.CAMERA)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
openCam(act);
|
||||
} else {
|
||||
new MessageUtils().showSimCenPop(act, "缺少相机权限,将无法进行拍照或选择照片,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
act.startActivity(intent);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
btn_quxiao.setOnClickListener(v -> popupWindow.dismiss());
|
||||
//popupWindow消失屏幕变为不透明
|
||||
popupWindow.setOnDismissListener(() -> {
|
||||
@@ -99,4 +134,13 @@ public class GetCarImageAlert {
|
||||
popupWindow.dismiss();
|
||||
}
|
||||
|
||||
private void openCam(AppCompatActivity act){
|
||||
file=ImageGetUtil.createImageFile(act);
|
||||
if (file!=null){
|
||||
ImageGetUtil.cameraAlbumGetImage(act,file);
|
||||
}else{
|
||||
Toast.makeText(act.getBaseContext(), "路径创建失败,请清除缓存后重试", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.util.img;
|
||||
|
||||
import static com.sdk.base.framework.utils.app.AppUtils.getPackageName;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.provider.Settings;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
@@ -10,6 +15,7 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.permissionx.guolindev.PermissionX;
|
||||
@@ -45,25 +51,37 @@ public class GetImageAlert {
|
||||
|
||||
btn_xiangce.setOnClickListener(v -> {
|
||||
PermissionX.init(act)
|
||||
.permissions(Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
.permissions(Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.CAMERA)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
PicturlUtil.selectPicter(act, new ArrayList<>(), 1);
|
||||
} else {
|
||||
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
new MessageUtils().showSimCenPop(act, "缺少相机,媒体权限,将无法为您提供服务,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
act.startActivity(intent);
|
||||
});
|
||||
// Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
btn_paizhao.setOnClickListener(v -> {
|
||||
|
||||
PermissionX.init(act)
|
||||
.permissions(Manifest.permission.CAMERA)
|
||||
.permissions(Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.CAMERA)
|
||||
.request((allGranted, grantedList, deniedList) -> {
|
||||
if (allGranted) {
|
||||
file = ImageGetUtil.createImageFile(act);
|
||||
ImageGetUtil.cameraAlbumGetImage(act, file);
|
||||
} else {
|
||||
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
new MessageUtils().showSimCenPop(act, "缺少相机,媒体权限,将无法为您提供服务,去开启!", "取消", "确认", () -> {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
act.startActivity(intent);
|
||||
});
|
||||
// Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -9,6 +9,8 @@ import android.provider.MediaStore;
|
||||
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import com.dahe.mylibrary.utils.AppUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -39,7 +41,7 @@ public class ImageGetUtil {
|
||||
if(imageFile!=null){
|
||||
if(Build.VERSION.SDK_INT>= Build.VERSION_CODES.N){
|
||||
/*7.0以上要通过FileProvider将File转化为Uri*/
|
||||
uri = FileProvider.getUriForFile(act.getApplicationContext(),"com.arpa.hndahesudintocctmsdriver.fileprovider",imageFile);
|
||||
uri = FileProvider.getUriForFile(act.getApplicationContext(), AppUtils.getAppPackageName()+".fileprovider",imageFile);
|
||||
}else {
|
||||
/*7.0以下则直接使用Uri的fromFile方法将File转化为Uri*/
|
||||
uri = Uri.fromFile(imageFile);
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.util.location;
|
||||
|
||||
import static com.arpa.hndahesudintocctmsdriver.util.location.LocationGDUtil.RES;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.location.Address;
|
||||
import android.location.Criteria;
|
||||
import android.location.Geocoder;
|
||||
import android.location.Location;
|
||||
import android.location.LocationListener;
|
||||
import android.location.LocationManager;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.msg.MsgUtil;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* @ClassName LocationManagerUtil
|
||||
* @Author john
|
||||
* @Date 2024/7/25 15:21
|
||||
* @Description LocationManager本地定位
|
||||
*/
|
||||
public class LocationManagerUtil {
|
||||
|
||||
public static LocationManagerUtil mInstance = null;
|
||||
|
||||
public static LocationManagerUtil getInstance() {
|
||||
if (null == mInstance) {
|
||||
synchronized (LocationManagerUtil.class) {
|
||||
if (null == mInstance) {
|
||||
mInstance = new LocationManagerUtil();
|
||||
}
|
||||
}
|
||||
}
|
||||
return mInstance;
|
||||
}
|
||||
|
||||
private LocationManagerUtil() {
|
||||
}
|
||||
|
||||
public void getLocation(Context ctx, Handler hd) {
|
||||
LocationManager locationManager = (LocationManager) ctx.getSystemService(Context.LOCATION_SERVICE);
|
||||
|
||||
//创建定位条件器
|
||||
Criteria criteria = new Criteria();
|
||||
//设置精度,Criteria.ACCURACY_FINE表示精确,Criteria.ACCURACY_COARSE表示粗略
|
||||
criteria.setAccuracy(Criteria.ACCURACY_FINE);
|
||||
//设置是否需要海拔信息
|
||||
criteria.setAltitudeRequired(true);
|
||||
//设置是否需要方位信息
|
||||
criteria.setBearingRequired(true);
|
||||
//设置是否允许运营商扣费
|
||||
criteria.setCostAllowed(true);
|
||||
//设置对电源的需求
|
||||
criteria.setPowerRequirement(Criteria.POWER_LOW);
|
||||
|
||||
String bestProvider = locationManager.getBestProvider(criteria, true);
|
||||
if (bestProvider != null) {
|
||||
if (ActivityCompat.checkSelfPermission(ctx, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(ctx, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
ToastUtils.showToast(ctx, "请查看定位权限");
|
||||
return;
|
||||
}
|
||||
locationManager.requestLocationUpdates(bestProvider, 300, 0, new LocationListener() {
|
||||
@Override
|
||||
public void onLocationChanged(@NonNull Location location) {
|
||||
try {
|
||||
Geocoder geocoder = new Geocoder(ctx, Locale.getDefault());
|
||||
List<Address> fromLocation = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);
|
||||
if (fromLocation != null && !fromLocation.isEmpty()) {
|
||||
Address address = fromLocation.get(0);
|
||||
String addressLine = address.getAddressLine(0);
|
||||
String adminArea = address.getAdminArea();//省
|
||||
String locality = address.getLocality();//市
|
||||
String subLocality = address.getSubLocality();//县
|
||||
String featureName = address.getFeatureName();//详细地址
|
||||
CacheGroup.cacheList.put("getLocation", new Gson().toJson(address));
|
||||
MsgUtil.addHdMsgWat(hd, RES);
|
||||
locationManager.removeUpdates(this);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtils.showToast(ctx, "定位失败,请查看定位权限");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ public class LocationUtil{
|
||||
|
||||
private double latitude;
|
||||
private double longitude;
|
||||
private int errorCode;
|
||||
private String address;
|
||||
private Context con;
|
||||
private Handler hd;
|
||||
@@ -39,6 +40,10 @@ public class LocationUtil{
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public double getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
@@ -62,7 +67,7 @@ public class LocationUtil{
|
||||
//LocationMode.Hight_Accuracy:高精度;
|
||||
//LocationMode. Battery_Saving:低功耗;
|
||||
//LocationMode. Device_Sensors:仅使用设备;
|
||||
option.setCoorType("GCJ02");
|
||||
option.setCoorType("BD09ll");
|
||||
//可选,设置返回经纬度坐标类型,默认GCJ02
|
||||
//GCJ02:国测局坐标;
|
||||
//BD09ll:百度经纬度坐标;
|
||||
@@ -112,7 +117,8 @@ public class LocationUtil{
|
||||
float radius = location.getRadius(); //获取定位精度,默认值为0.0f
|
||||
String coorType = location.getCoorType();
|
||||
//获取经纬度坐标类型,以LocationClientOption中设置过的坐标类型为准
|
||||
int errorCode = location.getLocType();
|
||||
errorCode = location.getLocType();
|
||||
String locTypeDescription = location.getLocTypeDescription();
|
||||
//获取定位类型、定位错误返回码,具体信息可参照类参考中BDLocation类中的说明
|
||||
Log.e("定位位置address",address+"");
|
||||
Log.e("定位坐标latitude",latitude+"");
|
||||
|
||||
@@ -12,12 +12,12 @@ import android.os.Message;
|
||||
public class MsgUtil {
|
||||
|
||||
public static void addHdMsgWat(Handler hd,int what){
|
||||
Message msg=new Message();
|
||||
Message msg=Message.obtain();
|
||||
msg.what=what;
|
||||
hd.sendMessage(msg);
|
||||
}
|
||||
public static void addHdMsgWatBody(Handler hd,int what,String body){
|
||||
Message msg=new Message();
|
||||
Message msg=Message.obtain();
|
||||
msg.what=what;
|
||||
msg.obj=body;
|
||||
hd.sendMessage(msg);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user