首次提交
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
*.iml
|
||||||
|
.gradle
|
||||||
|
/local.properties
|
||||||
|
/.idea/caches
|
||||||
|
/.idea/libraries
|
||||||
|
/.idea/modules.xml
|
||||||
|
/.idea/workspace.xml
|
||||||
|
/.idea/navEditor.xml
|
||||||
|
/.idea/assetWizardSettings.xml
|
||||||
|
.DS_Store
|
||||||
|
/build
|
||||||
|
/captures
|
||||||
|
.externalNativeBuild
|
||||||
|
.cxx
|
||||||
|
local.properties
|
||||||
|
.idea/
|
||||||
|
.idea/gradle.xml
|
||||||
|
.idea/misc.xml
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
plugins {
|
||||||
|
id 'com.android.application'
|
||||||
|
id 'kotlin-android'
|
||||||
|
// id 'kotlin-android-extensions'
|
||||||
|
id 'kotlin-kapt'
|
||||||
|
id 'org.jetbrains.kotlin.android'
|
||||||
|
id 'kotlin-parcelize'
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdk rootProject.ext.compileSdkVersion
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "com.xjjk.healthyclients"
|
||||||
|
minSdk rootProject.ext.minSdkVersion
|
||||||
|
targetSdk rootProject.ext.targetSdkVersion
|
||||||
|
versionCode rootProject.ext.versionCode
|
||||||
|
versionName rootProject.ext.versionName
|
||||||
|
|
||||||
|
ndk {
|
||||||
|
// 选择实际需要的cpu架构
|
||||||
|
abiFilters 'armeabi-v7a', 'arm64-v8a'//, 'x86', 'x86_64'
|
||||||
|
}
|
||||||
|
// manifestPlaceholders = [
|
||||||
|
// JPUSH_PKGNAME : applicationId,
|
||||||
|
// JPUSH_APPKEY : "45f403286fced2b6dda971f9", //JPush 上注册的包名对应的 Appkey.
|
||||||
|
// JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
|
||||||
|
// XIAOMI_APPID : "MI-小米的APPID",
|
||||||
|
// XIAOMI_APPKEY : "MI-小米的APPKEY",
|
||||||
|
// OPPO_APPKEY : "OP-oppo的APPKEY",
|
||||||
|
// OPPO_APPID : "OP-oppo的APPID",
|
||||||
|
// OPPO_APPSECRET : "OP-oppo的APPSECRET",
|
||||||
|
// VIVO_APPKEY : "vivo的APPKEY",
|
||||||
|
// VIVO_APPID : "vivo的APPID",
|
||||||
|
// HONOR_APPID : "Honor的APP ID"
|
||||||
|
// ]
|
||||||
|
}
|
||||||
|
|
||||||
|
signingConfigs{
|
||||||
|
release {
|
||||||
|
storeFile file('/key/yxjk-release.jks')
|
||||||
|
storePassword "yxjk1234"
|
||||||
|
keyAlias "yxjk"
|
||||||
|
keyPassword "yxjk1234"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
// debuggable false
|
||||||
|
signingConfig signingConfigs.release
|
||||||
|
}
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
signingConfig signingConfigs.release
|
||||||
|
android.applicationVariants.all { variant ->
|
||||||
|
variant.outputs.all { output ->
|
||||||
|
def sourceFile = "app-release"
|
||||||
|
def replaceFile = "app-yixiong_v${defaultConfig.versionName}"
|
||||||
|
outputFileName = output.outputFile.name.replace(sourceFile, replaceFile)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_11
|
||||||
|
targetCompatibility JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = '1.8'
|
||||||
|
}
|
||||||
|
packagingOptions {
|
||||||
|
exclude 'META-INF/gradle/incremental.annotation.processors'
|
||||||
|
exclude 'DebugProbesKt.bin'
|
||||||
|
}
|
||||||
|
testOptions {
|
||||||
|
unitTests.returnDefaultValues = true
|
||||||
|
}
|
||||||
|
dataBinding {
|
||||||
|
enabled = true
|
||||||
|
}
|
||||||
|
kapt {
|
||||||
|
generateStubs = true
|
||||||
|
}
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
jniLibs.srcDirs = ['libs']
|
||||||
|
res.srcDirs = [
|
||||||
|
'src/main/res-login',
|
||||||
|
'src/main/res-health-check',
|
||||||
|
'src/main/res-health-record',
|
||||||
|
// 'src/main/res-intervention',
|
||||||
|
'src/main/res-intervention2',
|
||||||
|
'src/main/res-gastrointestinal',
|
||||||
|
'src/main/res-guidance',
|
||||||
|
'src/main/res-dossier',
|
||||||
|
'src/main/res-emergency',
|
||||||
|
'src/main/res-service-centre',
|
||||||
|
'src/main/res-user',
|
||||||
|
'src/main/res-knowledge',
|
||||||
|
'src/main/res-other',
|
||||||
|
'src/main/res'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation files('libs\\BASE64Encoder.jar')
|
||||||
|
implementation files('libs\\com.heytap.msp_3.1.0.aar')
|
||||||
|
//CGM
|
||||||
|
// implementation files('libs/cgmlib-release.aar')
|
||||||
|
// implementation files('libs/blecomm-release.aar')
|
||||||
|
// implementation files('libs/cgat-release.aar')
|
||||||
|
// implementation files('libs/bgmlib-release.aar')
|
||||||
|
|
||||||
|
|
||||||
|
/*高德地图*/
|
||||||
|
implementation rootProject.ext.mapLibs
|
||||||
|
|
||||||
|
implementation project(path: ':video')
|
||||||
|
implementation project(path: ':core')
|
||||||
|
// implementation project(path: ':ALibs')
|
||||||
|
implementation project(path: ':rsalibrary')
|
||||||
|
implementation project(path: ':AgentWebCore')
|
||||||
|
implementation project(path: ':AAChartCore')
|
||||||
|
implementation project(path: ':xpopup')
|
||||||
|
|
||||||
|
implementation project(':tuichat')
|
||||||
|
implementation project(':tuicontact')
|
||||||
|
implementation project(':tuiconversation')
|
||||||
|
implementation project(':tuigroup')
|
||||||
|
implementation project(':tuicallkit')
|
||||||
|
|
||||||
|
//JSoup
|
||||||
|
api 'org.jsoup:jsoup:1.12.1'
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Vendored
+147
@@ -0,0 +1,147 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
#基本指令区
|
||||||
|
-optimizationpasses 5 #指定压缩级别
|
||||||
|
-optimizations !code/simplification/arithmetic,!field/,!class/merging/ #混淆时采用的算法
|
||||||
|
-verbose #打印混淆的详细信息
|
||||||
|
-dontoptimize #关闭优化
|
||||||
|
-keepattributes Annotation #保留注解中的参数
|
||||||
|
-keepattributes Annotation,InnerClasses # 保持注解
|
||||||
|
-keepattributes Signature # 避免混淆泛型, 这在JSON实体映射时非常重要
|
||||||
|
-ignorewarnings # 屏蔽警告
|
||||||
|
-keepattributes SourceFile,LineNumberTable # 抛出异常时保留代码行号
|
||||||
|
-dontusemixedcaseclassnames
|
||||||
|
|
||||||
|
#默认保留区
|
||||||
|
-keep public class * extends android.app.Activity
|
||||||
|
-keep public class * extends androidx.fragment.app.Fragment
|
||||||
|
-keep public class * extends android.app.Application
|
||||||
|
-keep public class * extends android.app.Service
|
||||||
|
-keep public class * extends android.content.BroadcastReceiver
|
||||||
|
-keep public class * extends android.content.ContentProvider
|
||||||
|
-keep public class * extends android.app.backup.BackupAgentHelper
|
||||||
|
-keep public class * extends android.preference.Preference
|
||||||
|
-keep public class * extends android.view.View
|
||||||
|
-keep class android.support.** {*;}
|
||||||
|
|
||||||
|
-keep class com.google.android.material.** {*;}
|
||||||
|
-keep class androidx.* {*;}
|
||||||
|
-keep public class * extends androidx.*
|
||||||
|
-keep interface androidx.**{*;}
|
||||||
|
-keep class * implements androidx.* {*;}
|
||||||
|
#androidx 混淆
|
||||||
|
-dontwarn com.google.android.material.*
|
||||||
|
-dontnote com.google.android.material.**
|
||||||
|
-dontwarn androidx.**
|
||||||
|
-printconfiguration
|
||||||
|
-keep,allowobfuscation interface androidx.annotation.Keep
|
||||||
|
-keep @androidx.annotation.Keep class *
|
||||||
|
-keepclassmembers class * {@androidx.annotation.Keep *;}
|
||||||
|
#set get方法 和 构造方法不混淆
|
||||||
|
-keep public class * extends android.view.View{
|
||||||
|
*** get();
|
||||||
|
void set(***);
|
||||||
|
public <init>(android.content.Context);
|
||||||
|
public <init>(android.content.Context, android.util.AttributeSet);
|
||||||
|
public <init>(android.content.Context, android.util.AttributeSet, int);}
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
public <init>(android.content.Context, android.util.AttributeSet);
|
||||||
|
public <init>(android.content.Context, android.util.AttributeSet, int);}
|
||||||
|
#onClick不进行混淆
|
||||||
|
-keepclassmembers class * extends android.app.Activity {
|
||||||
|
public void *(android.view.View);
|
||||||
|
}
|
||||||
|
# Serializable 不被混淆
|
||||||
|
-keepnames class * implements java.io.Serializable
|
||||||
|
#Serializable接口的类重写父类方法保留
|
||||||
|
-keepclassmembers class * implements java.io.Serializable {
|
||||||
|
static final long serialVersionUID;
|
||||||
|
private 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();}
|
||||||
|
#保留R文件中所有静态字段
|
||||||
|
-keepclassmembers class *.R$ {
|
||||||
|
public static <fields>;
|
||||||
|
}
|
||||||
|
-keepclassmembers class * {
|
||||||
|
void ();
|
||||||
|
}
|
||||||
|
#保留枚举类中的values和valueOf方法
|
||||||
|
-keepclassmembers enum * {
|
||||||
|
public static **[] values();
|
||||||
|
public static ** valueOf(java.lang.String);
|
||||||
|
}
|
||||||
|
#保留Parcelable实现类中的Creator字段
|
||||||
|
-keep class * implements android.os.Parcelable {
|
||||||
|
public static final android.os.Parcelable$Creator *;
|
||||||
|
}
|
||||||
|
|
||||||
|
#保持 Parcelable 不被混淆
|
||||||
|
-keep class * implements android.os.Parcelable {
|
||||||
|
public static final android.os.Parcelable$Creator *;
|
||||||
|
}
|
||||||
|
#不混淆包含native方法的类的类名以及native方法名
|
||||||
|
-keepclasseswithmembernames class * {
|
||||||
|
native<methods>;
|
||||||
|
}
|
||||||
|
#避免log打印输出
|
||||||
|
-assumenosideeffects class android.util.Log {
|
||||||
|
public static *** v(...);
|
||||||
|
public static *** d(...);
|
||||||
|
public static *** i(...);
|
||||||
|
public static *** w(...);
|
||||||
|
}
|
||||||
|
#webView需要进行特殊处理
|
||||||
|
-dontwarn android.webkit.WebView
|
||||||
|
-dontwarn android.net.http.SslError
|
||||||
|
-dontwarn android.webkit.WebViewClient
|
||||||
|
-keep public class android.webkit.WebView
|
||||||
|
-keep public class android.net.http.SslError
|
||||||
|
-keep public class android.webkit.WebViewClient
|
||||||
|
#AgentWeb
|
||||||
|
-keep class com.just.agentweb.** {
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
#-dontwarn com.just.agentweb.**
|
||||||
|
#九宫格组件
|
||||||
|
-dontwarn com.lwkandroid.widget.ninegridview.**
|
||||||
|
-keep class com.lwkandroid.widget.ninegridview.**{*;}
|
||||||
|
#饺子播放器
|
||||||
|
-keep public class cn.jzvd.JZMediaSystem {*; }
|
||||||
|
-keep class tv.danmaku.ijk.media.player.** {*; }
|
||||||
|
-dontwarn tv.danmaku.ijk.media.player.*
|
||||||
|
-keep interface tv.danmaku.ijk.media.player.** { *; }
|
||||||
|
#实体类不可混淆
|
||||||
|
-keep class com.xjjk.healthyclients.bean.**{ *; }
|
||||||
|
#OkHttp3 去掉缺失类警告
|
||||||
|
-dontwarn org.bouncycastle.**
|
||||||
|
-dontwarn org.conscrypt.**
|
||||||
|
-dontwarn org.openjsse.javax.net.ssl.**
|
||||||
|
-dontwarn org.openjsse.net.ssl.**
|
||||||
|
|
||||||
|
-keep class com.github.aachartmodel.aainfographics.aachartcreator.AAChartView {
|
||||||
|
public void aa_drawChartWithChartModel( com.github.aachartmodel.aainfographics.aachartcreator.AAChartModel);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
package="com.xjjk.healthyclients">
|
||||||
|
|
||||||
|
<uses-sdk
|
||||||
|
tools:ignore="MultipleUsesSdk"
|
||||||
|
tools:overrideLibrary="com.microtechmd.cgmlib,com.microtechmd.bgmlib" />
|
||||||
|
|
||||||
|
<!--用于进行网络定位-->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
|
||||||
|
<!--用于访问GPS定位-->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
|
||||||
|
<!--用于获取运营商信息,用于支持提供运营商信息相关的接口-->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
|
||||||
|
<!--用于访问wifi网络信息,wifi信息会用于进行网络定位-->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
|
||||||
|
<!--用于获取wifi的获取权限,wifi信息会用来进行网络定位-->
|
||||||
|
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
|
||||||
|
<!--用于访问网络,网络定位需要上网-->
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
||||||
|
<!--用于读取手机当前的状态-->
|
||||||
|
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
|
||||||
|
<!--用于写入缓存数据到扩展存储卡-->
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
|
||||||
|
<!--通知-->
|
||||||
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"></uses-permission>
|
||||||
|
<!--用于申请调用A-GPS模块-->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"></uses-permission>
|
||||||
|
<!--如果设置了target >= 28 如果需要启动后台定位则必须声明这个权限-->
|
||||||
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
|
<!--如果您的应用需要后台定位权限,且有可能运行在Android Q设备上,并且设置了target>28,必须增加这个权限声明-->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||||
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||||
|
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
<!-- Android8.0 以后,如果要安装 apk 需要额外添加权限:-->
|
||||||
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
|
|
||||||
|
<!--Android 13版本适配,细化存储权限-->
|
||||||
|
<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" />
|
||||||
|
|
||||||
|
<!--Android 11-->
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||||
|
|
||||||
|
<!--oppo读取安装列表-->
|
||||||
|
<uses-permission android:name="com.android.permission.GET_INSTALLED_APPS" />
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.QUERY_ALL_PACKAGES"
|
||||||
|
tools:ignore="QueryAllPackagesPermission" />
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.BLUETOOTH_SCAN"
|
||||||
|
android:usesPermissionFlags="neverForLocation" />
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:name=".MyApplication"
|
||||||
|
android:allowBackup="false"
|
||||||
|
android:allowNativeHeapPointerTagging="false"
|
||||||
|
android:icon="@drawable/ic_icon"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
|
android:resizeableActivity="false"
|
||||||
|
android:roundIcon="@drawable/ic_icon"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:taskAffinity="com.xjjk.healthyclients"
|
||||||
|
android:theme="@style/Theme.HearthyClients"
|
||||||
|
android:usesCleartextTraffic="true"
|
||||||
|
tools:replace="android:allowBackup">
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.amap.api.v2.apikey"
|
||||||
|
android:value="f3f11f6883c6241393cb144b6b1aec99" />
|
||||||
|
<!--高德定位服务-->
|
||||||
|
<service android:name="com.amap.api.location.APSService" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:screenOrientation="portrait">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<!--登录页-->
|
||||||
|
<activity
|
||||||
|
android:name="com.xjjk.healthyclients.ui.activity.LoginActivity"
|
||||||
|
android:launchMode="singleTask"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<!--个人信息设置-->
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.ChangePassWordActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.RetrievePassWordActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.WebActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.UserInfoSettingActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.UserSettingActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.UserMyGuidanceActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.ConsultantManagerActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.EditConsultantActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.BaseHealthyInfoAddActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.emergency.EmergencySeekDoctorActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.AppointmentDetailActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.DoctorsGuidanceActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.DoctorHomepageActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.FilterSearchDoctorActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.SeekDoctorSearchActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.SelectConsultantActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.SelectAppointmentTimeActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.GuidanceNoticeActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.DoctorAllAppraiseActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.ArchivesDetailActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.FullScreenImageActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.ConsultArchivesDetailActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.emergency.EmergencySeekDoctorDetailsActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.emergency.AddBigDiseaseActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.GeneralPracticeGuidanceActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.guidance.MyGuidanceActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.InterventionWebActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activity.CvdWarningHistoryActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"textColorNormal": "#A4A3A3",
|
||||||
|
"textColorSelected": "#21BEBD",
|
||||||
|
"textSizeNormal": 9,
|
||||||
|
"textSizeSelected": 9,
|
||||||
|
"backgroundColor": "#e9e9e9",
|
||||||
|
"isNameResId": false,
|
||||||
|
"isTitleVisible": true,
|
||||||
|
"tabs": [
|
||||||
|
{
|
||||||
|
"tabName": "首页",
|
||||||
|
"tabTag": "key_guidance_fragment",
|
||||||
|
"iconNormal": "main_home_tab_index_normal",
|
||||||
|
"iconSelected": "main_home_tab_index_selected"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tabName": "就医",
|
||||||
|
"tabTag": "key_emergency_fragment",
|
||||||
|
"iconNormal": "main_home_tab_emergency_normal",
|
||||||
|
"iconSelected": "main_home_tab_emergency_selected",
|
||||||
|
"itemBg": "home_tab_center_bg"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tabName": "监测",
|
||||||
|
"tabTag": "key_monitor_fragment",
|
||||||
|
"iconNormal": "main_home_tab_monitor_normal",
|
||||||
|
"iconSelected": "main_home_tab_monitor_selected",
|
||||||
|
"itemBg": "home_tab_center_bg"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tabName": "我的",
|
||||||
|
"tabTag": "key_my_fragment",
|
||||||
|
"iconNormal": "main_home_tab_my_normal",
|
||||||
|
"iconSelected": "main_home_tab_my_selected"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
package com.xjjk.healthyclients
|
||||||
|
|
||||||
|
import com.sw.healthyclients.data.local.DataStoreManager
|
||||||
|
import com.sw.healthyclients.utils.CustomActivityManager
|
||||||
|
import com.tencent.imsdk.v2.V2TIMCallback
|
||||||
|
import com.tencent.imsdk.v2.V2TIMManager
|
||||||
|
import com.tencent.imsdk.v2.V2TIMUserFullInfo
|
||||||
|
import com.tencent.qcloud.tuicore.util.ToastUtil
|
||||||
|
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIGroupChatActivity
|
||||||
|
import com.xjjk.healthyclients.MyApplication.Companion.appContext
|
||||||
|
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel
|
||||||
|
import com.xjjk.healthyclients.bean.im.IMInfoBean
|
||||||
|
import com.xjjk.healthyclients.data.repository.GuidanceRepository
|
||||||
|
import com.xjjk.healthyclients.data.repository.IMRepository
|
||||||
|
import com.xjjk.healthyclients.event.AppraiseFinishEvent
|
||||||
|
import com.xjjk.healthyclients.retrofit.UrlConfig
|
||||||
|
import com.xjjk.healthyclients.superfuntion.addImageBaseUrl
|
||||||
|
import com.xjjk.healthyclients.superfuntion.handleRequest
|
||||||
|
import com.xjjk.healthyclients.superfuntion.hideLoading
|
||||||
|
import com.xjjk.healthyclients.superfuntion.launch
|
||||||
|
import com.xjjk.healthyclients.utils.TUIUtils
|
||||||
|
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||||
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
|
import org.greenrobot.eventbus.EventBus
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author nanfeifei
|
||||||
|
* @time 2023/5/11 14:11
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
class AppViewModel: BaseViewModel() {
|
||||||
|
var imSig = MutableStateFlow("")
|
||||||
|
var imUserId = MutableStateFlow("")
|
||||||
|
var imAppId = MutableStateFlow("")
|
||||||
|
var userHaveWatch = MutableSharedFlow<Boolean?>()
|
||||||
|
override fun init() {
|
||||||
|
}
|
||||||
|
fun getIMSig(successCall: (IMInfoBean) -> Unit = {}){
|
||||||
|
if (!UrlConfig.isOpenIm) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
launch({
|
||||||
|
handleRequest(IMRepository.getIMSig(), successBlock = {
|
||||||
|
it.result?.let { imBean ->
|
||||||
|
appContext.initIMSDK(imBean.sdkAppId.toInt())
|
||||||
|
imSig.emit(imBean.userSig)
|
||||||
|
imUserId.emit(imBean.userId)
|
||||||
|
imAppId.emit(imBean.sdkAppId)
|
||||||
|
successCall.invoke(imBean)
|
||||||
|
}
|
||||||
|
}, errorBlock = {
|
||||||
|
false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
fun setUserIMInfo(){
|
||||||
|
var info = V2TIMUserFullInfo()
|
||||||
|
var userInfo = DataStoreManager.getUserInfo()
|
||||||
|
info.setNickname(userInfo.realname)
|
||||||
|
info.faceUrl = addImageBaseUrl(userInfo.avatar)
|
||||||
|
V2TIMManager.getInstance().setSelfInfo(info, object : V2TIMCallback {
|
||||||
|
override fun onSuccess() {
|
||||||
|
// 设置个人资料成功
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onError(code: Int, desc: String) {
|
||||||
|
// 设置个人资料失败
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
fun finishIMChat(workType: Int, workId: String){
|
||||||
|
launch({
|
||||||
|
when(workType){
|
||||||
|
TUIUtils.WORK_TYPE_EMERGENCY -> {
|
||||||
|
handleRequest(IMRepository.finishIMEmergency(workId))
|
||||||
|
}
|
||||||
|
TUIUtils.WORK_TYPE_IMAGE_TEXT_CONSULT -> {
|
||||||
|
handleRequest(IMRepository.finishIMImageText(workId))
|
||||||
|
}
|
||||||
|
TUIUtils.WORK_TYPE_ASSISTANT -> {
|
||||||
|
handleRequest(IMRepository.finishIMImageText(workId))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}, finallyBlock = {
|
||||||
|
hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
fun submitAppraise(chatId: String, workType: Int, workId: String, score: Float, content: String, anonymity: Boolean){
|
||||||
|
launch({
|
||||||
|
when(workType){
|
||||||
|
TUIUtils.WORK_TYPE_EMERGENCY -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
TUIUtils.WORK_TYPE_IMAGE_TEXT_CONSULT -> {
|
||||||
|
handleRequest(GuidanceRepository.submitConsultAppraise("", workId, score, content, anonymity), successBlock = {
|
||||||
|
// val customEvaluationMessage = CustomEvaluationMessage()
|
||||||
|
// customEvaluationMessage.score = score
|
||||||
|
// customEvaluationMessage.comment = content
|
||||||
|
// EventBus.getDefault().post(CustomMessageEvent(chatId, customEvaluationMessage.toJson()))
|
||||||
|
ToastUtil.toastShortMessage(it.message)
|
||||||
|
EventBus.getDefault().post(AppraiseFinishEvent())
|
||||||
|
CustomActivityManager.getInstance()
|
||||||
|
.finishActivity(TUIGroupChatActivity::class.java)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
TUIUtils.WORK_TYPE_ASSISTANT -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}, finallyBlock = {
|
||||||
|
hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,313 @@
|
|||||||
|
package com.xjjk.healthyclients.CustomMedia;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.SurfaceTexture;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.HandlerThread;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.Surface;
|
||||||
|
|
||||||
|
import com.google.android.exoplayer2.C;
|
||||||
|
import com.google.android.exoplayer2.DefaultLoadControl;
|
||||||
|
import com.google.android.exoplayer2.DefaultRenderersFactory;
|
||||||
|
import com.google.android.exoplayer2.ExoPlaybackException;
|
||||||
|
import com.google.android.exoplayer2.ExoPlayerFactory;
|
||||||
|
import com.google.android.exoplayer2.LoadControl;
|
||||||
|
import com.google.android.exoplayer2.PlaybackParameters;
|
||||||
|
import com.google.android.exoplayer2.Player;
|
||||||
|
import com.google.android.exoplayer2.RenderersFactory;
|
||||||
|
import com.google.android.exoplayer2.SimpleExoPlayer;
|
||||||
|
import com.google.android.exoplayer2.Timeline;
|
||||||
|
import com.google.android.exoplayer2.source.ExtractorMediaSource;
|
||||||
|
import com.google.android.exoplayer2.source.MediaSource;
|
||||||
|
import com.google.android.exoplayer2.source.TrackGroupArray;
|
||||||
|
import com.google.android.exoplayer2.source.hls.HlsMediaSource;
|
||||||
|
import com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection;
|
||||||
|
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
||||||
|
import com.google.android.exoplayer2.trackselection.TrackSelection;
|
||||||
|
import com.google.android.exoplayer2.trackselection.TrackSelectionArray;
|
||||||
|
import com.google.android.exoplayer2.trackselection.TrackSelector;
|
||||||
|
import com.google.android.exoplayer2.upstream.BandwidthMeter;
|
||||||
|
import com.google.android.exoplayer2.upstream.DataSource;
|
||||||
|
import com.google.android.exoplayer2.upstream.DefaultAllocator;
|
||||||
|
import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter;
|
||||||
|
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
||||||
|
import com.google.android.exoplayer2.util.Util;
|
||||||
|
import com.google.android.exoplayer2.video.VideoListener;
|
||||||
|
import com.xjjk.healthyclients.R;
|
||||||
|
|
||||||
|
import cn.jzvd.JZMediaInterface;
|
||||||
|
import cn.jzvd.Jzvd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by MinhDV on 5/3/18.
|
||||||
|
*/
|
||||||
|
public class JZMediaExo extends JZMediaInterface implements Player.EventListener, VideoListener {
|
||||||
|
private SimpleExoPlayer simpleExoPlayer;
|
||||||
|
private Runnable callback;
|
||||||
|
private String TAG = "JZMediaExo";
|
||||||
|
private long previousSeek = 0;
|
||||||
|
|
||||||
|
public JZMediaExo(Jzvd jzvd) {
|
||||||
|
super(jzvd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void start() {
|
||||||
|
simpleExoPlayer.setPlayWhenReady(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void prepare() {
|
||||||
|
Log.e(TAG, "prepare");
|
||||||
|
Context context = jzvd.getContext();
|
||||||
|
|
||||||
|
release();
|
||||||
|
mMediaHandlerThread = new HandlerThread("JZVD");
|
||||||
|
mMediaHandlerThread.start();
|
||||||
|
mMediaHandler = new Handler(mMediaHandlerThread.getLooper());//主线程还是非主线程,就在这里
|
||||||
|
handler = new Handler();
|
||||||
|
mMediaHandler.post(() -> {
|
||||||
|
BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
|
||||||
|
TrackSelection.Factory videoTrackSelectionFactory =
|
||||||
|
new AdaptiveTrackSelection.Factory(bandwidthMeter);
|
||||||
|
TrackSelector trackSelector =
|
||||||
|
new DefaultTrackSelector(videoTrackSelectionFactory);
|
||||||
|
|
||||||
|
LoadControl loadControl = new DefaultLoadControl(new DefaultAllocator(true, C.DEFAULT_BUFFER_SEGMENT_SIZE),
|
||||||
|
360000, 600000, 1000, 5000,
|
||||||
|
C.LENGTH_UNSET,
|
||||||
|
false);
|
||||||
|
|
||||||
|
// 2. Create the player
|
||||||
|
|
||||||
|
RenderersFactory renderersFactory = new DefaultRenderersFactory(context);
|
||||||
|
simpleExoPlayer = ExoPlayerFactory.newSimpleInstance(context, renderersFactory, trackSelector, loadControl);
|
||||||
|
// Produces DataSource instances through which media data is loaded.
|
||||||
|
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(context,
|
||||||
|
Util.getUserAgent(context, context.getResources().getString(R.string.app_name)));
|
||||||
|
|
||||||
|
String currUrl = jzvd.jzDataSource.getCurrentUrl().toString();
|
||||||
|
MediaSource videoSource;
|
||||||
|
if (currUrl.contains(".m3u8")) {
|
||||||
|
videoSource = new HlsMediaSource.Factory(dataSourceFactory)
|
||||||
|
.createMediaSource(Uri.parse(currUrl), handler, null);
|
||||||
|
} else {
|
||||||
|
videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
|
||||||
|
.createMediaSource(Uri.parse(currUrl));
|
||||||
|
}
|
||||||
|
simpleExoPlayer.addVideoListener(this);
|
||||||
|
|
||||||
|
Log.e(TAG, "URL Link = " + currUrl);
|
||||||
|
|
||||||
|
simpleExoPlayer.addListener(this);
|
||||||
|
Boolean isLoop = jzvd.jzDataSource.looping;
|
||||||
|
if (isLoop) {
|
||||||
|
simpleExoPlayer.setRepeatMode(Player.REPEAT_MODE_ONE);
|
||||||
|
} else {
|
||||||
|
simpleExoPlayer.setRepeatMode(Player.REPEAT_MODE_OFF);
|
||||||
|
}
|
||||||
|
simpleExoPlayer.prepare(videoSource);
|
||||||
|
simpleExoPlayer.setPlayWhenReady(true);
|
||||||
|
callback = new onBufferingUpdate();
|
||||||
|
|
||||||
|
simpleExoPlayer.setVideoSurface(new Surface(jzvd.textureView.getSurfaceTexture()));
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onVideoSizeChanged(int width, int height, int unappliedRotationDegrees, float pixelWidthHeightRatio) {
|
||||||
|
handler.post(() -> jzvd.onVideoSizeChanged(width, height));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRenderedFirstFrame() {
|
||||||
|
Log.e(TAG, "onRenderedFirstFrame");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void pause() {
|
||||||
|
simpleExoPlayer.setPlayWhenReady(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPlaying() {
|
||||||
|
return simpleExoPlayer.getPlayWhenReady();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void seekTo(long time) {
|
||||||
|
if (time != previousSeek) {
|
||||||
|
simpleExoPlayer.seekTo(time);
|
||||||
|
previousSeek = time;
|
||||||
|
jzvd.seekToInAdvance = time;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
if (mMediaHandler != null && mMediaHandlerThread != null && simpleExoPlayer != null) {//不知道有没有妖孽
|
||||||
|
HandlerThread tmpHandlerThread = mMediaHandlerThread;
|
||||||
|
SimpleExoPlayer tmpMediaPlayer = simpleExoPlayer;
|
||||||
|
JZMediaInterface.SAVED_SURFACE = null;
|
||||||
|
|
||||||
|
mMediaHandler.post(() -> {
|
||||||
|
tmpMediaPlayer.release();//release就不能放到主线程里,界面会卡顿
|
||||||
|
tmpHandlerThread.quit();
|
||||||
|
});
|
||||||
|
simpleExoPlayer = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getCurrentPosition() {
|
||||||
|
if (simpleExoPlayer != null)
|
||||||
|
return simpleExoPlayer.getCurrentPosition();
|
||||||
|
else return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getDuration() {
|
||||||
|
if (simpleExoPlayer != null)
|
||||||
|
return simpleExoPlayer.getDuration();
|
||||||
|
else return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setVolume(float leftVolume, float rightVolume) {
|
||||||
|
simpleExoPlayer.setVolume(leftVolume);
|
||||||
|
simpleExoPlayer.setVolume(rightVolume);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setSpeed(float speed) {
|
||||||
|
PlaybackParameters playbackParameters = new PlaybackParameters(speed, 1.0F);
|
||||||
|
simpleExoPlayer.setPlaybackParameters(playbackParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTimelineChanged(final Timeline timeline, Object manifest, final int reason) {
|
||||||
|
Log.e(TAG, "onTimelineChanged");
|
||||||
|
// JZMediaPlayer.instance().mainThreadHandler.post(() -> {
|
||||||
|
// if (reason == 0) {
|
||||||
|
//
|
||||||
|
// JzvdMgr.getCurrentJzvd().onInfo(reason, timeline.getPeriodCount());
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTracksChanged(TrackGroupArray trackGroups, TrackSelectionArray trackSelections) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadingChanged(boolean isLoading) {
|
||||||
|
Log.e(TAG, "onLoadingChanged");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlayerStateChanged(final boolean playWhenReady, final int playbackState) {
|
||||||
|
Log.e(TAG, "onPlayerStateChanged" + playbackState + "/ready=" + String.valueOf(playWhenReady));
|
||||||
|
handler.post(() -> {
|
||||||
|
switch (playbackState) {
|
||||||
|
case Player.STATE_IDLE: {
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Player.STATE_BUFFERING: {
|
||||||
|
handler.post(callback);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Player.STATE_READY: {
|
||||||
|
if (playWhenReady) {
|
||||||
|
jzvd.onStatePlaying();
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Player.STATE_ENDED: {
|
||||||
|
jzvd.onAutoCompletion();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRepeatModeChanged(int repeatMode) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onShuffleModeEnabledChanged(boolean shuffleModeEnabled) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlayerError(ExoPlaybackException error) {
|
||||||
|
Log.e(TAG, "onPlayerError" + error.toString());
|
||||||
|
handler.post(() -> jzvd.onError(1000, 1000));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPositionDiscontinuity(int reason) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlaybackParametersChanged(PlaybackParameters playbackParameters) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSeekProcessed() {
|
||||||
|
handler.post(() -> jzvd.onSeekComplete());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setSurface(Surface surface) {
|
||||||
|
simpleExoPlayer.setVideoSurface(surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
|
||||||
|
if (SAVED_SURFACE == null) {
|
||||||
|
SAVED_SURFACE = surface;
|
||||||
|
prepare();
|
||||||
|
} else {
|
||||||
|
jzvd.textureView.setSurfaceTexture(SAVED_SURFACE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSurfaceTextureUpdated(SurfaceTexture surface) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private class onBufferingUpdate implements Runnable {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (simpleExoPlayer != null) {
|
||||||
|
final int percent = simpleExoPlayer.getBufferedPercentage();
|
||||||
|
handler.post(() -> jzvd.setBufferProgress(percent));
|
||||||
|
if (percent < 100) {
|
||||||
|
handler.postDelayed(callback, 300);
|
||||||
|
} else {
|
||||||
|
handler.removeCallbacks(callback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,238 @@
|
|||||||
|
package com.xjjk.healthyclients
|
||||||
|
|
||||||
|
import UserInfoFragment
|
||||||
|
import android.Manifest
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.os.Handler
|
||||||
|
import android.os.Message
|
||||||
|
import android.view.Gravity
|
||||||
|
import android.view.KeyEvent
|
||||||
|
import android.view.View
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import com.amap.api.maps.MapsInitializer
|
||||||
|
import com.permissionx.guolindev.PermissionX
|
||||||
|
import com.sw.healthyclients.data.local.DataStoreManager
|
||||||
|
import com.sw.healthyclients.utils.CustomActivityManager
|
||||||
|
import com.xjjk.healthyclients.base.BaseVMBActivity
|
||||||
|
import com.xjjk.healthyclients.bottomtab.HomeBottomTabLayout
|
||||||
|
import com.xjjk.healthyclients.databinding.ActivityMainBinding
|
||||||
|
import com.xjjk.healthyclients.fragment.EmergencyFragment
|
||||||
|
import com.xjjk.healthyclients.fragment.GuidanceFragment
|
||||||
|
import com.xjjk.healthyclients.fragment.MonitorFragment
|
||||||
|
import com.xjjk.healthyclients.superfuntion.startLoginActivity
|
||||||
|
import com.xjjk.healthyclients.utils.ConstantUtils
|
||||||
|
import com.xjjk.healthyclients.utils.LocationManager
|
||||||
|
import com.xjjk.healthyclients.utils.SystemUtils
|
||||||
|
import com.xjjk.healthyclients.view.PrivacyDialog
|
||||||
|
import com.xjjk.healthyclients.view.TextViewDialog
|
||||||
|
import org.lzh.framework.updatepluginlib.UpdateBuilder
|
||||||
|
|
||||||
|
|
||||||
|
class MainActivity : BaseVMBActivity<AppViewModel, ActivityMainBinding>(R.layout.activity_main),
|
||||||
|
HomeBottomTabLayout.HomeBottomTabLayoutCallback {
|
||||||
|
|
||||||
|
//每个tab对应的tag,和json配置文件中保持一致
|
||||||
|
val TAG_GUIDANCE = "key_guidance_fragment"
|
||||||
|
val TAG_EMERGENCY = "key_emergency_fragment"
|
||||||
|
val TAG_MONITOR = "key_monitor_fragment"
|
||||||
|
val TAG_MY = "key_my_fragment"
|
||||||
|
var textViewDialog: TextViewDialog? = null
|
||||||
|
var mPermissionList = arrayListOf<String>(
|
||||||
|
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||||
|
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||||
|
Manifest.permission.ACCESS_COARSE_LOCATION,
|
||||||
|
Manifest.permission.ACCESS_FINE_LOCATION,
|
||||||
|
Manifest.permission.QUERY_ALL_PACKAGES,
|
||||||
|
Manifest.permission.POST_NOTIFICATIONS
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
|
if (!SystemUtils.isSignedWithReleaseCert(mContext)) {
|
||||||
|
UpdateBuilder.create()
|
||||||
|
.check()// 启动更新任务
|
||||||
|
} else {
|
||||||
|
// mViewModel.getAppVersionInfo()
|
||||||
|
}
|
||||||
|
mBinding.apply {
|
||||||
|
//设置回调
|
||||||
|
mainTabLayout.setHomeBottomTabLayoutCallback(this@MainActivity)
|
||||||
|
//初始化,参数为默认展示第几个tab
|
||||||
|
mainTabLayout.initFirstTab(0)
|
||||||
|
//如果需要展示未读消息,通过该方法展示
|
||||||
|
// main_tab_layout.setUnreadTip(TAG_USER, "12")
|
||||||
|
// main_tab_layout.setUnreadTip(TAG_INDEX, "99+")
|
||||||
|
// main_tab_layout.setUnreadTip(TAG_COLLECT, null, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
// if(DataStoreManager.isLogin()){
|
||||||
|
// getAppViewModel().getIMSig(successCall = {
|
||||||
|
// loginIm(it.userId, it.userSig)
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
if (DataStoreManager.isPrivacyState()) {
|
||||||
|
// if (ProxyChecker.hasProxy(mContext)) {
|
||||||
|
// if (UrlConfig.baseUrlType == UrlConfig.BaseUrlType.PRODUCT) {
|
||||||
|
// checkNetWork()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
} else {
|
||||||
|
privacyShow()
|
||||||
|
}
|
||||||
|
|
||||||
|
PermissionX.init(this)
|
||||||
|
.permissions(mPermissionList)
|
||||||
|
.request { allGranted, grantedList, deniedList ->
|
||||||
|
MapsInitializer.updatePrivacyShow(mContext, true, true)
|
||||||
|
MapsInitializer.updatePrivacyAgree(mContext, true)
|
||||||
|
var c = LocationManager(mContext, null, null)
|
||||||
|
c.startLocation()
|
||||||
|
// MapRouteSearch.setRoute(this@MainActivity)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun privacyShow() {
|
||||||
|
val textViewDialog = mContext?.let { PrivacyDialog(it) }
|
||||||
|
textViewDialog?.setDialogTitle("隐私协议授权", 18f)
|
||||||
|
textViewDialog?.setContent(ConstantUtils.mPrivacy, 14f)
|
||||||
|
textViewDialog?.setContentStyle(Gravity.LEFT)
|
||||||
|
textViewDialog?.setBtnText("同意", 18f)
|
||||||
|
textViewDialog?.setDialogCancelable(false)
|
||||||
|
textViewDialog?.setCancelBtnText("下次再说", 18f)
|
||||||
|
textViewDialog?.setOnAffirmClickListener(object : PrivacyDialog.OnAffirmClickListener {
|
||||||
|
override fun onAffirmClick(viewDialog: PrivacyDialog) {
|
||||||
|
DataStoreManager.savePrivacyState(true)
|
||||||
|
// if (ProxyChecker.hasProxy(mContext)) {
|
||||||
|
// if (UrlConfig.baseUrlType == UrlConfig.BaseUrlType.PRODUCT) {
|
||||||
|
// checkNetWork()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCancelClick(viewDialog: PrivacyDialog) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
textViewDialog?.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun bindEvent() {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun processClick(paramView: View?) {
|
||||||
|
when (paramView?.id) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBackEvent() {
|
||||||
|
super.onBackEvent()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPause() {
|
||||||
|
textViewDialog?.dismiss()
|
||||||
|
super.onPause()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onSaveInstanceState(outState: Bundle) {
|
||||||
|
super.onSaveInstanceState(Bundle())
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getFragmentByTag(tabTag: String): Fragment? {
|
||||||
|
when (tabTag) {
|
||||||
|
// TAG_GUIDANCE -> {
|
||||||
|
// return HomeFragment()
|
||||||
|
// }
|
||||||
|
|
||||||
|
TAG_GUIDANCE -> {
|
||||||
|
return GuidanceFragment()
|
||||||
|
}
|
||||||
|
|
||||||
|
TAG_EMERGENCY -> {
|
||||||
|
if (DataStoreManager.isLogin()) {
|
||||||
|
return EmergencyFragment()
|
||||||
|
} else {
|
||||||
|
startLoginActivity(this@MainActivity)
|
||||||
|
return Fragment()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TAG_MONITOR -> {
|
||||||
|
if (DataStoreManager.isLogin()) {
|
||||||
|
return MonitorFragment()
|
||||||
|
} else {
|
||||||
|
startLoginActivity(this@MainActivity)
|
||||||
|
return Fragment()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
TAG_MY -> {
|
||||||
|
return UserInfoFragment()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun transparentStatusBar(): Boolean {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun onClickChangeTab(selectedIndex: Int, selectedTag: String?) {
|
||||||
|
// when(selectedIndex){
|
||||||
|
// 0 -> {
|
||||||
|
// mActivity?.let { StatusbarUtil.customColorMode(it, "#54eccb",false) }
|
||||||
|
// }
|
||||||
|
// 1 -> {
|
||||||
|
// mActivity?.let { StatusbarUtil.customColorMode(it, "#2dcac1",false) }
|
||||||
|
// }
|
||||||
|
// 2 -> {
|
||||||
|
// mActivity?.let { StatusbarUtil.customColorMode(it, "#21BEBD",true) }
|
||||||
|
// }
|
||||||
|
// 3 -> {
|
||||||
|
// mActivity?.let { StatusbarUtil.customColorMode(it, "#21BEBD",true) }
|
||||||
|
// }
|
||||||
|
// 4 -> {
|
||||||
|
// mActivity?.let { StatusbarUtil.customColorMode(it, "#FFFFFFFF",true) }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
private var isExit = false
|
||||||
|
var mHandler: Handler = @SuppressLint("HandlerLeak")
|
||||||
|
object : Handler() {
|
||||||
|
override fun handleMessage(msg: Message) {
|
||||||
|
super.handleMessage(msg)
|
||||||
|
isExit = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun exit() {
|
||||||
|
if (!isExit) {
|
||||||
|
isExit = true
|
||||||
|
showToast("再按一次退出程序")
|
||||||
|
// 利用handler延迟发送更改状态信息
|
||||||
|
mHandler.sendEmptyMessageDelayed(0, 2000)
|
||||||
|
} else {
|
||||||
|
CustomActivityManager.getInstance().finishAllActivity()
|
||||||
|
// System.exit(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
|
||||||
|
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||||
|
exit()
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return super.onKeyDown(keyCode, event)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,358 @@
|
|||||||
|
package com.xjjk.healthyclients
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.app.ActivityManager
|
||||||
|
import android.app.Application
|
||||||
|
import android.content.Context
|
||||||
|
import android.os.Build
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.os.StrictMode
|
||||||
|
import android.util.Log
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import androidx.lifecycle.ViewModelStore
|
||||||
|
import androidx.lifecycle.ViewModelStoreOwner
|
||||||
|
import com.lzy.ninegrid.NineGridView
|
||||||
|
import com.orhanobut.logger.AndroidLogAdapter
|
||||||
|
import com.orhanobut.logger.Logger
|
||||||
|
import com.sw.healthyclients.data.local.DataStoreManager.initialize
|
||||||
|
import com.sw.healthyclients.utils.CustomActivityManager
|
||||||
|
import com.sw.healthyclients.utils.DevicesInfoUtils
|
||||||
|
import com.sw.healthyclients.utils.DownloadFileUtil
|
||||||
|
import com.sw.healthyclients.utils.GenerateTestUserSig
|
||||||
|
import com.tencent.imsdk.v2.V2TIMManager
|
||||||
|
import com.tencent.imsdk.v2.V2TIMSDKConfig
|
||||||
|
import com.tencent.imsdk.v2.V2TIMValueCallback
|
||||||
|
import com.tencent.qcloud.tuicore.TUILogin
|
||||||
|
import com.tencent.qcloud.tuicore.TUIThemeManager
|
||||||
|
import com.tencent.qcloud.tuicore.interfaces.TUILoginListener
|
||||||
|
import com.tencent.qcloud.tuicore.util.ErrorMessageConverter
|
||||||
|
import com.tencent.qcloud.tuicore.util.TUIUtil
|
||||||
|
import com.tencent.qcloud.tuikit.tuichat.config.TUIChatConfigs
|
||||||
|
import com.tencent.qcloud.tuikit.tuichat.interfaces.IMInputViewActionListener
|
||||||
|
import com.xjjk.healthyclients.bean.AppUpdateBean
|
||||||
|
import com.xjjk.healthyclients.retrofit.UrlConfig
|
||||||
|
import com.xjjk.healthyclients.superfuntion.jsonToBean
|
||||||
|
import com.xjjk.healthyclients.superfuntion.showLoading
|
||||||
|
import com.xjjk.healthyclients.superfuntion.startLoginActivity
|
||||||
|
import com.xjjk.healthyclients.superfuntion.userSigExpired
|
||||||
|
import com.xjjk.healthyclients.utils.BrandUtil
|
||||||
|
import com.xjjk.healthyclients.utils.ConstantUtils
|
||||||
|
import com.xjjk.healthyclients.utils.NineGridViewImageLoader
|
||||||
|
import com.xjjk.healthyclients.utils.updateplugin.CheckUpdateAppVersion
|
||||||
|
import com.xjjk.healthyclients.utils.updateplugin.CustomDownloadNotifier
|
||||||
|
import com.xjjk.healthyclients.utils.updateplugin.CustomInstallNotifier
|
||||||
|
import com.xjjk.healthyclients.utils.updateplugin.CustomUpdateNotifier
|
||||||
|
import com.xjjk.healthyclients.view.AppraiseDialog
|
||||||
|
import org.json.JSONException
|
||||||
|
import org.json.JSONObject
|
||||||
|
import org.lzh.framework.updatepluginlib.UpdateConfig
|
||||||
|
import org.lzh.framework.updatepluginlib.base.UpdateParser
|
||||||
|
import org.lzh.framework.updatepluginlib.base.UpdateStrategy
|
||||||
|
import org.lzh.framework.updatepluginlib.model.CheckEntity
|
||||||
|
import org.lzh.framework.updatepluginlib.model.Update
|
||||||
|
import retrofit2.HttpException
|
||||||
|
import kotlin.properties.Delegates
|
||||||
|
|
||||||
|
|
||||||
|
class MyApplication : Application(), ViewModelStoreOwner {
|
||||||
|
private var mAppViewModelStore: ViewModelStore? = null
|
||||||
|
private var mFactory: ViewModelProvider.Factory? = null
|
||||||
|
var sdkAppId = 0
|
||||||
|
var tuikit_demo_style: Int = 0
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
var appContext: MyApplication by Delegates.notNull()
|
||||||
|
@JvmStatic
|
||||||
|
lateinit var appViewModel: AppViewModel
|
||||||
|
val TAG = MyApplication::class.java.simpleName
|
||||||
|
}
|
||||||
|
override fun onCreate() {
|
||||||
|
Log.i(TAG, "onCreate")
|
||||||
|
super.onCreate()
|
||||||
|
ConstantUtils.mIsCloseDialog=true
|
||||||
|
Logger.addLogAdapter(AndroidLogAdapter())
|
||||||
|
appContext = this
|
||||||
|
DownloadFileUtil.init(this)
|
||||||
|
mAppViewModelStore = ViewModelStore()
|
||||||
|
appViewModel = getAppViewModelProvider()[AppViewModel::class.java]
|
||||||
|
appViewModel.init()
|
||||||
|
createObserve()
|
||||||
|
createNewConfig()
|
||||||
|
init()
|
||||||
|
initUpdateApp()
|
||||||
|
|
||||||
|
//JPushSdk().initSDK(this)
|
||||||
|
//禁止网络相关安全检查
|
||||||
|
if (Build.VERSION.SDK_INT > 9) {
|
||||||
|
val policy = StrictMode.ThreadPolicy.Builder().permitAll().build()
|
||||||
|
StrictMode.setThreadPolicy(policy) //这两句设置禁止所有检查
|
||||||
|
}
|
||||||
|
NineGridView.setImageLoader(NineGridViewImageLoader())
|
||||||
|
initialize(this)
|
||||||
|
registerActivityLifecycleCallbacks(AdjustLifecycleCallbacks())
|
||||||
|
val androidId = DevicesInfoUtils.getAndroidId(this)
|
||||||
|
println("设备id:${androidId}")
|
||||||
|
if (UrlConfig.testDeviceList.contains(androidId)) {
|
||||||
|
UrlConfig.isTestDevice = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun attachBaseContext(base: Context) {
|
||||||
|
super.attachBaseContext(base)
|
||||||
|
TUIThemeManager.setWebViewLanguage(this)
|
||||||
|
}
|
||||||
|
/** 获取一个全局的ViewModel */
|
||||||
|
private fun getAppViewModelProvider(): ViewModelProvider {
|
||||||
|
return ViewModelProvider(this, getAppFactory())
|
||||||
|
}
|
||||||
|
private fun getAppFactory(): ViewModelProvider.Factory {
|
||||||
|
if (mFactory == null) {
|
||||||
|
mFactory = ViewModelProvider.AndroidViewModelFactory.getInstance(this)
|
||||||
|
}
|
||||||
|
return mFactory as ViewModelProvider.Factory
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun createNewConfig(): UpdateConfig {
|
||||||
|
return UpdateConfig.createConfig()
|
||||||
|
.setUrl("http://o1wh05aeh.qnssl.com/image/view/app_icons")
|
||||||
|
.setUpdateParser(object : UpdateParser() {
|
||||||
|
@Throws(Exception::class)
|
||||||
|
override fun parse(httpResponse: String): Update {
|
||||||
|
val `object` = JSONObject(httpResponse)
|
||||||
|
val update = Update()
|
||||||
|
// 此apk包的下载地址
|
||||||
|
update.updateUrl = `object`.optString("update_url")
|
||||||
|
// 此apk包的版本号
|
||||||
|
update.versionCode = `object`.optInt("update_ver_code")
|
||||||
|
// 此apk包的版本名称
|
||||||
|
update.versionName = `object`.optString("update_ver_name")
|
||||||
|
// 此apk包的更新内容
|
||||||
|
update.updateContent = `object`.optString("update_content")
|
||||||
|
// 此apk包是否为强制更新
|
||||||
|
update.isForced = true
|
||||||
|
// 是否显示忽略此次版本更新按钮
|
||||||
|
update.isIgnore = `object`.optBoolean("ignore_able", false)
|
||||||
|
update.md5 = `object`.optString("md5")
|
||||||
|
return update
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initBuildInformation() {
|
||||||
|
try {
|
||||||
|
val buildInfoJson = JSONObject()
|
||||||
|
buildInfoJson.put("buildBrand", BrandUtil.getBuildBrand())
|
||||||
|
buildInfoJson.put("buildManufacturer", BrandUtil.getBuildManufacturer())
|
||||||
|
buildInfoJson.put("buildModel", BrandUtil.getBuildModel())
|
||||||
|
buildInfoJson.put("buildVersionRelease", BrandUtil.getBuildVersionRelease())
|
||||||
|
buildInfoJson.put("buildVersionSDKInt", BrandUtil.getBuildVersionSDKInt())
|
||||||
|
// 工信部要求 app 在运行期间只能获取一次设备信息。因此 app 获取设备信息设置给 SDK 后,SDK 使用该值并且不再调用系统接口。
|
||||||
|
// The Ministry of Industry and Information Technology requires the app to obtain device information only once
|
||||||
|
// during its operation. Therefore, after the app obtains the device information and sets it to the SDK, the SDK
|
||||||
|
// uses this value and no longer calls the system interface.
|
||||||
|
V2TIMManager.getInstance().callExperimentalAPI(
|
||||||
|
"setBuildInfo",
|
||||||
|
buildInfoJson.toString(),
|
||||||
|
object : V2TIMValueCallback<Any?> {
|
||||||
|
|
||||||
|
override fun onSuccess(p0: Any?) {
|
||||||
|
Log.i(TAG, "setBuildInfo success")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onError(code: Int, desc: String) {
|
||||||
|
Log.i(
|
||||||
|
TAG,
|
||||||
|
"setBuildInfo code:" + code + " desc:" + ErrorMessageConverter.convertIMError(
|
||||||
|
code,
|
||||||
|
desc
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch (e: JSONException) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun init() {
|
||||||
|
initBuildInformation()
|
||||||
|
TUIChatConfigs.getConfigs().imInputViewActionListener = object : IMInputViewActionListener {
|
||||||
|
override fun finishAction(workType: Int, workId: String) {
|
||||||
|
val activity = CustomActivityManager.getInstance().currentActivity()
|
||||||
|
if (activity is AppCompatActivity) {
|
||||||
|
activity.showLoading()
|
||||||
|
}
|
||||||
|
appViewModel.finishIMChat(workType, workId)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun appraiseAction(chatId: String, workType: Int, workId: String) {
|
||||||
|
val appraiseDialog =
|
||||||
|
AppraiseDialog(CustomActivityManager.getInstance().TopActivity())
|
||||||
|
appraiseDialog.setOnSubmitClickListener(object :
|
||||||
|
AppraiseDialog.OnSubmitClickListener {
|
||||||
|
override fun onCancelClick(viewDialog: AppraiseDialog) {}
|
||||||
|
override fun onSubmitClick(viewDialog: AppraiseDialog) {
|
||||||
|
val activity = CustomActivityManager.getInstance().currentActivity()
|
||||||
|
if (activity is AppCompatActivity) {
|
||||||
|
activity.showLoading()
|
||||||
|
}
|
||||||
|
appViewModel.submitAppraise(
|
||||||
|
chatId,
|
||||||
|
workType,
|
||||||
|
workId,
|
||||||
|
viewDialog.getRating(),
|
||||||
|
viewDialog.getAppraiseContext(),
|
||||||
|
viewDialog.getAnonymityStatus()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
appraiseDialog.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun finishActivityToGuidanceHome(workType: Int) {
|
||||||
|
// if (workType > 0) {
|
||||||
|
// if (CustomActivityManager.getInstance().isActivityExist(GuidanceActivity::class.java)) {
|
||||||
|
// CustomActivityManager.getInstance()
|
||||||
|
// .finishActivityTohome(GuidanceActivity::class.java)
|
||||||
|
// }else if (CustomActivityManager.getInstance().isActivityExist(SeekDoctorActivity::class.java)) {
|
||||||
|
// CustomActivityManager.getInstance()
|
||||||
|
// .finishActivityTohome(SeekDoctorActivity::class.java)
|
||||||
|
// }else if (CustomActivityManager.getInstance().isActivityExist(DoctorsGuidanceActivity::class.java)) {
|
||||||
|
// CustomActivityManager.getInstance()
|
||||||
|
// .finishActivityTohome(DoctorsGuidanceActivity::class.java)
|
||||||
|
// }else{
|
||||||
|
// CustomActivityManager.getInstance()
|
||||||
|
// .finishActivityTohome(MainActivity::class.java)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// initIMSDK(imSdkAppId);
|
||||||
|
}
|
||||||
|
|
||||||
|
fun initIMSDK(imSdkAppId: Int) {
|
||||||
|
if (imSdkAppId != 0) {
|
||||||
|
sdkAppId = imSdkAppId
|
||||||
|
} else {
|
||||||
|
sdkAppId = GenerateTestUserSig.SDKAPPID
|
||||||
|
}
|
||||||
|
// 2. 初始化 config 对象。
|
||||||
|
val config = V2TIMSDKConfig()
|
||||||
|
// 3. 指定 log 输出级别。
|
||||||
|
config.logLevel = V2TIMSDKConfig.V2TIM_LOG_INFO
|
||||||
|
V2TIMManager.getInstance().initSDK(this, imSdkAppId, config)
|
||||||
|
TUIThemeManager.getInstance().changeTheme(this, TUIThemeManager.THEME_SERIOUS)
|
||||||
|
initLoginStatusListener()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun createObserve() {
|
||||||
|
appViewModel.exception.observeForever { e: Exception? ->
|
||||||
|
if (e is HttpException) {
|
||||||
|
if (e.code() == 401) {
|
||||||
|
val activity = CustomActivityManager.getInstance().currentActivity()
|
||||||
|
startLoginActivity(activity)
|
||||||
|
activity.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun initLoginStatusListener() {
|
||||||
|
TUILogin.addLoginListener(loginStatusListener)
|
||||||
|
}
|
||||||
|
|
||||||
|
private val loginStatusListener: TUILoginListener = object : TUILoginListener() {
|
||||||
|
override fun onKickedOffline() {
|
||||||
|
if (UrlConfig.isOpenIm){
|
||||||
|
startLoginActivity(CustomActivityManager.getInstance().currentActivity())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onUserSigExpired() {
|
||||||
|
if (UrlConfig.isOpenIm) {
|
||||||
|
CustomActivityManager.getInstance().currentActivity().userSigExpired { null }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private inner class AdjustLifecycleCallbacks : ActivityLifecycleCallbacks {
|
||||||
|
override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {
|
||||||
|
println("路径" + activity.javaClass.name)
|
||||||
|
CustomActivityManager.getInstance().addActivity(activity)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onActivityStarted(activity: Activity) {}
|
||||||
|
override fun onActivityResumed(activity: Activity) {}
|
||||||
|
override fun onActivityPaused(activity: Activity) {}
|
||||||
|
override fun onActivityStopped(activity: Activity) {}
|
||||||
|
override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) {}
|
||||||
|
override fun onActivityDestroyed(activity: Activity) {
|
||||||
|
CustomActivityManager.getInstance().removeActivity(activity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private fun initUpdateApp(){
|
||||||
|
UpdateConfig.getConfig()
|
||||||
|
.setCheckWorker(CheckUpdateAppVersion::class.java)
|
||||||
|
//为了通过原检查更新库的检查随便传入的地址,实际请求参考CheckUpdateAppVersion.class
|
||||||
|
.setCheckEntity(CheckEntity().setUrl("https://www.baidu.com"))
|
||||||
|
.setCheckNotifier(CustomUpdateNotifier())
|
||||||
|
.setInstallNotifier(CustomInstallNotifier())
|
||||||
|
.setDownloadNotifier(CustomDownloadNotifier())
|
||||||
|
.setUpdateParser(object : UpdateParser() {
|
||||||
|
override fun parse(response: String?): Update {
|
||||||
|
val resultBean: AppUpdateBean? = response.jsonToBean(AppUpdateBean::class.java)
|
||||||
|
val update = Update()
|
||||||
|
if(resultBean == null){
|
||||||
|
return update
|
||||||
|
}
|
||||||
|
// 此apk包的下载地址
|
||||||
|
update.updateUrl = UrlConfig.IMAGE_BASE_URL+resultBean.appUrl
|
||||||
|
// 此apk包的版本号(因接口只有在有更新时才会返回数据,而且没有返回云端APP版本号,故将当前APP版本号+1,传给更新框架用作判断有新版本)
|
||||||
|
update.versionCode = resultBean.versionNo ?: 0
|
||||||
|
// 此apk包的版本名称
|
||||||
|
update.versionName = resultBean.versionName
|
||||||
|
// 此apk包的更新内容
|
||||||
|
update.updateContent = resultBean.updateContent
|
||||||
|
// 此apk包是否为强制更新
|
||||||
|
if (resultBean != null) {
|
||||||
|
update.isForced = 1 == resultBean.forced
|
||||||
|
}else{
|
||||||
|
update.isForced = false
|
||||||
|
}
|
||||||
|
// 是否显示忽略此次版本更新按钮
|
||||||
|
update.isIgnore = 1 == resultBean.ignoreFlag
|
||||||
|
return update
|
||||||
|
}
|
||||||
|
}).updateStrategy = object : UpdateStrategy() {
|
||||||
|
override fun isShowUpdateDialog(update: Update): Boolean {
|
||||||
|
// 是否在检查到有新版本更新时展示Dialog。
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun isAutoInstall(): Boolean {
|
||||||
|
// 是否自动更新.当为自动更新时。代表下载成功后不通知用户。直接调起安装。
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun isShowDownloadDialog(): Boolean {
|
||||||
|
// 在APK下载时。是否显示下载进度的Dialog
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val isMainProcess: Boolean
|
||||||
|
private get() {
|
||||||
|
val am = this.getSystemService(ACTIVITY_SERVICE) as ActivityManager
|
||||||
|
val mainProcessName = this.packageName
|
||||||
|
val currentProcessName = TUIUtil.getProcessName()
|
||||||
|
return mainProcessName == currentProcessName
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getViewModelStore(): ViewModelStore {
|
||||||
|
return mAppViewModelStore!!
|
||||||
|
} // call after login success
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
|
||||||
|
import com.xjjk.healthyclients.R
|
||||||
|
import com.xjjk.healthyclients.adapter.common.BaseDataBindingAdapter
|
||||||
|
import com.xjjk.healthyclients.bean.CvdMainBean
|
||||||
|
import com.xjjk.healthyclients.databinding.ItemCvdMainBinding
|
||||||
|
|
||||||
|
class CvdMainAdapter :
|
||||||
|
BaseDataBindingAdapter<CvdMainBean.dataBean, ItemCvdMainBinding>(
|
||||||
|
R.layout.item_cvd_main
|
||||||
|
) {
|
||||||
|
|
||||||
|
private val COLOR_HEART_RATE = "#F14D6B"
|
||||||
|
private val COLOR_SPO2 = "#2AC79F"
|
||||||
|
private val COLOR_STRESS = "#1385FA"
|
||||||
|
private val COLOR_TEMP = "#02C7D2"
|
||||||
|
|
||||||
|
override fun convert(
|
||||||
|
holder: BaseDataBindingHolder<ItemCvdMainBinding>,
|
||||||
|
item: CvdMainBean.dataBean
|
||||||
|
) {
|
||||||
|
val mBinding = holder.dataBinding
|
||||||
|
mBinding?.let {
|
||||||
|
when (item.wdType) {
|
||||||
|
"heart_rate" -> {
|
||||||
|
mBinding.icon.setImageResource(R.drawable.icon_cvd_heart_rate)
|
||||||
|
mBinding.valueTv.setTextColor(Color.parseColor(COLOR_HEART_RATE))
|
||||||
|
mBinding.valueUnitTv.text = "次/分钟"
|
||||||
|
}
|
||||||
|
"spo2" -> {
|
||||||
|
mBinding.icon.setImageResource(R.drawable.icon_cvd_spo)
|
||||||
|
mBinding.valueTv.setTextColor(Color.parseColor(COLOR_SPO2))
|
||||||
|
mBinding.valueUnitTv.text = "%"
|
||||||
|
}
|
||||||
|
"stress" -> {
|
||||||
|
mBinding.icon.setImageResource(R.drawable.icon_cvd_pressure)
|
||||||
|
mBinding.valueTv.setTextColor(Color.parseColor(COLOR_STRESS))
|
||||||
|
mBinding.valueUnitTv.text = ""
|
||||||
|
}
|
||||||
|
"temperature" -> {
|
||||||
|
mBinding.icon.setImageResource(R.drawable.icon_cvd_temperature)
|
||||||
|
mBinding.valueTv.setTextColor(Color.parseColor(COLOR_TEMP))
|
||||||
|
mBinding.valueUnitTv.text = "℃"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mBinding.valueTv.text = item.dataValue
|
||||||
|
mBinding.nameTv.text = item.wdTypeName
|
||||||
|
mBinding.dateTv.text = item.dataDate
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
|
||||||
|
import com.xjjk.healthyclients.R
|
||||||
|
import com.xjjk.healthyclients.adapter.common.BaseDataBindingAdapter
|
||||||
|
import com.xjjk.healthyclients.bean.CvdWarningHistoryBean
|
||||||
|
import com.xjjk.healthyclients.databinding.ItemCvdWarningHistoryBinding
|
||||||
|
|
||||||
|
class CvdWarningHistoryAdapter :
|
||||||
|
BaseDataBindingAdapter<CvdWarningHistoryBean, ItemCvdWarningHistoryBinding>(
|
||||||
|
R.layout.item_cvd_warning_history
|
||||||
|
) {
|
||||||
|
|
||||||
|
private val COLOR_HEART_RATE = "#F14D6B"
|
||||||
|
private val COLOR_SPO2 = "#2AC79F"
|
||||||
|
private val COLOR_STRESS = "#1385FA"
|
||||||
|
private val COLOR_TEMP = "#02C7D2"
|
||||||
|
|
||||||
|
private var mType: Int = -1;
|
||||||
|
|
||||||
|
fun CvdWarningHistoryAdapter(type: Int) {
|
||||||
|
mType = type
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun setType(type: Int) {
|
||||||
|
mType = type
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun convert(
|
||||||
|
holder: BaseDataBindingHolder<ItemCvdWarningHistoryBinding>,
|
||||||
|
item: CvdWarningHistoryBean
|
||||||
|
) {
|
||||||
|
val mBinding = holder.dataBinding
|
||||||
|
mBinding?.let {
|
||||||
|
when (mType) {
|
||||||
|
0 -> {
|
||||||
|
mBinding.nameTv.text = "心率"
|
||||||
|
mBinding.icon.setImageResource(R.drawable.icon_cvd_heart_rate)
|
||||||
|
mBinding.valueTv.setTextColor(Color.parseColor(COLOR_HEART_RATE))
|
||||||
|
mBinding.valueUnitTv.text = "次/分钟"
|
||||||
|
}
|
||||||
|
|
||||||
|
1 -> {
|
||||||
|
mBinding.nameTv.text = "血氧饱和度"
|
||||||
|
mBinding.icon.setImageResource(R.drawable.icon_cvd_spo)
|
||||||
|
mBinding.valueTv.setTextColor(Color.parseColor(COLOR_SPO2))
|
||||||
|
mBinding.valueUnitTv.text = "%"
|
||||||
|
}
|
||||||
|
|
||||||
|
2 -> {
|
||||||
|
mBinding.nameTv.text = "压力"
|
||||||
|
mBinding.icon.setImageResource(R.drawable.icon_cvd_pressure)
|
||||||
|
mBinding.valueTv.setTextColor(Color.parseColor(COLOR_STRESS))
|
||||||
|
mBinding.valueUnitTv.text = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
3 -> {
|
||||||
|
mBinding.nameTv.text = "体温"
|
||||||
|
mBinding.icon.setImageResource(R.drawable.icon_cvd_temperature)
|
||||||
|
mBinding.valueTv.setTextColor(Color.parseColor(COLOR_TEMP))
|
||||||
|
mBinding.valueUnitTv.text = "℃"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mBinding.valueTv.text = item.dataValue
|
||||||
|
mBinding.dateTv.text = item.warnTime
|
||||||
|
mBinding.addressTv.text = item.address
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+219
@@ -0,0 +1,219 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter.common
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.CompoundButton
|
||||||
|
import androidx.annotation.LayoutRes
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.entity.MultiItemEntity
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封装adapter
|
||||||
|
*
|
||||||
|
* @param <T>
|
||||||
|
</T> */
|
||||||
|
abstract class BaseCheckRecycleViewAdapter<T : BaseCheckRecycleViewAdapter.CheckItem, VH : BaseViewHolder>
|
||||||
|
@JvmOverloads constructor(@LayoutRes private val layoutResId: Int, data: MutableList<T>? = null
|
||||||
|
) : BaseQuickAdapter<T , VH>(layoutResId, data) {
|
||||||
|
/**
|
||||||
|
* 判定是否已激活选择模式
|
||||||
|
*/
|
||||||
|
var enabledCheckMode //激活选择模式
|
||||||
|
= false
|
||||||
|
/**
|
||||||
|
* 是否是单选模式
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 设置单选模式,默认是复选模式
|
||||||
|
*/
|
||||||
|
var singleMode //单选模式
|
||||||
|
= false
|
||||||
|
/**
|
||||||
|
* 单选模式选中后是否可取消选中项
|
||||||
|
* @param isCancel true为可取消,false为不可取消(必须有一项被选中)
|
||||||
|
*/
|
||||||
|
var singleModeIsCanCancel //单选模式选中后是否可取消选中项
|
||||||
|
= false
|
||||||
|
private var currentCheckedPosition = -1
|
||||||
|
private var secondCheckedPosition = -1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理复选框
|
||||||
|
*/
|
||||||
|
fun handleCompoundButton(compoundButton: CompoundButton, t: T) {
|
||||||
|
compoundButton.isChecked = t!!.checked
|
||||||
|
compoundButton.visibility =
|
||||||
|
if (enabledCheckMode) View.VISIBLE else View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 激活选择模式
|
||||||
|
*/
|
||||||
|
fun enableCheckMode() {
|
||||||
|
if (enabledCheckMode) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
enabledCheckMode = true
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消选择模式
|
||||||
|
*/
|
||||||
|
fun cancelCheckMode() {
|
||||||
|
if (!enabledCheckMode) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
enabledCheckMode = false
|
||||||
|
for (item in data) {
|
||||||
|
item!!.checked = false
|
||||||
|
}
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击了某一项
|
||||||
|
*
|
||||||
|
* @return true:已经激活了选择模式并且设置成功;false:尚未激活选择模式并且设置失败
|
||||||
|
*/
|
||||||
|
fun clickItem(position: Int, isSecond: Boolean): Boolean {
|
||||||
|
var position = position
|
||||||
|
return if (enabledCheckMode) {
|
||||||
|
if (position < data.size) {
|
||||||
|
if (singleMode) {
|
||||||
|
if (isSecond) {
|
||||||
|
if (secondCheckedPosition == -1) {
|
||||||
|
val item: T = data[position]
|
||||||
|
item!!.checked = true
|
||||||
|
} else if (secondCheckedPosition == position) {
|
||||||
|
if (singleModeIsCanCancel) {
|
||||||
|
val item: T = data[position]
|
||||||
|
item!!.checked = !item.checked
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (currentCheckedPosition < data.size) {
|
||||||
|
data[currentCheckedPosition].checked = false
|
||||||
|
}
|
||||||
|
data[position].checked = true
|
||||||
|
}
|
||||||
|
secondCheckedPosition = position
|
||||||
|
} else {
|
||||||
|
secondCheckedPosition = -1
|
||||||
|
if (currentCheckedPosition == -1) {
|
||||||
|
val item: T = data[position]
|
||||||
|
if (singleModeIsCanCancel){
|
||||||
|
item!!.checked = !item.checked
|
||||||
|
}else{
|
||||||
|
item!!.checked = true
|
||||||
|
}
|
||||||
|
} else if (currentCheckedPosition == position) {
|
||||||
|
if (singleModeIsCanCancel) {
|
||||||
|
val item: T = data[position]
|
||||||
|
item!!.checked = !item.checked
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (currentCheckedPosition < data.size) {
|
||||||
|
data[currentCheckedPosition].checked = false
|
||||||
|
}
|
||||||
|
data[position].checked = true
|
||||||
|
}
|
||||||
|
currentCheckedPosition = position
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
val item: T = data.get(position)
|
||||||
|
item!!.checked = !item.checked
|
||||||
|
}
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全选
|
||||||
|
*
|
||||||
|
* @return true:已经激活了选择模式并且设置成功;false:尚未激活选择模式并且设置失败
|
||||||
|
*/
|
||||||
|
fun checkAll(checked: Boolean): Boolean {
|
||||||
|
return if (enabledCheckMode) {
|
||||||
|
for (i in 0 until data.size) {
|
||||||
|
val item: T = data[i]
|
||||||
|
item!!.checked = checked
|
||||||
|
}
|
||||||
|
notifyDataSetChanged()
|
||||||
|
if (!checked) {
|
||||||
|
currentCheckedPosition = -1
|
||||||
|
secondCheckedPosition = -1
|
||||||
|
}
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取选中的项
|
||||||
|
*/
|
||||||
|
val checkedItems: MutableList<T>
|
||||||
|
get() {
|
||||||
|
val checkedItems: MutableList<T> = ArrayList()
|
||||||
|
for (item in data) {
|
||||||
|
if (item!!.checked) {
|
||||||
|
checkedItems.add(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return checkedItems
|
||||||
|
}
|
||||||
|
fun getCheckedItemPosition(): Int{
|
||||||
|
if (!singleMode){
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
for (index in data.indices) {
|
||||||
|
if (data[index]!!.checked) {
|
||||||
|
return index
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取集合中选中的项
|
||||||
|
*/
|
||||||
|
fun getCheckedItems(list: List<T>): List<T> {
|
||||||
|
val checkedItems: MutableList<T> = ArrayList()
|
||||||
|
for (item in list) {
|
||||||
|
if (item!!.checked) {
|
||||||
|
checkedItems.add(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return checkedItems
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除选中的项
|
||||||
|
*/
|
||||||
|
fun deleteCheckedItems(): List<T> {
|
||||||
|
val checkedItems: MutableList<T> = ArrayList()
|
||||||
|
val iterator: MutableIterator<T> = data.iterator()
|
||||||
|
var item: T
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
item = iterator.next()
|
||||||
|
if (item!!.checked) {
|
||||||
|
checkedItems.add(item)
|
||||||
|
iterator.remove()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
notifyDataSetChanged()
|
||||||
|
currentCheckedPosition = -1
|
||||||
|
secondCheckedPosition = -1
|
||||||
|
return checkedItems
|
||||||
|
}
|
||||||
|
|
||||||
|
interface CheckItem : MultiItemEntity {
|
||||||
|
var checked: Boolean
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter.common
|
||||||
|
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.annotation.LayoutRes
|
||||||
|
import androidx.databinding.ViewDataBinding
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.util.getItemView
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author nanfeifei
|
||||||
|
* @time 2023/5/5 14:07
|
||||||
|
* @description 基于第三方库BaseRecyclerViewAdapterHelper拓展使用DataBinding的Adapter
|
||||||
|
*/
|
||||||
|
abstract class BaseDataBindingAdapter<T, BD : ViewDataBinding>
|
||||||
|
@JvmOverloads constructor(@LayoutRes private val layoutResId: Int, data: MutableList<T>? = null
|
||||||
|
) : BaseQuickAdapter<T, BaseDataBindingHolder<BD>>(layoutResId, data) {
|
||||||
|
override fun onCreateDefViewHolder(
|
||||||
|
parent: ViewGroup,
|
||||||
|
viewType: Int
|
||||||
|
): BaseDataBindingHolder<BD> {
|
||||||
|
return BaseDataBindingHolder(parent.getItemView(layoutResId))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter.common;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原创 hongyang
|
||||||
|
*/
|
||||||
|
public abstract class CommonAdapter<T> extends MultiItemTypeAdapter<T> {
|
||||||
|
protected Context mContext;
|
||||||
|
protected int mLayoutId;
|
||||||
|
protected List<T> mDatas;
|
||||||
|
protected LayoutInflater mInflater;
|
||||||
|
|
||||||
|
public CommonAdapter(final Context context, final int layoutId, List<T> datas) {
|
||||||
|
super(context, datas);
|
||||||
|
mContext = context;
|
||||||
|
mInflater = LayoutInflater.from(context);
|
||||||
|
mLayoutId = layoutId;
|
||||||
|
mDatas = datas;
|
||||||
|
|
||||||
|
addItemViewDelegate(new ItemViewDelegate<T>() {
|
||||||
|
@Override
|
||||||
|
public int getItemViewLayoutId() {
|
||||||
|
return layoutId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isForViewType(T item, int position) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void convert(ViewHolder holder, T t, int position) {
|
||||||
|
CommonAdapter.this.convert(holder, t, position);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract void convert(ViewHolder holder, T t, int position);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter.common
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.res.ColorStateList
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.widget.TextView
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
|
import com.xjjk.healthyclients.R
|
||||||
|
import com.xjjk.healthyclients.bean.emergency.EmergencyDictBean
|
||||||
|
|
||||||
|
class CustomEmergencyHeadViewAdapter(
|
||||||
|
var mContext: Context?,
|
||||||
|
var layoutId: Int,
|
||||||
|
var datas: ArrayList<EmergencyDictBean>?,
|
||||||
|
var method: () -> Unit
|
||||||
|
) : CommonAdapter<EmergencyDictBean>(mContext, layoutId, datas) {
|
||||||
|
override fun convert(holder: ViewHolder?, t: EmergencyDictBean?, position: Int) {
|
||||||
|
t?.let{
|
||||||
|
var textview=holder?.getView<TextView>(R.id.item_custom_emergency_head_view_label)
|
||||||
|
textview?.setText(it.title)
|
||||||
|
if (it.isCheck) {
|
||||||
|
textview?.setTextColor(ContextCompat.getColor(textview.context, R.color.white))
|
||||||
|
textview?.backgroundTintList = ColorStateList.valueOf(Color.parseColor("#21BEBD"))
|
||||||
|
}else{
|
||||||
|
textview?.setTextColor(ContextCompat.getColor(textview.context, R.color.text_black_66))
|
||||||
|
textview?.backgroundTintList = ColorStateList.valueOf(Color.parseColor("#FFFFFF"))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter.common;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by wyy on 16/6/22.
|
||||||
|
*/
|
||||||
|
public interface ItemViewDelegate<T>
|
||||||
|
{
|
||||||
|
|
||||||
|
int getItemViewLayoutId();
|
||||||
|
|
||||||
|
boolean isForViewType(T item, int position);
|
||||||
|
|
||||||
|
void convert(ViewHolder holder, T t, int position);
|
||||||
|
|
||||||
|
}
|
||||||
+116
@@ -0,0 +1,116 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter.common;
|
||||||
|
|
||||||
|
|
||||||
|
import androidx.collection.SparseArrayCompat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by wyy on 16/6/22.
|
||||||
|
*/
|
||||||
|
public class ItemViewDelegateManager<T>
|
||||||
|
{
|
||||||
|
SparseArrayCompat<ItemViewDelegate<T>> delegates = new SparseArrayCompat();
|
||||||
|
|
||||||
|
public int getItemViewDelegateCount()
|
||||||
|
{
|
||||||
|
return delegates.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemViewDelegateManager<T> addDelegate(ItemViewDelegate<T> delegate)
|
||||||
|
{
|
||||||
|
int viewType = delegates.size();
|
||||||
|
if (delegate != null)
|
||||||
|
{
|
||||||
|
delegates.put(viewType, delegate);
|
||||||
|
viewType++;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemViewDelegateManager<T> addDelegate(int viewType, ItemViewDelegate<T> delegate)
|
||||||
|
{
|
||||||
|
if (delegates.get(viewType) != null)
|
||||||
|
{
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"An ItemViewDelegate is already registered for the viewType = "
|
||||||
|
+ viewType
|
||||||
|
+ ". Already registered ItemViewDelegate is "
|
||||||
|
+ delegates.get(viewType));
|
||||||
|
}
|
||||||
|
delegates.put(viewType, delegate);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemViewDelegateManager<T> removeDelegate(ItemViewDelegate<T> delegate)
|
||||||
|
{
|
||||||
|
if (delegate == null)
|
||||||
|
{
|
||||||
|
throw new NullPointerException("ItemViewDelegate is null");
|
||||||
|
}
|
||||||
|
int indexToRemove = delegates.indexOfValue(delegate);
|
||||||
|
|
||||||
|
if (indexToRemove >= 0)
|
||||||
|
{
|
||||||
|
delegates.removeAt(indexToRemove);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemViewDelegateManager<T> removeDelegate(int itemType)
|
||||||
|
{
|
||||||
|
int indexToRemove = delegates.indexOfKey(itemType);
|
||||||
|
|
||||||
|
if (indexToRemove >= 0)
|
||||||
|
{
|
||||||
|
delegates.removeAt(indexToRemove);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getItemViewType(T item, int position)
|
||||||
|
{
|
||||||
|
int delegatesCount = delegates.size();
|
||||||
|
for (int i = delegatesCount - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
ItemViewDelegate<T> delegate = delegates.valueAt(i);
|
||||||
|
if (delegate.isForViewType( item, position))
|
||||||
|
{
|
||||||
|
return delegates.keyAt(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"No ItemViewDelegate added that matches position=" + position + " in data source");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void convert(ViewHolder holder, T item, int position)
|
||||||
|
{
|
||||||
|
int delegatesCount = delegates.size();
|
||||||
|
for (int i = 0; i < delegatesCount; i++)
|
||||||
|
{
|
||||||
|
ItemViewDelegate<T> delegate = delegates.valueAt(i);
|
||||||
|
|
||||||
|
if (delegate.isForViewType( item, position))
|
||||||
|
{
|
||||||
|
delegate.convert(holder, item, position);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"No ItemViewDelegateManager added that matches position=" + position + " in data source");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ItemViewDelegate getItemViewDelegate(int viewType)
|
||||||
|
{
|
||||||
|
return delegates.get(viewType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getItemViewLayoutId(int viewType)
|
||||||
|
{
|
||||||
|
return getItemViewDelegate(viewType).getItemViewLayoutId();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getItemViewType(ItemViewDelegate itemViewDelegate)
|
||||||
|
{
|
||||||
|
return delegates.indexOfValue(itemViewDelegate);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter.common;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by zhy on 16/4/9.
|
||||||
|
*/
|
||||||
|
public class MultiItemTypeAdapter<T> extends RecyclerView.Adapter<ViewHolder> {
|
||||||
|
protected Context mContext;
|
||||||
|
protected List<T> mDatas;
|
||||||
|
private int mCount = 4;
|
||||||
|
private boolean mIsShowOnlyCount=false;
|
||||||
|
|
||||||
|
protected ItemViewDelegateManager mItemViewDelegateManager;
|
||||||
|
protected OnItemClickListener mOnItemClickListener;
|
||||||
|
|
||||||
|
|
||||||
|
public MultiItemTypeAdapter(Context context, List<T> datas) {
|
||||||
|
mContext = context;
|
||||||
|
mDatas = datas;
|
||||||
|
mItemViewDelegateManager = new ItemViewDelegateManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemViewType(int position) {
|
||||||
|
if (!useItemViewDelegateManager()) return super.getItemViewType(position);
|
||||||
|
return mItemViewDelegateManager.getItemViewType(mDatas.get(position), position);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
ItemViewDelegate itemViewDelegate = mItemViewDelegateManager.getItemViewDelegate(viewType);
|
||||||
|
int layoutId = itemViewDelegate.getItemViewLayoutId();
|
||||||
|
ViewHolder holder = ViewHolder.createViewHolder(mContext, parent, layoutId);
|
||||||
|
onViewHolderCreated(holder, holder.getConvertView());
|
||||||
|
setListener(parent, holder, viewType);
|
||||||
|
return holder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onViewHolderCreated(ViewHolder holder, View itemView) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void convert(ViewHolder holder, T t) {
|
||||||
|
mItemViewDelegateManager.convert(holder, t, holder.getAdapterPosition());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean isEnabled(int viewType) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void setListener(final ViewGroup parent, final ViewHolder viewHolder, int viewType) {
|
||||||
|
if (!isEnabled(viewType)) return;
|
||||||
|
viewHolder.getConvertView().setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (mOnItemClickListener != null) {
|
||||||
|
int position = viewHolder.getAdapterPosition();
|
||||||
|
mOnItemClickListener.onItemClick(v, viewHolder, position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
viewHolder.getConvertView().setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onLongClick(View v) {
|
||||||
|
if (mOnItemClickListener != null) {
|
||||||
|
int position = viewHolder.getAdapterPosition();
|
||||||
|
return mOnItemClickListener.onItemLongClick(v, viewHolder, position);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(ViewHolder holder, int position) {
|
||||||
|
convert(holder, mDatas.get(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShowOnlyThree(boolean isShowOnlyThree) {
|
||||||
|
setShowOnlyCount(isShowOnlyThree, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置显示的条数
|
||||||
|
*/
|
||||||
|
public void setShowOnlyCount(boolean isShowOnlyThree, int count) {
|
||||||
|
mIsShowOnlyCount = isShowOnlyThree;
|
||||||
|
mCount = count;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
int itemCount = 0;
|
||||||
|
if (mDatas != null) {
|
||||||
|
if (mIsShowOnlyCount) {
|
||||||
|
if (mDatas.size() > mCount) {
|
||||||
|
itemCount = mCount;
|
||||||
|
} else {
|
||||||
|
itemCount = mDatas.size();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
itemCount = mDatas.size();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return itemCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<T> getDatas() {
|
||||||
|
return mDatas;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setmDatas(List<T> mDatas) {
|
||||||
|
this.mDatas = mDatas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MultiItemTypeAdapter addItemViewDelegate(ItemViewDelegate<T> itemViewDelegate) {
|
||||||
|
mItemViewDelegateManager.addDelegate(itemViewDelegate);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MultiItemTypeAdapter addItemViewDelegate(int viewType, ItemViewDelegate<T> itemViewDelegate) {
|
||||||
|
mItemViewDelegateManager.addDelegate(viewType, itemViewDelegate);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean useItemViewDelegateManager() {
|
||||||
|
return mItemViewDelegateManager.getItemViewDelegateCount() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnItemClickListener {
|
||||||
|
void onItemClick(View view, RecyclerView.ViewHolder holder, int position);
|
||||||
|
|
||||||
|
boolean onItemLongClick(View view, RecyclerView.ViewHolder holder, int position);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
|
||||||
|
this.mOnItemClickListener = onItemClickListener;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,419 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter.common;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.Paint;
|
||||||
|
import android.graphics.Typeface;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.text.Spannable;
|
||||||
|
import android.text.util.Linkify;
|
||||||
|
import android.util.SparseArray;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.animation.AlphaAnimation;
|
||||||
|
import android.widget.Checkable;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.RatingBar;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
public class ViewHolder extends RecyclerView.ViewHolder
|
||||||
|
{
|
||||||
|
private SparseArray<View> mViews;
|
||||||
|
private View mConvertView;
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
public ViewHolder(Context context, View itemView)
|
||||||
|
{
|
||||||
|
super(itemView);
|
||||||
|
mContext = context;
|
||||||
|
mConvertView = itemView;
|
||||||
|
mViews = new SparseArray<View>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static ViewHolder createViewHolder(Context context, View itemView)
|
||||||
|
{
|
||||||
|
ViewHolder holder = new ViewHolder(context, itemView);
|
||||||
|
return holder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ViewHolder createViewHolder(Context context,
|
||||||
|
ViewGroup parent, int layoutId)
|
||||||
|
{
|
||||||
|
View itemView = LayoutInflater.from(context).inflate(layoutId, parent,
|
||||||
|
false);
|
||||||
|
ViewHolder holder = new ViewHolder(context, itemView);
|
||||||
|
return holder;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过viewId获取控件
|
||||||
|
*
|
||||||
|
* @param viewId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public <T extends View> T getView(int viewId)
|
||||||
|
{
|
||||||
|
View view = mViews.get(viewId);
|
||||||
|
if (view == null)
|
||||||
|
{
|
||||||
|
view = mConvertView.findViewById(viewId);
|
||||||
|
mViews.put(viewId, view);
|
||||||
|
}
|
||||||
|
return (T) view;
|
||||||
|
}
|
||||||
|
|
||||||
|
public View getConvertView()
|
||||||
|
{
|
||||||
|
return mConvertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/****以下为辅助方法*****/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置TextView的值
|
||||||
|
*
|
||||||
|
* @param viewId
|
||||||
|
* @param text
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setText(int viewId, String text)
|
||||||
|
{
|
||||||
|
TextView tv = getView(viewId);
|
||||||
|
tv.setText(text);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置TextView的值
|
||||||
|
*
|
||||||
|
* @param viewId
|
||||||
|
* @param text
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setText(int viewId, Spannable text)
|
||||||
|
{
|
||||||
|
TextView tv = getView(viewId);
|
||||||
|
tv.setText(text);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param resId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setImageResource(int viewId, int resId)
|
||||||
|
{
|
||||||
|
ImageView view = getView(viewId);
|
||||||
|
view.setImageResource(resId);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param url
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setImageResource(int viewId, String url)
|
||||||
|
{
|
||||||
|
ImageView view = getView(viewId);
|
||||||
|
// LoaderManager.getLoader().loadNet(view,url);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param bitmap
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setImageBitmap(int viewId, Bitmap bitmap)
|
||||||
|
{
|
||||||
|
ImageView view = getView(viewId);
|
||||||
|
view.setImageBitmap(bitmap);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param drawable
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setImageDrawable(int viewId, Drawable drawable)
|
||||||
|
{
|
||||||
|
ImageView view = getView(viewId);
|
||||||
|
view.setImageDrawable(drawable);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param color
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setBackgroundColor(int viewId, int color)
|
||||||
|
{
|
||||||
|
View view = getView(viewId);
|
||||||
|
view.setBackgroundColor(color);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param backgroundRes
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setBackgroundRes(int viewId, int backgroundRes)
|
||||||
|
{
|
||||||
|
View view = getView(viewId);
|
||||||
|
view.setBackgroundResource(backgroundRes);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param textColor
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setTextColor(int viewId, int textColor)
|
||||||
|
{
|
||||||
|
TextView view = getView(viewId);
|
||||||
|
view.setTextColor(textColor);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param textColorRes
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setTextColorRes(int viewId, int textColorRes)
|
||||||
|
{
|
||||||
|
TextView view = getView(viewId);
|
||||||
|
view.setTextColor(mContext.getResources().getColor(textColorRes));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@SuppressLint("NewApi")
|
||||||
|
public ViewHolder setAlpha(int viewId, float value)
|
||||||
|
{
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
|
||||||
|
{
|
||||||
|
getView(viewId).setAlpha(value);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
// Pre-honeycomb hack to set Alpha value
|
||||||
|
AlphaAnimation alpha = new AlphaAnimation(value, value);
|
||||||
|
alpha.setDuration(0);
|
||||||
|
alpha.setFillAfter(true);
|
||||||
|
getView(viewId).startAnimation(alpha);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param visible
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setVisible(int viewId, boolean visible)
|
||||||
|
{
|
||||||
|
View view = getView(viewId);
|
||||||
|
view.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param visible
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setVisibility(int viewId,int visible)
|
||||||
|
{
|
||||||
|
View view = getView(viewId);
|
||||||
|
view.setVisibility(visible);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder linkify(int viewId)
|
||||||
|
{
|
||||||
|
TextView view = getView(viewId);
|
||||||
|
Linkify.addLinks(view, Linkify.ALL);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param typeface
|
||||||
|
* @param viewIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setTypeface(Typeface typeface, int... viewIds)
|
||||||
|
{
|
||||||
|
for (int viewId : viewIds)
|
||||||
|
{
|
||||||
|
TextView view = getView(viewId);
|
||||||
|
view.setTypeface(typeface);
|
||||||
|
view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param progress
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setProgress(int viewId, int progress)
|
||||||
|
{
|
||||||
|
ProgressBar view = getView(viewId);
|
||||||
|
view.setProgress(progress);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param progress
|
||||||
|
* @param max
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setProgress(int viewId, int progress, int max)
|
||||||
|
{
|
||||||
|
ProgressBar view = getView(viewId);
|
||||||
|
view.setMax(max);
|
||||||
|
view.setProgress(progress);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param max
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setMax(int viewId, int max)
|
||||||
|
{
|
||||||
|
ProgressBar view = getView(viewId);
|
||||||
|
view.setMax(max);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param rating
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setRating(int viewId, float rating)
|
||||||
|
{
|
||||||
|
RatingBar view = getView(viewId);
|
||||||
|
view.setRating(rating);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param rating
|
||||||
|
* @param max
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setRating(int viewId, float rating, int max)
|
||||||
|
{
|
||||||
|
RatingBar view = getView(viewId);
|
||||||
|
view.setMax(max);
|
||||||
|
view.setRating(rating);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param tag
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setTag(int viewId, Object tag)
|
||||||
|
{
|
||||||
|
View view = getView(viewId);
|
||||||
|
view.setTag(tag);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param key
|
||||||
|
* @param tag
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setTag(int viewId, int key, Object tag)
|
||||||
|
{
|
||||||
|
View view = getView(viewId);
|
||||||
|
view.setTag(key, tag);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param checked
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setChecked(int viewId, boolean checked)
|
||||||
|
{
|
||||||
|
Checkable view = (Checkable) getView(viewId);
|
||||||
|
view.setChecked(checked);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关于事件的
|
||||||
|
* @param viewId
|
||||||
|
* @param listener
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setOnClickListener(int viewId,
|
||||||
|
View.OnClickListener listener)
|
||||||
|
{
|
||||||
|
View view = getView(viewId);
|
||||||
|
view.setOnClickListener(listener);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param listener
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setOnTouchListener(int viewId,
|
||||||
|
View.OnTouchListener listener)
|
||||||
|
{
|
||||||
|
View view = getView(viewId);
|
||||||
|
view.setOnTouchListener(listener);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param viewId
|
||||||
|
* @param listener
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ViewHolder setOnLongClickListener(int viewId,
|
||||||
|
View.OnLongClickListener listener)
|
||||||
|
{
|
||||||
|
View view = getView(viewId);
|
||||||
|
view.setOnLongClickListener(listener);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter.common
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.TextView
|
||||||
|
import com.xjjk.healthyclients.R
|
||||||
|
|
||||||
|
|
||||||
|
class WindowDialogAdapter(
|
||||||
|
var mContext: Context?,
|
||||||
|
var layoutId: Int,
|
||||||
|
var datas: ArrayList<String>?,
|
||||||
|
) : CommonAdapter<String>(mContext, layoutId, datas) {
|
||||||
|
override fun convert(holder: ViewHolder?, t: String?, position: Int) {
|
||||||
|
t?.let{
|
||||||
|
holder?.getView<TextView>(R.id.item_windwo_dialog_tv_name)?.setText(it)
|
||||||
|
if (position==(datas!!.size-1)) {
|
||||||
|
holder?.getView<View>(R.id.item_windwo_dialog_tv_line)?.visibility=View.GONE
|
||||||
|
}else{
|
||||||
|
holder?.getView<View>(R.id.item_windwo_dialog_tv_line)?.visibility=View.VISIBLE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.xjjk.healthyclients.adapter.user
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import com.xjjk.healthyclients.R
|
||||||
|
import com.xjjk.healthyclients.adapter.common.CommonAdapter
|
||||||
|
import com.xjjk.healthyclients.adapter.common.ViewHolder
|
||||||
|
import com.xjjk.healthyclients.bean.user.UserMenuBean
|
||||||
|
import com.xjjk.healthyclients.view.CustomUserInfoMenu
|
||||||
|
|
||||||
|
class UserMenuAdapter(var mContext: Context, var layoutId: Int, var datas: ArrayList<UserMenuBean>?) : CommonAdapter<UserMenuBean>(mContext,layoutId,datas){
|
||||||
|
override fun convert(holder: ViewHolder?, bean: UserMenuBean?, position: Int) {
|
||||||
|
holder?.getView<CustomUserInfoMenu>(R.id.item_user_menu)?.let{
|
||||||
|
if (bean!=null) {
|
||||||
|
it.setOrderStateInfo(bean.name,bean.resource, bean.isShow)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,268 @@
|
|||||||
|
package com.xjjk.healthyclients.base
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.app.ActivityManager
|
||||||
|
import android.app.ActivityManager.RunningAppProcessInfo
|
||||||
|
import android.app.ProgressDialog
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.graphics.drawable.Drawable
|
||||||
|
import android.os.Build
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.text.InputType
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import android.view.View
|
||||||
|
import android.view.Window
|
||||||
|
import android.widget.EditText
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.annotation.IdRes
|
||||||
|
import androidx.annotation.LayoutRes
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.sw.healthyclients.view.CustomToast
|
||||||
|
import com.sw.healthyclients.view.LoadingDialog
|
||||||
|
import com.xjjk.healthyclients.MyApplication
|
||||||
|
import com.xjjk.healthyclients.event.GlobalEvent
|
||||||
|
import com.xjjk.healthyclients.retrofit.NetApi
|
||||||
|
import com.xjjk.healthyclients.retrofit.RetrofitManager
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.MainScope
|
||||||
|
import kotlinx.coroutines.cancel
|
||||||
|
import org.greenrobot.eventbus.EventBus
|
||||||
|
import org.greenrobot.eventbus.Subscribe
|
||||||
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
|
import java.lang.reflect.Method
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可以再基类中
|
||||||
|
*/
|
||||||
|
abstract class BaseActivity : AppCompatActivity(), View.OnClickListener, CoroutineScope by MainScope() {
|
||||||
|
protected var app: MyApplication? = null
|
||||||
|
public var mContext: Context? = null
|
||||||
|
protected set
|
||||||
|
var newsApi = RetrofitManager.getRetrofits().create(NetApi::class.java)
|
||||||
|
protected set
|
||||||
|
public var mActivity: Activity? = null
|
||||||
|
var dialog: LoadingDialog? = null
|
||||||
|
protected set
|
||||||
|
protected var screenWidth = 0
|
||||||
|
protected var screenHeight = 0
|
||||||
|
var moveTime: Long = 0
|
||||||
|
var currentMS: Long = 0
|
||||||
|
|
||||||
|
override fun onClick(view: View) {
|
||||||
|
processClick(view)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreate(paramBundle: Bundle?) {
|
||||||
|
super.onCreate(paramBundle)
|
||||||
|
EventBus.getDefault().register(this)
|
||||||
|
screenWidth = this.resources.displayMetrics.widthPixels
|
||||||
|
screenHeight = this.resources.displayMetrics.heightPixels
|
||||||
|
mContext = this
|
||||||
|
mActivity = this
|
||||||
|
createDialog()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(name: String, context: Context, attrs: AttributeSet): View? {
|
||||||
|
return super.onCreateView(name, context, attrs)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建加载弹窗
|
||||||
|
*/
|
||||||
|
private fun createDialog() {
|
||||||
|
dialog = LoadingDialog(
|
||||||
|
mActivity,
|
||||||
|
ProgressDialog.STYLE_SPINNER, "数据加载中"
|
||||||
|
)
|
||||||
|
dialog!!.requestWindowFeature(Window.FEATURE_NO_TITLE)
|
||||||
|
dialog!!.setCanceledOnTouchOutside(false)
|
||||||
|
dialog!!.setCancelable(false)
|
||||||
|
dialog!!.setMessage("请稍后")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setContentView(@LayoutRes layoutResID: Int) {
|
||||||
|
super.setContentView(layoutResID)
|
||||||
|
initView()
|
||||||
|
initData()
|
||||||
|
bindEvent()
|
||||||
|
tryToAddBackClick()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setContentView(view: View) {
|
||||||
|
super.setContentView(view)
|
||||||
|
initView()
|
||||||
|
bindEvent()
|
||||||
|
initData()
|
||||||
|
tryToAddBackClick()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStart() {
|
||||||
|
super.onStart()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStop() {
|
||||||
|
super.onStop()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
cancel()
|
||||||
|
EventBus.getDefault().unregister(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBackPressed() {
|
||||||
|
super.onBackPressed()
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化View
|
||||||
|
*/
|
||||||
|
abstract fun initView()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化数据
|
||||||
|
*/
|
||||||
|
abstract fun initData()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件监听
|
||||||
|
*/
|
||||||
|
protected abstract fun bindEvent()
|
||||||
|
/**
|
||||||
|
* 点击事件处理
|
||||||
|
*
|
||||||
|
* @param paramView
|
||||||
|
*/
|
||||||
|
abstract fun processClick(paramView: View?)
|
||||||
|
/**
|
||||||
|
* 返回键的默认点击销毁当前activity
|
||||||
|
*/
|
||||||
|
fun tryToAddBackClick() {}
|
||||||
|
|
||||||
|
|
||||||
|
fun showLongToast(message: String?) {
|
||||||
|
CustomToast.makeText(mContext, message, Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun showToast(message: String?, drawable: Drawable?) {
|
||||||
|
CustomToast.makeText(mContext, message, Toast.LENGTH_SHORT, drawable).show()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun showToast(message: String?) {
|
||||||
|
if (message != null&&message.isNotEmpty()) {
|
||||||
|
CustomToast.makeText(mContext, message, Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun toActivity(clazz: Class<*>?) {
|
||||||
|
val intent = Intent(mActivity, clazz)
|
||||||
|
mActivity?.startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun toActivityForResult(clazz: Class<*>?,code:Int) {
|
||||||
|
val intent = Intent(mActivity, clazz)
|
||||||
|
mActivity?.startActivityForResult(intent, code)
|
||||||
|
}
|
||||||
|
fun toActivityForResult(clazz: Class<*>?,bundle: Bundle?,code:Int) {
|
||||||
|
val intent = Intent(mActivity, clazz)
|
||||||
|
if (bundle != null) {
|
||||||
|
intent.putExtras(bundle)
|
||||||
|
}
|
||||||
|
mActivity?.startActivityForResult(intent, code)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun toActivity(clazz: Class<*>?, bundle: Bundle?) {
|
||||||
|
val intent = Intent(mActivity, clazz)
|
||||||
|
if (bundle != null) {
|
||||||
|
intent.putExtras(bundle)
|
||||||
|
}
|
||||||
|
mActivity?.startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
protected fun toLoginActivity(clazz: Class<*>?) {
|
||||||
|
val intent = Intent(mActivity, clazz)
|
||||||
|
mActivity?.startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onRestart() {
|
||||||
|
super.onRestart()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun finish() {
|
||||||
|
super.finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
protected fun <E : View?> F(@IdRes viewId: Int): E {
|
||||||
|
return super.findViewById<View>(viewId) as E
|
||||||
|
}
|
||||||
|
|
||||||
|
protected fun <E : View?> F(view: View, @IdRes viewId: Int): E {
|
||||||
|
return view.findViewById<View>(viewId) as E
|
||||||
|
}
|
||||||
|
|
||||||
|
protected fun <E : View?> C(view: E) {
|
||||||
|
view!!.setOnClickListener(this)
|
||||||
|
}// The name of the process that this object is associated with.// Returns a list of application processes that are running on the
|
||||||
|
// device
|
||||||
|
/**
|
||||||
|
* 程序是否在前台运行
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
val isAppOnForeground: Boolean
|
||||||
|
get() {
|
||||||
|
// Returns a list of application processes that are running on the
|
||||||
|
// device
|
||||||
|
val activityManager = applicationContext
|
||||||
|
.getSystemService(ACTIVITY_SERVICE) as ActivityManager
|
||||||
|
val packageName = applicationContext.packageName
|
||||||
|
val appProcesses = activityManager
|
||||||
|
.runningAppProcesses ?: return false
|
||||||
|
for (appProcess in appProcesses) {
|
||||||
|
// The name of the process that this object is associated with.
|
||||||
|
if (appProcess.processName == packageName && appProcess.importance == RunningAppProcessInfo.IMPORTANCE_FOREGROUND) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun disableShowInput(view: EditText) {
|
||||||
|
if (Build.VERSION.SDK_INT <= 10) {
|
||||||
|
view.inputType = InputType.TYPE_NULL
|
||||||
|
} else {
|
||||||
|
val cls = EditText::class.java
|
||||||
|
var method: Method
|
||||||
|
try {
|
||||||
|
method = cls.getMethod("setShowSoftInputOnFocus", Boolean::class.javaPrimitiveType)
|
||||||
|
method.isAccessible = true
|
||||||
|
method.invoke(view, false)
|
||||||
|
} catch (e: Exception) { //TODO: handle exception
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
method = cls.getMethod("setSoftInputShownOnFocus", Boolean::class.javaPrimitiveType)
|
||||||
|
method.isAccessible = true
|
||||||
|
method.invoke(view, false)
|
||||||
|
} catch (e: Exception) { //TODO: handle exception
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
open fun onMessageEvent(event: GlobalEvent?) {
|
||||||
|
try {
|
||||||
|
event?.let{ event->
|
||||||
|
if (event is GlobalEvent) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package com.xjjk.healthyclients.base
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Build
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import com.sw.healthyclients.utils.StatusbarUtil
|
||||||
|
import com.sw.healthyclients.view.CustomToast
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.MainScope
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可以再基类中
|
||||||
|
*/
|
||||||
|
abstract class BaseFragment : Fragment(), View.OnClickListener, CoroutineScope by MainScope() {
|
||||||
|
var mContext:Context?=null
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
mContext=context
|
||||||
|
return inflater.inflate(getContentLayoutId(), container, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
initViews(view);
|
||||||
|
initData();
|
||||||
|
bindEvent()
|
||||||
|
}
|
||||||
|
fun fitTransparentStatusBar(view: View?){
|
||||||
|
view?.let {
|
||||||
|
var statusHeight = StatusbarUtil.getStatusBarHeight(requireContext())
|
||||||
|
it.setPadding(0, statusHeight,
|
||||||
|
0, 0)
|
||||||
|
var height: Int = it.layoutParams?.height ?: 0
|
||||||
|
it.layoutParams.height = height + statusHeight
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected abstract fun getContentLayoutId(): Int
|
||||||
|
protected abstract fun getStatusbarStyle(): Int // 0 主题色+白字 1白底黑字
|
||||||
|
protected abstract fun initViews(root: View?)
|
||||||
|
|
||||||
|
protected open fun initData() {}
|
||||||
|
protected abstract fun bindEvent()
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.M)
|
||||||
|
@SuppressLint("ResourceAsColor")
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
// try {
|
||||||
|
// if (getStatusbarStyle()==0) {
|
||||||
|
// activity?.let { StatusbarUtil.customColorMode(it, "#54eccb",false) }
|
||||||
|
// }else if (getStatusbarStyle()==1){
|
||||||
|
// activity?.let { StatusbarUtil.customColorMode(it, "#FFFFFFFF",true) }
|
||||||
|
// }
|
||||||
|
// } catch (e: Exception) {
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
fun showToast(message: String?) {
|
||||||
|
if (message != null&&message.isNotEmpty()) {
|
||||||
|
CustomToast.makeText(mContext, message, Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun toActivity(clazz: Class<*>?) {
|
||||||
|
val intent = Intent(activity, clazz)
|
||||||
|
activity?.startActivity(intent)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,492 @@
|
|||||||
|
package com.xjjk.healthyclients.base
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.app.ProgressDialog
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.content.res.Configuration
|
||||||
|
import android.content.res.Resources
|
||||||
|
import android.graphics.drawable.ColorDrawable
|
||||||
|
import android.graphics.drawable.Drawable
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.Window
|
||||||
|
import android.widget.ImageView
|
||||||
|
import android.widget.RelativeLayout
|
||||||
|
import android.widget.TextView
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.graphics.ColorUtils
|
||||||
|
import androidx.databinding.DataBindingUtil
|
||||||
|
import androidx.databinding.OnRebindCallback
|
||||||
|
import androidx.databinding.ViewDataBinding
|
||||||
|
import androidx.lifecycle.Lifecycle
|
||||||
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import androidx.lifecycle.repeatOnLifecycle
|
||||||
|
import com.gyf.immersionbar.ktx.immersionBar
|
||||||
|
import com.orhanobut.logger.Logger
|
||||||
|
import com.sw.healthyclients.utils.CustomActivityManager
|
||||||
|
import com.sw.healthyclients.utils.StatusbarUtil
|
||||||
|
import com.sw.healthyclients.view.CustomToast
|
||||||
|
import com.sw.healthyclients.view.LoadingDialog
|
||||||
|
import com.xjjk.healthyclients.R
|
||||||
|
import com.xjjk.healthyclients.BR
|
||||||
|
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel
|
||||||
|
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel.Companion.LOADING_STATE_HIDE
|
||||||
|
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel.Companion.LOADING_STATE_SHOW
|
||||||
|
import com.xjjk.healthyclients.event.GlobalEvent
|
||||||
|
import com.xjjk.healthyclients.superfuntion.hideLoading
|
||||||
|
import com.xjjk.healthyclients.superfuntion.showLoading
|
||||||
|
import com.xjjk.healthyclients.superfuntion.startLoginActivity
|
||||||
|
import com.xjjk.healthyclients.ui.activity.LoginActivity
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
import org.greenrobot.eventbus.EventBus
|
||||||
|
import org.greenrobot.eventbus.Subscribe
|
||||||
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
|
import retrofit2.HttpException
|
||||||
|
import java.io.IOException
|
||||||
|
import java.lang.reflect.ParameterizedType
|
||||||
|
import java.net.ConnectException
|
||||||
|
import java.net.SocketTimeoutException
|
||||||
|
import java.net.UnknownHostException
|
||||||
|
import java.sql.SQLException
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封装了ViewModel和DataBinding的Activity基类
|
||||||
|
*
|
||||||
|
* @author nanfeifei 2021/11/23
|
||||||
|
*/
|
||||||
|
abstract class BaseVMBActivity<VM : BaseViewModel, B : ViewDataBinding>(private val contentViewResId: Int) :
|
||||||
|
AppCompatActivity(), View.OnClickListener {
|
||||||
|
var mContext: Context? = null
|
||||||
|
var mActivity: Activity? = null
|
||||||
|
lateinit var mViewModel: VM
|
||||||
|
lateinit var mBinding: B
|
||||||
|
var dialog: LoadingDialog? = null
|
||||||
|
var mEmpty: View?=null
|
||||||
|
var mRootView:RelativeLayout?=null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重写getResources()方法,让APP的字体不受系统设置字体大小影响
|
||||||
|
*/
|
||||||
|
override fun getResources(): Resources? {
|
||||||
|
val config = Configuration()
|
||||||
|
config.setToDefaults()
|
||||||
|
createConfigurationContext(config)
|
||||||
|
return super.getResources()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
EventBus.getDefault().register(this)
|
||||||
|
mContext = this
|
||||||
|
mActivity = this
|
||||||
|
initViewModel()
|
||||||
|
initDataBinding()
|
||||||
|
initImmersionBar()
|
||||||
|
onDrawFinish()
|
||||||
|
createObserve()
|
||||||
|
createDialog()
|
||||||
|
initView(savedInstanceState)
|
||||||
|
initData()
|
||||||
|
bindEvent()
|
||||||
|
mBinding.addOnRebindCallback(object : OnRebindCallback<B>(){
|
||||||
|
override fun onPreBind(binding: B): Boolean {//数据绑定之前
|
||||||
|
return super.onPreBind(binding)
|
||||||
|
}
|
||||||
|
override fun onBound(binding: B) {//数据绑定之后
|
||||||
|
super.onBound(binding)
|
||||||
|
setTransparentStatusBar(transparentStatusBar(), statusBarDarkFont())
|
||||||
|
dataBindingFinish()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
open fun initImmersionBar() {
|
||||||
|
initToolBar()
|
||||||
|
}
|
||||||
|
|
||||||
|
open fun onDrawFinish(){
|
||||||
|
mRootView=findViewById<RelativeLayout>(R.id.rl_empty_root_view)
|
||||||
|
mRootView?.let{
|
||||||
|
mEmpty=LayoutInflater.from(mContext)
|
||||||
|
.inflate(R.layout.layout_empty, it, false).apply {
|
||||||
|
findViewById<TextView>(R.id.tv_empty).text = "暂无数据"
|
||||||
|
}
|
||||||
|
var layoutParams =
|
||||||
|
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT)
|
||||||
|
layoutParams.addRule(RelativeLayout.BELOW, R.id.toolbar_lay)
|
||||||
|
mEmpty?.layoutParams = layoutParams
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
open fun dataBindingFinish(){
|
||||||
|
|
||||||
|
}
|
||||||
|
fun showEmpty(emptyMessage:String="暂无数据"){
|
||||||
|
if (mEmpty?.parent==null) {
|
||||||
|
mRootView?.addView(mEmpty)
|
||||||
|
}else{
|
||||||
|
mRootView?.removeView(mEmpty)
|
||||||
|
mRootView?.addView(mEmpty)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun hindEmpty(emptyMessage:String="暂无数据"){
|
||||||
|
mRootView?.removeView(mEmpty)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param isTransparent
|
||||||
|
* @param isStatusBarDarkFont
|
||||||
|
*/
|
||||||
|
open fun setTransparentStatusBar(isTransparent: Boolean, isStatusBarDarkFont: Boolean) {
|
||||||
|
immersionBar {
|
||||||
|
// reset()
|
||||||
|
titleBar(getToolBar())
|
||||||
|
var bgColor: Int = ContextCompat.getColor(this@BaseVMBActivity, R.color.colorAccent)
|
||||||
|
if (isTransparent) {
|
||||||
|
statusBarColorInt(ContextCompat.getColor(this@BaseVMBActivity, R.color.transparent))
|
||||||
|
.fitsSystemWindows(false) //解决状态栏和布局重叠问题
|
||||||
|
//如果当前设备支持状态栏字体变色,会设置状态栏字体为黑色,如果当前设备不支持状态栏字体变色,会使当前状态栏加上透明度,否则不执行透明度
|
||||||
|
statusBarDarkFont(isStatusBarDarkFont,0.2f)
|
||||||
|
} else {
|
||||||
|
var relativeLayout: RelativeLayout? = findViewById(R.id.toolbar_lay)
|
||||||
|
var background = relativeLayout?.background
|
||||||
|
if (relativeLayout != null && background is ColorDrawable) {
|
||||||
|
bgColor = background.color
|
||||||
|
}
|
||||||
|
statusBarColorInt(bgColor)
|
||||||
|
.fitsSystemWindows(false) //解决状态栏和布局重叠问题
|
||||||
|
//如果为亮色则状态栏字体为黑色,否则为白色
|
||||||
|
statusBarDarkFont(isLightColor(bgColor), 0.2f)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断一个颜色是否是亮色
|
||||||
|
*/
|
||||||
|
fun isLightColor(color: Int): Boolean {
|
||||||
|
val darkness = ColorUtils.calculateLuminance(color)
|
||||||
|
return darkness >= 0.5
|
||||||
|
}
|
||||||
|
private fun initToolBar() {
|
||||||
|
// if (transparentStatusBar()) {
|
||||||
|
var titleLay: View? = findViewById(R.id.rl_title_lay)
|
||||||
|
if (titleLay == null){
|
||||||
|
titleLay = findViewById(R.id.toolbar_lay)
|
||||||
|
}
|
||||||
|
if (titleLay == null){
|
||||||
|
titleLay = getToolBar()
|
||||||
|
}
|
||||||
|
fitTransparentStatusBar(titleLay)
|
||||||
|
|
||||||
|
// }
|
||||||
|
findViewById<ImageView>(R.id.title_iv_back)?.setOnClickListener {
|
||||||
|
onBackEvent()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun fitTransparentStatusBar(view: View?) {
|
||||||
|
view?.let {
|
||||||
|
var statusHeight = StatusbarUtil.getStatusBarHeight(this@BaseVMBActivity)
|
||||||
|
it.setPadding(
|
||||||
|
0, statusHeight,
|
||||||
|
0, 0
|
||||||
|
)
|
||||||
|
var height: Int = it.layoutParams?.height ?: 0
|
||||||
|
it.layoutParams.height = height + statusHeight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun addClickViews(vararg views: View) {
|
||||||
|
for (view in views) {
|
||||||
|
view.setOnClickListener(this)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBackPressed() {
|
||||||
|
onBackEvent()
|
||||||
|
}
|
||||||
|
|
||||||
|
open fun onBackEvent() {
|
||||||
|
super.onBackPressed()
|
||||||
|
// finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onClick(view: View) {
|
||||||
|
processClick(view)
|
||||||
|
}
|
||||||
|
|
||||||
|
open fun getToolBar(): View? {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是透明状态栏
|
||||||
|
*/
|
||||||
|
open fun transparentStatusBar(): Boolean {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 状态栏是否是深色*/
|
||||||
|
open fun statusBarDarkFont(): Boolean {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ViewModel初始化 */
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
open fun initViewModel() {
|
||||||
|
// 这里利用反射获取泛型中第一个参数ViewModel
|
||||||
|
val type: Class<VM> =
|
||||||
|
(this.javaClass.genericSuperclass as ParameterizedType).actualTypeArguments[0] as Class<VM>
|
||||||
|
mViewModel = ViewModelProvider(this)[type]
|
||||||
|
mViewModel.init()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** DataBinding初始化 */
|
||||||
|
private fun initDataBinding() {
|
||||||
|
mBinding = DataBindingUtil.setContentView(this, contentViewResId)
|
||||||
|
mBinding.apply {
|
||||||
|
// 需绑定lifecycleOwner到activity,xml绑定的数据才会随着liveData数据源的改变而改变
|
||||||
|
lifecycleOwner = this@BaseVMBActivity
|
||||||
|
setVariable(BR.viewModel, mViewModel)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** View相关初始化 */
|
||||||
|
abstract fun initView(savedInstanceState: Bundle?)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化数据
|
||||||
|
*/
|
||||||
|
abstract fun initData()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件监听
|
||||||
|
*/
|
||||||
|
protected abstract fun bindEvent()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击事件处理
|
||||||
|
*
|
||||||
|
* @param paramView
|
||||||
|
*/
|
||||||
|
abstract fun processClick(v: View?)
|
||||||
|
fun showLongToast(message: String?) {
|
||||||
|
CustomToast.makeText(mContext, message, Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun showToast(message: String?, drawable: Drawable?) {
|
||||||
|
CustomToast.makeText(mContext, message, Toast.LENGTH_SHORT, drawable).show()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun showToast(message: String?) {
|
||||||
|
if (message != null && message.isNotEmpty()) {
|
||||||
|
CustomToast.makeText(mContext, message, Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提供编写LiveData监听逻辑的方法 */
|
||||||
|
open fun createObserve() {
|
||||||
|
// 全局服务器请求错误监听
|
||||||
|
mViewModel.apply {
|
||||||
|
loadingDialog.observe(this@BaseVMBActivity) {
|
||||||
|
when (it) {
|
||||||
|
LOADING_STATE_SHOW -> {
|
||||||
|
showLoading()
|
||||||
|
}
|
||||||
|
|
||||||
|
LOADING_STATE_HIDE -> {
|
||||||
|
hideLoading()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showEmpty.observe(this@BaseVMBActivity){
|
||||||
|
if (isAutoEmpty.value == true&&it){
|
||||||
|
showEmpty()
|
||||||
|
}else{
|
||||||
|
hindEmpty()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lifecycleScope.launch {
|
||||||
|
repeatOnLifecycle(Lifecycle.State.CREATED) {
|
||||||
|
toastMessage.collect { message ->
|
||||||
|
message?.let {
|
||||||
|
CustomToast.makeText(
|
||||||
|
this@BaseVMBActivity, message, Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exception.observe(this@BaseVMBActivity) {
|
||||||
|
requestError(it.message)
|
||||||
|
Logger.e("Network error:${it.message}")
|
||||||
|
when (it) {
|
||||||
|
is HttpException -> {
|
||||||
|
if (it.code() == 401) {
|
||||||
|
val activity = CustomActivityManager.getInstance().currentActivity()
|
||||||
|
if (activity !is LoginActivity) {
|
||||||
|
startLoginActivity(this@BaseVMBActivity)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}else if (it.code() == 404) {
|
||||||
|
CustomToast.makeText(
|
||||||
|
this@BaseVMBActivity,
|
||||||
|
"服务器走丢了,请稍后重试",
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is SocketTimeoutException -> CustomToast.makeText(
|
||||||
|
this@BaseVMBActivity,
|
||||||
|
getString(R.string.request_time_out), Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
|
||||||
|
is ConnectException, is UnknownHostException ->
|
||||||
|
CustomToast.makeText(
|
||||||
|
this@BaseVMBActivity,
|
||||||
|
getString(R.string.network_error), Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
is IOException, is SQLException ->
|
||||||
|
CustomToast.makeText(
|
||||||
|
this@BaseVMBActivity,
|
||||||
|
getString(R.string.response_error), Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
else ->
|
||||||
|
CustomToast.makeText(
|
||||||
|
this@BaseVMBActivity,
|
||||||
|
it.message ?: getString(R.string.response_error),
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 全局服务器返回的错误信息监听
|
||||||
|
errorResponse.observe(this@BaseVMBActivity) {
|
||||||
|
requestError(it?.message)
|
||||||
|
when (it) {
|
||||||
|
is HttpException -> {
|
||||||
|
if (it.code() == 401) {
|
||||||
|
startLoginActivity(this@BaseVMBActivity)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
|
it?.message?.run {
|
||||||
|
CustomToast.makeText(
|
||||||
|
this@BaseVMBActivity,
|
||||||
|
this ?: getString(R.string.response_error),
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
it?.msg?.run {
|
||||||
|
CustomToast.makeText(
|
||||||
|
this@BaseVMBActivity,
|
||||||
|
this ?: getString(R.string.response_error),
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提供一个请求错误的方法,用于像关闭加载框,显示错误布局之类的 */
|
||||||
|
open fun requestError(msg: String?) {
|
||||||
|
mViewModel.loadingDialog.value = LOADING_STATE_HIDE
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
mViewModel.loadingDialog.value = LOADING_STATE_HIDE
|
||||||
|
EventBus.getDefault().unregister(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
open fun onMessageEvent(event: Any?) {
|
||||||
|
try {
|
||||||
|
event?.let { event ->
|
||||||
|
if (event is GlobalEvent) {
|
||||||
|
if (event.message == 0) {
|
||||||
|
mContext?.let {
|
||||||
|
startLoginActivity(it)
|
||||||
|
}
|
||||||
|
var currentActivity= CustomActivityManager.getInstance().currentActivity()
|
||||||
|
if (!currentActivity.toString().contains("MainActivity")) {
|
||||||
|
CustomActivityManager.getInstance().finishActivity(CustomActivityManager.getInstance().currentActivity())
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录状态发生变化
|
||||||
|
*/
|
||||||
|
open fun loginStateChange(isLogin: Boolean) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun toActivity(clazz: Class<*>?) {
|
||||||
|
val intent = Intent(mActivity, clazz)
|
||||||
|
mActivity?.startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun toActivityForResult(clazz: Class<*>?, code: Int) {
|
||||||
|
val intent = Intent(mActivity, clazz)
|
||||||
|
mActivity?.startActivityForResult(intent, code)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun toActivityForResult(clazz: Class<*>?, bundle: Bundle?, code: Int) {
|
||||||
|
val intent = Intent(mActivity, clazz)
|
||||||
|
if (bundle != null) {
|
||||||
|
intent.putExtras(bundle)
|
||||||
|
}
|
||||||
|
mActivity?.startActivityForResult(intent, code)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun toActivity(clazz: Class<*>?, bundle: Bundle?) {
|
||||||
|
val intent = Intent(mActivity, clazz)
|
||||||
|
if (bundle != null) {
|
||||||
|
intent.putExtras(bundle)
|
||||||
|
}
|
||||||
|
mActivity?.startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun createDialog() {
|
||||||
|
dialog = LoadingDialog(
|
||||||
|
mContext,
|
||||||
|
ProgressDialog.STYLE_SPINNER, "数据加载中"
|
||||||
|
)
|
||||||
|
dialog!!.requestWindowFeature(Window.FEATURE_NO_TITLE)
|
||||||
|
dialog!!.setCanceledOnTouchOutside(false)
|
||||||
|
dialog!!.setCancelable(false)
|
||||||
|
dialog!!.setMessage("请稍后...")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 字体大小不跟随系统
|
||||||
|
override fun attachBaseContext(newBase: Context) {
|
||||||
|
super.attachBaseContext(getConfigurationContext(newBase))
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getConfigurationContext(context: Context): Context {
|
||||||
|
val configuration = context.resources.configuration
|
||||||
|
configuration.fontScale = 1f
|
||||||
|
return context.createConfigurationContext(configuration)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,379 @@
|
|||||||
|
package com.xjjk.healthyclients.base
|
||||||
|
|
||||||
|
import android.app.ProgressDialog
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.view.Window
|
||||||
|
import android.view.WindowManager
|
||||||
|
import android.widget.RelativeLayout
|
||||||
|
import android.widget.TextView
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.databinding.DataBindingUtil
|
||||||
|
import androidx.databinding.ViewDataBinding
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import androidx.lifecycle.Lifecycle
|
||||||
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import androidx.lifecycle.repeatOnLifecycle
|
||||||
|
import com.orhanobut.logger.Logger
|
||||||
|
import com.sw.healthyclients.utils.StatusbarUtil
|
||||||
|
import com.sw.healthyclients.view.CustomToast
|
||||||
|
import com.sw.healthyclients.view.LoadingDialog
|
||||||
|
import com.xjjk.healthyclients.R
|
||||||
|
import com.xjjk.healthyclients.BR
|
||||||
|
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel
|
||||||
|
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel.Companion.LOADING_STATE_HIDE
|
||||||
|
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel.Companion.LOADING_STATE_SHOW
|
||||||
|
import com.xjjk.healthyclients.superfuntion.hideLoading
|
||||||
|
import com.xjjk.healthyclients.superfuntion.showLoading
|
||||||
|
import com.xjjk.healthyclients.superfuntion.startLoginActivity
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
import org.greenrobot.eventbus.EventBus
|
||||||
|
import org.greenrobot.eventbus.Subscribe
|
||||||
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
|
import retrofit2.HttpException
|
||||||
|
import java.io.IOException
|
||||||
|
import java.lang.reflect.ParameterizedType
|
||||||
|
import java.net.ConnectException
|
||||||
|
import java.net.SocketTimeoutException
|
||||||
|
import java.net.UnknownHostException
|
||||||
|
import java.sql.SQLException
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封装了ViewModel和DataBinding的Fragment基类
|
||||||
|
* 未默认实现onClick方法主要为了让使用者看到而不是另外实现接口
|
||||||
|
*
|
||||||
|
* @author LTP 2021/11/23
|
||||||
|
*/
|
||||||
|
abstract class BaseVMBFragment<VM : BaseViewModel, B : ViewDataBinding>(private val contentViewResId: Int) :
|
||||||
|
Fragment(), View.OnClickListener {
|
||||||
|
var mRootView: RelativeLayout?=null
|
||||||
|
/** 是否第一次加载 */
|
||||||
|
private var mIsFirstLoading = true
|
||||||
|
var dialog: LoadingDialog? = null
|
||||||
|
protected lateinit var mViewModel: VM
|
||||||
|
lateinit var mBinding: B
|
||||||
|
var mEmpty: View?=null
|
||||||
|
var mIsVisible: Boolean=false
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
mBinding = DataBindingUtil.inflate(inflater, contentViewResId, container, false)
|
||||||
|
return mBinding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
if (!EventBus.getDefault().isRegistered(this)) {
|
||||||
|
EventBus.getDefault().register(this)
|
||||||
|
}
|
||||||
|
createDialog()
|
||||||
|
mIsFirstLoading = true
|
||||||
|
initViewModel()
|
||||||
|
onDrawFinish()
|
||||||
|
initView(view, savedInstanceState)
|
||||||
|
initData()
|
||||||
|
setupDataBinding()
|
||||||
|
createObserve()
|
||||||
|
initToolBar()
|
||||||
|
bindEvent()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ViewModel初始化 */
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
open fun initViewModel() {
|
||||||
|
// 这里利用反射获取泛型中第一个参数ViewModel
|
||||||
|
val type: Class<VM> =
|
||||||
|
(this.javaClass.genericSuperclass as ParameterizedType).actualTypeArguments[0] as Class<VM>
|
||||||
|
mViewModel = ViewModelProvider(this)[type]
|
||||||
|
mViewModel.init()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** DataBinding相关设置 */
|
||||||
|
private fun setupDataBinding() {
|
||||||
|
mBinding.apply {
|
||||||
|
// 需绑定lifecycleOwner到Fragment,xml绑定的数据才会随着liveData数据源的改变而改变
|
||||||
|
lifecycleOwner = viewLifecycleOwner
|
||||||
|
setVariable(BR.viewModel, mViewModel)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** View相关初始化 */
|
||||||
|
abstract fun initView(root: View?, savedInstanceState: Bundle?)
|
||||||
|
private fun initToolBar() {
|
||||||
|
if (transparentStatusBar()) {
|
||||||
|
var titleLay: View? = mBinding.root.findViewById(R.id.rl_title_lay)
|
||||||
|
if (titleLay == null) {
|
||||||
|
titleLay = mBinding.root.findViewById(R.id.toolbar_lay)
|
||||||
|
}
|
||||||
|
fitTransparentStatusBar(titleLay)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun fitTransparentStatusBar(view: View?) {
|
||||||
|
view?.let {
|
||||||
|
var statusHeight = StatusbarUtil.getStatusBarHeight(requireContext())
|
||||||
|
it.setPadding(
|
||||||
|
0, statusHeight,
|
||||||
|
0, 0
|
||||||
|
)
|
||||||
|
var height: Int = it.layoutParams?.height ?: 0
|
||||||
|
it.layoutParams.height = height + statusHeight
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open fun onDrawFinish(){
|
||||||
|
mRootView=mBinding.root.findViewById<RelativeLayout>(R.id.rl_empty_root_view)
|
||||||
|
mRootView?.let{
|
||||||
|
mEmpty=LayoutInflater.from(context)
|
||||||
|
.inflate(R.layout.layout_empty, it, false).apply {
|
||||||
|
findViewById<TextView>(R.id.tv_empty).text = "暂无数据"
|
||||||
|
}
|
||||||
|
var layoutParams =
|
||||||
|
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT)
|
||||||
|
layoutParams.addRule(RelativeLayout.BELOW, R.id.toolbar_lay)
|
||||||
|
mEmpty?.layoutParams = layoutParams
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun showEmpty(emptyMessage:String="暂无数据",color: Int=0){
|
||||||
|
try {
|
||||||
|
if(color!=0){
|
||||||
|
mEmpty?.setBackgroundColor(color)
|
||||||
|
}
|
||||||
|
mEmpty?.findViewById<TextView>(R.id.tv_empty)?.setText(emptyMessage)
|
||||||
|
|
||||||
|
if (mEmpty?.parent==null) {
|
||||||
|
mRootView?.addView(mEmpty)
|
||||||
|
}else{
|
||||||
|
mRootView?.removeView(mEmpty)
|
||||||
|
mRootView?.addView(mEmpty)
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun hindEmpty(emptyMessage:String="暂无数据"){
|
||||||
|
try {
|
||||||
|
mRootView?.removeView(mEmpty)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 是否是透明状态栏
|
||||||
|
*/
|
||||||
|
open fun transparentStatusBar(): Boolean {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
mIsVisible=isVisible()
|
||||||
|
if (lifecycle.currentState == Lifecycle.State.STARTED && mIsFirstLoading) {
|
||||||
|
lazyLoadData()
|
||||||
|
mIsFirstLoading = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onHiddenChanged(hidden: Boolean) {
|
||||||
|
super.onHiddenChanged(hidden)
|
||||||
|
mIsVisible=!hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStop() {
|
||||||
|
super.onStop()
|
||||||
|
mIsVisible=false
|
||||||
|
}
|
||||||
|
|
||||||
|
fun addClickViews(vararg views: View) {
|
||||||
|
for (view in views) {
|
||||||
|
view.setOnClickListener(this)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 数据懒加载 */
|
||||||
|
open fun lazyLoadData() {}
|
||||||
|
|
||||||
|
/** 提供编写LiveData监听逻辑的方法 */
|
||||||
|
open fun createObserve() { // 全局服务器请求错误监听
|
||||||
|
mViewModel.apply {
|
||||||
|
loadingDialog.observe(viewLifecycleOwner) {
|
||||||
|
when (it) {
|
||||||
|
LOADING_STATE_SHOW -> {
|
||||||
|
showLoading()
|
||||||
|
}
|
||||||
|
|
||||||
|
LOADING_STATE_HIDE -> {
|
||||||
|
hideLoading()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lifecycleScope.launch {
|
||||||
|
repeatOnLifecycle(Lifecycle.State.CREATED) {
|
||||||
|
toastMessage.collect { message ->
|
||||||
|
message?.let {
|
||||||
|
CustomToast.makeText(
|
||||||
|
requireContext(), message, Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exception.observe(viewLifecycleOwner) {
|
||||||
|
requestError(it.message)
|
||||||
|
Logger.e("Network error:${it.message}")
|
||||||
|
when (it) {
|
||||||
|
is HttpException -> {
|
||||||
|
if (it.code() == 401) {
|
||||||
|
startLoginActivity(requireContext())
|
||||||
|
requireActivity().finish()
|
||||||
|
}else if (it.code() == 404) {
|
||||||
|
CustomToast.makeText(
|
||||||
|
requireContext(),
|
||||||
|
"服务器走丢了,请稍后重试",
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is SocketTimeoutException -> CustomToast.makeText(
|
||||||
|
requireContext(),
|
||||||
|
getString(R.string.request_time_out), Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
|
||||||
|
is ConnectException, is UnknownHostException ->
|
||||||
|
CustomToast.makeText(
|
||||||
|
requireContext(),
|
||||||
|
getString(R.string.network_error), Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
is IOException, is SQLException ->
|
||||||
|
CustomToast.makeText(
|
||||||
|
requireContext(),
|
||||||
|
getString(R.string.response_error), Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
is WindowManager.BadTokenException ->{
|
||||||
|
|
||||||
|
}
|
||||||
|
else ->
|
||||||
|
CustomToast.makeText(
|
||||||
|
requireContext(),
|
||||||
|
it.message ?: getString(R.string.response_error),
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 全局服务器返回的错误信息监听
|
||||||
|
errorResponse.observe(viewLifecycleOwner) {
|
||||||
|
requestError(it?.message)
|
||||||
|
when (it) {
|
||||||
|
is HttpException -> {
|
||||||
|
if (it.code() == 401) {
|
||||||
|
startLoginActivity(requireContext())
|
||||||
|
requireActivity().finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
|
it?.message?.run {
|
||||||
|
if (mIsVisible) {
|
||||||
|
CustomToast.makeText(
|
||||||
|
requireContext(),
|
||||||
|
this ?: getString(R.string.response_error),
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
it?.msg?.run {
|
||||||
|
if (mIsVisible) {
|
||||||
|
CustomToast.makeText(
|
||||||
|
requireContext(),
|
||||||
|
this ?: getString(R.string.response_error),
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提供一个请求错误的方法,用于像关闭加载框之类的 */
|
||||||
|
open fun requestError(msg: String? = null) {
|
||||||
|
mViewModel.loadingDialog.value = LOADING_STATE_HIDE
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroyView() {
|
||||||
|
mBinding == null
|
||||||
|
super.onDestroyView()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
if (!EventBus.getDefault().isRegistered(this)) {
|
||||||
|
EventBus.getDefault().unregister(this)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
open fun onMessageEvent(event: Any?) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
open fun loginStateChange(isLogin: Boolean) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected open fun initData() {}
|
||||||
|
protected abstract fun bindEvent()
|
||||||
|
fun showToast(message: String?) {
|
||||||
|
if (message != null && message.isNotEmpty()) {
|
||||||
|
if (this.mIsVisible) {
|
||||||
|
try {
|
||||||
|
CustomToast.makeText(requireContext(), message, Toast.LENGTH_SHORT).show()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun toActivity(clazz: Class<*>?) {
|
||||||
|
val intent = Intent(activity, clazz)
|
||||||
|
activity?.startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun toActivity(clazz: Class<*>?, bundle: Bundle?) {
|
||||||
|
val intent = Intent(activity, clazz)
|
||||||
|
if (bundle != null) {
|
||||||
|
intent.putExtras(bundle)
|
||||||
|
}
|
||||||
|
activity?.startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 历史遗留方法,懒得改以前的了,新页面无视即可
|
||||||
|
*/
|
||||||
|
open fun getStatusbarStyle(): Int{
|
||||||
|
return 0
|
||||||
|
} // 0 主题色+白字 1白底黑字
|
||||||
|
|
||||||
|
private fun createDialog() {
|
||||||
|
dialog = LoadingDialog(
|
||||||
|
activity,
|
||||||
|
ProgressDialog.STYLE_SPINNER, "数据加载中"
|
||||||
|
)
|
||||||
|
dialog!!.requestWindowFeature(Window.FEATURE_NO_TITLE)
|
||||||
|
dialog!!.setCanceledOnTouchOutside(false)
|
||||||
|
dialog!!.setCancelable(false)
|
||||||
|
dialog!!.setMessage("请稍后")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.xjjk.healthyclients.base.repository
|
||||||
|
|
||||||
|
import com.xjjk.healthyclients.data.bean.ApiResponse
|
||||||
|
import com.xjjk.healthyclients.retrofit.ResultData
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.withContext
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Repository数据仓库基类,主要用于协程的调用
|
||||||
|
*
|
||||||
|
* @author LTP 2022/3/23
|
||||||
|
*/
|
||||||
|
open class BaseRepository {
|
||||||
|
|
||||||
|
suspend fun <T> apiCall(api: suspend () -> ApiResponse<T>): ApiResponse<T> {
|
||||||
|
return withContext(Dispatchers.IO) {
|
||||||
|
api.invoke() }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.xjjk.healthyclients.base.viewmodel
|
||||||
|
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import androidx.lifecycle.ViewModel
|
||||||
|
import com.xjjk.healthyclients.data.bean.ApiResponse
|
||||||
|
import com.xjjk.healthyclients.retrofit.ResultData
|
||||||
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ViewModel基类
|
||||||
|
* @author LTP 2021/11/23
|
||||||
|
*/
|
||||||
|
abstract class BaseViewModel : ViewModel() {
|
||||||
|
companion object{
|
||||||
|
const val LOADING_STATE_SHOW = 1
|
||||||
|
const val LOADING_STATE_HIDE = 2
|
||||||
|
}
|
||||||
|
/** 加载框控制 */
|
||||||
|
var loadingDialog = MutableLiveData<Int>()
|
||||||
|
/** 请求异常(服务器请求失败,譬如:服务器连接超时等) */
|
||||||
|
val exception = MutableLiveData<Exception>()
|
||||||
|
|
||||||
|
/** 请求服务器返回错误(服务器请求成功但status错误,譬如:登录过期等) */
|
||||||
|
val errorResponse = MutableLiveData<ApiResponse<*>?>()
|
||||||
|
/** Toast文本 */
|
||||||
|
var toastMessage = MutableStateFlow<String?>(null)
|
||||||
|
/** 界面启动时要进行的初始化逻辑,如网络请求,数据初始化等 */
|
||||||
|
abstract fun init()
|
||||||
|
/** 监听请求,返回空数据的时候是否自动展示空页面*/
|
||||||
|
var isAutoEmpty = MutableLiveData<Boolean>()
|
||||||
|
/** 监听请求,是否展示空页面*/
|
||||||
|
var showEmpty = MutableLiveData<Boolean>(false)
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.xjjk.healthyclients.base.viewmodel
|
||||||
|
|
||||||
|
class TestViewModel: BaseViewModel() {
|
||||||
|
override fun init() {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,383 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
public class AEDResultBean {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private String name;
|
||||||
|
private Double longitude;
|
||||||
|
private Double latitude;
|
||||||
|
private String departCode;
|
||||||
|
private String hostModel;
|
||||||
|
private String hostSerialNum;
|
||||||
|
private String electrodeSheetValidTime;
|
||||||
|
private String routerModel;
|
||||||
|
private String routerSerialNum;
|
||||||
|
private String batteryModel;
|
||||||
|
private Double batteryVoltage;
|
||||||
|
private String warrantyStartDate;
|
||||||
|
private String warrantyEndDate;
|
||||||
|
private Object aedImg;
|
||||||
|
private String mfrsName;
|
||||||
|
private String mfrsMobile;
|
||||||
|
private String installAddress;
|
||||||
|
private Object installAddressImg;
|
||||||
|
private Object manageUserId;
|
||||||
|
private String manageUserName;
|
||||||
|
private String manageUserMobile;
|
||||||
|
private String checkStatus;
|
||||||
|
private String checkStatus_dictText;
|
||||||
|
private String electrodeSheetStatus;
|
||||||
|
private String electrodeSheetStatus_dictText;
|
||||||
|
private String batteryStatus;
|
||||||
|
private String batteryStatus_dictText;
|
||||||
|
private String routerStatus;
|
||||||
|
private String routerStatus_dictText;
|
||||||
|
private String departName;
|
||||||
|
private Integer delFlag;
|
||||||
|
private Object createBy;
|
||||||
|
private Object createTime;
|
||||||
|
private Object updateBy;
|
||||||
|
private Object updateTime;
|
||||||
|
private Object memo;
|
||||||
|
private Double distance;
|
||||||
|
private String chargeFirst;
|
||||||
|
private String chargeFirstMobile;
|
||||||
|
private String chargeSecond;
|
||||||
|
private String chargeSecondMobile;
|
||||||
|
|
||||||
|
public String getChargeFirst() {
|
||||||
|
return chargeFirst == null ? "" : chargeFirst;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChargeFirst(String chargeFirst) {
|
||||||
|
this.chargeFirst = chargeFirst;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChargeFirstMobile() {
|
||||||
|
return chargeFirstMobile == null ? "" : chargeFirstMobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChargeFirstMobile(String chargeFirstMobile) {
|
||||||
|
this.chargeFirstMobile = chargeFirstMobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChargeSecond() {
|
||||||
|
return chargeSecond == null ? "" : chargeSecond;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChargeSecond(String chargeSecond) {
|
||||||
|
this.chargeSecond = chargeSecond;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChargeSecondMobile() {
|
||||||
|
return chargeSecondMobile == null ? "" : chargeSecondMobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChargeSecondMobile(String chargeSecondMobile) {
|
||||||
|
this.chargeSecondMobile = chargeSecondMobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(Double longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(Double latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartCode() {
|
||||||
|
return departCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartCode(String departCode) {
|
||||||
|
this.departCode = departCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHostModel() {
|
||||||
|
return hostModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHostModel(String hostModel) {
|
||||||
|
this.hostModel = hostModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHostSerialNum() {
|
||||||
|
return hostSerialNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHostSerialNum(String hostSerialNum) {
|
||||||
|
this.hostSerialNum = hostSerialNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getElectrodeSheetValidTime() {
|
||||||
|
return electrodeSheetValidTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setElectrodeSheetValidTime(String electrodeSheetValidTime) {
|
||||||
|
this.electrodeSheetValidTime = electrodeSheetValidTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRouterModel() {
|
||||||
|
return routerModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRouterModel(String routerModel) {
|
||||||
|
this.routerModel = routerModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRouterSerialNum() {
|
||||||
|
return routerSerialNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRouterSerialNum(String routerSerialNum) {
|
||||||
|
this.routerSerialNum = routerSerialNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBatteryModel() {
|
||||||
|
return batteryModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBatteryModel(String batteryModel) {
|
||||||
|
this.batteryModel = batteryModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getBatteryVoltage() {
|
||||||
|
return batteryVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBatteryVoltage(Double batteryVoltage) {
|
||||||
|
this.batteryVoltage = batteryVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarrantyStartDate() {
|
||||||
|
return warrantyStartDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWarrantyStartDate(String warrantyStartDate) {
|
||||||
|
this.warrantyStartDate = warrantyStartDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarrantyEndDate() {
|
||||||
|
return warrantyEndDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWarrantyEndDate(String warrantyEndDate) {
|
||||||
|
this.warrantyEndDate = warrantyEndDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getAedImg() {
|
||||||
|
return aedImg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAedImg(Object aedImg) {
|
||||||
|
this.aedImg = aedImg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMfrsName() {
|
||||||
|
return mfrsName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMfrsName(String mfrsName) {
|
||||||
|
this.mfrsName = mfrsName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMfrsMobile() {
|
||||||
|
return mfrsMobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMfrsMobile(String mfrsMobile) {
|
||||||
|
this.mfrsMobile = mfrsMobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInstallAddress() {
|
||||||
|
return installAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInstallAddress(String installAddress) {
|
||||||
|
this.installAddress = installAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getInstallAddressImg() {
|
||||||
|
return installAddressImg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInstallAddressImg(Object installAddressImg) {
|
||||||
|
this.installAddressImg = installAddressImg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getManageUserId() {
|
||||||
|
return manageUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setManageUserId(Object manageUserId) {
|
||||||
|
this.manageUserId = manageUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getManageUserName() {
|
||||||
|
return manageUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setManageUserName(String manageUserName) {
|
||||||
|
this.manageUserName = manageUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getManageUserMobile() {
|
||||||
|
return manageUserMobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setManageUserMobile(String manageUserMobile) {
|
||||||
|
this.manageUserMobile = manageUserMobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckStatus() {
|
||||||
|
return checkStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheckStatus(String checkStatus) {
|
||||||
|
this.checkStatus = checkStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckStatus_dictText() {
|
||||||
|
return checkStatus_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheckStatus_dictText(String checkStatus_dictText) {
|
||||||
|
this.checkStatus_dictText = checkStatus_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getElectrodeSheetStatus() {
|
||||||
|
return electrodeSheetStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setElectrodeSheetStatus(String electrodeSheetStatus) {
|
||||||
|
this.electrodeSheetStatus = electrodeSheetStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getElectrodeSheetStatus_dictText() {
|
||||||
|
return electrodeSheetStatus_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setElectrodeSheetStatus_dictText(String electrodeSheetStatus_dictText) {
|
||||||
|
this.electrodeSheetStatus_dictText = electrodeSheetStatus_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBatteryStatus() {
|
||||||
|
return batteryStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBatteryStatus(String batteryStatus) {
|
||||||
|
this.batteryStatus = batteryStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBatteryStatus_dictText() {
|
||||||
|
return batteryStatus_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBatteryStatus_dictText(String batteryStatus_dictText) {
|
||||||
|
this.batteryStatus_dictText = batteryStatus_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRouterStatus() {
|
||||||
|
return routerStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRouterStatus(String routerStatus) {
|
||||||
|
this.routerStatus = routerStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRouterStatus_dictText() {
|
||||||
|
return routerStatus_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRouterStatus_dictText(String routerStatus_dictText) {
|
||||||
|
this.routerStatus_dictText = routerStatus_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartName() {
|
||||||
|
return departName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartName(String departName) {
|
||||||
|
this.departName = departName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDelFlag() {
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDelFlag(Integer delFlag) {
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getCreateBy() {
|
||||||
|
return createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateBy(Object createBy) {
|
||||||
|
this.createBy = createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Object createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getUpdateBy() {
|
||||||
|
return updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateBy(Object updateBy) {
|
||||||
|
this.updateBy = updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Object updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getMemo() {
|
||||||
|
return memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemo(Object memo) {
|
||||||
|
this.memo = memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getDistance() {
|
||||||
|
return distance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistance(Double distance) {
|
||||||
|
this.distance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.xjjk.healthyclients.bean
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
|
||||||
|
class AedNetworkingBean : Serializable {
|
||||||
|
var aedStatus: String? = null
|
||||||
|
var chargeFirst: String? = null
|
||||||
|
var chargeFirstMobile: String? = null
|
||||||
|
var chargeSecond: String? = null
|
||||||
|
var chargeSecondMobile: String? = null
|
||||||
|
var code: String? = null
|
||||||
|
var controlOrgName: String? = null
|
||||||
|
var coverUserNum: Int? = null
|
||||||
|
var departName: String? = null
|
||||||
|
var disclaimer: String? = null
|
||||||
|
var distance: Double? = null
|
||||||
|
var hostModel: String? = null
|
||||||
|
var hostSerialNum: String? = null
|
||||||
|
var installAddress: String? = null
|
||||||
|
var installAddressImg: String? = null
|
||||||
|
var latitude: Double = 0.0
|
||||||
|
var longitude: Double = 0.0
|
||||||
|
var manageUserMobile: String? = null
|
||||||
|
var manageUserName: String? = null
|
||||||
|
var mfrsMobile: String? = null
|
||||||
|
var name: String? = null
|
||||||
|
var operateInstruction: String? = null
|
||||||
|
var operateVideo: String? = null
|
||||||
|
var operateType: Int = 0
|
||||||
|
var brand: String? = null
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.xjjk.healthyclients.bean
|
||||||
|
|
||||||
|
data class AppUpdateBean(
|
||||||
|
var appId: String = "",
|
||||||
|
var appName: String = "",
|
||||||
|
var appStatus: Int = 0,
|
||||||
|
var appUrl: String = "",
|
||||||
|
var deviceType: Int = 0,
|
||||||
|
var forced: Int = 0,
|
||||||
|
var id: String = "",
|
||||||
|
var ignoreFlag: Int = 0,
|
||||||
|
var updateContent: String = "",
|
||||||
|
var updateTime: Any? = null,
|
||||||
|
var versionName: String = "",
|
||||||
|
var versionNo: Int = 0
|
||||||
|
)
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.xjjk.healthyclients.bean
|
||||||
|
|
||||||
|
|
||||||
|
import com.xjjk.healthyclients.adapter.common.BaseCheckRecycleViewAdapter
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配置菜单
|
||||||
|
*/
|
||||||
|
data class CommonSettingMenuBean(
|
||||||
|
val value: String = "",
|
||||||
|
val text: String = "",
|
||||||
|
override val itemType: Int = -1,
|
||||||
|
override var checked: Boolean = false
|
||||||
|
): BaseCheckRecycleViewAdapter.CheckItem
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class CvdMainBean {
|
||||||
|
|
||||||
|
private ArrayList<dataBean> indexItemVos;
|
||||||
|
private String days;
|
||||||
|
private long distance;
|
||||||
|
private double aveSleep;
|
||||||
|
|
||||||
|
public ArrayList<dataBean> getIndexItemVos() {
|
||||||
|
return indexItemVos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndexItemVos(ArrayList<dataBean> indexItemVos) {
|
||||||
|
this.indexItemVos = indexItemVos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDays() {
|
||||||
|
return days;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDays(String days) {
|
||||||
|
this.days = days;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getDistance() {
|
||||||
|
return distance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistance(long distance) {
|
||||||
|
this.distance = distance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getAveSleep() {
|
||||||
|
return aveSleep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAveSleep(double aveSleep) {
|
||||||
|
this.aveSleep = aveSleep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class dataBean {
|
||||||
|
|
||||||
|
private String wdType;
|
||||||
|
private String wdTypeName;
|
||||||
|
private String dataDate;
|
||||||
|
private String dataValue;
|
||||||
|
private String warnMin;
|
||||||
|
private String warnMax;
|
||||||
|
|
||||||
|
public dataBean(String wdType, String wdTypeName,String dataDate,String dataValue) {
|
||||||
|
this.wdType = wdType;
|
||||||
|
this.wdTypeName = wdTypeName;
|
||||||
|
this.dataDate = dataDate;
|
||||||
|
this.dataValue = dataValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dataBean() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWdType() {
|
||||||
|
return wdType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWdType(String wdType) {
|
||||||
|
this.wdType = wdType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWdTypeName() {
|
||||||
|
return wdTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWdTypeName(String wdTypeName) {
|
||||||
|
this.wdTypeName = wdTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataDate() {
|
||||||
|
return dataDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataDate(String dataDate) {
|
||||||
|
this.dataDate = dataDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataValue() {
|
||||||
|
return dataValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataValue(String dataValue) {
|
||||||
|
this.dataValue = dataValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarnMin() {
|
||||||
|
return warnMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWarnMin(String warnMin) {
|
||||||
|
this.warnMin = warnMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarnMax() {
|
||||||
|
return warnMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWarnMax(String warnMax) {
|
||||||
|
this.warnMax = warnMax;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
public class CvdRiskInfoBean {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String warningData;
|
||||||
|
private String riskData;
|
||||||
|
private String riskMiValue;
|
||||||
|
private String riskSuddenDeathValue;
|
||||||
|
private String riskCiValue;
|
||||||
|
private String riskChValue;
|
||||||
|
private String riskMiValueName;
|
||||||
|
private String riskMiValueColor;
|
||||||
|
private String riskSuddenDeathValueName;
|
||||||
|
private String riskSuddenDeathValueColor;
|
||||||
|
private String riskCiValueName;
|
||||||
|
private String riskCiValueColor;
|
||||||
|
private String riskChValueName;
|
||||||
|
private String riskChValueColor;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id == null ? "" : id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarningData() {
|
||||||
|
return warningData == null ? "" : warningData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWarningData(String warningData) {
|
||||||
|
this.warningData = warningData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskData() {
|
||||||
|
return riskData == null ? "" : riskData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskData(String riskData) {
|
||||||
|
this.riskData = riskData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskMiValue() {
|
||||||
|
return riskMiValue == null ? "" : riskMiValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskMiValue(String riskMiValue) {
|
||||||
|
this.riskMiValue = riskMiValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskSuddenDeathValue() {
|
||||||
|
return riskSuddenDeathValue == null ? "" : riskSuddenDeathValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskSuddenDeathValue(String riskSuddenDeathValue) {
|
||||||
|
this.riskSuddenDeathValue = riskSuddenDeathValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskCiValue() {
|
||||||
|
return riskCiValue == null ? "" : riskCiValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskCiValue(String riskCiValue) {
|
||||||
|
this.riskCiValue = riskCiValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskChValue() {
|
||||||
|
return riskChValue == null ? "" : riskChValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskChValue(String riskChValue) {
|
||||||
|
this.riskChValue = riskChValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskMiValueName() {
|
||||||
|
return riskMiValueName == null ? "" : riskMiValueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskMiValueName(String riskMiValueName) {
|
||||||
|
this.riskMiValueName = riskMiValueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskMiValueColor() {
|
||||||
|
return riskMiValueColor == null ? "" : riskMiValueColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskMiValueColor(String riskMiValueColor) {
|
||||||
|
this.riskMiValueColor = riskMiValueColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskSuddenDeathValueName() {
|
||||||
|
return riskSuddenDeathValueName == null ? "" : riskSuddenDeathValueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskSuddenDeathValueName(String riskSuddenDeathValueName) {
|
||||||
|
this.riskSuddenDeathValueName = riskSuddenDeathValueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskSuddenDeathValueColor() {
|
||||||
|
return riskSuddenDeathValueColor == null ? "" : riskSuddenDeathValueColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskSuddenDeathValueColor(String riskSuddenDeathValueColor) {
|
||||||
|
this.riskSuddenDeathValueColor = riskSuddenDeathValueColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskCiValueName() {
|
||||||
|
return riskCiValueName == null ? "" : riskCiValueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskCiValueName(String riskCiValueName) {
|
||||||
|
this.riskCiValueName = riskCiValueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskCiValueColor() {
|
||||||
|
return riskCiValueColor == null ? "" : riskCiValueColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskCiValueColor(String riskCiValueColor) {
|
||||||
|
this.riskCiValueColor = riskCiValueColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskChValueName() {
|
||||||
|
return riskChValueName == null ? "" : riskChValueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskChValueName(String riskChValueName) {
|
||||||
|
this.riskChValueName = riskChValueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiskChValueColor() {
|
||||||
|
return riskChValueColor == null ? "" : riskChValueColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiskChValueColor(String riskChValueColor) {
|
||||||
|
this.riskChValueColor = riskChValueColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
public class CvdWarningHistoryBean {
|
||||||
|
// "watchNo": "CRFTQ22C03000080",
|
||||||
|
// "warnTime": "2023-03-22 11:11:15",
|
||||||
|
// "dataValue": "200",
|
||||||
|
// "address": "1",
|
||||||
|
// "addressGd": "",
|
||||||
|
// "gpsErrorMsg": "未获取到地址信息21"
|
||||||
|
|
||||||
|
private String warnTime;
|
||||||
|
private String dataValue;
|
||||||
|
private String address;
|
||||||
|
private String addressGd;
|
||||||
|
private String gpsErrorMsg;
|
||||||
|
|
||||||
|
public String getWarnTime() {
|
||||||
|
return warnTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWarnTime(String warnTime) {
|
||||||
|
this.warnTime = warnTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataValue() {
|
||||||
|
return dataValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataValue(String dataValue) {
|
||||||
|
this.dataValue = dataValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress() {
|
||||||
|
if (TextUtils.isEmpty(gpsErrorMsg)) {
|
||||||
|
return TextUtils.isEmpty(addressGd) ? address : addressGd;
|
||||||
|
} else {
|
||||||
|
return gpsErrorMsg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address) {
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddressGd() {
|
||||||
|
return addressGd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddressGd(String addressGd) {
|
||||||
|
this.addressGd = addressGd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGpsErrorMsg() {
|
||||||
|
return gpsErrorMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGpsErrorMsg(String gpsErrorMsg) {
|
||||||
|
this.gpsErrorMsg = gpsErrorMsg;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.xjjk.healthyclients.bean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类似九宫格图集使用
|
||||||
|
*/
|
||||||
|
data class ImageBean(var imageUrl: String = "", var isFilePath: Boolean = false, var isAddButton: Boolean = false)
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
public class LoginBean {
|
||||||
|
|
||||||
|
private String username;
|
||||||
|
private String password;
|
||||||
|
private String deviceType;
|
||||||
|
private String deviceSystem;
|
||||||
|
|
||||||
|
public String getDeviceType() {
|
||||||
|
return deviceType == null ? "" : deviceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceType(String deviceType) {
|
||||||
|
this.deviceType = deviceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeviceSystem() {
|
||||||
|
return deviceSystem == null ? "" : deviceSystem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceSystem(String deviceSystem) {
|
||||||
|
this.deviceSystem = deviceSystem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
import com.sw.healthyclients.bean.common.UserInfoBean;
|
||||||
|
|
||||||
|
public class LoginResponseBean {
|
||||||
|
|
||||||
|
private Boolean success;
|
||||||
|
private String message;
|
||||||
|
private Integer code;
|
||||||
|
private ResultDTO result;
|
||||||
|
private Long timestamp;
|
||||||
|
|
||||||
|
public Boolean getSuccess() {
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuccess(Boolean success) {
|
||||||
|
this.success = success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultDTO getResult() {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(ResultDTO result) {
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTimestamp() {
|
||||||
|
return timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimestamp(Long timestamp) {
|
||||||
|
this.timestamp = timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ResultDTO {
|
||||||
|
private UserInfoBean userInfo;
|
||||||
|
private String token;
|
||||||
|
|
||||||
|
public UserInfoBean getUserInfo() {
|
||||||
|
return userInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserInfo(UserInfoBean userInfo) {
|
||||||
|
this.userInfo = userInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getToken() {
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToken(String token) {
|
||||||
|
this.token = token;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
public class MapDataBean {
|
||||||
|
|
||||||
|
private String a;
|
||||||
|
private String c;
|
||||||
|
private String d;
|
||||||
|
private String e;
|
||||||
|
private String f;
|
||||||
|
private String g;
|
||||||
|
private String h;
|
||||||
|
private Double lon;
|
||||||
|
private Double lat;
|
||||||
|
|
||||||
|
public Double getLon() {
|
||||||
|
return lon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLon(Double lon) {
|
||||||
|
this.lon = lon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getLat() {
|
||||||
|
return lat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLat(Double lat) {
|
||||||
|
this.lat = lat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getA() {
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setA(String a) {
|
||||||
|
this.a = a;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getC() {
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setC(String c) {
|
||||||
|
this.c = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getD() {
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setD(String d) {
|
||||||
|
this.d = d;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getE() {
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setE(String e) {
|
||||||
|
this.e = e;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getF() {
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setF(String f) {
|
||||||
|
this.f = f;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getG() {
|
||||||
|
return g;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setG(String g) {
|
||||||
|
this.g = g;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getH() {
|
||||||
|
return h;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setH(String h) {
|
||||||
|
this.h = h;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.sw.healthyclients.bean.intervention
|
||||||
|
|
||||||
|
|
||||||
|
data class NearbyAmbulanceBean(
|
||||||
|
var ambulancePhoto: Any?,
|
||||||
|
var belongName: String?,
|
||||||
|
var createBy: String?,
|
||||||
|
var createTime: String?,
|
||||||
|
var delFlag: String?,
|
||||||
|
var departCode: String?,
|
||||||
|
var departName: Any?,
|
||||||
|
var distance: String?,
|
||||||
|
var driverName: String?,
|
||||||
|
var driversLicensePhoto: Any?,
|
||||||
|
var equipmentList: Any?,
|
||||||
|
var id: String?,
|
||||||
|
var isGps: Any?,
|
||||||
|
var isManagementSystem: String?,
|
||||||
|
var latitude: Double=0.0,
|
||||||
|
var licensePlateNumber: String?,
|
||||||
|
var longitude: Double=0.0,
|
||||||
|
var medicalResource: Any?,
|
||||||
|
var model: String?,
|
||||||
|
var payFeeYear: Double?,
|
||||||
|
var phone: String="",
|
||||||
|
var propagateArea: String?,
|
||||||
|
var propagateNum: String?,
|
||||||
|
var qualificationLicensePhoto: Any?,
|
||||||
|
var remark: Any?,
|
||||||
|
var rescueCapability: String?,
|
||||||
|
var rescueCapabilityType: String?,
|
||||||
|
var rescueDevice: String?,
|
||||||
|
var resourceId: String?,
|
||||||
|
var status: String?,
|
||||||
|
var updateBy: String?,
|
||||||
|
var updateTime: String?,
|
||||||
|
var yearOfService: String?
|
||||||
|
)
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class NearbyResourceBean {
|
||||||
|
private String id;
|
||||||
|
private String hospitalId;
|
||||||
|
private String img;
|
||||||
|
private String name;
|
||||||
|
private String address;
|
||||||
|
private double longitude;
|
||||||
|
private double latitude;
|
||||||
|
private String mobile;
|
||||||
|
private String adminUser;//负责人
|
||||||
|
private String setUpTime;//设立时间
|
||||||
|
private String radiationNum;//辐射人数
|
||||||
|
private String ambulanceNum;//救护车数量
|
||||||
|
private String radiationDepart;//辐射单位id
|
||||||
|
private ArrayList<String> radiationDepartList;//辐射单位集合
|
||||||
|
private String resourceDesc; //简介
|
||||||
|
private String medicalStaffNum; //医护人员数量
|
||||||
|
private String departName; //所属单位
|
||||||
|
|
||||||
|
public String getDepartName() {
|
||||||
|
return departName == null ? "" : departName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartName(String departName) {
|
||||||
|
this.departName = departName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id == null ? "" : id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHospitalId() {
|
||||||
|
return hospitalId == null ? "" : hospitalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalId(String hospitalId) {
|
||||||
|
this.hospitalId = hospitalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img == null ? "" : img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name == null ? "" : name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress() {
|
||||||
|
return address == null ? "" : address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address) {
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(double longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(double latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMobile() {
|
||||||
|
return mobile == null ? "" : mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMobile(String mobile) {
|
||||||
|
this.mobile = mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAdminUser() {
|
||||||
|
return adminUser == null ? "--" : adminUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAdminUser(String adminUser) {
|
||||||
|
this.adminUser = adminUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSetUpTime() {
|
||||||
|
return setUpTime == null ? "--" : setUpTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSetUpTime(String setUpTime) {
|
||||||
|
this.setUpTime = setUpTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRadiationNum() {
|
||||||
|
return radiationNum == null ? "--" : radiationNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRadiationNum(String radiationNum) {
|
||||||
|
this.radiationNum = radiationNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAmbulanceNum() {
|
||||||
|
return ambulanceNum == null ? "--" : ambulanceNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAmbulanceNum(String ambulanceNum) {
|
||||||
|
this.ambulanceNum = ambulanceNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRadiationDepart() {
|
||||||
|
return radiationDepart == null ? "" : radiationDepart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRadiationDepart(String radiationDepart) {
|
||||||
|
this.radiationDepart = radiationDepart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getRadiationDepartList() {
|
||||||
|
if (radiationDepartList == null) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return radiationDepartList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRadiationDepartList(ArrayList<String> radiationDepartList) {
|
||||||
|
this.radiationDepartList = radiationDepartList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResourceDesc() {
|
||||||
|
return resourceDesc == null ? "\n暂无\n" : resourceDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceDesc(String resourceDesc) {
|
||||||
|
this.resourceDesc = resourceDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMedicalStaffNum() {
|
||||||
|
return medicalStaffNum == null ? "" : medicalStaffNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMedicalStaffNum(String medicalStaffNum) {
|
||||||
|
this.medicalStaffNum = medicalStaffNum;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
public class SelectUserInfoBean {
|
||||||
|
|
||||||
|
private String realname;
|
||||||
|
private String workNo;
|
||||||
|
private String phone;
|
||||||
|
private String idCard;
|
||||||
|
private String sex;
|
||||||
|
private String sex_dictText;
|
||||||
|
private String personType;
|
||||||
|
private String personType_dictText;
|
||||||
|
private String orgCode;
|
||||||
|
private String healthType;
|
||||||
|
private String bloodType;
|
||||||
|
private String bloodType_dictText;
|
||||||
|
private String healthType_dictText;
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
public String getBloodType_dictText() {
|
||||||
|
return bloodType_dictText == null ? "" : bloodType_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBloodType_dictText(String bloodType_dictText) {
|
||||||
|
this.bloodType_dictText = bloodType_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHealthType_dictText() {
|
||||||
|
return healthType_dictText == null ? "" : healthType_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHealthType_dictText(String healthType_dictText) {
|
||||||
|
this.healthType_dictText = healthType_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHealthType() {
|
||||||
|
return healthType == null ? "" : healthType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHealthType(String healthType) {
|
||||||
|
this.healthType = healthType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBloodType() {
|
||||||
|
return bloodType == null ? "" : bloodType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBloodType(String bloodType) {
|
||||||
|
this.bloodType = bloodType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRealname() {
|
||||||
|
return realname == null ? "--" : realname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRealname(String realname) {
|
||||||
|
this.realname = realname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkNo() {
|
||||||
|
return workNo == null ? "--" : workNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWorkNo(String workNo) {
|
||||||
|
this.workNo = workNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhone() {
|
||||||
|
return phone == null ? "" : phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhone(String phone) {
|
||||||
|
this.phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdCard() {
|
||||||
|
return idCard == null ? "" : idCard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdCard(String idCard) {
|
||||||
|
this.idCard = idCard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSex() {
|
||||||
|
return sex == null ? "" : sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSex(String sex) {
|
||||||
|
this.sex = sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSex_dictText() {
|
||||||
|
return sex_dictText == null ? "" : sex_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSex_dictText(String sex_dictText) {
|
||||||
|
this.sex_dictText = sex_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPersonType() {
|
||||||
|
return personType == null ? "" : personType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPersonType(String personType) {
|
||||||
|
this.personType = personType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPersonType_dictText() {
|
||||||
|
return personType_dictText == null ? "--" : personType_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPersonType_dictText(String personType_dictText) {
|
||||||
|
this.personType_dictText = personType_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrgCode() {
|
||||||
|
return orgCode == null ? "" : orgCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrgCode(String orgCode) {
|
||||||
|
this.orgCode = orgCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAvatar() {
|
||||||
|
return avatar== null ? "" : avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvatar(String avatar) {
|
||||||
|
this.avatar = avatar;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class SelectUserMessageListBean implements Serializable {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String title;
|
||||||
|
private String content;
|
||||||
|
private String type;
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
public String getState() {
|
||||||
|
return state == null ? "" : state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(String state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
public class TitleTagBean {
|
||||||
|
private String text;
|
||||||
|
private boolean isSelect;
|
||||||
|
|
||||||
|
public String getText() {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setText(String text) {
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSelect() {
|
||||||
|
return isSelect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelect(boolean select) {
|
||||||
|
isSelect = select;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package com.xjjk.healthyclients.bean
|
||||||
|
|
||||||
|
data class UploadFileResultBean(
|
||||||
|
var url: String = ""
|
||||||
|
)
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
package com.xjjk.healthyclients.bean;
|
||||||
|
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.sw.healthyclients.utils.TUIKitConstants;
|
||||||
|
import com.xjjk.healthyclients.MyApplication;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class UserInfo implements Serializable {
|
||||||
|
|
||||||
|
private final static String PER_USER_MODEL = "per_user_model";
|
||||||
|
|
||||||
|
private static UserInfo sUserInfo;
|
||||||
|
|
||||||
|
private int sdkAppId;
|
||||||
|
private String zone;
|
||||||
|
private String phone;
|
||||||
|
private String token;
|
||||||
|
private String userId;
|
||||||
|
private String userSig;
|
||||||
|
private String name;
|
||||||
|
private String avatar;
|
||||||
|
private boolean autoLogin;
|
||||||
|
private boolean debugLogin = false;
|
||||||
|
|
||||||
|
public synchronized static UserInfo getInstance() {
|
||||||
|
if (sUserInfo == null) {
|
||||||
|
SharedPreferences shareInfo = MyApplication.getAppContext().getSharedPreferences(TUIKitConstants.USERINFO, 0);
|
||||||
|
String json = shareInfo.getString(PER_USER_MODEL, "");
|
||||||
|
sUserInfo = new Gson().fromJson(json, UserInfo.class);
|
||||||
|
if (sUserInfo == null) {
|
||||||
|
sUserInfo = new UserInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sUserInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
private UserInfo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserInfo(UserInfo info) {
|
||||||
|
SharedPreferences shareInfo = MyApplication.getAppContext().getSharedPreferences(TUIKitConstants.USERINFO, 0);
|
||||||
|
SharedPreferences.Editor editor = shareInfo.edit();
|
||||||
|
editor.putString(PER_USER_MODEL, new Gson().toJson(info));
|
||||||
|
editor.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSdkAppId() {
|
||||||
|
return sdkAppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSdkAppId(int sdkAppId) {
|
||||||
|
this.sdkAppId = sdkAppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserSig() {
|
||||||
|
return this.userSig;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserSig(String userSig) {
|
||||||
|
this.userSig = userSig;
|
||||||
|
setUserInfo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
setUserInfo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return this.userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
setUserInfo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getToken() {
|
||||||
|
return this.token;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToken(String token) {
|
||||||
|
this.token = token;
|
||||||
|
setUserInfo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZone() {
|
||||||
|
return this.zone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setZone(String zone) {
|
||||||
|
this.zone = zone;
|
||||||
|
setUserInfo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhone() {
|
||||||
|
return this.phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhone(String userPhone) {
|
||||||
|
this.phone = userPhone;
|
||||||
|
setUserInfo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean isAutoLogin() {
|
||||||
|
return this.autoLogin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAutoLogin(boolean autoLogin) {
|
||||||
|
this.autoLogin = autoLogin;
|
||||||
|
setUserInfo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAvatar() {
|
||||||
|
return this.avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvatar(String url) {
|
||||||
|
this.avatar = url;
|
||||||
|
setUserInfo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDebugLogin(boolean debugLogin) {
|
||||||
|
this.debugLogin = debugLogin;
|
||||||
|
setUserInfo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDebugLogin() {
|
||||||
|
return debugLogin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void cleanUserInfo() {
|
||||||
|
sdkAppId = 0;
|
||||||
|
zone = "";
|
||||||
|
token = "";
|
||||||
|
userId = "";
|
||||||
|
userSig = "";
|
||||||
|
name = "";
|
||||||
|
avatar = "";
|
||||||
|
autoLogin = false;
|
||||||
|
setUserInfo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency;
|
||||||
|
|
||||||
|
public class AddBigDiseaseSubmitBean {
|
||||||
|
private String hospitalId;
|
||||||
|
private String hospitalName;
|
||||||
|
private String medicalCardNo;
|
||||||
|
private String registerCategory;
|
||||||
|
private long desireTime;
|
||||||
|
private String reservationOffice;
|
||||||
|
private String reservationDoctor;
|
||||||
|
private String diseaseDescribe;
|
||||||
|
|
||||||
|
public String getHospitalName() {
|
||||||
|
return hospitalName == null ? "" : hospitalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalName(String hospitalName) {
|
||||||
|
this.hospitalName = hospitalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHospitalId() {
|
||||||
|
return hospitalId == null ? "" : hospitalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalId(String hospitalId) {
|
||||||
|
this.hospitalId = hospitalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMedicalCardNo() {
|
||||||
|
return medicalCardNo == null ? "" : medicalCardNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMedicalCardNo(String medicalCardNo) {
|
||||||
|
this.medicalCardNo = medicalCardNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegisterCategory() {
|
||||||
|
return registerCategory == null ? "" : registerCategory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegisterCategory(String registerCategory) {
|
||||||
|
this.registerCategory = registerCategory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getDesireTime() {
|
||||||
|
return desireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesireTime(long desireTime) {
|
||||||
|
this.desireTime = desireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReservationOffice() {
|
||||||
|
return reservationOffice == null ? "" : reservationOffice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReservationOffice(String reservationOffice) {
|
||||||
|
this.reservationOffice = reservationOffice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReservationDoctor() {
|
||||||
|
return reservationDoctor == null ? "" : reservationDoctor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReservationDoctor(String reservationDoctor) {
|
||||||
|
this.reservationDoctor = reservationDoctor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiseaseDescribe() {
|
||||||
|
return diseaseDescribe == null ? "" : diseaseDescribe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiseaseDescribe(String diseaseDescribe) {
|
||||||
|
this.diseaseDescribe = diseaseDescribe;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,158 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency;
|
||||||
|
|
||||||
|
public class BigDiseaseBean {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String hospitalId;
|
||||||
|
private String hospitalName;
|
||||||
|
private String medicalCardNo;
|
||||||
|
private String registerCategory;
|
||||||
|
private String registerCategory_dictText;
|
||||||
|
private String state;
|
||||||
|
private String desireTime;
|
||||||
|
private String createTime;
|
||||||
|
private String reservationOffice;
|
||||||
|
private String reservationDoctor;
|
||||||
|
private String diseaseDescribe;
|
||||||
|
private String rejectionReason;
|
||||||
|
private String realname;
|
||||||
|
private String idNo;
|
||||||
|
private String telPhone;
|
||||||
|
private String reservationNo;
|
||||||
|
|
||||||
|
public String getHospitalName() {
|
||||||
|
return hospitalName == null ? "" : hospitalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalName(String hospitalName) {
|
||||||
|
this.hospitalName = hospitalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHospitalId() {
|
||||||
|
return hospitalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalId(String hospitalId) {
|
||||||
|
this.hospitalId = hospitalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMedicalCardNo() {
|
||||||
|
return medicalCardNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMedicalCardNo(String medicalCardNo) {
|
||||||
|
this.medicalCardNo = medicalCardNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegisterCategory() {
|
||||||
|
return registerCategory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegisterCategory(String registerCategory) {
|
||||||
|
this.registerCategory = registerCategory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegisterCategory_dictText() {
|
||||||
|
return registerCategory_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegisterCategory_dictText(String registerCategory_dictText) {
|
||||||
|
this.registerCategory_dictText = registerCategory_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(String state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesireTime() {
|
||||||
|
return desireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesireTime(String desireTime) {
|
||||||
|
this.desireTime = desireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReservationOffice() {
|
||||||
|
return reservationOffice==null?"":reservationOffice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReservationOffice(String reservationOffice) {
|
||||||
|
this.reservationOffice = reservationOffice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReservationDoctor() {
|
||||||
|
return reservationDoctor==null?"":reservationDoctor ;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReservationDoctor(String reservationDoctor) {
|
||||||
|
this.reservationDoctor = reservationDoctor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiseaseDescribe() {
|
||||||
|
return diseaseDescribe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiseaseDescribe(String diseaseDescribe) {
|
||||||
|
this.diseaseDescribe = diseaseDescribe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRejectionReason() {
|
||||||
|
return rejectionReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRejectionReason(String rejectionReason) {
|
||||||
|
this.rejectionReason = rejectionReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRealname() {
|
||||||
|
return realname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRealname(String realname) {
|
||||||
|
this.realname = realname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdNo() {
|
||||||
|
return idNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdNo(String idNo) {
|
||||||
|
this.idNo = idNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTelPhone() {
|
||||||
|
return telPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTelPhone(String telPhone) {
|
||||||
|
this.telPhone = telPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReservationNo() {
|
||||||
|
return reservationNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReservationNo(String reservationNo) {
|
||||||
|
this.reservationNo = reservationNo;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency;
|
||||||
|
|
||||||
|
public class BigDiseaseDetailsBean {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String hospitalId;
|
||||||
|
private String hospitalName;
|
||||||
|
private String medicalCardNo;
|
||||||
|
private String registerCategory;
|
||||||
|
private String registerCategory_dictText;
|
||||||
|
private String state;
|
||||||
|
private String desireTime;
|
||||||
|
private String createTime;
|
||||||
|
private String reservationOffice;
|
||||||
|
private String reservationDoctor;
|
||||||
|
private String diseaseDescribe;
|
||||||
|
private String rejectionReason;
|
||||||
|
private String realname;
|
||||||
|
private String idNo;
|
||||||
|
private String telPhone;
|
||||||
|
private String reservationNo;
|
||||||
|
private String rejectionTime;
|
||||||
|
private String newState;
|
||||||
|
|
||||||
|
public String getNewState() {
|
||||||
|
return newState == null ? "" : newState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewState(String newState) {
|
||||||
|
this.newState = newState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRejectionTime() {
|
||||||
|
return rejectionTime == null ? "" : rejectionTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRejectionTime(String rejectionTime) {
|
||||||
|
this.rejectionTime = rejectionTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id == null ? "" : id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHospitalId() {
|
||||||
|
return hospitalId == null ? "" : hospitalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalId(String hospitalId) {
|
||||||
|
this.hospitalId = hospitalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHospitalName() {
|
||||||
|
return hospitalName == null ? "" : hospitalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalName(String hospitalName) {
|
||||||
|
this.hospitalName = hospitalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMedicalCardNo() {
|
||||||
|
return medicalCardNo == null ? "" : medicalCardNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMedicalCardNo(String medicalCardNo) {
|
||||||
|
this.medicalCardNo = medicalCardNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegisterCategory() {
|
||||||
|
return registerCategory == null ? "" : registerCategory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegisterCategory(String registerCategory) {
|
||||||
|
this.registerCategory = registerCategory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegisterCategory_dictText() {
|
||||||
|
return registerCategory_dictText == null ? "" : registerCategory_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegisterCategory_dictText(String registerCategory_dictText) {
|
||||||
|
this.registerCategory_dictText = registerCategory_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getState() {
|
||||||
|
return state == null ? "" : state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(String state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesireTime() {
|
||||||
|
return desireTime == null ? "" : desireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesireTime(String desireTime) {
|
||||||
|
this.desireTime = desireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime == null ? "" : createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReservationOffice() {
|
||||||
|
return reservationOffice == null ? "" : reservationOffice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReservationOffice(String reservationOffice) {
|
||||||
|
this.reservationOffice = reservationOffice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReservationDoctor() {
|
||||||
|
return reservationDoctor == null ? "" : reservationDoctor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReservationDoctor(String reservationDoctor) {
|
||||||
|
this.reservationDoctor = reservationDoctor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiseaseDescribe() {
|
||||||
|
return diseaseDescribe == null ? "" : diseaseDescribe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiseaseDescribe(String diseaseDescribe) {
|
||||||
|
this.diseaseDescribe = diseaseDescribe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRejectionReason() {
|
||||||
|
return rejectionReason == null ? "" : rejectionReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRejectionReason(String rejectionReason) {
|
||||||
|
this.rejectionReason = rejectionReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRealname() {
|
||||||
|
return realname == null ? "" : realname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRealname(String realname) {
|
||||||
|
this.realname = realname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdNo() {
|
||||||
|
return idNo == null ? "" : idNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdNo(String idNo) {
|
||||||
|
this.idNo = idNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTelPhone() {
|
||||||
|
return telPhone == null ? "" : telPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTelPhone(String telPhone) {
|
||||||
|
this.telPhone = telPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReservationNo() {
|
||||||
|
return reservationNo == null ? "" : reservationNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReservationNo(String reservationNo) {
|
||||||
|
this.reservationNo = reservationNo;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency
|
||||||
|
|
||||||
|
data class EmergencyBean(
|
||||||
|
val dicts: MutableList<EmergencyDictBean>?,
|
||||||
|
val resources: MutableList<LocationResourceBean>?,
|
||||||
|
val sessionId: String?
|
||||||
|
)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency
|
||||||
|
|
||||||
|
data class EmergencyCallResultBean(
|
||||||
|
val majors: List<MajorBean>,
|
||||||
|
val operators: List<OperatorBean>,
|
||||||
|
val orderId: String
|
||||||
|
)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency
|
||||||
|
|
||||||
|
data class EmergencyDictBean(
|
||||||
|
val label: String,
|
||||||
|
val text: String,
|
||||||
|
val title: String,
|
||||||
|
val value: String,
|
||||||
|
var isCheck: Boolean
|
||||||
|
)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency
|
||||||
|
|
||||||
|
data class EmergencyGroupInfo(
|
||||||
|
val groupId: String,
|
||||||
|
val userId: String,
|
||||||
|
val member: ArrayList<String>,
|
||||||
|
val tfNew: String,
|
||||||
|
val id: String
|
||||||
|
)
|
||||||
+1178
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,23 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency;
|
||||||
|
|
||||||
|
public class HospitalBean {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应急页面标记的位置点
|
||||||
|
*/
|
||||||
|
data class LocationResourceBean(
|
||||||
|
val address: String = "",
|
||||||
|
val aidrange: Any = "",
|
||||||
|
val area: Any = "",
|
||||||
|
val city: String = "",
|
||||||
|
val createBy: Any = "",
|
||||||
|
val createTime: Any = "",
|
||||||
|
val delFlag: Int = 0,
|
||||||
|
val distance: Double = 0.0,
|
||||||
|
val gdId: String = "",
|
||||||
|
val id: String = "",
|
||||||
|
val img: Any = "",
|
||||||
|
val latitude: Double = 0.0,
|
||||||
|
val level: String = "",
|
||||||
|
val level_dictText: String = "",
|
||||||
|
val longitude: Double = 0.0,
|
||||||
|
val memo: Any = "",
|
||||||
|
val mobile: String = "",
|
||||||
|
val name: String = "",
|
||||||
|
val province: String = "",
|
||||||
|
val resourceDesc: String = "",
|
||||||
|
val status: Int = 0,
|
||||||
|
val type: String = "",
|
||||||
|
val updateBy: Any = "",
|
||||||
|
val updateTime: Any = "",
|
||||||
|
val url: String = ""
|
||||||
|
)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency
|
||||||
|
|
||||||
|
data class MajorBean(
|
||||||
|
val userId: String,
|
||||||
|
val userName: String,
|
||||||
|
val userSex: String
|
||||||
|
)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency
|
||||||
|
|
||||||
|
data class OperatorBean(
|
||||||
|
val userId: String,
|
||||||
|
val userName: String,
|
||||||
|
val userSex: String
|
||||||
|
)
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency;
|
||||||
|
|
||||||
|
public class OrderThroughBean {
|
||||||
|
|
||||||
|
private String orderThrough;
|
||||||
|
private String orderResult;
|
||||||
|
|
||||||
|
public String getOrderThrough() {
|
||||||
|
return orderThrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderThrough(String orderThrough) {
|
||||||
|
this.orderThrough = orderThrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderResult() {
|
||||||
|
return orderResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderResult(String orderResult) {
|
||||||
|
this.orderResult = orderResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.emergency;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class initUserOrderPageBean {
|
||||||
|
|
||||||
|
private List<RecordsDTO> records;
|
||||||
|
private int total;
|
||||||
|
private int size;
|
||||||
|
private int current;
|
||||||
|
private List<?> orders;
|
||||||
|
private boolean optimizeCountSql;
|
||||||
|
private boolean searchCount;
|
||||||
|
private int pages;
|
||||||
|
|
||||||
|
public List<RecordsDTO> getRecords() {
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecords(List<RecordsDTO> records) {
|
||||||
|
this.records = records;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTotal() {
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotal(int total) {
|
||||||
|
this.total = total;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSize() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSize(int size) {
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCurrent() {
|
||||||
|
return current;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrent(int current) {
|
||||||
|
this.current = current;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<?> getOrders() {
|
||||||
|
return orders;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrders(List<?> orders) {
|
||||||
|
this.orders = orders;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOptimizeCountSql() {
|
||||||
|
return optimizeCountSql;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOptimizeCountSql(boolean optimizeCountSql) {
|
||||||
|
this.optimizeCountSql = optimizeCountSql;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSearchCount() {
|
||||||
|
return searchCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSearchCount(boolean searchCount) {
|
||||||
|
this.searchCount = searchCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getPages() {
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPages(int pages) {
|
||||||
|
this.pages = pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class RecordsDTO {
|
||||||
|
private String id;
|
||||||
|
private String sessionId;
|
||||||
|
private String initiatorUserId;
|
||||||
|
private String initiatorUserName;
|
||||||
|
private String orderStatus;
|
||||||
|
private String orderStatus_dictText;
|
||||||
|
private String createTime;
|
||||||
|
private String sendOrderHospital;
|
||||||
|
private String stationBusiness_dictText;
|
||||||
|
|
||||||
|
public String getStationBusiness_dictText() {
|
||||||
|
return stationBusiness_dictText == null ? "" : stationBusiness_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStationBusiness_dictText(String stationBusiness_dictText) {
|
||||||
|
this.stationBusiness_dictText = stationBusiness_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSendOrderHospital() {
|
||||||
|
return sendOrderHospital == null ? "" : sendOrderHospital;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendOrderHospital(String sendOrderHospital) {
|
||||||
|
this.sendOrderHospital = sendOrderHospital;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id == null ? "" : id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSessionId() {
|
||||||
|
return sessionId == null ? "" : sessionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSessionId(String sessionId) {
|
||||||
|
this.sessionId = sessionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInitiatorUserId() {
|
||||||
|
return initiatorUserId == null ? "" : initiatorUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInitiatorUserId(String initiatorUserId) {
|
||||||
|
this.initiatorUserId = initiatorUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInitiatorUserName() {
|
||||||
|
return initiatorUserName == null ? "" : initiatorUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInitiatorUserName(String initiatorUserName) {
|
||||||
|
this.initiatorUserName = initiatorUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderStatus() {
|
||||||
|
return orderStatus == null ? "" : orderStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderStatus(String orderStatus) {
|
||||||
|
this.orderStatus = orderStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderStatus_dictText() {
|
||||||
|
return orderStatus_dictText == null ? "" : orderStatus_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderStatus_dictText(String orderStatus_dictText) {
|
||||||
|
this.orderStatus_dictText = orderStatus_dictText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime == null ? "" : createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import com.sw.healthyclients.bean.guidance.CallTimeBean
|
||||||
|
import com.sw.healthyclients.bean.guidance.ConsultRecordBean
|
||||||
|
import com.sw.healthyclients.bean.guidance.DoctorBean
|
||||||
|
import com.sw.healthyclients.bean.guidance.HealthInfoBean
|
||||||
|
import kotlinx.parcelize.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
data class AppointmentInformationBean(
|
||||||
|
var answer: MutableList<HealthInfoBean>? = null,
|
||||||
|
var conFamilyMembersDO: ConsultantBean? = null,
|
||||||
|
var conMedicalRecordsListDO: ArchivesBean? = null,
|
||||||
|
var conSession: ConsultRecordBean? = null,
|
||||||
|
var createTime: Long = 0,
|
||||||
|
var conDoctorDO: DoctorBean? = null,
|
||||||
|
var conEvaluateDO: AppraiseBean? = null,
|
||||||
|
var idNo: String? = null,
|
||||||
|
var imList: MutableList<CallTimeBean>? = mutableListOf()
|
||||||
|
): Parcelable
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import com.xjjk.healthyclients.adapter.common.BaseCheckRecycleViewAdapter
|
||||||
|
|
||||||
|
data class AppointmentTimeBean(
|
||||||
|
var id: String = "",
|
||||||
|
var type: String = "",
|
||||||
|
var schedulingNum: String = "",
|
||||||
|
var schedulingDate: String = "",
|
||||||
|
var week : String = "",
|
||||||
|
var readySchedulingNum: String ="",
|
||||||
|
override val itemType: Int = -1,
|
||||||
|
override var checked: Boolean = false
|
||||||
|
) : BaseCheckRecycleViewAdapter.CheckItem {
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import kotlinx.parcelize.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
data class AppraiseBean(
|
||||||
|
var context: String = "",
|
||||||
|
var id: String = "",
|
||||||
|
var officeName: String = "",
|
||||||
|
var score: String = "",
|
||||||
|
var sessionType: String = "",
|
||||||
|
var time: String = "",
|
||||||
|
var userId: String = "",
|
||||||
|
var userName: String = ""
|
||||||
|
): Parcelable
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import com.lzy.ninegrid.ImageInfo
|
||||||
|
import com.tencent.qcloud.tuikit.tuichat.bean.message.ArchivesMessageBean
|
||||||
|
import com.xjjk.healthyclients.adapter.common.BaseCheckRecycleViewAdapter
|
||||||
|
import com.xjjk.healthyclients.superfuntion.addImageBaseUrl
|
||||||
|
import com.xjjk.healthyclients.utils.CommonUtils
|
||||||
|
import kotlinx.parcelize.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
data class ArchivesBean(
|
||||||
|
val id: String? = null,
|
||||||
|
var name: String = "",
|
||||||
|
var gender: String = "",
|
||||||
|
var age: String? = null,
|
||||||
|
var medicalDescribe: String = "",
|
||||||
|
var recordsName: String = "",
|
||||||
|
val createTime: String = "",
|
||||||
|
val createTimeLong: Long = 0,
|
||||||
|
var tfPermission: String? = null,
|
||||||
|
var haveTime: String? = null,
|
||||||
|
var haveTimeValue: String? = null,
|
||||||
|
var desire: String = "",
|
||||||
|
var tfLook: String? = null,
|
||||||
|
var tfLookValue: String? = null,
|
||||||
|
var lookOffice: String? = null,
|
||||||
|
var lookMedicalName: String? = null,
|
||||||
|
var image: String = "",
|
||||||
|
var memberId: String? = null,
|
||||||
|
var updateTime : String? = null,
|
||||||
|
var isSelf: Boolean = false,
|
||||||
|
override val itemType: Int = -1,
|
||||||
|
override var checked: Boolean = false
|
||||||
|
): BaseCheckRecycleViewAdapter.CheckItem, Parcelable{
|
||||||
|
fun toIMArchivesMessageBean(consultantBean: ConsultantBean? = null): ArchivesMessageBean {
|
||||||
|
var archivesMessageBean = ArchivesMessageBean()
|
||||||
|
archivesMessageBean.archivesId = id
|
||||||
|
archivesMessageBean.name = consultantBean?.name ?: name
|
||||||
|
archivesMessageBean.gender = CommonUtils.getGenderText(consultantBean?.gender ?: gender)
|
||||||
|
archivesMessageBean.age = (consultantBean?.age ?: age)?.toInt() ?: 0
|
||||||
|
archivesMessageBean.symptomDescription = medicalDescribe
|
||||||
|
archivesMessageBean.memberId = memberId
|
||||||
|
var imageList = image.split(",")
|
||||||
|
val list: MutableList<ImageInfo> = ArrayList()
|
||||||
|
var imageInfo: ImageInfo
|
||||||
|
imageList.forEach {
|
||||||
|
if (it.isNotEmpty()){
|
||||||
|
imageInfo = ImageInfo()
|
||||||
|
imageInfo.setThumbnailUrl(addImageBaseUrl(it))
|
||||||
|
imageInfo.setBigImageUrl(addImageBaseUrl(it))
|
||||||
|
list.add(imageInfo)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
archivesMessageBean.imageList = list
|
||||||
|
return archivesMessageBean
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import com.chad.library.adapter.base.entity.SectionEntity
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
|
class BaseHealthyInfoChildBean: SectionEntity{
|
||||||
|
var headerName: String = ""
|
||||||
|
var answerContent: String? = null
|
||||||
|
var id: String = ""
|
||||||
|
var itemOptions: String = ""
|
||||||
|
var itemProblem: String = ""
|
||||||
|
var hideLine: Boolean = false
|
||||||
|
var baseHealthId: String
|
||||||
|
set(value) {baseHealthId = id}
|
||||||
|
get() = id
|
||||||
|
var memberId: String? = null
|
||||||
|
var answerList: MutableList<HealthyInfoRadioBean> = mutableListOf()
|
||||||
|
@SerializedName("itemType")
|
||||||
|
var type: String = ""
|
||||||
|
override var itemType: Int
|
||||||
|
@SerializedName("multiItemType")
|
||||||
|
set(value) { itemType = value }
|
||||||
|
@SerializedName("multiItemType")
|
||||||
|
get() = if (isHeader) SectionEntity.HEADER_TYPE else SectionEntity.NORMAL_TYPE
|
||||||
|
override var isHeader: Boolean = false
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
data class BaseHealthyInfoResultBean(
|
||||||
|
var childList: MutableList<BaseHealthyInfoChildBean> = mutableListOf(),
|
||||||
|
var text: String = "",
|
||||||
|
var value: String = ""
|
||||||
|
)
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.sw.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import kotlinx.parcelize.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
data class CallTimeBean(
|
||||||
|
val createTime: String = "",
|
||||||
|
val endTime: String = "",
|
||||||
|
val createTimeLong: Long? = null,
|
||||||
|
val endTimeLong: Long?= null,
|
||||||
|
var startTime: String = "",
|
||||||
|
var startTimLong: Long? = null,
|
||||||
|
val type: String = ""
|
||||||
|
): Parcelable
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import com.sw.healthyclients.bean.guidance.HealthInfoBean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author nanfeifei
|
||||||
|
* @time 2023/6/20 13:35
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
class ConsultArchivesDetailBean (
|
||||||
|
var answer: MutableList<HealthInfoBean>? = mutableListOf(),
|
||||||
|
var conMedicalRecordsDO: ArchivesBean? = null,
|
||||||
|
var conFamilyMembersDO: ConsultantBean? = null
|
||||||
|
)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.sw.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
data class ConsultDoctorIMChatInfo(
|
||||||
|
val groupId: String,
|
||||||
|
val userId: String,
|
||||||
|
val member: ArrayList<String>,
|
||||||
|
val tfNew: String,
|
||||||
|
val id: String
|
||||||
|
)
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.sw.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import kotlinx.parcelize.Parcelize
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 咨询记录相关信息
|
||||||
|
*/
|
||||||
|
@Parcelize
|
||||||
|
data class ConsultRecordBean(
|
||||||
|
val doctorEndTime: String? = "",
|
||||||
|
val doctorStartTime: String? = "",
|
||||||
|
val doctorEndTimeLong: Long? = null,
|
||||||
|
val doctorStartTimeLong: Long? = null,
|
||||||
|
val sessionDateLong: Long? = null,
|
||||||
|
val week: String? = "",
|
||||||
|
val amPm: String? = "",
|
||||||
|
val id: String? = "",
|
||||||
|
val imId: String? = "",
|
||||||
|
val memberAge: String? = "",
|
||||||
|
val memberId: String? = "",
|
||||||
|
val memberName: String? = "",
|
||||||
|
val memberSex: String? = "",
|
||||||
|
val createTime: String? = "",
|
||||||
|
var unreadCount: Int = 0,
|
||||||
|
val contentStatus: String? = "", //预约状态 1待确认 2待开始 3已开始 4待评价 5完成 6拒绝 7取消
|
||||||
|
val contentType: String? = "", //咨询类型:1图文咨询 2视频咨询
|
||||||
|
val reasonType: String? = "", //拒绝原因
|
||||||
|
val rejectReason: String? = "" //拒绝的备注
|
||||||
|
) : Parcelable
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import com.xjjk.healthyclients.adapter.common.BaseCheckRecycleViewAdapter
|
||||||
|
import kotlinx.parcelize.Parcelize
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 咨询人
|
||||||
|
*/
|
||||||
|
@Parcelize
|
||||||
|
data class ConsultantBean(var name: String? = "",
|
||||||
|
var gender: String = "",
|
||||||
|
var age: String? = null,
|
||||||
|
var birthday: String? = null,
|
||||||
|
var birthdayLong: Long = 0,
|
||||||
|
var height: String? = "",
|
||||||
|
var weight: String? = "",
|
||||||
|
var familyRelation: String = "", //需注意选择咨询人时返回的是关系值1,2,3咨询人管理时是描述本人,母亲
|
||||||
|
var id: String? = null,
|
||||||
|
var list : MutableList<ArchivesBean>? = null,
|
||||||
|
override val itemType: Int = -1,
|
||||||
|
override var checked: Boolean = false
|
||||||
|
): BaseCheckRecycleViewAdapter.CheckItem, Parcelable{
|
||||||
|
fun isSelf(): Boolean{
|
||||||
|
return "1" == familyRelation
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class DepartListBean {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String departmentName;
|
||||||
|
private int doctorNum;
|
||||||
|
private int secondDepartmentNum;
|
||||||
|
private int sickNum;
|
||||||
|
private boolean isSelect;
|
||||||
|
|
||||||
|
public int getSecondDepartmentNum() {
|
||||||
|
return secondDepartmentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecondDepartmentNum(int secondDepartmentNum) {
|
||||||
|
this.secondDepartmentNum = secondDepartmentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSickNum() {
|
||||||
|
return sickNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSickNum(int sickNum) {
|
||||||
|
this.sickNum = sickNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSelect() {
|
||||||
|
return isSelect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelect(boolean select) {
|
||||||
|
isSelect = select;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id == null ? "" : id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartmentName() {
|
||||||
|
return departmentName == null ? "" : departmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentName(String departmentName) {
|
||||||
|
this.departmentName = departmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDoctorNum() {
|
||||||
|
return doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctorNum(int doctorNum) {
|
||||||
|
this.doctorNum = doctorNum;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class DepartListBeanNew {
|
||||||
|
private int doctorNum;
|
||||||
|
private ArrayList<DepartListBean> list;
|
||||||
|
|
||||||
|
public int getDoctorNum() {
|
||||||
|
return doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctorNum(int doctorNum) {
|
||||||
|
this.doctorNum = doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<DepartListBean> getList() {
|
||||||
|
if (list == null) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(ArrayList<DepartListBean> list) {
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class DepartmentListBean {
|
||||||
|
|
||||||
|
|
||||||
|
private String header;
|
||||||
|
private Boolean isHeader;
|
||||||
|
private InfoDTO info;
|
||||||
|
|
||||||
|
public String getHeader() {
|
||||||
|
return header;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeader(String header) {
|
||||||
|
this.header = header;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIsHeader() {
|
||||||
|
return isHeader;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsHeader(Boolean isHeader) {
|
||||||
|
this.isHeader = isHeader;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InfoDTO getInfo() {
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInfo(InfoDTO info) {
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class InfoDTO {
|
||||||
|
private String content;
|
||||||
|
private String group;
|
||||||
|
private String imgUrl;
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGroup() {
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroup(String group) {
|
||||||
|
this.group = group;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImgUrl() {
|
||||||
|
return imgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImgUrl(String imgUrl) {
|
||||||
|
this.imgUrl = imgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class DepartmentchildBean {
|
||||||
|
//科室
|
||||||
|
private String departmentId;
|
||||||
|
private String departmentImg;
|
||||||
|
private String departmentName;
|
||||||
|
private String hint;
|
||||||
|
private int doctorNum=0;
|
||||||
|
private boolean isSelect;
|
||||||
|
|
||||||
|
public int getDoctorNum() {
|
||||||
|
return doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctorNum(int doctorNum) {
|
||||||
|
this.doctorNum = doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartmentId() {
|
||||||
|
return departmentId == null ? "" : departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentId(String departmentId) {
|
||||||
|
this.departmentId = departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSelect() {
|
||||||
|
return isSelect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelect(boolean select) {
|
||||||
|
isSelect = select;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartmentImg() {
|
||||||
|
return departmentImg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentImg(String departmentImg) {
|
||||||
|
this.departmentImg = departmentImg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartmentName() {
|
||||||
|
return departmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentName(String departmentName) {
|
||||||
|
this.departmentName = departmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHint() {
|
||||||
|
return hint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHint(String hint) {
|
||||||
|
this.hint = hint;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.sw.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import com.chad.library.adapter.base.entity.SectionEntity
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
import kotlinx.parcelize.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
data class DiseaseBean(
|
||||||
|
@field:SerializedName(value = "sicksName", alternate = ["name"]) var name: String = "",
|
||||||
|
override val isHeader: Boolean = false
|
||||||
|
) : Parcelable, SectionEntity {
|
||||||
|
//疾病
|
||||||
|
var id: String? = null
|
||||||
|
get() = field.orEmpty()
|
||||||
|
|
||||||
|
var title: String? = null
|
||||||
|
|
||||||
|
var doctorNum: String? = null
|
||||||
|
get() = field.orEmpty()
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.sw.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import kotlinx.parcelize.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
data class DoctorBean(
|
||||||
|
var degreeHeat: String = "",
|
||||||
|
var departmentId: String = "",
|
||||||
|
var departmentName: String = "",
|
||||||
|
var doctorLabel: String = "",
|
||||||
|
var doctorName: String = "",
|
||||||
|
var doctorScore: String = "",
|
||||||
|
var doctorTitle: String = "",
|
||||||
|
var goodAt: String = "",
|
||||||
|
var hospitalLevel: String = "",
|
||||||
|
var id: String = "",
|
||||||
|
var introduction: String = "",
|
||||||
|
var messageNum: String = "",
|
||||||
|
var overallMerit: String = "",
|
||||||
|
var doctorStatus: String = "",
|
||||||
|
var photo: String = "",
|
||||||
|
var resourceId: String = "",
|
||||||
|
var resourceName: String = "",
|
||||||
|
var responseRate: String = "",
|
||||||
|
var tfFollow: String = "",
|
||||||
|
var type: String = "",
|
||||||
|
var audioStatus: String = "",
|
||||||
|
var goodAtSickness: String? = "",
|
||||||
|
var score: String = "",
|
||||||
|
var userScoreNum: String = "",
|
||||||
|
var experience: String = "",
|
||||||
|
var goodAtSicknessName: MutableList<DiseaseBean>? = null
|
||||||
|
): Parcelable
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class DoctorChildBean {
|
||||||
|
private String id;
|
||||||
|
private String icon;
|
||||||
|
private String name;
|
||||||
|
private String title;
|
||||||
|
private String tag;
|
||||||
|
private String history;
|
||||||
|
private String hospitalName;
|
||||||
|
private String hint;
|
||||||
|
private String evaluate;//综合评价
|
||||||
|
private String reply;//回复率
|
||||||
|
private String guidanceNumber;//咨询量
|
||||||
|
private String tfShowFire;//小火苗
|
||||||
|
private String doctorStatus;
|
||||||
|
private String audioStatus;
|
||||||
|
|
||||||
|
public String getAudioStatus() {
|
||||||
|
return audioStatus == null ? "" : audioStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAudioStatus(String audioStatus) {
|
||||||
|
this.audioStatus = audioStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDoctorStatus() {
|
||||||
|
return doctorStatus == null ? "" : doctorStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctorStatus(String doctorStatus) {
|
||||||
|
this.doctorStatus = doctorStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id == null ? "" : id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTfShowFire() {
|
||||||
|
return tfShowFire == null ? "" : tfShowFire;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTfShowFire(String tfShowFire) {
|
||||||
|
this.tfShowFire = tfShowFire;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHistory() {
|
||||||
|
return history;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHistory(String history) {
|
||||||
|
this.history = history;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIcon() {
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIcon(String icon) {
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTag() {
|
||||||
|
return tag==null?"":tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTag(String tag) {
|
||||||
|
this.tag = tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHospitalName() {
|
||||||
|
return hospitalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalName(String hospitalName) {
|
||||||
|
this.hospitalName = hospitalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHint() {
|
||||||
|
return hint==null ? "" :hint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHint(String hint) {
|
||||||
|
this.hint = hint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEvaluate() {
|
||||||
|
return evaluate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEvaluate(String evaluate) {
|
||||||
|
this.evaluate = evaluate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReply() {
|
||||||
|
return reply;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReply(String reply) {
|
||||||
|
this.reply = reply;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGuidanceNumber() {
|
||||||
|
return guidanceNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGuidanceNumber(String guidanceNumber) {
|
||||||
|
this.guidanceNumber = guidanceNumber;
|
||||||
|
}
|
||||||
|
}
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
import com.sw.healthyclients.bean.guidance.DoctorBean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DoctorRecommendBeanNetWork {
|
||||||
|
|
||||||
|
private String haveSessioning;
|
||||||
|
private List<DoctorBean> list;
|
||||||
|
|
||||||
|
public String getHaveSessioning() {
|
||||||
|
return haveSessioning;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHaveSessioning(String haveSessioning) {
|
||||||
|
this.haveSessioning = haveSessioning;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DoctorBean> getList() {
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(List<DoctorBean> list) {
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;//package com.sw.healthyclients.bean.guidance;
|
||||||
|
//
|
||||||
|
///*
|
||||||
|
// * Copyright (c) 2018-present. KunMinX
|
||||||
|
// *
|
||||||
|
// * 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
|
||||||
|
// *
|
||||||
|
// * http://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.
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//import com.kunminx.linkage.bean.BaseGroupedItem;
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * Create by KunMinX at 19/4/27
|
||||||
|
// */
|
||||||
|
//public class ElemeGroupedItem extends BaseGroupedItem<ElemeGroupedItem.ItemInfo> {
|
||||||
|
//
|
||||||
|
// public ElemeGroupedItem(boolean isHeader, String header) {
|
||||||
|
// super(isHeader, header);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public ElemeGroupedItem(ItemInfo item) {
|
||||||
|
// super(item);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public static class ItemInfo extends BaseGroupedItem.ItemInfo {
|
||||||
|
// private String content;
|
||||||
|
// private String imgUrl;
|
||||||
|
// private String cost;
|
||||||
|
//
|
||||||
|
// public ItemInfo(String title, String group, String content, String imgUrl, String cost) {
|
||||||
|
// super(title, group);
|
||||||
|
// this.content = content;
|
||||||
|
// this.imgUrl = imgUrl;
|
||||||
|
// this.cost = cost;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public String getContent() {
|
||||||
|
// return content;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void setContent(String content) {
|
||||||
|
// this.content = content;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public String getImgUrl() {
|
||||||
|
// return imgUrl;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void setImgUrl(String imgUrl) {
|
||||||
|
// this.imgUrl = imgUrl;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public String getCost() {
|
||||||
|
// return cost;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void setCost(String cost) {
|
||||||
|
// this.cost = cost;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class FilterSearchBean {
|
||||||
|
private int type; //0医院 1科室 2疾病
|
||||||
|
private String sickId;
|
||||||
|
private String sickDepartmentId;
|
||||||
|
private String sicksName;
|
||||||
|
private String hospitalId;
|
||||||
|
private String hospitalName;
|
||||||
|
private String departmentName;
|
||||||
|
private String departmentid;
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSickId() {
|
||||||
|
return sickId == null ? "" : sickId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSickId(String sickId) {
|
||||||
|
this.sickId = sickId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSickDepartmentId() {
|
||||||
|
return sickDepartmentId == null ? "" : sickDepartmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSickDepartmentId(String sickDepartmentId) {
|
||||||
|
this.sickDepartmentId = sickDepartmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSicksName() {
|
||||||
|
return sicksName == null ? "" : sicksName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSicksName(String sicksName) {
|
||||||
|
this.sicksName = sicksName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHospitalId() {
|
||||||
|
return hospitalId == null ? "" : hospitalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalId(String hospitalId) {
|
||||||
|
this.hospitalId = hospitalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHospitalName() {
|
||||||
|
return hospitalName == null ? "" : hospitalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalName(String hospitalName) {
|
||||||
|
this.hospitalName = hospitalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartmentName() {
|
||||||
|
return departmentName == null ? "" : departmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentName(String departmentName) {
|
||||||
|
this.departmentName = departmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartmentid() {
|
||||||
|
return departmentid == null ? "" : departmentid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentid(String departmentid) {
|
||||||
|
this.departmentid = departmentid;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class GuidanceListBean {
|
||||||
|
private String id;
|
||||||
|
private String imId;
|
||||||
|
private String memberId;
|
||||||
|
private String toAccountHead;
|
||||||
|
private String toAccountName;
|
||||||
|
private String contentType;
|
||||||
|
private String contentStatus;
|
||||||
|
private String hospitalLevel;
|
||||||
|
private String resourceName;
|
||||||
|
private String createTime;
|
||||||
|
private String memberName;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id == null ? "" : id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImId() {
|
||||||
|
return imId == null ? "" : imId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImId(String imId) {
|
||||||
|
this.imId = imId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMemberId() {
|
||||||
|
return memberId == null ? "" : memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(String memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getToAccountHead() {
|
||||||
|
return toAccountHead == null ? "" : toAccountHead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToAccountHead(String toAccountHead) {
|
||||||
|
this.toAccountHead = toAccountHead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getToAccountName() {
|
||||||
|
return toAccountName ;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToAccountName(String toAccountName) {
|
||||||
|
this.toAccountName = toAccountName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContentType() {
|
||||||
|
return contentType == null ? "" : contentType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContentType(String contentType) {
|
||||||
|
this.contentType = contentType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContentStatus() {
|
||||||
|
return contentStatus == null ? "" : contentStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContentStatus(String contentStatus) {
|
||||||
|
this.contentStatus = contentStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHospitalLevel() {
|
||||||
|
return hospitalLevel == null ? "" : hospitalLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalLevel(String hospitalLevel) {
|
||||||
|
this.hospitalLevel = hospitalLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResourceName() {
|
||||||
|
return resourceName == null ? "" : resourceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceName(String resourceName) {
|
||||||
|
this.resourceName = resourceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime == null ? "" : createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMemberName() {
|
||||||
|
return memberName == null ? "" : memberName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberName(String memberName) {
|
||||||
|
this.memberName = memberName;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class GuidanceSearchBean {
|
||||||
|
private int type=0;
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.sw.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import kotlinx.parcelize.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
data class HealthInfoBean(
|
||||||
|
val answerKey: String,
|
||||||
|
val answerValue: String
|
||||||
|
): Parcelable
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import com.xjjk.healthyclients.adapter.common.BaseCheckRecycleViewAdapter
|
||||||
|
import kotlinx.parcelize.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
data class HealthyInfoRadioBean(var radioText: String,
|
||||||
|
var explain: String?,
|
||||||
|
var value: String,
|
||||||
|
override val itemType: Int,
|
||||||
|
override var checked: Boolean
|
||||||
|
): BaseCheckRecycleViewAdapter.CheckItem, Parcelable
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class HospitalCommentBean {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String userId;
|
||||||
|
private String userName;
|
||||||
|
private String time;
|
||||||
|
private String score;
|
||||||
|
private String context;
|
||||||
|
private String officeName;
|
||||||
|
private String sessionType;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserName() {
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserName(String userName) {
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTime() {
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime(String time) {
|
||||||
|
this.time = time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getScore() {
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setScore(String score) {
|
||||||
|
this.score = score;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContext() {
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContext(String context) {
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOfficeName() {
|
||||||
|
return officeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOfficeName(String officeName) {
|
||||||
|
this.officeName = officeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSessionType() {
|
||||||
|
return sessionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSessionType(String sessionType) {
|
||||||
|
this.sessionType = sessionType;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class HospitalchildBean {
|
||||||
|
//医院
|
||||||
|
private String id;
|
||||||
|
private String img;
|
||||||
|
private String tag;
|
||||||
|
private String name;
|
||||||
|
private String department;//科室
|
||||||
|
private String distance;
|
||||||
|
private String address;
|
||||||
|
private double lon;
|
||||||
|
private double lat;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id == null ? "" : id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getLon() {
|
||||||
|
return lon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLon(double lon) {
|
||||||
|
this.lon = lon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getLat() {
|
||||||
|
return lat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLat(double lat) {
|
||||||
|
this.lat = lat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTag() {
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTag(String tag) {
|
||||||
|
this.tag = tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartment() {
|
||||||
|
return department == null ? "" : department;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartment(String department) {
|
||||||
|
this.department = department;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDistance() {
|
||||||
|
return distance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistance(String distance) {
|
||||||
|
this.distance = distance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress() {
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address) {
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class InsertUserAndHelperSessionBean {
|
||||||
|
|
||||||
|
private String helpId;//小助手id
|
||||||
|
private String id;//咨询单id
|
||||||
|
|
||||||
|
public String getHelpId() {
|
||||||
|
return helpId == null ? "" : helpId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHelpId(String helpId) {
|
||||||
|
this.helpId = helpId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id == null ? "" : id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class SearchDepartListBean {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String departmentName;
|
||||||
|
private int doctorNum;
|
||||||
|
private int secondDepartmentNum;
|
||||||
|
private int sickNum;
|
||||||
|
private int mark;
|
||||||
|
private Object image;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartmentName() {
|
||||||
|
return departmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentName(String departmentName) {
|
||||||
|
this.departmentName = departmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDoctorNum() {
|
||||||
|
return doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctorNum(int doctorNum) {
|
||||||
|
this.doctorNum = doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSecondDepartmentNum() {
|
||||||
|
return secondDepartmentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecondDepartmentNum(int secondDepartmentNum) {
|
||||||
|
this.secondDepartmentNum = secondDepartmentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSickNum() {
|
||||||
|
return sickNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSickNum(int sickNum) {
|
||||||
|
this.sickNum = sickNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMark() {
|
||||||
|
return mark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMark(int mark) {
|
||||||
|
this.mark = mark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getImage() {
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImage(Object image) {
|
||||||
|
this.image = image;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,616 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SearchHomeBean {
|
||||||
|
|
||||||
|
@SerializedName("SicksList")
|
||||||
|
private List<SicksListDTO> sicksList;
|
||||||
|
private int hospitalCount;
|
||||||
|
@SerializedName("DepartmentList")
|
||||||
|
private List<DepartmentListDTO> departmentList;
|
||||||
|
private List<HospitalListDTO> hospitalList;
|
||||||
|
@SerializedName("DepartmentCount")
|
||||||
|
private int departmentCount;
|
||||||
|
@SerializedName("SicksCount")
|
||||||
|
private int sicksCount;
|
||||||
|
|
||||||
|
public List<SicksListDTO> getSicksList() {
|
||||||
|
return sicksList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSicksList(List<SicksListDTO> sicksList) {
|
||||||
|
this.sicksList = sicksList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHospitalCount() {
|
||||||
|
return hospitalCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalCount(int hospitalCount) {
|
||||||
|
this.hospitalCount = hospitalCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DepartmentListDTO> getDepartmentList() {
|
||||||
|
return departmentList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentList(List<DepartmentListDTO> departmentList) {
|
||||||
|
this.departmentList = departmentList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<HospitalListDTO> getHospitalList() {
|
||||||
|
return hospitalList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHospitalList(List<HospitalListDTO> hospitalList) {
|
||||||
|
this.hospitalList = hospitalList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDepartmentCount() {
|
||||||
|
return departmentCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentCount(int departmentCount) {
|
||||||
|
this.departmentCount = departmentCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSicksCount() {
|
||||||
|
return sicksCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSicksCount(int sicksCount) {
|
||||||
|
this.sicksCount = sicksCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class SicksListDTO {
|
||||||
|
private String id;
|
||||||
|
private String departmentId;
|
||||||
|
private String sicksName;
|
||||||
|
private String descript;
|
||||||
|
private String doctorNum;
|
||||||
|
private int status;
|
||||||
|
private int delFlag;
|
||||||
|
private Object createBy;
|
||||||
|
private Object createTime;
|
||||||
|
private Object updateBy;
|
||||||
|
private Object updateTime;
|
||||||
|
private Object memo;
|
||||||
|
private Object sicksCode;
|
||||||
|
|
||||||
|
public String getDoctorNum() {
|
||||||
|
return doctorNum == null ? "" : doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctorNum(String doctorNum) {
|
||||||
|
this.doctorNum = doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartmentId() {
|
||||||
|
return departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentId(String departmentId) {
|
||||||
|
this.departmentId = departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSicksName() {
|
||||||
|
return sicksName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSicksName(String sicksName) {
|
||||||
|
this.sicksName = sicksName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescript() {
|
||||||
|
return descript;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescript(String descript) {
|
||||||
|
this.descript = descript;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDelFlag() {
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDelFlag(int delFlag) {
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getCreateBy() {
|
||||||
|
return createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateBy(Object createBy) {
|
||||||
|
this.createBy = createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Object createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getUpdateBy() {
|
||||||
|
return updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateBy(Object updateBy) {
|
||||||
|
this.updateBy = updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Object updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getMemo() {
|
||||||
|
return memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemo(Object memo) {
|
||||||
|
this.memo = memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSicksCode() {
|
||||||
|
return sicksCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSicksCode(Object sicksCode) {
|
||||||
|
this.sicksCode = sicksCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class DepartmentListDTO {
|
||||||
|
private String id;
|
||||||
|
private String departmentName;
|
||||||
|
private String othername;
|
||||||
|
private String mark;
|
||||||
|
private String sicks;
|
||||||
|
private String createName;
|
||||||
|
private Object createBy;
|
||||||
|
private Object createTime;
|
||||||
|
private String updateName;
|
||||||
|
private Object updateBy;
|
||||||
|
private Object updateTime;
|
||||||
|
private Object delDate;
|
||||||
|
private int delFlag;
|
||||||
|
private int doctorNum;
|
||||||
|
private String officeLevel;
|
||||||
|
private String officeCode;
|
||||||
|
private Object officeparid;
|
||||||
|
private String resourceId;
|
||||||
|
private String resourceName;
|
||||||
|
private String image;
|
||||||
|
|
||||||
|
public int getDoctorNum() {
|
||||||
|
return doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctorNum(int doctorNum) {
|
||||||
|
this.doctorNum = doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartmentName() {
|
||||||
|
return departmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentName(String departmentName) {
|
||||||
|
this.departmentName = departmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOthername() {
|
||||||
|
return othername;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOthername(String othername) {
|
||||||
|
this.othername = othername;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMark() {
|
||||||
|
return mark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMark(String mark) {
|
||||||
|
this.mark = mark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSicks() {
|
||||||
|
return sicks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSicks(String sicks) {
|
||||||
|
this.sicks = sicks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateName() {
|
||||||
|
return createName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateName(String createName) {
|
||||||
|
this.createName = createName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getCreateBy() {
|
||||||
|
return createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateBy(Object createBy) {
|
||||||
|
this.createBy = createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Object createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateName() {
|
||||||
|
return updateName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateName(String updateName) {
|
||||||
|
this.updateName = updateName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getUpdateBy() {
|
||||||
|
return updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateBy(Object updateBy) {
|
||||||
|
this.updateBy = updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Object updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getDelDate() {
|
||||||
|
return delDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDelDate(Object delDate) {
|
||||||
|
this.delDate = delDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDelFlag() {
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDelFlag(int delFlag) {
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOfficeLevel() {
|
||||||
|
return officeLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOfficeLevel(String officeLevel) {
|
||||||
|
this.officeLevel = officeLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOfficeCode() {
|
||||||
|
return officeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOfficeCode(String officeCode) {
|
||||||
|
this.officeCode = officeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getOfficeparid() {
|
||||||
|
return officeparid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOfficeparid(Object officeparid) {
|
||||||
|
this.officeparid = officeparid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResourceId() {
|
||||||
|
return resourceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceId(String resourceId) {
|
||||||
|
this.resourceId = resourceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResourceName() {
|
||||||
|
return resourceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceName(String resourceName) {
|
||||||
|
this.resourceName = resourceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage() {
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImage(String image) {
|
||||||
|
this.image = image;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class HospitalListDTO {
|
||||||
|
private String id;
|
||||||
|
private String resourceName;
|
||||||
|
private double longitude;
|
||||||
|
private double latitude;
|
||||||
|
private String type;
|
||||||
|
private Object secondType;
|
||||||
|
private Object aidrange;
|
||||||
|
private String gdId;
|
||||||
|
private String url;
|
||||||
|
private String province;
|
||||||
|
private String city;
|
||||||
|
private Object area;
|
||||||
|
private String address;
|
||||||
|
private String level;
|
||||||
|
private String img;
|
||||||
|
private String synopsis;
|
||||||
|
private int sort;
|
||||||
|
private int status;
|
||||||
|
private int delFlag;
|
||||||
|
private Object createBy;
|
||||||
|
private Object createTime;
|
||||||
|
private Object updateBy;
|
||||||
|
private Object updateTime;
|
||||||
|
private Object memo;
|
||||||
|
private String keyDepartments;
|
||||||
|
private String userScore;
|
||||||
|
private String userScoreNum;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id == null ? "" : id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResourceName() {
|
||||||
|
return resourceName == null ? "" : resourceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceName(String resourceName) {
|
||||||
|
this.resourceName = resourceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(double longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(double latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type == null ? "" : type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSecondType() {
|
||||||
|
return secondType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecondType(Object secondType) {
|
||||||
|
this.secondType = secondType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getAidrange() {
|
||||||
|
return aidrange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAidrange(Object aidrange) {
|
||||||
|
this.aidrange = aidrange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGdId() {
|
||||||
|
return gdId == null ? "" : gdId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGdId(String gdId) {
|
||||||
|
this.gdId = gdId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url == null ? "" : url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProvince() {
|
||||||
|
return province == null ? "" : province;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProvince(String province) {
|
||||||
|
this.province = province;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCity() {
|
||||||
|
return city == null ? "" : city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCity(String city) {
|
||||||
|
this.city = city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getArea() {
|
||||||
|
return area;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArea(Object area) {
|
||||||
|
this.area = area;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress() {
|
||||||
|
return address == null ? "" : address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address) {
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLevel() {
|
||||||
|
return level == null ? "" : level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(String level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img == null ? "" : img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSynopsis() {
|
||||||
|
return synopsis == null ? "" : synopsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSynopsis(String synopsis) {
|
||||||
|
this.synopsis = synopsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSort() {
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSort(int sort) {
|
||||||
|
this.sort = sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDelFlag() {
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDelFlag(int delFlag) {
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getCreateBy() {
|
||||||
|
return createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateBy(Object createBy) {
|
||||||
|
this.createBy = createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Object createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getUpdateBy() {
|
||||||
|
return updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateBy(Object updateBy) {
|
||||||
|
this.updateBy = updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Object updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getMemo() {
|
||||||
|
return memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemo(Object memo) {
|
||||||
|
this.memo = memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKeyDepartments() {
|
||||||
|
return keyDepartments == null ? "" : keyDepartments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKeyDepartments(String keyDepartments) {
|
||||||
|
this.keyDepartments = keyDepartments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserScore() {
|
||||||
|
return userScore == null ? "" : userScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserScore(String userScore) {
|
||||||
|
this.userScore = userScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserScoreNum() {
|
||||||
|
return userScoreNum == null ? "" : userScoreNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserScoreNum(String userScoreNum) {
|
||||||
|
this.userScoreNum = userScoreNum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class SickListBean {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String departmentId;
|
||||||
|
private String sicksName;
|
||||||
|
private int doctorNum;
|
||||||
|
private Object descript;
|
||||||
|
|
||||||
|
public int getDoctorNum() {
|
||||||
|
return doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctorNum(int doctorNum) {
|
||||||
|
this.doctorNum = doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id == null ? "" : id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartmentId() {
|
||||||
|
return departmentId == null ? "" : departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentId(String departmentId) {
|
||||||
|
this.departmentId = departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSicksName() {
|
||||||
|
return sicksName == null ? "" : sicksName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSicksName(String sicksName) {
|
||||||
|
this.sicksName = sicksName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getDescript() {
|
||||||
|
return descript;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescript(Object descript) {
|
||||||
|
this.descript = descript;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance;
|
||||||
|
|
||||||
|
public class hospitalDetailBean {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String resourceName="";
|
||||||
|
private double longitude;
|
||||||
|
private double latitude;
|
||||||
|
private String address="";
|
||||||
|
private String level;
|
||||||
|
private String img;
|
||||||
|
private String synopsis="";
|
||||||
|
private String departmentNum;
|
||||||
|
private String doctorNum;
|
||||||
|
private String tfFollow;
|
||||||
|
private String resourceDetail;
|
||||||
|
|
||||||
|
public String getResourceDetail() {
|
||||||
|
return resourceDetail == null ? "" : resourceDetail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceDetail(String resourceDetail) {
|
||||||
|
this.resourceDetail = resourceDetail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTfFollow() {
|
||||||
|
return tfFollow == null ? "" : tfFollow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTfFollow(String tfFollow) {
|
||||||
|
this.tfFollow = tfFollow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResourceName() {
|
||||||
|
return resourceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceName(String resourceName) {
|
||||||
|
this.resourceName = resourceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(double longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(double latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress() {
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address) {
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(String level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSynopsis() {
|
||||||
|
return synopsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSynopsis(String synopsis) {
|
||||||
|
this.synopsis = synopsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartmentNum() {
|
||||||
|
return departmentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentNum(String departmentNum) {
|
||||||
|
this.departmentNum = departmentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDoctorNum() {
|
||||||
|
return doctorNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctorNum(String doctorNum) {
|
||||||
|
this.doctorNum = doctorNum;
|
||||||
|
}
|
||||||
|
}
|
||||||
+77
@@ -0,0 +1,77 @@
|
|||||||
|
package com.xjjk.healthyclients.bean.guidance.imHistory;
|
||||||
|
|
||||||
|
import com.lzy.ninegrid.ImageInfo;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档案
|
||||||
|
*/
|
||||||
|
public class ArchivesMessageBean {
|
||||||
|
private String archivesId;
|
||||||
|
private String age;
|
||||||
|
private String gender;
|
||||||
|
private ArrayList<ImageInfo> imageList;
|
||||||
|
private String memberId;
|
||||||
|
private String name;
|
||||||
|
private String symptomDescription;
|
||||||
|
|
||||||
|
public String getArchivesId() {
|
||||||
|
return archivesId == null ? "" : archivesId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArchivesId(String archivesId) {
|
||||||
|
this.archivesId = archivesId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAge() {
|
||||||
|
return age == null ? "0" : age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAge(String age) {
|
||||||
|
this.age = age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGender() {
|
||||||
|
return gender == null ? "" : gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGender(String gender) {
|
||||||
|
this.gender = gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<ImageInfo> getImageList() {
|
||||||
|
if (imageList == null) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return imageList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageList(ArrayList<ImageInfo> imageList) {
|
||||||
|
this.imageList = imageList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMemberId() {
|
||||||
|
return memberId == null ? "" : memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(String memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name == null ? "" : name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSymptomDescription() {
|
||||||
|
return symptomDescription == null ? "" : symptomDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSymptomDescription(String symptomDescription) {
|
||||||
|
this.symptomDescription = symptomDescription;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user