feat: 初始化项目结构和基本功能
- 创建项目根目录和主要子模块 - 添加基本的 Activity 和布局文件 - 实现简单的导航和电话拨打功能 - 添加相机和图像处理相关代码 - 创建网络请求和数据加密工具类 - 设置 AndroidManifest 文件和权限
48
.gitignore
vendored
@ -1,35 +1,15 @@
|
|||||||
# ---> Android
|
|
||||||
# Gradle files
|
|
||||||
.gradle/
|
|
||||||
build/
|
|
||||||
|
|
||||||
# Local configuration file (sdk path, etc)
|
|
||||||
local.properties
|
|
||||||
|
|
||||||
# Log/OS Files
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# Android Studio generated files and folders
|
|
||||||
captures/
|
|
||||||
.externalNativeBuild/
|
|
||||||
.cxx/
|
|
||||||
*.apk
|
|
||||||
output.json
|
|
||||||
|
|
||||||
# IntelliJ
|
|
||||||
*.iml
|
*.iml
|
||||||
.idea/
|
.gradle
|
||||||
misc.xml
|
/local.properties
|
||||||
deploymentTargetDropDown.xml
|
/.idea/caches
|
||||||
render.experimental.xml
|
/.idea/libraries
|
||||||
|
/.idea/modules.xml
|
||||||
# Keystore files
|
/.idea/workspace.xml
|
||||||
*.jks
|
/.idea/navEditor.xml
|
||||||
*.keystore
|
/.idea/assetWizardSettings.xml
|
||||||
|
.DS_Store
|
||||||
# Google Services (e.g. APIs or Firebase)
|
/build
|
||||||
google-services.json
|
/captures
|
||||||
|
.externalNativeBuild
|
||||||
# Android Profiling
|
.cxx
|
||||||
*.hprof
|
local.properties
|
||||||
|
|
||||||
|
3
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
6
.idea/AndroidProjectSystem.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AndroidProjectSystem">
|
||||||
|
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
|
||||||
|
</component>
|
||||||
|
</project>
|
7
.idea/MarsCodeWorkspaceAppSettings.xml
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
|
||||||
|
<option name="ckgOperationStatus" value="SUCCESS" />
|
||||||
|
<option name="progress" value="0.6296296" />
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/compiler.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="21" />
|
||||||
|
</component>
|
||||||
|
</project>
|
10
.idea/deploymentTargetSelector.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetSelector">
|
||||||
|
<selectionStates>
|
||||||
|
<SelectionState runConfigName="app">
|
||||||
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
</SelectionState>
|
||||||
|
</selectionStates>
|
||||||
|
</component>
|
||||||
|
</project>
|
20
.idea/gradle.xml
generated
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
|
<component name="GradleSettings">
|
||||||
|
<option name="linkedExternalProjectsSettings">
|
||||||
|
<GradleProjectSettings>
|
||||||
|
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
<option value="$PROJECT_DIR$/app" />
|
||||||
|
<option value="$PROJECT_DIR$/servicing" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</GradleProjectSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
61
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="ComposePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
<option name="previewFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ComposePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
<option name="previewFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ComposePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
<option name="previewFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ComposePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
<option name="previewFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="GlancePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="GlancePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="GlancePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="GlancePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewAnnotationInFunctionWithParameters" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
<option name="previewFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewApiLevelMustBeValid" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
<option name="previewFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewDeviceShouldUseNewSpec" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
<option name="previewFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewFontScaleMustBeGreaterThanZero" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
<option name="previewFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewMultipleParameterProviders" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
<option name="previewFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewParameterProviderOnFirstParameter" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
<option name="previewFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
<option name="previewFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
6
.idea/kotlinc.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="KotlinJpsPluginSettings">
|
||||||
|
<option name="version" value="1.9.25" />
|
||||||
|
</component>
|
||||||
|
</project>
|
10
.idea/migrations.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectMigrations">
|
||||||
|
<option name="MigrateToGradleLocalJavaHome">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
9
.idea/misc.xml
generated
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectType">
|
||||||
|
<option name="id" value="Android" />
|
||||||
|
</component>
|
||||||
|
</project>
|
17
.idea/runConfigurations.xml
generated
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RunConfigurationProducerService">
|
||||||
|
<option name="ignoredProducers">
|
||||||
|
<set>
|
||||||
|
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
|
||||||
|
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
|
||||||
|
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
1
app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/build
|
150
app/build.gradle
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
plugins {
|
||||||
|
alias(libs.plugins.android.application)
|
||||||
|
alias(libs.plugins.jetbrains.kotlin.android)
|
||||||
|
id 'com.google.devtools.ksp'
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace 'com.za.sdk.demo'
|
||||||
|
compileSdk 35
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "com.za.sdk.demo"
|
||||||
|
minSdk 24
|
||||||
|
targetSdk 35
|
||||||
|
versionCode 1
|
||||||
|
versionName "1.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
manifestPlaceholders = [
|
||||||
|
JPUSH_PKGNAME : "com.za.sdk.demo",
|
||||||
|
JPUSH_APPKEY : "a87e46d05e9f095a2b47a304", //JPush 上注册的包名对应的 Appkey.e6c51448340caba93fd418
|
||||||
|
JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
|
||||||
|
|
||||||
|
XIAOMI_APPID : "MI-2882303761518149120",
|
||||||
|
XIAOMI_APPKEY : "MI-5381814934120",//MI-小米的APPKEY
|
||||||
|
HUAWEI_APPID : "appid=100923923",//appid=华为的APPID"
|
||||||
|
OPPO_APPKEY : "OP-c8ce8eafcd3940ceb85c1ccbee8863c7",//OP-oppo的APPKEY
|
||||||
|
OPPO_APPID : "OP-30136992",//OP-oppo的APPID
|
||||||
|
OPPO_APPSECRET: "OP-25e2baa85b7946b1b365af515515c42d",//OP-oppo的APPSECRET
|
||||||
|
VIVO_APPKEY : "cfd443e2a1757cf537361588c988a12a",//vivo的APPKEY
|
||||||
|
VIVO_APPID : "105470845",//vivo的APPID
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_11
|
||||||
|
targetCompatibility JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = '11'
|
||||||
|
}
|
||||||
|
|
||||||
|
composeOptions {
|
||||||
|
kotlinCompilerExtensionVersion '1.5.15'
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
compose true
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
jniLibs.srcDirs = ["libs"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
implementation project(':servicing')
|
||||||
|
// implementation 'io.github.szl9:zd_servicing:1.0.1.5'
|
||||||
|
|
||||||
|
// implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||||
|
// implementation files('libs/zd_servicing-1.0.1.5.aar')
|
||||||
|
// implementation 'io.github.szl9:zd_servicing:1.0.1.9'
|
||||||
|
//
|
||||||
|
|
||||||
|
// implementation libs.androidx.core.ktx
|
||||||
|
// implementation libs.androidx.appcompat
|
||||||
|
// implementation libs.material
|
||||||
|
// implementation libs.androidx.lifecycle.viewmodel.compose
|
||||||
|
// implementation libs.androidx.lifecycle.runtime.ktx
|
||||||
|
// implementation libs.androidx.activity.compose
|
||||||
|
// implementation platform(libs.androidx.compose.bom)
|
||||||
|
// implementation libs.androidx.ui
|
||||||
|
// implementation libs.androidx.ui.graphics
|
||||||
|
// implementation libs.androidx.ui.tooling.preview
|
||||||
|
// implementation libs.androidx.material3
|
||||||
|
// implementation libs.androidx.work.runtime.ktx
|
||||||
|
// implementation libs.androidx.exifinterface
|
||||||
|
//
|
||||||
|
// testImplementation libs.junit
|
||||||
|
// androidTestImplementation libs.androidx.junit
|
||||||
|
// androidTestImplementation libs.androidx.espresso.core
|
||||||
|
// androidTestImplementation platform(libs.androidx.compose.bom)
|
||||||
|
// androidTestImplementation libs.androidx.ui.test.junit4
|
||||||
|
// debugImplementation libs.androidx.ui.tooling
|
||||||
|
// debugImplementation libs.androidx.ui.test.manifest
|
||||||
|
//
|
||||||
|
// implementation libs.coil.compose
|
||||||
|
// implementation libs.coil.gif
|
||||||
|
//
|
||||||
|
// implementation libs.permissionx
|
||||||
|
// implementation libs.utilcodex
|
||||||
|
//
|
||||||
|
// implementation libs.crashreport
|
||||||
|
//
|
||||||
|
// // 高德地图
|
||||||
|
// implementation libs.xdmap
|
||||||
|
// implementation libs.location
|
||||||
|
// implementation libs.search
|
||||||
|
//
|
||||||
|
// // JPush
|
||||||
|
// implementation libs.jpush
|
||||||
|
// implementation libs.jcore
|
||||||
|
// implementation libs.gson
|
||||||
|
//
|
||||||
|
// // 网络
|
||||||
|
// implementation libs.retrofit
|
||||||
|
// implementation libs.converter.gson
|
||||||
|
// implementation libs.adapter.rxjava3
|
||||||
|
// implementation libs.rxjava
|
||||||
|
// implementation libs.rxandroid
|
||||||
|
// implementation libs.logging.interceptor
|
||||||
|
// implementation libs.fastjson
|
||||||
|
//
|
||||||
|
// // 本地数据
|
||||||
|
// implementation libs.room.runtime
|
||||||
|
// annotationProcessor libs.room.compiler
|
||||||
|
// ksp libs.room.compiler
|
||||||
|
// implementation libs.mmkv
|
||||||
|
//
|
||||||
|
// // 7z
|
||||||
|
// implementation libs.xz
|
||||||
|
// implementation libs.commons.compress
|
||||||
|
//
|
||||||
|
// implementation libs.core
|
||||||
|
// implementation libs.tbssdk
|
||||||
|
//
|
||||||
|
// // CameraX
|
||||||
|
// implementation libs.androidx.camera.core
|
||||||
|
// implementation libs.androidx.camera.camera2
|
||||||
|
// implementation libs.androidx.camera.lifecycle
|
||||||
|
// implementation libs.androidx.camera.view
|
||||||
|
// implementation libs.androidx.camera.extensions
|
||||||
|
//
|
||||||
|
// implementation libs.glide
|
||||||
|
// annotationProcessor libs.compiler
|
||||||
|
//
|
||||||
|
// implementation libs.org.eclipse.paho.client.mqttv3
|
||||||
|
// implementation libs.org.eclipse.paho.android.service
|
||||||
|
}
|
21
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.za.sdk.demo
|
||||||
|
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
|
|
||||||
|
import org.junit.Test
|
||||||
|
import org.junit.runner.RunWith
|
||||||
|
|
||||||
|
import org.junit.Assert.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instrumented test, which will execute on an Android device.
|
||||||
|
*
|
||||||
|
* See [testing documentation](http://d.android.com/tools/testing).
|
||||||
|
*/
|
||||||
|
@RunWith(AndroidJUnit4::class)
|
||||||
|
class ExampleInstrumentedTest {
|
||||||
|
@Test
|
||||||
|
fun useAppContext() { // Context of the app under test.
|
||||||
|
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||||
|
assertEquals("com.za.sdk.demo", appContext.packageName)
|
||||||
|
}
|
||||||
|
}
|
49
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:name=".MyApplication"
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/Theme.Zd_sdk_demo"
|
||||||
|
tools:targetApi="31">
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:theme="@style/Theme.Dealer">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".ActionActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:theme="@style/Theme.Zd_sdk_demo">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<!-- 定义你的URL Scheme -->
|
||||||
|
<data
|
||||||
|
android:host="app"
|
||||||
|
android:scheme="zd.assist" />
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="android.app.lib_name"
|
||||||
|
android:value="" />
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
54
app/src/main/java/com/za/sdk/demo/ActionActivity.kt
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
package com.za.sdk.demo
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
|
import androidx.activity.ComponentActivity
|
||||||
|
import androidx.activity.compose.setContent
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.material3.Scaffold
|
||||||
|
import androidx.compose.ui.Alignment
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import com.za.base.view.CommonButton
|
||||||
|
import com.za.common.log.LogUtil
|
||||||
|
import com.za.sdk.demo.ui.theme.Zd_sdk_demoTheme
|
||||||
|
import com.za.ui.main.ServiceLauncherActivity
|
||||||
|
|
||||||
|
class ActionActivity : ComponentActivity() {
|
||||||
|
override fun onCreate(savedInstanceState : Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
enableEdgeToEdge()
|
||||||
|
setContent {
|
||||||
|
Zd_sdk_demoTheme {
|
||||||
|
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
|
||||||
|
Box(modifier = Modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.padding(innerPadding),
|
||||||
|
contentAlignment = Alignment.Center) {
|
||||||
|
CommonButton(text = "跳转到服务页") {
|
||||||
|
val name = intent.data?.getQueryParameter("driverName")
|
||||||
|
val phone = intent.data?.getQueryParameter("driverPhone")
|
||||||
|
val taskCode = intent.data?.getQueryParameter("taskCode")
|
||||||
|
val vehicleName = intent.data?.getQueryParameter("rescueVehicle")
|
||||||
|
LogUtil.print("参数",
|
||||||
|
"name:$name,phone:$phone,taskCode:$taskCode,vehicleName:$vehicleName")
|
||||||
|
|
||||||
|
Log.e("ActionActivity",
|
||||||
|
"name:$name,phone:$phone,taskCode:$taskCode,vehicleName:$vehicleName")
|
||||||
|
val intent =
|
||||||
|
Intent(this@ActionActivity, ServiceLauncherActivity::class.java)
|
||||||
|
intent.putExtra("driverName", name)
|
||||||
|
intent.putExtra("driverPhone", phone)
|
||||||
|
intent.putExtra("taskCode", taskCode)
|
||||||
|
intent.putExtra("rescueVehicle", vehicleName)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
42
app/src/main/java/com/za/sdk/demo/MainActivity.kt
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package com.za.sdk.demo
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.activity.ComponentActivity
|
||||||
|
import androidx.activity.compose.setContent
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.compose.foundation.clickable
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.material3.Scaffold
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.ui.Alignment
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.core.net.toUri
|
||||||
|
import com.za.sdk.demo.ui.theme.Zd_sdk_demoTheme
|
||||||
|
|
||||||
|
class MainActivity : ComponentActivity() {
|
||||||
|
override fun onCreate(savedInstanceState : Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
enableEdgeToEdge()
|
||||||
|
setContent {
|
||||||
|
Zd_sdk_demoTheme {
|
||||||
|
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
|
||||||
|
Box(modifier = Modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.clickable {
|
||||||
|
val uri =
|
||||||
|
"zd.assist://app?taskCode=ZD250407100237&driverName=宋志领&driverPhone=17630035658&rescueVehicle=沪88888".toUri()
|
||||||
|
val intent = Intent(Intent.ACTION_VIEW, uri)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
.padding(innerPadding), contentAlignment = Alignment.Center) {
|
||||||
|
Text("我是别的APP,我要打开服务页")
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
app/src/main/java/com/za/sdk/demo/MyApplication.kt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package com.za.sdk.demo
|
||||||
|
|
||||||
|
import android.app.Application
|
||||||
|
import com.za.common.ZDManager
|
||||||
|
|
||||||
|
class MyApplication : Application(){
|
||||||
|
override fun onCreate() {
|
||||||
|
super.onCreate()
|
||||||
|
ZDManager.init(this)
|
||||||
|
}
|
||||||
|
}
|
11
app/src/main/java/com/za/sdk/demo/ui/theme/Color.kt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package com.za.sdk.demo.ui.theme
|
||||||
|
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
|
val Purple80 = Color(0xFFD0BCFF)
|
||||||
|
val PurpleGrey80 = Color(0xFFCCC2DC)
|
||||||
|
val Pink80 = Color(0xFFEFB8C8)
|
||||||
|
|
||||||
|
val Purple40 = Color(0xFF6650a4)
|
||||||
|
val PurpleGrey40 = Color(0xFF625b71)
|
||||||
|
val Pink40 = Color(0xFF7D5260)
|
44
app/src/main/java/com/za/sdk/demo/ui/theme/Theme.kt
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
package com.za.sdk.demo.ui.theme
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.os.Build
|
||||||
|
import androidx.compose.foundation.isSystemInDarkTheme
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.darkColorScheme
|
||||||
|
import androidx.compose.material3.dynamicDarkColorScheme
|
||||||
|
import androidx.compose.material3.dynamicLightColorScheme
|
||||||
|
import androidx.compose.material3.lightColorScheme
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
|
||||||
|
private val DarkColorScheme =
|
||||||
|
darkColorScheme(primary = Purple80, secondary = PurpleGrey80, tertiary = Pink80)
|
||||||
|
|
||||||
|
private val LightColorScheme =
|
||||||
|
lightColorScheme(primary = Purple40, secondary = PurpleGrey40, tertiary = Pink40
|
||||||
|
|
||||||
|
/* Other default colors to override
|
||||||
|
background = Color(0xFFFFFBFE),
|
||||||
|
surface = Color(0xFFFFFBFE),
|
||||||
|
onPrimary = Color.White,
|
||||||
|
onSecondary = Color.White,
|
||||||
|
onTertiary = Color.White,
|
||||||
|
onBackground = Color(0xFF1C1B1F),
|
||||||
|
onSurface = Color(0xFF1C1B1F),
|
||||||
|
*/)
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun Zd_sdk_demoTheme(darkTheme : Boolean = isSystemInDarkTheme(), // Dynamic color is available on Android 12+
|
||||||
|
dynamicColor : Boolean = true, content : @Composable () -> Unit) {
|
||||||
|
val colorScheme = when {
|
||||||
|
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
|
||||||
|
val context = LocalContext.current
|
||||||
|
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
|
||||||
|
}
|
||||||
|
|
||||||
|
darkTheme -> DarkColorScheme
|
||||||
|
else -> LightColorScheme
|
||||||
|
}
|
||||||
|
|
||||||
|
MaterialTheme(colorScheme = colorScheme, typography = Typography, content = content)
|
||||||
|
}
|
29
app/src/main/java/com/za/sdk/demo/ui/theme/Type.kt
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package com.za.sdk.demo.ui.theme
|
||||||
|
|
||||||
|
import androidx.compose.material3.Typography
|
||||||
|
import androidx.compose.ui.text.TextStyle
|
||||||
|
import androidx.compose.ui.text.font.FontFamily
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
|
||||||
|
// Set of Material typography styles to start with
|
||||||
|
val Typography = Typography(bodyLarge = TextStyle(fontFamily = FontFamily.Default,
|
||||||
|
fontWeight = FontWeight.Normal,
|
||||||
|
fontSize = 16.sp,
|
||||||
|
lineHeight = 24.sp,
|
||||||
|
letterSpacing = 0.5.sp)/* Other default text styles to override
|
||||||
|
titleLarge = TextStyle(
|
||||||
|
fontFamily = FontFamily.Default,
|
||||||
|
fontWeight = FontWeight.Normal,
|
||||||
|
fontSize = 22.sp,
|
||||||
|
lineHeight = 28.sp,
|
||||||
|
letterSpacing = 0.sp
|
||||||
|
),
|
||||||
|
labelSmall = TextStyle(
|
||||||
|
fontFamily = FontFamily.Default,
|
||||||
|
fontWeight = FontWeight.Medium,
|
||||||
|
fontSize = 11.sp,
|
||||||
|
lineHeight = 16.sp,
|
||||||
|
letterSpacing = 0.5.sp
|
||||||
|
)
|
||||||
|
*/)
|
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#3DDC84"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
</vector>
|
30
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:endX="85.84757"
|
||||||
|
android:endY="92.4963"
|
||||||
|
android:startX="42.9492"
|
||||||
|
android:startY="49.59793"
|
||||||
|
android:type="linear">
|
||||||
|
<item
|
||||||
|
android:color="#44000000"
|
||||||
|
android:offset="0.0" />
|
||||||
|
<item
|
||||||
|
android:color="#00000000"
|
||||||
|
android:offset="1.0" />
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||||
|
android:strokeWidth="1"
|
||||||
|
android:strokeColor="#00000000" />
|
||||||
|
</vector>
|
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 7.6 KiB |
10
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="purple_200">#FFBB86FC</color>
|
||||||
|
<color name="purple_500">#FF6200EE</color>
|
||||||
|
<color name="purple_700">#FF3700B3</color>
|
||||||
|
<color name="teal_200">#FF03DAC5</color>
|
||||||
|
<color name="teal_700">#FF018786</color>
|
||||||
|
<color name="black">#FF000000</color>
|
||||||
|
<color name="white">#FFFFFFFF</color>
|
||||||
|
</resources>
|
4
app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<resources>
|
||||||
|
<string name="app_name">zd_sdk_demo</string>
|
||||||
|
<string name="title_activity_action">ActionActivity</string>
|
||||||
|
</resources>
|
5
app/src/main/res/values/themes.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="Theme.Zd_sdk_demo" parent="android:Theme.Material.Light.NoActionBar" />
|
||||||
|
</resources>
|
13
app/src/main/res/xml/backup_rules.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
Sample backup rules file; uncomment and customize as necessary.
|
||||||
|
See https://developer.android.com/guide/topics/data/autobackup
|
||||||
|
for details.
|
||||||
|
Note: This file is ignored for devices older than API 31
|
||||||
|
See https://developer.android.com/about/versions/12/backup-restore
|
||||||
|
-->
|
||||||
|
<full-backup-content>
|
||||||
|
<!--
|
||||||
|
<include domain="sharedpref" path="."/>
|
||||||
|
<exclude domain="sharedpref" path="device.xml"/>
|
||||||
|
-->
|
||||||
|
</full-backup-content>
|
19
app/src/main/res/xml/data_extraction_rules.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
Sample data extraction rules file; uncomment and customize as necessary.
|
||||||
|
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||||
|
for details.
|
||||||
|
-->
|
||||||
|
<data-extraction-rules>
|
||||||
|
<cloud-backup>
|
||||||
|
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||||
|
<include .../>
|
||||||
|
<exclude .../>
|
||||||
|
-->
|
||||||
|
</cloud-backup>
|
||||||
|
<!--
|
||||||
|
<device-transfer>
|
||||||
|
<include .../>
|
||||||
|
<exclude .../>
|
||||||
|
</device-transfer>
|
||||||
|
-->
|
||||||
|
</data-extraction-rules>
|
17
app/src/test/java/com/za/sdk/demo/ExampleUnitTest.kt
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package com.za.sdk.demo
|
||||||
|
|
||||||
|
import org.junit.Test
|
||||||
|
|
||||||
|
import org.junit.Assert.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Example local unit test, which will execute on the development machine (host).
|
||||||
|
*
|
||||||
|
* See [testing documentation](http://d.android.com/tools/testing).
|
||||||
|
*/
|
||||||
|
class ExampleUnitTest {
|
||||||
|
@Test
|
||||||
|
fun addition_isCorrect() {
|
||||||
|
assertEquals(4, 2 + 2)
|
||||||
|
}
|
||||||
|
}
|
7
build.gradle
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
plugins {
|
||||||
|
alias(libs.plugins.android.application) apply false
|
||||||
|
alias(libs.plugins.jetbrains.kotlin.android) apply false
|
||||||
|
alias(libs.plugins.android.library) apply false
|
||||||
|
id("com.google.devtools.ksp") version "1.9.0-1.0.13" apply false
|
||||||
|
}
|
23
gradle.properties
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Project-wide Gradle settings.
|
||||||
|
# IDE (e.g. Android Studio) users:
|
||||||
|
# Gradle settings configured through the IDE *will override*
|
||||||
|
# any settings specified in this file.
|
||||||
|
# For more details on how to configure your build environment visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||||
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
# This option should only be used with decoupled projects. For more details, visit
|
||||||
|
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
|
||||||
|
# org.gradle.parallel=true
|
||||||
|
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||||
|
# Android operating system, and which are packaged with your app's APK
|
||||||
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
|
android.useAndroidX=true
|
||||||
|
# Kotlin code style for this project: "official" or "obsolete":
|
||||||
|
kotlin.code.style=official
|
||||||
|
# Enables namespacing of each library's R class so that its R class includes only the
|
||||||
|
# resources declared in the library itself and none from the library's dependencies,
|
||||||
|
# thereby reducing the size of the R class for that library
|
||||||
|
android.nonTransitiveRClass=true
|
111
gradle/libs.versions.toml
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
[versions]
|
||||||
|
cameraCore = "1.4.1"
|
||||||
|
coilCompose = "2.6.0"
|
||||||
|
commonsCompress = "1.23.0"
|
||||||
|
compiler = "4.14.2"
|
||||||
|
converterGson = "2.9.0"
|
||||||
|
core = "3.5.3"
|
||||||
|
crashreport = "4.0.4"
|
||||||
|
faceDetection = "16.1.7"
|
||||||
|
fastjson = "1.2.69"
|
||||||
|
glide = "4.16.0"
|
||||||
|
gson = "2.11.0"
|
||||||
|
jcore = "3.3.2"
|
||||||
|
jpush = "4.8.1"
|
||||||
|
location = "5.6.1"
|
||||||
|
loggingInterceptor = "4.11.0"
|
||||||
|
mmkv = "2.0.2"
|
||||||
|
orgEclipsePahoAndroidService = "1.1.1"
|
||||||
|
orgEclipsePahoClientMqttv3 = "1.2.5"
|
||||||
|
permissionx = "1.8.0"
|
||||||
|
retrofit = "2.9.0"
|
||||||
|
roomRuntimeVersion = "2.6.1"
|
||||||
|
roomCompilerVersion = "2.6.1"
|
||||||
|
agp = "8.2.2"
|
||||||
|
kotlin = "1.9.25"
|
||||||
|
coreKtx = "1.15.0"
|
||||||
|
junit = "4.13.2"
|
||||||
|
junitVersion = "1.2.1"
|
||||||
|
espressoCore = "3.6.1"
|
||||||
|
lifecycleRuntimeKtx = "2.8.7"
|
||||||
|
activityCompose = "1.10.0"
|
||||||
|
composeBom = "2025.01.01"
|
||||||
|
material3="1.3.1"
|
||||||
|
appcompat = "1.7.0"
|
||||||
|
material = "1.12.0"
|
||||||
|
rxandroid = "3.0.2"
|
||||||
|
rxjava = "3.1.7"
|
||||||
|
search = "7.3.0"
|
||||||
|
tbssdk = "44286"
|
||||||
|
uiGraphics = "1.7.7"
|
||||||
|
uiTooling = "1.7.7"
|
||||||
|
uiToolingPreview = "1.7.7"
|
||||||
|
uiVersion = "1.7.7"
|
||||||
|
utilcodex = "1.31.1"
|
||||||
|
workRuntimeKtx = "2.10.0"
|
||||||
|
xdmap = "8.1.0"
|
||||||
|
activity = "1.10.0"
|
||||||
|
xz = "1.9"
|
||||||
|
exifinterface = "1.3.7"
|
||||||
|
[libraries]
|
||||||
|
adapter-rxjava3 = { module = "com.squareup.retrofit2:adapter-rxjava3", version.ref = "converterGson" }
|
||||||
|
androidx-camera-camera2 = { module = "androidx.camera:camera-camera2", version.ref = "cameraCore" }
|
||||||
|
androidx-camera-core = { module = "androidx.camera:camera-core", version.ref = "cameraCore" }
|
||||||
|
androidx-camera-extensions = { module = "androidx.camera:camera-extensions", version.ref = "cameraCore" }
|
||||||
|
androidx-camera-lifecycle = { module = "androidx.camera:camera-lifecycle", version.ref = "cameraCore" }
|
||||||
|
androidx-camera-view = { module = "androidx.camera:camera-view", version.ref = "cameraCore" }
|
||||||
|
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||||
|
androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycleRuntimeKtx" }
|
||||||
|
androidx-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" }
|
||||||
|
androidx-ui = { module = "androidx.compose.ui:ui", version.ref = "uiVersion" }
|
||||||
|
androidx-ui-graphics = { module = "androidx.compose.ui:ui-graphics", version.ref = "uiGraphics" }
|
||||||
|
androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "uiGraphics" }
|
||||||
|
androidx-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "uiGraphics" }
|
||||||
|
androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "uiTooling" }
|
||||||
|
androidx-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "uiToolingPreview" }
|
||||||
|
androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workRuntimeKtx" }
|
||||||
|
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coilCompose" }
|
||||||
|
coil-gif = { module = "io.coil-kt:coil-gif", version.ref = "coilCompose" }
|
||||||
|
commons-compress = { module = "org.apache.commons:commons-compress", version.ref = "commonsCompress" }
|
||||||
|
compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "compiler" }
|
||||||
|
converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "converterGson" }
|
||||||
|
core = { module = "com.google.zxing:core", version.ref = "core" }
|
||||||
|
crashreport = { module = "com.tencent.bugly:crashreport", version.ref = "crashreport" }
|
||||||
|
face-detection = { module = "com.google.mlkit:face-detection", version.ref = "faceDetection" }
|
||||||
|
fastjson = { module = "com.alibaba:fastjson", version.ref = "fastjson" }
|
||||||
|
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
|
||||||
|
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
||||||
|
jcore = { module = "cn.jiguang.sdk:jcore", version.ref = "jcore" }
|
||||||
|
jpush = { module = "cn.jiguang.sdk:jpush", version.ref = "jpush" }
|
||||||
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||||
|
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
||||||
|
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||||
|
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
|
||||||
|
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
|
||||||
|
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
|
||||||
|
location = { module = "com.amap.api:location", version.ref = "location" }
|
||||||
|
logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptor" }
|
||||||
|
mmkv = { module = "com.tencent:mmkv", version.ref = "mmkv" }
|
||||||
|
org-eclipse-paho-android-service = { module = "org.eclipse.paho:org.eclipse.paho.android.service", version.ref = "orgEclipsePahoAndroidService" }
|
||||||
|
org-eclipse-paho-client-mqttv3 = { module = "org.eclipse.paho:org.eclipse.paho.client.mqttv3", version.ref = "orgEclipsePahoClientMqttv3" }
|
||||||
|
permissionx = { module = "com.guolindev.permissionx:permissionx", version.ref = "permissionx" }
|
||||||
|
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
|
||||||
|
room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomCompilerVersion" }
|
||||||
|
room-runtime = { module = "androidx.room:room-runtime", version.ref = "roomRuntimeVersion" }
|
||||||
|
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
|
||||||
|
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||||
|
rxandroid = { module = "io.reactivex.rxjava3:rxandroid", version.ref = "rxandroid" }
|
||||||
|
rxjava = { module = "io.reactivex.rxjava3:rxjava", version.ref = "rxjava" }
|
||||||
|
search = { module = "com.amap.api:search", version.ref = "search" }
|
||||||
|
tbssdk = { module = "com.tencent.tbs:tbssdk", version.ref = "tbssdk" }
|
||||||
|
utilcodex = { module = "com.blankj:utilcodex", version.ref = "utilcodex" }
|
||||||
|
xdmap = { module = "com.amap.api:3dmap", version.ref = "xdmap" }
|
||||||
|
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
||||||
|
xz = { module = "org.tukaani:xz", version.ref = "xz" }
|
||||||
|
androidx-exifinterface = { group = "androidx.exifinterface", name = "exifinterface", version.ref = "exifinterface" }
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||||
|
android-library = { id = "com.android.library", version.ref = "agp" }
|
||||||
|
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#Mon Apr 07 09:26:24 CST 2025
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
185
gradlew
vendored
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright 2015 the original author or authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=`expr $i + 1`
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
0) set -- ;;
|
||||||
|
1) set -- "$args0" ;;
|
||||||
|
2) set -- "$args0" "$args1" ;;
|
||||||
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Escape application args
|
||||||
|
save () {
|
||||||
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
|
}
|
||||||
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
89
gradlew.bat
vendored
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
1
servicing/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/build
|
221
servicing/build.gradle
Normal file
@ -0,0 +1,221 @@
|
|||||||
|
plugins {
|
||||||
|
alias(libs.plugins.android.library)
|
||||||
|
alias(libs.plugins.jetbrains.kotlin.android)
|
||||||
|
id 'com.google.devtools.ksp'
|
||||||
|
id 'maven-publish'
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace 'com.za.servicing'
|
||||||
|
compileSdk 35
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk 23
|
||||||
|
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
consumerProguardFiles "consumer-rules.pro"
|
||||||
|
vectorDrawables {
|
||||||
|
useSupportLibrary true
|
||||||
|
}
|
||||||
|
|
||||||
|
manifestPlaceholders = [
|
||||||
|
JPUSH_PKGNAME : "${applicationId}",
|
||||||
|
JPUSH_APPKEY : "a87e46d05e9f095a2b47a304", //JPush 上注册的包名对应的 Appkey.e6c51448340caba93fd418
|
||||||
|
JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
|
||||||
|
|
||||||
|
XIAOMI_APPID : "MI-2882303761518149120",
|
||||||
|
XIAOMI_APPKEY : "MI-5381814934120",//MI-小米的APPKEY
|
||||||
|
HUAWEI_APPID : "appid=100923923",//appid=华为的APPID"
|
||||||
|
OPPO_APPKEY : "OP-c8ce8eafcd3940ceb85c1ccbee8863c7",//OP-oppo的APPKEY
|
||||||
|
OPPO_APPID : "OP-30136992",//OP-oppo的APPID
|
||||||
|
OPPO_APPSECRET: "OP-25e2baa85b7946b1b365af515515c42d",//OP-oppo的APPSECRET
|
||||||
|
VIVO_APPKEY : "cfd443e2a1757cf537361588c988a12a",//vivo的APPKEY
|
||||||
|
VIVO_APPID : "105470845",//vivo的APPID
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
// minifyEnabled true
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_11
|
||||||
|
targetCompatibility JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = '11'
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
compose true
|
||||||
|
buildConfig true // 生成 BuildConfig
|
||||||
|
resValues true // 允许资源值生成
|
||||||
|
}
|
||||||
|
composeOptions {
|
||||||
|
kotlinCompilerExtensionVersion '1.5.15'
|
||||||
|
}
|
||||||
|
packaging {
|
||||||
|
resources {
|
||||||
|
excludes += '/META-INF/{AL2.0,LGPL2.1}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publishing {
|
||||||
|
singleVariant("release") {
|
||||||
|
withSourcesJar()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
release(MavenPublication) {
|
||||||
|
groupId = 'io.github.szl9'
|
||||||
|
artifactId = 'zd_servicing'
|
||||||
|
version = "1.0.1.9"
|
||||||
|
|
||||||
|
pom {
|
||||||
|
packaging = "aar"
|
||||||
|
name.set("zd_servicing")
|
||||||
|
description.set("zd_servicing: Library for Android Application")
|
||||||
|
url.set("https://github.com/szl9/4dbki6r4uv.git")
|
||||||
|
inceptionYear.set("2024")
|
||||||
|
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name.set("MIT License")
|
||||||
|
url.set("https://opensource.org/licenses/MIT")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id.set("zd")
|
||||||
|
name.set("zd szl")
|
||||||
|
email.set("17630035658@163.com")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scm {
|
||||||
|
connection.set("scm:git@github.com:szl9/4dbki6r4uv.git")
|
||||||
|
developerConnection.set("scm:git@github.com:szl9/4dbki6r4uv.git")
|
||||||
|
url.set("https://github.com/szl9/4dbki6r4uv.git")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将 afterEvaluate 移到 publications 块内
|
||||||
|
afterEvaluate {
|
||||||
|
from components.release
|
||||||
|
// 将依赖项处理放在这里
|
||||||
|
pom.withXml {
|
||||||
|
def root = asNode()
|
||||||
|
def dependenciesNode = root.dependencies ? root.dependencies[0] : root.appendNode('dependencies')
|
||||||
|
configurations.api.allDependencies.each { dep ->
|
||||||
|
try {
|
||||||
|
if (dep.group != null && dep.name != null && dep.version != null) {
|
||||||
|
def dependencyNode = dependenciesNode.appendNode('dependency')
|
||||||
|
dependencyNode.appendNode('groupId', dep.group)
|
||||||
|
dependencyNode.appendNode('artifactId', dep.name)
|
||||||
|
dependencyNode.appendNode('version', dep.version)
|
||||||
|
dependencyNode.appendNode('scope', 'compile')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
logger.warn("Failed to add dependency ${dep} to POM", e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = 'zd_servicing'
|
||||||
|
url = layout.buildDirectory.dir("zd_servicing")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register('generateRepo', Zip) {
|
||||||
|
def publishTask = tasks.named('publishReleasePublicationToZd_servicingRepository')
|
||||||
|
from publishTask.map { it.getRepository().getUrl() }
|
||||||
|
into 'zd_servicing'
|
||||||
|
archiveFileName.set('zd_servicing.zip')
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
api libs.androidx.core.ktx
|
||||||
|
api libs.androidx.appcompat
|
||||||
|
api libs.material
|
||||||
|
api libs.androidx.lifecycle.viewmodel.compose
|
||||||
|
api libs.androidx.lifecycle.runtime.ktx
|
||||||
|
api libs.androidx.activity.compose
|
||||||
|
api platform(libs.androidx.compose.bom)
|
||||||
|
api libs.androidx.ui
|
||||||
|
api libs.androidx.ui.graphics
|
||||||
|
api libs.androidx.ui.tooling.preview
|
||||||
|
api libs.androidx.material3
|
||||||
|
api libs.androidx.work.runtime.ktx
|
||||||
|
api libs.androidx.exifinterface
|
||||||
|
|
||||||
|
testApi libs.junit
|
||||||
|
androidTestApi libs.androidx.junit
|
||||||
|
androidTestApi libs.androidx.espresso.core
|
||||||
|
androidTestApi platform(libs.androidx.compose.bom)
|
||||||
|
androidTestApi libs.androidx.ui.test.junit4
|
||||||
|
debugApi libs.androidx.ui.tooling
|
||||||
|
debugApi libs.androidx.ui.test.manifest
|
||||||
|
|
||||||
|
api libs.coil.compose
|
||||||
|
api libs.coil.gif
|
||||||
|
|
||||||
|
api libs.permissionx
|
||||||
|
api libs.utilcodex
|
||||||
|
|
||||||
|
api libs.crashreport
|
||||||
|
|
||||||
|
// 高德地图
|
||||||
|
api libs.xdmap
|
||||||
|
api libs.location
|
||||||
|
api libs.search
|
||||||
|
|
||||||
|
// // JPush
|
||||||
|
api libs.jpush
|
||||||
|
api libs.jcore
|
||||||
|
api libs.gson
|
||||||
|
|
||||||
|
// 网络
|
||||||
|
api libs.retrofit
|
||||||
|
api libs.converter.gson
|
||||||
|
api libs.adapter.rxjava3
|
||||||
|
api libs.rxjava
|
||||||
|
api libs.rxandroid
|
||||||
|
api libs.logging.interceptor
|
||||||
|
api libs.fastjson
|
||||||
|
|
||||||
|
// 本地数据
|
||||||
|
api libs.room.runtime
|
||||||
|
annotationProcessor libs.room.compiler
|
||||||
|
ksp libs.room.compiler
|
||||||
|
api libs.mmkv
|
||||||
|
|
||||||
|
// 7z
|
||||||
|
api libs.xz
|
||||||
|
api libs.commons.compress
|
||||||
|
|
||||||
|
api libs.core
|
||||||
|
api libs.tbssdk
|
||||||
|
|
||||||
|
// CameraX
|
||||||
|
api libs.androidx.camera.core
|
||||||
|
api libs.androidx.camera.camera2
|
||||||
|
api libs.androidx.camera.lifecycle
|
||||||
|
api libs.androidx.camera.view
|
||||||
|
api libs.androidx.camera.extensions
|
||||||
|
|
||||||
|
api libs.glide
|
||||||
|
annotationProcessor libs.compiler
|
||||||
|
|
||||||
|
api libs.org.eclipse.paho.client.mqttv3
|
||||||
|
api libs.org.eclipse.paho.android.service
|
||||||
|
}
|
||||||
|
|
0
servicing/consumer-rules.pro
Normal file
203
servicing/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
# 保留行号用于调试
|
||||||
|
-keepattributes SourceFile,LineNumberTable
|
||||||
|
-renamesourcefileattribute SourceFile
|
||||||
|
|
||||||
|
# 保留基本属性
|
||||||
|
-keepattributes Signature
|
||||||
|
-keepattributes *Annotation*
|
||||||
|
-keepattributes Exceptions
|
||||||
|
-keepattributes InnerClasses
|
||||||
|
|
||||||
|
# 保留R文件
|
||||||
|
-keepclassmembers class **.R$* {
|
||||||
|
public static <fields>;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 保留servicing模块中的所有model类
|
||||||
|
-keep class com.za.servicing.model.** { *; }
|
||||||
|
|
||||||
|
# 保留servicing模块中的所有接口
|
||||||
|
-keep interface com.za.servicing.** { *; }
|
||||||
|
|
||||||
|
# 保留servicing模块中的所有枚举
|
||||||
|
-keepclassmembers enum com.za.servicing.** { *; }
|
||||||
|
|
||||||
|
# 保留Parcelable实现类
|
||||||
|
-keep class * implements android.os.Parcelable {
|
||||||
|
public static final android.os.Parcelable$Creator *;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 保留Serializable实现类
|
||||||
|
-keepnames class * implements java.io.Serializable
|
||||||
|
-keepclassmembers class * implements java.io.Serializable {
|
||||||
|
static final long serialVersionUID;
|
||||||
|
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
||||||
|
!static !transient <fields>;
|
||||||
|
private void writeObject(java.io.ObjectOutputStream);
|
||||||
|
private void readObject(java.io.ObjectInputStream);
|
||||||
|
java.lang.Object writeReplace();
|
||||||
|
java.lang.Object readResolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
# 保留WebView相关
|
||||||
|
-keepclassmembers class * extends android.webkit.WebViewClient {
|
||||||
|
public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
|
||||||
|
public boolean *(android.webkit.WebView, java.lang.String);
|
||||||
|
}
|
||||||
|
-keepclassmembers class * extends android.webkit.WebViewClient {
|
||||||
|
public void *(android.webkit.WebView, java.lang.String);
|
||||||
|
}
|
||||||
|
|
||||||
|
# 保留native方法
|
||||||
|
-keepclasseswithmembernames class * {
|
||||||
|
native <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 保留View的getter和setter
|
||||||
|
-keepclassmembers public class * extends android.view.View {
|
||||||
|
void set*(***); *** get*();
|
||||||
|
}
|
||||||
|
|
||||||
|
# Coil图片加载库
|
||||||
|
-keep class coil.** { *; }
|
||||||
|
-dontwarn coil.**
|
||||||
|
|
||||||
|
# PermissionX权限库
|
||||||
|
-keep class com.permissionx.guolindev.** { *; }
|
||||||
|
|
||||||
|
# 高德地图相关
|
||||||
|
-keep class com.amap.api.**{*;}
|
||||||
|
-keep class com.autonavi.**{*;}
|
||||||
|
-keep class com.loc.**{*;}
|
||||||
|
-dontwarn com.amap.api.**
|
||||||
|
-dontwarn com.autonavi.**
|
||||||
|
-dontwarn com.loc.**
|
||||||
|
|
||||||
|
# JPush相关
|
||||||
|
-dontoptimize
|
||||||
|
-dontpreverify
|
||||||
|
-dontwarn cn.jpush.**
|
||||||
|
-keep class cn.jpush.** { *; }
|
||||||
|
-dontwarn cn.jcore.**
|
||||||
|
-keep class cn.jcore.** { *; }
|
||||||
|
|
||||||
|
# Retrofit网络库
|
||||||
|
-keepattributes Signature
|
||||||
|
-keepattributes Exceptions
|
||||||
|
-dontwarn retrofit2.**
|
||||||
|
-keep class retrofit2.** { *; }
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
@retrofit2.http.* <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
# OkHttp
|
||||||
|
-dontwarn okhttp3.**
|
||||||
|
-dontwarn okio.**
|
||||||
|
-keep class okhttp3.** { *; }
|
||||||
|
-keep class okio.** { *; }
|
||||||
|
|
||||||
|
# RxJava
|
||||||
|
-dontwarn io.reactivex.**
|
||||||
|
-keep class io.reactivex.** { *; }
|
||||||
|
-dontwarn sun.misc.**
|
||||||
|
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
|
||||||
|
long producerIndex;
|
||||||
|
long consumerIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#blankJ
|
||||||
|
-dontwarn com.blankj.utilcode.**
|
||||||
|
|
||||||
|
-keepclassmembers class * {
|
||||||
|
@com.blankj.utilcode.util.BusUtils$Bus <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep public class * extends com.blankj.utilcode.util.ApiUtils$BaseApi
|
||||||
|
-keep,allowobfuscation @interface com.blankj.utilcode.util.ApiUtils$Api
|
||||||
|
-keep @com.blankj.utilcode.util.ApiUtils$Api class *
|
||||||
|
|
||||||
|
#mmkv
|
||||||
|
-renamesourcefileattribute SourceFile
|
||||||
|
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,EnclosingMethod
|
||||||
|
-keep public class * {
|
||||||
|
public protected *;
|
||||||
|
}
|
||||||
|
# Preserve all .class method names.
|
||||||
|
|
||||||
|
-keepclassmembernames class * {
|
||||||
|
java.lang.Class class$(java.lang.String);
|
||||||
|
java.lang.Class class$(java.lang.String, boolean);
|
||||||
|
}
|
||||||
|
|
||||||
|
# Preserve all native method names and the names of their classes.
|
||||||
|
|
||||||
|
-keepclasseswithmembernames class * {
|
||||||
|
native <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Preserve the special static methods that are required in all enumeration
|
||||||
|
# classes.
|
||||||
|
|
||||||
|
-keepclassmembers class * extends java.lang.Enum {
|
||||||
|
public static **[] values();
|
||||||
|
public static ** valueOf(java.lang.String);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclassmembers class * implements java.io.Serializable {
|
||||||
|
static final long serialVersionUID;
|
||||||
|
static final java.io.ObjectStreamField[] serialPersistentFields;
|
||||||
|
private void writeObject(java.io.ObjectOutputStream);
|
||||||
|
private void readObject(java.io.ObjectInputStream);
|
||||||
|
java.lang.Object writeReplace();
|
||||||
|
java.lang.Object readResolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
# Gson
|
||||||
|
-keep class com.google.gson.** { *; }
|
||||||
|
-keepattributes Signature
|
||||||
|
-keepattributes *Annotation*
|
||||||
|
-keep class sun.misc.Unsafe { *; }
|
||||||
|
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||||
|
-keep class * implements com.google.gson.JsonSerializer
|
||||||
|
-keep class * implements com.google.gson.JsonDeserializer
|
||||||
|
|
||||||
|
# Kotlin相关
|
||||||
|
-keep class kotlin.** { *; }
|
||||||
|
-keep class kotlin.Metadata { *; }
|
||||||
|
-dontwarn kotlin.**
|
||||||
|
-keepclassmembers class **$WhenMappings {
|
||||||
|
<fields>;
|
||||||
|
}
|
||||||
|
-keepclassmembers class kotlin.Metadata {
|
||||||
|
public <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Kotlin协程
|
||||||
|
-keepclassmembernames class kotlinx.** {
|
||||||
|
volatile <fields>;
|
||||||
|
}
|
||||||
|
-keepclassmembers class * {
|
||||||
|
@kotlin.coroutines.jvm.internal.DebugMetadata *;
|
||||||
|
@kotlin.coroutines.jvm.internal.SuspendLambda *;
|
||||||
|
}
|
||||||
|
-keep class kotlinx.coroutines.** { *; }
|
||||||
|
-dontwarn kotlinx.coroutines.**
|
||||||
|
|
||||||
|
# Kotlin反射
|
||||||
|
-keep class kotlin.reflect.** { *; }
|
||||||
|
-dontwarn kotlin.reflect.**
|
||||||
|
|
||||||
|
# 保留Kotlin数据类
|
||||||
|
-keepclassmembers class ** {
|
||||||
|
public ** component*();
|
||||||
|
public ** copy(...);
|
||||||
|
}
|
||||||
|
|
||||||
|
# 保留Kotlin数据类的toString/hashCode/equals方法
|
||||||
|
-keepclassmembers class ** {
|
||||||
|
public java.lang.String toString();
|
||||||
|
public int hashCode();
|
||||||
|
public boolean equals(java.lang.Object);
|
||||||
|
}
|
||||||
|
|
||||||
|
-dontwarn java.lang.invoke.StringConcatFactory
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.za.servicing
|
||||||
|
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
|
|
||||||
|
import org.junit.Test
|
||||||
|
import org.junit.runner.RunWith
|
||||||
|
|
||||||
|
import org.junit.Assert.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instrumented test, which will execute on an Android device.
|
||||||
|
*
|
||||||
|
* See [testing documentation](http://d.android.com/tools/testing).
|
||||||
|
*/
|
||||||
|
@RunWith(AndroidJUnit4::class)
|
||||||
|
class ExampleInstrumentedTest {
|
||||||
|
@Test
|
||||||
|
fun useAppContext() {
|
||||||
|
// Context of the app under test.
|
||||||
|
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||||
|
assertEquals("com.za.servicing.test", appContext.packageName)
|
||||||
|
}
|
||||||
|
}
|
249
servicing/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<uses-sdk tools:overrideLibrary="androidx.camera.view,androidx.camera:camera-camera2,androidx.camera.camera2,androidx.camera.lifecycle,androidx.camera.core" />
|
||||||
|
<permission
|
||||||
|
android:name="${applicationId}.permission.JPUSH_MESSAGE"
|
||||||
|
android:protectionLevel="signature" /> <!-- 位置相关权限 -->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> <!-- 存储相关权限 -->
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
|
tools:ignore="ScopedStorage" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /> <!-- 网络相关权限 -->
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- 蓝牙相关权限 -->
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <!-- 电话相关权限 -->
|
||||||
|
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.CALL_PHONE" />
|
||||||
|
<uses-permission android:name="android.permission.READ_CALL_LOG" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_CALL_LOG" />
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
|
||||||
|
tools:ignore="ProtectedPermissions" /> <!-- 系统相关权限 -->
|
||||||
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||||
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
|
<uses-permission android:name="android.permission.REORDER_TASKS" />
|
||||||
|
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
|
||||||
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.WRITE_SETTINGS"
|
||||||
|
tools:ignore="ProtectedPermissions" />
|
||||||
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <!-- 多媒体相关权限 -->
|
||||||
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
|
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||||
|
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||||
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
|
<uses-permission android:name="android.permission.FLASHLIGHT" /> <!-- 硬件特性声明 -->
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.camera"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.camera.autofocus"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.telephony"
|
||||||
|
android:required="false" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <!-- Intent queries for Android 11+ -->
|
||||||
|
<queries package="${applicationId}">
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.media.action.IMAGE_CAPTURE" />
|
||||||
|
</intent>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.media.action.ACTION_VIDEO_CAPTURE" />
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
|
<queries>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.OPEN_DOCUMENT" />
|
||||||
|
|
||||||
|
<data android:mimeType="image/*" />
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
|
|
||||||
|
<application>
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.main.ServiceLauncherActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:theme="@style/Theme.Dealer">
|
||||||
|
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.main.ServicingMainActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.departure_photo.DeparturePhotoActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.order_confirm.input_money.InputMoneyActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.order_confirm.modify_money.ModifyMoneyActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.new_order.NewOrderActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.order_confirm.real_order_confirm.RealOrderConfirmActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.order_confirm.receive_money.ReceiveMoneyActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.map_search.MapSearchActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
|
||||||
|
<service
|
||||||
|
android:name="com.za.ui.order_report.ReportFloatingManager"
|
||||||
|
android:enabled="true"
|
||||||
|
android:exported="false" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.order_report.HistoryReportActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.order_report.OrderReportActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.h5.CommonH5Activity"
|
||||||
|
android:exported="false"
|
||||||
|
android:launchMode="singleInstance"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.order_give_up.OrderGiveUpActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.in_servicing_setting.OrderRequirementsActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.order_confirm.OrderConfirmActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.destination_photo.DestinationPhotoActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.go_to_destination.GoToDestinationActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.signature.GridPaintActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.operation.InOperationActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:label="@string/title_activity_in_operation"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.camera.ZdCameraXActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="portrait">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.app.lib_name"
|
||||||
|
android:value="" />
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.check_vehicle.CheckVehicleActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.verify.VerifyOrderActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.go_accident.GoAccidentSiteActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
<activity
|
||||||
|
android:name="com.za.ui.servicing.wait_to_start.WaitToStartActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.Dealer" />
|
||||||
|
|
||||||
|
<service
|
||||||
|
android:name="cn.jpush.android.service.PushService"
|
||||||
|
android:enabled="true"
|
||||||
|
android:exported="false">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="cn.jpush.android.intent.REGISTER" />
|
||||||
|
<action android:name="cn.jpush.android.intent.REPORT" />
|
||||||
|
<action android:name="cn.jpush.android.intent.PushService" />
|
||||||
|
<action android:name="cn.jpush.android.intent.PUSH_TIME" />
|
||||||
|
</intent-filter>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<receiver
|
||||||
|
android:name="com.za.service.jpush.JPushReceiver"
|
||||||
|
android:enabled="true"
|
||||||
|
android:exported="true"
|
||||||
|
tools:node="replace">
|
||||||
|
<intent-filter>
|
||||||
|
|
||||||
|
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_ACTION" />
|
||||||
|
<action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED_ACTION" />
|
||||||
|
<action android:name="cn.jpush.android.intent.CONNECTION" />
|
||||||
|
<action android:name="android.intent.action.USER_PRESENT" />
|
||||||
|
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
|
||||||
|
<action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
|
||||||
|
|
||||||
|
<category android:name="${applicationId}" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter android:priority="1000">
|
||||||
|
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" />
|
||||||
|
<!-- Required 显示通知栏 -->
|
||||||
|
<category android:name="${applicationId}" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.USER_PRESENT" />
|
||||||
|
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
|
||||||
|
</intent-filter>
|
||||||
|
<!-- Optional -->
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.PACKAGE_ADDED" />
|
||||||
|
<action android:name="android.intent.action.PACKAGE_REMOVED" />
|
||||||
|
|
||||||
|
<data android:scheme="package" />
|
||||||
|
</intent-filter>
|
||||||
|
</receiver>
|
||||||
|
<receiver
|
||||||
|
android:name="com.za.service.jpush.MyJPushMessageReceiver"
|
||||||
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
|
||||||
|
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_ACTION" />
|
||||||
|
<action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED_ACTION" />
|
||||||
|
<action android:name="cn.jpush.android.intent.CONNECTION" />
|
||||||
|
<action android:name="android.intent.action.USER_PRESENT" />
|
||||||
|
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
|
||||||
|
|
||||||
|
<category android:name="${applicationId}" />
|
||||||
|
</intent-filter>
|
||||||
|
</receiver>
|
||||||
|
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
BIN
servicing/src/main/assets/fonts/song.ttf
Normal file
98
servicing/src/main/java/com/za/base/AppConfig.kt
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
package com.za.base
|
||||||
|
|
||||||
|
import com.za.common.GlobalData
|
||||||
|
|
||||||
|
object AppConfig {
|
||||||
|
var isRelease = false
|
||||||
|
|
||||||
|
// API 相关地址
|
||||||
|
lateinit var BASE_URL: String // API 主地址
|
||||||
|
lateinit var IMG_BASE_URL: String // 图片服务器地址
|
||||||
|
lateinit var Resource_URL: String // 资源服务器地址
|
||||||
|
|
||||||
|
// H5 相关地址
|
||||||
|
lateinit var TRAIN_URL: String // 培训文档地址
|
||||||
|
lateinit var DOCMENT_URL: String // 中道资料地址
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正式环境配置
|
||||||
|
*/
|
||||||
|
fun release() {
|
||||||
|
isRelease = true
|
||||||
|
|
||||||
|
// API 配置
|
||||||
|
BASE_URL = "https://api.sinoassist.com"
|
||||||
|
IMG_BASE_URL = "https://api.sinoassist.com"
|
||||||
|
Resource_URL = "https://www.sinoassist.com/res"
|
||||||
|
|
||||||
|
// H5 配置
|
||||||
|
TRAIN_URL = "https://www.sinoassist.com/h5/supplier/dispatch/diverTrainDocment"
|
||||||
|
DOCMENT_URL = "https://www.sinoassist.com/h5/supplier/dispatch/docmentList"
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核环境配置
|
||||||
|
*/
|
||||||
|
fun review() {
|
||||||
|
isRelease = true
|
||||||
|
|
||||||
|
// API 配置
|
||||||
|
BASE_URL = "http://interface.review.sino-assist.com"
|
||||||
|
IMG_BASE_URL = "http://interface.review.sino-assist.com"
|
||||||
|
Resource_URL = "https://www.sinoassist.com/res"
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CRM1 环境配置
|
||||||
|
*/
|
||||||
|
fun crm1() {
|
||||||
|
isRelease = false
|
||||||
|
|
||||||
|
// API 配置
|
||||||
|
BASE_URL = "https://api1.sino-assist.com"
|
||||||
|
IMG_BASE_URL = "https://api1.sino-assist.com"
|
||||||
|
Resource_URL = "https://crm1.sino-assist.com/res"
|
||||||
|
|
||||||
|
// H5 配置
|
||||||
|
TRAIN_URL = "https://crm1.sino-assist.com/h5/supplier/dispatch/diverTrainDocment"
|
||||||
|
DOCMENT_URL = "https://crm1.sino-assist.com/h5/supplier/dispatch/docmentList"
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CRM2 环境配置
|
||||||
|
*/
|
||||||
|
fun crm2() {
|
||||||
|
isRelease = false
|
||||||
|
|
||||||
|
// API 配置
|
||||||
|
BASE_URL = "https://api2.sino-assist.com"
|
||||||
|
IMG_BASE_URL = "https://api2.sino-assist.com"
|
||||||
|
Resource_URL = "https://crm2.sino-assist.com/res"
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取培训文档完整地址
|
||||||
|
* @param driverId 司机ID
|
||||||
|
* @param keyword 关键字
|
||||||
|
* @return 完整的培训文档URL
|
||||||
|
*/
|
||||||
|
fun getTrainUrl(keyWord: String = ""): String {
|
||||||
|
if (keyWord.isEmpty()) {
|
||||||
|
return TRAIN_URL + "?token=${GlobalData.token}&driverId=${GlobalData.driverInfo?.userId}"
|
||||||
|
}
|
||||||
|
return TRAIN_URL + "?token=${GlobalData.token}&driverId=${GlobalData.driverInfo?.userId}&keyword=$keyWord"
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取中道资料完整地址
|
||||||
|
* @param driverId 司机ID
|
||||||
|
* @param keyword 关键字
|
||||||
|
* @return 完整的中道资料URL
|
||||||
|
*/
|
||||||
|
fun getDocmentUrl(keyWord: String = ""): String {
|
||||||
|
if (keyWord.isEmpty()) {
|
||||||
|
return DOCMENT_URL + "?token=${GlobalData.token}&driverId=${GlobalData.driverInfo?.userId}"
|
||||||
|
}
|
||||||
|
return DOCMENT_URL + "?token=${GlobalData.token}&driverId=${GlobalData.driverInfo?.userId}&keyword=$keyWord"
|
||||||
|
}
|
||||||
|
}
|
63
servicing/src/main/java/com/za/base/BaseActivity.kt
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
package com.za.base
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.activity.compose.setContent
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import com.tencent.smtt.sdk.QbSdk
|
||||||
|
import com.za.base.BaseVm.Companion.showTipDialog
|
||||||
|
import com.za.base.theme.DealerTheme
|
||||||
|
import com.za.base.view.CommonDialog
|
||||||
|
import com.za.base.view.LoadingManager
|
||||||
|
import com.za.common.log.LogUtil
|
||||||
|
|
||||||
|
abstract class BaseActivity : AppCompatActivity() {
|
||||||
|
protected val TAG by lazy { javaClass.simpleName }
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
enableEdgeToEdge()
|
||||||
|
setContent {
|
||||||
|
DealerTheme {
|
||||||
|
ContentView()
|
||||||
|
if (LoadingManager.showLoading.value) {
|
||||||
|
LoadingManager.LoadingView()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (showTipDialog.value != null) {
|
||||||
|
CommonDialog(message = showTipDialog.value
|
||||||
|
?: "",
|
||||||
|
title = "提示",
|
||||||
|
confirmText = "我已了解",
|
||||||
|
confirm = { BaseVm.hideTipDialog() },
|
||||||
|
cancel = { BaseVm.hideTipDialog() },
|
||||||
|
dismiss = { BaseVm.hideTipDialog() },
|
||||||
|
cancelEnable = true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QbSdk.initX5Environment(this.application, object : QbSdk.PreInitCallback {
|
||||||
|
override fun onCoreInitFinished() {
|
||||||
|
// 内核初始化完成,可能为系统内核,也可能为系统内核
|
||||||
|
LogUtil.print("initX5Environment ", "finish")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预初始化结束
|
||||||
|
* 由于X5内核体积较大,需要依赖网络动态下发,所以当内核不存在的时候,默认会回调false,此时将会使用系统内核代替
|
||||||
|
* @param isX5 是否使用X5内核
|
||||||
|
*/
|
||||||
|
override fun onViewInitFinished(isX5: Boolean) {
|
||||||
|
LogUtil.print("onViewInitFinished ", "isX5=$isX5")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
abstract fun ContentView()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
27
servicing/src/main/java/com/za/base/BaseVm.kt
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
package com.za.base
|
||||||
|
|
||||||
|
import androidx.compose.runtime.mutableStateOf
|
||||||
|
import androidx.lifecycle.ViewModel
|
||||||
|
|
||||||
|
abstract class BaseVm<T, U> : ViewModel() {
|
||||||
|
val tag: String = javaClass.simpleName
|
||||||
|
abstract fun updateState(uiState: U)
|
||||||
|
abstract fun dispatch(action: T)
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
val showTipDialog = mutableStateOf<String?>(null)//提示框
|
||||||
|
fun showTipDialog(msg: String) {
|
||||||
|
showTipDialog.value = msg
|
||||||
|
}
|
||||||
|
|
||||||
|
fun hideTipDialog() {
|
||||||
|
showTipDialog.value = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sealed class LoadState {
|
||||||
|
data object Init : LoadState()
|
||||||
|
data object Success : LoadState()
|
||||||
|
data object Failed : LoadState()
|
||||||
|
}
|
45
servicing/src/main/java/com/za/base/Const.kt
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
package com.za.base
|
||||||
|
|
||||||
|
object Const {
|
||||||
|
const val Image_Max_length = 1024 * 400L
|
||||||
|
const val faceFileName = "zd_com.dear"
|
||||||
|
const val NetWorkException = 999
|
||||||
|
const val PhotoNormalPath =
|
||||||
|
"http://file-gk.sinoassist.com:38888/group1/M00/98/94/wKgDd2Uib0OAN0glAAAMOeWcU94810.png?date=2023-10-08"
|
||||||
|
|
||||||
|
const val DoubleClickTime = 3000
|
||||||
|
|
||||||
|
|
||||||
|
const val driverSighName : String = "driver_sign.jpg"
|
||||||
|
|
||||||
|
|
||||||
|
//通用的照片水印模板 code
|
||||||
|
const val NormalWaterMarker = "-1"
|
||||||
|
|
||||||
|
const val CHILD_COMPANY = 1 //子公司
|
||||||
|
|
||||||
|
const val SMALL_REPAIR = 1 // 小修
|
||||||
|
const val TUO_CHE = 2
|
||||||
|
|
||||||
|
object CarState {
|
||||||
|
const val FREE = 0 //空闲
|
||||||
|
const val BUSY = 1 //忙碌
|
||||||
|
const val ZHI_MANG = 2 //置忙
|
||||||
|
const val REPAIRING = 8 //维修中
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
object PhotoType {
|
||||||
|
const val InServicing = 1 //服务中照片
|
||||||
|
const val HistoryOrder = 2 //历史中照片
|
||||||
|
const val ChangeBattery = 3 //更换电瓶照片
|
||||||
|
const val NormalImage = 4 //普通的照片处理
|
||||||
|
}
|
||||||
|
|
||||||
|
object InServiceSettingType {
|
||||||
|
const val ON_SITE_PHOTO = 0 //现场照片
|
||||||
|
const val ORDER_REQUIREMENTS = 1 //案件要求
|
||||||
|
const val ORDER_DETAIL = 2 //案件详情
|
||||||
|
const val ORDER_GIVE_UP = 3 //订单放弃
|
||||||
|
}
|
||||||
|
}
|
123
servicing/src/main/java/com/za/base/IServicingVm.kt
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
package com.za.base
|
||||||
|
|
||||||
|
import com.za.bean.db.ele.EleWorkOrderBean
|
||||||
|
import com.za.bean.db.order.OrderInfo
|
||||||
|
import com.za.bean.db.order.PhotoTemplateInfo
|
||||||
|
import com.za.common.GlobalData
|
||||||
|
import com.za.common.log.LogUtil
|
||||||
|
import com.za.ext.getTaskNode
|
||||||
|
import com.za.ext.toJson
|
||||||
|
import com.za.net.CommonMethod
|
||||||
|
import com.za.offline.OfflineManager
|
||||||
|
import com.za.offline.OfflineUpdateTaskBean
|
||||||
|
import com.za.room.RoomHelper
|
||||||
|
|
||||||
|
abstract class IServicingVm<T, U> : BaseVm<T, U>() {
|
||||||
|
|
||||||
|
fun getCurrentOrder() : OrderInfo? =
|
||||||
|
GlobalData.currentOrder ?: RoomHelper.db?.orderDao()?.getCurrentOrder()
|
||||||
|
|
||||||
|
fun updateOrder(orderInfo : OrderInfo?) {
|
||||||
|
orderInfo?.let { order ->
|
||||||
|
if (order.isCurrent == true) {
|
||||||
|
GlobalData.currentOrder = order
|
||||||
|
}
|
||||||
|
RoomHelper.db?.orderDao()?.update(order)
|
||||||
|
LogUtil.print("$tag updateOrder", order.toJson() ?: "")
|
||||||
|
} ?: LogUtil.print("$tag updateOrder", "order is null")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用 Flow 重写获取照片模板的方法
|
||||||
|
//当前订单的照片模版
|
||||||
|
fun getCurrentPhotoTemplate(success : (List<PhotoTemplateInfo>?) -> Unit,
|
||||||
|
failure : (String?) -> Unit = {}) {
|
||||||
|
val photoTemplateList = RoomHelper.db?.photoTemplateDao()
|
||||||
|
?.getOrderPhotoTemplateFromTaskNode(getCurrentOrder()?.getTaskNode() ?: 0,
|
||||||
|
getCurrentOrder()?.userOrderId ?: 0)
|
||||||
|
if (photoTemplateList.isNullOrEmpty()) {
|
||||||
|
CommonMethod.fetchPhotoTemplate(GlobalData.currentOrder, success = {
|
||||||
|
val data = RoomHelper.db?.photoTemplateDao()?.getOrderPhotoTemplateFromTaskNode(
|
||||||
|
getCurrentOrder()?.getTaskNode() ?: 0,
|
||||||
|
getCurrentOrder()?.userOrderId ?: 0)
|
||||||
|
success(data)
|
||||||
|
}, failed = {
|
||||||
|
failure(it)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
success(photoTemplateList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用 Flow 重写获取照片模板的方法
|
||||||
|
//获取出发前照片模版
|
||||||
|
fun getDeparturePhotoTemplate(success : (List<PhotoTemplateInfo>?) -> Unit,
|
||||||
|
failure : (String?) -> Unit = {}) {
|
||||||
|
val photoTemplateList = RoomHelper.db?.photoTemplateDao()
|
||||||
|
?.getOrderPhotoTemplateFromTaskNode(10100, getCurrentOrder()?.userOrderId ?: 0)
|
||||||
|
if (photoTemplateList.isNullOrEmpty()) {
|
||||||
|
CommonMethod.fetchPhotoTemplate(GlobalData.currentOrder, success = {
|
||||||
|
val data = RoomHelper.db?.photoTemplateDao()
|
||||||
|
?.getOrderPhotoTemplateFromTaskNode(10100, getCurrentOrder()?.userOrderId ?: 0)
|
||||||
|
success(data)
|
||||||
|
}, failed = {
|
||||||
|
failure(it)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
success(photoTemplateList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun checkIsGoDeparturePhoto() : Boolean {
|
||||||
|
val list = RoomHelper.db?.photoTemplateDao()
|
||||||
|
?.getOrderPhotoTemplateFromTaskNode(10100, getCurrentOrder()?.userOrderId ?: 0)
|
||||||
|
return ! list.isNullOrEmpty()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateCurrentEleWorkOrder(eleWorkOrderBean : EleWorkOrderBean) {
|
||||||
|
RoomHelper.db?.eleWorkOrderDao()?.update(eleWorkOrderBean)
|
||||||
|
|
||||||
|
getCurrentOrder()?.let { order ->
|
||||||
|
val updatedOrder = order.copy(electronOrderState = eleWorkOrderBean.orderWorkStatus,
|
||||||
|
taskSuccessStatus = if (eleWorkOrderBean.isSuccess == 1) 0 else 1)
|
||||||
|
updateOrder(updatedOrder)
|
||||||
|
}
|
||||||
|
|
||||||
|
LogUtil.print("$tag updateCurrentEleWorkOrder", eleWorkOrderBean.toJson() ?: "")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getCurrentOrderOfflineTask() : List<OfflineUpdateTaskBean>? {
|
||||||
|
return getCurrentOrder()?.taskId?.let { taskId ->
|
||||||
|
RoomHelper.db?.offlineTaskDao()?.getOfflineTaskFromTaskId(taskId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun clearCurrentOrderOfflineTask() {
|
||||||
|
getCurrentOrder()?.taskId?.let { taskId ->
|
||||||
|
RoomHelper.db?.offlineTaskDao()?.deleteOfflineTaskFromTaskId(taskId)
|
||||||
|
LogUtil.print("$tag clearCurrentOrderOfflineTask", "taskId==$taskId")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getCurrentOrderEleWorkOrder() : EleWorkOrderBean? {
|
||||||
|
return RoomHelper.db?.eleWorkOrderDao()?.getEleWorkOrder(getCurrentOrder()?.taskId ?: 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun insertOfflineTask(offlineUpdateTaskBean : OfflineUpdateTaskBean) {
|
||||||
|
RoomHelper.db?.offlineTaskDao()?.let { offlineDao ->
|
||||||
|
val primaryId = offlineUpdateTaskBean.primaryId ?: 0
|
||||||
|
val existingTask = offlineDao.getOfflineTaskFromPrimaryId(primaryId)
|
||||||
|
|
||||||
|
if (existingTask != null) {
|
||||||
|
offlineDao.update(offlineUpdateTaskBean)
|
||||||
|
} else {
|
||||||
|
offlineDao.insertOfflineTask(offlineUpdateTaskBean)
|
||||||
|
}
|
||||||
|
|
||||||
|
offlineUpdateTaskBean.taskId?.let { taskId ->
|
||||||
|
OfflineManager.start(taskId)
|
||||||
|
}
|
||||||
|
|
||||||
|
LogUtil.print("$tag insertOfflineTask", offlineUpdateTaskBean.toJson() ?: "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
37
servicing/src/main/java/com/za/base/theme/Color.kt
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
package com.za.base.theme
|
||||||
|
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
|
val Purple80 = Color(0xFFD0BCFF)
|
||||||
|
val PurpleGrey80 = Color(0xFFCCC2DC)
|
||||||
|
val Pink80 = Color(0xFFEFB8C8)
|
||||||
|
|
||||||
|
val Purple40 = Color(0xFF6650a4)
|
||||||
|
val PurpleGrey40 = Color(0xFF625b71)
|
||||||
|
val Pink40 = Color(0xFF7D5260)
|
||||||
|
|
||||||
|
val bgColor = Color(0xFFF4F5F7)
|
||||||
|
|
||||||
|
val MainBottomSelectColor = Color(0xFF3D4B7C)
|
||||||
|
val MainBottomUnSelectColor = Color(0xFFA9AEBD)
|
||||||
|
|
||||||
|
//标题颜色
|
||||||
|
val headBgColor = Color(0xFF3D4B7C)
|
||||||
|
|
||||||
|
//标题颜色
|
||||||
|
val headTitleColor = Color(0xB3FFFFFF)
|
||||||
|
|
||||||
|
//按钮背景颜色
|
||||||
|
val buttonBgColor = Color(0xFF3D4B7C)
|
||||||
|
|
||||||
|
val white5 = Color(0x0DFFFFFF)
|
||||||
|
val white95 = Color(0xF2FFFFFF)
|
||||||
|
val white80 = Color(0xCCFFFFFF)
|
||||||
|
|
||||||
|
val black5 = Color(0x0D000000)
|
||||||
|
val black10 = Color(0x1A000000)
|
||||||
|
val black20 = Color(0x33000000)
|
||||||
|
val black30 = Color(0x4D000000)
|
||||||
|
val black50 = Color(0x80000000)
|
||||||
|
val black65 = Color(0xA6000000)
|
||||||
|
val black90 = Color(0xE6000000)
|
7
servicing/src/main/java/com/za/base/theme/Padding.kt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package com.za.base.theme
|
||||||
|
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import com.blankj.utilcode.util.BarUtils
|
||||||
|
import com.blankj.utilcode.util.ConvertUtils
|
||||||
|
|
||||||
|
val headPadding = ConvertUtils.px2dp(BarUtils.getStatusBarHeight().toFloat()/2).dp
|
80
servicing/src/main/java/com/za/base/theme/Theme.kt
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
package com.za.base.theme
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.compose.foundation.isSystemInDarkTheme
|
||||||
|
import androidx.compose.material.ripple.RippleAlpha
|
||||||
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
|
import androidx.compose.material3.LocalRippleConfiguration
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.ProvideTextStyle
|
||||||
|
import androidx.compose.material3.RippleConfiguration
|
||||||
|
import androidx.compose.material3.lightColorScheme
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
|
import androidx.compose.runtime.SideEffect
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.graphics.toArgb
|
||||||
|
import androidx.compose.ui.platform.LocalView
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import androidx.core.view.updateLayoutParams
|
||||||
|
|
||||||
|
private val LightColorScheme = lightColorScheme(
|
||||||
|
primary = Purple40,
|
||||||
|
secondary = PurpleGrey40,
|
||||||
|
tertiary = Pink40,
|
||||||
|
background = bgColor,
|
||||||
|
onBackground = bgColor,
|
||||||
|
)
|
||||||
|
|
||||||
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
|
@Composable
|
||||||
|
fun DealerTheme(
|
||||||
|
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||||
|
content: @Composable () -> Unit
|
||||||
|
) {
|
||||||
|
val colorScheme = when {
|
||||||
|
darkTheme -> LightColorScheme
|
||||||
|
else -> LightColorScheme
|
||||||
|
}
|
||||||
|
val view = LocalView.current
|
||||||
|
if (!view.isInEditMode) {
|
||||||
|
SideEffect {
|
||||||
|
val window = (view.context as Activity).window
|
||||||
|
window.statusBarColor = Color.Transparent.toArgb()
|
||||||
|
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme
|
||||||
|
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(window.decorView.findViewById(android.R.id.content)) { view, windowInsets ->
|
||||||
|
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
|
view as ViewGroup
|
||||||
|
view.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||||
|
leftMargin = insets.left
|
||||||
|
bottomMargin = insets.bottom
|
||||||
|
rightMargin = insets.right
|
||||||
|
topMargin = 0
|
||||||
|
}
|
||||||
|
WindowInsetsCompat.CONSUMED
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MaterialTheme(colorScheme = colorScheme) {
|
||||||
|
CompositionLocalProvider(LocalRippleConfiguration provides RippleConfiguration(rippleAlpha = RippleAlpha(0f, 0f, 0f, 0f))) {
|
||||||
|
ProvideTextStyle(value = MaterialTheme.typography.bodyLarge, content = content)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//object NoRippleTheme : RippleTheme {
|
||||||
|
//
|
||||||
|
// @Composable
|
||||||
|
// override fun defaultColor(): Color {
|
||||||
|
// return Color.Unspecified
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Composable
|
||||||
|
// override fun rippleAlpha(): RippleAlpha {
|
||||||
|
// return RippleAlpha(0f, 0f, 0f, 0f)
|
||||||
|
// }
|
||||||
|
//}
|
33
servicing/src/main/java/com/za/base/theme/Type.kt
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package com.za.base.theme
|
||||||
|
import androidx.compose.material3.Typography
|
||||||
|
import androidx.compose.ui.text.TextStyle
|
||||||
|
import androidx.compose.ui.text.font.FontFamily
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
|
||||||
|
// Set of Material typography styles to start with
|
||||||
|
val Typography = Typography(
|
||||||
|
bodyLarge = TextStyle(
|
||||||
|
fontFamily = FontFamily.Default,
|
||||||
|
fontWeight = FontWeight.Normal,
|
||||||
|
fontSize = 16.sp,
|
||||||
|
lineHeight = 24.sp,
|
||||||
|
letterSpacing = 0.5.sp
|
||||||
|
)
|
||||||
|
/* Other default text styles to override
|
||||||
|
titleLarge = TextStyle(
|
||||||
|
fontFamily = FontFamily.Default,
|
||||||
|
fontWeight = FontWeight.Normal,
|
||||||
|
fontSize = 22.sp,
|
||||||
|
lineHeight = 28.sp,
|
||||||
|
letterSpacing = 0.sp
|
||||||
|
),
|
||||||
|
labelSmall = TextStyle(
|
||||||
|
fontFamily = FontFamily.Default,
|
||||||
|
fontWeight = FontWeight.Medium,
|
||||||
|
fontSize = 11.sp,
|
||||||
|
lineHeight = 16.sp,
|
||||||
|
letterSpacing = 0.5.sp
|
||||||
|
)
|
||||||
|
*/
|
||||||
|
)
|
33
servicing/src/main/java/com/za/base/view/button.kt
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package com.za.base.view
|
||||||
|
|
||||||
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.clickable
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Alignment
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
import com.za.base.theme.buttonBgColor
|
||||||
|
import com.za.base.theme.headBgColor
|
||||||
|
import com.za.ext.noDoubleClick
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun CommonButton(text: String, onClick: () -> Unit) {
|
||||||
|
Box(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.noDoubleClick { onClick() }
|
||||||
|
.padding(horizontal = 60.dp, vertical = 10.dp)
|
||||||
|
.background(color = buttonBgColor, shape = RoundedCornerShape(4.dp))
|
||||||
|
.padding(vertical = 12.dp), contentAlignment = Alignment.Center) {
|
||||||
|
Text(text = text, color = Color.White,
|
||||||
|
fontSize = 15.sp,
|
||||||
|
fontWeight = FontWeight.Medium)
|
||||||
|
}
|
||||||
|
}
|
220
servicing/src/main/java/com/za/base/view/dialog.kt
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
package com.za.base.view
|
||||||
|
|
||||||
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.clickable
|
||||||
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.foundation.layout.Spacer
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.width
|
||||||
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Alignment
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Brush
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.layout.ContentScale
|
||||||
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
import androidx.compose.ui.window.Dialog
|
||||||
|
import androidx.compose.ui.window.DialogProperties
|
||||||
|
import coil.compose.AsyncImage
|
||||||
|
import com.za.base.theme.black90
|
||||||
|
import com.za.common.util.MapUtil
|
||||||
|
import com.za.servicing.R
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun CommonDialog(
|
||||||
|
title: String? = null,
|
||||||
|
confirmText: String = "确定",
|
||||||
|
confirm: () -> Unit,
|
||||||
|
content: @Composable () -> Unit = {},
|
||||||
|
message: String? = null,
|
||||||
|
cancelText: String? = "取消",
|
||||||
|
cancelEnable: Boolean = true,
|
||||||
|
cancel: () -> Unit = {},
|
||||||
|
dismiss: () -> Unit
|
||||||
|
) {
|
||||||
|
Dialog(onDismissRequest = { dismiss() },
|
||||||
|
properties = DialogProperties(
|
||||||
|
dismissOnBackPress = cancelEnable,
|
||||||
|
dismissOnClickOutside = cancelEnable)) {
|
||||||
|
Box(modifier = Modifier
|
||||||
|
.background(color = Color.White, shape = RoundedCornerShape(13.dp))) {
|
||||||
|
Spacer(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.height(105.dp)
|
||||||
|
.background(brush = Brush.verticalGradient(colors = arrayListOf(Color(0xFFDAE8FF),
|
||||||
|
Color(0x00DAE8FF))),
|
||||||
|
shape = RoundedCornerShape(topStart = 13.dp, topEnd = 13.dp)))
|
||||||
|
Column(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(horizontal = 30.dp),
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
|
verticalArrangement = Arrangement.Center) {
|
||||||
|
Spacer(modifier = Modifier.height(35.dp))
|
||||||
|
Text(text = "$title", fontSize = 16.sp, fontWeight = FontWeight.Medium, color = Color(0xFF2A4054))
|
||||||
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
|
if (message == null) {
|
||||||
|
content()
|
||||||
|
} else {
|
||||||
|
Text(text = message, fontSize = 14.sp, color = Color(0xFF536475))
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
|
|
||||||
|
Box(modifier = Modifier
|
||||||
|
.width(202.dp)
|
||||||
|
.clickable { confirm() }
|
||||||
|
.background(color = Color(0xFF3A58B1), shape = RoundedCornerShape(23.dp))
|
||||||
|
.padding(vertical = 12.dp), contentAlignment = Alignment.Center) {
|
||||||
|
Text(text = confirmText, color = Color.White, fontSize = 15.sp, fontWeight = FontWeight.Medium)
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(20.dp))
|
||||||
|
|
||||||
|
if (!cancelText.isNullOrBlank() && cancelEnable) {
|
||||||
|
Box(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.clickable { cancel() }, contentAlignment = Alignment.Center) {
|
||||||
|
Text(text = cancelText, fontSize = 15.sp, fontWeight = FontWeight.Medium, color = black90)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(10.dp))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun ReTakePhotoDialog(
|
||||||
|
title: String? = null,
|
||||||
|
confirm: () -> Unit,
|
||||||
|
againSubmit: () -> Unit,
|
||||||
|
path: String? = null,
|
||||||
|
showAgain: Boolean = false,
|
||||||
|
cancel: () -> Unit = {},
|
||||||
|
dismiss: () -> Unit
|
||||||
|
) {
|
||||||
|
Dialog(onDismissRequest = { dismiss() },
|
||||||
|
properties = DialogProperties(dismissOnBackPress = true, dismissOnClickOutside = true)) {
|
||||||
|
Box(modifier = Modifier
|
||||||
|
.background(color = Color.White, shape = RoundedCornerShape(13.dp))) {
|
||||||
|
Spacer(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.height(105.dp)
|
||||||
|
.background(brush = Brush.verticalGradient(colors = arrayListOf(Color(0xFFDAE8FF),
|
||||||
|
Color(0x00DAE8FF))),
|
||||||
|
shape = RoundedCornerShape(topStart = 13.dp, topEnd = 13.dp)))
|
||||||
|
Column(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(horizontal = 30.dp),
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
|
verticalArrangement = Arrangement.Center) {
|
||||||
|
Spacer(modifier = Modifier.height(35.dp))
|
||||||
|
Text(text = "$title", fontSize = 16.sp, fontWeight = FontWeight.Medium, color = Color(0xFF2A4054))
|
||||||
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
|
Box(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.height(300.dp), contentAlignment = Alignment.Center) {
|
||||||
|
AsyncImage(model = path,
|
||||||
|
contentDescription = "",
|
||||||
|
modifier = Modifier.fillMaxSize(),
|
||||||
|
contentScale = ContentScale.FillWidth)
|
||||||
|
}
|
||||||
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
|
|
||||||
|
Box(modifier = Modifier
|
||||||
|
.width(202.dp)
|
||||||
|
.clickable { confirm() }
|
||||||
|
.background(color = Color(0xFF3A58B1), shape = RoundedCornerShape(23.dp))
|
||||||
|
.padding(vertical = 12.dp), contentAlignment = Alignment.Center) {
|
||||||
|
Text(text = "重拍", color = Color.White, fontSize = 15.sp, fontWeight = FontWeight.Medium)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (showAgain) {
|
||||||
|
Spacer(modifier = Modifier.height(20.dp))
|
||||||
|
|
||||||
|
Box(modifier = Modifier
|
||||||
|
.width(202.dp)
|
||||||
|
.clickable { againSubmit() }
|
||||||
|
.background(color = Color.Red, shape = RoundedCornerShape(23.dp))
|
||||||
|
.padding(vertical = 12.dp), contentAlignment = Alignment.Center) {
|
||||||
|
Text(text = "再次上传", color = Color.White, fontSize = 15.sp, fontWeight = FontWeight.Medium)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(20.dp))
|
||||||
|
|
||||||
|
Box(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.clickable { cancel() }, contentAlignment = Alignment.Center) {
|
||||||
|
Text(text = "取消", fontSize = 15.sp, fontWeight = FontWeight.Medium, color = black90)
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(10.dp))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun ChoiceMapDialog(dismiss: () -> Unit,
|
||||||
|
lat: Double?,
|
||||||
|
lng: Double?,
|
||||||
|
address: String?) {
|
||||||
|
val context = LocalContext.current
|
||||||
|
Dialog(onDismissRequest = { dismiss() }) {
|
||||||
|
Row(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.height(180.dp)
|
||||||
|
.background(color = Color.White, shape = RoundedCornerShape(8.dp))
|
||||||
|
.padding(10.dp), verticalAlignment = Alignment.CenterVertically,
|
||||||
|
horizontalArrangement = Arrangement.SpaceAround) {
|
||||||
|
if (MapUtil.isGdMapInstalled(context)) {
|
||||||
|
Column(modifier = Modifier.clickable {
|
||||||
|
MapUtil.startNavigationGd(context, lat = lat, lng = lng, address = address)
|
||||||
|
dismiss()
|
||||||
|
}) {
|
||||||
|
AsyncImage(model = R.drawable.sv_amap_icon, contentDescription = "", modifier = Modifier.size(60.dp))
|
||||||
|
Spacer(modifier = Modifier.height(5.dp))
|
||||||
|
Text(text = "高德地图", color = Color.Black, fontWeight = FontWeight.Medium, fontSize = 14.sp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (MapUtil.isBaiduMapInstalled(context)) {
|
||||||
|
Column(modifier = Modifier.clickable {
|
||||||
|
MapUtil.startNavigationBd(context, lat = lat, lng = lng, address = address)
|
||||||
|
dismiss()
|
||||||
|
}) {
|
||||||
|
AsyncImage(model = R.drawable.sv_baidu_icon, contentDescription = "", modifier = Modifier.size(60.dp))
|
||||||
|
Spacer(modifier = Modifier.height(5.dp))
|
||||||
|
Text(text = "百度地图", color = Color.Black, fontWeight = FontWeight.Medium, fontSize = 14.sp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (MapUtil.isTencentInstalled(context)) {
|
||||||
|
Column(modifier = Modifier.clickable {
|
||||||
|
MapUtil.startNavigationTencent(context, lat = lat, lng = lng, address = address)
|
||||||
|
dismiss()
|
||||||
|
}) {
|
||||||
|
AsyncImage(model = R.drawable.sv_tencent_icon, contentDescription = "", modifier = Modifier.size(60.dp))
|
||||||
|
Spacer(modifier = Modifier.height(5.dp))
|
||||||
|
Text(text = "腾讯地图", color = Color.Black, fontWeight = FontWeight.Medium, fontSize = 14.sp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
90
servicing/src/main/java/com/za/base/view/emptyView.kt
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
package com.za.base.view
|
||||||
|
|
||||||
|
import androidx.compose.foundation.clickable
|
||||||
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.Spacer
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Alignment
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
import coil.compose.AsyncImage
|
||||||
|
import com.za.servicing.R
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun EmptyView(
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
|
message: String = "暂无数据",
|
||||||
|
imageSize: Pair<Int, Int> = Pair(118, 143),
|
||||||
|
imageRes: Int = R.drawable.sv_emty_data
|
||||||
|
) {
|
||||||
|
Column(
|
||||||
|
modifier = modifier.fillMaxSize(),
|
||||||
|
verticalArrangement = Arrangement.Center,
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
|
) {
|
||||||
|
AsyncImage(
|
||||||
|
model = imageRes,
|
||||||
|
contentDescription = message,
|
||||||
|
modifier = Modifier.size(imageSize.first.dp, imageSize.second.dp)
|
||||||
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(12.dp))
|
||||||
|
|
||||||
|
Text(
|
||||||
|
text = message,
|
||||||
|
color = Color.Gray,
|
||||||
|
fontSize = 14.sp,
|
||||||
|
textAlign = TextAlign.Center
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun LoadError(
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
|
message: String = "加载出错",
|
||||||
|
imageSize: Pair<Int, Int> = Pair(118, 143),
|
||||||
|
onRetry: (() -> Unit)? = null
|
||||||
|
) {
|
||||||
|
Column(
|
||||||
|
modifier = modifier.fillMaxSize(),
|
||||||
|
verticalArrangement = Arrangement.Center,
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
|
) {
|
||||||
|
AsyncImage(
|
||||||
|
model = R.drawable.sv_load_error,
|
||||||
|
contentDescription = message,
|
||||||
|
modifier = Modifier.size(imageSize.first.dp, imageSize.second.dp)
|
||||||
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(12.dp))
|
||||||
|
|
||||||
|
Text(
|
||||||
|
text = message,
|
||||||
|
color = Color.Gray,
|
||||||
|
fontSize = 14.sp,
|
||||||
|
textAlign = TextAlign.Center
|
||||||
|
)
|
||||||
|
|
||||||
|
if (onRetry != null) {
|
||||||
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
|
|
||||||
|
Text(
|
||||||
|
text = "点击重试",
|
||||||
|
color = Color(0xFF1BA8F7),
|
||||||
|
fontSize = 14.sp,
|
||||||
|
modifier = Modifier
|
||||||
|
.align(Alignment.CenterHorizontally)
|
||||||
|
.clickable { onRetry() }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
54
servicing/src/main/java/com/za/base/view/head.kt
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
package com.za.base.view
|
||||||
|
|
||||||
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.clickable
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.systemBarsPadding
|
||||||
|
import androidx.compose.material3.CenterAlignedTopAppBar
|
||||||
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.material3.TopAppBarDefaults
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
import coil.compose.AsyncImage
|
||||||
|
import com.za.base.theme.headBgColor
|
||||||
|
import com.za.base.theme.headPadding
|
||||||
|
import com.za.servicing.R
|
||||||
|
|
||||||
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
|
@Composable
|
||||||
|
fun HeadView(title: String, onBack: () -> Unit = {}, isCanBack: Boolean = true, action: @Composable () -> Unit = {}) {
|
||||||
|
CenterAlignedTopAppBar(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.background(color = headBgColor)
|
||||||
|
.systemBarsPadding()
|
||||||
|
.padding(top = 20.dp),
|
||||||
|
colors = TopAppBarDefaults.centerAlignedTopAppBarColors().copy(containerColor = headBgColor, titleContentColor = Color.White),
|
||||||
|
title = { Text(text = title, fontSize = 15.sp, fontWeight = FontWeight.Medium) },
|
||||||
|
navigationIcon = {
|
||||||
|
if (isCanBack) {
|
||||||
|
AsyncImage(model = R.drawable.sv_back, contentDescription = "", modifier = Modifier
|
||||||
|
.size(40.dp)
|
||||||
|
.clickable { onBack() }
|
||||||
|
.padding(10.dp))
|
||||||
|
}
|
||||||
|
}, actions = { action() })
|
||||||
|
}
|
||||||
|
|
||||||
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
|
@Composable
|
||||||
|
fun HeadViewNotBack(title: String) {
|
||||||
|
CenterAlignedTopAppBar(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.background(color = headBgColor)
|
||||||
|
.padding(top = headPadding),
|
||||||
|
colors = TopAppBarDefaults.centerAlignedTopAppBarColors().copy(containerColor = headBgColor, titleContentColor = Color.White),
|
||||||
|
title = { Text(text = title, fontSize = 15.sp, fontWeight = FontWeight.Medium) },
|
||||||
|
navigationIcon = {})
|
||||||
|
}
|
46
servicing/src/main/java/com/za/base/view/loading.kt
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
package com.za.base.view
|
||||||
|
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.mutableStateOf
|
||||||
|
import androidx.compose.ui.Alignment
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import coil.compose.AsyncImage
|
||||||
|
import coil.decode.GifDecoder
|
||||||
|
import coil.request.ImageRequest
|
||||||
|
import com.za.servicing.R
|
||||||
|
|
||||||
|
|
||||||
|
object LoadingManager {
|
||||||
|
val showLoading = mutableStateOf(false)
|
||||||
|
|
||||||
|
fun showLoading() {
|
||||||
|
showLoading.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
fun hideLoading() {
|
||||||
|
showLoading.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun LoadingView() {
|
||||||
|
Box(contentAlignment = Alignment.Center, modifier = Modifier.fillMaxSize()) {
|
||||||
|
AsyncImage(model = ImageRequest.Builder(LocalContext.current)
|
||||||
|
.data(R.drawable.gif_loading)
|
||||||
|
.decoderFactory(GifDecoder.Factory())
|
||||||
|
.build(), contentDescription = "加载中", modifier = Modifier
|
||||||
|
.size(70.dp)
|
||||||
|
.align(Alignment.Center))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class LoadingState {
|
||||||
|
data object Loading : LoadingState()
|
||||||
|
data object LoadingFailed : LoadingState()
|
||||||
|
data object LoadingSuccess : LoadingState()
|
||||||
|
}
|
24
servicing/src/main/java/com/za/bean/BaseResponse.kt
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package com.za.bean
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by DoggieX on 2017/7/26.
|
||||||
|
*/
|
||||||
|
class BaseResponse<T> {
|
||||||
|
var code: Int = 0
|
||||||
|
var msg: String? = null
|
||||||
|
var message: String? = null
|
||||||
|
var result: T? = null
|
||||||
|
|
||||||
|
val isOk: Boolean
|
||||||
|
get() = code == 0 || code == 200
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "BaseResponse{" +
|
||||||
|
"code=" + code +
|
||||||
|
", msg='" + msg + '\'' +
|
||||||
|
", message='" + message + '\'' +
|
||||||
|
", result=" + result +
|
||||||
|
'}'
|
||||||
|
}
|
||||||
|
}
|
216
servicing/src/main/java/com/za/bean/DriverInfo.kt
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
package com.za.bean
|
||||||
|
|
||||||
|
import android.os.Parcel
|
||||||
|
import android.os.Parcelable
|
||||||
|
|
||||||
|
data class DriverInfo(
|
||||||
|
var userPortrait : String? = "", //用户头像
|
||||||
|
var token : String? = null, //
|
||||||
|
var rongyunToken : String? = null,
|
||||||
|
var logTime : String? = null,
|
||||||
|
var userId : Int? = null, //用户id
|
||||||
|
var userName : String? = null, //用户姓名
|
||||||
|
var userPhone : String? = null, //用户手机号
|
||||||
|
var callphone : String? = null,
|
||||||
|
var supplierId : String? = null, //经销商id
|
||||||
|
var supplierName : String? = null, //经销商名称
|
||||||
|
var supplierType : Int? = null, //经销商类型 1子公司 2供应商
|
||||||
|
var loginLogId : Int? = null,
|
||||||
|
var serviceList : List<String>? = null, //车辆服务列表
|
||||||
|
var assistUserCode : String? = null,
|
||||||
|
val authStatus : Int? = null, // 0 未认证 1 已认证
|
||||||
|
) : Parcelable {
|
||||||
|
constructor(parcel : Parcel) : this(parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.createStringArrayList(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun writeToParcel(parcel : Parcel, flags : Int) {
|
||||||
|
parcel.writeString(userPortrait)
|
||||||
|
parcel.writeString(token)
|
||||||
|
parcel.writeString(rongyunToken)
|
||||||
|
parcel.writeString(logTime)
|
||||||
|
parcel.writeValue(userId)
|
||||||
|
parcel.writeString(userName)
|
||||||
|
parcel.writeString(userPhone)
|
||||||
|
parcel.writeString(callphone)
|
||||||
|
parcel.writeString(supplierId)
|
||||||
|
parcel.writeString(supplierName)
|
||||||
|
parcel.writeValue(supplierType)
|
||||||
|
parcel.writeValue(loginLogId)
|
||||||
|
parcel.writeStringList(serviceList)
|
||||||
|
parcel.writeString(assistUserCode)
|
||||||
|
parcel.writeValue(authStatus)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun describeContents() : Int {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object CREATOR : Parcelable.Creator<DriverInfo> {
|
||||||
|
override fun createFromParcel(parcel : Parcel) : DriverInfo {
|
||||||
|
return DriverInfo(parcel)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun newArray(size : Int) : Array<DriverInfo?> {
|
||||||
|
return arrayOfNulls(size)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
data class GeneralInfo(
|
||||||
|
var userId : Int? = null, //用户id
|
||||||
|
val userName : String? = null, //用户名
|
||||||
|
val userPhone : String? = null,
|
||||||
|
val userPortrait : String? = null, //大头照
|
||||||
|
val vehicleId : Int? = null,
|
||||||
|
val vehicleName : String? = null,
|
||||||
|
val vehicleState : Int? = null, //车辆状态 0 空闲 1 忙碌
|
||||||
|
val supplierId : Int? = null,
|
||||||
|
val supplierName : String? = null,
|
||||||
|
val supplierType : Int?,
|
||||||
|
val plateNumber : String? = null, //车牌号
|
||||||
|
val serviceList : List<String>? = null,
|
||||||
|
val deviceId : String? = null,
|
||||||
|
val authStatus : Int? = null, // 0 未认证 1 已认证
|
||||||
|
)
|
||||||
|
|
||||||
|
data class DriverIdentityAuthWebRequest(val vehicleId : Int? = null,
|
||||||
|
val driverId : Int? = null,
|
||||||
|
val redirectUrl : String = "https://www.sinoassist.com?esignAppScheme=zd_sinoassist://demo/realBack")
|
||||||
|
|
||||||
|
data class DriverIdentityAuthWebBean(val flowId : String? = null,
|
||||||
|
val shortLink : String? = null,
|
||||||
|
val url : String? = null)
|
||||||
|
|
||||||
|
|
||||||
|
//public Integer update;//是否强制更新(1:强制更新;0:非强制更新)
|
||||||
|
//public String path;//更新路径
|
||||||
|
//public String newAppVersion;//版本号
|
||||||
|
//public String description;//版本更新内容
|
||||||
|
data class UpdateVersionBean(val update : Int? = null,
|
||||||
|
val path : String? = null,
|
||||||
|
val newAppVersion : String? = null,
|
||||||
|
val description : String? = null)
|
||||||
|
|
||||||
|
//public String appVersion;//版本号
|
||||||
|
//public Integer appType = 1;//app类型
|
||||||
|
data class UpdateVersionRequest(val appVersion : String? = null, val appType : Int? = 1)
|
||||||
|
|
||||||
|
|
||||||
|
// private String jobCode;
|
||||||
|
// private String phone;
|
||||||
|
// private String taskCode;
|
||||||
|
// private String rescueVehicle;
|
||||||
|
// private String deviceId;
|
||||||
|
// private String vehicleId;
|
||||||
|
data class LoginWithTaskRequest(val jobCode : String? = null,
|
||||||
|
val phone : String? = null,
|
||||||
|
val taskCode : String? = null,
|
||||||
|
val rescueVehicle : String? = null,
|
||||||
|
val deviceId : String? = null,
|
||||||
|
val vehicleId : String? = null)
|
||||||
|
|
||||||
|
//{
|
||||||
|
// "code": 0,
|
||||||
|
// "msg": "请求成功",
|
||||||
|
// "result": {
|
||||||
|
// "supplierName": "上海安畅",
|
||||||
|
// "vehicleName": "小小宋车辆(1)",
|
||||||
|
// "supplierId": 1128,
|
||||||
|
// "userPhone": "17630035658",
|
||||||
|
// "userName": "宋志领",
|
||||||
|
// "userId": 4967,
|
||||||
|
// "token": "c969499d5ac9cbb9da2691ee7533f065",
|
||||||
|
// "loginLogId": 10267,
|
||||||
|
// "userPortrait": "http://file.sino-assist.com/group1/M00/04/E1/wKgBzGfZHjCAW8_MAAQsluXYmmc152.jpg?date=2025-03-18",
|
||||||
|
// "serviceList": [
|
||||||
|
// "故障--平板拖车",
|
||||||
|
// "换胎",
|
||||||
|
// "搭电",
|
||||||
|
// "抢修",
|
||||||
|
// "送水",
|
||||||
|
// "缺汽油",
|
||||||
|
// "缺机油",
|
||||||
|
// "事故--平板拖车",
|
||||||
|
// "困境救援",
|
||||||
|
// "困境-吊车",
|
||||||
|
// "困境救援-事故",
|
||||||
|
// "困境救援-故障",
|
||||||
|
// "电话技术支持",
|
||||||
|
// "电话技术解决",
|
||||||
|
// "派送备用钥匙",
|
||||||
|
// "待命点间调拨",
|
||||||
|
// "商品车运输",
|
||||||
|
// "故障--大型拖车",
|
||||||
|
// "故障--小型拖车",
|
||||||
|
// "事故--大型拖车",
|
||||||
|
// "事故--小型拖车",
|
||||||
|
// "车辆检测",
|
||||||
|
// "送防冻液",
|
||||||
|
// "其他",
|
||||||
|
// "故障拖车(免拖100公里)",
|
||||||
|
// "代验车--取车",
|
||||||
|
// "代验车--送车",
|
||||||
|
// "代验车-取件",
|
||||||
|
// "代验车--送件",
|
||||||
|
// "应急道路救援",
|
||||||
|
// "3吨拖车",
|
||||||
|
// "8吨拖车",
|
||||||
|
// "25吨拖车",
|
||||||
|
// "50吨拖车",
|
||||||
|
// "大力神拖车",
|
||||||
|
// "代提车-拖车",
|
||||||
|
// "现场小修--解档",
|
||||||
|
// "地库救援(不含拖车)",
|
||||||
|
// "故障拖车(免拖50公里)",
|
||||||
|
// "充电拖车-双程",
|
||||||
|
// "代客充电",
|
||||||
|
// "充气",
|
||||||
|
// "移动充电",
|
||||||
|
// "代验车--现场代办",
|
||||||
|
// "代验车--快递代办",
|
||||||
|
// "代验车--取车代办",
|
||||||
|
// "长途拖车",
|
||||||
|
// "大板运输",
|
||||||
|
// "商品车调拨",
|
||||||
|
// "失车定位",
|
||||||
|
// "医疗急救",
|
||||||
|
// "高速救援",
|
||||||
|
// "代客洗车",
|
||||||
|
// "代提车-代驾",
|
||||||
|
// "回程车运输",
|
||||||
|
// "上门交付",
|
||||||
|
// "充电拖车-单程"
|
||||||
|
// ],
|
||||||
|
// "vehicleId": 327732,
|
||||||
|
// "supplierType": 1,
|
||||||
|
// "jobNumber": "宋志领"
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
data class LoginWithTaskBean(val supplierName : String? = null,
|
||||||
|
val vehicleName : String? = null,
|
||||||
|
val supplierId : Int? = null,
|
||||||
|
val userPhone : String? = null,
|
||||||
|
val userName : String? = null,
|
||||||
|
val userId : Int? = null,
|
||||||
|
val token : String? = null,
|
||||||
|
val loginLogId : Int? = null,
|
||||||
|
val userPortrait : String? = null,
|
||||||
|
val serviceList : List<String>? = null,
|
||||||
|
val jobNumber : String? = null,
|
||||||
|
val vehicleId : Int? = null,
|
||||||
|
val supplierType : Int? = null)
|
12
servicing/src/main/java/com/za/bean/ImageBean.kt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package com.za.bean
|
||||||
|
|
||||||
|
data class ImageBean(
|
||||||
|
var data: String? = null,
|
||||||
|
var msg: String? = null,
|
||||||
|
var success: Boolean? = null,
|
||||||
|
var code: Int? = null) {
|
||||||
|
|
||||||
|
fun isOk(): Boolean {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
}
|
329
servicing/src/main/java/com/za/bean/JpushBean.kt
Normal file
@ -0,0 +1,329 @@
|
|||||||
|
package com.za.bean
|
||||||
|
|
||||||
|
import com.blankj.utilcode.util.EncodeUtils
|
||||||
|
import com.blankj.utilcode.util.TimeUtils
|
||||||
|
import com.za.base.AppConfig
|
||||||
|
import java.io.Serializable
|
||||||
|
import java.nio.charset.StandardCharsets
|
||||||
|
|
||||||
|
data class JpushBean(
|
||||||
|
val pushType: Int? = null, //0 新任务 1 任务取消 2 任务变更
|
||||||
|
val taskId: Int? = null,//订单号 "taskId":5313005
|
||||||
|
val taskCode: String? = null, //订单编码 "taskCode":"ZD20190308009965"
|
||||||
|
val customerName: String? = null, //客户姓名 "customerName":"越继安"
|
||||||
|
val customerPhone: String? = null, //客户电话 "customerPhone":"18078815268"
|
||||||
|
val carBrand: String? = null, //车辆品牌 "carBrand":""
|
||||||
|
val carModel: String? = null,//车辆型号 "carModel":"秦"
|
||||||
|
val contract: String? = null, //车辆型号 "carModel":"秦"
|
||||||
|
val typeDesc: String? = null, //推送的附加消息 revoke 撤回 giveUp放弃 reDispatch改派
|
||||||
|
|
||||||
|
val carNo: String? = null, //客户车车牌号 "carNo":"粤AF53918"
|
||||||
|
val taskState: String? = null, //订单状态 "taskState":"GOTO"
|
||||||
|
val address: String? = null, //任务地址 "address":"广东省广州市白云区107国道石井凰岗路342号(白云黄石、同德围地区近庆丰兴隆公园)美景大酒店"
|
||||||
|
val addressProperty: String? = null,//任务地址类型 "addressProperty":"地面"
|
||||||
|
val hotline: String? = null, //任务地址类型 "addressProperty":"地面"
|
||||||
|
val schedulingFinalRule: Int? = null, //案件类型 0 传统案件 1 聚合派工
|
||||||
|
val addressRemark: String? = null,
|
||||||
|
val distAddress: String? = null, //目的地地址 "distAddress":"广东省广州市白云区雅岗南大道"
|
||||||
|
val distAddressRemark: String? = null,
|
||||||
|
val expectArriveTime: String? = null, //预计到达时间 "expectArriveTime":"2019-03-08 05:11:07"
|
||||||
|
val serviceTypeName: String? = null,//服务类型 "serviceTypeName":"故障--平板拖车"
|
||||||
|
val dispatchTime: String? = null, //派单时间 "dispatchTime":"2019-03-08 04:26:07"
|
||||||
|
val lat: Double? = null,
|
||||||
|
val lng: Double? = null,
|
||||||
|
val distLat: Double? = null,
|
||||||
|
val distLng: Double? = null,
|
||||||
|
val importantTip: String? = null,
|
||||||
|
val tipContent: String? = null,
|
||||||
|
val hasReplaceBatteryCapable: Int? = null ,//是否有更换电瓶的能力 1 搭电可以更换电瓶 2搭电不可以更换电瓶 其他的不展示
|
||||||
|
var voiceType : Int?=null //语音提示类型 1小修单 2拖车单 3困境单
|
||||||
|
) : Serializable {
|
||||||
|
fun isNeedCallCustomPhone(): Boolean {
|
||||||
|
return "210" != customerPhone && "230" != customerPhone
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
data class NewOrderRequestBean(val vehicleId: Int? = null)
|
||||||
|
|
||||||
|
//历史订单状态
|
||||||
|
data class HistoryTaskBean(
|
||||||
|
val taskId: Int? = null, //订单号
|
||||||
|
val taskCode: String? = null, //订单编码
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val userOrderCode: String? = null, //只有电子工单历史补传才需要传
|
||||||
|
val supplierAudit: Int? = null, //审核状态 0待补充 1 待审核 2审核不通过 3 审核通过
|
||||||
|
val supplierAuditStr: String? = null, //审核状态描述
|
||||||
|
val missingContent: String? = null, //缺失内容
|
||||||
|
val auditFailReason: String? = null, //审核失败原因
|
||||||
|
val customerName: String? = null, //客户姓名
|
||||||
|
val customerPhone: String? = null, //客户电话
|
||||||
|
val carBrand: String? = null, //车辆品牌
|
||||||
|
val carModel: String? = null, //车辆型号
|
||||||
|
val carNo: String? = null, //客户车车牌号 "
|
||||||
|
val carVin: String? = null, //客户车Vin码
|
||||||
|
val taskState: String? = null, //订单状态
|
||||||
|
val address: String? = null, //任务地址
|
||||||
|
val addressRemark: String? = null, //事发地地址补充
|
||||||
|
val addressProperty: String? = null, //任务地址类型
|
||||||
|
val lat: Double? = null,
|
||||||
|
val lng: Double? = null,
|
||||||
|
val distAddress: String? = null, //目的地地址
|
||||||
|
val distAddressRemark: String? = null, //目的地地址补充
|
||||||
|
val distLat: Double? = null,
|
||||||
|
val distLng: Double? = null,
|
||||||
|
val expectArriveTime: String? = null, //预计到达时间
|
||||||
|
val serviceTypeName: String? = null, //服务类型
|
||||||
|
val orderSource: String? = null, //
|
||||||
|
val flowType: Int? = null, //流程类型 "flowType":2
|
||||||
|
val settleType: Int? = null, //结算类型 1 月结 2 现金
|
||||||
|
val supplierId: Int? = null,
|
||||||
|
val successTime: String? = null, //完成时间 "dispatchTime":"2019-03-08 04:26:07"
|
||||||
|
val verifyType: Int? = null, //验证类型 "verifyType":1
|
||||||
|
val verifyValue: String? = null, //验证内容
|
||||||
|
val holdon: Boolean? = null, //是否被挂起 "holdon":false
|
||||||
|
val externalCode: String? = null, //流水号
|
||||||
|
val vehicleName: String? = null,
|
||||||
|
val traceIdAB: Int? = null,
|
||||||
|
val mileageAB: Int? = null,
|
||||||
|
val traceABUrl: String? = null,
|
||||||
|
val traceIdBC: Int? = null,
|
||||||
|
val mileageBC: Int? = null,
|
||||||
|
val mileageCA: Int? = null,
|
||||||
|
val traceBCUrl: String? = null,
|
||||||
|
val createTime: String? = null,
|
||||||
|
val acceptTime: String? = null,
|
||||||
|
val arriveTime: String? = null,
|
||||||
|
val arriveDestTime: String? = null,
|
||||||
|
val giveupTime: String? = null,
|
||||||
|
val giveupAddress: String? = null,
|
||||||
|
val giveupLat: Double? = null,
|
||||||
|
val giveupLng: Double? = null,
|
||||||
|
val needWaterMarker: Boolean? = null,
|
||||||
|
val needShowPhoneBrand: Boolean? = null,
|
||||||
|
val policyNo: String? = null, // 平安拖车责任险 保单号
|
||||||
|
|
||||||
|
val electronOrderState: String? = null, //电子工单状态
|
||||||
|
|
||||||
|
val hasReplaceBatteryCapable: Int? = null, //是否具有更换电瓶的能力
|
||||||
|
|
||||||
|
val hasReplaceBattery: Int = 0 //1已更换过 2有更换能力但没更换过 0无
|
||||||
|
) : Serializable {
|
||||||
|
|
||||||
|
fun getEleOrderH5Url(): String? {
|
||||||
|
if (electronOrderState == null || electronOrderState != "3") {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
val paramQuery = (("userOrderId=$userOrderId").toString() + "&userOrderCode=" + taskCode) + "&supplierId=" + userOrderId
|
||||||
|
return AppConfig.Resource_URL + "/electronicWorkOrder/index.html?" + EncodeUtils.base64Encode2String(paramQuery.toByteArray(StandardCharsets.UTF_8))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getSettleTypeStr(): String {
|
||||||
|
return when (settleType) {
|
||||||
|
1 -> {
|
||||||
|
"月结"
|
||||||
|
}
|
||||||
|
|
||||||
|
2 -> {
|
||||||
|
"现金"
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
|
""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
data class HistoryPhotoTemplates(
|
||||||
|
/**
|
||||||
|
* 任务节点
|
||||||
|
*/
|
||||||
|
val taskStatus: Int? = null,
|
||||||
|
/**
|
||||||
|
* 图片节点名称
|
||||||
|
*/
|
||||||
|
val taskStatusString: String? = null,
|
||||||
|
/**
|
||||||
|
* 该节点下的所有历史照片信息
|
||||||
|
*/
|
||||||
|
val photoList: List<HistoryPhotoTemplateItem>? = null
|
||||||
|
)
|
||||||
|
|
||||||
|
data class HistoryPhotoTemplateItem(
|
||||||
|
val photoUrl: String? = null,
|
||||||
|
val tag: String? = null,
|
||||||
|
val imageTitle: String? = null,
|
||||||
|
val lon: String? = null,
|
||||||
|
val lat: String? = null,
|
||||||
|
val templatePhotoType: Int = 0, //1 照片 2 工单照片
|
||||||
|
val takePhotoTime: String? = null,
|
||||||
|
val takeAddress: String? = null,
|
||||||
|
val uploadStatus: String? = null,
|
||||||
|
val uploadState: Int? = 0, //0 上传中 1 上传成功 2 上传失败
|
||||||
|
) {
|
||||||
|
|
||||||
|
//获取拍照时间
|
||||||
|
fun getPhotoTakeTime(taskState: String, historyTaskBean: HistoryTaskBean?): String? {
|
||||||
|
if (!takePhotoTime.isNullOrBlank()) {
|
||||||
|
return takePhotoTime
|
||||||
|
}
|
||||||
|
return when (taskState) {
|
||||||
|
"13001", "15001" -> historyTaskBean?.arriveTime
|
||||||
|
"17001" -> {
|
||||||
|
if (2 == historyTaskBean?.flowType) {
|
||||||
|
historyTaskBean.arriveDestTime
|
||||||
|
} else {
|
||||||
|
historyTaskBean?.arriveTime
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
"18001" -> {
|
||||||
|
historyTaskBean?.successTime
|
||||||
|
}
|
||||||
|
|
||||||
|
"18100" -> historyTaskBean?.giveupTime
|
||||||
|
else -> TimeUtils.getNowString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getPhotoLat(taskState: String, historyTaskBean: HistoryTaskBean?): Double? {
|
||||||
|
if (!lat.isNullOrBlank()) {
|
||||||
|
return lat.toDouble()
|
||||||
|
}
|
||||||
|
return when (taskState) {
|
||||||
|
"13001", "15001" -> historyTaskBean?.lat
|
||||||
|
"17001", "18001" -> {
|
||||||
|
if (2 == historyTaskBean?.flowType) {
|
||||||
|
historyTaskBean.distLat
|
||||||
|
} else {
|
||||||
|
historyTaskBean?.lat
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
"18100" -> historyTaskBean?.giveupLat
|
||||||
|
else -> null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getPhotoLng(taskState: String, historyTaskBean: HistoryTaskBean?): Double? {
|
||||||
|
if (!lon.isNullOrBlank()) {
|
||||||
|
return lon.toDouble()
|
||||||
|
}
|
||||||
|
return when (taskState) {
|
||||||
|
"13001", "15001" -> historyTaskBean?.lng
|
||||||
|
"17001", "18001" -> {
|
||||||
|
if (2 == historyTaskBean?.flowType) {
|
||||||
|
historyTaskBean.distLng
|
||||||
|
} else {
|
||||||
|
historyTaskBean?.lng
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
"18100" -> historyTaskBean?.giveupLng
|
||||||
|
else -> null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getPhotoAddress(taskState: String, historyTaskBean: HistoryTaskBean?): String? {
|
||||||
|
if (!takeAddress?.replace("[", "")?.replace("]", "").isNullOrBlank()) {
|
||||||
|
return takeAddress
|
||||||
|
}
|
||||||
|
return when (taskState) {
|
||||||
|
"13001", "15001" -> historyTaskBean?.address
|
||||||
|
"17001", "18001" -> {
|
||||||
|
if (2 == historyTaskBean?.flowType) {
|
||||||
|
historyTaskBean.distAddress
|
||||||
|
} else {
|
||||||
|
historyTaskBean?.address
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
"18100" -> historyTaskBean?.giveupAddress
|
||||||
|
else -> ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
data class TaskSettlementAndTraceBean(
|
||||||
|
val settleMap: SettleMapBean? = null,
|
||||||
|
val traceIdAB: Int? = null,
|
||||||
|
val mileageAB: Int? = null,
|
||||||
|
val traceABUrl: String? = null,
|
||||||
|
val traceIdBC: Int? = null,
|
||||||
|
val mileageBC: Int? = null,
|
||||||
|
val mileageCA: Int? = null,
|
||||||
|
val traceBCUrl: String? = null
|
||||||
|
)
|
||||||
|
|
||||||
|
data class SettleMapBean(
|
||||||
|
/*————————————子公司——————————*/
|
||||||
|
val startPrice: Int? = null, //起步价
|
||||||
|
val unitPrice: Double? = null, //每公里单价
|
||||||
|
val mileage: Int? = null, //公里数
|
||||||
|
val basePrice: Double? = null,//基本费用
|
||||||
|
val roadFee: Int? = null,//路桥费
|
||||||
|
val assistFee: Int? = null, //辅助总费用
|
||||||
|
|
||||||
|
/*———————————————供应商———————————————*/ // public Integer startMileage;//出发段公里数
|
||||||
|
// public Integer carryMileage;//背车段公里数
|
||||||
|
// public Integer backMileage;//回程段公里数
|
||||||
|
val startRoadFee: Int? = null, //出发段过境费
|
||||||
|
val carryRoadFee: Int? = null, //背车段过境费
|
||||||
|
val backRoadFee: Int? = null, //回程段过境费
|
||||||
|
val waitFee: Int? = null,//等候费
|
||||||
|
val wheelFee: Int? = null,//辅助轮费
|
||||||
|
val wheelNum: Int? = null, //辅助轮个数
|
||||||
|
val wheelPrice: Int? = null, //辅助轮单价
|
||||||
|
val dilemmaFee: Int? = null,//困境费
|
||||||
|
val basementFee: Int? = null, //其他费用
|
||||||
|
val totalFee: Double? = null,//费用总计
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by zhangj on 2019/12/4.
|
||||||
|
*/
|
||||||
|
class SettleInfoRequest(
|
||||||
|
val orderId: Int? = null,
|
||||||
|
val supplierType: Int? = null,
|
||||||
|
val startMileage: Int? = null,
|
||||||
|
val carryMileage: Int? = null,
|
||||||
|
val backMileage: Int? = null,
|
||||||
|
val startRoadFee: Int? = null,
|
||||||
|
val carryRoadFee: Int? = null,
|
||||||
|
val backRoadFee: Int? = null,
|
||||||
|
val waitFee: Int? = null,
|
||||||
|
val settleType: Int? = null,
|
||||||
|
val wheelFee: Int? = null, //辅助轮费
|
||||||
|
val wheelNum: Int? = null,
|
||||||
|
val wheelPrice: Int? = null,
|
||||||
|
val dilemmaFee: Int? = null, //困境费
|
||||||
|
val basementFee: Int? = null, //其他费用
|
||||||
|
val totalFee: Double? = null, //
|
||||||
|
val startPrice: Int? = null,
|
||||||
|
val unitPrice: Double? = null,
|
||||||
|
val mileage: Int? = null,
|
||||||
|
val basePrice: Double? = null,
|
||||||
|
val assistFee: Int? = null,
|
||||||
|
val imgInfo: String? = null,
|
||||||
|
val imgPath: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class AMapTraceBean(
|
||||||
|
val counts: Int? = null,
|
||||||
|
val distance: Double? = null,
|
||||||
|
val time: Long? = null,
|
||||||
|
val trid: Int? = null,
|
||||||
|
val points: List<PointsBean>? = null)
|
||||||
|
|
||||||
|
data class PointsBean(
|
||||||
|
val accuracy: Double? = null,
|
||||||
|
val direction: Double? = null,
|
||||||
|
val height: Double? = null,
|
||||||
|
val locatetime: Long? = null,
|
||||||
|
val location: String? = null,
|
||||||
|
val speed: Double? = null)
|
21
servicing/src/main/java/com/za/bean/PaymentInfoBean.kt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package com.za.bean
|
||||||
|
|
||||||
|
data class PaymentInfoBean(
|
||||||
|
var userOrderId: Int? = null,
|
||||||
|
val taskOrderId: Int? = null,
|
||||||
|
val adjustAmount: Int? = null, //调整金额
|
||||||
|
val startPrice: Int? = null, //起步价
|
||||||
|
val limitedMileage: Int? = null, //免托公里数
|
||||||
|
val amount: Float? = null, //收款金额
|
||||||
|
val unitPrice: Float? = null, //单价 //如果单价为 null 并且payItem 为2 则为超限无单价项目
|
||||||
|
val mileage: Float? = null, //公里数
|
||||||
|
val settlementRule: String? = null,//结算规则
|
||||||
|
val userPhone: String? = null,//客户手机号
|
||||||
|
val tradeState: Int? = null, //交易状态 交易状态 1 待交易 2交易完成
|
||||||
|
val isPayment: Boolean? = null, //是否需要进行客户收款
|
||||||
|
val orderPayDetailId: Int? = null, //订单支付明细ID
|
||||||
|
val payItem: Int? = null, //支付项目 1.现金项目 2超限项目
|
||||||
|
val contractSettleRule: Int? = null, //合同结算规则 1系统结算 2一口价结算 其中 一口价的不允许修改金额
|
||||||
|
val calculateAmount: Float? = null, //计算金额
|
||||||
|
val askPayment: Boolean? = null, //是否询问是否收款
|
||||||
|
)
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.za.bean
|
||||||
|
|
||||||
|
data class UploadChangeBatteryRequest(
|
||||||
|
var userOrderId: Int? = null,
|
||||||
|
val hasReplaceBattery: Int? = null, //是否更换电瓶 1 更换
|
||||||
|
val replaceBatteryImgList: List<String>? = null,
|
||||||
|
val isPayment: Boolean? = null //是否需要付款
|
||||||
|
)
|
||||||
|
|
||||||
|
data class FetchChangeBatteryPhotoRequest(
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val taskOrderId: Int? = null//是否更换电瓶
|
||||||
|
)
|
||||||
|
|
||||||
|
data class ChangeBatteryResponse(
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val taskOrderId: Int? = null,
|
||||||
|
val imageType: Int? = null,//1 开案照片,2 医疗救援附件,3 开案凭证照片,4议价凭证照片,5电子工单,6换电瓶照片
|
||||||
|
val imageUrl: String? = null,
|
||||||
|
val tag: String? = null
|
||||||
|
)
|
||||||
|
|
||||||
|
data class BatteryCostQueryBean(
|
||||||
|
var isPayment: Boolean? = null,
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val taskOrderId: Int? = null,
|
||||||
|
val amount: Float? = null,
|
||||||
|
val userPhone: String? = null,
|
||||||
|
val tradeState: Int? = null//交易状态 1 待交易 2 交易完成 6 交易关闭
|
||||||
|
)
|
||||||
|
|
||||||
|
data class BatteryCostQueryRequest(var userOrderId: Int? = null,
|
||||||
|
val taskOrderId: Int? = null)
|
56
servicing/src/main/java/com/za/bean/VehicleInfo.kt
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
package com.za.bean
|
||||||
|
|
||||||
|
import android.os.Parcel
|
||||||
|
import android.os.Parcelable
|
||||||
|
|
||||||
|
data class VehicleInfo(
|
||||||
|
var vehicleId: Int? = null, //车辆id
|
||||||
|
var vehicleName: String? = null,//车辆名称(车牌号)
|
||||||
|
var userName: String? = null, //当前用车司机姓名(工号)
|
||||||
|
var userPhone: String? = null, //当前用车司机电话
|
||||||
|
var status: Int? = null, //车辆状态 0 不在线 1 在线
|
||||||
|
val plateNumber: String? = null, //车牌号
|
||||||
|
var vehicleState: Int? = null, //车辆是否空闲 0 空闲 1 忙碌 2置忙 8维修
|
||||||
|
var terminalId: Long? = null, //车辆高德tid
|
||||||
|
var exitMileage: Int? = null, //上次退出公里数
|
||||||
|
var supplierType: Int? = null, //经销商类型
|
||||||
|
) : Parcelable {
|
||||||
|
constructor(parcel : Parcel) : this(parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readValue(Long::class.java.classLoader) as? Long,
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun writeToParcel(parcel : Parcel, flags : Int) {
|
||||||
|
parcel.writeValue(vehicleId)
|
||||||
|
parcel.writeString(vehicleName)
|
||||||
|
parcel.writeString(userName)
|
||||||
|
parcel.writeString(userPhone)
|
||||||
|
parcel.writeValue(status)
|
||||||
|
parcel.writeString(plateNumber)
|
||||||
|
parcel.writeValue(vehicleState)
|
||||||
|
parcel.writeValue(terminalId)
|
||||||
|
parcel.writeValue(exitMileage)
|
||||||
|
parcel.writeValue(supplierType)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun describeContents() : Int {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object CREATOR : Parcelable.Creator<VehicleInfo> {
|
||||||
|
override fun createFromParcel(parcel : Parcel) : VehicleInfo {
|
||||||
|
return VehicleInfo(parcel)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun newArray(size : Int) : Array<VehicleInfo?> {
|
||||||
|
return arrayOfNulls(size)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
28
servicing/src/main/java/com/za/bean/bean.kt
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package com.za.bean
|
||||||
|
|
||||||
|
//public String reportType;//报备类型名称
|
||||||
|
// public String reportTemplate;//报备内容模板
|
||||||
|
data class ReportItem(val reportType: String? = null,
|
||||||
|
val reportTemplate: String? = null)
|
||||||
|
|
||||||
|
|
||||||
|
//提交报备内容
|
||||||
|
// public String taskId;//关联的任务Id
|
||||||
|
// public String reportType;//报备类型名称
|
||||||
|
// public String reportTemplate;//报备内容模板
|
||||||
|
data class ReportInfoRequest(val taskId: String? = null,
|
||||||
|
val reportType: String? = null,
|
||||||
|
val reportTemplate: String? = null)
|
||||||
|
|
||||||
|
//报备历史请求
|
||||||
|
data class ReportHistoryRequest(val taskId: String? = null)
|
||||||
|
|
||||||
|
|
||||||
|
// public String reportType;//报备类型名称
|
||||||
|
// public String reportTemplate;//报备内容模板
|
||||||
|
// public String createTime;//备注时间
|
||||||
|
// public int state;//1 未处理 2 已处理
|
||||||
|
data class ReportHistoryBean(val reportType: String? = null,
|
||||||
|
val reportTemplate: String? = null,
|
||||||
|
val createTime: Long? = null,
|
||||||
|
val state: Int? = null)
|
90
servicing/src/main/java/com/za/bean/db/ChangeBatteryPhoto.kt
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
package com.za.bean.db
|
||||||
|
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.room.Entity
|
||||||
|
import androidx.room.PrimaryKey
|
||||||
|
|
||||||
|
@Entity(tableName = "change_battery_photo")
|
||||||
|
data class ChangeBatteryPhoto(
|
||||||
|
//图片id
|
||||||
|
@PrimaryKey(autoGenerate = true)
|
||||||
|
var id: Long? = null,
|
||||||
|
|
||||||
|
// 流程节点
|
||||||
|
var taskNode: Int? = null,
|
||||||
|
|
||||||
|
//图片描述
|
||||||
|
var imageDescription: String? = null,
|
||||||
|
|
||||||
|
//图片标题
|
||||||
|
var imageTitle: String? = null,
|
||||||
|
|
||||||
|
//标签
|
||||||
|
var tag: String? = null,
|
||||||
|
|
||||||
|
// 是否必拍 0 非必拍 1必拍
|
||||||
|
var doHaveFilm: Int? = null,
|
||||||
|
|
||||||
|
//封面地址
|
||||||
|
var photoUrl: String? = null,
|
||||||
|
|
||||||
|
//图片名称
|
||||||
|
var photoName: String? = null,
|
||||||
|
|
||||||
|
//图片类型
|
||||||
|
var photoType: Int? = null, //1 走单照片 2 工单照片 3更换电瓶照片
|
||||||
|
|
||||||
|
//创建日期
|
||||||
|
var createTime: String? = null,
|
||||||
|
|
||||||
|
var numbering: String? = null, //图片编号
|
||||||
|
|
||||||
|
var recognizeType: Int? = null, //ocr识别类型 0 无 1车牌号 2车架号
|
||||||
|
|
||||||
|
var photoTip: String? = null, //拍摄提示
|
||||||
|
|
||||||
|
var photoPath: String? = null, //照片路径
|
||||||
|
|
||||||
|
var photoContract: String? = null, //对比照
|
||||||
|
|
||||||
|
var photoNum: Int = 1, //对比照
|
||||||
|
|
||||||
|
var mustPhoto: Boolean = false, //是否必拍照片
|
||||||
|
|
||||||
|
var photoStatus: Int? = null, // 0 未上传 1 准备上传 2 已上传 3 上传失败 4 上传中 5 照片不符合条件 6 照片缺失地址信息 7 ocr车架号识别出错
|
||||||
|
|
||||||
|
var uploadedPath: String? = null,
|
||||||
|
|
||||||
|
var photoInfo: String? = null,
|
||||||
|
|
||||||
|
var index: Int? = null,
|
||||||
|
|
||||||
|
var userOrderId: Int? = null,
|
||||||
|
|
||||||
|
var taskId: Int? = null,
|
||||||
|
|
||||||
|
var taskCode: String? = null) {
|
||||||
|
fun convertPhotoStatusStr(status: Int): String {
|
||||||
|
return when (status) {
|
||||||
|
2 -> "已上传"
|
||||||
|
3 -> "上传失败"
|
||||||
|
4 -> "上传中"
|
||||||
|
5 -> "照片不符合条件"
|
||||||
|
6 -> "照片缺失地址信息"
|
||||||
|
7 -> "车架号识别出错"
|
||||||
|
else -> ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getPhotoStatusColor(): Color {
|
||||||
|
return when (this.photoStatus) {
|
||||||
|
1 -> Color(0xFF2DBBF9)
|
||||||
|
2 -> Color(0xFF32CD32)
|
||||||
|
3 -> Color.Red
|
||||||
|
4 -> Color(0xFF2DBBF9)
|
||||||
|
5 -> Color.Red
|
||||||
|
6 -> Color.Red
|
||||||
|
else -> Color(0xFF2DBBF9)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
271
servicing/src/main/java/com/za/bean/db/NewPhotoTemplateBean.java
Normal file
@ -0,0 +1,271 @@
|
|||||||
|
package com.za.bean.db;
|
||||||
|
|
||||||
|
import androidx.room.Entity;
|
||||||
|
import androidx.room.PrimaryKey;
|
||||||
|
|
||||||
|
@Entity(tableName = "new_table_photo_template")
|
||||||
|
public class NewPhotoTemplateBean {
|
||||||
|
//图片id
|
||||||
|
@PrimaryKey(autoGenerate = true)
|
||||||
|
public long id;
|
||||||
|
|
||||||
|
// 流程节点
|
||||||
|
private int taskNode;
|
||||||
|
//图片描述
|
||||||
|
private String imageDescription;
|
||||||
|
//图片标题
|
||||||
|
private String imageTitle;
|
||||||
|
//标签
|
||||||
|
private String tag;
|
||||||
|
// 是否必拍 0 非必拍 1必拍
|
||||||
|
private int doHaveFilm;
|
||||||
|
//封面地址
|
||||||
|
private String photoUrl;
|
||||||
|
//图片名称
|
||||||
|
private String photoName;
|
||||||
|
//图片类型
|
||||||
|
private int photoType;//1 走单照片 2 工单照片 3更换电瓶照片
|
||||||
|
//创建日期
|
||||||
|
private String createTime;
|
||||||
|
private String numbering;//图片编号
|
||||||
|
private Integer recognizeType;//ocr识别类型 0 无 1车牌号 2车架号
|
||||||
|
|
||||||
|
private String photoTip = "";//拍摄提示
|
||||||
|
private String photoPath = "";//照片路径
|
||||||
|
private String photoContract = "";//对比照
|
||||||
|
private int photoNum = 1;//对比照
|
||||||
|
private Boolean mustPhoto = false;//是否必拍照片
|
||||||
|
private int photoStatus = 0;// 0 未上传 1 准备上传 2 已上传 3 上传失败 4 上传中 5 照片不符合条件 6 照片缺失地址信息 7 ocr车架号识别出错
|
||||||
|
private String uploadedPath = "";
|
||||||
|
private String photoInfo;
|
||||||
|
private int index;
|
||||||
|
private int userOrderId;
|
||||||
|
private int taskId;
|
||||||
|
private String taskCode;
|
||||||
|
|
||||||
|
public NewPhotoTemplateBean() {
|
||||||
|
this.id = System.currentTimeMillis();
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTaskNode() {
|
||||||
|
return taskNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskNode(int taskNode) {
|
||||||
|
this.taskNode = taskNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImageDescription() {
|
||||||
|
return imageDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageDescription(String imageDescription) {
|
||||||
|
this.imageDescription = imageDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImageTitle() {
|
||||||
|
return imageTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageTitle(String imageTitle) {
|
||||||
|
this.imageTitle = imageTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTag() {
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTag(String tag) {
|
||||||
|
this.tag = tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDoHaveFilm() {
|
||||||
|
return doHaveFilm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoHaveFilm(int doHaveFilm) {
|
||||||
|
this.doHaveFilm = doHaveFilm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhotoUrl() {
|
||||||
|
return photoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoUrl(String photoUrl) {
|
||||||
|
this.photoUrl = photoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhotoName() {
|
||||||
|
return photoName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoName(String photoName) {
|
||||||
|
this.photoName = photoName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPhotoType() {
|
||||||
|
return photoType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoType(int photoType) {
|
||||||
|
this.photoType = photoType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumbering() {
|
||||||
|
return numbering;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumbering(String numbering) {
|
||||||
|
this.numbering = numbering;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRecognizeType() {
|
||||||
|
return recognizeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecognizeType(Integer recognizeType) {
|
||||||
|
this.recognizeType = recognizeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhotoTip() {
|
||||||
|
return photoTip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoTip(String photoTip) {
|
||||||
|
this.photoTip = photoTip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhotoPath() {
|
||||||
|
return photoPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoPath(String photoPath) {
|
||||||
|
this.photoPath = photoPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhotoContract() {
|
||||||
|
return photoContract;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoContract(String photoContract) {
|
||||||
|
this.photoContract = photoContract;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPhotoNum() {
|
||||||
|
return photoNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoNum(int photoNum) {
|
||||||
|
this.photoNum = photoNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getMustPhoto() {
|
||||||
|
return mustPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMustPhoto(Boolean mustPhoto) {
|
||||||
|
this.mustPhoto = mustPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPhotoStatus() {
|
||||||
|
return photoStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoStatus(int photoStatus) {
|
||||||
|
this.photoStatus = photoStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUploadedPath() {
|
||||||
|
return uploadedPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUploadedPath(String uploadedPath) {
|
||||||
|
this.uploadedPath = uploadedPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhotoInfo() {
|
||||||
|
return photoInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoInfo(String photoInfo) {
|
||||||
|
this.photoInfo = photoInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIndex() {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndex(int index) {
|
||||||
|
this.index = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getUserOrderId() {
|
||||||
|
return userOrderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserOrderId(int userOrderId) {
|
||||||
|
this.userOrderId = userOrderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTaskId() {
|
||||||
|
return taskId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskId(int taskId) {
|
||||||
|
this.taskId = taskId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskCode() {
|
||||||
|
return taskCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskCode(String taskCode) {
|
||||||
|
this.taskCode = taskCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "NewPhotoTemplateBean{" +
|
||||||
|
"id=" + id +
|
||||||
|
", taskNode=" + taskNode +
|
||||||
|
", imageDescription='" + imageDescription + '\'' +
|
||||||
|
", imageTitle='" + imageTitle + '\'' +
|
||||||
|
", tag='" + tag + '\'' +
|
||||||
|
", doHaveFilm=" + doHaveFilm +
|
||||||
|
", photoUrl='" + photoUrl + '\'' +
|
||||||
|
", photoName='" + photoName + '\'' +
|
||||||
|
", photoType=" + photoType +
|
||||||
|
", createTime='" + createTime + '\'' +
|
||||||
|
", numbering='" + numbering + '\'' +
|
||||||
|
", recognizeType=" + recognizeType +
|
||||||
|
", photoTip='" + photoTip + '\'' +
|
||||||
|
", photoPath='" + photoPath + '\'' +
|
||||||
|
", photoContract='" + photoContract + '\'' +
|
||||||
|
", photoNum=" + photoNum +
|
||||||
|
", mustPhoto=" + mustPhoto +
|
||||||
|
", photoStatus=" + photoStatus +
|
||||||
|
", uploadedPath='" + uploadedPath + '\'' +
|
||||||
|
", photoInfo='" + photoInfo + '\'' +
|
||||||
|
", index=" + index +
|
||||||
|
", userOrderId=" + userOrderId +
|
||||||
|
", taskId=" + taskId +
|
||||||
|
", taskCode='" + taskCode + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.za.bean.db.ele
|
||||||
|
|
||||||
|
import androidx.room.Entity
|
||||||
|
import androidx.room.PrimaryKey
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
@Entity(tableName = "ele_car_damage_photo")
|
||||||
|
data class EleCarDamagePhotoBean(
|
||||||
|
@PrimaryKey(autoGenerate = true)
|
||||||
|
val id: Long? = null,
|
||||||
|
val path: String? = null,
|
||||||
|
val orderId: Int? = null,
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val isPhoto: Boolean? = null,
|
||||||
|
val videoThumbnailPath: String? = null,
|
||||||
|
val uploadStatus: Int? = null,// 1 上传成功 2 正在上传 3上传失败
|
||||||
|
val serverPath: String? = null,
|
||||||
|
val index: Int? = null
|
||||||
|
) : Serializable {
|
||||||
|
fun getStatusStr(): String {
|
||||||
|
return when (uploadStatus) {
|
||||||
|
1 -> "上传成功"
|
||||||
|
2 -> "正在上传"
|
||||||
|
3 -> "上传失败"
|
||||||
|
else -> ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.za.bean.db.ele
|
||||||
|
|
||||||
|
import androidx.room.Entity
|
||||||
|
import androidx.room.PrimaryKey
|
||||||
|
|
||||||
|
@Entity(tableName = "ele_work_order")
|
||||||
|
data class EleWorkOrderBean(
|
||||||
|
@PrimaryKey(autoGenerate = false) val orderId: Int,
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val date: String? = null, //日期 2023-10-20
|
||||||
|
val serviceContent: String? = null, //服务须知内容
|
||||||
|
val orderWorkStatus: Int? = null, //电子工单状态 1车辆损伤照片 2 客户签名页面 3 服务完成 接车人签名和服务人员签名状态
|
||||||
|
val hasBad: Boolean? = null, //车辆是否有损伤
|
||||||
|
val carNO: String? = null,//车牌号
|
||||||
|
val carVin: String? = null,//车架号
|
||||||
|
val orderType: String? = null, //救援类型
|
||||||
|
val isSuccess: Int? = null, //服务是否成功 1 成功 其他失败
|
||||||
|
val localCustomSignPath: String? = null,
|
||||||
|
val localAcceptCarSignPath: String? = null,//接车人本地路径
|
||||||
|
val localServicePeopleSignPath: String? = null, //服务人员签名
|
||||||
|
val serverCustomSignPath: String? = null,
|
||||||
|
val serverAcceptCarSignPath: String? = null, //远程地址
|
||||||
|
val serverServicePeopleSignPath: String? = null,
|
||||||
|
val hasCreatedEleWorkOrderPhoto: Boolean? = null, //是否已经生成电子工单照片
|
||||||
|
val changeBattery: Boolean? = null //是否更换电瓶
|
||||||
|
)
|
237
servicing/src/main/java/com/za/bean/db/order/OrderInfo.kt
Normal file
@ -0,0 +1,237 @@
|
|||||||
|
package com.za.bean.db.order
|
||||||
|
|
||||||
|
import android.os.Parcel
|
||||||
|
import android.os.Parcelable
|
||||||
|
import androidx.room.Entity
|
||||||
|
import androidx.room.PrimaryKey
|
||||||
|
|
||||||
|
@Entity(tableName = "order_info")
|
||||||
|
data class OrderInfo(
|
||||||
|
@PrimaryKey(autoGenerate = false) var taskId: Int? = null, //订单号 "taskId":5313005
|
||||||
|
var userOrderId: Int? = null, //订单id
|
||||||
|
var taskCode: String? = null, //订单编码 "taskCode":"ZD20190308009965"
|
||||||
|
var customerName: String? = null, //客户姓名 "customerName":"越继安"
|
||||||
|
var customerPhone: String? = null,//客户电话 "customerPhone":"18078815268"
|
||||||
|
var carBrand: String? = null,//车辆品牌 "carBrand":""
|
||||||
|
var modelVinNo: String? = null,
|
||||||
|
var carModel: String? = null, //车辆型号 "carModel":"秦"
|
||||||
|
var carNo: String? = null, //客户车车牌号 "carNo":"粤AF53918"
|
||||||
|
var carVin: String? = null,//客户车Vin码 "carVin":"LGXC76C30J0132942"
|
||||||
|
var taskState: String? = null, //订单状态 "taskState":"GOTO"
|
||||||
|
var nextState: String? = null,//下一步状态
|
||||||
|
var electronOrderState: Int? = null, //电子工单状态:1检查损伤 2生成车辆检查表签字 3作业完成签字
|
||||||
|
var address: String? = null, //任务地址 "address":"广东省广州市白云区107国道石井凰岗路342号(白云黄石、同德围地区近庆丰兴隆公园)美景大酒店"
|
||||||
|
var addressProperty: String? = null, //任务地址类型 "addressProperty":"地面"
|
||||||
|
var addressRemark: String? = null, //事发地地址补充
|
||||||
|
var distAddress: String? = null, //目的地地址 "distAddress":"广东省广州市白云区雅岗南大道"
|
||||||
|
var distAddressRemark: String? = null,//目的地地址补充
|
||||||
|
var expectArriveTime: String? = null, //预计到达时间 "expectArriveTime":"2019-03-08 05:11:07"
|
||||||
|
var serviceTypeName: String? = null, //服务类型 "serviceTypeName":"故障--平板拖车"
|
||||||
|
var orderSource: String? = null, // "orderSource":"中道救援-比亚迪道路救援项目"
|
||||||
|
var flowType: Int? = null, //流程类型 0 综合服务 1小修 2拖车 3取送件 4在线技术解决 5组合服务 6拖车简化流程 7武汉交管服务
|
||||||
|
var settleType: Int? = null,//结算类型 1 月结 2 现金
|
||||||
|
var settleTypeStr: String? = null, //结算类型
|
||||||
|
var supplierId: Int? = null,
|
||||||
|
var startTime: String? = null,//发车时间
|
||||||
|
var operationTime: String? = null, //作业完成时间
|
||||||
|
var dispatchTime: String? = null,//派单时间 "dispatchTime":"2019-03-08 04:26:07"
|
||||||
|
var verifyType: Int? = null,//验证类型 "verifyType": 0 跳过验证 1和2 车牌和车架号验证 5 新车验证
|
||||||
|
var verifyValue: String? = null,//验证内容 "verifyValue":"粤AF53918"
|
||||||
|
var holdon: Boolean? = null,//是否被挂起 "holdon":false
|
||||||
|
var isCurrent: Boolean? = null, //是否为正在做的任务
|
||||||
|
var flow: String? = null, //流程状态 "flow":"START,GOTO,VERIFY,EXAMINE,OPERATION,SENDTO,SETTLEMENT,FINISH"
|
||||||
|
var externalCode: String? = null, //
|
||||||
|
var plateNumber: String? = null,
|
||||||
|
var distaddressProperty: String? = null,
|
||||||
|
var vehiclePointRemark: String? = null,
|
||||||
|
var destinationRemark: String? = null,
|
||||||
|
var lat: Double? = null,
|
||||||
|
var lng: Double? = null,
|
||||||
|
var distLat: Double? = null,
|
||||||
|
var distLng: Double? = null,
|
||||||
|
var hotline: String? = null,
|
||||||
|
var createTime: String? = null,
|
||||||
|
var acceptTime: String? = null,
|
||||||
|
var arriveTime: String? = null,
|
||||||
|
var arriveDestTime: String? = null,
|
||||||
|
var needECDevice: Boolean? = null,
|
||||||
|
var needDestAddress: Boolean? = null,
|
||||||
|
var linkToDocs: Boolean? = null,
|
||||||
|
var linkToDaDianH5: Boolean? = null,
|
||||||
|
var carFactory: Boolean? = null,
|
||||||
|
var needWaterMarker: Boolean? = null,
|
||||||
|
var needShowPhoneBrand: Boolean? = null,
|
||||||
|
var taskNotes: String? = null, //救援要求
|
||||||
|
var feeStandard: String? = null, //收费标准
|
||||||
|
var customerNotes: String? = null, //客户提醒
|
||||||
|
var otherNotes: String? = null, //特殊提醒
|
||||||
|
var isNewCar: Boolean? = null, //是否新车
|
||||||
|
var ECDeviceString: String? = null,//搭电设备照片提示
|
||||||
|
var customerReportImgs: String? = null, //客户上报照片,多张照片用;分隔
|
||||||
|
var arriveRemind: String? = null,
|
||||||
|
var arriveRemindLink: String? = null,
|
||||||
|
var policyNo: String? = null, // 平安拖车责任险 保单号
|
||||||
|
var advanceTime: Long? = null,
|
||||||
|
var importantTip: String? = null,
|
||||||
|
var hasReplaceBatteryCapable: Int? = null, //是否有更换电瓶的能力 1 搭电可以更换电瓶 2搭电不可以更换电瓶 其他的不展示
|
||||||
|
var taskSuccessStatus: Int? = null, //作业是否完成 0 完成 1未完成 拖车默认完成
|
||||||
|
var tyreNumber: Int? = null, //辅助费用
|
||||||
|
) : Parcelable {
|
||||||
|
constructor(parcel: Parcel) : this(
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
|
||||||
|
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Double::class.java.classLoader) as? Double,
|
||||||
|
parcel.readValue(Double::class.java.classLoader) as? Double,
|
||||||
|
parcel.readValue(Double::class.java.classLoader) as? Double,
|
||||||
|
parcel.readValue(Double::class.java.classLoader) as? Double,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
|
||||||
|
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
|
||||||
|
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
|
||||||
|
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
|
||||||
|
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
|
||||||
|
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
|
||||||
|
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Long::class.java.classLoader) as? Long,
|
||||||
|
parcel.readString(),
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int,
|
||||||
|
parcel.readValue(Int::class.java.classLoader) as? Int) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun writeToParcel(parcel: Parcel, flags: Int) {
|
||||||
|
parcel.writeValue(taskId)
|
||||||
|
parcel.writeValue(userOrderId)
|
||||||
|
parcel.writeString(taskCode)
|
||||||
|
parcel.writeString(customerName)
|
||||||
|
parcel.writeString(customerPhone)
|
||||||
|
parcel.writeString(carBrand)
|
||||||
|
parcel.writeString(modelVinNo)
|
||||||
|
parcel.writeString(carModel)
|
||||||
|
parcel.writeString(carNo)
|
||||||
|
parcel.writeString(carVin)
|
||||||
|
parcel.writeString(taskState)
|
||||||
|
parcel.writeString(nextState)
|
||||||
|
parcel.writeValue(electronOrderState)
|
||||||
|
parcel.writeString(address)
|
||||||
|
parcel.writeString(addressProperty)
|
||||||
|
parcel.writeString(addressRemark)
|
||||||
|
parcel.writeString(distAddress)
|
||||||
|
parcel.writeString(distAddressRemark)
|
||||||
|
parcel.writeString(expectArriveTime)
|
||||||
|
parcel.writeString(serviceTypeName)
|
||||||
|
parcel.writeString(orderSource)
|
||||||
|
parcel.writeValue(flowType)
|
||||||
|
parcel.writeValue(settleType)
|
||||||
|
parcel.writeString(settleTypeStr)
|
||||||
|
parcel.writeValue(supplierId)
|
||||||
|
parcel.writeString(startTime)
|
||||||
|
parcel.writeString(operationTime)
|
||||||
|
parcel.writeString(dispatchTime)
|
||||||
|
parcel.writeValue(verifyType)
|
||||||
|
parcel.writeString(verifyValue)
|
||||||
|
parcel.writeValue(holdon)
|
||||||
|
parcel.writeValue(isCurrent)
|
||||||
|
parcel.writeString(flow)
|
||||||
|
parcel.writeString(externalCode)
|
||||||
|
parcel.writeString(plateNumber)
|
||||||
|
parcel.writeString(distaddressProperty)
|
||||||
|
parcel.writeString(vehiclePointRemark)
|
||||||
|
parcel.writeString(destinationRemark)
|
||||||
|
parcel.writeValue(lat)
|
||||||
|
parcel.writeValue(lng)
|
||||||
|
parcel.writeValue(distLat)
|
||||||
|
parcel.writeValue(distLng)
|
||||||
|
parcel.writeString(hotline)
|
||||||
|
parcel.writeString(createTime)
|
||||||
|
parcel.writeString(acceptTime)
|
||||||
|
parcel.writeString(arriveTime)
|
||||||
|
parcel.writeString(arriveDestTime)
|
||||||
|
parcel.writeValue(needECDevice)
|
||||||
|
parcel.writeValue(needDestAddress)
|
||||||
|
parcel.writeValue(linkToDocs)
|
||||||
|
parcel.writeValue(linkToDaDianH5)
|
||||||
|
parcel.writeValue(carFactory)
|
||||||
|
parcel.writeValue(needWaterMarker)
|
||||||
|
parcel.writeValue(needShowPhoneBrand)
|
||||||
|
parcel.writeString(taskNotes)
|
||||||
|
parcel.writeString(feeStandard)
|
||||||
|
parcel.writeString(customerNotes)
|
||||||
|
parcel.writeString(otherNotes)
|
||||||
|
parcel.writeValue(isNewCar)
|
||||||
|
parcel.writeString(ECDeviceString)
|
||||||
|
parcel.writeString(customerReportImgs)
|
||||||
|
parcel.writeString(arriveRemind)
|
||||||
|
parcel.writeString(arriveRemindLink)
|
||||||
|
parcel.writeString(policyNo)
|
||||||
|
parcel.writeValue(advanceTime)
|
||||||
|
parcel.writeString(importantTip)
|
||||||
|
parcel.writeValue(hasReplaceBatteryCapable)
|
||||||
|
parcel.writeValue(taskSuccessStatus)
|
||||||
|
parcel.writeValue(tyreNumber)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun describeContents(): Int {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object CREATOR : Parcelable.Creator<OrderInfo> {
|
||||||
|
override fun createFromParcel(parcel: Parcel): OrderInfo {
|
||||||
|
return OrderInfo(parcel)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun newArray(size: Int): Array<OrderInfo?> {
|
||||||
|
return arrayOfNulls(size)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
package com.za.bean.db.order
|
||||||
|
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.room.Entity
|
||||||
|
import androidx.room.PrimaryKey
|
||||||
|
|
||||||
|
@Entity(tableName = "photo_template_bean")
|
||||||
|
data class PhotoTemplateInfo(
|
||||||
|
@PrimaryKey(autoGenerate = true) val primaryId: Int? = null,
|
||||||
|
val id: Int? = null,
|
||||||
|
val taskNode: Int? = null,
|
||||||
|
val imageDescription: String? = null,// 图片描述
|
||||||
|
val imageTitle: String? = null,// 图片标题
|
||||||
|
val tag: String? = null,// 标签
|
||||||
|
val doHaveFilm: Int? = null,//是否必拍 0 非必拍 1 必拍
|
||||||
|
val photoUrl: String? = null,//封面地址
|
||||||
|
val photoName: String? = null,// 图片名称
|
||||||
|
val photoType: Int? = null,// 1 照片 2 电子工单
|
||||||
|
val createTime: String? = null,//创建时间
|
||||||
|
val numbering: String? = null,// 图片编号
|
||||||
|
val recognizeType: Int? = null,//orc 识别类型 0 无 1 车牌号 2 车架号
|
||||||
|
//以下属性非后台返回属性
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val taskCode: String? = null,
|
||||||
|
val taskId: Int? = null,
|
||||||
|
val photoLocalPath: String? = null,//照片未添加水印之前的位置
|
||||||
|
val photoUploadPath: String? = null,//照片上传服务器之后的路径
|
||||||
|
val photoLocalWaterMarkerPath: String? = null,//照片水印位置
|
||||||
|
val photoUploadStatus: Int? = null,// 0 未上传 1 准备上传 2 已上传 3 上传失败 4 上传中 5 照片不符合条件 6 照片缺失地址信息 7 ocr车架号识别出错
|
||||||
|
val photoUploadStatusStr: String? = null,
|
||||||
|
var advanceTime: Long? = null,
|
||||||
|
val needWaterMarker: Boolean? = null,
|
||||||
|
val needShowPhoneBrand: Boolean? = null,
|
||||||
|
val myCustomPhotoType: Int? = null,// 1 默认是服务中照片订单图片 2 历史中照片 3.更换电瓶照片 4.普通的照片
|
||||||
|
// photo info字段
|
||||||
|
val realTakePhotoTime: String? = null,//真实拍照时间
|
||||||
|
val photoSource: Int? = null,//1相机 2 相册 3真实位置
|
||||||
|
val time: String? = null,// 拍照时间
|
||||||
|
val lat: Float? = null,
|
||||||
|
val lng: Float? = null,
|
||||||
|
val address: String? = null,
|
||||||
|
) {
|
||||||
|
fun convertPhotoStatusStr(status: Int): String {
|
||||||
|
return when (status) {
|
||||||
|
1 -> "准备上传"
|
||||||
|
2 -> "已上传"
|
||||||
|
3 -> "上传失败"
|
||||||
|
4 -> "上传中"
|
||||||
|
5 -> "照片不符合条件"
|
||||||
|
6 -> "照片缺失地址信息"
|
||||||
|
7 -> "车架号识别出错"
|
||||||
|
else -> ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getPhotoStatusColor(): Color {
|
||||||
|
return when (this.photoUploadStatus) {
|
||||||
|
1 -> Color(0xFF2DBBF9)
|
||||||
|
2 -> Color(0xFF32CD32)
|
||||||
|
3 -> Color.Red
|
||||||
|
4 -> Color(0xFF2DBBF9)
|
||||||
|
5 -> Color.Red
|
||||||
|
6 -> Color.Red
|
||||||
|
else -> Color(0xFF2DBBF9)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.za.bean.db.water_marker
|
||||||
|
|
||||||
|
import androidx.room.ColumnInfo
|
||||||
|
import androidx.room.Entity
|
||||||
|
import androidx.room.PrimaryKey
|
||||||
|
|
||||||
|
@Entity(tableName = "water_marker_item")
|
||||||
|
data class WaterMarkerItemBean(
|
||||||
|
@PrimaryKey(autoGenerate = true)
|
||||||
|
val id: Int = 0,
|
||||||
|
@ColumnInfo(name = "water_left") var left: Double = 0.0,
|
||||||
|
@ColumnInfo(name = "water_right") val right: Double = 0.0,
|
||||||
|
val top: Double = 0.0,
|
||||||
|
val bottom: Double = 0.0,
|
||||||
|
val content: String? = null,
|
||||||
|
val color: String? = null,
|
||||||
|
val wideFont: String? = null, //高度大于宽度的系数
|
||||||
|
val highFont: String? = null, //高度大于宽度的系数
|
||||||
|
val waterTemplateId: Int? = null,
|
||||||
|
val taskCode: String? = null,
|
||||||
|
val taskId: Int? = null,
|
||||||
|
)
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.za.bean.db.water_marker
|
||||||
|
|
||||||
|
import androidx.room.Embedded
|
||||||
|
import androidx.room.Relation
|
||||||
|
|
||||||
|
data class WaterMarkerTemplateAndItemRef(
|
||||||
|
@Embedded
|
||||||
|
val waterMarkerTemplateBean: WaterMarkerTemplateBean? = null,
|
||||||
|
@Relation(parentColumn = "taskCode", entityColumn = "taskCode")
|
||||||
|
val waterMarkerItemBeanList: List<WaterMarkerItemBean>? = null
|
||||||
|
)
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.za.bean.db.water_marker
|
||||||
|
|
||||||
|
import androidx.room.Entity
|
||||||
|
import androidx.room.PrimaryKey
|
||||||
|
|
||||||
|
@Entity(tableName = "water_template")
|
||||||
|
data class WaterMarkerTemplateBean(
|
||||||
|
@PrimaryKey(autoGenerate = true)
|
||||||
|
val id: Int = 0,
|
||||||
|
val templateId: Int? = null,
|
||||||
|
val templateName: String? = null,
|
||||||
|
val taskCode: String? = null,
|
||||||
|
val taskId: Int? = null,
|
||||||
|
val updateTime: String? = null)
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.za.bean.request
|
||||||
|
|
||||||
|
data class AcceptOrderRequest(
|
||||||
|
var userId: Int? = null,
|
||||||
|
var taskId: Int? = null,
|
||||||
|
var vehicleId: Int? = null,
|
||||||
|
var taskCode: String? = null,
|
||||||
|
var lat: Double? = null,
|
||||||
|
var lng: Double? = null,
|
||||||
|
var deviceId: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class RefuseOrderRequest(
|
||||||
|
var userId: Int? = null,
|
||||||
|
var taskId: Int? = null,
|
||||||
|
var vehicleId: Int? = null,
|
||||||
|
var taskCode: String? = null)
|
5
servicing/src/main/java/com/za/bean/request/Auth.kt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package com.za.bean.request
|
||||||
|
|
||||||
|
data class DriverFaceCompareRequest(val vehicleId: Int? = null, val driverId: Int? = null, val photoUrl: String? = null)
|
||||||
|
|
||||||
|
data class DriverFaceCompareBean(val flowId: Int? = null, val shortLink: String? = null, val url: String? = null)
|
34
servicing/src/main/java/com/za/bean/request/LoginRequest.kt
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package com.za.bean.request
|
||||||
|
|
||||||
|
data class LoginRequest(
|
||||||
|
var jobCode: String? = null, //工号
|
||||||
|
var supplierCode: String? = null, //经销商代码
|
||||||
|
var phone: String? = null, //密码
|
||||||
|
var phoneModel: String? = null, //手机机型
|
||||||
|
var vehicleId: Int? = null, //车辆id
|
||||||
|
var enterMileage: Int? = null,//上班公里数
|
||||||
|
var deviceInfo: String? = null, //手机信息
|
||||||
|
var regId: String? = null, //手机信息
|
||||||
|
var lat: Double? = null,
|
||||||
|
var lng: Double? = null,
|
||||||
|
var deviceId: String? = null,
|
||||||
|
var dashboardPath: String? = null //里程表照片路径
|
||||||
|
)
|
||||||
|
|
||||||
|
data class PhoneBean(
|
||||||
|
var versionRelease: String? = null,//系统版本
|
||||||
|
var model: String? = null,//手机型号
|
||||||
|
var brand: String? = null,//手机厂商
|
||||||
|
var appVersion: String? = null,//app版本
|
||||||
|
)
|
||||||
|
|
||||||
|
data class VehicleLogoutRequest(
|
||||||
|
var vehicleId: Int? = null, //车辆id
|
||||||
|
var loginLogId: Int? = null ,//用户id
|
||||||
|
var exitMileage: Int? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
data class VerifyCodeRequest(val phone : String? = null)
|
||||||
|
|
||||||
|
data class VerifyCodeResponse(val verifyCode : String? = null)
|
3
servicing/src/main/java/com/za/bean/request/Order.kt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
package com.za.bean.request
|
||||||
|
|
||||||
|
data class UploadPhotoBean(val img: String? = null)
|
56
servicing/src/main/java/com/za/bean/request/OrderRequest.kt
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
package com.za.bean.request
|
||||||
|
|
||||||
|
data class OrderListRequest(
|
||||||
|
val vehicleId: Int? = null,
|
||||||
|
val deviceId: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 照片模版请求数据
|
||||||
|
*/
|
||||||
|
data class PhotoTemplateRequest(val userOrderId: Int? = null)
|
||||||
|
|
||||||
|
|
||||||
|
//照片识别
|
||||||
|
data class OrderPhotoOcrRecognizeRequest(
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val recognizeType: Int? = null,
|
||||||
|
val imgUrl: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class TaskFinishRequest(
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val lat: Double? = null,
|
||||||
|
val lng: Double? = null,
|
||||||
|
val operateTime: Long? = null)
|
||||||
|
|
||||||
|
data class GiveUpTaskRequest(
|
||||||
|
val taskId: Int? = null, //任务id
|
||||||
|
val userId: Int? = null, //用户id
|
||||||
|
val vehicleId: Int? = null, //车辆id
|
||||||
|
val lat: Double? = null,
|
||||||
|
val lng: Double? = null,
|
||||||
|
val address: String? = null,
|
||||||
|
val templatePhotoInfoList: List<String?>? = null, //照片数据
|
||||||
|
val pushGiveUpFlag: Int? = null, //1 是 0否
|
||||||
|
)
|
||||||
|
|
||||||
|
data class UpdatePhotoRequest(
|
||||||
|
val taskId: Int? = null,
|
||||||
|
val taskState: String? = null,
|
||||||
|
val picturePosition: Int? = null, //图片位置
|
||||||
|
val picturePath: String? = null,//图片路径
|
||||||
|
val imgInfo: String? = null
|
||||||
|
)
|
||||||
|
|
||||||
|
data class SwitchTaskRequest(val currentTaskId: Int? = null,
|
||||||
|
val nextTaskId: Int? = null,
|
||||||
|
val userId: Int? = null,
|
||||||
|
val vehicleId: Int? = null)
|
||||||
|
|
||||||
|
data class HistoryTasksRequest(val userId: Int? = null, val vehicleId: Int? = null)
|
||||||
|
|
||||||
|
data class HistoryPhotoTemplateRequest(val taskId: Int? = null)
|
||||||
|
|
||||||
|
data class HistoryDetailRequest(val taskId: Int? = null)
|
||||||
|
|
@ -0,0 +1,51 @@
|
|||||||
|
package com.za.bean.request
|
||||||
|
|
||||||
|
data class PaymentInfoRequest(
|
||||||
|
var userOrderId: Int? = null,
|
||||||
|
val taskOrderId: Int? = null)
|
||||||
|
|
||||||
|
// private int userOrderId;
|
||||||
|
// private int taskOrderId;
|
||||||
|
// private int onSite;//是否在现场 1是 0否
|
||||||
|
// private Integer orderPayDetailId;//订单支付明细ID
|
||||||
|
// private String userPhone;//客户号码,客户不在现场时必填
|
||||||
|
data class CustomerPaymentCreateRequest(val userOrderId: Int? = null,
|
||||||
|
val taskOrderId: Int? = null,
|
||||||
|
val onSite: Int? = null,
|
||||||
|
val orderPayDetailId: Int? = null,
|
||||||
|
val userPhone: String? = null)
|
||||||
|
|
||||||
|
// private int userOrderId;
|
||||||
|
// private int taskOrderId;
|
||||||
|
// private Float amount;
|
||||||
|
// private String payData;//二维码链接
|
||||||
|
// private String payCode;//付款编号
|
||||||
|
// private String plateNumber;//车牌号
|
||||||
|
data class CustomerPaymentCreateBean(val userOrderId: Int? = null,
|
||||||
|
val taskOrderId: Int? = null,
|
||||||
|
val amount: Float? = null,
|
||||||
|
val payData: String? = null,
|
||||||
|
val payCode: String? = null,
|
||||||
|
val plateNumber: String? = null)
|
||||||
|
|
||||||
|
//private Integer userOrderId;
|
||||||
|
//private Integer taskOrderId;
|
||||||
|
//private Float payAmount; //收款金额
|
||||||
|
//private Float unitPrice;//单价 //如果单价为 null 并且payItem 为2 则为超限无单价项目
|
||||||
|
//private Float mileage;//公里数
|
||||||
|
//private Integer orderPayDetailId;//订单支付明细ID
|
||||||
|
//private String updateRemark;//支付项目 1.现金项目 2超限项目
|
||||||
|
//private Float calculateAmount;//计算金额
|
||||||
|
//private Float adjustAmount;//调整金额
|
||||||
|
//private boolean askPayment;
|
||||||
|
|
||||||
|
data class PaymentUpdateRequest(val userOrderId: Int? = null,
|
||||||
|
val taskOrderId: Int? = null,
|
||||||
|
val payAmount: Float? = null,
|
||||||
|
val unitPrice: Float? = null,
|
||||||
|
val mileage: Float? = null,
|
||||||
|
val orderPayDetailId: Int? = null,
|
||||||
|
val updateRemark: String? = null,
|
||||||
|
val calculateAmount: Float? = null,
|
||||||
|
val adjustAmount: Float? = null,
|
||||||
|
val askPayment: Boolean? = null)
|
@ -0,0 +1,51 @@
|
|||||||
|
package com.za.bean.request
|
||||||
|
|
||||||
|
data class SaveEleOrderRequest(
|
||||||
|
val taskOrderId: Int? = null,
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val state: Int? = null,
|
||||||
|
val hasDamage: Int? = null, //是否有算上 1 有
|
||||||
|
val hasSuccess: Int? = null, // 作业是否完成 1成功 0失败
|
||||||
|
val customerSignPath: String? = null, //客户签名照片
|
||||||
|
val recipientSignPath: String? = null, //接车人签名
|
||||||
|
val waitstaffSignPath: String? = null, //服务人员签名
|
||||||
|
val damageFileList: List<String?>? = null, //损伤文件列表
|
||||||
|
val userOrderCode: String? = null, //仅在历史补传电子工单时传
|
||||||
|
val tyreNumber: Int? = null, //小轮个数
|
||||||
|
val lng: Double? = null,
|
||||||
|
val lat: Double? = null,
|
||||||
|
val isFinish: Boolean = false, //订单是否完成进入历史 true 完成
|
||||||
|
/**
|
||||||
|
* 操作时间(时间戳)
|
||||||
|
*/
|
||||||
|
val operateTime: String? = null,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0 正常上传 1离线补传
|
||||||
|
*/
|
||||||
|
val offlineMode: Int? = null)
|
||||||
|
|
||||||
|
data class QueryEleOrderRequest(val taskOrderId: Int? = null,
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val userOrderCode: String? = null)
|
||||||
|
|
||||||
|
|
||||||
|
data class ElectronOrderResponse(val id: Int? = null,
|
||||||
|
val userOrderId: Int? = null,
|
||||||
|
val state: Int? = null,
|
||||||
|
val hasDamage: Int? = null, //1 有损伤 2 无损伤
|
||||||
|
val hasSuccess: Int? = null,
|
||||||
|
val customerSignPath: String? = null,
|
||||||
|
val recipientSignPath: String? = null,
|
||||||
|
val waitstaffSignPath: String? = null,//
|
||||||
|
val createTime: String? = null,
|
||||||
|
val updateTime: String? = null,
|
||||||
|
val damageFileList: List<String>? = null,
|
||||||
|
val vinNo: String? = null,
|
||||||
|
val plateNumberBean: PlateNumberBean? = null,
|
||||||
|
val serviceId: Int? = null,
|
||||||
|
val serviceName: String? = null,
|
||||||
|
val flowId: Int? = null,
|
||||||
|
val serviceTerm: String? = null)
|
||||||
|
|
||||||
|
data class PlateNumberBean(val value: String? = null)
|
157
servicing/src/main/java/com/za/bean/request/SubBean.kt
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
package com.za.bean.request
|
||||||
|
|
||||||
|
data class TodayMaintainbean(
|
||||||
|
val tag: String? = null,//
|
||||||
|
val tagName: String? = null, //名称
|
||||||
|
val description: String? = null, //描述
|
||||||
|
val img: String? = null, //图片地址
|
||||||
|
)
|
||||||
|
|
||||||
|
data class TodayMaintainRequest(val vehicleId: Int? = null)
|
||||||
|
|
||||||
|
data class TodayMaintainUploadRequest(
|
||||||
|
val vehicleId: String? = null,
|
||||||
|
val driverId: String? = null,
|
||||||
|
val tag: String? = null,
|
||||||
|
val tagImage: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
data class RecognizeRefuelOcrRequestBean(
|
||||||
|
val imageUrl: String? = null,
|
||||||
|
val address: String? = null,
|
||||||
|
val longitude: Double? = null,
|
||||||
|
val latitude: Double? = null,
|
||||||
|
val vehicleId: Double? = null,
|
||||||
|
val driverId: Double? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class RecognizeRefuelTicketBean(
|
||||||
|
var refuelCode: String? = null, //加油卡号
|
||||||
|
var quantity: Double? = null,//加油量
|
||||||
|
var amount: Double? = null,//加油金额
|
||||||
|
var filePath: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class RecognizeRefuelTicketRequestBean(
|
||||||
|
val vehicleId: Int? = null,
|
||||||
|
val driverId: Int? = null,
|
||||||
|
val address: String? = null,
|
||||||
|
val longitude: Double? = null,
|
||||||
|
val latitude: Double? = null,
|
||||||
|
val refuelCode: String? = null,
|
||||||
|
val quantity: Double? = null,
|
||||||
|
val amount: Double? = null,
|
||||||
|
val mileage: Double? = null,
|
||||||
|
val refuelTime: Double? = null,
|
||||||
|
val receiptPhotoUrls: String? = null,
|
||||||
|
val anotherPhotoUrls: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
data class RepairHistoryRequestBean(val id: Int? = null,
|
||||||
|
val driverId: Int? = null,
|
||||||
|
val vehicleId: Int? = null)
|
||||||
|
|
||||||
|
data class VehicleRepairBean(
|
||||||
|
var id: Int? = null,//维保记录ID
|
||||||
|
var stage: String? = null, //阶段 //1 维保申请审批中 2,"维保申请不通过" 3,"维保申请通过" 4,"维保完成审批中" 5,"维保完成不通过" 6,"维保完成通过" 9,"维保终止"
|
||||||
|
var vehicleId: Int? = null,//车辆ID
|
||||||
|
var vehicleName: String? = null, //车辆名称
|
||||||
|
var plateNumber: String? = null, //车牌号
|
||||||
|
var states: Int? = null,//维保状态
|
||||||
|
var statesStr: String? = null, //维保状态-描述
|
||||||
|
var address: String? = null, //维修地址
|
||||||
|
var repairPoint: String? = null, //维修点名称
|
||||||
|
var vehicleRepairId: Int? = null,//维修点Id
|
||||||
|
var longitude: Double? = null, //维保地址经度
|
||||||
|
var latitude: Double? = null, //维保地址纬度
|
||||||
|
var storePhotoUrls: String? = null, //门店照片
|
||||||
|
var paymentType: Int? = null,//支付类型 1挂账 2现金
|
||||||
|
var amount: Double? = null, //维保金额
|
||||||
|
var mileage: Int? = null,//车辆里程数
|
||||||
|
var information: String? = null, //维保信息
|
||||||
|
var maintenancePhotoUrls: String? = null, //维保照片/项目照片
|
||||||
|
var voucherPhotoUrls: String? = null, //维保清单/凭证照片
|
||||||
|
var auditRemark: String? = null, //维保审核备注
|
||||||
|
var createTime: String? = null, //创建时间
|
||||||
|
var updateTime: String? = null, //修改时间
|
||||||
|
) {
|
||||||
|
fun getPayTypeStr(): String {
|
||||||
|
return when (paymentType) {
|
||||||
|
1 -> "月结"
|
||||||
|
2 -> "全包"
|
||||||
|
3 -> "现金"
|
||||||
|
4 -> "月结+现金"
|
||||||
|
else -> ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//维保提价记录
|
||||||
|
data class FetchVehicleMaintenanceSubmitHistoryRequestBean(val vehicleId: Int? = null, val driverId: Int? = null, val id: Int? = null)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日保养的请求信息
|
||||||
|
*/
|
||||||
|
data class VehicleMaintenanceHistoryBean(
|
||||||
|
val id: Int? = null,
|
||||||
|
val stage: String? = null,//阶段 //1 维保申请审批中 2,"维保申请不通过" 3,"维保申请通过" 4,"维保完成审批中" 5,"维保完成不通过" 6,"维保完成通过" 9,"维保终止"
|
||||||
|
val vehicleId: Int? = null,//车辆ID
|
||||||
|
val vehicleName: String? = null,//
|
||||||
|
val plateNumber: String? = null,//车牌号
|
||||||
|
val states: Int? = null,//维保状态
|
||||||
|
val statesStr: String? = null,//维保状态-描述
|
||||||
|
val address: String? = null,//维修地址
|
||||||
|
val repairPoint: String? = null,//维修点名称
|
||||||
|
val vehicleRepairId: Int? = null,//维修点Id
|
||||||
|
val longitude: Double? = null,//维保地址经度
|
||||||
|
val latitude: Double? = null,//维保地址纬度
|
||||||
|
val storePhotoUrls: String? = null,//门店照片
|
||||||
|
val paymentType: Int? = null,//支付类型 1挂账 2现金
|
||||||
|
val amount: Double? = null,//维保金额
|
||||||
|
val mileage: Double? = null,//车辆里程数
|
||||||
|
val information: String? = null,//维保信息
|
||||||
|
val maintenancePhotoUrls: String? = null,//维保照片/项目照片
|
||||||
|
val voucherPhotoUrls: String? = null,//维保清单/凭证照片
|
||||||
|
val auditRemark: String? = null,//维保审核备注
|
||||||
|
val createTime: String? = null,//创建时间
|
||||||
|
val updateTime: String? = null//修改时间
|
||||||
|
)
|
||||||
|
|
||||||
|
data class VehicleRepairPointMatcherItem(
|
||||||
|
val id: Int? = null,
|
||||||
|
val repairName: String? = null,
|
||||||
|
val repairLon: Double? = null,
|
||||||
|
val repairLat: Double? = null,
|
||||||
|
val repairAddress: String? = null,
|
||||||
|
val supplierId: Int? = null,
|
||||||
|
val distance: Double? = null,
|
||||||
|
val isSelected: Boolean? = false,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class VehicleRepairPointMatcherListRequest(
|
||||||
|
val vehicleId: Int? = null,
|
||||||
|
val address: String? = null,
|
||||||
|
val longitude: Double? = null,
|
||||||
|
val latitude: Double? = null)
|
||||||
|
|
||||||
|
data class VehicleMaintenanceSubmitRequest(
|
||||||
|
val id: Int? = null,//维保记录ID
|
||||||
|
val vehicleId: Int? = null,//车辆ID
|
||||||
|
val driverId: Int? = null,//司机ID
|
||||||
|
val submitType: Int? = null,//提交类型 1维修开始申请 2维保完成申请
|
||||||
|
val address: String? = null,//维修地址
|
||||||
|
val longitude: Double? = null,//维修地址经度
|
||||||
|
val latitude: Double? = null,//维修地址纬度
|
||||||
|
val vehicleRepairId: Int? = null,//维修点Id
|
||||||
|
val storePhotoUrls: String? = null,//门店照片
|
||||||
|
val paymentType: Int? = null,//支付类型和结算类型
|
||||||
|
val amount: Double? = null,//维保金额
|
||||||
|
val mileage: Int? = null,//车辆里程数
|
||||||
|
val information: String? = null,//维保信息/项目
|
||||||
|
val maintenancePhotoUrls: String? = null,//维保照片/项目照片
|
||||||
|
val voucherPhotoUrls: String? = null,//维保清单/凭证照片
|
||||||
|
val auditRemark: String? = null,//维保审核备注
|
||||||
|
val remark: String? = null//维保备注
|
||||||
|
)
|
@ -0,0 +1,75 @@
|
|||||||
|
package com.za.bean.request
|
||||||
|
|
||||||
|
data class UpdateTaskRequest(
|
||||||
|
val id: Int? = null,
|
||||||
|
val type: String? = null,
|
||||||
|
val taskId: Int? = null,
|
||||||
|
val userId: Int? = null,
|
||||||
|
val vehicleId: Int? = null,
|
||||||
|
val currentState: String? = null,
|
||||||
|
val operateTime: String? = null,
|
||||||
|
val lat: Double? = null,
|
||||||
|
val lng: Double? = null,
|
||||||
|
val address: String? = null,
|
||||||
|
val offlineMode: Int? = null,
|
||||||
|
val content: String? = null, //验证输入内容
|
||||||
|
val newCarCode: String? = null,
|
||||||
|
val flowType: Int? = null,
|
||||||
|
val success: Int? = null, //作业是否完成 0 成功 1不成功 拖车默认成功
|
||||||
|
val templatePhotoInfoList: List<String?>? = null
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
data class UpdateTaskBean(val nextState: String? = null, val address: Long? = null)
|
||||||
|
|
||||||
|
|
||||||
|
data class TaskFinishResponse(
|
||||||
|
val nextState: String? = null,
|
||||||
|
val advanceTime: Long? = null,
|
||||||
|
val electronOrderState: Int? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class UpdateOrderConfirmTaskRequest(
|
||||||
|
val type: String? = null,
|
||||||
|
val taskId: Int? = null,
|
||||||
|
val userId: Int? = null,
|
||||||
|
val vehicleId: Int? = null,
|
||||||
|
val currentState: String? = null,
|
||||||
|
val operateTime: String? = null,
|
||||||
|
val offlineMode: Int? = null,
|
||||||
|
val supplierType: Int? = null,
|
||||||
|
val settleType: Int? = null,
|
||||||
|
val success: Int? = null,
|
||||||
|
val lat: Double? = null,
|
||||||
|
val lng: Double? = null,
|
||||||
|
val carryMileage:Int?=null,
|
||||||
|
val startMileage:Int?=null,
|
||||||
|
//老系统
|
||||||
|
val wheelFee: Int? = null,
|
||||||
|
//子公司
|
||||||
|
val startPrice: Int? = null,
|
||||||
|
val unitPrice: Double? = null,
|
||||||
|
val mileage: Int? = null,
|
||||||
|
val basePrice: Double? = null,
|
||||||
|
val startRoadFee: Int? = null,
|
||||||
|
val carryRoadFee: Int? = null,
|
||||||
|
val waitFee: Int? = null,
|
||||||
|
val wheelNum: Int? = null,
|
||||||
|
val wheelPrice: Int? = null,
|
||||||
|
val dilemmaFee: Int? = null,
|
||||||
|
val basementFee: Int? = null,
|
||||||
|
val assistFee: Double? = null,
|
||||||
|
val totalFee: Double? = null,
|
||||||
|
val img1: String? = null,
|
||||||
|
val img2: String? = null,
|
||||||
|
val img3: String? = null,
|
||||||
|
val img4: String? = null,
|
||||||
|
val img1Info: String? = null,
|
||||||
|
val img2Info: String? = null,
|
||||||
|
val img3Info: String? = null,
|
||||||
|
val img4Info: String? = null,
|
||||||
|
|
||||||
|
val imgList: List<String>? = null,
|
||||||
|
val imgInfoList: List<String>? = null,
|
||||||
|
val templatePhotoInfoList: List<String?>? = null
|
||||||
|
)
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.za.bean.request
|
||||||
|
|
||||||
|
data class UploadGpsRequest(
|
||||||
|
var vehicleId: Int? = null,
|
||||||
|
var userId: Int? = null,
|
||||||
|
var lat: Double? = null,
|
||||||
|
var lng: Double? = null,
|
||||||
|
var speed: Double? = null,
|
||||||
|
var direction: Double? = null,
|
||||||
|
var working: Boolean? = false,
|
||||||
|
)
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.za.bean.request
|
||||||
|
|
||||||
|
//车辆列表请求
|
||||||
|
data class VehicleListRequest(
|
||||||
|
val supplierCode: String? = null,
|
||||||
|
val content: String? = null
|
||||||
|
)
|
||||||
|
|
||||||
|
data class UpdateVehicleStateRequest(
|
||||||
|
val vehicleId: Int? = null,
|
||||||
|
val status: Int? = null,
|
||||||
|
val userId: Int? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class GeneralInfoRequest(
|
||||||
|
val vehicleId: Int? = null,
|
||||||
|
val driverId: Int? = null,
|
||||||
|
val deviceId: String? = null,
|
||||||
|
)
|