Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c3b570dad | ||
|
|
b29e3eaf03 | ||
|
|
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 |
+67
-60
@@ -16,65 +16,48 @@ android {
|
|||||||
keyPassword '123456'
|
keyPassword '123456'
|
||||||
storeFile file('key.jks')
|
storeFile file('key.jks')
|
||||||
storePassword '123456'
|
storePassword '123456'
|
||||||
|
v1SigningEnabled true
|
||||||
|
v2SigningEnabled true
|
||||||
}
|
}
|
||||||
debug {
|
// debug {
|
||||||
keyAlias 'key0'
|
// keyAlias 'key0'
|
||||||
keyPassword '123456'
|
// keyPassword '123456'
|
||||||
storeFile file('key.jks')
|
// storeFile file('key.jks')
|
||||||
storePassword '123456'
|
// storePassword '123456'
|
||||||
}
|
// }
|
||||||
release {
|
// release {
|
||||||
keyAlias 'key0'
|
// keyAlias 'key0'
|
||||||
keyPassword '123456'
|
// keyPassword '123456'
|
||||||
storeFile file('key.jks')
|
// storeFile file('key.jks')
|
||||||
storePassword '123456'
|
// storePassword '123456'
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.arpa.hndahesudintocctmsdriver"
|
applicationId "com.arpa.hndahesudintocctmsdriver"
|
||||||
minSdkVersion 23
|
minSdkVersion 24
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 57
|
versionCode 65
|
||||||
versionName "3.2.7"
|
versionName "3.3.5"
|
||||||
flavorDimensions "CHANNEL_VALUE"
|
flavorDimensions "CHANNEL_VALUE"
|
||||||
|
flavorDimensions "app_icon"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
javaCompileOptions {
|
javaCompileOptions {
|
||||||
|
|
||||||
annotationProcessorOptions {
|
annotationProcessorOptions {
|
||||||
includeCompileClasspath = true
|
includeCompileClasspath = true
|
||||||
arguments = [moduleName :project.getName() ]
|
arguments = [moduleName: project.getName()]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
|
|
||||||
//选择要添加的对应 cpu 类型的 .so 库。
|
//选择要添加的对应 cpu 类型的 .so 库。
|
||||||
abiFilters 'arm64-v8a'
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||||
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64' , 'arm64-v8a'
|
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64' , 'arm64-v8a'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
manifestPlaceholders = [
|
|
||||||
JPUSH_PKGNAME : applicationId,
|
|
||||||
JPUSH_APPKEY : "571d93ae5117da6dee848c92", //JPush 上注册的包名对应的 Appkey.
|
|
||||||
JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
|
|
||||||
MEIZU_APPKEY : "MZ-魅族的APPKEY",
|
|
||||||
MEIZU_APPID : "MZ-魅族的APPID",
|
|
||||||
XIAOMI_APPID : "MI-小米的APPID",
|
|
||||||
XIAOMI_APPKEY : "MI-小米的APPKEY",
|
|
||||||
OPPO_APPKEY : "OP-oppo的APPKEY",
|
|
||||||
OPPO_APPID : "OP-oppo的APPID",
|
|
||||||
OPPO_APPSECRET : "OP-oppo的APPSECRET",
|
|
||||||
VIVO_APPKEY : "vivo的APPKEY",
|
|
||||||
VIVO_APPID : "vivo的APPID"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
// sourceSets {
|
|
||||||
// main {
|
|
||||||
// jniLibs.srcDirs = ['libs']
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
@@ -86,9 +69,10 @@ android {
|
|||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
|
signingConfig signingConfigs.config
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
signingConfig signingConfigs.config
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
@@ -104,7 +88,7 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories{
|
repositories {
|
||||||
flatDir {
|
flatDir {
|
||||||
dirs 'libs'
|
dirs 'libs'
|
||||||
}
|
}
|
||||||
@@ -112,30 +96,53 @@ android {
|
|||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
qa {
|
qa {
|
||||||
manifestPlaceholders = [CHANNEL_VALUE: "好运司机测试"]
|
applicationId "com.arpa.hndahesudintocctmsdriver.text"
|
||||||
buildConfigField("String", "OPEN_AL_URL", "\"https://oapi-staging.alct56.com/api/v1/openapi/\"")
|
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://app.test.dahehuoyun.com/api/\"")
|
buildConfigField("String", "BASE_URL", "\"http://app.test.dahehuoyun.com/api/\"")
|
||||||
buildConfigField "boolean", "isTest", "true"
|
buildConfigField "boolean", "isTest", "true"
|
||||||
|
//APP名称,可以在androidMainfest中引用
|
||||||
|
resValue "string", "appName", "司机测试"
|
||||||
}
|
}
|
||||||
product {
|
product {
|
||||||
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机"]
|
applicationId "com.arpa.hndahesudintocctmsdriver"
|
||||||
|
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机",
|
||||||
|
app_icon : "@drawable/diver_logo",
|
||||||
|
GAODEKEY : "c68051b43e79e47a1556fc695371c902",
|
||||||
|
JPUSH_PKGNAME: applicationId,
|
||||||
|
JPUSH_APPKEY : "fba6f55621c670d8c1fe9191", //JPush 上注册的包名对应的 Appkey.
|
||||||
|
JPUSH_CHANNEL: "developer-default"//暂时填写默认值即可.
|
||||||
|
]
|
||||||
buildConfigField("String", "OPEN_AL_URL", "\"https://oapi.alct56.com\"")
|
buildConfigField("String", "OPEN_AL_URL", "\"https://oapi.alct56.com\"")
|
||||||
buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"")
|
buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"")
|
||||||
buildConfigField "boolean", "isTest", "false"
|
buildConfigField "boolean", "isTest", "false"
|
||||||
|
//APP名称,可以在androidMainfest中引用
|
||||||
|
resValue "string", "appName", "大河好运司机"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
productFlavors.all { flavor ->
|
// productFlavors.all { flavor ->
|
||||||
flavor.manifestPlaceholders = [CHANNEL_VALUE: name]
|
// flavor.manifestPlaceholders = [CHANNEL_VALUE: name]
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
android.applicationVariants.all { variant ->
|
android.applicationVariants.all { variant ->
|
||||||
variant.outputs.all {
|
variant.outputs.all {
|
||||||
def date = new Date().format("MMdd_HH-mm" , TimeZone.getTimeZone("GMT+08"))
|
def date = new Date().format("MMdd_HH-mm", TimeZone.getTimeZone("GMT+08"))
|
||||||
if(variant.buildType.name.equals('release')){
|
def isText = variant.productFlavors[0].properties.get("buildConfigFields").getAt("isTest").properties.get("value")
|
||||||
outputFileName = "dhhy-driver-"+date+"-${versionName}.apk"
|
def appName = null
|
||||||
|
if (isText == "true") {
|
||||||
|
appName = '大河好运司机测试_'
|
||||||
|
} else {
|
||||||
|
appName = '大河好运司机_'
|
||||||
}
|
}
|
||||||
|
outputFileName = appName + "${variant.buildType.name}_${defaultConfig.versionName}_${date}.apk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lintOptions {
|
lintOptions {
|
||||||
@@ -159,13 +166,13 @@ dependencies {
|
|||||||
//角标
|
//角标
|
||||||
implementation 'com.haozhang.libary:android-slanted-textview:1.2'
|
implementation 'com.haozhang.libary:android-slanted-textview:1.2'
|
||||||
//刷新头部,底部样式
|
//刷新头部,底部样式
|
||||||
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1'
|
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1'
|
||||||
implementation 'com.scwang.smart:refresh-header-material:2.0.1'
|
implementation 'com.scwang.smart:refresh-header-material:2.0.1'
|
||||||
implementation 'com.scwang.smart:refresh-footer-ball:2.0.1' //球脉冲加载
|
implementation 'com.scwang.smart:refresh-footer-ball:2.0.1' //球脉冲加载
|
||||||
implementation 'com.scwang.smart:refresh-footer-classics:2.0.1' //经典加载
|
implementation 'com.scwang.smart:refresh-footer-classics:2.0.1' //经典加载
|
||||||
//更新版本
|
//更新版本
|
||||||
implementation 'com.github.jenly1314.AppUpdater:app-updater:1.1.0'
|
implementation 'com.github.jenly1314.AppUpdater:app-updater:1.2.0'
|
||||||
implementation 'com.github.jenly1314.AppUpdater:app-dialog:1.1.0'
|
implementation 'com.github.jenly1314.AppUpdater:app-dialog:1.2.0'
|
||||||
//轮播插件
|
//轮播插件
|
||||||
implementation 'com.github.zhpanvip:BannerViewPager:3.5.4'
|
implementation 'com.github.zhpanvip:BannerViewPager:3.5.4'
|
||||||
//
|
//
|
||||||
@@ -177,7 +184,7 @@ dependencies {
|
|||||||
implementation 'com.alibaba:fastjson:1.2.61'
|
implementation 'com.alibaba:fastjson:1.2.61'
|
||||||
implementation 'org.bouncycastle:bcprov-jdk15on:1.55'
|
implementation 'org.bouncycastle:bcprov-jdk15on:1.55'
|
||||||
implementation 'org.apache.commons:commons-lang3:3.5'
|
implementation 'org.apache.commons:commons-lang3:3.5'
|
||||||
implementation (name:'locationgd-androidx_2.1.0', ext:'aar')//交通厅
|
implementation(name: 'locationgd-androidx_2.1.0', ext: 'aar')//交通厅
|
||||||
//安联
|
//安联
|
||||||
// implementation 'com.google.code.gson:gson:2.8.6'
|
// implementation 'com.google.code.gson:gson:2.8.6'
|
||||||
implementation 'com.loopj.android:android-async-http:1.4.9'
|
implementation 'com.loopj.android:android-async-http:1.4.9'
|
||||||
@@ -192,10 +199,10 @@ dependencies {
|
|||||||
//友盟
|
//友盟
|
||||||
// 下面各SDK根据宿主App是否使用相关业务按需引入。
|
// 下面各SDK根据宿主App是否使用相关业务按需引入。
|
||||||
// 友盟统计SDK
|
// 友盟统计SDK
|
||||||
implementation 'com.umeng.umsdk:common:9.4.2'// 必选
|
implementation 'com.umeng.umsdk:common:9.4.2'// 必选
|
||||||
implementation 'com.umeng.umsdk:asms:1.4.1'// 必选
|
implementation 'com.umeng.umsdk:asms:1.4.1'// 必选
|
||||||
implementation 'com.umeng.umsdk:apm:1.4.2' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
|
implementation 'com.umeng.umsdk:apm:1.4.2' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
|
||||||
implementation 'com.umeng.umsdk:abtest:1.0.0'//使用U-App中ABTest能力,可选
|
implementation 'com.umeng.umsdk:abtest:1.0.0'//使用U-App中ABTest能力,可选
|
||||||
//动态权限获取
|
//动态权限获取
|
||||||
implementation "org.permissionsdispatcher:permissionsdispatcher:4.6.0"
|
implementation "org.permissionsdispatcher:permissionsdispatcher:4.6.0"
|
||||||
kapt "org.permissionsdispatcher:permissionsdispatcher-processor:4.6.0"
|
kapt "org.permissionsdispatcher:permissionsdispatcher-processor:4.6.0"
|
||||||
@@ -204,8 +211,8 @@ dependencies {
|
|||||||
//EventBus
|
//EventBus
|
||||||
implementation 'org.greenrobot:eventbus:3.1.1'
|
implementation 'org.greenrobot:eventbus:3.1.1'
|
||||||
//易签宝
|
//易签宝
|
||||||
implementation(name:'EsignSDK', ext:'aar')
|
implementation(name: 'EsignSDK', ext: 'aar')
|
||||||
implementation'pub.devrel:easypermissions:1.3.0'
|
implementation 'pub.devrel:easypermissions:1.3.0'
|
||||||
|
|
||||||
implementation "com.squareup.retrofit2:retrofit:2.4.0"
|
implementation "com.squareup.retrofit2:retrofit:2.4.0"
|
||||||
// implementation "com.squareup.retrofit2:converter-gson:2.4.0"
|
// implementation "com.squareup.retrofit2:converter-gson:2.4.0"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,6 +11,7 @@
|
|||||||
<!-- 录音 -->
|
<!-- 录音 -->
|
||||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||||
<!--播音-->
|
<!--播音-->
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
@@ -53,14 +54,14 @@
|
|||||||
android:name="com.arpa.hndahesudintocctmsdriver.App"
|
android:name="com.arpa.hndahesudintocctmsdriver.App"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:icon="@drawable/diver_logo"
|
android:icon="@mipmap/diver_logo"
|
||||||
android:label="@string/app_name"
|
android:label="@string/appName"
|
||||||
android:largeHeap="true"
|
android:largeHeap="true"
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
tools:replace="android:icon">
|
tools:replace="android:label,android:allowBackup">
|
||||||
|
|
||||||
<uses-library
|
<uses-library
|
||||||
android:name="com/alct/mdp"
|
android:name="com/alct/mdp"
|
||||||
@@ -93,6 +94,7 @@
|
|||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.PhotoCarActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.PhotoCarActivity"
|
||||||
|
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.VehicleAuthActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.VehicleAuthActivity"
|
||||||
@@ -111,6 +113,21 @@
|
|||||||
|
|
||||||
</activity>
|
</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
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivity2"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.home.shangchuan.ShangChuangImgActivity2"
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
@@ -145,6 +162,7 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity"
|
||||||
|
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||||
android:screenOrientation="portrait"/>
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.AddCarSuccActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.AddCarSuccActivity"
|
||||||
@@ -154,6 +172,7 @@
|
|||||||
android:screenOrientation="portrait"/>
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.login.WelcomeActivity"
|
android:name="com.arpa.hndahesudintocctmsdriver.ui.login.WelcomeActivity"
|
||||||
|
android:exported="true"
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
@@ -247,10 +266,11 @@
|
|||||||
<!--高德地图-->
|
<!--高德地图-->
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.amap.api.v2.apikey"
|
android:name="com.amap.api.v2.apikey"
|
||||||
android:value="78019612271411eca3af34db91930620" />
|
android:value="${GAODEKEY}" />
|
||||||
<!-- android:value="702eaa84675618b8eb69298d9fd42ca3" />-->
|
<!-- android:value="702eaa84675618b8eb69298d9fd42ca3" />-->
|
||||||
|
|
||||||
<service android:name="com.amap.api.location.APSService"></service>
|
<service android:name="com.amap.api.location.APSService"
|
||||||
|
android:foregroundServiceType="location"></service>
|
||||||
|
|
||||||
<!--百度地图-->
|
<!--百度地图-->
|
||||||
<meta-data
|
<meta-data
|
||||||
@@ -259,7 +279,7 @@
|
|||||||
<!-- 极光-->
|
<!-- 极光-->
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="JPUSH_APPKEY"
|
android:name="JPUSH_APPKEY"
|
||||||
android:value="571d93ae5117da6dee848c92" /> <!-- </>值来自开发者平台取得的AppKey -->
|
android:value="fba6f55621c670d8c1fe9191" /> <!-- </>值来自开发者平台取得的AppKey -->
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="JPUSH_CHANNEL"
|
android:name="JPUSH_CHANNEL"
|
||||||
@@ -382,7 +402,7 @@
|
|||||||
</receiver>
|
</receiver>
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="com.arpa.hndahesudintocctmsdriver.fileprovider"
|
android:authorities="${applicationId}.fileprovider"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true"
|
android:grantUriPermissions="true"
|
||||||
tools:ignore="WrongManifestParent">
|
tools:ignore="WrongManifestParent">
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
|||||||
import com.gyf.cactus.Cactus;
|
import com.gyf.cactus.Cactus;
|
||||||
import com.gyf.cactus.callback.CactusBackgroundCallback;
|
import com.gyf.cactus.callback.CactusBackgroundCallback;
|
||||||
import com.gyf.cactus.callback.CactusCallback;
|
import com.gyf.cactus.callback.CactusCallback;
|
||||||
|
import com.tencent.bugly.crashreport.CrashReport;
|
||||||
import com.umeng.commonsdk.UMConfigure;
|
import com.umeng.commonsdk.UMConfigure;
|
||||||
|
|
||||||
import cn.jiguang.verifysdk.api.JVerificationInterface;
|
import cn.jiguang.verifysdk.api.JVerificationInterface;
|
||||||
@@ -46,6 +47,7 @@ public class App extends Application {
|
|||||||
mApplication = this;
|
mApplication = this;
|
||||||
con = getBaseContext();
|
con = getBaseContext();
|
||||||
CommonBaseLibrary.getInstance().init(this, Api.BASE_URL);
|
CommonBaseLibrary.getInstance().init(this, Api.BASE_URL);
|
||||||
|
CrashReport.initCrashReport(getApplicationContext(), "0fa55ffad8", false);
|
||||||
String state = SPUtil.getSP(con, "state_data", "authorization_state");
|
String state = SPUtil.getSP(con, "state_data", "authorization_state");
|
||||||
if ("1".equals(state)) {
|
if ("1".equals(state)) {
|
||||||
try {
|
try {
|
||||||
@@ -76,29 +78,30 @@ public class App extends Application {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PendingIntent pendingIntent =
|
PendingIntent pendingIntent =
|
||||||
// PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
// Cactus.getInstance()
|
Cactus.getInstance()
|
||||||
// .isDebug(true)
|
.isDebug(true)
|
||||||
// //可选,设置通知栏点击事件
|
//可选,设置通知栏点击事件
|
||||||
// .setPendingIntent(pendingIntent)
|
.setPendingIntent(pendingIntent)
|
||||||
//// .setBackgroundMusicEnabled(true)//可选,退到后台是否可以播放音乐
|
.setBackgroundMusicEnabled(true)//可选,退到后台是否可以播放音乐
|
||||||
//// .setMusicId(R.raw.main) //可选,设置音乐
|
.setMusicId(R.raw.main) //可选,设置音乐
|
||||||
//// .setPendingIntent(pendingIntent)//可选,设置通知栏点击事件
|
// .setPendingIntent(pendingIntent)//可选,设置通知栏点击事件
|
||||||
//// .addCallback(new CactusCallback())//可选,运行时回调
|
// .addCallback(new CactusCallback())//可选,运行时回调
|
||||||
// .setCrashRestartUIEnabled(true) //可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
.setCrashRestartUIEnabled(true) //可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
||||||
// .setCrashRestartUIEnabled(true)//可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
.setCrashRestartUIEnabled(true)//可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
||||||
// .setTitle("大河好运")
|
.setTitle("大河好运")
|
||||||
// .setSmallIcon(R.drawable.diver_logo)
|
.setContent("大河好运司机端为您提供服务")
|
||||||
// .addBackgroundCallback(new CactusBackgroundCallback() {
|
.setSmallIcon(R.drawable.diver_logo)
|
||||||
// @Override
|
.addBackgroundCallback(new CactusBackgroundCallback() {
|
||||||
// public void onBackground(boolean b) {
|
@Override
|
||||||
// if (b){
|
public void onBackground(boolean b) {
|
||||||
// getBillLocation();
|
if (b){
|
||||||
// }
|
getBillLocation();
|
||||||
// }
|
}
|
||||||
// })
|
}
|
||||||
// .register(this);
|
})
|
||||||
|
.register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static App getApp() {
|
public static App getApp() {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -224,27 +224,6 @@ public class H5Activity extends AppCompatActivity {
|
|||||||
|
|
||||||
Uri uri = Uri.parse(url);
|
Uri uri = Uri.parse(url);
|
||||||
Log.e("test", "要加载的地址:" + uri.getScheme() + " " + url + " ");
|
Log.e("test", "要加载的地址:" + uri.getScheme() + " " + url + " ");
|
||||||
|
|
||||||
|
|
||||||
// if (url.contains("callback")) {
|
|
||||||
// // 实名认证结束 返回按钮/倒计时返回/暂不认证
|
|
||||||
// boolean status = uri.getBooleanQueryParameter("passed", false);
|
|
||||||
// if (status) {
|
|
||||||
//
|
|
||||||
// new Handler().postDelayed(() -> {
|
|
||||||
// FaceEvent he = new FaceEvent("刷脸成功");
|
|
||||||
// EventBus.getDefault().post(he);
|
|
||||||
// finish();
|
|
||||||
// }, 4000);
|
|
||||||
// }else{
|
|
||||||
// if (mWebView.canGoBack()) {
|
|
||||||
// mWebView.goBack();
|
|
||||||
// }
|
|
||||||
// Toast.makeText(H5Activity.this, "认证失败,请重新刷脸认证", Toast.LENGTH_SHORT).show();
|
|
||||||
// }
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (uri.getScheme().equals("http") || uri.getScheme().equals("https")) {
|
if (uri.getScheme().equals("http") || uri.getScheme().equals("https")) {
|
||||||
view.loadUrl(url);
|
view.loadUrl(url);
|
||||||
return true;
|
return true;
|
||||||
@@ -312,16 +291,19 @@ public class H5Activity extends AppCompatActivity {
|
|||||||
} else {
|
} else {
|
||||||
String tsignCode = uri.getQueryParameter("tsignCode");
|
String tsignCode = uri.getQueryParameter("tsignCode");
|
||||||
if ("0".equals(tsignCode)) {
|
if ("0".equals(tsignCode)) {
|
||||||
FaceEvent he = new FaceEvent("刷脸成功");
|
//延时1.5秒跳转运单详情页面
|
||||||
EventBus.getDefault().post(he);
|
new Handler().postDelayed(() -> {
|
||||||
finish();
|
FaceEvent he = new FaceEvent("刷脸成功");
|
||||||
|
EventBus.getDefault().post(he);
|
||||||
|
finish();
|
||||||
|
}, 800);
|
||||||
tsignCode = "签署成功";
|
tsignCode = "签署成功";
|
||||||
} else {
|
} else {
|
||||||
tsignCode = "签署失败";
|
tsignCode = "签署失败";
|
||||||
}
|
}
|
||||||
Toast.makeText(H5Activity.this, "签署结果: " + tsignCode, Toast.LENGTH_LONG).show();
|
Toast.makeText(H5Activity.this, "签署结果: " + tsignCode, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
finish();
|
// finish();
|
||||||
return true;
|
return true;
|
||||||
} else if (uri.getScheme().equals("alipays")) {
|
} else if (uri.getScheme().equals("alipays")) {
|
||||||
// 跳转到支付宝刷脸
|
// 跳转到支付宝刷脸
|
||||||
|
|||||||
@@ -66,6 +66,11 @@ public class CarDelBean {
|
|||||||
private String owner;
|
private String owner;
|
||||||
private String roadLicense;
|
private String roadLicense;
|
||||||
private String roadLicensePhoto;
|
private String roadLicensePhoto;
|
||||||
|
private String trailerLicenseId;
|
||||||
|
|
||||||
|
private String policyPhotoUrl;
|
||||||
|
private String insuranceCompany;
|
||||||
|
private String insuranceEndDay;
|
||||||
private String roadLicenseSend;
|
private String roadLicenseSend;
|
||||||
private String roadLicenseValidity;
|
private String roadLicenseValidity;
|
||||||
private String threeImage;
|
private String threeImage;
|
||||||
@@ -79,6 +84,14 @@ public class CarDelBean {
|
|||||||
private String carPlateColorValue;
|
private String carPlateColorValue;
|
||||||
private String needUpQCPhoto;
|
private String needUpQCPhoto;
|
||||||
|
|
||||||
|
public String getTrailerLicenseId() {
|
||||||
|
return trailerLicenseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrailerLicenseId(String trailerLicenseId) {
|
||||||
|
this.trailerLicenseId = trailerLicenseId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getNeedUpQCPhoto() {
|
public String getNeedUpQCPhoto() {
|
||||||
return needUpQCPhoto;
|
return needUpQCPhoto;
|
||||||
}
|
}
|
||||||
@@ -95,6 +108,30 @@ public class CarDelBean {
|
|||||||
this.carPlateColorValue = carPlateColorValue;
|
this.carPlateColorValue = carPlateColorValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPolicyPhotoUrl() {
|
||||||
|
return policyPhotoUrl == null ? "" : policyPhotoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPolicyPhotoUrl(String policyPhotoUrl) {
|
||||||
|
this.policyPhotoUrl = policyPhotoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInsuranceCompany() {
|
||||||
|
return insuranceCompany == null ? "" : insuranceCompany;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInsuranceCompany(String insuranceCompany) {
|
||||||
|
this.insuranceCompany = insuranceCompany;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInsuranceEndDay() {
|
||||||
|
return insuranceEndDay == null ? "" : insuranceEndDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInsuranceEndDay(String insuranceEndDay) {
|
||||||
|
this.insuranceEndDay = insuranceEndDay;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCarEnergyTypValue() {
|
public String getCarEnergyTypValue() {
|
||||||
return carEnergyTypValue;
|
return carEnergyTypValue;
|
||||||
}
|
}
|
||||||
@@ -271,6 +308,15 @@ public class CarDelBean {
|
|||||||
private String threeImage;
|
private String threeImage;
|
||||||
private String type;
|
private String type;
|
||||||
private String vehicleNumber;
|
private String vehicleNumber;
|
||||||
|
private String trailerLicenseId;
|
||||||
|
|
||||||
|
public String getTrailerLicenseId() {
|
||||||
|
return trailerLicenseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrailerLicenseId(String trailerLicenseId) {
|
||||||
|
this.trailerLicenseId = trailerLicenseId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getBackImage() {
|
public String getBackImage() {
|
||||||
return backImage == null ? "" : backImage;
|
return backImage == null ? "" : backImage;
|
||||||
|
|||||||
@@ -48,6 +48,33 @@ public class DriverExpireBean {
|
|||||||
public static class DataDTO {
|
public static class DataDTO {
|
||||||
private String driverLicenseUpdateUrl;
|
private String driverLicenseUpdateUrl;
|
||||||
private String idCardUpdateUrl;
|
private String idCardUpdateUrl;
|
||||||
|
private String qualificationUpdateUrl;
|
||||||
|
private String roadLicenseUpdateUrl;
|
||||||
|
private String insuranceUpdateUrl;
|
||||||
|
|
||||||
|
public String getRoadLicenseUpdateUrl() {
|
||||||
|
return roadLicenseUpdateUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoadLicenseUpdateUrl(String roadLicenseUpdateUrl) {
|
||||||
|
this.roadLicenseUpdateUrl = roadLicenseUpdateUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInsuranceUpdateUrl() {
|
||||||
|
return insuranceUpdateUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInsuranceUpdateUrl(String insuranceUpdateUrl) {
|
||||||
|
this.insuranceUpdateUrl = insuranceUpdateUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQualificationUpdateUrl() {
|
||||||
|
return qualificationUpdateUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQualificationUpdateUrl(String qualificationUpdateUrl) {
|
||||||
|
this.qualificationUpdateUrl = qualificationUpdateUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDriverLicenseUpdateUrl() {
|
public String getDriverLicenseUpdateUrl() {
|
||||||
return driverLicenseUpdateUrl;
|
return driverLicenseUpdateUrl;
|
||||||
|
|||||||
+9
@@ -59,6 +59,7 @@ public class OCRVehicleBackLicenseBean {
|
|||||||
private int id;
|
private int id;
|
||||||
private String url;
|
private String url;
|
||||||
private String checkRecord;
|
private String checkRecord;
|
||||||
|
private String isSave;
|
||||||
private String approvedCapacity;
|
private String approvedCapacity;
|
||||||
private String allCapacity;
|
private String allCapacity;
|
||||||
private String size;
|
private String size;
|
||||||
@@ -71,6 +72,14 @@ public class OCRVehicleBackLicenseBean {
|
|||||||
private String carNumber;
|
private String carNumber;
|
||||||
private int licenseId;
|
private int licenseId;
|
||||||
|
|
||||||
|
public String getIsSave() {
|
||||||
|
return isSave;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsSave(String isSave) {
|
||||||
|
this.isSave = isSave;
|
||||||
|
}
|
||||||
|
|
||||||
public int getLicenseId() {
|
public int getLicenseId() {
|
||||||
return licenseId;
|
return licenseId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,9 @@ public class OCRVehicleLicenseBean {
|
|||||||
private String address;
|
private String address;
|
||||||
private int carId;
|
private int carId;
|
||||||
private String carNumber;
|
private String carNumber;
|
||||||
|
private boolean carExist;
|
||||||
private String dateIssue;
|
private String dateIssue;
|
||||||
|
private String backImage;
|
||||||
private String engineNumber;
|
private String engineNumber;
|
||||||
private int id;
|
private int id;
|
||||||
private String model;
|
private String model;
|
||||||
@@ -60,6 +62,41 @@ public class OCRVehicleLicenseBean {
|
|||||||
private String type;
|
private String type;
|
||||||
private String url;
|
private String url;
|
||||||
private String vehicleNumber;
|
private String vehicleNumber;
|
||||||
|
private String licenseId;
|
||||||
|
|
||||||
|
public String getLicenseId() {
|
||||||
|
return licenseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLicenseId(String licenseId) {
|
||||||
|
this.licenseId = licenseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
private DataDto2 existCarInfo;
|
||||||
|
|
||||||
|
public DataDto2 getExistCarInfo() {
|
||||||
|
return existCarInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExistCarInfo(DataDto2 existCarInfo) {
|
||||||
|
this.existCarInfo = existCarInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCarExist() {
|
||||||
|
return carExist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBackImage() {
|
||||||
|
return backImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBackImage(String backImage) {
|
||||||
|
this.backImage = backImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCarExist(boolean carExist) {
|
||||||
|
this.carExist = carExist;
|
||||||
|
}
|
||||||
|
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
return address == null ? "" : address;
|
return address == null ? "" : address;
|
||||||
@@ -173,4 +210,44 @@ public class OCRVehicleLicenseBean {
|
|||||||
this.vehicleNumber = vehicleNumber;
|
this.vehicleNumber = vehicleNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class DataDto2 {
|
||||||
|
private String backImage;
|
||||||
|
private String carId;
|
||||||
|
private String licenseId;
|
||||||
|
|
||||||
|
private CarDelBean.DataDTO trailerResVo;
|
||||||
|
|
||||||
|
public CarDelBean.DataDTO getTrailerResVo() {
|
||||||
|
return trailerResVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrailerResVo(CarDelBean.DataDTO trailerResVo) {
|
||||||
|
this.trailerResVo = trailerResVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLicenseId() {
|
||||||
|
return licenseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLicenseId(String licenseId) {
|
||||||
|
this.licenseId = licenseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBackImage() {
|
||||||
|
return backImage == null ? "" : backImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBackImage(String backImage) {
|
||||||
|
this.backImage = backImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCarId() {
|
||||||
|
return carId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCarId(String carId) {
|
||||||
|
this.carId = carId;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.cuspop
|
package com.arpa.hndahesudintocctmsdriver.cuspop
|
||||||
|
|
||||||
import android.app.Activity
|
import android.Manifest
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.fragment.app.FragmentActivity
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
import com.dahe.mylibrary.utils.BaseUtils
|
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil
|
||||||
import com.dahe.mylibrary.utils.ToastUtils
|
import com.dahe.mylibrary.utils.ToastUtils
|
||||||
import com.lxj.xpopup.core.CenterPopupView
|
import com.lxj.xpopup.core.CenterPopupView
|
||||||
|
import com.lxj.xpopup.util.XPermission
|
||||||
|
import com.permissionx.guolindev.PermissionX
|
||||||
import kotlinx.android.synthetic.main.load.view.*
|
import kotlinx.android.synthetic.main.load.view.*
|
||||||
import kotlinx.android.synthetic.main.pop_message_center.view.*
|
import kotlinx.android.synthetic.main.pop_message_center.view.*
|
||||||
|
|
||||||
@@ -51,12 +55,16 @@ class MessagePop(context: Context) : CenterPopupView(context), View.OnClickListe
|
|||||||
}
|
}
|
||||||
R.id.tvOk,R.id.tvPhone -> {
|
R.id.tvOk,R.id.tvPhone -> {
|
||||||
dismiss()
|
dismiss()
|
||||||
val toString = tvPhone.text.toString()
|
if (XPermission.create(context).isGranted(Manifest.permission.CALL_PHONE)){
|
||||||
val intent = Intent(Intent.ACTION_CALL)
|
val toString = tvPhone.text.toString()
|
||||||
val data = Uri.parse("tel:$toString")
|
val intent = Intent(Intent.ACTION_DIAL)
|
||||||
intent.data = data
|
val data = Uri.parse("tel:$toString")
|
||||||
context.startActivity(intent)
|
intent.data = data
|
||||||
dismiss()
|
context.startActivity(intent)
|
||||||
|
}else{
|
||||||
|
ToastUtils.showToast(context,"请开启电话权限")
|
||||||
|
}
|
||||||
|
|
||||||
// BaseUtils.callPhone(content as Activity, tvPhone.text.toString())
|
// BaseUtils.callPhone(content as Activity, tvPhone.text.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -35,9 +35,9 @@ public class ALProcess {
|
|||||||
//企业代码-测试
|
//企业代码-测试
|
||||||
private static final String ENTERPRISE_CODE_TEXT="E0019093";
|
private static final String ENTERPRISE_CODE_TEXT="E0019093";
|
||||||
//企业app的身份码-测试
|
//企业app的身份码-测试
|
||||||
private static final String APP_IDENTITY_TEXT="07a6256cad5642138ed6e962a5a157be";
|
private static final String APP_IDENTITY_TEXT="a15b4ba5bd2542cc9a6bea9bdadf9ef9";
|
||||||
//企业app验证码-测试
|
//企业app验证码-测试
|
||||||
private static final String APP_KEY_TEXT="a15b4ba5bd2542cc9a6bea9bdadf9ef9";
|
private static final String APP_KEY_TEXT="07a6256cad5642138ed6e962a5a157be";
|
||||||
|
|
||||||
|
|
||||||
public static void verification(Context con){
|
public static void verification(Context con){
|
||||||
@@ -141,6 +141,7 @@ public class ALProcess {
|
|||||||
MDPLocationCollectionManager.register(con, idy, new OnResultListener() {
|
MDPLocationCollectionManager.register(con, idy, new OnResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
|
MsgUtil.addHdMsgWatBody(hd, 1111,"认证成功");
|
||||||
Log.e("--success--","验证成功");
|
Log.e("--success--","验证成功");
|
||||||
getFq(con);
|
getFq(con);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,6 +124,17 @@ public class AuthRequest {
|
|||||||
RequestUtil.start(1, "saveCarRoadLicenseNo", re, con, hd);
|
RequestUtil.start(1, "saveCarRoadLicenseNo", re, con, hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//车辆交强保险
|
||||||
|
public void saveTrafficInsurance(Context con, Handler hd, String id, String insuranceEndDay, String insuranceCompany) {
|
||||||
|
String mt = "{\n" +
|
||||||
|
"\t\"carId\": \"" + id + "\",\n" +
|
||||||
|
"\t\"insuranceEndDay\": \"" + insuranceEndDay + "\",\n" +
|
||||||
|
"\t\"insuranceCompany\": \"" + insuranceCompany + "\",\n" +
|
||||||
|
"}";
|
||||||
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getTrafficInsurance(), mt), getToken(con), con);
|
||||||
|
RequestUtil.start(1, "saveTrafficInsurance", re, con, hd);
|
||||||
|
}
|
||||||
|
|
||||||
//获取资格证认证信息
|
//获取资格证认证信息
|
||||||
public void isDriverAuthQualification(Context con, Handler hd) {
|
public void isDriverAuthQualification(Context con, Handler hd) {
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIsAuthDriverAuthQualification(), ""), getToken(con), con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getIsAuthDriverAuthQualification(), ""), getToken(con), con);
|
||||||
|
|||||||
@@ -89,6 +89,11 @@ public class HuoYuanRequset{
|
|||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUNLOADING(), gson.toJson(lub)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUNLOADING(), gson.toJson(lub)),getToken(con),con);
|
||||||
RequestUtil.start(1, ShangChuangImgActivity.TYPE_NAME[1],re,con,hd);
|
RequestUtil.start(1, ShangChuangImgActivity.TYPE_NAME[1],re,con,hd);
|
||||||
}
|
}
|
||||||
|
//卸货-补传
|
||||||
|
public void dischargeCargo4(LUInputBean lub){
|
||||||
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUNLOADING4(), gson.toJson(lub)),getToken(con),con);
|
||||||
|
RequestUtil.start(1, ShangChuangImgActivity.TYPE_NAME[1],re,con,hd);
|
||||||
|
}
|
||||||
//回单
|
//回单
|
||||||
public void receipt(UploadReceiptInputBean urib){
|
public void receipt(UploadReceiptInputBean urib){
|
||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUploadReceipt(), gson.toJson(urib)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUploadReceipt(), gson.toJson(urib)),getToken(con),con);
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ public class OCRRequest {
|
|||||||
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[2],re,con,hd);
|
RequestUtil.start(12, CertificatesActivity.TYPE_NAME[2],re,con,hd);
|
||||||
}
|
}
|
||||||
//行驶证背面识别
|
//行驶证背面识别
|
||||||
public void OCRVehicleLicenseBack(Context con, Handler hd, File file,String carId,String carNum){
|
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);
|
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);
|
RequestUtil.start(12, CertificatesActivity.TYPE_NAME_BANK[2],re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+187
-140
@@ -4,197 +4,202 @@ import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
|||||||
|
|
||||||
public class RequestConstant {
|
public class RequestConstant {
|
||||||
|
|
||||||
public static String TOKEN="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MzA0MDE3OTIsInVzZXJJZCI6ODAsImlhdCI6MTYyNzcyMzM5Mn0.f9Q-UZVduW6nt1s0L-3vYsrOJJ8iuSCSlJ9uu8yIxBI";
|
public static String TOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MzA0MDE3OTIsInVzZXJJZCI6ODAsImlhdCI6MTYyNzcyMzM5Mn0.f9Q-UZVduW6nt1s0L-3vYsrOJJ8iuSCSlJ9uu8yIxBI";
|
||||||
//域名地址http://request.one-clouds.com/api https://huoyun.mzxd56.com/api http://app.dahehuoyun.com/api
|
//域名地址http://request.one-clouds.com/api https://huoyun.mzxd56.com/api http://app.dahehuoyun.com/api
|
||||||
public static String BASE_URL = BuildConfig.BASE_URL;
|
public static String BASE_URL = BuildConfig.BASE_URL;
|
||||||
//版本更新/app/check/version
|
//版本更新/app/check/version
|
||||||
public static String VERSION ="/app/check/version";
|
public static String VERSION = "/app/check/version";
|
||||||
//全部代码
|
//全部代码
|
||||||
public static String CODE_DATA ="/common/dic/listdata";
|
public static String CODE_DATA = "/common/dic/listdata";
|
||||||
//短信验证码
|
//短信验证码
|
||||||
private static final String SEND_CODE = "/common/sendcode";
|
private static final String SEND_CODE = "/common/sendcode";
|
||||||
//登录
|
//登录
|
||||||
private static final String REG="/common/register";
|
private static final String REG = "/common/register";
|
||||||
//注册
|
//注册
|
||||||
private static final String LOGIN="/common/register";
|
private static final String LOGIN = "/common/register";
|
||||||
//上传文件
|
//上传文件
|
||||||
private static final String UPLOAD="/common/resource/upload";
|
private static final String UPLOAD = "/common/resource/upload";
|
||||||
//配置项信息
|
//配置项信息
|
||||||
private static final String CONFIG="/common/config/list";
|
private static final String CONFIG = "/common/config/list";
|
||||||
//获取开屏页图片和轮播图
|
//获取开屏页图片和轮播图
|
||||||
private static final String GET_IMAGE="/common/resource/image/config";
|
private static final String GET_IMAGE = "/common/resource/image/config";
|
||||||
//司机认证信息
|
//司机认证信息
|
||||||
private static final String DRIVER_AUTH_INFO="/app/driver/auth/authInfo";
|
private static final String DRIVER_AUTH_INFO = "/app/driver/auth/authInfo";
|
||||||
//货源大厅
|
//货源大厅
|
||||||
private static final String GOODS_HALL="/app/driver/order/getHallList";
|
private static final String GOODS_HALL = "/app/driver/order/getHallList";
|
||||||
//历史成交货源
|
//历史成交货源
|
||||||
private static final String GET_EXAMPLE_LIST="/app/driver/order/getExampleList";
|
private static final String GET_EXAMPLE_LIST = "/app/driver/order/getExampleList";
|
||||||
//货源详情
|
//货源详情
|
||||||
private static final String GOODS_DEL="/app/driver/order/findOrderInfoV2";
|
private static final String GOODS_DEL = "/app/driver/order/findOrderInfoV2";
|
||||||
//账户信息
|
//账户信息
|
||||||
private static final String USER="/app/user/getUserInfo";
|
private static final String USER = "/app/user/getUserInfo";
|
||||||
//银行卡列表
|
//银行卡列表
|
||||||
private static final String BANK_CARD_LIST="/app/bankCard/findPage";
|
private static final String BANK_CARD_LIST = "/app/bankCard/findPage";
|
||||||
//绑定银行卡
|
//绑定银行卡
|
||||||
private static final String INS_BANKCARD="/app/bankCard/bandCard";
|
private static final String INS_BANKCARD = "/app/bankCard/bandCard";
|
||||||
// private static final String INS_BANKCARD="/app/bankCard/save";
|
// private static final String INS_BANKCARD="/app/bankCard/save";
|
||||||
//删除银行卡
|
//删除银行卡
|
||||||
// private static final String DELETE_BANKCARD="/app/bankCard/deleteCard";
|
// private static final String DELETE_BANKCARD="/app/bankCard/deleteCard";
|
||||||
private static final String DELETE_BANKCARD="/app/bankCard/unBandCard";
|
private static final String DELETE_BANKCARD = "/app/bankCard/unBandCard";
|
||||||
//生成电子账户
|
//生成电子账户
|
||||||
private static final String ADD_CONTRACTS="/app/bank/addContracts";
|
private static final String ADD_CONTRACTS = "/app/bank/addContracts";
|
||||||
//获取电子账户
|
//获取电子账户
|
||||||
private static final String GET_CONTRACTS="/app/bank/getContracts";
|
private static final String GET_CONTRACTS = "/app/bank/getContracts";
|
||||||
//获取账户未读消息
|
//获取账户未读消息
|
||||||
private static final String XIAOXI_LIST="/app/message/findCurrentUserNotReadCount";
|
private static final String XIAOXI_LIST = "/app/message/findCurrentUserNotReadCount";
|
||||||
//获取账户消息
|
//获取账户消息
|
||||||
private static final String XIAOXI_ALL="/app/message/findPage";
|
private static final String XIAOXI_ALL = "/app/message/findPage";
|
||||||
//已读消息
|
//已读消息
|
||||||
private static final String XIAOXI_DEL="/app/message/setReadById";
|
private static final String XIAOXI_DEL = "/app/message/setReadById";
|
||||||
//已读全部消息
|
//已读全部消息
|
||||||
private static final String XIAOXI_DEL_ALL="/app/message/setReadAll";
|
private static final String XIAOXI_DEL_ALL = "/app/message/setReadAll";
|
||||||
//运单列表
|
//运单列表
|
||||||
private static final String ORDER_LIST="/app/driver/waybill/listV2";
|
private static final String ORDER_LIST = "/app/driver/waybill/listV2";
|
||||||
//抢单
|
//抢单
|
||||||
private static final String AGREE_ORDER="/app/driver/waybill/grabDriverOrdersContruct";
|
private static final String AGREE_ORDER = "/app/driver/waybill/grabDriverOrdersContruct";
|
||||||
//获取正在执行的运单/运单详情
|
//获取正在执行的运单/运单详情
|
||||||
private static final String GET_START_ORDER="/app/driver/waybill/getExecuteWaybill";
|
private static final String GET_START_ORDER = "/app/driver/waybill/getExecuteWaybill";
|
||||||
//查看承运合同
|
//查看承运合同
|
||||||
private static final String GET_CARRY_CONTRACT="/common/appContract/findCarrierContract";
|
private static final String GET_CARRY_CONTRACT = "/common/appContract/findCarrierContract";
|
||||||
//评价信息保存
|
//评价信息保存
|
||||||
private static final String EVALUATIONV2="/app/driver/waybill/evaluationV2";
|
private static final String EVALUATIONV2 = "/app/driver/waybill/evaluationV2";
|
||||||
//装货
|
//装货
|
||||||
private static final String LOADING="/app/driver/waybill/loadingV2";
|
private static final String LOADING = "/app/driver/waybill/loadingV2";
|
||||||
//卸货
|
//卸货
|
||||||
private static final String UNLOADING="/app/driver/waybill/unloadV2";
|
private static final String UNLOADING = "/app/driver/waybill/unloadV2";
|
||||||
|
//卸货-补传
|
||||||
|
private static final String UNLOADING4 = "/app/driver/waybill/unloadV4";
|
||||||
//上传回单
|
//上传回单
|
||||||
private static final String UPLOAD_RECEIPT="/app/driver/waybill/uploadReceipt";
|
private static final String UPLOAD_RECEIPT = "/app/driver/waybill/uploadReceipt";
|
||||||
//轨迹跟踪
|
//轨迹跟踪
|
||||||
private static final String TRACK_TRACKING="/app/driver/waybill/addAppLocation";
|
private static final String TRACK_TRACKING = "/app/driver/waybill/addAppLocation";
|
||||||
//获取评价信息
|
//获取评价信息
|
||||||
private static final String GET_EVALUATE="/app/driver/waybill/listAppraises";
|
private static final String GET_EVALUATE = "/app/driver/waybill/listAppraises";
|
||||||
//获取投诉信息
|
//获取投诉信息
|
||||||
private static final String GET_COMPLAINT="/app/driver/waybill/listComplaint";
|
private static final String GET_COMPLAINT = "/app/driver/waybill/listComplaint";
|
||||||
//保存投诉信息
|
//保存投诉信息
|
||||||
private static final String COMPLAINT="/app/driver/waybill/complaintV2";
|
private static final String COMPLAINT = "/app/driver/waybill/complaintV2";
|
||||||
//保存评价信息
|
//保存评价信息
|
||||||
private static final String EVALUATION_V2="/app/driver/waybill/evaluationV2";
|
private static final String EVALUATION_V2 = "/app/driver/waybill/evaluationV2";
|
||||||
//车辆列表
|
//车辆列表
|
||||||
private static final String GET_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识别--
|
//--ORC识别--
|
||||||
|
|
||||||
//银行卡识别
|
//银行卡识别
|
||||||
private static final String ORC_BANK="/common/ocr/bank";
|
private static final String ORC_BANK = "/common/ocr/bank";
|
||||||
//身份证正面
|
//身份证正面
|
||||||
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_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_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_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 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
|
//车牌号2
|
||||||
private static final String PLATE_LICENSE2="/common/aliyun/ocr/RecognizeCarNumber";
|
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";
|
||||||
|
|
||||||
public static String getCarAudit(){
|
public static String getCarAudit() {
|
||||||
return BASE_URL +CAR_AUDIT;
|
return BASE_URL + CAR_AUDIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCarColor(){
|
public static String getCarColor() {
|
||||||
return BASE_URL +CAR_COLOR;
|
return BASE_URL + CAR_COLOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCarEnergyType(){
|
public static String getCarEnergyType() {
|
||||||
return BASE_URL + CAR_ENERGYTYPE;
|
return BASE_URL + CAR_ENERGYTYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//app/driver/auth/driverExpire
|
//app/driver/auth/driverExpire
|
||||||
public static final String GET_CERTIFICATE_EXPIRED="/app/driver/auth/driverExpire";
|
public static final String GET_CERTIFICATE_EXPIRED = "/app/driver/auth/driverExpire";
|
||||||
|
|
||||||
public static String getSendCodeUrl() {
|
public static String getSendCodeUrl() {
|
||||||
return BASE_URL +SEND_CODE;
|
return BASE_URL + SEND_CODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getREGUrl() {
|
public static String getREGUrl() {
|
||||||
return BASE_URL +REG;
|
return BASE_URL + REG;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getLoginUrl() {
|
public static String getLoginUrl() {
|
||||||
return BASE_URL +LOGIN;
|
return BASE_URL + LOGIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDriverAuthInfoUrl() {
|
public static String getDriverAuthInfoUrl() {
|
||||||
return BASE_URL +DRIVER_AUTH_INFO;
|
return BASE_URL + DRIVER_AUTH_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGoodsHallUrl() {
|
public static String getGoodsHallUrl() {
|
||||||
return BASE_URL +GOODS_HALL;
|
return BASE_URL + GOODS_HALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGoodsDelUrl() {
|
public static String getGoodsDelUrl() {
|
||||||
return BASE_URL +GOODS_DEL;
|
return BASE_URL + GOODS_DEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getUserUrl() {
|
public static String getUserUrl() {
|
||||||
@@ -209,201 +214,243 @@ public class RequestConstant {
|
|||||||
return BASE_URL + BANK_CARD_LIST;
|
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() {
|
public static String getOrderList() {
|
||||||
return BASE_URL +ORDER_LIST;
|
return BASE_URL + ORDER_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getAgreeOrder() {
|
public static String getAgreeOrder() {
|
||||||
return BASE_URL +AGREE_ORDER;
|
return BASE_URL + AGREE_ORDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetStartOrder() {
|
public static String getGetStartOrder() {
|
||||||
return BASE_URL +GET_START_ORDER;
|
return BASE_URL + GET_START_ORDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetCarryContract() {
|
public static String getGetCarryContract() {
|
||||||
return BASE_URL +GET_CARRY_CONTRACT;
|
return BASE_URL + GET_CARRY_CONTRACT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getEVALUATIONV2() {
|
public static String getEVALUATIONV2() {
|
||||||
return BASE_URL +EVALUATIONV2;
|
return BASE_URL + EVALUATIONV2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getLOADING() {
|
public static String getLOADING() {
|
||||||
return BASE_URL +LOADING;
|
return BASE_URL + LOADING;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getUNLOADING() {
|
public static String getUNLOADING() {
|
||||||
return BASE_URL +UNLOADING;
|
return BASE_URL + UNLOADING;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getUNLOADING4() {
|
||||||
|
return BASE_URL + UNLOADING4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetEvaluate() {
|
public static String getGetEvaluate() {
|
||||||
return BASE_URL +GET_EVALUATE;
|
return BASE_URL + GET_EVALUATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetComplaint() {
|
public static String getGetComplaint() {
|
||||||
return BASE_URL +GET_COMPLAINT;
|
return BASE_URL + GET_COMPLAINT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getOrcBank() {
|
public static String getOrcBank() {
|
||||||
return BASE_URL +ORC_BANK;
|
return BASE_URL + ORC_BANK;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getIdCardFront() {
|
public static String getIdCardFront() {
|
||||||
return BASE_URL +ID_CARD_FRONT;
|
return BASE_URL + ID_CARD_FRONT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getIdCardBack() {
|
public static String getIdCardBack() {
|
||||||
return BASE_URL +ID_CARD_BACK;
|
return BASE_URL + ID_CARD_BACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDrivingLicense() {
|
public static String getDrivingLicense() {
|
||||||
return BASE_URL +DRIVING_LICENSE;
|
return BASE_URL + DRIVING_LICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDrivingLicenseBack() {
|
public static String getDrivingLicenseBack() {
|
||||||
return BASE_URL +DRIVING_LICENSE_BACK;
|
return BASE_URL + DRIVING_LICENSE_BACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getVehicleLicense() {
|
public static String getVehicleLicense() {
|
||||||
return BASE_URL +VEHICLE_LICENSE;
|
return BASE_URL + VEHICLE_LICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getVehicleLicenseBack() {
|
public static String getVehicleLicenseBack() {
|
||||||
return BASE_URL +VEHICLE_LICENSE_BACK;
|
return BASE_URL + VEHICLE_LICENSE_BACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetCarList() {
|
public static String getGetCarList() {
|
||||||
return BASE_URL +GET_CAR_LIST;
|
return BASE_URL + GET_CAR_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetCarDel() {
|
public static String getGetCarDel() {
|
||||||
return BASE_URL +GET_CAR_DEL;
|
return BASE_URL + GET_CAR_DEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCodeData() {
|
public static String getCodeData() {
|
||||||
return BASE_URL +CODE_DATA;
|
return BASE_URL + CODE_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getIsauthIdcard() {
|
public static String getIsauthIdcard() {
|
||||||
return BASE_URL +ISAUTH_IDCARD;
|
return BASE_URL + ISAUTH_IDCARD;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getIsauthDriverauthLicense() { 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 getDRIVERAUTHIDCARD() {
|
public static String getDRIVERAUTHIDCARD() {
|
||||||
return BASE_URL +DRIVERAUTHIDCARD;
|
return BASE_URL + DRIVERAUTHIDCARD;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDRIVERAUTHLICENSE() {
|
public static String getDRIVERAUTHLICENSE() {
|
||||||
return BASE_URL +DRIVERAUTHLICENSE;
|
return BASE_URL + DRIVERAUTHLICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getSAVEVEHICLELICENSE() {
|
public static String getSAVEVEHICLELICENSE() {
|
||||||
return BASE_URL +SAVEVEHICLELICENSE;
|
return BASE_URL + SAVEVEHICLELICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getSAVECARIMG() {
|
public static String getSAVECARIMG() {
|
||||||
return BASE_URL +SAVECARIMG;
|
return BASE_URL + SAVECARIMG;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getUploadHead() { return BASE_URL +UPLOAD_HEAD; }
|
public static String getUploadHead() {
|
||||||
|
return BASE_URL + UPLOAD_HEAD;
|
||||||
|
}
|
||||||
|
|
||||||
public static String getInsBankcard() {
|
public static String getInsBankcard() {
|
||||||
return BASE_URL +INS_BANKCARD;
|
return BASE_URL + INS_BANKCARD;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDelCar() { 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() {
|
public static String getIsAuthDriverAuthQualification() {
|
||||||
return BASE_URL+IS_AUTH_DRIVER_AUTH_QUALIFICATION;
|
return BASE_URL + IS_AUTH_DRIVER_AUTH_QUALIFICATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getVERSION() {
|
public static String getVERSION() {
|
||||||
return BASE_URL+VERSION;
|
return BASE_URL + VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getAddContracts() {
|
public static String getAddContracts() {
|
||||||
return BASE_URL+ADD_CONTRACTS;
|
return BASE_URL + ADD_CONTRACTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetContracts() {
|
public static String getGetContracts() {
|
||||||
return BASE_URL+GET_CONTRACTS;
|
return BASE_URL + GET_CONTRACTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getTIXIAN() {
|
public static String getTIXIAN() {
|
||||||
return BASE_URL+TIXIAN;
|
return BASE_URL + TIXIAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getPartyMember() {
|
public static String getPartyMember() {
|
||||||
return BASE_URL+PARTY_MEMBER;
|
return BASE_URL + PARTY_MEMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCONFIG() {
|
public static String getCONFIG() {
|
||||||
return BASE_URL+CONFIG;
|
return BASE_URL + CONFIG;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getChangeRecord() {
|
public static String getChangeRecord() {
|
||||||
return BASE_URL+CHANGE_RECORD;
|
return BASE_URL + CHANGE_RECORD;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getChangeCharge() {
|
public static String getChangeCharge() {
|
||||||
return BASE_URL+WITHDRAWALS_CHARGE;
|
return BASE_URL + WITHDRAWALS_CHARGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getChangeConfig() {
|
public static String getChangeConfig() {
|
||||||
return BASE_URL+WITHDRAWALS_CONFIG;
|
return BASE_URL + WITHDRAWALS_CONFIG;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetErrorOrder() { return BASE_URL+GET_ERROR_ORDER; }
|
public static String getGetErrorOrder() {
|
||||||
|
return BASE_URL + GET_ERROR_ORDER;
|
||||||
|
}
|
||||||
|
|
||||||
public static String getGetExampleList() {
|
public static String getGetExampleList() {
|
||||||
return BASE_URL+GET_EXAMPLE_LIST;
|
return BASE_URL + GET_EXAMPLE_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getAuthUrl() {
|
public static String getAuthUrl() {
|
||||||
return BASE_URL+AUTH_URL;
|
return BASE_URL + AUTH_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getPlateLicense() {
|
public static String getPlateLicense() {
|
||||||
return BASE_URL+PLATE_LICENSE;
|
return BASE_URL + PLATE_LICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getPlateLicense2() {
|
public static String getPlateLicense2() {
|
||||||
return BASE_URL+PLATE_LICENSE2;
|
return BASE_URL + PLATE_LICENSE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetImage() {
|
public static String getGetImage() {
|
||||||
return BASE_URL+GET_IMAGE;
|
return BASE_URL + GET_IMAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getGetCertificateExpired() {
|
public static String getGetCertificateExpired() {
|
||||||
return BASE_URL+GET_CERTIFICATE_EXPIRED;
|
return BASE_URL + GET_CERTIFICATE_EXPIRED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,15 @@ public class LUInputBean {
|
|||||||
private String locationAddress;
|
private String locationAddress;
|
||||||
private String longitude;
|
private String longitude;
|
||||||
private String waybillId;
|
private String waybillId;
|
||||||
|
private String realLoadTime;
|
||||||
|
|
||||||
|
public String getRealLoadTime() {
|
||||||
|
return realLoadTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRealLoadTime(String realLoadTime) {
|
||||||
|
this.realLoadTime = realLoadTime;
|
||||||
|
}
|
||||||
|
|
||||||
public List<Integer> getImageId() {
|
public List<Integer> getImageId() {
|
||||||
return imageId;
|
return imageId;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import android.util.Log;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||||
@@ -27,11 +28,14 @@ public class MakeUpService extends Service {
|
|||||||
public void palyMp3(){
|
public void palyMp3(){
|
||||||
Log.e("开始播放","-----");
|
Log.e("开始播放","-----");
|
||||||
try {
|
try {
|
||||||
AssetFileDescriptor fd =getAssets().openFd("kujp9scu.mp3");
|
MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.kujp9scu);
|
||||||
mediaPlayer.setDataSource(fd);
|
mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
|
||||||
mediaPlayer.setLooping(false);//设置为循环播放
|
@Override
|
||||||
mediaPlayer.prepare();//初始化播放器MediaPlayer
|
public void onPrepared(MediaPlayer mediaPlayer) {
|
||||||
mediaPlayer.start();
|
mediaPlayer.start();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mediaPlayer.prepareAsync();
|
||||||
Log.e("播放成功","-----");
|
Log.e("播放成功","-----");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -3,12 +3,15 @@ package com.arpa.hndahesudintocctmsdriver.service;
|
|||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.os.Environment;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.amap.api.location.AMapLocation;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.FileIOUtils;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.BaseBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||||
@@ -18,8 +21,13 @@ import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
import java.util.logging.Filter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author hlh
|
* @author hlh
|
||||||
@@ -32,7 +40,7 @@ public class TrackService extends Service {
|
|||||||
private Context con;
|
private Context con;
|
||||||
private TrackInputBean tib=new TrackInputBean();
|
private TrackInputBean tib=new TrackInputBean();
|
||||||
private LocationGDUtil l;
|
private LocationGDUtil l;
|
||||||
private int timeSum=1000*60*3;
|
private int timeSum=1000*60;
|
||||||
private String snn="";
|
private String snn="";
|
||||||
private Gson gson=new Gson();
|
private Gson gson=new Gson();
|
||||||
private HuoYuanRequset hyr;
|
private HuoYuanRequset hyr;
|
||||||
@@ -51,7 +59,30 @@ public class TrackService extends Service {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LocationGDUtil.RES:
|
case LocationGDUtil.RES:
|
||||||
genzong();
|
if(CacheGroup.cacheList.get("getLocation")!=null){
|
||||||
|
AMapLocation location = gson.fromJson(CacheGroup.cacheList.get("getLocation"), AMapLocation.class);
|
||||||
|
String time2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||||
|
String time = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
||||||
|
// 当前时间:${time2},经纬度:${it.latitude}:${it.longitude}
|
||||||
|
FileIOUtils.writeFileFromString(
|
||||||
|
Environment.getExternalStorageDirectory()
|
||||||
|
.toString() + "/crashinfo/" + "crash-"+time+".txt",
|
||||||
|
"当前时间:"+time2+",经纬度:"+location.getLatitude()+":"+location.getLongitude(),
|
||||||
|
true
|
||||||
|
);
|
||||||
|
// genzong(location);
|
||||||
|
CacheGroup.cacheList.remove("getLocation");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
String time2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||||
|
String time = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
||||||
|
FileIOUtils.writeFileFromString(
|
||||||
|
Environment.getExternalStorageDirectory()
|
||||||
|
.toString() + "/crashinfo/" + "crash-"+time+".txt",
|
||||||
|
"当前时间:"+time2+",定位失败",
|
||||||
|
true
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -94,13 +125,13 @@ public class TrackService extends Service {
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void genzong(){
|
public void genzong(AMapLocation location){
|
||||||
//经度
|
//经度
|
||||||
tib.setLatitude(l.getLatitude()+"");
|
tib.setLatitude(location.getLatitude()+"");
|
||||||
//纬度
|
//纬度
|
||||||
tib.setLongitude(l.getLongitude()+"");
|
tib.setLongitude(location.getLongitude()+"");
|
||||||
Log.e("经度",l.getLatitude()+"");
|
Log.e("经度",location.getLatitude()+"");
|
||||||
Log.e("维度",l.getLongitude()+"");
|
Log.e("维度",location.getLongitude()+"");
|
||||||
//单号
|
//单号
|
||||||
tib.setShippingNoteNumber(snn);
|
tib.setShippingNoteNumber(snn);
|
||||||
hyr.trackTracking(tib);
|
hyr.trackTracking(tib);
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ class MainActivity : BaseAppCompatActivity() {
|
|||||||
Manifest.permission.ACCESS_BACKGROUND_LOCATION,
|
Manifest.permission.ACCESS_BACKGROUND_LOCATION,
|
||||||
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||||
|
Manifest.permission.CALL_PHONE,
|
||||||
Manifest.permission.RECORD_AUDIO,
|
Manifest.permission.RECORD_AUDIO,
|
||||||
Manifest.permission.CAMERA)
|
Manifest.permission.CAMERA)
|
||||||
.request { allGranted, grantedList, deniedList ->
|
.request { allGranted, grantedList, deniedList ->
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui.alert;
|
package com.arpa.hndahesudintocctmsdriver.ui.alert;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.provider.Settings;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
@@ -12,6 +16,8 @@ import androidx.annotation.NonNull;
|
|||||||
|
|
||||||
import com.king.app.updater.AppUpdater;
|
import com.king.app.updater.AppUpdater;
|
||||||
import com.king.app.updater.callback.AppUpdateCallback;
|
import com.king.app.updater.callback.AppUpdateCallback;
|
||||||
|
import com.king.app.updater.constant.Constants;
|
||||||
|
import com.king.app.updater.util.AppUtils;
|
||||||
import com.lxj.xpopup.core.CenterPopupView;
|
import com.lxj.xpopup.core.CenterPopupView;
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
|
|
||||||
@@ -27,11 +33,11 @@ import java.io.File;
|
|||||||
*/
|
*/
|
||||||
public class UpAppAlert extends CenterPopupView {
|
public class UpAppAlert extends CenterPopupView {
|
||||||
|
|
||||||
private TextView content,vs;
|
private TextView content, vs, tvContent;
|
||||||
private Button tv_cancel,tv_confirm;
|
private Button tv_cancel, tv_confirm, tvOk;
|
||||||
private LinearLayout up_div;
|
private LinearLayout up_div;
|
||||||
private String url="";
|
private String url = "";
|
||||||
private String body="";
|
private String body = "";
|
||||||
private Context con;
|
private Context con;
|
||||||
private ProgressBar progress_view;
|
private ProgressBar progress_view;
|
||||||
private String version;
|
private String version;
|
||||||
@@ -39,19 +45,20 @@ public class UpAppAlert extends CenterPopupView {
|
|||||||
private LinearLayout force_box;
|
private LinearLayout force_box;
|
||||||
private ImageButton force_btn;
|
private ImageButton force_btn;
|
||||||
|
|
||||||
public UpAppAlert(@NonNull @NotNull Context context, String url, String body,String version,String force) {
|
public UpAppAlert(@NonNull @NotNull Context context, String url, String body, String version, String force) {
|
||||||
super(context);
|
super(context);
|
||||||
con=context;
|
con = context;
|
||||||
this.url=url;
|
this.url = url;
|
||||||
this.body=body;
|
this.body = body;
|
||||||
this.version=version;
|
this.version = version;
|
||||||
this.force=force;
|
this.force = force;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getImplLayoutId() {
|
protected int getImplLayoutId() {
|
||||||
return R.layout.alert_up_app;
|
return R.layout.alert_up_app;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UpAppAlert(@NonNull @NotNull Context context) {
|
public UpAppAlert(@NonNull @NotNull Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
|
|
||||||
@@ -60,15 +67,17 @@ public class UpAppAlert extends CenterPopupView {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
content=findViewById(R.id.tv_content);
|
content = findViewById(R.id.tv_content);
|
||||||
tv_cancel=findViewById(R.id.tv_cancel);
|
tv_cancel = findViewById(R.id.tv_cancel);
|
||||||
tv_confirm=findViewById(R.id.tv_confirm);
|
tv_confirm = findViewById(R.id.tv_confirm);
|
||||||
up_div=findViewById(R.id.up_div);
|
tvContent = findViewById(R.id.tvContent);
|
||||||
progress_view=findViewById(R.id.progress);
|
tvOk = findViewById(R.id.tvOk);
|
||||||
content=findViewById(R.id.tv_content);
|
up_div = findViewById(R.id.up_div);
|
||||||
force_box=findViewById(R.id.force_box);
|
progress_view = findViewById(R.id.progress);
|
||||||
force_btn=findViewById(R.id.force_btn);
|
content = findViewById(R.id.tv_content);
|
||||||
if(force.equals("1")){
|
force_box = findViewById(R.id.force_box);
|
||||||
|
force_btn = findViewById(R.id.force_btn);
|
||||||
|
if (force.equals("1")) {
|
||||||
force_box.setVisibility(GONE);
|
force_box.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
force_btn.setOnClickListener(v -> {
|
force_btn.setOnClickListener(v -> {
|
||||||
@@ -76,16 +85,16 @@ public class UpAppAlert extends CenterPopupView {
|
|||||||
dismiss();
|
dismiss();
|
||||||
//detachFromHost();
|
//detachFromHost();
|
||||||
});
|
});
|
||||||
vs=findViewById(R.id.vs);
|
vs = findViewById(R.id.vs);
|
||||||
content.setText(body);
|
content.setText(body);
|
||||||
vs.setText(version);
|
vs.setText(version);
|
||||||
tv_cancel.setOnClickListener(v -> {
|
tv_cancel.setOnClickListener(v -> {
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
});
|
});
|
||||||
tv_confirm.setOnClickListener(v -> {
|
tv_confirm.setOnClickListener(v -> {
|
||||||
new AppUpdater.Builder()
|
new AppUpdater.Builder(con)
|
||||||
.setUrl(url)
|
.setUrl(url)
|
||||||
.build(con)
|
.build()
|
||||||
.setUpdateCallback(new AppUpdateCallback() {
|
.setUpdateCallback(new AppUpdateCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onStart(String url) {
|
public void onStart(String url) {
|
||||||
@@ -93,23 +102,28 @@ public class UpAppAlert extends CenterPopupView {
|
|||||||
tv_confirm.setVisibility(GONE);
|
tv_confirm.setVisibility(GONE);
|
||||||
up_div.setVisibility(VISIBLE);
|
up_div.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onProgress(long progress, long total, boolean isChange) {
|
public void onProgress(long progress, long total, boolean isChange) {
|
||||||
// Log.e("progress",progress+"");
|
// Log.e("progress",progress+"");
|
||||||
// Log.e("total",total+"");
|
// Log.e("total",total+"");
|
||||||
// Log.e("isChange",isChange+"");
|
// Log.e("isChange",isChange+"");
|
||||||
float sum=progress;
|
float sum = progress;
|
||||||
float max=total;
|
float max = total;
|
||||||
if(progress>0){
|
if (progress > 0) {
|
||||||
float b=sum/max;
|
float b = sum / max;
|
||||||
Log.e("百分比",(100*b)+"");
|
Log.e("百分比", (100 * b) + "");
|
||||||
progress_view.setProgress((int) (100*b));
|
progress_view.setProgress((int) (100 * b));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish(File file) {
|
public void onFinish(File file) {
|
||||||
|
tvContent.setText("下载完成,请及时安装!");
|
||||||
|
tvOk.setVisibility(VISIBLE);
|
||||||
|
tvOk.setOnClickListener(v1 -> {
|
||||||
|
AppUtils.installApk(getContext(), file, getContext().getPackageName() + Constants.DEFAULT_FILE_PROVIDER);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.start();
|
.start();
|
||||||
|
|||||||
+48
-7
@@ -18,10 +18,13 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.esign.esignsdk.EsignSdk;
|
import com.esign.esignsdk.EsignSdk;
|
||||||
|
import com.esign.esignsdk.data.AuthEvent;
|
||||||
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
||||||
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode;
|
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@@ -45,6 +48,8 @@ import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
import com.lxj.xpopup.util.SmartGlideImageLoader;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -101,6 +106,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthQualification"), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthQualification"), BaseBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
// initAuth();
|
// initAuth();
|
||||||
|
isAuth = true;
|
||||||
//判断是否从车辆进来 carId为空从个人认证进来需跳转实名认证,不为空车辆信息进入,需跳转车辆照片
|
//判断是否从车辆进来 carId为空从个人认证进来需跳转实名认证,不为空车辆信息进入,需跳转车辆照片
|
||||||
if (TextUtils.isEmpty(carId)) {
|
if (TextUtils.isEmpty(carId)) {
|
||||||
//从业资格证->实名认证
|
//从业资格证->实名认证
|
||||||
@@ -155,6 +161,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
// finish();
|
// finish();
|
||||||
EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
EsignSdk.getInstance().startH5Activity(act, StringUtil.isNull(String.valueOf(bb.getData()), ""));
|
||||||
} else {
|
} else {
|
||||||
|
finish();
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_LONG).show();
|
||||||
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||||
CacheGroup.cacheList.remove("authUrl");
|
CacheGroup.cacheList.remove("authUrl");
|
||||||
@@ -229,6 +236,11 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
gia.showPopueWindow(this);
|
gia.showPopueWindow(this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
up_img.setOnClickListener(v -> {
|
||||||
|
if (!isAuth) {
|
||||||
|
gia.showPopueWindow(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
img.setOnClickListener(v -> {
|
img.setOnClickListener(v -> {
|
||||||
if (!"".equals(url)) {
|
if (!"".equals(url)) {
|
||||||
new XPopup.Builder(con).asImageViewer(img, url, new SmartGlideImageLoader(R.mipmap.ic_launcher_round)).show();
|
new XPopup.Builder(con).asImageViewer(img, url, new SmartGlideImageLoader(R.mipmap.ic_launcher_round)).show();
|
||||||
@@ -238,19 +250,21 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
value2.setOnClickListener(v -> {
|
value2.setOnClickListener(v -> {
|
||||||
DatePicker picker = new DatePicker(this);
|
if (!isAuth) {
|
||||||
picker.setBodyWidth(300);
|
DatePicker picker = new DatePicker(this);
|
||||||
picker.setOnDatePickedListener((year, month, day) -> value2.setText(year + "-" + month + "-" + day));
|
picker.setBodyWidth(300);
|
||||||
picker.getWheelLayout().setDateMode(DateMode.YEAR_MONTH_DAY);
|
picker.setOnDatePickedListener((year, month, day) -> value2.setText(year + "-" + month + "-" + day));
|
||||||
picker.getWheelLayout().setDateLabel("年", "月", "日");
|
picker.getWheelLayout().setDateMode(DateMode.YEAR_MONTH_DAY);
|
||||||
picker.show();
|
picker.getWheelLayout().setDateLabel("年", "月", "日");
|
||||||
|
picker.show();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
submit.setOnClickListener(v -> {
|
submit.setOnClickListener(v -> {
|
||||||
if (!isAuth) {
|
if (!isAuth) {
|
||||||
String id = value1.getText() + "";
|
String id = value1.getText() + "";
|
||||||
String date = value2.getText() + "";
|
String date = value2.getText() + "";
|
||||||
if ("0".equals(type)) {
|
if ("0".equals(type)) {
|
||||||
if (!"".equals(id) && !"".equals(date) && !"".equals(url)) {
|
if (!"".equals(date) && !"".equals(url)) {
|
||||||
new AuthRequest().driverAuthQualification(con, hd, id, ub.getData().getId(), date);
|
new AuthRequest().driverAuthQualification(con, hd, id, ub.getData().getId(), date);
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
||||||
@@ -374,4 +388,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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+89
-22
@@ -37,6 +37,7 @@ import com.bumptech.glide.Glide;
|
|||||||
import com.bumptech.glide.request.RequestOptions;
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.bumptech.glide.request.target.Target;
|
import com.bumptech.glide.request.target.Target;
|
||||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
import com.esign.esignsdk.EsignSdk;
|
import com.esign.esignsdk.EsignSdk;
|
||||||
import com.esign.esignsdk.data.AuthEvent;
|
import com.esign.esignsdk.data.AuthEvent;
|
||||||
import com.github.gzuliyujiang.wheelpicker.contract.OnOptionPickedListener;
|
import com.github.gzuliyujiang.wheelpicker.contract.OnOptionPickedListener;
|
||||||
@@ -157,6 +158,9 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
|| CacheGroup.cacheList.get("saveVehicleLicense") != null || CacheGroup.cacheList.get("authUrl") != null
|
|| CacheGroup.cacheList.get("saveVehicleLicense") != null || CacheGroup.cacheList.get("authUrl") != null
|
||||||
|| CacheGroup.cacheList.get("saveDrawCar") != null) {
|
|| CacheGroup.cacheList.get("saveDrawCar") != null) {
|
||||||
if (CacheGroup.cacheList.get("driverAuthIdCard") != null) {
|
if (CacheGroup.cacheList.get("driverAuthIdCard") != null) {
|
||||||
|
if (customDialog != null) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthIdCard"), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthIdCard"), BaseBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show();
|
||||||
@@ -174,6 +178,9 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("driverAuthLicense") != null) {
|
if (CacheGroup.cacheList.get("driverAuthLicense") != null) {
|
||||||
|
if (customDialog != null) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthLicense"), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("driverAuthLicense"), BaseBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show();
|
||||||
@@ -206,6 +213,9 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CacheGroup.cacheList.get("saveVehicleLicense") != null) {
|
if (CacheGroup.cacheList.get("saveVehicleLicense") != null) {
|
||||||
|
if (customDialog != null) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
CarZhengBean czb = gson.fromJson(CacheGroup.cacheList.get("saveVehicleLicense"), CarZhengBean.class);
|
CarZhengBean czb = gson.fromJson(CacheGroup.cacheList.get("saveVehicleLicense"), CarZhengBean.class);
|
||||||
if (czb.getCode() == 200) {
|
if (czb.getCode() == 200) {
|
||||||
String needUpQCPhoto = czb.getData().getNeedUpQCPhoto();//是否需要上传从业资格证
|
String needUpQCPhoto = czb.getData().getNeedUpQCPhoto();//是否需要上传从业资格证
|
||||||
@@ -214,13 +224,19 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
Toast.makeText(con, "车辆行驶证保存成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "车辆行驶证保存成功", Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
VehicleEvent ve = new VehicleEvent(String.valueOf(czb.getData().getCarId()));
|
VehicleEvent ve = new VehicleEvent(String.valueOf(czb.getData().getCarId()));
|
||||||
EventBus.getDefault().post(ve);
|
EventBus.getDefault().postSticky(ve);
|
||||||
|
|
||||||
// TODO: 2023/8/23
|
// TODO: 2023/8/23
|
||||||
if ("1".equals(isTrailer)) {//判断是否跳转挂车行驶证
|
if ("1".equals(isTrailer)) {//判断是否跳转挂车行驶证
|
||||||
Intent in = new Intent(con, CertificatesActivity.class);
|
Intent in = new Intent(con, CertificatesActivity.class);
|
||||||
in.putExtra("index", 3);
|
in.putExtra("index", 3);
|
||||||
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
||||||
|
if (olb != null && olb.getData() != null && olb.getData().isCarExist()) {
|
||||||
|
CarDelBean carDelBean = new CarDelBean();
|
||||||
|
carDelBean.setRes(1);//保留字段 1:为绑定车辆,可以进行修改挂车信息
|
||||||
|
carDelBean.setData(gson.fromJson(gson.toJson(olb.getData().getExistCarInfo()), CarDelBean.DataDTO.class));
|
||||||
|
in.putExtra("cheData", gson.toJson(carDelBean));
|
||||||
|
}
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
} else if ("1".equals(needUpQCPhoto)) {//判断是否跳转从业资格证
|
} else if ("1".equals(needUpQCPhoto)) {//判断是否跳转从业资格证
|
||||||
Intent in = new Intent(con, AuthQualificationActivity.class);
|
Intent in = new Intent(con, AuthQualificationActivity.class);
|
||||||
@@ -231,6 +247,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
} else if ("1".equals(needUpRLPhoto)) {//判断是否跳转道路运输许可证
|
} else if ("1".equals(needUpRLPhoto)) {//判断是否跳转道路运输许可证
|
||||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
in.putExtra("type", 3);
|
in.putExtra("type", 3);
|
||||||
|
in.putExtra("carExist", true);
|
||||||
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
in.putExtra("carId", String.valueOf(czb.getData().getCarId()));
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
} else {
|
} else {
|
||||||
@@ -263,6 +280,9 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
CacheGroup.cacheList.remove("saveVehicleLicense");
|
CacheGroup.cacheList.remove("saveVehicleLicense");
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("saveDrawCar") != null) {
|
if (CacheGroup.cacheList.get("saveDrawCar") != null) {
|
||||||
|
if (customDialog != null) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
Log.e("-saveDrawCar-", CacheGroup.cacheList.get("saveDrawCar"));
|
Log.e("-saveDrawCar-", CacheGroup.cacheList.get("saveDrawCar"));
|
||||||
CarZhengBean bb = gson.fromJson(CacheGroup.cacheList.get("saveDrawCar"), CarZhengBean.class);
|
CarZhengBean bb = gson.fromJson(CacheGroup.cacheList.get("saveDrawCar"), CarZhengBean.class);
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
@@ -283,6 +303,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
} else if ("1".equals(needUpRLPhoto)) {//现判断是否跳转道路运输许可证
|
} else if ("1".equals(needUpRLPhoto)) {//现判断是否跳转道路运输许可证
|
||||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
in.putExtra("type", 3);
|
in.putExtra("type", 3);
|
||||||
|
in.putExtra("carExist", true);
|
||||||
in.putExtra("carId", carId);
|
in.putExtra("carId", carId);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
} else {
|
} else {
|
||||||
@@ -336,8 +357,11 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
}//Log.e("url",CacheGroup.cacheList.get("authUrl"));
|
||||||
CacheGroup.cacheList.remove("authUrl");
|
CacheGroup.cacheList.remove("authUrl");
|
||||||
} else {
|
} else {
|
||||||
|
//重复代码?
|
||||||
initView(null);
|
initView(null);
|
||||||
initData();
|
if (!(CacheGroup.cacheList.get(TYPE_NAME_BANK[2]) != null || CacheGroup.cacheList.get(TYPE_NAME_BANK[3]) != null)) {
|
||||||
|
initData();
|
||||||
|
}
|
||||||
pathOrcRes();
|
pathOrcRes();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -415,6 +439,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
// there_div.setVisibility(View.VISIBLE);
|
// there_div.setVisibility(View.VISIBLE);
|
||||||
if (c_str != null && !c_str.equals("")) {
|
if (c_str != null && !c_str.equals("")) {
|
||||||
cdb = gson.fromJson(c_str, CarDelBean.class);
|
cdb = gson.fromJson(c_str, CarDelBean.class);
|
||||||
|
oCrcarId = cdb.getData().getTrailerResVo().getTrailerLicenseId() + "";
|
||||||
initView(null);
|
initView(null);
|
||||||
initData();
|
initData();
|
||||||
} else {
|
} else {
|
||||||
@@ -660,7 +685,9 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
Log.e("挂车信息", gson.toJson(cdb));
|
Log.e("挂车信息", gson.toJson(cdb));
|
||||||
if (cdb != null && cdb.getData().getTrailerResVo() != null) {
|
if (cdb != null && cdb.getData().getTrailerResVo() != null
|
||||||
|
&& !TextUtils.isEmpty(cdb.getData().getTrailerResVo().getFrontImage())
|
||||||
|
&& !TextUtils.isEmpty(cdb.getData().getTrailerResVo().getBackImage())) {
|
||||||
url1 = StringUtil.isNull(cdb.getData().getTrailerResVo().getFrontImage(), "");
|
url1 = StringUtil.isNull(cdb.getData().getTrailerResVo().getFrontImage(), "");
|
||||||
url2 = StringUtil.isNull(cdb.getData().getTrailerResVo().getBackImage(), "");
|
url2 = StringUtil.isNull(cdb.getData().getTrailerResVo().getBackImage(), "");
|
||||||
url3 = StringUtil.isNull(cdb.getData().getTrailerResVo().getThreeImage(), "");
|
url3 = StringUtil.isNull(cdb.getData().getTrailerResVo().getThreeImage(), "");
|
||||||
@@ -669,14 +696,16 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
value3.setText(StringUtil.isNull(cdb.getData().getTrailerResVo().getOwner(), "空数据"));
|
value3.setText(StringUtil.isNull(cdb.getData().getTrailerResVo().getOwner(), "空数据"));
|
||||||
value4.setText(StringUtil.isNull(cdb.getData().getTrailerResVo().getVehicleNumber(), "空数据"));
|
value4.setText(StringUtil.isNull(cdb.getData().getTrailerResVo().getVehicleNumber(), "空数据"));
|
||||||
value6.setText(StringUtil.isNull(cdb.getData().getCarEnergyTypValue(), "空数据"));
|
value6.setText(StringUtil.isNull(cdb.getData().getCarEnergyTypValue(), "空数据"));
|
||||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
|
||||||
Glide.with(con).load(url1).into(img1);
|
Glide.with(con).load(url1).into(img1);
|
||||||
Glide.with(con).load(url2).into(img2);
|
Glide.with(con).load(url2).into(img2);
|
||||||
Glide.with(con).load(url3).into(img3);
|
Glide.with(con).load(url3).into(img3);
|
||||||
u_img.setText("已上传");
|
if (cdb.getRes() != 1) {
|
||||||
u_img2.setText("已上传");
|
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||||
u_img3.setText("点击查看");
|
u_img.setText("已上传");
|
||||||
isAuth = true;
|
u_img2.setText("已上传");
|
||||||
|
u_img3.setText("点击查看");
|
||||||
|
isAuth = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -736,7 +765,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
value1.setText(ocb.getData().getName());
|
value1.setText(ocb.getData().getName());
|
||||||
value2.setText(ocb.getData().getCardId());
|
value2.setText(ocb.getData().getCardId());
|
||||||
value3.setText(ocb.getData().getAddress());
|
value3.setText(ocb.getData().getAddress());
|
||||||
Glide.with(con).load(url1).into(img1);
|
// Glide.with(con).load(url1).into(img1);
|
||||||
|
Glide.with(con).load(path).into(img1);
|
||||||
fontId = ocb.getData().getId();
|
fontId = ocb.getData().getId();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||||
@@ -748,7 +778,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
if (ocbb.getCode() == 200) {
|
if (ocbb.getCode() == 200) {
|
||||||
url2 = ocbb.getData().getUrl();
|
url2 = ocbb.getData().getUrl();
|
||||||
value4.setText(ocbb.getData().getEndTime());
|
value4.setText(ocbb.getData().getEndTime());
|
||||||
Glide.with(con).load(url2).into(img2);
|
// Glide.with(con).load(url2).into(img2);
|
||||||
|
Glide.with(con).load(path).into(img2);
|
||||||
startTime = ocbb.getData().getStartTime();
|
startTime = ocbb.getData().getStartTime();
|
||||||
backId = ocbb.getData().getId();
|
backId = ocbb.getData().getId();
|
||||||
|
|
||||||
@@ -772,7 +803,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
value2.setText(StringUtil.isNull(od.getStartTime(), "识别异常"));
|
value2.setText(StringUtil.isNull(od.getStartTime(), "识别异常"));
|
||||||
value3.setText(StringUtil.isNull(od.getAllowType(), "识别异常"));
|
value3.setText(StringUtil.isNull(od.getAllowType(), "识别异常"));
|
||||||
value4.setText(StringUtil.isNull(od.getEndTime(), "识别异常"));
|
value4.setText(StringUtil.isNull(od.getEndTime(), "识别异常"));
|
||||||
Glide.with(con).load(url1).into(img1);
|
// Glide.with(con).load(url1).into(img1);
|
||||||
|
Glide.with(con).load(path).into(img1);
|
||||||
fontId = od.getId();
|
fontId = od.getId();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "识别失败", Toast.LENGTH_SHORT).show();
|
||||||
@@ -784,7 +816,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
if (odlb.getCode() == 200) {
|
if (odlb.getCode() == 200) {
|
||||||
url2 = odlb.getData().getUrl();
|
url2 = odlb.getData().getUrl();
|
||||||
backId = odlb.getData().getId();
|
backId = odlb.getData().getId();
|
||||||
Glide.with(con).load(url2).into(img2);
|
// Glide.with(con).load(url2).into(img2);
|
||||||
|
Glide.with(con).load(path).into(img2);
|
||||||
//自动调取提交功能,实现页面自动跳转
|
//自动调取提交功能,实现页面自动跳转
|
||||||
subimt();
|
subimt();
|
||||||
} else {
|
} else {
|
||||||
@@ -800,13 +833,22 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("olb", CacheGroup.cacheList.get(TYPE_NAME[2]));
|
Log.e("olb", CacheGroup.cacheList.get(TYPE_NAME[2]));
|
||||||
olb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[2]), OCRVehicleLicenseBean.class);
|
olb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[2]), OCRVehicleLicenseBean.class);
|
||||||
if (olb.getCode() == 200) {
|
if (olb.getCode() == 200) {
|
||||||
|
if (olb.getData().isCarExist()) {
|
||||||
|
value1.setEnabled(false);
|
||||||
|
Glide.with(con).load(olb.getData().getExistCarInfo().getBackImage()).into(img2);
|
||||||
|
url2 = olb.getData().getExistCarInfo().getBackImage();
|
||||||
|
ToastUtils.showLongToast(con, "该车辆已存在,请仔细核对相关信息");
|
||||||
|
} else {
|
||||||
|
value1.setEnabled(true);
|
||||||
|
}
|
||||||
url1 = olb.getData().getUrl();
|
url1 = olb.getData().getUrl();
|
||||||
value1.setText(olb.getData().getCarNumber());
|
value1.setText(olb.getData().getCarNumber());
|
||||||
value2.setText(olb.getData().getType());
|
value2.setText(olb.getData().getType());
|
||||||
value3.setText(olb.getData().getOwner());
|
value3.setText(olb.getData().getOwner());
|
||||||
value4.setText(olb.getData().getVehicleNumber());
|
value4.setText(olb.getData().getVehicleNumber());
|
||||||
fontId = olb.getData().getId();
|
fontId = olb.getData().getId();
|
||||||
Glide.with(con).load(url1).into(img1);
|
// Glide.with(con).load(url1).into(img1);
|
||||||
|
Glide.with(con).load(path).into(img1);
|
||||||
oCrcarId = olb.getData().getCarId() + "";
|
oCrcarId = olb.getData().getCarId() + "";
|
||||||
Log.e("-cardId-", oCrcarId);
|
Log.e("-cardId-", oCrcarId);
|
||||||
} else {
|
} else {
|
||||||
@@ -819,8 +861,9 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
if (oblb.getCode() == 200) {
|
if (oblb.getCode() == 200) {
|
||||||
url2 = oblb.getData().getUrl();
|
url2 = oblb.getData().getUrl();
|
||||||
backId = oblb.getData().getId();
|
backId = oblb.getData().getId();
|
||||||
Glide.with(con).load(url2).into(img2);
|
// Glide.with(con).load(url2).into(img2);
|
||||||
//自动调取提交功能,实现页面自动跳转
|
Glide.with(con).load(path).into(img2);
|
||||||
|
//自动调取提交功能,实现页面自动跳转实现页面自动跳转
|
||||||
subimt();
|
subimt();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, oblb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, oblb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
@@ -832,7 +875,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
if (ub.getCode() == 200) {
|
if (ub.getCode() == 200) {
|
||||||
url3 = ub.getData().getUrl();
|
url3 = ub.getData().getUrl();
|
||||||
fid = ub.getData().getId();
|
fid = ub.getData().getId();
|
||||||
Glide.with(con).load(url3).into(img3);
|
// Glide.with(con).load(url3).into(img3);
|
||||||
|
Glide.with(con).load(path).into(img3);
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, ub.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -876,7 +920,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum);
|
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, olb.getData().isCarExist());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
new AuthRequest().upload(con, hd, new File(path));
|
new AuthRequest().upload(con, hd, new File(path));
|
||||||
@@ -892,7 +936,16 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum);
|
// if (cdb != null && cdb.getData().getTrailerResVo() &&cdb.getRes() == 1)
|
||||||
|
boolean isExist = false;
|
||||||
|
if (olb != null) {//主页识别成功后获取
|
||||||
|
isExist = olb.getData().isCarExist();
|
||||||
|
} else {
|
||||||
|
if (cdb != null && cdb.getData().getTrailerResVo() != null && cdb.getRes() == 1) {//上个页面带来数据
|
||||||
|
isExist = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
new OCRRequest().OCRVehicleLicenseBack(con, hd, new File(path), oCrcarId, carNum, isExist);
|
||||||
} else {
|
} else {
|
||||||
new AuthRequest().upload(con, hd, new File(path));
|
new AuthRequest().upload(con, hd, new File(path));
|
||||||
}
|
}
|
||||||
@@ -915,6 +968,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
if (ocb != null && ocbb != null) {
|
if (ocb != null && ocbb != null) {
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
IDInputBean ib = new IDInputBean();
|
IDInputBean ib = new IDInputBean();
|
||||||
ib.setIdcarName(str1);
|
ib.setIdcarName(str1);
|
||||||
ib.setIdcard(str2);
|
ib.setIdcard(str2);
|
||||||
@@ -937,6 +992,8 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
//olb
|
//olb
|
||||||
//{"档案编号","初次领证日期","准驾车型","有效期限(止)"},
|
//{"档案编号","初次领证日期","准驾车型","有效期限(止)"},
|
||||||
if (odl != null && odlb != null) {
|
if (odl != null && odlb != null) {
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
Log.e("ocr", new Gson().toJson(odl));
|
Log.e("ocr", new Gson().toJson(odl));
|
||||||
LicenseInputBean iib = new LicenseInputBean();
|
LicenseInputBean iib = new LicenseInputBean();
|
||||||
iib.setArchivesName(str1);
|
iib.setArchivesName(str1);
|
||||||
@@ -953,20 +1010,25 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (olb != null && oblb != null) {
|
if ((olb != null && !olb.getData().isCarExist() && oblb != null) || (olb != null && olb.getData().isCarExist())) {
|
||||||
// if (curColor == null || curEnergy == null) {
|
// if (curColor == null || curEnergy == null) {
|
||||||
// Toast.makeText(con, "请完善内容", Toast.LENGTH_SHORT).show();
|
// Toast.makeText(con, "请完善内容", Toast.LENGTH_SHORT).show();
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
if ("".equals(url3)) {
|
if ("".equals(url3)) {
|
||||||
map.put("imgId", fid);
|
map.put("imgId", fid);
|
||||||
}
|
}
|
||||||
map.put("licenseId", oblb.getData().getLicenseId());
|
map.put("licenseId", olb.getData().isCarExist() ? olb.getData().getExistCarInfo().getLicenseId() : oblb.getData().getLicenseId());
|
||||||
map.put("carNumber", str1);
|
map.put("carNumber", str1);
|
||||||
map.put("type", str2);
|
map.put("type", str2);
|
||||||
map.put("owner", str3);
|
map.put("owner", str3);
|
||||||
map.put("vehicleNumber", str4);
|
map.put("vehicleNumber", str4);
|
||||||
|
// if (olb.getData().isCarExist()) {
|
||||||
|
// map.put("carId", olb.getData().getCarId());
|
||||||
|
// }
|
||||||
// map.put("carPlateColor", curColor.getValue());
|
// map.put("carPlateColor", curColor.getValue());
|
||||||
// map.put("carEnergyTyp", curEnergy.getValue());
|
// map.put("carEnergyTyp", curEnergy.getValue());
|
||||||
new AuthRequest().saveVehicleLicense(con, hd, MapUtil.mapJson(map));
|
new AuthRequest().saveVehicleLicense(con, hd, MapUtil.mapJson(map));
|
||||||
@@ -975,22 +1037,27 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (olb != null && oblb != null) {
|
if (olb != null || (cdb != null && cdb.getRes() == 1)) {
|
||||||
// if (curEnergy==null){
|
// if (curEnergy==null){
|
||||||
// Toast.makeText(con,"请完善内容",Toast.LENGTH_SHORT).show();
|
// Toast.makeText(con,"请完善内容",Toast.LENGTH_SHORT).show();
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
if ("".equals(url3)) {
|
if ("".equals(url3)) {
|
||||||
map.put("imgId", fid);
|
map.put("imgId", fid);
|
||||||
}
|
}
|
||||||
map.put("licenseId", oblb.getData().getLicenseId());
|
// map.put("licenseId", oblb.getData().getLicenseId());
|
||||||
map.put("carId", carId);
|
map.put("carId", carId);
|
||||||
map.put("carNumberDraw", str1);
|
map.put("carNumberDraw", str1);
|
||||||
map.put("type", str2);
|
map.put("type", str2);
|
||||||
map.put("owner", str3);
|
map.put("owner", str3);
|
||||||
// map.put("carEnergyTyp", curEnergy.getValue());
|
// map.put("carEnergyTyp", curEnergy.getValue());
|
||||||
map.put("vehicleNumber", str4);
|
map.put("vehicleNumber", str4);
|
||||||
|
if (cdb != null && cdb.getRes() == 1 && cdb.getData() != null && cdb.getData().getTrailerResVo() != null) {
|
||||||
|
map.put("oldTrailerNumber", cdb.getData().getTrailerResVo().getCarNumber());
|
||||||
|
}
|
||||||
new AuthRequest().saveDrawCar(con, hd, MapUtil.mapJson(map));
|
new AuthRequest().saveDrawCar(con, hd, MapUtil.mapJson(map));
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "请先上传资料", Toast.LENGTH_SHORT).show();
|
||||||
|
|||||||
+106
-20
@@ -24,6 +24,7 @@ import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.request.AuthRequest;
|
import com.arpa.hndahesudintocctmsdriver.request.AuthRequest;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.my.WoDeFragment;
|
import com.arpa.hndahesudintocctmsdriver.ui.my.WoDeFragment;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.file.ImageFileCompressUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.img.GetImageAlert;
|
import com.arpa.hndahesudintocctmsdriver.util.img.GetImageAlert;
|
||||||
@@ -31,6 +32,8 @@ import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
||||||
|
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.luck.picture.lib.PictureSelector;
|
import com.luck.picture.lib.PictureSelector;
|
||||||
import com.luck.picture.lib.config.PictureConfig;
|
import com.luck.picture.lib.config.PictureConfig;
|
||||||
@@ -49,23 +52,24 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnClickListener {
|
public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnClickListener {
|
||||||
|
|
||||||
private String[] titles = {"车辆照片", "NFC照片", "车辆登记证书", "道路运输许可证"};
|
private String[] titles = {"车辆照片", "NFC照片", "车辆登记证书", "道路运输许可证", "车辆交强险"};
|
||||||
private String[] name1 = {"车辆照片", "NFC照片", "车辆登记证书照片", "道路运输许可证照片"};
|
private String[] name1 = {"车辆照片", "NFC照片", "车辆登记证书照片", "道路运输许可证照片", "车辆交强险照片"};
|
||||||
private String[] name2 = {"请上传车辆照片", "请上传NFC照片", "请上传车辆登记证书照片", "请上传道路运输许可证照片"};
|
private String[] name2 = {"请上传车辆照片", "请上传NFC照片", "请上传车辆登记证书照片", "请上传道路运输许可证照片", "请上传车辆交强险照片"};
|
||||||
private Boolean[] isShowEdit = {false, false, true, true};
|
private Boolean[] isShowEdit = {false, false, true, true, true};
|
||||||
private Boolean[] isShowSkip = {true, false, false, true};
|
private Boolean[] isShowSkip = {true, false, false, true, true};
|
||||||
private String[] tips = {
|
private String[] tips = {
|
||||||
"",
|
"",
|
||||||
"*注意: 没有粘贴NFC芯片的车辆无需上传,可直接跳过",
|
"*注意: 没有粘贴NFC芯片的车辆无需上传,可直接跳过",
|
||||||
"*注意: 没有可直接跳过,等候下次上传",
|
"*注意: 没有可直接跳过,等候下次上传",
|
||||||
"*注意: 4.5吨以下车辆不需要上传,可直接跳过"};
|
"*注意: 4.5吨以下车辆不需要上传,可直接跳过",
|
||||||
|
""};
|
||||||
|
|
||||||
|
|
||||||
private BaseRecyclerView brv;
|
private BaseRecyclerView brv;
|
||||||
private ImageView img;
|
private ImageView img;
|
||||||
private TextView title1, title2, title3, zjimg_name, upload_img, tvTips, tvSkip;
|
private TextView title1, title2, title3, zjimg_name, upload_img, tvTips, tvSkip, value2;
|
||||||
private EditText value1;
|
private EditText value1;
|
||||||
private LinearLayout llInfo;
|
private LinearLayout llInfo, llDate;
|
||||||
private RelativeLayout up_img;
|
private RelativeLayout up_img;
|
||||||
private Button submit;
|
private Button submit;
|
||||||
|
|
||||||
@@ -75,7 +79,9 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
private int type;//页面类型
|
private int type;//页面类型
|
||||||
private String path, carId, url;//图片路径
|
private String path, carId, url;//图片路径
|
||||||
|
private boolean carExist = false;
|
||||||
private GetImageAlert gia = new GetImageAlert();
|
private GetImageAlert gia = new GetImageAlert();
|
||||||
|
private CustomDialog customDialog;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
@@ -109,10 +115,16 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
case 3:
|
case 3:
|
||||||
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 2);
|
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 2);
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
new AuthRequest().saveCarImg(con, hd, carId, ub.getData().getId(), 7);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
url = ub.getData().getUrl();
|
url = ub.getData().getUrl();
|
||||||
Glide.with(con).load(url).into(img);
|
// Glide.with(con).load(url).into(img);
|
||||||
|
Glide.with(con).load(path).into(img);
|
||||||
|
|
||||||
|
if (customDialog != null && customDialog.isShowing())
|
||||||
|
customDialog.dismiss();
|
||||||
CacheGroup.cacheList.remove("upload");
|
CacheGroup.cacheList.remove("upload");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,6 +144,9 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
case 3:
|
case 3:
|
||||||
Toast.makeText(con, "上传道路运输证成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "上传道路运输证成功", Toast.LENGTH_SHORT).show();
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
Toast.makeText(con, "交强险证件上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
@@ -158,13 +173,13 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
IsAuthDriverAuthQualificationBean ib = gson.fromJson(CacheGroup.cacheList.get("saveCarRoadLicenseNo"), IsAuthDriverAuthQualificationBean.class);
|
IsAuthDriverAuthQualificationBean ib = gson.fromJson(CacheGroup.cacheList.get("saveCarRoadLicenseNo"), IsAuthDriverAuthQualificationBean.class);
|
||||||
if (ib.getCode() == 200) {
|
if (ib.getCode() == 200) {
|
||||||
//判断是否需要跳转挂车行驶证页面
|
//判断是否需要跳转挂车行驶证页面
|
||||||
if (!"".equals(carId) ){
|
if (!"".equals(carId) && cdb.getData() != null) {
|
||||||
if (cdb.getData().getIsTrailer() == 1&&!TextUtils.isEmpty(cdb.getData().getTrailerResVo().getCarNumber())){//需要挂车,并且传过挂车直接结束
|
if (cdb.getData().getIsTrailer() == 1 && cdb.getData().getTrailerResVo() != null && !TextUtils.isEmpty(cdb.getData().getTrailerResVo().getCarNumber())) {//需要挂车,并且传过挂车直接结束
|
||||||
finish();
|
finish();
|
||||||
Intent in = new Intent(con, AddCarSuccActivity.class);
|
Intent in = new Intent(con, AddCarSuccActivity.class);
|
||||||
in.putExtra("type", 3);
|
in.putExtra("type", 3);
|
||||||
con.startActivity(in);
|
con.startActivity(in);
|
||||||
}else if(cdb.getData().getIsTrailer() == 1&&TextUtils.isEmpty(cdb.getData().getTrailerResVo().getCarNumber())){//需要挂车,没传过挂车,到挂车页面
|
} else if (cdb.getData().getIsTrailer() == 1 && cdb.getData().getTrailerResVo() != null && TextUtils.isEmpty(cdb.getData().getTrailerResVo().getCarNumber())) {//需要挂车,没传过挂车,到挂车页面
|
||||||
finish();
|
finish();
|
||||||
Intent in = new Intent(con, CertificatesActivity.class);
|
Intent in = new Intent(con, CertificatesActivity.class);
|
||||||
in.putExtra("index", 3);
|
in.putExtra("index", 3);
|
||||||
@@ -173,22 +188,25 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
in.putExtra("cheData", new Gson().toJson(cdb));
|
in.putExtra("cheData", new Gson().toJson(cdb));
|
||||||
}
|
}
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
}else if(cdb.getData().getIsTrailer() == 0){//不需要挂车
|
} else if (cdb.getData().getIsTrailer() == 0) {//不需要挂车
|
||||||
if ("1".equals(cdb.getData().getNeedUpQCPhoto())){//需要从业资格证
|
if ("1".equals(cdb.getData().getNeedUpQCPhoto())) {//需要从业资格证
|
||||||
Intent in = new Intent(con, AuthQualificationActivity.class);
|
Intent in = new Intent(con, AuthQualificationActivity.class);
|
||||||
in.putExtra("type", "0");
|
in.putExtra("type", "0");
|
||||||
in.putExtra("carId", carId);
|
in.putExtra("carId", carId);
|
||||||
in.putExtra("isOverCar", false);
|
in.putExtra("isOverCar", false);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
}else{
|
} else {
|
||||||
finish();
|
finish();
|
||||||
Intent in = new Intent(con, AddCarSuccActivity.class);
|
Intent in = new Intent(con, AddCarSuccActivity.class);
|
||||||
in.putExtra("type", 3);
|
in.putExtra("type", 3);
|
||||||
con.startActivity(in);
|
con.startActivity(in);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// if (!"".equals(carId) && cdb.getData().getIsTrailer() == 1) {
|
// if (!"".equals(carId) && cdb.getData().getIsTrailer() == 1) {
|
||||||
// if (!"".equals(carId)) {
|
// if (!"".equals(carId)) {
|
||||||
// finish();
|
// finish();
|
||||||
@@ -213,8 +231,23 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("saveCarRoadLicenseNo");
|
CacheGroup.cacheList.remove("saveCarRoadLicenseNo");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CacheGroup.cacheList.get("saveTrafficInsurance") != null) {
|
||||||
|
Log.e("is", CacheGroup.cacheList.get("saveTrafficInsurance"));
|
||||||
|
IsAuthDriverAuthQualificationBean ddb = gson.fromJson(CacheGroup.cacheList.get("saveTrafficInsurance"), IsAuthDriverAuthQualificationBean.class);
|
||||||
|
if (ddb.getCode() == 200) {
|
||||||
|
Toast.makeText(con, "保存成功", Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(con, ddb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
CacheGroup.cacheList.remove("saveTrafficInsurance");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||||
|
customDialog = new CustomDialog(con, "加载中...");
|
||||||
|
customDialog.show();
|
||||||
path = (String) m.obj;
|
path = (String) m.obj;
|
||||||
new AuthRequest().upload(con, hd, new File(path));
|
new AuthRequest().upload(con, hd, new File(path));
|
||||||
break;
|
break;
|
||||||
@@ -233,6 +266,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
title1 = findViewById(R.id.title1);
|
title1 = findViewById(R.id.title1);
|
||||||
title2 = findViewById(R.id.title2);
|
title2 = findViewById(R.id.title2);
|
||||||
title3 = findViewById(R.id.name1);
|
title3 = findViewById(R.id.name1);
|
||||||
|
value2 = findViewById(R.id.value2);
|
||||||
up_img = findViewById(R.id.up_img);
|
up_img = findViewById(R.id.up_img);
|
||||||
img = findViewById(R.id.img);
|
img = findViewById(R.id.img);
|
||||||
zjimg_name = findViewById(R.id.zjimg_name);
|
zjimg_name = findViewById(R.id.zjimg_name);
|
||||||
@@ -240,6 +274,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
tvTips = findViewById(R.id.tvTips);
|
tvTips = findViewById(R.id.tvTips);
|
||||||
value1 = findViewById(R.id.value1);
|
value1 = findViewById(R.id.value1);
|
||||||
llInfo = findViewById(R.id.llInfo);
|
llInfo = findViewById(R.id.llInfo);
|
||||||
|
llDate = findViewById(R.id.llDate);
|
||||||
tvSkip = findViewById(R.id.tvSkip);
|
tvSkip = findViewById(R.id.tvSkip);
|
||||||
submit = findViewById(R.id.submit);
|
submit = findViewById(R.id.submit);
|
||||||
|
|
||||||
@@ -247,10 +282,12 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
submit.setOnClickListener(this);
|
submit.setOnClickListener(this);
|
||||||
upload_img.setOnClickListener(this);
|
upload_img.setOnClickListener(this);
|
||||||
img.setOnClickListener(this);
|
img.setOnClickListener(this);
|
||||||
|
value2.setOnClickListener(this);
|
||||||
|
|
||||||
|
|
||||||
type = getIntent().getExtras().getInt("type");
|
type = getIntent().getExtras().getInt("type");
|
||||||
carId = getIntent().getExtras().getString("carId", "");
|
carId = getIntent().getExtras().getString("carId", "");
|
||||||
|
carExist = getIntent().getExtras().getBoolean("carExist", false);
|
||||||
changeViewByType(type);
|
changeViewByType(type);
|
||||||
|
|
||||||
ur = new UserRequset(con, hd);
|
ur = new UserRequset(con, hd);
|
||||||
@@ -307,6 +344,14 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
case R.id.img:
|
case R.id.img:
|
||||||
showBigImg();
|
showBigImg();
|
||||||
break;
|
break;
|
||||||
|
case R.id.value2:
|
||||||
|
DatePicker picker = new DatePicker(this);
|
||||||
|
picker.setBodyWidth(300);
|
||||||
|
picker.setOnDatePickedListener((year, month, day) -> value2.setText(year + "-" + month + "-" + day));
|
||||||
|
picker.getWheelLayout().setDateMode(DateMode.YEAR_MONTH_DAY);
|
||||||
|
picker.getWheelLayout().setDateLabel("年", "月", "日");
|
||||||
|
picker.show();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,11 +360,15 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
* 展示大图片
|
* 展示大图片
|
||||||
*/
|
*/
|
||||||
private void showBigImg() {
|
private void showBigImg() {
|
||||||
|
if ((type == 0 && TextUtils.isEmpty(cdb.getData().getRoadLicensePhoto())) || (type == 4 && TextUtils.isEmpty(cdb.getData().getPolicyPhotoUrl()))) {
|
||||||
|
choicePhoto();
|
||||||
|
return;
|
||||||
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
if (cdb.getData().getRoadLicensePhoto() != null && !cdb.getData().getCarImage().equals("")) {
|
if (cdb.getData().getRoadLicensePhoto() != null && !cdb.getData().getCarImage().equals("")) {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.asImageViewer(img, cdb.getData().getCarImage(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
.asImageViewer(img, cdb.getData().getCarImage(), new SmartGlideImageLoader(R.mipmap.ic_launcher))
|
||||||
.show();
|
.show();
|
||||||
// new XPopup.Builder(con)
|
// new XPopup.Builder(con)
|
||||||
// .asImageViewer(img, cdb.getData().getCarImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
// .asImageViewer(img, cdb.getData().getCarImage(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
@@ -354,6 +403,19 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
.show();
|
.show();
|
||||||
// new XPopup.Builder(con)
|
// new XPopup.Builder(con)
|
||||||
// .asImageViewer(img, cdb.getData().getRoadLicensePhoto(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
// .asImageViewer(img, cdb.getData().getRoadLicensePhoto(), true, -1, -1, 50, false, new CertificatesActivity.ImageLoader())
|
||||||
|
// .show();
|
||||||
|
|
||||||
|
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();
|
// .show();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -373,14 +435,14 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
if (!TextUtils.isEmpty(url)||(cdb!=null&&!TextUtils.isEmpty(cdb.getData().getCarImage()))){
|
if (!TextUtils.isEmpty(url) || (cdb != null && !TextUtils.isEmpty(cdb.getData().getCarImage()))) {
|
||||||
finish();
|
finish();
|
||||||
Intent in = new Intent(con, PhotoCarActivity.class);
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
// in.putExtra("type", 1);
|
// in.putExtra("type", 1);
|
||||||
in.putExtra("type", 3);
|
in.putExtra("type", 3);
|
||||||
in.putExtra("carId", carId);
|
in.putExtra("carId", carId);
|
||||||
con.startActivity(in);
|
con.startActivity(in);
|
||||||
} else{
|
} else {
|
||||||
Toast.makeText(this, "请上传车辆照片", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "请上传车辆照片", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -397,7 +459,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
Toast.makeText(this, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new AuthRequest().saveCarRegisterNo(con,hd,carId,s);
|
new AuthRequest().saveCarRegisterNo(con, hd, carId, s);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
String s1 = value1.getText().toString();
|
String s1 = value1.getText().toString();
|
||||||
@@ -405,7 +467,16 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
Toast.makeText(this, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new AuthRequest().saveCarRoadLicenseNo(con,hd,carId,s1);
|
new AuthRequest().saveCarRoadLicenseNo(con, hd, carId, s1);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
String s2 = value1.getText().toString();
|
||||||
|
String v2 = value2.getText().toString();
|
||||||
|
if (TextUtils.isEmpty(s2) || TextUtils.isEmpty(v2)) {
|
||||||
|
Toast.makeText(this, "请补充证件信息", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
new AuthRequest().saveTrafficInsurance(con, hd, carId, v2, s2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -438,6 +509,17 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
if (!TextUtils.isEmpty(cdb.getData().getRoadLicensePhoto())) {
|
if (!TextUtils.isEmpty(cdb.getData().getRoadLicensePhoto())) {
|
||||||
Glide.with(con).load(cdb.getData().getRoadLicensePhoto()).into(img);
|
Glide.with(con).load(cdb.getData().getRoadLicensePhoto()).into(img);
|
||||||
value1.setText(cdb.getData().getRoadLicense());
|
value1.setText(cdb.getData().getRoadLicense());
|
||||||
|
if (!carExist) {
|
||||||
|
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||||
|
upload_img.setText("已上传");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else if (4 == type) {
|
||||||
|
if (!TextUtils.isEmpty(cdb.getData().getPolicyPhotoUrl())) {
|
||||||
|
Glide.with(con).load(cdb.getData().getPolicyPhotoUrl()).into(img);
|
||||||
|
value1.setText(cdb.getData().getInsuranceCompany());
|
||||||
|
value2.setText(cdb.getData().getInsuranceEndDay());
|
||||||
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
submit.setBackgroundResource(R.drawable.bg_btn_grey);
|
||||||
upload_img.setText("已上传");
|
upload_img.setText("已上传");
|
||||||
}
|
}
|
||||||
@@ -523,6 +605,10 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
|
|||||||
tvTips.setText(tips[type]);
|
tvTips.setText(tips[type]);
|
||||||
tvSkip.setVisibility(isShowSkip[type] ? View.GONE : View.VISIBLE);
|
tvSkip.setVisibility(isShowSkip[type] ? View.GONE : View.VISIBLE);
|
||||||
llInfo.setVisibility(isShowEdit[type] ? View.VISIBLE : View.GONE);
|
llInfo.setVisibility(isShowEdit[type] ? View.VISIBLE : View.GONE);
|
||||||
|
if (type == 4) {
|
||||||
|
llDate.setVisibility(View.VISIBLE);
|
||||||
|
title3.setText("保险公司");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+28
-3
@@ -14,7 +14,10 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.event.RefreshCarListEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.luck.picture.lib.PictureSelector;
|
import com.luck.picture.lib.PictureSelector;
|
||||||
import com.luck.picture.lib.config.PictureConfig;
|
import com.luck.picture.lib.config.PictureConfig;
|
||||||
@@ -38,6 +41,7 @@ import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
|||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -65,7 +69,7 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
CacheGroup.cacheList.remove(CAR_AUDIO);
|
CacheGroup.cacheList.remove(CAR_AUDIO);
|
||||||
}
|
}
|
||||||
if(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL)!=null){
|
if(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL)!=null){
|
||||||
Log.e("--res--",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);
|
cdb=gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_DEL), CarDelBean.class);
|
||||||
if(cdb.getCode()==200){
|
if(cdb.getCode()==200){
|
||||||
initView(null);
|
initView(null);
|
||||||
@@ -79,6 +83,8 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
bb=gson.fromJson(CacheGroup.cacheList.get(DEL_CAR),BaseBean.class);
|
bb=gson.fromJson(CacheGroup.cacheList.get(DEL_CAR),BaseBean.class);
|
||||||
if (bb.getCode()==200) {
|
if (bb.getCode()==200) {
|
||||||
Toast.makeText(con,"删除成功",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,"删除成功",Toast.LENGTH_SHORT).show();
|
||||||
|
RefreshCarListEvent ve = new RefreshCarListEvent("");
|
||||||
|
EventBus.getDefault().post(ve);
|
||||||
finish();
|
finish();
|
||||||
}else{
|
}else{
|
||||||
Toast.makeText(con,"删除失败:"+bb.getMsg(),Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,"删除失败:"+bb.getMsg(),Toast.LENGTH_SHORT).show();
|
||||||
@@ -166,6 +172,13 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
private GetImageAlert gia=new GetImageAlert();
|
private GetImageAlert gia=new GetImageAlert();
|
||||||
private boolean key1,key2,key3=false;
|
private boolean key1,key2,key3=false;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
EventBus.getDefault().unregister(this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initView(Object obj) {
|
public void initView(Object obj) {
|
||||||
super.initView(obj);
|
super.initView(obj);
|
||||||
@@ -207,11 +220,12 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
RelativeLayout r5=v.findViewById(R.id.r5);
|
RelativeLayout r5=v.findViewById(R.id.r5);
|
||||||
RelativeLayout r6=v.findViewById(R.id.r6);
|
RelativeLayout r6=v.findViewById(R.id.r6);
|
||||||
RelativeLayout r7=v.findViewById(R.id.r7);
|
RelativeLayout r7=v.findViewById(R.id.r7);
|
||||||
|
RelativeLayout r8=v.findViewById(R.id.r8);
|
||||||
View vs1=v.findViewById(R.id.vs1);
|
View vs1=v.findViewById(R.id.vs1);
|
||||||
View vs2=v.findViewById(R.id.vs2);
|
View vs2=v.findViewById(R.id.vs2);
|
||||||
r4.setVisibility(View.GONE);
|
r4.setVisibility(View.GONE);
|
||||||
r5.setVisibility(View.GONE);
|
r5.setVisibility(View.GONE);
|
||||||
vs1.setVisibility(View.GONE);
|
// vs1.setVisibility(View.GONE);
|
||||||
vs2.setVisibility(View.GONE);
|
vs2.setVisibility(View.GONE);
|
||||||
if(!"".equals(carId) && cdb.getData().getIsTrailer()==1){
|
if(!"".equals(carId) && cdb.getData().getIsTrailer()==1){
|
||||||
r4.setVisibility(View.VISIBLE);
|
r4.setVisibility(View.VISIBLE);
|
||||||
@@ -301,6 +315,17 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
Toast.makeText(con,"请先绑定挂车",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con,"请先绑定挂车",Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
r8.setOnClickListener(v1->{
|
||||||
|
if(!"".equals(carId)){
|
||||||
|
Intent in = new Intent(con, PhotoCarActivity.class);
|
||||||
|
in.putExtra("type", 4);
|
||||||
|
in.putExtra("carId", carId);
|
||||||
|
con.startActivity(in);
|
||||||
|
}else{
|
||||||
|
Toast.makeText(con,"请先绑定行驶证",Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
del.setOnClickListener(v13 -> {
|
del.setOnClickListener(v13 -> {
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||||
@@ -384,7 +409,7 @@ public class VehicleAuthActivity extends BaseAppCompatActivity {
|
|||||||
super.onResume();
|
super.onResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
|
||||||
public void processResult(VehicleEvent event) {
|
public void processResult(VehicleEvent event) {
|
||||||
Log.e("-msg-",event.getMessage());
|
Log.e("-msg-",event.getMessage());
|
||||||
if(!"挂".equals(event.getMessage())) {
|
if(!"挂".equals(event.getMessage())) {
|
||||||
|
|||||||
@@ -146,10 +146,10 @@ public class HomeFragment extends BaseFragment {
|
|||||||
MsgUtil.addHdMsgWat(hd, 33);
|
MsgUtil.addHdMsgWat(hd, 33);
|
||||||
|
|
||||||
//新用户注册,需弹窗提示注册
|
//新用户注册,需弹窗提示注册
|
||||||
if ("0".equals(ub.getData().getRealAuthentication())){
|
if ("0".equals(ub.getData().getRealAuthentication())) {
|
||||||
new MessageUtils().showSimCenPop(con, "该司机还未认证,未认证无法接单。是否去注册!", () -> {
|
new MessageUtils().showSimCenPop(con, "该司机还未认证,未认证无法接单。是否去注册!", () -> {
|
||||||
Intent in=new Intent(con, CertificatesActivity.class);
|
Intent in = new Intent(con, CertificatesActivity.class);
|
||||||
in.putExtra("index",0);
|
in.putExtra("index", 0);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -241,7 +241,9 @@ public class HomeFragment extends BaseFragment {
|
|||||||
in.putExtra("url", deb.getData().getIdCardUpdateUrl());
|
in.putExtra("url", deb.getData().getIdCardUpdateUrl());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!"".equals(deb.getData().getDriverLicenseUpdateUrl()) || !"".equals(deb.getData().getIdCardUpdateUrl())) {
|
if (!TextUtils.isEmpty(deb.getData().getDriverLicenseUpdateUrl()) || !TextUtils.isEmpty(deb.getData().getIdCardUpdateUrl())||
|
||||||
|
!TextUtils.isEmpty(deb.getData().getQualificationUpdateUrl())||!TextUtils.isEmpty(deb.getData().getRoadLicenseUpdateUrl())||
|
||||||
|
!TextUtils.isEmpty(deb.getData().getInsuranceUpdateUrl())) {
|
||||||
new XToast<>(act)
|
new XToast<>(act)
|
||||||
.setContentView(R.layout.view_bc)
|
.setContentView(R.layout.view_bc)
|
||||||
// 设置成可拖拽的
|
// 设置成可拖拽的
|
||||||
@@ -545,7 +547,6 @@ public class HomeFragment extends BaseFragment {
|
|||||||
ur.getImage(1);
|
ur.getImage(1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (UiAuxiliary.isLogin(con)) {
|
if (UiAuxiliary.isLogin(con)) {
|
||||||
ur.User();
|
ur.User();
|
||||||
ur.getDriverExpire();
|
ur.getDriverExpire();
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import android.os.Bundle;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
@@ -102,14 +103,18 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
//Toast.makeText(con,"接单成功",Toast.LENGTH_SHORT).show();
|
//Toast.makeText(con,"接单成功",Toast.LENGTH_SHORT).show();
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
// EsignSdk.getInstance().startH5Activity(act, (String) bb.getData());
|
// EsignSdk.getInstance().startH5Activity(act, (String) bb.getData());
|
||||||
|
if (null==bb.getData()){
|
||||||
|
UiAuxiliary.homeRequest("接单");
|
||||||
Intent intent = new Intent(this, H5Activity.class);
|
Intent in = new Intent(con, StartYunDanActivity.class);
|
||||||
intent.putExtra("url", (String) bb.getData());
|
in.putExtra("id", "0");
|
||||||
intent.putExtra("view_file", false);
|
startActivity(in);
|
||||||
startActivity(intent);
|
finish();
|
||||||
|
}else{
|
||||||
|
Intent intent = new Intent(this, H5Activity.class);
|
||||||
|
intent.putExtra("url", (String) bb.getData());
|
||||||
|
intent.putExtra("view_file", false);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
//finish();
|
//finish();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
|
|||||||
+221
-201
@@ -40,7 +40,10 @@ import com.amap.api.services.route.DriveStep;
|
|||||||
import com.amap.api.services.route.RideRouteResult;
|
import com.amap.api.services.route.RideRouteResult;
|
||||||
import com.amap.api.services.route.RouteSearch;
|
import com.amap.api.services.route.RouteSearch;
|
||||||
import com.amap.api.services.route.WalkRouteResult;
|
import com.amap.api.services.route.WalkRouteResult;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.dahe.mylibrary.utils.TimeUtil;
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
@@ -73,11 +76,11 @@ import java.util.List;
|
|||||||
|
|
||||||
public class StartYunDanActivity extends BaseActivity {
|
public class StartYunDanActivity extends BaseActivity {
|
||||||
|
|
||||||
public static final String GET_EVALUTE="getEvalute";
|
public static final String GET_EVALUTE = "getEvalute";
|
||||||
public static final String KEEP_EVALUTE="keepEvalte";
|
public static final String KEEP_EVALUTE = "keepEvalte";
|
||||||
public static final String GET_COMPLAINT="getComplaint";
|
public static final String GET_COMPLAINT = "getComplaint";
|
||||||
|
|
||||||
private String TAG="StartYunDanActivity";
|
private String TAG = "StartYunDanActivity";
|
||||||
private NestedScrollView bottomSheet;
|
private NestedScrollView bottomSheet;
|
||||||
private MapView map;
|
private MapView map;
|
||||||
private BaseRecyclerView brv;
|
private BaseRecyclerView brv;
|
||||||
@@ -85,57 +88,58 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
private LinearLayout protect;
|
private LinearLayout protect;
|
||||||
//private RelativeLayout title_rl;
|
//private RelativeLayout title_rl;
|
||||||
private TextView title;
|
private TextView title;
|
||||||
private ScoreView sv1,sv2;
|
private ScoreView sv1, sv2;
|
||||||
private Gson gson=new Gson();
|
private Gson gson = new Gson();
|
||||||
private StartOrderBean sob;
|
private StartOrderBean sob;
|
||||||
private WNewsBean wnb;
|
private WNewsBean wnb;
|
||||||
private HuoYuanRequset hyr;
|
private HuoYuanRequset hyr;
|
||||||
//是否处于展开状态
|
//是否处于展开状态
|
||||||
private boolean key=false;
|
private boolean key = false;
|
||||||
private int id=0;
|
private int id = 0;
|
||||||
LocationGDUtil ld;
|
LocationGDUtil ld;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
super.msgMethod(m);
|
super.msgMethod(m);
|
||||||
switch (m.what){
|
switch (m.what) {
|
||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
//获取页面数据
|
//获取页面数据
|
||||||
if (CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER)!=null && CacheGroup.cacheList.get(GET_EVALUTE)!=null) {
|
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(GET_EVALUTE));
|
||||||
Log.e("-运单-",CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER));
|
Log.e("-运单-", CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER));
|
||||||
sob=gson.fromJson(CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER), StartOrderBean.class);
|
sob = gson.fromJson(CacheGroup.cacheList.get(HuoYuanFragmengt.START_ORDER), StartOrderBean.class);
|
||||||
wnb=gson.fromJson(CacheGroup.cacheList.get(GET_EVALUTE), WNewsBean.class);
|
wnb = gson.fromJson(CacheGroup.cacheList.get(GET_EVALUTE), WNewsBean.class);
|
||||||
if(sob.getCode()==200 && sob.getData()!=null){
|
if (sob.getCode() == 200 && sob.getData() != null) {
|
||||||
id = sob.getData().getWaybillId();
|
id = sob.getData().getWaybillId();
|
||||||
initView(null);
|
initView(null);
|
||||||
}else if(sob.getData()==null){
|
} else if (sob.getData() == null) {
|
||||||
// Toast.makeText(con,"运单执行结束",Toast.LENGTH_SHORT).show();
|
// Toast.makeText(con,"运单执行结束",Toast.LENGTH_SHORT).show();
|
||||||
SPUtil.insSP(con,"order","ShippingNoteNumber","");
|
SPUtil.insSP(con, "order", "ShippingNoteNumber", "");
|
||||||
UiAuxiliary.homeRequest("运单结束");
|
UiAuxiliary.homeRequest("运单结束");
|
||||||
// finish();
|
// finish();
|
||||||
}else{
|
} else {
|
||||||
Toast.makeText(con,sob.getMsg(),Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, sob.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove(HuoYuanFragmengt.START_ORDER);
|
CacheGroup.cacheList.remove(HuoYuanFragmengt.START_ORDER);
|
||||||
CacheGroup.cacheList.remove(GET_EVALUTE);
|
CacheGroup.cacheList.remove(GET_EVALUTE);
|
||||||
}
|
}
|
||||||
//保存评价
|
//保存评价
|
||||||
if(CacheGroup.cacheList.get(KEEP_EVALUTE)!=null){
|
if (CacheGroup.cacheList.get(KEEP_EVALUTE) != null) {
|
||||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(KEEP_EVALUTE),BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(KEEP_EVALUTE), BaseBean.class);
|
||||||
if(bb.getCode()==200){
|
if (bb.getCode() == 200) {
|
||||||
Toast.makeText(con,"评价保存成功",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "评价保存成功", Toast.LENGTH_SHORT).show();
|
||||||
hyr.startOrder(id);
|
hyr.startOrder(id);
|
||||||
hyr.getEvaluate(id);
|
hyr.getEvaluate(id);
|
||||||
}else{
|
} else {
|
||||||
Toast.makeText(con,bb.getMsg(),Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove(KEEP_EVALUTE);
|
CacheGroup.cacheList.remove(KEEP_EVALUTE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
break;
|
break;
|
||||||
default:break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,28 +151,28 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
StateStyleUtil.stateTextColor(this);
|
StateStyleUtil.stateTextColor(this);
|
||||||
setContentView(R.layout.activity_yundan_start);
|
setContentView(R.layout.activity_yundan_start);
|
||||||
con=this;
|
con = this;
|
||||||
id=getIntent().getExtras().getInt("id");
|
id = getIntent().getExtras().getInt("id");
|
||||||
brv=findViewById(R.id.brv);
|
brv = findViewById(R.id.brv);
|
||||||
protect=findViewById(R.id.protect);
|
protect = findViewById(R.id.protect);
|
||||||
title=findViewById(R.id.title);
|
title = findViewById(R.id.title);
|
||||||
bottomSheet =findViewById(R.id.bottom_sheet);
|
bottomSheet = findViewById(R.id.bottom_sheet);
|
||||||
BottomSheetBehavior mBottomSheetBehavior = BottomSheetBehavior.from(bottomSheet);
|
BottomSheetBehavior mBottomSheetBehavior = BottomSheetBehavior.from(bottomSheet);
|
||||||
mBottomSheetBehavior.setHideable(false);
|
mBottomSheetBehavior.setHideable(false);
|
||||||
mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||||
//mBottomSheetBehavior.set
|
//mBottomSheetBehavior.set
|
||||||
map=findViewById(R.id.map);
|
map = findViewById(R.id.map);
|
||||||
map.onCreate(savedInstanceState);
|
map.onCreate(savedInstanceState);
|
||||||
if (aMap == null) {
|
if (aMap == null) {
|
||||||
aMap = map.getMap();
|
aMap = map.getMap();
|
||||||
initLoaction();
|
initLoaction();
|
||||||
}
|
}
|
||||||
Log.e("--id--",""+id);
|
Log.e("--id--", "" + id);
|
||||||
String userdata= SPUtil.getSP(con,"data","userdata");
|
String userdata = SPUtil.getSP(con, "data", "userdata");
|
||||||
if(!userdata.equals("")){
|
if (!userdata.equals("")) {
|
||||||
ub=gson.fromJson(userdata,UserBean.class);
|
ub = gson.fromJson(userdata, UserBean.class);
|
||||||
}
|
}
|
||||||
hyr=new HuoYuanRequset(con,hd);
|
hyr = new HuoYuanRequset(con, hd);
|
||||||
// hyr.startOrder(id);
|
// hyr.startOrder(id);
|
||||||
// hyr.getEvaluate(id);
|
// hyr.getEvaluate(id);
|
||||||
}
|
}
|
||||||
@@ -184,59 +188,60 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
//控件隐藏的动画
|
//控件隐藏的动画
|
||||||
mHiddenAmin = new AlphaAnimation(1.0f, 0.0f);
|
mHiddenAmin = new AlphaAnimation(1.0f, 0.0f);
|
||||||
mHiddenAmin.setDuration(1000);
|
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(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.item_yundan_yunxing));
|
||||||
list.add(new ManyBean(sob.getData(),R.layout.yundan_start_bottom));
|
list.add(new ManyBean(sob.getData(), R.layout.yundan_start_bottom));
|
||||||
brv.creates(con,list).setOnItemViewListener((position, o, v, layout) -> {
|
brv.creates(con, list).setOnItemViewListener((position, o, v, layout) -> {
|
||||||
switch (layout){
|
switch (layout) {
|
||||||
case R.layout.yundan_start_top:
|
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());
|
return_btn.setOnClickListener(v1 -> finish());
|
||||||
break;
|
break;
|
||||||
case R.layout.yundan_start_bottom:
|
case R.layout.yundan_start_bottom:
|
||||||
initStartBody(v);
|
initStartBody(v);
|
||||||
break;
|
break;
|
||||||
case R.layout.item_yundan_yunxing:
|
case R.layout.item_yundan_yunxing:
|
||||||
ImageView head_img=v.findViewById(R.id.head_img);
|
ImageView head_img = v.findViewById(R.id.head_img);
|
||||||
if(ub!=null && ub.getData()!=null && !ub.getData().getHeadportraitUrl().equals("")){
|
if (ub != null && ub.getData() != null && !ub.getData().getHeadportraitUrl().equals("")) {
|
||||||
Glide.with(con).load(ub.getData().getHeadportraitUrl()).into(head_img);
|
Glide.with(con).load(ub.getData().getHeadportraitUrl()).into(head_img);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean iskey=false;
|
private boolean iskey = false;
|
||||||
|
|
||||||
private void initStartBody(View v){
|
private void initStartBody(View v) {
|
||||||
LinearLayout jiesuan=v.findViewById(R.id.jiesuan);
|
LinearLayout jiesuan = v.findViewById(R.id.jiesuan);
|
||||||
// if(id==0){
|
// if(id==0){
|
||||||
// jiesuan.setVisibility(View.GONE);
|
// jiesuan.setVisibility(View.GONE);
|
||||||
// }else{
|
// }else{
|
||||||
// jiesuan.setVisibility(View.VISIBLE);
|
// jiesuan.setVisibility(View.VISIBLE);
|
||||||
// }
|
// }
|
||||||
sv1=v.findViewById(R.id.score1);
|
sv1 = v.findViewById(R.id.score1);
|
||||||
sv2=v.findViewById(R.id.score2);
|
sv2 = v.findViewById(R.id.score2);
|
||||||
sv1.initView();
|
sv1.initView();
|
||||||
sv2.initView();
|
sv2.initView();
|
||||||
sv1.setScore(5);
|
sv1.setScore(5);
|
||||||
//设置是否可以修改评分,默认为true
|
//设置是否可以修改评分,默认为true
|
||||||
TextView pl_submit=v.findViewById(R.id.pl_submit);
|
TextView pl_submit = v.findViewById(R.id.pl_submit);
|
||||||
TextView m_pl_value=v.findViewById(R.id.m_pl_value);
|
TextView m_pl_value = v.findViewById(R.id.m_pl_value);
|
||||||
TextView pl_value=v.findViewById(R.id.pl_value);
|
TextView pl_value = v.findViewById(R.id.pl_value);
|
||||||
if(wnb.getData()!=null){
|
if (wnb.getData() != null) {
|
||||||
for (WNewsBean.DataDTO datum : wnb.getData()) {
|
for (WNewsBean.DataDTO datum : wnb.getData()) {
|
||||||
if(datum.getType()==0){
|
if (datum.getType() == 0) {
|
||||||
sv1.setScore(datum.getAttitudeScore());
|
sv1.setScore(datum.getAttitudeScore());
|
||||||
m_pl_value.setText(datum.getContent());
|
m_pl_value.setText(datum.getContent());
|
||||||
pl_submit.setVisibility(View.GONE);
|
pl_submit.setVisibility(View.GONE);
|
||||||
sv1.setUpKey(false);
|
sv1.setUpKey(false);
|
||||||
m_pl_value.setEnabled(false);
|
m_pl_value.setEnabled(false);
|
||||||
}
|
}
|
||||||
if(datum.getType()==1){
|
if (datum.getType() == 1) {
|
||||||
Log.e("分数",datum.getAttitudeScore()+"_");
|
Log.e("分数", datum.getAttitudeScore() + "_");
|
||||||
sv2.setScore(datum.getAttitudeScore());
|
sv2.setScore(datum.getAttitudeScore());
|
||||||
pl_value.setText(datum.getContent());
|
pl_value.setText(datum.getContent());
|
||||||
}
|
}
|
||||||
@@ -244,45 +249,45 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
sv2.setUpKey(false);
|
sv2.setUpKey(false);
|
||||||
pl_submit.setOnClickListener(v12 -> {
|
pl_submit.setOnClickListener(v12 -> {
|
||||||
String evaluate=m_pl_value.getText()+"";
|
String evaluate = m_pl_value.getText() + "";
|
||||||
if(id!=0){
|
if (id != 0) {
|
||||||
if(evaluate.length()>=5){
|
if (evaluate.length() >= 5) {
|
||||||
Log.e("星星",""+sv1.getScore());
|
Log.e("星星", "" + sv1.getScore());
|
||||||
hyr.keepEvaluate(sv1.getScore(),m_pl_value.getText()+"",id);
|
hyr.keepEvaluate(sv1.getScore(), m_pl_value.getText() + "", id);
|
||||||
}else{
|
} else {
|
||||||
Toast.makeText(con,"写够5个字才是好司机~",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "写够5个字才是好司机~", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
Toast.makeText(con,"运单尚未结束",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "运单尚未结束", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Button complaint=v.findViewById(R.id.complaint);
|
Button complaint = v.findViewById(R.id.complaint);
|
||||||
complaint.setOnClickListener(v1 -> {
|
complaint.setOnClickListener(v1 -> {
|
||||||
Intent in=new Intent(con, OrderComplaintActivity.class);
|
Intent in = new Intent(con, OrderComplaintActivity.class);
|
||||||
in.putExtra("id",id);
|
in.putExtra("id", id);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
});
|
});
|
||||||
BaseRecyclerView bv_zhuang=v.findViewById(R.id.bv_zhuang);
|
BaseRecyclerView bv_zhuang = v.findViewById(R.id.bv_zhuang);
|
||||||
BaseRecyclerView bv_xie=v.findViewById(R.id.bv_xie);
|
BaseRecyclerView bv_xie = v.findViewById(R.id.bv_xie);
|
||||||
//bv_zhuang.set
|
//bv_zhuang.set
|
||||||
List<Object> list_zhuang=new ArrayList<>();
|
List<Object> list_zhuang = new ArrayList<>();
|
||||||
List<Object> list_xie=new ArrayList<>();
|
List<Object> list_xie = new ArrayList<>();
|
||||||
for(int i=0;i<sob.getData().getWayChildren().size();i++){
|
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO sdw=sob.getData().getWayChildren().get(i);
|
StartOrderBean.DataDTO.WayChildrenDTO sdw = sob.getData().getWayChildren().get(i);
|
||||||
if(sdw.getType()==1){
|
if (sdw.getType() == 1) {
|
||||||
sdw.setUpdateTime(StringUtil.isNull((String) sdw.getUpdateTime(),"未装货"));
|
sdw.setUpdateTime(StringUtil.isNull((String) sdw.getUpdateTime(), "未装货"));
|
||||||
list_zhuang.add(sdw);
|
list_zhuang.add(sdw);
|
||||||
}else{
|
} else {
|
||||||
sdw.setUpdateTime(StringUtil.isNull((String) sdw.getUpdateTime(),"未卸货"));
|
sdw.setUpdateTime(StringUtil.isNull((String) sdw.getUpdateTime(), "未卸货"));
|
||||||
list_xie.add(sdw);
|
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 -> {
|
get_contract.setOnClickListener(v13 -> {
|
||||||
Intent in=new Intent(con, WebPDFActivity.class);
|
Intent in = new Intent(con, WebPDFActivity.class);
|
||||||
in.putExtra("title","电子合同");
|
in.putExtra("title", "电子合同");
|
||||||
Log.e("--地址--",sob.getData().getContractUrl());
|
Log.e("--地址--", sob.getData().getContractUrl());
|
||||||
in.putExtra("url",sob.getData().getContractUrl());
|
in.putExtra("url", sob.getData().getContractUrl());
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
});
|
});
|
||||||
// v.findViewById(R.id.upload_receipt).setOnClickListener(new View.OnClickListener() {
|
// v.findViewById(R.id.upload_receipt).setOnClickListener(new View.OnClickListener() {
|
||||||
@@ -294,134 +299,149 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
// startActivity(in);
|
// 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;
|
boolean upkey = false;
|
||||||
if(position==0){
|
if (position == 0) {
|
||||||
upkey=true;
|
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;
|
boolean upkey = false;
|
||||||
if(position==(list_xie.size()-1)){
|
if (position == (list_xie.size() - 1)) {
|
||||||
upkey=true;
|
upkey = true;
|
||||||
}
|
}
|
||||||
initZX(upkey, v15, position, o, 1);
|
initZX(upkey, v15, position, o, 1);
|
||||||
});
|
});
|
||||||
search();
|
search();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initZX(boolean key,View v,int position,Object o,int type){
|
public void initZX(boolean key, View v, int position, Object o, int type) {
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO sdw= (StartOrderBean.DataDTO.WayChildrenDTO) o;
|
StartOrderBean.DataDTO.WayChildrenDTO sdw = (StartOrderBean.DataDTO.WayChildrenDTO) o;
|
||||||
TextView index=v.findViewById(R.id.index);
|
TextView index = v.findViewById(R.id.index);
|
||||||
TextView s_zx=v.findViewById(R.id.s_zx);
|
TextView s_zx = v.findViewById(R.id.s_zx);
|
||||||
TextView j_zx=v.findViewById(R.id.j_zx);
|
TextView j_zx = v.findViewById(R.id.j_zx);
|
||||||
if(type==1){
|
if (type == 1) {
|
||||||
s_zx.setText("实际卸货时间:");
|
s_zx.setText("实际卸货时间:");
|
||||||
j_zx.setText("计划卸货时间:");
|
j_zx.setText("计划卸货时间:");
|
||||||
}
|
}
|
||||||
if(position==0){
|
if (position == 0) {
|
||||||
if(type==0){
|
if (type == 0) {
|
||||||
index.setText("装货地");
|
index.setText("装货地");
|
||||||
}else{
|
} else {
|
||||||
index.setText("卸货地");
|
index.setText("卸货地");
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
if(type==0) {
|
if (type == 0) {
|
||||||
index.setText("第" + (position + 1) + "装货地");
|
index.setText("第" + (position + 1) + "装货地");
|
||||||
}else{
|
} else {
|
||||||
index.setText("第" + (position + 1) + "卸货地");
|
index.setText("第" + (position + 1) + "卸货地");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TextView goodName=v.findViewById(R.id.goodName);
|
TextView goodName = v.findViewById(R.id.goodName);
|
||||||
TextView goodNum=v.findViewById(R.id.goodNum);
|
TextView goodNum = v.findViewById(R.id.goodNum);
|
||||||
TextView goodUnit=v.findViewById(R.id.goodUnit);
|
TextView goodUnit = v.findViewById(R.id.goodUnit);
|
||||||
goodName.setText(sdw.getGoods().get(0).getGoodName());
|
goodName.setText(sdw.getGoods().get(0).getGoodName());
|
||||||
goodNum.setText(sdw.getGoods().get(0).getGoodNum());
|
goodNum.setText(sdw.getGoods().get(0).getGoodNum());
|
||||||
goodUnit.setText(sdw.getGoods().get(0).getGoodUnit());
|
goodUnit.setText(sdw.getGoods().get(0).getGoodUnit());
|
||||||
TextView huoyuan_state=v.findViewById(R.id.huoyuan_state);
|
TextView huoyuan_state = v.findViewById(R.id.huoyuan_state);
|
||||||
huoyuan_state.setText(stateText(sdw.getStatus(),type));
|
huoyuan_state.setText(stateText(sdw.getStatus(), type));
|
||||||
huoyuan_state.setOnClickListener(new View.OnClickListener() {
|
huoyuan_state.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
String wid= sdw.getId()+"";
|
String wid = sdw.getId() + "";
|
||||||
if(sdw.getStatus()==0){
|
if (sdw.getStatus() == 0) {
|
||||||
if(type==0){
|
if (type == 0) {
|
||||||
Intent in=new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type",type);
|
in.putExtra("type", type);
|
||||||
in.putExtra("wid",wid);
|
in.putExtra("wid", wid);
|
||||||
in.putExtra("sob",gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
in.putExtra("keys",key);
|
in.putExtra("keys", key);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
}else{
|
} else {
|
||||||
Toast.makeText(con,"您还没有装货",Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "您还没有装货", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}else if(sdw.getStatus()==1){//装货回单
|
} else if (sdw.getStatus() == 1) {//装货回单
|
||||||
if(type==0){
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
Intent in=new Intent(con, ShangChuangImgActivity.class);
|
in.putExtra("type", 2);
|
||||||
in.putExtra("type",2);
|
in.putExtra("wid", wid);
|
||||||
in.putExtra("wid",wid);
|
in.putExtra("h_type", type);
|
||||||
in.putExtra("h_type",type);
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
in.putExtra("sob",gson.toJson(sob));
|
startActivity(in);
|
||||||
startActivity(in);
|
} else if (sdw.getStatus() == 2) {//上传收货单(卸货回单)
|
||||||
}else{
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
Toast.makeText(con,"您还没有上传回单信息",Toast.LENGTH_SHORT).show();
|
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 {//卸货照片
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}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);
|
|
||||||
startActivity(in);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public String stateText(int state,int type){
|
public String stateText(int state, int type) {
|
||||||
String str="";
|
String str = "";
|
||||||
//0待装货,1已装货 2已卸货 3已上传回单 4待卸货
|
//0待装货,1已装货 2已卸货 3已上传回单 4待卸货
|
||||||
switch (state){
|
switch (state) {
|
||||||
case 0://str="待装货";
|
case 0://str="待装货";
|
||||||
if(type==0){
|
if (type == 0) {
|
||||||
str="立即装货";
|
str = "立即装货";
|
||||||
// str="确认装货";
|
// str="确认装货";
|
||||||
}else{
|
} else {
|
||||||
str="请先装货";
|
str = "请先装货";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1://str="已装货";
|
case 1://str="已装货";
|
||||||
str="上传出货单";
|
str = "上传出货单";
|
||||||
// str="确认回单";
|
// str="确认回单";
|
||||||
break;
|
break;
|
||||||
case 2://str="已卸货";
|
case 2://str="已卸货";
|
||||||
str="上传收货单";
|
str = "上传收货单";
|
||||||
// str="确认回单";
|
// str="确认回单";
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
//str="已上传回单";
|
//str="已上传回单";
|
||||||
str="查看凭证";
|
str = "查看凭证";
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
//str="待卸货";
|
//str="待卸货";
|
||||||
str="确认卸货";
|
str = "确认卸货";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
default:break;
|
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@@ -429,7 +449,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if(map!=null){
|
if (map != null) {
|
||||||
map.onResume();
|
map.onResume();
|
||||||
}
|
}
|
||||||
hyr.startOrder(id);
|
hyr.startOrder(id);
|
||||||
@@ -439,7 +459,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
if(map!=null){
|
if (map != null) {
|
||||||
map.onPause();
|
map.onPause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -447,7 +467,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
if(map!=null){
|
if (map != null) {
|
||||||
map.onDestroy();
|
map.onDestroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -457,11 +477,12 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
super.onSaveInstanceState(outState);
|
super.onSaveInstanceState(outState);
|
||||||
map.onSaveInstanceState(outState);
|
map.onSaveInstanceState(outState);
|
||||||
}
|
}
|
||||||
|
|
||||||
LocationSource.OnLocationChangedListener mListener;
|
LocationSource.OnLocationChangedListener mListener;
|
||||||
AMapLocationClient mlocationClient;
|
AMapLocationClient mlocationClient;
|
||||||
AMapLocationClientOption mLocationOption;
|
AMapLocationClientOption mLocationOption;
|
||||||
|
|
||||||
public void initLoaction(){
|
public void initLoaction() {
|
||||||
// 设置定位监听
|
// 设置定位监听
|
||||||
aMap.setLocationSource(new LocationSource() {
|
aMap.setLocationSource(new LocationSource() {
|
||||||
@Override
|
@Override
|
||||||
@@ -480,13 +501,13 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
mlocationClient.setLocationListener(new AMapLocationListener() {
|
mlocationClient.setLocationListener(new AMapLocationListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onLocationChanged(AMapLocation aMapLocation) {
|
public void onLocationChanged(AMapLocation aMapLocation) {
|
||||||
if (mListener != null&&aMapLocation != null) {
|
if (mListener != null && aMapLocation != null) {
|
||||||
if (aMapLocation != null
|
if (aMapLocation != null
|
||||||
&&aMapLocation.getErrorCode() == 0) {
|
&& aMapLocation.getErrorCode() == 0) {
|
||||||
mListener.onLocationChanged(aMapLocation);// 显示系统小蓝点
|
mListener.onLocationChanged(aMapLocation);// 显示系统小蓝点
|
||||||
} else {
|
} else {
|
||||||
String errText = "定位失败," + aMapLocation.getErrorCode()+ ": " + aMapLocation.getErrorInfo();
|
String errText = "定位失败," + aMapLocation.getErrorCode() + ": " + aMapLocation.getErrorInfo();
|
||||||
Log.e("AmapErr",errText);
|
Log.e("AmapErr", errText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -538,45 +559,44 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
|
|
||||||
|
|
||||||
private RouteSearch mRouteSearch;//路线查询器
|
private RouteSearch mRouteSearch;//路线查询器
|
||||||
private List<LatLonPoint> lists=new ArrayList<>();
|
private List<LatLonPoint> lists = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
public void search(){
|
public void search() {
|
||||||
// try {
|
// try {
|
||||||
// AMapLocationClient.updatePrivacyShow(con,true,true);
|
// AMapLocationClient.updatePrivacyShow(con,true,true);
|
||||||
// AMapLocationClient.updatePrivacyAgree(con,true);
|
// AMapLocationClient.updatePrivacyAgree(con,true);
|
||||||
mRouteSearch = new RouteSearch(this);
|
mRouteSearch = new RouteSearch(this);
|
||||||
// } catch (AMapException e) {
|
// } catch (AMapException e) {
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
// }
|
// }
|
||||||
//设置数据回调监听器
|
//设置数据回调监听器
|
||||||
mRouteSearch.setRouteSearchListener(new OnRouteSearchListener());
|
mRouteSearch.setRouteSearchListener(new OnRouteSearchListener());
|
||||||
//设置开始位置坐标点(注意经纬度不能写反,会报错1800(只能规划到中国区域里的地图路线))
|
//设置开始位置坐标点(注意经纬度不能写反,会报错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()));
|
Double.parseDouble(sob.getData().getWayChildren().get((0)).getLongitude()));
|
||||||
//设置目的地坐标点
|
//设置目的地坐标点
|
||||||
LatLonPoint endPoint = new LatLonPoint(Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size()-1)).getLatitude()),
|
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()));
|
Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size() - 1)).getLongitude()));
|
||||||
//查询信息对象
|
//查询信息对象
|
||||||
for (int i=0;i<sob.getData().getWayChildren().size();i++){
|
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
||||||
if(i!=0 && i!=(sob.getData().getWayChildren().size()-1)){
|
if (i != 0 && i != (sob.getData().getWayChildren().size() - 1)) {
|
||||||
LatLonPoint sp=new LatLonPoint(Double.parseDouble(sob.getData().getWayChildren().get(i).getLatitude()),
|
LatLonPoint sp = new LatLonPoint(Double.parseDouble(sob.getData().getWayChildren().get(i).getLatitude()),
|
||||||
Double.parseDouble(sob.getData().getWayChildren().get((i)).getLongitude()));
|
Double.parseDouble(sob.getData().getWayChildren().get((i)).getLongitude()));
|
||||||
lists.add(sp);
|
lists.add(sp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RouteSearch.FromAndTo fromAndTo = new RouteSearch.FromAndTo(startPoint,endPoint);
|
RouteSearch.FromAndTo fromAndTo = new RouteSearch.FromAndTo(startPoint, endPoint);
|
||||||
//设置搜索参数 1.fromAndTo 路径的起点终点 2.路径规划的策略(这里是驾车模式,具体看高德API) 3.途
|
//设置搜索参数 1.fromAndTo 路径的起点终点 2.路径规划的策略(这里是驾车模式,具体看高德API) 3.途
|
||||||
//经点,可选 4.避让区域,可选, 5.避让道路 ,可选
|
//经点,可选 4.避让区域,可选, 5.避让道路 ,可选
|
||||||
RouteSearch.DriveRouteQuery query = new
|
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);
|
mRouteSearch.calculateDriveRouteAsyn(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class OnRouteSearchListener implements RouteSearch.OnRouteSearchListener {
|
||||||
class OnRouteSearchListener implements RouteSearch.OnRouteSearchListener{
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBusRouteSearched(BusRouteResult busRouteResult, int i) {
|
public void onBusRouteSearched(BusRouteResult busRouteResult, int i) {
|
||||||
@@ -585,7 +605,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDriveRouteSearched(DriveRouteResult driveRouteResult, int rCode) {
|
public void onDriveRouteSearched(DriveRouteResult driveRouteResult, int rCode) {
|
||||||
if (rCode == 1000){//获取规划路线成功,获取到的是了,路线坐标点的集合
|
if (rCode == 1000) {//获取规划路线成功,获取到的是了,路线坐标点的集合
|
||||||
List<DrivePath> paths = driveRouteResult.getPaths();
|
List<DrivePath> paths = driveRouteResult.getPaths();
|
||||||
//创建存储坐标点的集合
|
//创建存储坐标点的集合
|
||||||
List<LatLng> latLngs = new ArrayList<>();
|
List<LatLng> latLngs = new ArrayList<>();
|
||||||
@@ -594,7 +614,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
for (DriveStep mDriveStep : mDrivePath.getSteps()) {
|
for (DriveStep mDriveStep : mDrivePath.getSteps()) {
|
||||||
for (LatLonPoint mLatLonPoint : mDriveStep.getPolyline()) {
|
for (LatLonPoint mLatLonPoint : mDriveStep.getPolyline()) {
|
||||||
latLngs.add(new
|
latLngs.add(new
|
||||||
LatLng(mLatLonPoint.getLatitude(),mLatLonPoint.getLongitude()));
|
LatLng(mLatLonPoint.getLatitude(), mLatLonPoint.getLongitude()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -605,24 +625,24 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.qi))
|
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.qi))
|
||||||
.position(new LatLng(Double.parseDouble(sob.getData().getWayChildren().get(0).getLatitude()),
|
.position(new LatLng(Double.parseDouble(sob.getData().getWayChildren().get(0).getLatitude()),
|
||||||
Double.parseDouble(sob.getData().getWayChildren().get(0).getLongitude()))));
|
Double.parseDouble(sob.getData().getWayChildren().get(0).getLongitude()))));
|
||||||
for(int i=0;i<sob.getData().getWayChildren().size();i++){
|
for (int i = 0; i < sob.getData().getWayChildren().size(); i++) {
|
||||||
if(i!=0 && i!=(sob.getData().getWayChildren().size()-1)){
|
if (i != 0 && i != (sob.getData().getWayChildren().size() - 1)) {
|
||||||
StartOrderBean.DataDTO.WayChildrenDTO sdw=sob.getData().getWayChildren().get(i);
|
StartOrderBean.DataDTO.WayChildrenDTO sdw = sob.getData().getWayChildren().get(i);
|
||||||
int icon=0;
|
int icon = 0;
|
||||||
if(sdw.getType()==1){
|
if (sdw.getType() == 1) {
|
||||||
icon=R.mipmap.z_loc;
|
icon = R.mipmap.z_loc;
|
||||||
}else{
|
} else {
|
||||||
icon=R.mipmap.x_loc;
|
icon = R.mipmap.x_loc;
|
||||||
}
|
}
|
||||||
aMap.addMarker(new MarkerOptions()
|
aMap.addMarker(new MarkerOptions()
|
||||||
.icon(BitmapDescriptorFactory.fromResource(icon))
|
.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()
|
aMap.addMarker(new MarkerOptions()
|
||||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.zhong))
|
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.zhong))
|
||||||
.position(new LatLng(Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size()-1)).getLatitude()),
|
.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()))));
|
Double.parseDouble(sob.getData().getWayChildren().get((sob.getData().getWayChildren().size() - 1)).getLongitude()))));
|
||||||
//绘制规划路径路线
|
//绘制规划路径路线
|
||||||
aMap.addPolyline(new PolylineOptions()
|
aMap.addPolyline(new PolylineOptions()
|
||||||
//路线坐标点的集合
|
//路线坐标点的集合
|
||||||
@@ -633,15 +653,15 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
//设置画线的颜色
|
//设置画线的颜色
|
||||||
|
|
||||||
//显示完整包含所有marker地图路线
|
//显示完整包含所有marker地图路线
|
||||||
LatLngBounds.Builder builder =LatLngBounds.builder();
|
LatLngBounds.Builder builder = LatLngBounds.builder();
|
||||||
for (int i = 0; i < latLngs.size(); i++) {
|
for (int i = 0; i < latLngs.size(); i++) {
|
||||||
builder.include(latLngs.get(i));
|
builder.include(latLngs.get(i));
|
||||||
}
|
}
|
||||||
//显示全部marker,第二个参数是四周留空宽度
|
//显示全部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()),
|
LatLng latLng = new LatLng(Double.parseDouble(sob.getData().getWayChildren().get(0).getLatitude()),
|
||||||
Double.parseDouble(sob.getData().getWayChildren().get((0)).getLongitude()));//构造一个位置
|
Double.parseDouble(sob.getData().getWayChildren().get((0)).getLongitude()));//构造一个位置
|
||||||
aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng,6));
|
aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 6));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -657,7 +677,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void up_traffic(){
|
public void up_traffic() {
|
||||||
// ShippingNoteInfo[] snis=new ShippingNoteInfo[1];
|
// ShippingNoteInfo[] snis=new ShippingNoteInfo[1];
|
||||||
// ShippingNoteInfo sni=new ShippingNoteInfo();
|
// ShippingNoteInfo sni=new ShippingNoteInfo();
|
||||||
// sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
// sni.setShippingNoteNumber(sob.getData().getShippingNoteNumber());
|
||||||
|
|||||||
+110
-101
@@ -19,7 +19,7 @@ import com.alct.mdp.callback.OnResultListener;
|
|||||||
import com.alct.mdp.model.Goods;
|
import com.alct.mdp.model.Goods;
|
||||||
import com.alct.mdp.model.Image;
|
import com.alct.mdp.model.Image;
|
||||||
import com.alct.mdp.model.Location;
|
import com.alct.mdp.model.Location;
|
||||||
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.CarInfoBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.CarInfoBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
||||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||||
@@ -30,6 +30,8 @@ import com.arpa.hndahesudintocctmsdriver.util.NfcUtils;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.img.GetCarImageAlert;
|
import com.arpa.hndahesudintocctmsdriver.util.img.GetCarImageAlert;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.location.LocationUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.location.LocationUtil;
|
||||||
|
import com.baidu.mapapi.model.LatLng;
|
||||||
|
import com.baidu.mapapi.utils.CoordinateConverter;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.luck.picture.lib.PictureSelector;
|
import com.luck.picture.lib.PictureSelector;
|
||||||
@@ -43,7 +45,6 @@ import com.arpa.hndahesudintocctmsdriver.bean.UploadBean;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.UploadReceiptInputBean;
|
import com.arpa.hndahesudintocctmsdriver.request.bean.UploadReceiptInputBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.location.LocationGDUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.location.LocationGDUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||||
@@ -93,11 +94,15 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
switch (m.what) {
|
switch (m.what) {
|
||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
if (CacheGroup.cacheList.get("upload") != null) {
|
if (CacheGroup.cacheList.get("upload") != null) {
|
||||||
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
Log.e("upload", CacheGroup.cacheList.get("upload"));
|
Log.e("upload", CacheGroup.cacheList.get("upload"));
|
||||||
ub = gson.fromJson(CacheGroup.cacheList.remove("upload"), UploadBean.class);
|
ub = gson.fromJson(CacheGroup.cacheList.remove("upload"), UploadBean.class);
|
||||||
if (ub.getCode() == 200) {
|
if (ub.getCode() == 200) {
|
||||||
imgIds.add(ub.getData().getId());
|
imgIds.add(ub.getData().getId());
|
||||||
Glide.with(con).load(ub.getData().getUrl()).into(res_img);
|
// Glide.with(con).load(ub.getData().getUrl()).into(res_img);
|
||||||
|
Glide.with(con).load(path).into(res_img);
|
||||||
res_img.setVisibility(View.VISIBLE);
|
res_img.setVisibility(View.VISIBLE);
|
||||||
img_delete.setVisibility(View.VISIBLE);
|
img_delete.setVisibility(View.VISIBLE);
|
||||||
img_icon.setVisibility(View.GONE);
|
img_icon.setVisibility(View.GONE);
|
||||||
@@ -110,18 +115,21 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
for (int i = 0; i < TYPE_NAME.length; i++) {
|
for (int i = 0; i < TYPE_NAME.length; i++) {
|
||||||
if (CacheGroup.cacheList.get(TYPE_NAME[i]) != null) {
|
if (CacheGroup.cacheList.get(TYPE_NAME[i]) != null) {
|
||||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[i]), BaseBean.class);
|
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(TYPE_NAME[i]), BaseBean.class);
|
||||||
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
if (bb.getCode() == 200) {
|
if (bb.getCode() == 200) {
|
||||||
if (!keys) {
|
if (index == 2) {
|
||||||
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
if (!keys){//装货回单
|
||||||
finish();
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
} else {
|
finish();
|
||||||
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
}
|
||||||
finish();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove(TYPE_NAME[i]);
|
CacheGroup.cacheList.remove(TYPE_NAME[i]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("carName") != null) {
|
if (CacheGroup.cacheList.get("carName") != null) {
|
||||||
@@ -148,6 +156,9 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
hyr.uploadFile(new File(path));
|
hyr.uploadFile(new File(path));
|
||||||
}
|
}
|
||||||
} else {//识别失败后返回code500
|
} else {//识别失败后返回code500
|
||||||
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
if (index == 0) {//装卸货车辆需要识别车牌号){
|
if (index == 0) {//装卸货车辆需要识别车牌号){
|
||||||
Toast.makeText(con, "装货照片包含车牌号、三分之二车身或者装卸货场景。", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "装货照片包含车牌号、三分之二车身或者装卸货场景。", Toast.LENGTH_SHORT).show();
|
||||||
} else if (index == 1) {
|
} else if (index == 1) {
|
||||||
@@ -160,14 +171,19 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
break;
|
break;
|
||||||
case 14://定位成功
|
case 14://定位成功
|
||||||
locationKey = true;
|
locationKey = true;
|
||||||
customDialog.dismiss();
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
tv_loaction.setText("定位成功");
|
tv_loaction.setText("定位成功");
|
||||||
tv_loaction.setTextColor(getResources().getColor(R.color.theme_color, null));
|
tv_loaction.setTextColor(getResources().getColor(R.color.theme_color, null));
|
||||||
|
latLng = convertGPSToBaidu(new LatLng(lgdu.getLatitude(), lgdu.getLongitude()));
|
||||||
initLocation();
|
initLocation();
|
||||||
break;
|
break;
|
||||||
case 16://定位失败
|
case 16://定位失败
|
||||||
locationKey = false;
|
locationKey = false;
|
||||||
customDialog.dismiss();
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
tv_loaction.setText("定位失败,点击重试");
|
tv_loaction.setText("定位失败,点击重试");
|
||||||
tv_loaction.setTextColor(getResources().getColor(R.color.loaction_no_color, null));
|
tv_loaction.setTextColor(getResources().getColor(R.color.loaction_no_color, null));
|
||||||
Toast.makeText(con, "定位失败,请确认开启定位后重试!", Toast.LENGTH_LONG).show();
|
Toast.makeText(con, "定位失败,请确认开启定位后重试!", Toast.LENGTH_LONG).show();
|
||||||
@@ -185,7 +201,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
// if(index==1 || index==2){
|
// if(index==1 || index==2){
|
||||||
// new OCRRequest().OCRPlateLicense(con,hd,new File(path));
|
// new OCRRequest().OCRPlateLicense(con,hd,new File(path));
|
||||||
// }
|
// }
|
||||||
if (index == 0 || index == 1) {//装卸货车辆需要识别车牌号
|
if ((index == 0 || index == 1) && !BuildConfig.isTest) {//装卸货车辆需要识别车牌号,测试环境不校验车牌号
|
||||||
new OCRRequest().OCRCarPlateLicense(con, hd, new File(path));
|
new OCRRequest().OCRCarPlateLicense(con, hd, new File(path));
|
||||||
} else {
|
} else {
|
||||||
hyr.uploadFile(new File(path));
|
hyr.uploadFile(new File(path));
|
||||||
@@ -195,6 +211,14 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
break;
|
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 String wid;
|
||||||
private int h_type;
|
private int h_type;
|
||||||
@@ -231,16 +255,18 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
lgdu = new LocationGDUtil(con, hd);
|
lgdu = new LocationGDUtil(con, hd);
|
||||||
//启动定位
|
//启动定位
|
||||||
lgdu.onCreate();
|
lgdu.onCreate();
|
||||||
lu = new LocationUtil(con, hd);
|
// lu = new LocationUtil(con, hd);
|
||||||
lu.onCreate();
|
// lu.onCreate();
|
||||||
if (keys) {
|
// if (keys) {
|
||||||
lu = new LocationUtil(con, hd);
|
// lu = new LocationUtil(con, hd);
|
||||||
lu.onCreate();
|
// lu.onCreate();
|
||||||
}
|
// }
|
||||||
tv_loaction.setOnClickListener(v -> {
|
tv_loaction.setOnClickListener(v -> {
|
||||||
if (!locationKey) {
|
if (!locationKey) {
|
||||||
customDialog.show();
|
customDialog.show();
|
||||||
lgdu.onCreate();
|
lgdu.onCreate();
|
||||||
|
// lu = new LocationUtil(con, hd);
|
||||||
|
// lu.onCreate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
hyr = new HuoYuanRequset(con, hd);
|
hyr = new HuoYuanRequset(con, hd);
|
||||||
@@ -312,6 +338,12 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
path = gia.getFile().getPath();
|
path = gia.getFile().getPath();
|
||||||
Log.e("图片地址:", path);
|
Log.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
|
|
||||||
|
if (customDialog!=null&&!customDialog.isShowing()){
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
||||||
List<LocalMedia> imgs = PictureSelector.obtainMultipleResult(data);
|
List<LocalMedia> imgs = PictureSelector.obtainMultipleResult(data);
|
||||||
@@ -325,6 +357,12 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
path = paths;
|
path = paths;
|
||||||
Log.e("图片地址:", path);
|
Log.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
|
|
||||||
|
if (customDialog!=null&&!customDialog.isShowing()){
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -340,6 +378,10 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
// }
|
// }
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
|
if (customDialog!=null&&!customDialog.isShowing()){
|
||||||
|
customDialog = new CustomDialog(con, "网络请求中...");
|
||||||
|
customDialog.show();
|
||||||
|
}
|
||||||
//装货
|
//装货
|
||||||
if (imgIds != null && imgIds.size() > 0) {
|
if (imgIds != null && imgIds.size() > 0) {
|
||||||
lub.setLatitude(lgdu.getLatitude() + "");
|
lub.setLatitude(lgdu.getLatitude() + "");
|
||||||
@@ -348,8 +390,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
lub.setImageId(imgIds);
|
lub.setImageId(imgIds);
|
||||||
lub.setWaybillId(wid);
|
lub.setWaybillId(wid);
|
||||||
Log.e("--装货信息", gson.toJson(lub));
|
Log.e("--装货信息", gson.toJson(lub));
|
||||||
if (locationKey) {
|
if (locationKey) {//高德定位
|
||||||
|
|
||||||
if (keys) {
|
if (keys) {
|
||||||
nfc();
|
nfc();
|
||||||
loadInfo();
|
loadInfo();
|
||||||
@@ -422,34 +463,6 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
|
|
||||||
private StartOrderBean sob;
|
private StartOrderBean sob;
|
||||||
|
|
||||||
//上传安联和交通厅-装货
|
|
||||||
public void up_traffic_start() {
|
|
||||||
//安联
|
|
||||||
if (sob.getData().getReportAlct() == 1) {
|
|
||||||
Location l = new Location();
|
|
||||||
l.setBaiduLongitude(lu.getLongitude());
|
|
||||||
l.setBaiduLatitude(lu.getLatitude());
|
|
||||||
l.setLocation(lu.getAddress());
|
|
||||||
l.setTime(Timer.getTimerT());
|
|
||||||
MDPLocationCollectionManager.pickup(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess() {
|
|
||||||
Log.e("上报安联", "装货上传成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(String s, String s1) {
|
|
||||||
Log.e("上报安联失败(装货):", s + s1);
|
|
||||||
new MessageUtils().showCenMessage(con, s1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//交通厅
|
|
||||||
if (sob.getData().getReport() == 1) {
|
|
||||||
JTTProcess.start(con, sob, "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void nfc() {
|
public void nfc() {
|
||||||
// if(sob.getData().getNfcId().equals(nfcStr)){
|
// if(sob.getData().getNfcId().equals(nfcStr)){
|
||||||
// Toast.makeText(con,"nfcId匹配失败",Toast.LENGTH_LONG).show();
|
// Toast.makeText(con,"nfcId匹配失败",Toast.LENGTH_LONG).show();
|
||||||
@@ -471,41 +484,13 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//上传安联和交通厅-卸货
|
|
||||||
public void up_traffic_end() {
|
|
||||||
//安联
|
|
||||||
if (sob.getData().getReportAlct() == 1) {
|
|
||||||
Location l = new Location();
|
|
||||||
l.setBaiduLongitude(lu.getLongitude());
|
|
||||||
l.setBaiduLatitude(lu.getLatitude());
|
|
||||||
l.setLocation(lu.getAddress());
|
|
||||||
l.setTime(Timer.getTimerT());
|
|
||||||
Log.e("-安联卸货信息-", gson.toJson(l));
|
|
||||||
MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess() {
|
|
||||||
Log.e("上报安联", "卸货上传成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(String s, String s1) {
|
|
||||||
Log.e("上报安联失败(卸货):", s + s1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//交通厅
|
|
||||||
if (sob.getData().getReport() == 1) {
|
|
||||||
JTTProcess.stop(con, sob, "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//上传安联-签收
|
//上传安联-签收
|
||||||
public void up_trafficSign() {
|
public void up_trafficSign() {
|
||||||
//安联
|
//安联
|
||||||
Location l = new Location();
|
Location l = new Location();
|
||||||
l.setBaiduLongitude(lu.getLongitude());
|
l.setBaiduLongitude(latLng.longitude);
|
||||||
l.setBaiduLatitude(lu.getLatitude());
|
l.setBaiduLatitude(latLng.latitude);
|
||||||
l.setLocation(lu.getAddress());
|
l.setLocation(lgdu.getAddress());
|
||||||
l.setTime(Timer.getTimerT());
|
l.setTime(Timer.getTimerT());
|
||||||
List<Goods> gs = new ArrayList<>();
|
List<Goods> gs = new ArrayList<>();
|
||||||
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
|
||||||
@@ -543,9 +528,9 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
public void up_trafficReceipt() {
|
public void up_trafficReceipt() {
|
||||||
//安联
|
//安联
|
||||||
Location l = new Location();
|
Location l = new Location();
|
||||||
l.setBaiduLongitude(lu.getLongitude());
|
l.setBaiduLongitude(latLng.longitude);
|
||||||
l.setBaiduLatitude(lu.getLatitude());
|
l.setBaiduLatitude(latLng.latitude);
|
||||||
l.setLocation(lu.getAddress());
|
l.setLocation(lgdu.getAddress());
|
||||||
l.setTime(Timer.getTimerT());
|
l.setTime(Timer.getTimerT());
|
||||||
MDPLocationCollectionManager.pod(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
MDPLocationCollectionManager.pod(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
|
||||||
@@ -571,14 +556,19 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
image.setFileExt(FileUtil.lastName(file));
|
image.setFileExt(FileUtil.lastName(file));
|
||||||
image.setFileName(FileUtil.fileName(file));
|
image.setFileName(FileUtil.fileName(file));
|
||||||
image.setImageTakenDate(Timer.getTimerT());
|
image.setImageTakenDate(Timer.getTimerT());
|
||||||
image.setBaiduLongitude(lu.getLongitude());
|
image.setBaiduLongitude(latLng.longitude);
|
||||||
image.setBaiduLatitude(lu.getLatitude());
|
image.setBaiduLatitude(latLng.latitude);
|
||||||
image.setLocation(lu.getAddress());
|
image.setLocation(lgdu.getAddress());
|
||||||
MDPLocationCollectionManager.uploadPickupImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
MDPLocationCollectionManager.uploadPickupImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
Log.e("上报安联", "装货照片上传成功");
|
Log.e("上报安联", "装货照片上传成功");
|
||||||
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -601,14 +591,19 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
image.setFileExt(FileUtil.lastName(file));
|
image.setFileExt(FileUtil.lastName(file));
|
||||||
image.setFileName(FileUtil.fileName(file));
|
image.setFileName(FileUtil.fileName(file));
|
||||||
image.setImageTakenDate(Timer.getTimerT());
|
image.setImageTakenDate(Timer.getTimerT());
|
||||||
image.setBaiduLongitude(lu.getLongitude());
|
image.setBaiduLongitude(latLng.longitude);
|
||||||
image.setBaiduLatitude(lu.getLatitude());
|
image.setBaiduLatitude(latLng.latitude);
|
||||||
image.setLocation(lu.getAddress());
|
image.setLocation(lgdu.getAddress());
|
||||||
MDPLocationCollectionManager.uploadUnloadImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
MDPLocationCollectionManager.uploadUnloadImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
Log.e("上报安联", "卸货照片上传成功");
|
Log.e("上报安联", "卸货照片上传成功");
|
||||||
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -632,14 +627,19 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
image.setFileExt(FileUtil.lastName(file));
|
image.setFileExt(FileUtil.lastName(file));
|
||||||
image.setFileName(FileUtil.fileName(file));
|
image.setFileName(FileUtil.fileName(file));
|
||||||
image.setImageTakenDate(Timer.getTimerT());
|
image.setImageTakenDate(Timer.getTimerT());
|
||||||
image.setBaiduLongitude(lu.getLongitude());
|
image.setBaiduLongitude(latLng.longitude);
|
||||||
image.setBaiduLatitude(lu.getLatitude());
|
image.setBaiduLatitude(latLng.latitude);
|
||||||
image.setLocation(lu.getAddress());
|
image.setLocation(lgdu.getAddress());
|
||||||
MDPLocationCollectionManager.uploadPODImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
MDPLocationCollectionManager.uploadPODImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
Log.e("上报安联", "回单照片上传成功");
|
Log.e("上报安联", "回单照片上传成功");
|
||||||
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -683,6 +683,9 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("nfc", nfcStr);
|
Log.e("nfc", nfcStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传安联和交通厅,平台-装货
|
* 上传安联和交通厅,平台-装货
|
||||||
*/
|
*/
|
||||||
@@ -690,9 +693,9 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
//安联
|
//安联
|
||||||
if (sob.getData().getReportAlct() == 1) {
|
if (sob.getData().getReportAlct() == 1) {
|
||||||
Location l = new Location();
|
Location l = new Location();
|
||||||
l.setBaiduLongitude(lu.getLongitude());
|
l.setBaiduLongitude(latLng.longitude);
|
||||||
l.setBaiduLatitude(lu.getLatitude());
|
l.setBaiduLatitude(latLng.latitude);
|
||||||
l.setLocation(lu.getAddress());
|
l.setLocation(lgdu.getAddress());
|
||||||
l.setTime(Timer.getTimerT());
|
l.setTime(Timer.getTimerT());
|
||||||
MDPLocationCollectionManager.pickup(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
MDPLocationCollectionManager.pickup(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -702,15 +705,18 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
if (sob.getData().getReport() == 1) {
|
if (sob.getData().getReport() == 1) {
|
||||||
JTTProcess.start(con, sob, "");
|
JTTProcess.start(con, sob, "");
|
||||||
}
|
}
|
||||||
//装货照片
|
|
||||||
up_image_z();
|
|
||||||
//装货状态
|
//装货状态
|
||||||
hyr.loading(lub);
|
hyr.loading(lub);
|
||||||
|
//装货照片
|
||||||
|
up_image_z();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("上报安联失败(装货):", s + s1);
|
Log.e("上报安联失败(装货):", s + s1);
|
||||||
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
new MessageUtils().showCenMessage(con, s1);
|
new MessageUtils().showCenMessage(con, s1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -726,9 +732,9 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
//安联
|
//安联
|
||||||
if (sob.getData().getReportAlct() == 1) {
|
if (sob.getData().getReportAlct() == 1) {
|
||||||
Location l = new Location();
|
Location l = new Location();
|
||||||
l.setBaiduLongitude(lu.getLongitude());
|
l.setBaiduLongitude(latLng.longitude);
|
||||||
l.setBaiduLatitude(lu.getLatitude());
|
l.setBaiduLatitude(latLng.latitude);
|
||||||
l.setLocation(lu.getAddress());
|
l.setLocation(lgdu.getAddress());
|
||||||
l.setTime(Timer.getTimerT());
|
l.setTime(Timer.getTimerT());
|
||||||
Log.e("-安联卸货信息-", gson.toJson(l));
|
Log.e("-安联卸货信息-", gson.toJson(l));
|
||||||
MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
||||||
@@ -739,15 +745,18 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
if (sob.getData().getReport() == 1) {
|
if (sob.getData().getReport() == 1) {
|
||||||
JTTProcess.stop(con, sob, "");
|
JTTProcess.stop(con, sob, "");
|
||||||
}
|
}
|
||||||
//卸货照片-安联
|
|
||||||
up_image();
|
|
||||||
//卸货状态-平台
|
//卸货状态-平台
|
||||||
hyr.dischargeCargo(lub);
|
hyr.dischargeCargo(lub);
|
||||||
|
//卸货照片-安联
|
||||||
|
up_image();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String s, String s1) {
|
||||||
Log.e("上报安联失败(卸货):", s + s1);
|
Log.e("上报安联失败(卸货):", s + s1);
|
||||||
|
if (!isFinishing()&&customDialog!=null&&customDialog.isShowing()){
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
new MessageUtils().showCenMessage(con, s1);
|
new MessageUtils().showCenMessage(con, s1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+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,8 +1,14 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui.login;
|
package com.arpa.hndahesudintocctmsdriver.ui.login;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.net.wifi.WifiManager;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.provider.Settings;
|
||||||
|
import android.telecom.TelecomManager;
|
||||||
|
import android.telephony.TelephonyManager;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
import android.text.TextPaint;
|
import android.text.TextPaint;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
@@ -38,6 +44,7 @@ import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StatusBarUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StatusBarUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
import cn.jiguang.verifysdk.api.AuthPageEventListener;
|
import cn.jiguang.verifysdk.api.AuthPageEventListener;
|
||||||
@@ -146,7 +153,7 @@ public class LoginActivity extends BaseActivity {
|
|||||||
ConfigBean cb = ConfigParts.getConfigParts(con);
|
ConfigBean cb = ConfigParts.getConfigParts(con);
|
||||||
if (cb != null) {
|
if (cb != null) {
|
||||||
url1 = cb.getData().getUserUrl();
|
url1 = cb.getData().getUserUrl();
|
||||||
url2 = "https://agreement.dahehuoyun.com/huawei/#/private";
|
url2 = "http://agreement.dahehuoyun.com/currency/#/";
|
||||||
}
|
}
|
||||||
TextView tv_content = findViewById(R.id.tv_content);
|
TextView tv_content = findViewById(R.id.tv_content);
|
||||||
String str = "我已阅读并同意相关服务条款和隐私政策《用户服务协议》和《隐私政策》";
|
String str = "我已阅读并同意相关服务条款和隐私政策《用户服务协议》和《隐私政策》";
|
||||||
|
|||||||
@@ -138,8 +138,8 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
|||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.dismissOnBackPressed(false)
|
.dismissOnBackPressed(false)
|
||||||
.dismissOnTouchOutside(false)
|
.dismissOnTouchOutside(false)
|
||||||
.asCustom(new AgreementAlert(con, "https://agreement.dahehuoyun.com/huawei/#/private",
|
.asCustom(new AgreementAlert(con, "http://agreement.dahehuoyun.com/currency/#/",
|
||||||
"http://agreement.dahehuoyun.com/#/user", hd))
|
"http://agreement.dahehuoyun.com/rule/serviceAgreement/dist/index.html#/", hd))
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
Glide.with(con)
|
Glide.with(con)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.PersonEvent;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.event.RefreshCarListEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.VehicleEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.StartOrderParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.StartOrderParts;
|
||||||
@@ -63,32 +64,32 @@ public class MyFragment extends BaseFragment {
|
|||||||
private UserBean userBean;
|
private UserBean userBean;
|
||||||
private StartOrderBean sob;
|
private StartOrderBean sob;
|
||||||
private CarListBean clb;
|
private CarListBean clb;
|
||||||
private Gson gson=new Gson();
|
private Gson gson = new Gson();
|
||||||
private UserRequset ur;
|
private UserRequset ur;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
super.msgMethod(m);
|
super.msgMethod(m);
|
||||||
switch (m.what){
|
switch (m.what) {
|
||||||
case 200:
|
case 200:
|
||||||
refreshLayout.finishRefresh();
|
refreshLayout.finishRefresh();
|
||||||
if(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_LIST)!=null){
|
if (CacheGroup.cacheList.get(WoDeFragment.VEHICLE_LIST) != null) {
|
||||||
clb=gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_LIST),CarListBean.class);
|
clb = gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.VEHICLE_LIST), CarListBean.class);
|
||||||
if(clb.getCode()==200){
|
if (clb.getCode() == 200) {
|
||||||
initVehicleList(true);
|
initVehicleList(true);
|
||||||
}else{
|
} else {
|
||||||
Toast.makeText(con,clb.getRes(),Toast.LENGTH_LONG).show();
|
Toast.makeText(con, clb.getRes(), Toast.LENGTH_LONG).show();
|
||||||
initVehicleList(false);
|
initVehicleList(false);
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove(WoDeFragment.VEHICLE_LIST);
|
CacheGroup.cacheList.remove(WoDeFragment.VEHICLE_LIST);
|
||||||
}
|
}
|
||||||
if (CacheGroup.cacheList.get("userdata")!=null){
|
if (CacheGroup.cacheList.get("userdata") != null) {
|
||||||
userBean=gson.fromJson(CacheGroup.cacheList.get("userdata"), UserBean.class);
|
userBean = gson.fromJson(CacheGroup.cacheList.get("userdata"), UserBean.class);
|
||||||
if(userBean.getCode()==200 ){
|
if (userBean.getCode() == 200) {
|
||||||
SPUtil.insSP(con,"data","userdata",CacheGroup.cacheList.get("userdata"));
|
SPUtil.insSP(con, "data", "userdata", CacheGroup.cacheList.get("userdata"));
|
||||||
initAuth();
|
initAuth();
|
||||||
}else{
|
} else {
|
||||||
Toast.makeText(con,userBean.getMsg(),Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, userBean.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("userdata");
|
CacheGroup.cacheList.remove("userdata");
|
||||||
}
|
}
|
||||||
@@ -100,12 +101,12 @@ public class MyFragment extends BaseFragment {
|
|||||||
@org.jetbrains.annotations.Nullable
|
@org.jetbrains.annotations.Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable @org.jetbrains.annotations.Nullable ViewGroup container, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
|
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);
|
root = inflater.inflate(R.layout.fragment_my, container, false);
|
||||||
con=root.getContext();
|
con = root.getContext();
|
||||||
brv=root.findViewById(R.id.rv);
|
brv = root.findViewById(R.id.rv);
|
||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
userBean= UserParts.getUser(con);
|
userBean = UserParts.getUser(con);
|
||||||
ur=new UserRequset(con,hd);
|
ur = new UserRequset(con, hd);
|
||||||
getRequest();
|
getRequest();
|
||||||
initId();
|
initId();
|
||||||
initRefreshLoad();
|
initRefreshLoad();
|
||||||
@@ -114,7 +115,7 @@ public class MyFragment extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void initRefreshLoad() {
|
public void initRefreshLoad() {
|
||||||
refreshLayout =root.findViewById(R.id.srl);
|
refreshLayout = root.findViewById(R.id.srl);
|
||||||
refreshLayout.setOnRefreshListener(refreshLayout -> {
|
refreshLayout.setOnRefreshListener(refreshLayout -> {
|
||||||
getRequest();
|
getRequest();
|
||||||
});
|
});
|
||||||
@@ -123,7 +124,7 @@ public class MyFragment extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void initView(Object obj) {
|
public void initView(Object obj) {
|
||||||
super.initView(obj);
|
super.initView(obj);
|
||||||
brv_vehicle=root.findViewById(R.id.brv_vehicle);
|
brv_vehicle = root.findViewById(R.id.brv_vehicle);
|
||||||
ur.vehicleList("1");
|
ur.vehicleList("1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,83 +132,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()) {
|
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){
|
if (list_vehicle.size() == 0) {
|
||||||
list_vehicle.add(new ManyBean(new Model(),R.layout.my_item_vehicle_null));
|
list_vehicle.add(new ManyBean(new Model(), R.layout.my_item_vehicle_null));
|
||||||
}
|
}
|
||||||
brv_vehicle.creates(con,list_vehicle).setOnItemViewListener((position, o, v, layout) -> {
|
brv_vehicle.creates(con, list_vehicle).setOnItemViewListener((position, o, v, layout) -> {
|
||||||
switch (layout){
|
switch (layout) {
|
||||||
case R.layout.my_item_vehicle:
|
case R.layout.my_item_vehicle:
|
||||||
CarListBean.DataDTO cd= (CarListBean.DataDTO) o;
|
CarListBean.DataDTO cd = (CarListBean.DataDTO) o;
|
||||||
View br=v.findViewById(R.id.br);
|
View br = v.findViewById(R.id.br);
|
||||||
if(position==(clb.getData().size()-1) && position!=2){
|
if (position == (clb.getData().size() - 1) && position != 2) {
|
||||||
LinearLayout add_box=v.findViewById(R.id.add_box);
|
LinearLayout add_box = v.findViewById(R.id.add_box);
|
||||||
TextView add_no=v.findViewById(R.id.add_no);
|
TextView add_no = v.findViewById(R.id.add_no);
|
||||||
add_no.setVisibility(View.GONE);
|
add_no.setVisibility(View.GONE);
|
||||||
add_box.setVisibility(View.VISIBLE);
|
add_box.setVisibility(View.VISIBLE);
|
||||||
br.setVisibility(View.GONE);
|
br.setVisibility(View.GONE);
|
||||||
add_box.setOnClickListener(v1 -> {
|
add_box.setOnClickListener(v1 -> {
|
||||||
Intent in=new Intent(con, VehicleAuthActivity.class);
|
Intent in = new Intent(con, VehicleAuthActivity.class);
|
||||||
in.putExtra("carId","");
|
in.putExtra("carId", "");
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
v.setOnClickListener(v1 -> {
|
v.setOnClickListener(v1 -> {
|
||||||
Intent in=new Intent(con, VehicleAuthActivity.class);
|
Intent in = new Intent(con, VehicleAuthActivity.class);
|
||||||
in.putExtra("carId",cd.getCarId());
|
in.putExtra("carId", cd.getCarId());
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case R.layout.my_item_vehicle_null:
|
case R.layout.my_item_vehicle_null:
|
||||||
v.setOnClickListener(v12 -> {
|
v.setOnClickListener(v12 -> {
|
||||||
Intent in=new Intent(con, VehicleAuthActivity.class);
|
Intent in = new Intent(con, VehicleAuthActivity.class);
|
||||||
in.putExtra("carId","");
|
in.putExtra("carId", "");
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
class Model{ }
|
class Model {
|
||||||
|
}
|
||||||
|
|
||||||
public void getRequest(){
|
public void getRequest() {
|
||||||
sob= StartOrderParts.getStartOrder(con);
|
sob = StartOrderParts.getStartOrder(con);
|
||||||
ur.User();
|
ur.User();
|
||||||
ur.vehicleList("1");
|
ur.vehicleList("1");
|
||||||
}
|
}
|
||||||
|
|
||||||
private LinearLayout onGetUser,onAllOrder,onAuth,onDriverHome;
|
private LinearLayout onGetUser, onAllOrder, onAuth, onDriverHome;
|
||||||
private ImageView onContact,onOpinion,onUpdate,onSetUp;
|
private ImageView onContact, onOpinion, onUpdate, onSetUp;
|
||||||
private TextView name,phone;
|
private TextView name, phone;
|
||||||
private ImageView dang_auth,no_auth,name_auth;
|
private ImageView dang_auth, no_auth, name_auth;
|
||||||
private LinearLayout auth_box;
|
private LinearLayout auth_box;
|
||||||
private ImageView img_head;
|
private ImageView img_head;
|
||||||
|
|
||||||
public void initId(){
|
public void initId() {
|
||||||
//
|
//
|
||||||
name=root.findViewById(R.id.name);
|
name = root.findViewById(R.id.name);
|
||||||
phone=root.findViewById(R.id.phone);
|
phone = root.findViewById(R.id.phone);
|
||||||
dang_auth=root.findViewById(R.id.dang_auth);
|
dang_auth = root.findViewById(R.id.dang_auth);
|
||||||
no_auth=root.findViewById(R.id.no_auth);
|
no_auth = root.findViewById(R.id.no_auth);
|
||||||
name_auth=root.findViewById(R.id.name_auth);
|
name_auth = root.findViewById(R.id.name_auth);
|
||||||
auth_box=root.findViewById(R.id.auth_box);
|
auth_box = root.findViewById(R.id.auth_box);
|
||||||
//
|
//
|
||||||
onGetUser=root.findViewById(R.id.onGetUser);
|
onGetUser = root.findViewById(R.id.onGetUser);
|
||||||
onAllOrder=root.findViewById(R.id.onAllOrder);
|
onAllOrder = root.findViewById(R.id.onAllOrder);
|
||||||
onAuth=root.findViewById(R.id.onAuth);
|
onAuth = root.findViewById(R.id.onAuth);
|
||||||
onDriverHome=root.findViewById(R.id.onDriverHome);
|
onDriverHome = root.findViewById(R.id.onDriverHome);
|
||||||
onContact=root.findViewById(R.id.onContact);
|
onContact = root.findViewById(R.id.onContact);
|
||||||
onOpinion=root.findViewById(R.id.onOpinion);
|
onOpinion = root.findViewById(R.id.onOpinion);
|
||||||
onUpdate=root.findViewById(R.id.onUpdate);
|
onUpdate = root.findViewById(R.id.onUpdate);
|
||||||
onSetUp=root.findViewById(R.id.onSetUp);
|
onSetUp = root.findViewById(R.id.onSetUp);
|
||||||
img_head=root.findViewById(R.id.img_head);
|
img_head = root.findViewById(R.id.img_head);
|
||||||
//认证
|
//认证
|
||||||
no_auth.setOnClickListener(v -> startActivity(new Intent(con, PersonalAuthActivity.class)));
|
no_auth.setOnClickListener(v -> startActivity(new Intent(con, PersonalAuthActivity.class)));
|
||||||
//用户信息
|
//用户信息
|
||||||
@@ -222,27 +225,27 @@ public class MyFragment extends BaseFragment {
|
|||||||
.permissions(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
.permissions(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||||
.request((allGranted, grantedList, deniedList) -> {
|
.request((allGranted, grantedList, deniedList) -> {
|
||||||
if (allGranted) {
|
if (allGranted) {
|
||||||
Intent in=new Intent(con, BusinessActivity.class);
|
Intent in = new Intent(con, BusinessActivity.class);
|
||||||
in.putExtra("type","餐饮");
|
in.putExtra("type", "餐饮");
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getContext(),"请先开启定位权限",Toast.LENGTH_LONG).show();
|
Toast.makeText(getContext(), "请先开启定位权限", Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
//联系我们
|
//联系我们
|
||||||
onContact.setOnClickListener(v -> {
|
onContact.setOnClickListener(v -> {
|
||||||
String serviceMobile="";
|
String serviceMobile = "";
|
||||||
if(ConfigParts.getConfigParts(con)!=null){
|
if (ConfigParts.getConfigParts(con) != null) {
|
||||||
serviceMobile=ConfigParts.getConfigParts(con).getData().getServiceMobile();
|
serviceMobile = ConfigParts.getConfigParts(con).getData().getServiceMobile();
|
||||||
serviceMobile=StringUtil.isNull(serviceMobile,"");
|
serviceMobile = StringUtil.isNull(serviceMobile, "");
|
||||||
}
|
}
|
||||||
String[] title={"平台客服:"+serviceMobile};
|
String[] title = {"平台客服:" + serviceMobile};
|
||||||
String[] value={serviceMobile};
|
String[] value = {serviceMobile};
|
||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.isDarkTheme(false)
|
.isDarkTheme(false)
|
||||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||||
.asCenterList("请选择",title,
|
.asCenterList("请选择", title,
|
||||||
(position1, text) -> {
|
(position1, text) -> {
|
||||||
Intent intent = new Intent(Intent.ACTION_DIAL);
|
Intent intent = new Intent(Intent.ACTION_DIAL);
|
||||||
Uri data = Uri.parse("tel:" + value[position1]);
|
Uri data = Uri.parse("tel:" + value[position1]);
|
||||||
@@ -253,36 +256,36 @@ public class MyFragment extends BaseFragment {
|
|||||||
});
|
});
|
||||||
//咨询建议
|
//咨询建议
|
||||||
onOpinion.setOnClickListener(v -> {
|
onOpinion.setOnClickListener(v -> {
|
||||||
Intent in=new Intent(con, WebActivity.class);
|
Intent in = new Intent(con, WebActivity.class);
|
||||||
in.putExtra("title","咨询建议");
|
in.putExtra("title", "咨询建议");
|
||||||
in.putExtra("url","");
|
in.putExtra("url", "");
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
});
|
});
|
||||||
//检查更新
|
//检查更新
|
||||||
onUpdate.setOnClickListener(v -> Toast.makeText(con,"当前已经是最新版本",Toast.LENGTH_LONG).show());
|
onUpdate.setOnClickListener(v -> Toast.makeText(con, "当前已经是最新版本", Toast.LENGTH_LONG).show());
|
||||||
//系统设置
|
//系统设置
|
||||||
onSetUp.setOnClickListener(v -> startActivity(new Intent(con, SetupActivity.class)));
|
onSetUp.setOnClickListener(v -> startActivity(new Intent(con, SetupActivity.class)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initAuth(){
|
public void initAuth() {
|
||||||
if(userBean.getData()!=null){
|
if (userBean.getData() != null) {
|
||||||
name.setText(StringUtil.isNull(userBean.getData().getUname(),"未实名"));
|
name.setText(StringUtil.isNull(userBean.getData().getUname(), "未实名"));
|
||||||
phone.setText(StringUtil.isNull(userBean.getData().getRname(),""));
|
phone.setText(StringUtil.isNull(userBean.getData().getRname(), ""));
|
||||||
if(2==userBean.getData().getPartyMemberStatus()){
|
if (2 == userBean.getData().getPartyMemberStatus()) {
|
||||||
|
|
||||||
}
|
}
|
||||||
if("1".equals(userBean.getData().getRealAuthentication())){
|
if ("1".equals(userBean.getData().getRealAuthentication())) {
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!"".equals(userBean.getData().getHeadportraitUrl())){
|
if (!"".equals(userBean.getData().getHeadportraitUrl())) {
|
||||||
Glide.with(con).load(userBean.getData().getHeadportraitUrl()).into(img_head);
|
Glide.with(con).load(userBean.getData().getHeadportraitUrl()).into(img_head);
|
||||||
}
|
}
|
||||||
if(userBean!=null && 100003==userBean.getData().getAuditStatus()){
|
if (userBean != null && 100003 == userBean.getData().getAuditStatus()) {
|
||||||
auth_box.setVisibility(View.GONE);
|
auth_box.setVisibility(View.GONE);
|
||||||
no_auth.setVisibility(View.GONE);
|
no_auth.setVisibility(View.GONE);
|
||||||
}else{
|
} else {
|
||||||
auth_box.setVisibility(View.GONE);
|
auth_box.setVisibility(View.GONE);
|
||||||
no_auth.setVisibility(View.VISIBLE);
|
no_auth.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
@@ -290,12 +293,19 @@ public class MyFragment extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void processResult(VehicleEvent event) {
|
public void processResult(VehicleEvent event) {
|
||||||
Log.e("-msg-",event.getMessage());
|
Log.e("-msg-", event.getMessage());
|
||||||
if(!"挂".equals(event.getMessage())) {
|
if (!"挂".equals(event.getMessage())) {
|
||||||
ur.vehicleList("1");
|
ur.vehicleList("1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void refreshCarListEvent(RefreshCarListEvent event) {
|
||||||
|
Log.e("-msg-", event.getMessage());
|
||||||
|
ur.vehicleList("1");
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void personResult(PersonEvent home) {
|
public void personResult(PersonEvent home) {
|
||||||
Log.e("-res-", home.getMessage());
|
Log.e("-res-", home.getMessage());
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class SetupActivity extends BaseActivity {
|
|||||||
String url2="";
|
String url2="";
|
||||||
String url3="";
|
String url3="";
|
||||||
String kefu="";
|
String kefu="";
|
||||||
private RelativeLayout r1,r2,r3,r4,r5,r6,r7;
|
private RelativeLayout r1,r2,r3,r4,r5,r6,r7,r8;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
@@ -73,8 +73,9 @@ public class SetupActivity extends BaseActivity {
|
|||||||
ConfigBean cb= ConfigParts.getConfigParts(con);
|
ConfigBean cb= ConfigParts.getConfigParts(con);
|
||||||
if(cb!=null){
|
if(cb!=null){
|
||||||
// url1=cb.getData().getUserUrl();
|
// url1=cb.getData().getUserUrl();
|
||||||
url1="https://agreement.dahehuoyun.com/huawei/#/private";
|
url1="http://agreement.dahehuoyun.com/rule/serviceAgreement/dist/index.html#/";
|
||||||
url2=cb.getData().getPrivateUrl();
|
// url2=cb.getData().getPrivateUrl();
|
||||||
|
url2="http://agreement.dahehuoyun.com/currency/#/";
|
||||||
kefu=cb.getData().getServiceMobile();
|
kefu=cb.getData().getServiceMobile();
|
||||||
url3=cb.getData().getSecurityUrl();
|
url3=cb.getData().getSecurityUrl();
|
||||||
}
|
}
|
||||||
@@ -85,6 +86,7 @@ public class SetupActivity extends BaseActivity {
|
|||||||
r5=findViewById(R.id.r5);
|
r5=findViewById(R.id.r5);
|
||||||
r6=findViewById(R.id.r6);
|
r6=findViewById(R.id.r6);
|
||||||
r7=findViewById(R.id.r7);
|
r7=findViewById(R.id.r7);
|
||||||
|
r8=findViewById(R.id.r8);
|
||||||
ur=new UserRequset(con,hd);
|
ur=new UserRequset(con,hd);
|
||||||
initView(null);
|
initView(null);
|
||||||
}
|
}
|
||||||
@@ -118,6 +120,12 @@ public class SetupActivity extends BaseActivity {
|
|||||||
in.putExtra("url","https://smlt.esign.cn/hmfbZoeeGQqv");
|
in.putExtra("url","https://smlt.esign.cn/hmfbZoeeGQqv");
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
});
|
});
|
||||||
|
r8.setOnClickListener(v12 -> {
|
||||||
|
Intent in=new Intent(con,WebActivity.class);
|
||||||
|
in.putExtra("title","交易规则");
|
||||||
|
in.putExtra("url","http://agreement.dahehuoyun.com/rule/transactionRules/dist/index.html#/");
|
||||||
|
startActivity(in);
|
||||||
|
});
|
||||||
r6.setOnClickListener(v12 -> {
|
r6.setOnClickListener(v12 -> {
|
||||||
String[] title={"平台客服:"+kefu,"银行客服:95528","技术咨询:13460042961"};
|
String[] title={"平台客服:"+kefu,"银行客服:95528","技术咨询:13460042961"};
|
||||||
String[] value={kefu,"95528","13460042961"};
|
String[] value={kefu,"95528","13460042961"};
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.os.Bundle;
|
|||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@@ -12,6 +13,8 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickHelper;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickListener;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
@@ -40,13 +43,13 @@ import java.util.List;
|
|||||||
* @date 2021/8/26 19:06
|
* @date 2021/8/26 19:06
|
||||||
* @description:
|
* @description:
|
||||||
*/
|
*/
|
||||||
public class UpBankActivity extends BaseAppCompatActivity {
|
public class UpBankActivity extends BaseAppCompatActivity implements OnLimitClickListener {
|
||||||
|
|
||||||
private ImageView up_bank_img;
|
private ImageView up_bank_img;
|
||||||
private EditText bank_name,bank_number;
|
private EditText bank_name, bank_number;
|
||||||
private TextView submit;
|
private TextView submit;
|
||||||
private ImageView return_btn;
|
private ImageView return_btn;
|
||||||
public GetImageAlert gia=new GetImageAlert();
|
public GetImageAlert gia = new GetImageAlert();
|
||||||
String path;
|
String path;
|
||||||
private OCRBankBean ib;
|
private OCRBankBean ib;
|
||||||
private WalletRequest qr;
|
private WalletRequest qr;
|
||||||
@@ -55,35 +58,36 @@ public class UpBankActivity extends BaseAppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
super.msgMethod(m);
|
super.msgMethod(m);
|
||||||
switch (m.what){
|
switch (m.what) {
|
||||||
case RequsetCodeConstants.SUCCESS:
|
case RequsetCodeConstants.SUCCESS:
|
||||||
if (CacheGroup.cacheList.get("OCR_BANK")!=null) {
|
if (CacheGroup.cacheList.get("OCR_BANK") != null) {
|
||||||
ib=new Gson().fromJson(CacheGroup.cacheList.get("OCR_BANK"),OCRBankBean.class);
|
ib = new Gson().fromJson(CacheGroup.cacheList.get("OCR_BANK"), OCRBankBean.class);
|
||||||
if(ib.getCode()==200){
|
if (ib.getCode() == 200) {
|
||||||
initView(null);
|
initView(null);
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
WalletFragment.isInsBank=true;
|
WalletFragment.isInsBank = true;
|
||||||
}else{
|
} else {
|
||||||
Toast.makeText(con,ib.getMsg(),Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, ib.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("OCR_BANK");
|
CacheGroup.cacheList.remove("OCR_BANK");
|
||||||
}
|
}
|
||||||
if(CacheGroup.cacheList.get("insBank")!=null){
|
if (CacheGroup.cacheList.get("insBank") != null) {
|
||||||
BaseBean bb=new Gson().fromJson(CacheGroup.cacheList.get("insBank"),BaseBean.class);
|
BaseBean bb = new Gson().fromJson(CacheGroup.cacheList.get("insBank"), BaseBean.class);
|
||||||
if(bb.getCode()==200){
|
if (bb.getCode() == 200) {
|
||||||
Toast.makeText(con,"绑定成功",Toast.LENGTH_SHORT).show();
|
customDialog.dismiss();
|
||||||
|
Toast.makeText(con, "绑定成功", Toast.LENGTH_SHORT).show();
|
||||||
finish();
|
finish();
|
||||||
}else{
|
} else {
|
||||||
Toast.makeText(con,bb.getMsg(),Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove("insBank");
|
CacheGroup.cacheList.remove("insBank");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
case ImageFileCompressUtil.COMPRESS_SUCCESS:
|
||||||
customDialog=new CustomDialog(con, "上传识别中...");
|
customDialog = new CustomDialog(con, "上传识别中...");
|
||||||
customDialog.show();
|
customDialog.show();
|
||||||
path = (String) m.obj;
|
path = (String) m.obj;
|
||||||
new OCRRequest().ORCBank(con,hd,new File(path));
|
new OCRRequest().ORCBank(con, hd, new File(path));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,24 +99,18 @@ public class UpBankActivity extends BaseAppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
StateStyleUtil.stateTextColor(this);
|
StateStyleUtil.stateTextColor(this);
|
||||||
setContentView(R.layout.activity_bank_auth);
|
setContentView(R.layout.activity_bank_auth);
|
||||||
act=this;
|
act = this;
|
||||||
con=this;
|
con = this;
|
||||||
up_bank_img=findViewById(R.id.up_bank_img);
|
up_bank_img = findViewById(R.id.up_bank_img);
|
||||||
bank_name=findViewById(R.id.bank_name);
|
bank_name = findViewById(R.id.bank_name);
|
||||||
bank_number=findViewById(R.id.bank_number);
|
bank_number = findViewById(R.id.bank_number);
|
||||||
submit=findViewById(R.id.submit);
|
submit = findViewById(R.id.submit);
|
||||||
return_btn=findViewById(R.id.return_btn);
|
return_btn = findViewById(R.id.return_btn);
|
||||||
qr=new WalletRequest(con,hd);
|
qr = new WalletRequest(con, hd);
|
||||||
up_bank_img.setOnClickListener(v -> {
|
up_bank_img.setOnClickListener(v -> {
|
||||||
gia.showPopueWindow(this);
|
gia.showPopueWindow(this);
|
||||||
});
|
});
|
||||||
submit.setOnClickListener(v -> {
|
submit.setOnClickListener(new OnLimitClickHelper(this));
|
||||||
if(ib!=null){
|
|
||||||
submit();
|
|
||||||
}else{
|
|
||||||
Toast.makeText(con,"请先上传图片",Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return_btn.setOnClickListener(v -> {
|
return_btn.setOnClickListener(v -> {
|
||||||
finish();
|
finish();
|
||||||
});
|
});
|
||||||
@@ -129,11 +127,11 @@ public class UpBankActivity extends BaseAppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
if (requestCode == 12 && resultCode == RESULT_OK) {
|
if (requestCode == 12 && resultCode == RESULT_OK) {
|
||||||
path=gia.getFile().getPath();
|
path = gia.getFile().getPath();
|
||||||
Log.e("图片地址:",path);
|
Log.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
ImageFileCompressUtil.imageFileCompress(con,new File(path),hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
} else if (requestCode == PictureConfig.CHOOSE_REQUEST && resultCode == RESULT_OK) {
|
||||||
List<LocalMedia> imgs = PictureSelector.obtainMultipleResult(data);
|
List<LocalMedia> imgs = PictureSelector.obtainMultipleResult(data);
|
||||||
if (imgs != null && imgs.size() > 0) {
|
if (imgs != null && imgs.size() > 0) {
|
||||||
@@ -143,29 +141,43 @@ public class UpBankActivity extends BaseAppCompatActivity {
|
|||||||
if (TextUtils.isEmpty(paths)) {
|
if (TextUtils.isEmpty(paths)) {
|
||||||
paths = image.getPath();
|
paths = image.getPath();
|
||||||
}
|
}
|
||||||
path=paths;
|
path = paths;
|
||||||
Log.e("图片地址:",path);
|
Log.e("图片地址:", path);
|
||||||
gia.dis();
|
gia.dis();
|
||||||
ImageFileCompressUtil.imageFileCompress(con,new File(path),hd);
|
ImageFileCompressUtil.imageFileCompress(con, new File(path), hd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void submit(){
|
public void submit() {
|
||||||
String bankName=bank_name.getText().toString().trim();
|
customDialog = new CustomDialog(con, "上传中,请稍后...");
|
||||||
String bankNumber=bank_number.getText().toString().trim();
|
customDialog.show();
|
||||||
if("".equals(bankName) || "".equals(bankNumber)){
|
String bankName = bank_name.getText().toString().trim();
|
||||||
Toast.makeText(con,"请先补充完整的银行卡信息",Toast.LENGTH_LONG).show();
|
String bankNumber = bank_number.getText().toString().trim();
|
||||||
|
if ("".equals(bankName) || "".equals(bankNumber)) {
|
||||||
|
Toast.makeText(con, "请先补充完整的银行卡信息", Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
InsBankInputBean ibib =new InsBankInputBean();
|
InsBankInputBean ibib = new InsBankInputBean();
|
||||||
ibib.setCardNo(bankNumber);
|
ibib.setCardNo(bankNumber);
|
||||||
ibib.setCardType(Integer.parseInt(ib.getData().getBankCardType()));
|
ibib.setCardType(Integer.parseInt(ib.getData().getBankCardType()));
|
||||||
ibib.setBankName(bankName);
|
ibib.setBankName(bankName);
|
||||||
ibib.setCardUserType(1);
|
ibib.setCardUserType(1);
|
||||||
ibib.setImageId(ib.getData().getId());
|
ibib.setImageId(ib.getData().getId());
|
||||||
Log.e("-res-",new Gson().toJson(ibib));
|
Log.e("-res-", new Gson().toJson(ibib));
|
||||||
qr.insBankCard(ibib);
|
qr.insBankCard(ibib);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
switch (view.getId()) {
|
||||||
|
case R.id.submit:
|
||||||
|
if (ib != null) {
|
||||||
|
submit();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(con, "请先上传图片", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,240 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.util;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.FileUtils;
|
||||||
|
|
||||||
|
import java.io.BufferedOutputStream;
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.BufferedWriter;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName FileIOUtils
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/3/29 09:50
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class FileIOUtils {
|
||||||
|
|
||||||
|
private FileIOUtils() {
|
||||||
|
throw new UnsupportedOperationException("u can't instantiate me...");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final String LINE_SEP = System.getProperty("line.separator");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将输入流写入文件
|
||||||
|
*
|
||||||
|
* @param filePath 路径
|
||||||
|
* @param is 输入流
|
||||||
|
* @return {@code true}: 写入成功<br>{@code false}: 写入失败
|
||||||
|
*/
|
||||||
|
public static boolean writeFileFromIS(String filePath, final InputStream is) {
|
||||||
|
return writeFileFromIS(FileUtils.getFileByPath(filePath), is, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将输入流写入文件
|
||||||
|
*
|
||||||
|
* @param filePath 路径
|
||||||
|
* @param is 输入流
|
||||||
|
* @param append 是否追加在文件末
|
||||||
|
* @return {@code true}: 写入成功<br>{@code false}: 写入失败
|
||||||
|
*/
|
||||||
|
public static boolean writeFileFromIS(String filePath, final InputStream is, boolean append) {
|
||||||
|
return writeFileFromIS(FileUtils.getFileByPath(filePath), is, append);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将输入流写入文件
|
||||||
|
*
|
||||||
|
* @param file 文件
|
||||||
|
* @param is 输入流
|
||||||
|
* @return {@code true}: 写入成功<br>{@code false}: 写入失败
|
||||||
|
*/
|
||||||
|
public static boolean writeFileFromIS(File file, final InputStream is) {
|
||||||
|
return writeFileFromIS(file, is, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将输入流写入文件
|
||||||
|
*
|
||||||
|
* @param file 文件
|
||||||
|
* @param is 输入流
|
||||||
|
* @param append 是否追加在文件末
|
||||||
|
* @return {@code true}: 写入成功<br>{@code false}: 写入失败
|
||||||
|
*/
|
||||||
|
public static boolean writeFileFromIS(File file, final InputStream is, boolean append) {
|
||||||
|
if (!FileUtils.createOrExistsFile(file) || is == null) return false;
|
||||||
|
OutputStream os = null;
|
||||||
|
try {
|
||||||
|
os = new BufferedOutputStream(new FileOutputStream(file, append));
|
||||||
|
byte data[] = new byte[1024];
|
||||||
|
int len;
|
||||||
|
while ((len = is.read(data, 0, 1024)) != -1) {
|
||||||
|
os.write(data, 0, len);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return false;
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
is.close();
|
||||||
|
os.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将字符串写入文件
|
||||||
|
*
|
||||||
|
* @param filePath 文件路径
|
||||||
|
* @param content 写入内容
|
||||||
|
* @return {@code true}: 写入成功<br>{@code false}: 写入失败
|
||||||
|
*/
|
||||||
|
public static boolean writeFileFromString(String filePath, String content) {
|
||||||
|
return writeFileFromString(FileUtils.getFileByPath(filePath), content, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将字符串写入文件
|
||||||
|
*
|
||||||
|
* @param filePath 文件路径
|
||||||
|
* @param content 写入内容
|
||||||
|
* @param append 是否追加在文件末
|
||||||
|
* @return {@code true}: 写入成功<br>{@code false}: 写入失败
|
||||||
|
*/
|
||||||
|
public static boolean writeFileFromString(String filePath, String content, boolean append) {
|
||||||
|
return writeFileFromString(FileUtils.getFileByPath(filePath), content, append);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将字符串写入文件
|
||||||
|
*
|
||||||
|
* @param file 文件
|
||||||
|
* @param content 写入内容
|
||||||
|
* @return {@code true}: 写入成功<br>{@code false}: 写入失败
|
||||||
|
*/
|
||||||
|
public static boolean writeFileFromString(File file, String content) {
|
||||||
|
return writeFileFromString(file, content, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将字符串写入文件
|
||||||
|
*
|
||||||
|
* @param file 文件
|
||||||
|
* @param content 写入内容
|
||||||
|
* @param append 是否追加在文件末
|
||||||
|
* @return {@code true}: 写入成功<br>{@code false}: 写入失败
|
||||||
|
*/
|
||||||
|
public static boolean writeFileFromString(File file, String content, boolean append) {
|
||||||
|
if (file == null || content == null) return false;
|
||||||
|
if (!FileUtils.createOrExistsFile(file)) return false;
|
||||||
|
BufferedWriter bw = null;
|
||||||
|
try {
|
||||||
|
bw = new BufferedWriter(new FileWriter(file, append));
|
||||||
|
bw.write(content);
|
||||||
|
bw.newLine();
|
||||||
|
return true;
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return false;
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
bw.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取文件到字符串中
|
||||||
|
*
|
||||||
|
* @param filePath 文件路径
|
||||||
|
* @return 字符串
|
||||||
|
*/
|
||||||
|
public static String readFile2String(String filePath) {
|
||||||
|
return readFile2String(FileUtils.getFileByPath(filePath), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取文件到字符串中
|
||||||
|
*
|
||||||
|
* @param filePath 文件路径
|
||||||
|
* @param charsetName 编码格式
|
||||||
|
* @return 字符串
|
||||||
|
*/
|
||||||
|
public static String readFile2String(String filePath, String charsetName) {
|
||||||
|
return readFile2String(FileUtils.getFileByPath(filePath), charsetName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取文件到字符串中
|
||||||
|
*
|
||||||
|
* @param file 文件
|
||||||
|
* @return 字符串
|
||||||
|
*/
|
||||||
|
public static String readFile2String(File file) {
|
||||||
|
return readFile2String(file, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取文件到字符串中
|
||||||
|
*
|
||||||
|
* @param file 文件
|
||||||
|
* @param charsetName 编码格式
|
||||||
|
* @return 字符串
|
||||||
|
*/
|
||||||
|
public static String readFile2String(File file, String charsetName) {
|
||||||
|
if (!FileUtils.isFileExists(file)) return null;
|
||||||
|
BufferedReader reader = null;
|
||||||
|
try {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
if (isSpace(charsetName)) {
|
||||||
|
reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
|
||||||
|
} else {
|
||||||
|
reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), charsetName));
|
||||||
|
}
|
||||||
|
String line;
|
||||||
|
while ((line = reader.readLine()) != null) {
|
||||||
|
sb.append(line).append(LINE_SEP);
|
||||||
|
}
|
||||||
|
// delete the last line separator
|
||||||
|
return sb.delete(sb.length() - LINE_SEP.length(), sb.length()).toString();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return null;
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
reader.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static boolean isSpace(String s) {
|
||||||
|
if (s == null) return true;
|
||||||
|
for (int i = 0, len = s.length(); i < len; ++i) {
|
||||||
|
if (!Character.isWhitespace(s.charAt(i))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -51,6 +51,9 @@ public class AdapterAlls extends RecyclerView.Adapter<AdapterAlls.ViewHolder> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void add(List<ManyBean> addMessageList) {
|
public void add(List<ManyBean> addMessageList) {
|
||||||
|
if (object==null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
//增加数据
|
//增加数据
|
||||||
int position = object.size();
|
int position = object.size();
|
||||||
object.addAll(position, addMessageList);
|
object.addAll(position, addMessageList);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.arpa.hndahesudintocctmsdriver.util.http;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.app.VersionUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.app.VersionUtil;
|
||||||
|
import com.dahe.mylibrary.utils.AppUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
@@ -41,6 +42,7 @@ public class OkHttpUtil {
|
|||||||
.post(body)
|
.post(body)
|
||||||
.headers(hb.build())
|
.headers(hb.build())
|
||||||
.addHeader("Version", VersionUtil.getVersion(con))
|
.addHeader("Version", VersionUtil.getVersion(con))
|
||||||
|
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||||
//.addHeader("sign",sign)
|
//.addHeader("sign",sign)
|
||||||
.removeHeader("User-Agent")
|
.removeHeader("User-Agent")
|
||||||
.addHeader("User-Agent",GetUtil.getUserAgent(con))
|
.addHeader("User-Agent",GetUtil.getUserAgent(con))
|
||||||
@@ -71,6 +73,7 @@ public class OkHttpUtil {
|
|||||||
.addHeader("Authorization", token)
|
.addHeader("Authorization", token)
|
||||||
.addHeader("Content-Type", "application/json")
|
.addHeader("Content-Type", "application/json")
|
||||||
.addHeader("Version", VersionUtil.getVersion(con))
|
.addHeader("Version", VersionUtil.getVersion(con))
|
||||||
|
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||||
//.addHeader("sign",sign)
|
//.addHeader("sign",sign)
|
||||||
.removeHeader("User-Agent")
|
.removeHeader("User-Agent")
|
||||||
.addHeader("User-Agent",GetUtil.getUserAgent(con))
|
.addHeader("User-Agent",GetUtil.getUserAgent(con))
|
||||||
@@ -86,6 +89,7 @@ public class OkHttpUtil {
|
|||||||
.url(od.getUrl())
|
.url(od.getUrl())
|
||||||
.get()
|
.get()
|
||||||
.headers(hb.build())
|
.headers(hb.build())
|
||||||
|
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||||
.build();
|
.build();
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
@@ -99,6 +103,7 @@ public class OkHttpUtil {
|
|||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(od.getUrl())
|
.url(od.getUrl())
|
||||||
.addHeader("Authorization", token)
|
.addHeader("Authorization", token)
|
||||||
|
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||||
.get()
|
.get()
|
||||||
.headers(hb.build())
|
.headers(hb.build())
|
||||||
.build();
|
.build();
|
||||||
@@ -129,6 +134,7 @@ public class OkHttpUtil {
|
|||||||
.url(od.getUrl())
|
.url(od.getUrl())
|
||||||
.method("POST", body)
|
.method("POST", body)
|
||||||
.addHeader("Authorization", token)
|
.addHeader("Authorization", token)
|
||||||
|
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||||
.addHeader("Cookie", "JSESSIONID=NqpqKQstwceQurcNK5hjl4GnTgiF4eSzZSo5a1rz")
|
.addHeader("Cookie", "JSESSIONID=NqpqKQstwceQurcNK5hjl4GnTgiF4eSzZSo5a1rz")
|
||||||
.build();
|
.build();
|
||||||
return request;
|
return request;
|
||||||
@@ -145,23 +151,26 @@ public class OkHttpUtil {
|
|||||||
.url(od.getUrl())
|
.url(od.getUrl())
|
||||||
.method("POST", body)
|
.method("POST", body)
|
||||||
.addHeader("Authorization", token)
|
.addHeader("Authorization", token)
|
||||||
|
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||||
.addHeader("Cookie", "JSESSIONID=NqpqKQstwceQurcNK5hjl4GnTgiF4eSzZSo5a1rz")
|
.addHeader("Cookie", "JSESSIONID=NqpqKQstwceQurcNK5hjl4GnTgiF4eSzZSo5a1rz")
|
||||||
.build();
|
.build();
|
||||||
return request;
|
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");
|
MediaType mediaType = MediaType.parse("text/plain");
|
||||||
RequestBody body = new MultipartBody.Builder()
|
RequestBody body = new MultipartBody.Builder()
|
||||||
.setType(MultipartBody.FORM)
|
.setType(MultipartBody.FORM)
|
||||||
.addFormDataPart("file",file.getPath(),RequestBody.create(MediaType.parse("application/octet-stream"), file))
|
.addFormDataPart("file",file.getPath(),RequestBody.create(MediaType.parse("application/octet-stream"), file))
|
||||||
.addFormDataPart("carId",carId)
|
.addFormDataPart("carId",carId)
|
||||||
.addFormDataPart("carNum",carNum)
|
.addFormDataPart("carNum",carNum)
|
||||||
|
.addFormDataPart("isSave",isSave?"0":"1")
|
||||||
.build();
|
.build();
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(od.getUrl())
|
.url(od.getUrl())
|
||||||
.method("POST", body)
|
.method("POST", body)
|
||||||
.addHeader("Authorization", token)
|
.addHeader("Authorization", token)
|
||||||
|
.addHeader("VersionCode",String.valueOf(AppUtils.getAppVersionCode()))
|
||||||
.addHeader("Cookie", "JSESSIONID=NqpqKQstwceQurcNK5hjl4GnTgiF4eSzZSo5a1rz")
|
.addHeader("Cookie", "JSESSIONID=NqpqKQstwceQurcNK5hjl4GnTgiF4eSzZSo5a1rz")
|
||||||
.build();
|
.build();
|
||||||
return request;
|
return request;
|
||||||
|
|||||||
@@ -70,13 +70,27 @@ public class GetCarImageAlert {
|
|||||||
.permissions(Manifest.permission.CAMERA)
|
.permissions(Manifest.permission.CAMERA)
|
||||||
.request((allGranted, grantedList, deniedList) -> {
|
.request((allGranted, grantedList, deniedList) -> {
|
||||||
if (allGranted) {
|
if (allGranted) {
|
||||||
file=ImageGetUtil.createImageFile(act);
|
openCam(act);
|
||||||
ImageGetUtil.cameraAlbumGetImage(act,file);
|
// file=ImageGetUtil.createImageFile(act);
|
||||||
|
// ImageGetUtil.cameraAlbumGetImage(act,file);
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
img.setOnClickListener(v -> {
|
||||||
|
if (!key){
|
||||||
|
PermissionX.init(act)
|
||||||
|
.permissions(Manifest.permission.CAMERA)
|
||||||
|
.request((allGranted, grantedList, deniedList) -> {
|
||||||
|
if (allGranted) {
|
||||||
|
openCam(act);
|
||||||
|
} else {
|
||||||
|
Toast.makeText(act.getBaseContext(), "开启权限失败,请手动开启权限", Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
btn_quxiao.setOnClickListener(v -> popupWindow.dismiss());
|
btn_quxiao.setOnClickListener(v -> popupWindow.dismiss());
|
||||||
//popupWindow消失屏幕变为不透明
|
//popupWindow消失屏幕变为不透明
|
||||||
popupWindow.setOnDismissListener(() -> {
|
popupWindow.setOnDismissListener(() -> {
|
||||||
@@ -99,4 +113,13 @@ public class GetCarImageAlert {
|
|||||||
popupWindow.dismiss();
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import android.provider.MediaStore;
|
|||||||
|
|
||||||
import androidx.core.content.FileProvider;
|
import androidx.core.content.FileProvider;
|
||||||
|
|
||||||
|
import com.dahe.mylibrary.utils.AppUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -39,7 +41,7 @@ public class ImageGetUtil {
|
|||||||
if(imageFile!=null){
|
if(imageFile!=null){
|
||||||
if(Build.VERSION.SDK_INT>= Build.VERSION_CODES.N){
|
if(Build.VERSION.SDK_INT>= Build.VERSION_CODES.N){
|
||||||
/*7.0以上要通过FileProvider将File转化为Uri*/
|
/*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 {
|
}else {
|
||||||
/*7.0以下则直接使用Uri的fromFile方法将File转化为Uri*/
|
/*7.0以下则直接使用Uri的fromFile方法将File转化为Uri*/
|
||||||
uri = Uri.fromFile(imageFile);
|
uri = Uri.fromFile(imageFile);
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ import com.amap.api.location.AMapLocation;
|
|||||||
import com.amap.api.location.AMapLocationClient;
|
import com.amap.api.location.AMapLocationClient;
|
||||||
import com.amap.api.location.AMapLocationClientOption;
|
import com.amap.api.location.AMapLocationClientOption;
|
||||||
import com.amap.api.location.AMapLocationListener;
|
import com.amap.api.location.AMapLocationListener;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.cache.CacheGroup;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.msg.MsgUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.msg.MsgUtil;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -74,6 +76,7 @@ public class LocationGDUtil {
|
|||||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
Date date = new Date(aMapLocation.getTime());
|
Date date = new Date(aMapLocation.getTime());
|
||||||
df.format(date);
|
df.format(date);
|
||||||
|
CacheGroup.cacheList.put("getLocation",new Gson().toJson(aMapLocation));
|
||||||
MsgUtil.addHdMsgWat(hd,RES);
|
MsgUtil.addHdMsgWat(hd,RES);
|
||||||
if (mLocationClient!=null) {
|
if (mLocationClient!=null) {
|
||||||
mLocationClient.onDestroy();
|
mLocationClient.onDestroy();
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public class LocationUtil{
|
|||||||
|
|
||||||
private double latitude;
|
private double latitude;
|
||||||
private double longitude;
|
private double longitude;
|
||||||
|
private int errorCode;
|
||||||
private String address;
|
private String address;
|
||||||
private Context con;
|
private Context con;
|
||||||
private Handler hd;
|
private Handler hd;
|
||||||
@@ -39,6 +40,10 @@ public class LocationUtil{
|
|||||||
return longitude;
|
return longitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double getErrorCode() {
|
||||||
|
return errorCode;
|
||||||
|
}
|
||||||
|
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
@@ -62,7 +67,7 @@ public class LocationUtil{
|
|||||||
//LocationMode.Hight_Accuracy:高精度;
|
//LocationMode.Hight_Accuracy:高精度;
|
||||||
//LocationMode. Battery_Saving:低功耗;
|
//LocationMode. Battery_Saving:低功耗;
|
||||||
//LocationMode. Device_Sensors:仅使用设备;
|
//LocationMode. Device_Sensors:仅使用设备;
|
||||||
option.setCoorType("GCJ02");
|
option.setCoorType("BD09ll");
|
||||||
//可选,设置返回经纬度坐标类型,默认GCJ02
|
//可选,设置返回经纬度坐标类型,默认GCJ02
|
||||||
//GCJ02:国测局坐标;
|
//GCJ02:国测局坐标;
|
||||||
//BD09ll:百度经纬度坐标;
|
//BD09ll:百度经纬度坐标;
|
||||||
@@ -112,7 +117,8 @@ public class LocationUtil{
|
|||||||
float radius = location.getRadius(); //获取定位精度,默认值为0.0f
|
float radius = location.getRadius(); //获取定位精度,默认值为0.0f
|
||||||
String coorType = location.getCoorType();
|
String coorType = location.getCoorType();
|
||||||
//获取经纬度坐标类型,以LocationClientOption中设置过的坐标类型为准
|
//获取经纬度坐标类型,以LocationClientOption中设置过的坐标类型为准
|
||||||
int errorCode = location.getLocType();
|
errorCode = location.getLocType();
|
||||||
|
String locTypeDescription = location.getLocTypeDescription();
|
||||||
//获取定位类型、定位错误返回码,具体信息可参照类参考中BDLocation类中的说明
|
//获取定位类型、定位错误返回码,具体信息可参照类参考中BDLocation类中的说明
|
||||||
Log.e("定位位置address",address+"");
|
Log.e("定位位置address",address+"");
|
||||||
Log.e("定位坐标latitude",latitude+"");
|
Log.e("定位坐标latitude",latitude+"");
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.weight;
|
||||||
|
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName OnLimitClickHelper
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/4/22 14:28
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class OnLimitClickHelper implements View.OnClickListener {
|
||||||
|
public static final int LIMIT_TIME = 2000;
|
||||||
|
private long lastClickTime = 0;
|
||||||
|
private OnLimitClickListener onLimitClickListener = null;
|
||||||
|
|
||||||
|
public OnLimitClickHelper(OnLimitClickListener onLimitClickListener){
|
||||||
|
this.onLimitClickListener = onLimitClickListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
long curTime = Calendar.getInstance().getTimeInMillis();
|
||||||
|
if (curTime - lastClickTime > LIMIT_TIME) {
|
||||||
|
lastClickTime = curTime;
|
||||||
|
if(onLimitClickListener != null){
|
||||||
|
onLimitClickListener.onClick(v);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
ToastUtils.showToast(v.getContext(),"点击速度过快,请稍后重试");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.weight;
|
||||||
|
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName OnLimitClickListener
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/4/22 14:28
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface OnLimitClickListener {
|
||||||
|
/**
|
||||||
|
* 按钮点击事件
|
||||||
|
* @param view
|
||||||
|
*/
|
||||||
|
void onClick(View view);
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 432 KiB |
@@ -55,13 +55,13 @@
|
|||||||
android:layout_width="@dimen/dp_90"
|
android:layout_width="@dimen/dp_90"
|
||||||
android:layout_height="@dimen/dp_90"
|
android:layout_height="@dimen/dp_90"
|
||||||
android:background="#EEEEEE">
|
android:background="#EEEEEE">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="@dimen/dp_23"
|
android:layout_width="@dimen/dp_23"
|
||||||
android:layout_height="@dimen/dp_23"
|
android:layout_height="@dimen/dp_23"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerInParent="true"
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@mipmap/up_img"/>
|
android:src="@mipmap/up_img" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_marginLeft="@dimen/dp_8"
|
android:layout_marginLeft="@dimen/dp_8"
|
||||||
@@ -118,6 +118,7 @@
|
|||||||
android:background="@drawable/bg_bai"
|
android:background="@drawable/bg_bai"
|
||||||
android:elevation="@dimen/dp_1">
|
android:elevation="@dimen/dp_1">
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/cow1"
|
android:id="@+id/cow1"
|
||||||
android:layout_marginBottom="@dimen/dp_10"
|
android:layout_marginBottom="@dimen/dp_10"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -130,28 +131,28 @@
|
|||||||
android:textColor="#ffc4c4ce"
|
android:textColor="#ffc4c4ce"
|
||||||
android:textSize="@dimen/sp_13"
|
android:textSize="@dimen/sp_13"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/value1"
|
android:id="@+id/value1"
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="#ff999999"
|
android:layout_alignParentRight="true"
|
||||||
android:textSize="@dimen/sp_13"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:hint="点击进行手动输入"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:layout_marginLeft="@dimen/dp_30"
|
android:layout_marginLeft="@dimen/dp_30"
|
||||||
android:gravity="right"
|
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
/>
|
android:ellipsize="end"
|
||||||
|
android:gravity="right"
|
||||||
|
android:hint="点击进行手动输入"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="#ff999999"
|
||||||
|
android:textSize="@dimen/sp_13" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
<View
|
<View
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/vs"
|
android:id="@+id/vs"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_1"
|
android:layout_height="@dimen/dp_1"
|
||||||
android:background="@drawable/bottom_xu"/>
|
android:background="@drawable/bottom_xu"/>
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<TextView
|
<TextView
|
||||||
@@ -162,20 +163,20 @@
|
|||||||
android:textColor="#ffc4c4ce"
|
android:textColor="#ffc4c4ce"
|
||||||
android:textSize="@dimen/sp_13"
|
android:textSize="@dimen/sp_13"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/value2"
|
android:id="@+id/value2"
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="#ff999999"
|
android:layout_alignParentRight="true"
|
||||||
android:textSize="@dimen/sp_13"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:hint="点击进行手动输入"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="right"
|
|
||||||
android:layout_marginLeft="@dimen/dp_30"
|
android:layout_marginLeft="@dimen/dp_30"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
/>
|
android:ellipsize="end"
|
||||||
|
android:gravity="right"
|
||||||
|
android:hint="点击进行手动输入"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="#ff999999"
|
||||||
|
android:textSize="@dimen/sp_13" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -382,5 +382,38 @@
|
|||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/r8"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="交强险保单"
|
||||||
|
android:textColor="#ff000000"
|
||||||
|
android:textSize="@dimen/sp_15"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp_6"
|
||||||
|
android:layout_height="@dimen/dp_10"
|
||||||
|
android:src="@mipmap/chevron"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:background="@null"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_2"
|
||||||
|
android:background="#F6F6F9"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
android:id="@+id/zjimg_name"
|
android:id="@+id/zjimg_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_19"
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
android:text="从业资格证照片"
|
android:text="从业资格证照片"
|
||||||
android:textColor="#ff333333"
|
android:textColor="#ff333333"
|
||||||
android:textSize="@dimen/sp_15" />
|
android:textSize="@dimen/sp_15" />
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginBottom="@dimen/dp_19"
|
android:layout_marginBottom="@dimen/dp_16"
|
||||||
android:text="点击上传图片"
|
android:text="点击上传图片"
|
||||||
android:textColor="@color/theme_color"
|
android:textColor="@color/theme_color"
|
||||||
android:textSize="@dimen/sp_15" />
|
android:textSize="@dimen/sp_15" />
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/llInfo"
|
android:id="@+id/llInfo"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -137,6 +137,8 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="@dimen/dp_14">
|
android:padding="@dimen/dp_14">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/cow1"
|
android:id="@+id/cow1"
|
||||||
|
|
||||||
@@ -162,10 +164,55 @@
|
|||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:hint="点击进行手动输入"
|
android:hint="点击进行手动输入"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
android:textColor="#ff999999"
|
android:textColor="#ff999999"
|
||||||
android:textSize="@dimen/sp_13" />
|
android:textSize="@dimen/sp_13" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llDate"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="@drawable/bottom_xu"/>
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rlDate"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/name2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="截止日期"
|
||||||
|
android:textColor="#ffc4c4ce"
|
||||||
|
android:textSize="@dimen/sp_13"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:layout_toRightOf="@+id/name2"
|
||||||
|
android:id="@+id/value2"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#ff999999"
|
||||||
|
android:textSize="@dimen/sp_13"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:hint="请选择截止日期"
|
||||||
|
android:gravity="right"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_marginLeft="@dimen/dp_10"
|
||||||
|
/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,225 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/activity_shangchuan"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/bg_theme">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp_300"
|
||||||
|
android:layout_height="@dimen/dp_207"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:src="@mipmap/top_creativity" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_58">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/return_btn"
|
||||||
|
android:layout_width="@dimen/dp_40"
|
||||||
|
android:layout_height="@dimen/dp_31"
|
||||||
|
android:layout_marginLeft="@dimen/dp_30"
|
||||||
|
android:padding="@dimen/dp_10"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@mipmap/return_lefts" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_loaction"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="@dimen/dp_30"
|
||||||
|
android:padding="@dimen/dp_5"
|
||||||
|
android:text="定位成功"
|
||||||
|
android:textColor="@color/theme_color"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp_38"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:text="补传"
|
||||||
|
android:textColor="#ff000000"
|
||||||
|
android:textSize="@dimen/sp_23" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDate"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_50"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:hint="请选择时间"></TextView>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
>
|
||||||
|
<EditText
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:id="@+id/etAddress"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_50"
|
||||||
|
android:hint="请输入地址"></EditText>
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/red"
|
||||||
|
android:text="确定"
|
||||||
|
android:id="@+id/btnOk"
|
||||||
|
></Button>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvLocation"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
></TextView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/name_top"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp_38"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:text="上传卸货照片"
|
||||||
|
android:textColor="#ff000000"
|
||||||
|
android:textSize="@dimen/sp_23" />
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/getImg1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp_38"
|
||||||
|
android:layout_marginTop="@dimen/dp_33"
|
||||||
|
android:layout_marginRight="@dimen/dp_38"
|
||||||
|
app:cardCornerRadius="@dimen/dp_8">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/getImg"
|
||||||
|
android:layout_width="@dimen/dp_90"
|
||||||
|
android:layout_height="@dimen/dp_90"
|
||||||
|
android:layout_marginLeft="@dimen/dp_11"
|
||||||
|
android:layout_marginTop="@dimen/dp_13"
|
||||||
|
android:layout_marginBottom="@dimen/dp_13"
|
||||||
|
android:background="#EEEEEE">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/res_img"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_icon"
|
||||||
|
android:layout_width="@dimen/dp_23"
|
||||||
|
android:layout_height="@dimen/dp_23"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:src="@mipmap/up_img" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_delete"
|
||||||
|
android:layout_width="@dimen/dp_25"
|
||||||
|
android:layout_height="@dimen/dp_25"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:padding="@dimen/dp_3"
|
||||||
|
android:src="@mipmap/icon_delete"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp_8"
|
||||||
|
android:layout_marginTop="@dimen/dp_13"
|
||||||
|
android:layout_marginRight="@dimen/dp_10"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/name_body"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_7"
|
||||||
|
android:text="卸货照片"
|
||||||
|
android:textColor="#ff000000"
|
||||||
|
android:textSize="@dimen/sp_13" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/address"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_13"
|
||||||
|
android:text=""
|
||||||
|
android:textColor="#ff999999"
|
||||||
|
android:textSize="@dimen/sp_13" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp_38"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:layout_marginRight="@dimen/dp_38">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tips_x"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="*"
|
||||||
|
android:textColor="#E61829"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tips"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="卸货照片包含车牌号、三分之二车身或者卸货场景"
|
||||||
|
android:textColor="#E61829"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_42"
|
||||||
|
android:layout_marginLeft="@dimen/dp_38"
|
||||||
|
android:layout_marginTop="@dimen/dp_33"
|
||||||
|
android:layout_marginRight="@dimen/dp_38"
|
||||||
|
app:cardBackgroundColor="@color/red"
|
||||||
|
app:cardCornerRadius="@dimen/dp_21">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/submit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="提交"
|
||||||
|
android:textColor="#fff"
|
||||||
|
android:textSize="@dimen/sp_15" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
@@ -99,6 +99,8 @@
|
|||||||
android:textSize="@dimen/sp_17"
|
android:textSize="@dimen/sp_17"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:layout_marginBottom="@dimen/dp_3"/>
|
android:layout_marginBottom="@dimen/dp_3"/>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
@@ -122,6 +124,7 @@
|
|||||||
android:progressDrawable="@drawable/par_bg"
|
android:progressDrawable="@drawable/par_bg"
|
||||||
/>
|
/>
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tvContent"
|
||||||
android:layout_marginTop="@dimen/dp_6"
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -131,6 +134,20 @@
|
|||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_marginLeft="@dimen/dp_18"
|
||||||
|
android:layout_marginRight="@dimen/dp_18"
|
||||||
|
android:id="@+id/tvOk"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="立即安装"
|
||||||
|
android:textColor="@color/theme_color"
|
||||||
|
android:textSize="@dimen/sp_17"
|
||||||
|
android:background="@null"
|
||||||
|
android:layout_marginBottom="@dimen/dp_13"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/force_box"
|
android:id="@+id/force_box"
|
||||||
|
|||||||
@@ -103,6 +103,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp_30"
|
android:layout_marginLeft="@dimen/dp_30"
|
||||||
@@ -131,6 +132,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp_30"
|
android:layout_marginLeft="@dimen/dp_30"
|
||||||
|
|||||||
@@ -146,6 +146,35 @@
|
|||||||
android:src="@mipmap/chevron" />
|
android:src="@mipmap/chevron" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_2"
|
||||||
|
android:background="#F6F6F9" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/r8"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="@dimen/dp_20"
|
||||||
|
android:paddingBottom="@dimen/dp_20">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="交易规则"
|
||||||
|
android:textColor="#ff000000"
|
||||||
|
android:textSize="@dimen/sp_15" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp_4"
|
||||||
|
android:layout_height="@dimen/dp_8"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:background="@null"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@mipmap/chevron" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_2"
|
android:layout_height="@dimen/dp_2"
|
||||||
@@ -275,11 +304,19 @@
|
|||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@mipmap/chevron" />
|
android:src="@mipmap/chevron" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_2"
|
android:layout_height="@dimen/dp_2"
|
||||||
android:background="#F6F6F9" />
|
android:background="#F6F6F9" />
|
||||||
|
<TextView
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="ICP备案号:豫ICP备09025418号-24A"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 606 KiB |
@@ -1,5 +1,5 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">大河好运司机</string>
|
<!-- <string name="appName">大河好运司机</string>-->
|
||||||
<!--设置界面-->
|
<!--设置界面-->
|
||||||
<string name="alivc_recorder_setting_min_record_duration">最小时长</string>
|
<string name="alivc_recorder_setting_min_record_duration">最小时长</string>
|
||||||
<string name="alivc_recorder_setting_max_record_duration">最大时长</string>
|
<string name="alivc_recorder_setting_max_record_duration">最大时长</string>
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
apply from: "compile.gradle"
|
apply from: "compile.gradle"
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = "1.5.0"
|
// ext.kotlin_version = "1.5.0"
|
||||||
// ext.kotlin_version = "1.6.10"
|
ext.kotlin_version = "1.6.10"
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter() // 这个
|
jcenter() // 这个
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#Mon Jul 12 10:16:49 CST 2021
|
#Mon Jul 12 10:16:49 CST 2021
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
|
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-6.7.1-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ dependencies {
|
|||||||
api rootProject.ext.dependencies["Xpopup"]
|
api rootProject.ext.dependencies["Xpopup"]
|
||||||
api rootProject.ext.dependencies["Countdownview"]
|
api rootProject.ext.dependencies["Countdownview"]
|
||||||
// api rootProject.ext.dependencies["CheckVersionLib"]
|
// api rootProject.ext.dependencies["CheckVersionLib"]
|
||||||
// api rootProject.ext.dependencies["Bugly"]
|
api rootProject.ext.dependencies["Bugly"]
|
||||||
// api rootProject.ext.dependencies["Zxing"]
|
// api rootProject.ext.dependencies["Zxing"]
|
||||||
api rootProject.ext.dependencies["Multidex"]
|
api rootProject.ext.dependencies["Multidex"]
|
||||||
// api rootProject.ext.dependencies["FlycoTabLayout"]
|
// api rootProject.ext.dependencies["FlycoTabLayout"]
|
||||||
|
|||||||
@@ -179,6 +179,7 @@ public final class TimeUtil {
|
|||||||
private static final DateFormat DEFAULT_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
|
private static final DateFormat DEFAULT_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
|
||||||
private static final DateFormat DEFAULT_FORMAT2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZSS:SS", Locale.getDefault());
|
private static final DateFormat DEFAULT_FORMAT2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZSS:SS", Locale.getDefault());
|
||||||
private static final DateFormat DEFAULT_FORMAT3 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.getDefault());
|
private static final DateFormat DEFAULT_FORMAT3 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.getDefault());
|
||||||
|
public static final DateFormat DEFAULT_FORMAT4 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.getDefault());
|
||||||
|
|
||||||
private TimeUtil() {
|
private TimeUtil() {
|
||||||
throw new UnsupportedOperationException("u can't instantiate me...");
|
throw new UnsupportedOperationException("u can't instantiate me...");
|
||||||
@@ -215,7 +216,7 @@ public final class TimeUtil {
|
|||||||
* @return 毫秒时间戳
|
* @return 毫秒时间戳
|
||||||
*/
|
*/
|
||||||
public static long string2Millis(final String time) {
|
public static long string2Millis(final String time) {
|
||||||
if (TextUtils.isEmpty(time)){
|
if (TextUtils.isEmpty(time)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return string2Millis(time, DEFAULT_FORMAT);
|
return string2Millis(time, DEFAULT_FORMAT);
|
||||||
@@ -242,10 +243,10 @@ public final class TimeUtil {
|
|||||||
* 将时间字符串转为时间戳
|
* 将时间字符串转为时间戳
|
||||||
* <p>time格式为format</p>
|
* <p>time格式为format</p>
|
||||||
*
|
*
|
||||||
* @param time 时间字符串
|
* @param time 时间字符串
|
||||||
* @return 毫秒时间戳
|
* @return 毫秒时间戳
|
||||||
*/
|
*/
|
||||||
public static String string2String(final String time,final SimpleDateFormat format) {
|
public static String string2String(final String time, final SimpleDateFormat format) {
|
||||||
try {
|
try {
|
||||||
return date2String(format.parse(time));
|
return date2String(format.parse(time));
|
||||||
// return DEFAULT_FORMAT.format(DEFAULT_FORMAT2.parse(time).getTime());
|
// return DEFAULT_FORMAT.format(DEFAULT_FORMAT2.parse(time).getTime());
|
||||||
@@ -421,7 +422,7 @@ public final class TimeUtil {
|
|||||||
* @return 合适型两个时间差
|
* @return 合适型两个时间差
|
||||||
*/
|
*/
|
||||||
public static String getFitTimeSpan(final String time0, final String time1, final int precision) {
|
public static String getFitTimeSpan(final String time0, final String time1, final int precision) {
|
||||||
if (TextUtils.isEmpty(time0)||TextUtils.isEmpty(time1)){
|
if (TextUtils.isEmpty(time0) || TextUtils.isEmpty(time1)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return millis2FitTimeSpan(Math.abs(string2Millis(time0, DEFAULT_FORMAT) - string2Millis(time1, DEFAULT_FORMAT)), precision);
|
return millis2FitTimeSpan(Math.abs(string2Millis(time0, DEFAULT_FORMAT) - string2Millis(time1, DEFAULT_FORMAT)), precision);
|
||||||
@@ -1685,7 +1686,7 @@ public final class TimeUtil {
|
|||||||
* @param compareDate
|
* @param compareDate
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static boolean compareDate(String nowDate, String compareDate,DateFormat format) {
|
public static boolean compareDate(String nowDate, String compareDate, DateFormat format) {
|
||||||
DateFormat df = format;
|
DateFormat df = format;
|
||||||
try {
|
try {
|
||||||
Date now = df.parse(nowDate);
|
Date now = df.parse(nowDate);
|
||||||
@@ -1700,4 +1701,22 @@ public final class TimeUtil {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 得到二个日期间的间隔天数
|
||||||
|
*
|
||||||
|
* @return 间格的天数(null表示时间格式不正确)
|
||||||
|
*/
|
||||||
|
public static int compareNowDate(long comTime) {
|
||||||
|
int min;
|
||||||
|
try {
|
||||||
|
min = (int) ((getNowMills() - comTime) / (60 * 1000));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return min;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -29,6 +29,24 @@ public class ToastUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void showLongToast(Context mContext, String message) {
|
||||||
|
if (!TextUtils.isEmpty(message)) {
|
||||||
|
|
||||||
|
// if ( mToast != null) {
|
||||||
|
// mToast.cancel();
|
||||||
|
// }
|
||||||
|
// mToast = Toast.makeText(mContext, message, Toast.LENGTH_SHORT);
|
||||||
|
// mToast.show();
|
||||||
|
|
||||||
|
if (mToast == null) {
|
||||||
|
mToast = Toast.makeText(mContext, message, Toast.LENGTH_LONG);
|
||||||
|
} else {
|
||||||
|
mToast.setText(message);
|
||||||
|
}
|
||||||
|
mToast.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void cancelToast(){
|
public static void cancelToast(){
|
||||||
if (mToast!=null)
|
if (mToast!=null)
|
||||||
mToast.cancel();
|
mToast.cancel();
|
||||||
|
|||||||
Reference in New Issue
Block a user