Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
eae736e4
Commit
eae736e4
authored
Nov 09, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : im模块代码提交
parent
bfc4344e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
2038 additions
and
107 deletions
+2038
-107
config.gradle
config.gradle
+8
-8
AndroidManifest.xml
m-im/src/main/AndroidManifest.xml
+8
-0
GraphicConsultationFlow1Activity.kt
m-im/src/main/java/com/yidianling/medical/GraphicConsultationFlow1Activity.kt
+68
-7
GraphicConsulttionFlow2Activity.kt
m-im/src/main/java/com/yidianling/medical/GraphicConsulttionFlow2Activity.kt
+185
-3
NotificationsUtils.kt
m-im/src/main/java/com/yidianling/medical/NotificationsUtils.kt
+77
-0
MedicalAddNewArchivesActivity.kt
m-im/src/main/java/com/yidianling/medical/archives/MedicalAddNewArchivesActivity.kt
+10
-1
MedicalArchivesListActivity.kt
m-im/src/main/java/com/yidianling/medical/archives/MedicalArchivesListActivity.kt
+27
-4
MedicalEditArchivesActivity.kt
m-im/src/main/java/com/yidianling/medical/archives/MedicalEditArchivesActivity.kt
+100
-0
MedicalUserArchivesAdapter.kt
m-im/src/main/java/com/yidianling/medical/archives/adapter/MedicalUserArchivesAdapter.kt
+7
-3
MedicalUserArchivesFlow2Adapter.kt
m-im/src/main/java/com/yidianling/medical/archives/adapter/MedicalUserArchivesFlow2Adapter.kt
+46
-0
CreateImageInquiryDtoBody.kt
m-im/src/main/java/com/yidianling/medical/archives/bean/CreateImageInquiryDtoBody.kt
+11
-0
CreatePatientDtoBody.kt
m-im/src/main/java/com/yidianling/medical/archives/bean/CreatePatientDtoBody.kt
+9
-0
MedicalArchivesListBean.kt
m-im/src/main/java/com/yidianling/medical/archives/bean/MedicalArchivesListBean.kt
+25
-17
PatientIdDtoBody.kt
m-im/src/main/java/com/yidianling/medical/archives/bean/PatientIdDtoBody.kt
+5
-0
MeidicalChatFragment.kt
m-im/src/main/java/com/yidianling/medical/im/MeidicalChatFragment.kt
+289
-0
MedicalChatAdapter.kt
m-im/src/main/java/com/yidianling/medical/im/adapter/MedicalChatAdapter.kt
+247
-0
MedicalChatItemView.kt
m-im/src/main/java/com/yidianling/medical/im/view/MedicalChatItemView.kt
+100
-0
ServiceApi.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceApi.kt
+18
-7
ServiceImpl.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
+73
-2
im_chat_message_unread_num_bg.xml
m-im/src/main/res/drawable/im_chat_message_unread_num_bg.xml
+2
-2
medical_bg_3464ec_4dp_fill.xml
m-im/src/main/res/drawable/medical_bg_3464ec_4dp_fill.xml
+7
-0
medical_bg_c0c9d4_8dp.xml
m-im/src/main/res/drawable/medical_bg_c0c9d4_8dp.xml
+10
-0
medical_list_check_bg.xml
m-im/src/main/res/drawable/medical_list_check_bg.xml
+10
-0
medical_add_new_archives_activity.xml
m-im/src/main/res/layout/medical_add_new_archives_activity.xml
+1
-1
medical_archives_list_activity.xml
m-im/src/main/res/layout/medical_archives_list_activity.xml
+1
-1
medical_edit_archives_activity.xml
m-im/src/main/res/layout/medical_edit_archives_activity.xml
+243
-0
medical_graphic_consultation_flow1.xml
m-im/src/main/res/layout/medical_graphic_consultation_flow1.xml
+3
-2
medical_graphic_consultation_flow2.xml
m-im/src/main/res/layout/medical_graphic_consultation_flow2.xml
+84
-49
medical_im_chat_fragment_layout.xml
m-im/src/main/res/layout/medical_im_chat_fragment_layout.xml
+117
-0
medical_im_chat_item_view.xml
m-im/src/main/res/layout/medical_im_chat_item_view.xml
+147
-0
medical_item_archives_flow2_list.xml
m-im/src/main/res/layout/medical_item_archives_flow2_list.xml
+99
-0
medical_add_icon.png
m-im/src/main/res/mipmap-xhdpi/medical_add_icon.png
+0
-0
medical_check_bottom_right.png
m-im/src/main/res/mipmap-xhdpi/medical_check_bottom_right.png
+0
-0
medical_close_ovel.png
m-im/src/main/res/mipmap-xhdpi/medical_close_ovel.png
+0
-0
medical_icon_more.png
m-im/src/main/res/mipmap-xhdpi/medical_icon_more.png
+0
-0
settings.gradle
settings.gradle
+1
-0
No files found.
config.gradle
View file @
eae736e4
...
@@ -8,9 +8,9 @@ ext {
...
@@ -8,9 +8,9 @@ ext {
"m-confide"
:
"0.0.49.10"
,
"m-confide"
:
"0.0.49.10"
,
"m-consultant"
:
"0.0.59.91"
,
"m-consultant"
:
"0.0.59.91"
,
"m-fm"
:
"0.0.30.03"
,
"m-fm"
:
"0.0.30.03"
,
"m-user"
:
"0.0.61.
68
"
,
"m-user"
:
"0.0.61.
84
"
,
"m-home"
:
"0.0.22.70"
,
"m-home"
:
"0.0.22.70"
,
"m-im"
:
"0.0.
19.90
"
,
"m-im"
:
"0.0.
20.13
"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.10"
,
"m-article"
:
"0.0.0.10"
,
...
@@ -33,10 +33,10 @@ ext {
...
@@ -33,10 +33,10 @@ ext {
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
//第一步
//第一步
"ydl-platform"
:
"0.0.40.
44
"
,
"ydl-platform"
:
"0.0.40.
51
"
,
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.38.5
1
"
,
"ydl-webview"
:
"0.0.38.5
2
"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.37"
,
"m-audioim"
:
"0.0.49.29.37"
,
...
@@ -91,9 +91,9 @@ ext {
...
@@ -91,9 +91,9 @@ ext {
"m-confide"
:
"0.0.49.10"
,
"m-confide"
:
"0.0.49.10"
,
"m-consultant"
:
"0.0.59.91"
,
"m-consultant"
:
"0.0.59.91"
,
"m-fm"
:
"0.0.30.01"
,
"m-fm"
:
"0.0.30.01"
,
"m-user"
:
"0.0.61.
68
"
,
"m-user"
:
"0.0.61.
84
"
,
"m-home"
:
"0.0.22.70"
,
"m-home"
:
"0.0.22.70"
,
"m-im"
:
"0.0.
19.90
"
,
"m-im"
:
"0.0.
20.13
"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.8"
,
"m-article"
:
"0.0.0.8"
,
...
@@ -115,10 +115,10 @@ ext {
...
@@ -115,10 +115,10 @@ ext {
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
//第一步
//第一步
"ydl-platform"
:
"0.0.40.
44
"
,
"ydl-platform"
:
"0.0.40.
51
"
,
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.38.5
1
"
,
"ydl-webview"
:
"0.0.38.5
2
"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.37"
,
"m-audioim"
:
"0.0.49.29.37"
,
...
...
m-im/src/main/AndroidManifest.xml
View file @
eae736e4
...
@@ -270,8 +270,10 @@
...
@@ -270,8 +270,10 @@
<!--图文问诊页面2-->
<!--图文问诊页面2-->
<activity
<activity
android:name=
"com.yidianling.medical.GraphicConsulttionFlow2Activity"
android:name=
"com.yidianling.medical.GraphicConsulttionFlow2Activity"
android:windowSoftInputMode=
"adjustNothing"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
<activity
android:name=
"com.yidianling.medical.pic.MedicalBrowsePicturesActivity"
android:name=
"com.yidianling.medical.pic.MedicalBrowsePicturesActivity"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
...
@@ -288,5 +290,11 @@
...
@@ -288,5 +290,11 @@
android:name=
"com.yidianling.medical.archives.MedicalAddNewArchivesActivity"
android:name=
"com.yidianling.medical.archives.MedicalAddNewArchivesActivity"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
android:theme=
"@style/platform_NoTitleTheme"
/>
android:theme=
"@style/platform_NoTitleTheme"
/>
<!--编辑问诊人-->
<activity
android:name=
"com.yidianling.medical.archives.MedicalEditArchivesActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/platform_NoTitleTheme"
/>
</application>
</application>
</manifest>
</manifest>
m-im/src/main/java/com/yidianling/medical/GraphicConsultationFlow1Activity.kt
View file @
eae736e4
...
@@ -16,6 +16,9 @@ import com.ydl.ydlcommon.adapter.custom.PublishImageAdapter
...
@@ -16,6 +16,9 @@ import com.ydl.ydlcommon.adapter.custom.PublishImageAdapter
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.router.YdlCommonOut.Companion.showToast
import
com.ydl.ydlcommon.router.YdlCommonOut.Companion.showToast
import
com.ydl.ydlcommon.ui.ParcelableImage
import
com.ydl.ydlcommon.ui.ParcelableImage
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.view.dialog.NormalDialog
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.R
import
com.yidianling.im.R
import
com.yidianling.medical.pic.MedicalBrowsePicturesActivity
import
com.yidianling.medical.pic.MedicalBrowsePicturesActivity
import
com.yidianling.medical.pic.MedicalDynamicConstants
import
com.yidianling.medical.pic.MedicalDynamicConstants
...
@@ -35,14 +38,16 @@ import java.util.*
...
@@ -35,14 +38,16 @@ import java.util.*
class
GraphicConsultationFlow1Activity
:
BaseActivity
()
{
class
GraphicConsultationFlow1Activity
:
BaseActivity
()
{
companion
object
{
companion
object
{
var
publishTrendImgs
=
ArrayList
<
ParcelableImage
>()
private
var
publishTrendImgs
=
ArrayList
<
ParcelableImage
>()
var
publishTrendImgBrows
=
ArrayList
<
ParcelableImage
>()
private
var
publishTrendImgBrows
=
ArrayList
<
ParcelableImage
>()
var
PUBLISH_PIC_BROW
=
21009
private
var
PUBLISH_PIC_BROW
=
21009
lateinit
var
imageAdapter
:
PublishImageAdapter
private
lateinit
var
mDoctorId
:
String
private
lateinit
var
imageAdapter
:
PublishImageAdapter
@JvmStatic
@JvmStatic
fun
start
(
context
:
Context
)
{
fun
start
(
context
:
Context
,
doctorId
:
String
)
{
val
starter
=
Intent
(
context
,
GraphicConsultationFlow1Activity
::
class
.
java
)
val
starter
=
Intent
(
context
,
GraphicConsultationFlow1Activity
::
class
.
java
)
.
putExtra
(
"doctorId"
,
doctorId
)
context
.
startActivity
(
starter
)
context
.
startActivity
(
starter
)
}
}
}
}
...
@@ -52,6 +57,8 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
...
@@ -52,6 +57,8 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
}
}
override
fun
initDataAndEvent
()
{
override
fun
initDataAndEvent
()
{
initStatus
()
mDoctorId
=
intent
.
getStringExtra
(
"doctorId"
)
imageAdapter
=
imageAdapter
=
PublishImageAdapter
(
publishTrendImgs
,
this
@GraphicConsultationFlow1Activity
);
PublishImageAdapter
(
publishTrendImgs
,
this
@GraphicConsultationFlow1Activity
);
...
@@ -74,8 +81,17 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
...
@@ -74,8 +81,17 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
}
}
}
}
text_service
.
setOnClickListener
{
text_service
.
setOnClickListener
{
//下一步
if
(
edit_input
.
text
.
length
<
10
)
{
GraphicConsulttionFlow2Activity
.
start
(
this
@GraphicConsultationFlow1Activity
)
ToastUtil
.
toastShort
(
"请最少填写10个字"
)
return
@setOnClickListener
}
else
{
//下一步
GraphicConsulttionFlow2Activity
.
start
(
this
@GraphicConsultationFlow1Activity
,
edit_input
.
text
.
toString
(),
""
,
mDoctorId
)
}
}
}
edit_input
.
addTextChangedListener
(
object
:
TextWatcher
{
edit_input
.
addTextChangedListener
(
object
:
TextWatcher
{
...
@@ -83,6 +99,15 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
...
@@ -83,6 +99,15 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
override
fun
afterTextChanged
(
s
:
Editable
?)
{
override
fun
afterTextChanged
(
s
:
Editable
?)
{
val
inputNumber
=
edit_input
.
text
.
length
.
toString
()
val
inputNumber
=
edit_input
.
text
.
length
.
toString
()
input_num
.
text
=
"$inputNumber/200"
input_num
.
text
=
"$inputNumber/200"
if
(
edit_input
.
text
.
isNotEmpty
())
{
text_service
.
setBackgroundResource
(
R
.
drawable
.
bg_doctor_detail_bottom
)
text_service
.
isEnabled
=
true
}
else
{
text_service
.
setBackgroundResource
(
R
.
drawable
.
medical_bg_d7dfea_8dp
)
text_service
.
isEnabled
=
false
}
}
}
override
fun
beforeTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
count
:
Int
,
after
:
Int
)
{}
override
fun
beforeTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
count
:
Int
,
after
:
Int
)
{}
...
@@ -92,6 +117,36 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
...
@@ -92,6 +117,36 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
}
}
})
})
iv_back
.
setOnClickListener
{
backCheck
()
}
}
private
fun
backCheck
()
{
val
builder
=
NormalDialog
.
Builder
(
this
@GraphicConsultationFlow1Activity
,
"center"
,
true
)
builder
.
setTitle
(
""
)
builder
.
setMessage
(
"\n仅剩一步就可抢到医生的问诊名额,确认放弃吗?\n"
)
builder
.
setPositiveButton
(
"继续填写"
)
{
dialog
,
which
->
dialog
.
dismiss
()
}.
setNegativeButton
(
"放弃填写"
)
{
dialog
,
which
->
//关闭页面
finish
()
dialog
.
dismiss
()
}
builder
.
setRight_color
(
"#3464EC"
)
builder
.
setLeft_color
(
"#8595A9"
)
builder
.
setContent_color
(
"#10233A"
)
builder
.
create
().
show
()
}
override
fun
onBackPressed
()
{
backCheck
()
}
}
override
fun
onActivityResult
(
requestCode
:
Int
,
resultCode
:
Int
,
data
:
Intent
?)
{
override
fun
onActivityResult
(
requestCode
:
Int
,
resultCode
:
Int
,
data
:
Intent
?)
{
...
@@ -263,4 +318,9 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
...
@@ -263,4 +318,9 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
imageAdapter
.
updateDate
(
publishTrendImgs
)
imageAdapter
.
updateDate
(
publishTrendImgs
)
}
}
private
fun
initStatus
()
{
StatusBarUtils
.
setTransparentForImageView
(
this
@GraphicConsultationFlow1Activity
,
null
)
StatusBarUtils
.
statusBarLightMode
(
this
@GraphicConsultationFlow1Activity
)
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/medical/GraphicConsulttionFlow2Activity.kt
View file @
eae736e4
package
com.yidianling.medical
package
com.yidianling.medical
import
android.annotation.SuppressLint
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
androidx.recyclerview.widget.LinearLayoutManager
import
android.view.View
import
androidx.recyclerview.widget.GridLayoutManager
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.R
import
com.yidianling.im.R
import
com.yidianling.medical.archives.MedicalAddNewArchivesActivity
import
com.yidianling.medical.archives.adapter.MedicalUserArchivesFlow2Adapter
import
com.yidianling.medical.archives.bean.MedicalArchivesListBean
import
com.yidianling.uikit.custom.http.ServiceImpl
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.main.medical_graphic_consultation_flow2.*
import
kotlinx.android.synthetic.main.medical_graphic_consultation_flow2.*
import
kotlinx.coroutines.CoroutineScope
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.Job
import
kotlinx.coroutines.launch
/**
/**
...
@@ -14,9 +28,27 @@ import kotlinx.android.synthetic.main.medical_graphic_consultation_flow2.*
...
@@ -14,9 +28,27 @@ import kotlinx.android.synthetic.main.medical_graphic_consultation_flow2.*
class
GraphicConsulttionFlow2Activity
:
BaseActivity
()
{
class
GraphicConsulttionFlow2Activity
:
BaseActivity
()
{
companion
object
{
companion
object
{
lateinit
var
stringExtra
:
String
lateinit
var
fileStrExtra
:
String
lateinit
var
doctorIdStrExtra
:
String
private
lateinit
var
mAdapter
:
MedicalUserArchivesFlow2Adapter
private
var
mList
=
ArrayList
<
MedicalArchivesListBean
>()
private
var
isFirstLoadData
=
true
//是否是首次问诊
private
var
isFirst
=
-
1
/**
* @param inputText 并请描述
* @param fileStr 图片拼接字符串
* */
@JvmStatic
@JvmStatic
fun
start
(
context
:
Context
)
{
fun
start
(
context
:
Context
,
inputText
:
String
,
fileStr
:
String
,
doctorId
:
String
)
{
val
starter
=
Intent
(
context
,
GraphicConsulttionFlow2Activity
::
class
.
java
)
val
starter
=
Intent
(
context
,
GraphicConsulttionFlow2Activity
::
class
.
java
)
.
putExtra
(
"inputText"
,
inputText
)
.
putExtra
(
"fileStr"
,
fileStr
)
.
putExtra
(
"doctorId"
,
doctorId
)
context
.
startActivity
(
starter
)
context
.
startActivity
(
starter
)
}
}
}
}
...
@@ -26,11 +58,160 @@ class GraphicConsulttionFlow2Activity : BaseActivity() {
...
@@ -26,11 +58,160 @@ class GraphicConsulttionFlow2Activity : BaseActivity() {
}
}
override
fun
initDataAndEvent
()
{
override
fun
initDataAndEvent
()
{
initStatus
()
stringExtra
=
intent
.
getStringExtra
(
"inputText"
)
fileStrExtra
=
intent
.
getStringExtra
(
"fileStr"
)
doctorIdStrExtra
=
intent
.
getStringExtra
(
"doctorId"
)
mAdapter
=
MedicalUserArchivesFlow2Adapter
()
rv_people_list
.
layoutManager
=
GridLayoutManager
(
this
@GraphicConsulttionFlow2Activity
,
3
)
rv_people_list
.
adapter
=
mAdapter
mAdapter
.
setOnItemClickListener
{
baseQuickAdapter
,
view
,
position
->
if
(
mAdapter
.
data
[
position
]
?.
isAdd
==
true
)
{
//点击添加患者
isFirstLoadData
=
false
MedicalAddNewArchivesActivity
.
start
(
this
@GraphicConsulttionFlow2Activity
)
}
else
{
//item 点击
for
((
index
,
bean
)
in
mAdapter
.
data
.
withIndex
())
{
if
(
mAdapter
.
data
[
index
]
?.
isCheck
==
true
)
{
mAdapter
.
data
[
index
]
?.
isCheck
=
false
}
else
{
mAdapter
.
data
[
index
]
?.
isCheck
=
index
==
position
}
}
baseQuickAdapter
.
notifyDataSetChanged
()
}
}
radio_first_mit
.
setOnCheckedChangeListener
{
group
,
checkedId
->
//婚姻状态
when
(
checkedId
)
{
R
.
id
.
yes
->
{
//是首次问诊
input_first_mit
.
visibility
=
View
.
GONE
isFirst
=
1
}
R
.
id
.
no
->
{
//不是首次问诊
input_first_mit
.
visibility
=
View
.
VISIBLE
isFirst
=
0
}
}
}
text_service
.
setOnClickListener
{
//保存
toSave
()
}
iv_back_flow2
.
setOnClickListener
{
finish
()
}
informed_consent_text
.
setOnClickListener
{
//协议内容
}
getList
()
}
/**
* 生成图文订单
* */
@SuppressLint
(
"CheckResult"
)
private
fun
toSave
()
{
var
selectBean
:
MedicalArchivesListBean
?
=
null
rv_people_list
.
layoutManager
=
LinearLayoutManager
(
this
@GraphicConsulttionFlow2Activity
)
//携程用于解决遍历选中item时,没遍历完就判断了selectBean
val
scope
=
CoroutineScope
(
Dispatchers
.
Default
+
Job
())
scope
.
launch
{
for
((
index
,
bean
)
in
mAdapter
.
data
.
withIndex
())
{
if
(
mAdapter
.
data
[
index
]
?.
isCheck
==
true
)
{
selectBean
=
mAdapter
.
data
[
index
]
!!
break
}
}
if
(
selectBean
==
null
)
{
ToastUtil
.
toastShort
(
"请选择就诊人"
)
return
@launch
}
if
(
isFirst
==
-
1
)
{
ToastUtil
.
toastShort
(
"请选择是否首次问诊"
)
return
@launch
}
if
(
isFirst
==
0
&&
input_first_mit
.
text
.
isEmpty
())
{
ToastUtil
.
toastShort
(
"请描述您的病情"
)
return
@launch
}
ServiceImpl
.
instance
.
createArchivesOrder
(
""
,
isFirst
,
stringExtra
,
input_first_mit
.
text
.
toString
(),
selectBean
!!
.
patientId
,
doctorIdStrExtra
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
response
->
mList
.
clear
()
if
(
"200"
==
response
.
code
)
{
ToastUtil
.
toastShort
(
"成功"
)
}
else
{
ToastUtil
.
toastShort
(
response
.
msg
)
}
},
{
e
->
e
.
printStackTrace
()
})
}
}
override
fun
onResume
()
{
super
.
onResume
()
if
(!
isFirstLoadData
)
{
getList
()
}
}
/**
* 获取患者列表
* */
@SuppressLint
(
"CheckResult"
)
private
fun
getList
()
{
ServiceImpl
.
instance
.
getList
()
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
response
->
mList
.
clear
()
if
(
"200"
==
response
.
code
)
{
var
data
=
response
.
data
if
(
data
.
size
<
8
)
{
mList
=
data
as
ArrayList
<
MedicalArchivesListBean
>
mList
.
add
(
MedicalArchivesListBean
(
true
))
}
else
{
mList
=
data
as
ArrayList
<
MedicalArchivesListBean
>
}
mAdapter
.
setNewData
(
mList
as
List
<
MedicalArchivesListBean
?>?)
}
else
{
mList
.
add
(
MedicalArchivesListBean
(
true
))
}
},
{
e
->
})
}
private
fun
initStatus
()
{
StatusBarUtils
.
setTransparentForImageView
(
this
@GraphicConsulttionFlow2Activity
,
null
)
StatusBarUtils
.
statusBarLightMode
(
this
@GraphicConsulttionFlow2Activity
)
}
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/medical/NotificationsUtils.kt
0 → 100644
View file @
eae736e4
package
com.yidianling.medical
import
android.app.AppOpsManager
import
android.content.Context
import
android.content.Intent
import
android.content.pm.ApplicationInfo
import
android.net.Uri
import
android.os.Build
import
androidx.annotation.RequiresApi
import
java.lang.reflect.Field
import
java.lang.reflect.InvocationTargetException
import
java.lang.reflect.Method
open
class
NotificationsUtils
{
companion
object
{
private
val
CHECK_OP_NO_THROW
=
"checkOpNoThrow"
private
val
OP_POST_NOTIFICATION
=
"OP_POST_NOTIFICATION"
@RequiresApi
(
Build
.
VERSION_CODES
.
KITKAT
)
fun
isNotificationOpen
(
context
:
Context
):
Boolean
{
val
mAppOps
:
AppOpsManager
=
context
.
getSystemService
(
Context
.
APP_OPS_SERVICE
)
as
AppOpsManager
val
appInfo
:
ApplicationInfo
=
context
.
getApplicationInfo
()
val
pkg
:
String
=
context
.
getApplicationContext
().
getPackageName
()
val
uid
:
Int
=
appInfo
.
uid
var
appOpsClass
:
Class
<*>?
=
null
/* Context.APP_OPS_MANAGER */
try
{
appOpsClass
=
Class
.
forName
(
AppOpsManager
::
class
.
java
.
getName
())
val
checkOpNoThrowMethod
:
Method
=
appOpsClass
.
getMethod
(
CHECK_OP_NO_THROW
,
Integer
.
TYPE
,
Integer
.
TYPE
,
String
::
class
.
java
)
val
opPostNotificationValue
:
Field
=
appOpsClass
.
getDeclaredField
(
OP_POST_NOTIFICATION
)
val
value
=
opPostNotificationValue
.
get
(
Int
::
class
.
java
)
as
Int
return
checkOpNoThrowMethod
.
invoke
(
mAppOps
,
value
,
uid
,
pkg
)
as
Int
==
AppOpsManager
.
MODE_ALLOWED
}
catch
(
e
:
ClassNotFoundException
)
{
e
.
printStackTrace
()
}
catch
(
e
:
NoSuchMethodException
)
{
e
.
printStackTrace
()
}
catch
(
e
:
NoSuchFieldException
)
{
e
.
printStackTrace
()
}
catch
(
e
:
InvocationTargetException
)
{
e
.
printStackTrace
()
}
catch
(
e
:
IllegalAccessException
)
{
e
.
printStackTrace
()
}
return
false
}
fun
getAppDetailSettingIntent
(
context
:
Context
)
{
val
localIntent
=
Intent
()
localIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
if
(
Build
.
VERSION
.
SDK_INT
>=
9
)
{
localIntent
.
action
=
"android.settings.APPLICATION_DETAILS_SETTINGS"
localIntent
.
data
=
Uri
.
fromParts
(
"package"
,
context
.
packageName
,
null
)
}
else
if
(
Build
.
VERSION
.
SDK_INT
<=
8
)
{
localIntent
.
action
=
Intent
.
ACTION_VIEW
localIntent
.
setClassName
(
"com.android.settings"
,
"com.android.settings.InstalledAppDetails"
)
localIntent
.
putExtra
(
"com.android.settings.ApplicationPkgName"
,
context
.
packageName
)
}
context
.
startActivity
(
localIntent
)
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/medical/archives/MedicalAddNewArchivesActivity.kt
View file @
eae736e4
...
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
...
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.R
import
com.yidianling.im.R
import
com.yidianling.uikit.custom.http.ServiceImpl
import
com.yidianling.uikit.custom.http.ServiceImpl
...
@@ -34,7 +35,7 @@ class MedicalAddNewArchivesActivity : BaseActivity() {
...
@@ -34,7 +35,7 @@ class MedicalAddNewArchivesActivity : BaseActivity() {
}
}
override
fun
initDataAndEvent
()
{
override
fun
initDataAndEvent
()
{
initStatus
()
group_merried
.
setOnCheckedChangeListener
{
group
,
checkedId
->
group_merried
.
setOnCheckedChangeListener
{
group
,
checkedId
->
//婚姻状态
//婚姻状态
when
(
checkedId
)
{
when
(
checkedId
)
{
...
@@ -100,6 +101,8 @@ class MedicalAddNewArchivesActivity : BaseActivity() {
...
@@ -100,6 +101,8 @@ class MedicalAddNewArchivesActivity : BaseActivity() {
checkInfo
()
checkInfo
()
}
}
iv_back
.
setOnClickListener
{
finish
()
}
}
}
...
@@ -137,6 +140,7 @@ class MedicalAddNewArchivesActivity : BaseActivity() {
...
@@ -137,6 +140,7 @@ class MedicalAddNewArchivesActivity : BaseActivity() {
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
.
subscribe
({
if
(
"200"
==
it
.
code
)
{
if
(
"200"
==
it
.
code
)
{
finish
()
ToastUtil
.
toastShort
(
"保存成功"
)
ToastUtil
.
toastShort
(
"保存成功"
)
}
else
{
}
else
{
ToastUtil
.
toastShort
(
it
.
msg
)
ToastUtil
.
toastShort
(
it
.
msg
)
...
@@ -149,4 +153,8 @@ class MedicalAddNewArchivesActivity : BaseActivity() {
...
@@ -149,4 +153,8 @@ class MedicalAddNewArchivesActivity : BaseActivity() {
}
}
private
fun
initStatus
()
{
StatusBarUtils
.
setTransparentForImageView
(
this
@MedicalAddNewArchivesActivity
,
null
)
StatusBarUtils
.
statusBarLightMode
(
this
@MedicalAddNewArchivesActivity
)
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/medical/archives/MedicalArchivesListActivity.kt
View file @
eae736e4
...
@@ -10,7 +10,9 @@ import androidx.recyclerview.widget.LinearLayoutManager
...
@@ -10,7 +10,9 @@ import androidx.recyclerview.widget.LinearLayoutManager
import
androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import
androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.yidianling.im.R
import
com.yidianling.im.R
import
com.yidianling.im.bean.SetCourseStatus
import
com.yidianling.medical.archives.adapter.MedicalUserArchivesAdapter
import
com.yidianling.medical.archives.adapter.MedicalUserArchivesAdapter
import
com.yidianling.medical.widgets.LoadMoreView
import
com.yidianling.medical.widgets.LoadMoreView
import
com.yidianling.uikit.custom.http.ServiceImpl.Companion.instance
import
com.yidianling.uikit.custom.http.ServiceImpl.Companion.instance
...
@@ -29,6 +31,7 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
...
@@ -29,6 +31,7 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
private
val
pageSize
:
Int
=
20
private
val
pageSize
:
Int
=
20
private
lateinit
var
mEmptyView
:
View
private
lateinit
var
mEmptyView
:
View
private
lateinit
var
mAdapter
:
MedicalUserArchivesAdapter
private
lateinit
var
mAdapter
:
MedicalUserArchivesAdapter
private
var
isFirstLoadData
=
true
@JvmStatic
@JvmStatic
fun
start
(
context
:
Context
)
{
fun
start
(
context
:
Context
)
{
...
@@ -42,6 +45,7 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
...
@@ -42,6 +45,7 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
}
}
override
fun
initDataAndEvent
()
{
override
fun
initDataAndEvent
()
{
initStatus
()
mEmptyView
=
mEmptyView
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
medical_list_empty_view
,
null
,
false
)
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
medical_list_empty_view
,
null
,
false
)
var
reLoad
=
mEmptyView
.
findViewById
<
View
>(
R
.
id
.
reLoad
)
var
reLoad
=
mEmptyView
.
findViewById
<
View
>(
R
.
id
.
reLoad
)
...
@@ -64,7 +68,13 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
...
@@ -64,7 +68,13 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
doctor_swipe_refresh_layout
?.
setProgressViewOffset
(
false
,
0
,
200
)
doctor_swipe_refresh_layout
?.
setProgressViewOffset
(
false
,
0
,
200
)
mAdapter
.
setOnItemClickListener
{
baseQuickAdapter
,
view
,
position
->
mAdapter
.
setOnItemClickListener
{
baseQuickAdapter
,
view
,
position
->
isFirstLoadData
=
false
mAdapter
.
data
[
position
]
?.
let
{
MedicalEditArchivesActivity
.
start
(
this
@MedicalArchivesListActivity
,
it
)
}
}
}
add_archives
.
setOnClickListener
{
add_archives
.
setOnClickListener
{
...
@@ -79,9 +89,15 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
...
@@ -79,9 +89,15 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
getPageList
()
getPageList
()
}
}
override
fun
onResume
()
{
super
.
onResume
()
if
(!
isFirstLoadData
)
{
getPageList
()
}
}
@SuppressLint
(
"CheckResult"
)
@SuppressLint
(
"CheckResult"
)
private
fun
getPageList
()
{
private
fun
getPageList
()
{
//获取来源的专家
instance
.
getPageList
(
currPage
,
pageSize
)
instance
.
getPageList
(
currPage
,
pageSize
)
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
...
@@ -129,7 +145,7 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
...
@@ -129,7 +145,7 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
}
}
}
}
}
}
}
else
{
}
else
{
doctor_swipe_refresh_layout
.
isRefreshing
=
false
doctor_swipe_refresh_layout
.
isRefreshing
=
false
mAdapter
.
loadMoreFail
()
mAdapter
.
loadMoreFail
()
mAdapter
.
emptyView
=
mEmptyView
mAdapter
.
emptyView
=
mEmptyView
...
@@ -143,12 +159,18 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
...
@@ -143,12 +159,18 @@ class MedicalArchivesListActivity : BaseActivity(), SwipeRefreshLayout.OnRefresh
}
}
override
fun
onRefresh
()
{
override
fun
onRefresh
()
{
currPage
=
1
getPageList
()
}
}
override
fun
onLoadMoreRequested
()
{
override
fun
onLoadMoreRequested
()
{
getPageList
()
}
private
fun
initStatus
()
{
StatusBarUtils
.
setTransparentForImageView
(
this
@MedicalArchivesListActivity
,
null
)
StatusBarUtils
.
statusBarLightMode
(
this
@MedicalArchivesListActivity
)
}
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/medical/archives/MedicalEditArchivesActivity.kt
0 → 100644
View file @
eae736e4
package
com.yidianling.medical.archives
import
android.annotation.SuppressLint
import
android.content.Context
import
android.content.Intent
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.view.dialog.NormalDialog
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.R
import
com.yidianling.medical.archives.bean.MedicalArchivesListBean
import
com.yidianling.uikit.custom.http.ServiceImpl
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.main.medical_edit_archives_activity.*
/**
*编辑问诊人
* */
class
MedicalEditArchivesActivity
:
BaseActivity
()
{
companion
object
{
private
lateinit
var
archivesBeanExtra
:
MedicalArchivesListBean
@JvmStatic
fun
start
(
context
:
Context
,
archivesBean
:
MedicalArchivesListBean
)
{
val
starter
=
Intent
(
context
,
MedicalEditArchivesActivity
::
class
.
java
)
.
putExtra
(
"archivesBean"
,
archivesBean
)
context
.
startActivity
(
starter
)
}
}
override
fun
layoutResId
():
Int
{
return
R
.
layout
.
medical_edit_archives_activity
}
override
fun
initDataAndEvent
()
{
initStatus
()
archivesBeanExtra
=
intent
.
getSerializableExtra
(
"archivesBean"
)
as
MedicalArchivesListBean
iv_back
.
setOnClickListener
{
finish
()
}
tv_save
.
setOnClickListener
{
finish
()
}
tv_delete
.
setOnClickListener
{
val
builder
=
NormalDialog
.
Builder
(
this
@MedicalEditArchivesActivity
,
"center"
,
true
)
builder
.
setTitle
(
""
)
builder
.
setMessage
(
"\n是否删除该条问诊人信息\n"
)
builder
.
setPositiveButton
(
"是"
)
{
dialog
,
which
->
//删除
toDelete
()
dialog
.
dismiss
()
}.
setNegativeButton
(
"否"
)
{
dialog
,
which
->
dialog
.
dismiss
()
}
builder
.
setRight_color
(
"#3464EC"
)
builder
.
setLeft_color
(
"#8595A9"
)
builder
.
setContent_color
(
"#10233A"
)
builder
.
create
().
show
()
}
name
.
text
=
archivesBeanExtra
.
name
idcard
.
text
=
archivesBeanExtra
.
idcardNo
merried
.
text
=
archivesBeanExtra
.
merriedName
relation
.
text
=
archivesBeanExtra
.
relationName
}
@SuppressLint
(
"CheckResult"
)
private
fun
toDelete
()
{
ServiceImpl
.
instance
.
deleteArchives
(
archivesBeanExtra
.
patientId
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
response
->
if
(
"200"
==
response
.
code
)
{
finish
()
ToastUtil
.
toastShort
(
"成功"
)
}
else
{
ToastUtil
.
toastShort
(
response
.
msg
)
}
},
{
e
->
e
.
printStackTrace
()
})
}
private
fun
initStatus
()
{
StatusBarUtils
.
setTransparentForImageView
(
this
@MedicalEditArchivesActivity
,
null
)
StatusBarUtils
.
statusBarLightMode
(
this
@MedicalEditArchivesActivity
)
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/medical/archives/adapter/MedicalUserArchivesAdapter.kt
View file @
eae736e4
...
@@ -4,14 +4,18 @@ import com.chad.library.adapter.base.BaseQuickAdapter
...
@@ -4,14 +4,18 @@ import com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.BaseViewHolder
import
com.chad.library.adapter.base.BaseViewHolder
import
com.yidianling.im.R
import
com.yidianling.im.R
import
com.yidianling.medical.archives.bean.MedicalArchivesListBean
import
com.yidianling.medical.archives.bean.MedicalArchivesListBean
import
com.yidianling.medical.archives.bean.MedicalUserArchivesBean
class
MedicalUserArchivesAdapter
:
BaseQuickAdapter
<
MedicalArchivesListBean
?,
BaseViewHolder
>(
R
.
layout
.
medical_item_archives_list
){
/**
* 问诊人列表adapter
* */
class
MedicalUserArchivesAdapter
:
BaseQuickAdapter
<
MedicalArchivesListBean
?,
BaseViewHolder
>(
R
.
layout
.
medical_item_archives_list
)
{
override
fun
convert
(
helper
:
BaseViewHolder
,
item
:
MedicalArchivesListBean
?)
{
override
fun
convert
(
helper
:
BaseViewHolder
,
item
:
MedicalArchivesListBean
?)
{
helper
.
setText
(
R
.
id
.
name
,
item
?.
name
)
helper
.
setText
(
R
.
id
.
name
,
item
?.
name
)
helper
.
setText
(
R
.
id
.
sex
,
item
?.
genderName
)
helper
.
setText
(
R
.
id
.
sex
,
item
?.
genderName
)
helper
.
setText
(
R
.
id
.
age
,
item
?.
birthday
)
helper
.
setText
(
R
.
id
.
age
,
"${item?.age}岁"
)
helper
.
setText
(
R
.
id
.
id_card
,
item
?.
idcardNo
)
helper
.
setText
(
R
.
id
.
id_card
,
item
?.
idcardNo
)
...
...
m-im/src/main/java/com/yidianling/medical/archives/adapter/MedicalUserArchivesFlow2Adapter.kt
0 → 100644
View file @
eae736e4
package
com.yidianling.medical.archives.adapter
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.BaseViewHolder
import
com.yidianling.im.R
import
com.yidianling.medical.archives.bean.MedicalArchivesListBean
/**
* 图文问诊 患者adapter
* */
class
MedicalUserArchivesFlow2Adapter
:
BaseQuickAdapter
<
MedicalArchivesListBean
?,
BaseViewHolder
>(
R
.
layout
.
medical_item_archives_flow2_list
)
{
override
fun
convert
(
helper
:
BaseViewHolder
,
item
:
MedicalArchivesListBean
?)
{
if
(
item
?.
isAdd
==
true
)
{
helper
.
setBackgroundRes
(
R
.
id
.
bg
,
R
.
drawable
.
medical_bg_edit_f2f5f8
)
helper
.
setGone
(
R
.
id
.
group_item
,
false
)
helper
.
setGone
(
R
.
id
.
iv_bottom_check
,
false
)
helper
.
setGone
(
R
.
id
.
group_add
,
true
)
}
else
{
helper
.
setGone
(
R
.
id
.
group_add
,
false
)
helper
.
setGone
(
R
.
id
.
group_item
,
true
)
if
(
item
?.
isCheck
==
true
)
{
helper
.
setBackgroundRes
(
R
.
id
.
bg
,
R
.
drawable
.
medical_list_check_bg
)
helper
.
setGone
(
R
.
id
.
iv_bottom_check
,
true
)
}
else
{
helper
.
setBackgroundRes
(
R
.
id
.
bg
,
R
.
drawable
.
medical_bg_edit_f2f5f8
)
helper
.
setGone
(
R
.
id
.
iv_bottom_check
,
false
)
}
helper
.
setText
(
R
.
id
.
name
,
item
?.
name
)
helper
.
setText
(
R
.
id
.
sex
,
item
?.
genderName
)
helper
.
setText
(
R
.
id
.
age
,
"${item?.age}岁"
)
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/medical/archives/bean/CreateImageInquiryDtoBody.kt
0 → 100644
View file @
eae736e4
package
com.yidianling.medical.archives.bean
data class
CreateImageInquiryDtoBody
(
var
doctorId
:
String
,
var
firstInquiry
:
Int
,
var
images
:
String
,
var
inquiryType
:
Int
,
var
mainSuitDisease
:
String
,
var
mainSuit
:
String
,
var
patientId
:
Int
=
1
)
m-im/src/main/java/com/yidianling/medical/archives/bean/CreatePatientDtoBody.kt
0 → 100644
View file @
eae736e4
package
com.yidianling.medical.archives.bean
data class
CreatePatientDtoBody
(
var
idcardNo
:
String
,
var
merried
:
Int
,
var
name
:
String
,
var
relation
:
Int
,
var
idcardType
:
Int
=
1
)
m-im/src/main/java/com/yidianling/medical/archives/bean/MedicalArchivesListBean.kt
View file @
eae736e4
package
com.yidianling.medical.archives.bean
package
com.yidianling.medical.archives.bean
import
java.io.Serializable
data class
MedicalArchivesListBean
(
data class
MedicalArchivesListBean
(
val
birthday
:
String
,
var
isAdd
:
Boolean
,
val
createTime
:
String
,
val
birthday
:
String
=
""
,
val
gender
:
Int
,
val
age
:
String
=
""
,
val
genderName
:
String
,
val
createTime
:
String
=
""
,
val
idcardNo
:
String
,
val
gender
:
Int
=
-
1
,
val
idcardType
:
Int
,
val
genderName
:
String
=
""
,
val
isDeleted
:
Boolean
,
val
idcardNo
:
String
=
""
,
val
locationCityId
:
Int
,
val
idcardType
:
Int
=
-
1
,
val
locationCityName
:
String
,
val
isDeleted
:
Boolean
=
false
,
val
merried
:
Int
,
val
locationCityId
:
Int
=
-
1
,
val
name
:
String
,
val
locationCityName
:
String
=
""
,
val
patientId
:
Int
,
val
merried
:
Int
=
-
1
,
val
phone
:
String
,
val
merriedName
:
String
=
""
,
val
relation
:
Int
,
val
name
:
String
=
""
,
val
userId
:
Int
val
patientId
:
Int
=
-
1
,
)
val
phone
:
String
=
""
,
\ No newline at end of file
val
relation
:
Int
=
-
1
,
val
relationName
:
String
=
""
,
val
userId
:
Int
=
-
1
,
var
isCheck
:
Boolean
=
false
):
Serializable
\ No newline at end of file
m-im/src/main/java/com/yidianling/medical/archives/bean/PatientIdDtoBody.kt
0 → 100644
View file @
eae736e4
package
com.yidianling.medical.archives.bean
data class
PatientIdDtoBody
(
var
patientId
:
Int
)
m-im/src/main/java/com/yidianling/medical/im/MeidicalChatFragment.kt
0 → 100644
View file @
eae736e4
package
com.yidianling.medical.im
import
android.content.Context
import
android.os.Build
import
android.view.View
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.jcodecraeer.xrecyclerview.CustomFooterViewCallBack
import
com.jcodecraeer.xrecyclerview.XRecyclerView
import
com.ydl.ydlcommon.base.BaseFragment
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.R
import
com.yidianling.im.event.MessageListRefreshEvent
import
com.yidianling.im.helper.MsgReceiveHelper
import
com.yidianling.im.http.ImHttpImpl
import
com.yidianling.im.router.ImIn
import
com.yidianling.im.ui.page.fragment.bean.ChatItemBean
import
com.yidianling.im.ui.page.fragment.bean.ChatModelBean
import
com.yidianling.im.ui.page.fragment.view.ChatFooterItemView
import
com.yidianling.im.ui.page.widget.ChatUnusualView
import
com.yidianling.im.ui.param.ChatParam
import
com.yidianling.medical.NotificationsUtils
import
com.yidianling.medical.im.adapter.MedicalChatAdapter
import
de.greenrobot.event.EventBus
import
kotlinx.android.synthetic.main.medical_im_chat_fragment_layout.*
/**
* 私聊消息列表页面
* Created by xj on 2019/9/20.
*/
@Route
(
path
=
"/im/medicalim"
)
class
MeidicalChatFragment
:
BaseFragment
(),
XRecyclerView
.
LoadingListener
{
private
lateinit
var
mContext
:
Context
private
var
chatAdapter
:
MedicalChatAdapter
?
=
null
private
var
allChatData
:
ChatModelBean
=
ChatModelBean
()
//全部数据
private
var
showData
:
ArrayList
<
ChatItemBean
>
=
ArrayList
()
// 最终展示的数据
private
var
threeWeekItem
:
ChatItemBean
=
ChatItemBean
(
0
,
0
,
""
,
0
,
0
,
""
,
0
,
0
,
0
,
0
,
0
,
""
,
0
,
""
,
""
,
0
,
0
,
0
,
""
,
1
,
""
,
true
)
private
val
mCompare
:
Comparator
<
ChatItemBean
>
=
Comparator
{
o1
,
o2
->
val
res
=
o1
.
timestamp
.
compareTo
(
o2
.
timestamp
)
when
{
res
==
0
->
0
res
>
0
->
-
1
else
->
1
}
}
//当前未读item下标
private
var
curItem
=
0
override
fun
layoutResId
():
Int
{
return
R
.
layout
.
medical_im_chat_fragment_layout
}
override
fun
initDataAndEvent
()
{
mContext
=
requireContext
()
selectModel
()
initListData
()
notifiVisible
()
}
private
fun
notifiVisible
()
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
if
(
NotificationsUtils
.
isNotificationOpen
(
mContext
))
{
top_hide
.
visibility
=
View
.
GONE
}
else
{
top_hide
.
visibility
=
View
.
VISIBLE
top_hide
.
setOnClickListener
{
NotificationsUtils
.
getAppDetailSettingIntent
(
mContext
)
}
close_hide
.
setOnClickListener
{
top_hide
.
visibility
=
View
.
GONE
}
}
}
}
override
fun
initDataAndEventLazy
()
{
}
fun
getChatMessageData
()
{
if
(
ImIn
.
getUserInfo
()
?.
uid
!=
"0"
)
{
var
dis
=
ImHttpImpl
.
getInstance
()
.
getAllChatMessage
(
ChatParam
(
"${ImIn.getUserInfo()?.uid}"
,
"${0}"
))
.
compose
(
RxUtils
.
applySchedulers
(
this
))
.
compose
<
ChatModelBean
>(
RxUtils
.
resultJavaData
())
.
subscribe
({
it
->
if
(
it
.
before
.
data
.
size
!=
0
||
it
.
nomal
.
data
.
size
!=
0
)
{
setData
(
it
)
}
chat_recyclerview
?.
let
{
chat_recyclerview
.
refreshComplete
()
}
},
{
t
->
ToastUtil
.
toastShort
(
"您的网络出现了问题"
)
chat_recyclerview
?.
let
{
chat_recyclerview
.
refreshComplete
()
}
})
}
}
fun
nextUnReadItem
()
{
if
(
showData
==
null
)
return
for
(
i
in
curItem
+
1
until
showData
.
size
)
{
var
num
=
0
try
{
num
=
Integer
.
parseInt
(
showData
[
i
].
unReadNum
.
toString
())
}
catch
(
e
:
NumberFormatException
)
{
e
.
printStackTrace
()
}
if
(
num
>
0
||
MsgReceiveHelper
.
getUnNum
(
showData
[
i
].
toUid
.
toString
())
>
0
)
{
if
(
chat_recyclerview
!=
null
)
{
chat_recyclerview
.
smoothScrollToPosition
(
i
)
}
curItem
=
i
break
}
if
(
i
==
showData
.
size
-
1
)
{
curItem
=
0
if
(
chat_recyclerview
!=
null
)
{
chat_recyclerview
.
smoothScrollToPosition
(
0
)
}
}
}
}
override
fun
onLoadMore
()
{
chat_recyclerview
.
setNoMore
(
true
)
}
override
fun
onRefresh
()
{
EventBus
.
getDefault
().
post
(
MessageListRefreshEvent
(
0
))
getChatMessageData
()
}
/**
* 设置全部数据
*/
fun
setData
(
data
:
ChatModelBean
)
{
allChatData
=
data
setShowData
()
}
/**
* 设置最终显示得数据,(优先置顶,再最近数据,再三周前的消息item,再三周前,其余按照时间排序)
*/
private
fun
setShowData
()
{
showData
.
clear
()
chatAdapter
?.
notifyDataSetChanged
()
selectTopData
()
// 全部
showData
.
addAll
(
allChatData
.
topData
.
data
.
sortedWith
(
mCompare
))
showData
.
addAll
(
allChatData
.
nomal
.
data
.
filter
{
it
.
is_top
==
0
}
.
sortedWith
(
mCompare
))
if
(
allChatData
.
before
.
data
.
any
{
it
.
is_top
==
0
})
{
showData
.
add
(
threeWeekItem
)
showData
.
addAll
(
allChatData
.
before
.
data
.
filter
{
it
.
is_top
==
0
}
.
sortedWith
(
mCompare
))
}
// 重置消息未读数
MsgReceiveHelper
.
reQueryUnreadNumber
{
showData
.
forEachIndexed
{
index
,
_
->
showData
[
index
].
unReadNum
=
MsgReceiveHelper
.
getUnNum
(
showData
[
index
].
toUid
.
toString
())
}
chatAdapter
?.
notifyDataSetChanged
()
resetPageShow
()
}
}
/**
* 将before数据和nomal数据里面的置顶数据筛选出来放入topData里面
*/
private
fun
selectTopData
()
{
allChatData
.
topData
.
data
.
clear
()
allChatData
.
topData
.
data
.
addAll
(
allChatData
.
before
.
data
.
filter
{
it
.
is_top
==
1
})
allChatData
.
topData
.
data
.
addAll
(
allChatData
.
nomal
.
data
.
filter
{
it
.
is_top
==
1
})
}
private
fun
initListData
()
{
chatAdapter
=
MedicalChatAdapter
(
mContext
,
showData
,
this
)
chatAdapter
?.
setlistener
(
object
:
MedicalChatAdapter
.
ChatRecyclerViewCallback
{
override
fun
onRefresh
()
{
getChatMessageData
()
}
})
chat_recyclerview
.
layoutManager
=
LinearLayoutManager
(
context
)
chat_recyclerview
.
adapter
=
chatAdapter
chat_recyclerview
.
setLoadingListener
(
this
)
chat_recyclerview
.
setFootView
(
ChatFooterItemView
(
mContext
),
object
:
CustomFooterViewCallBack
{
override
fun
onSetNoMore
(
p0
:
View
?,
p1
:
Boolean
)
{
}
override
fun
onLoadingMore
(
p0
:
View
?)
{
}
override
fun
onLoadMoreComplete
(
p0
:
View
?)
{
}
})
}
override
fun
onResume
()
{
super
.
onResume
()
resetPageShow
()
}
override
fun
setUserVisibleHint
(
isVisibleToUser
:
Boolean
)
{
super
.
setUserVisibleHint
(
isVisibleToUser
)
if
(
isVisibleToUser
&&
getIsViewCreated
())
{
notifiVisible
()
resetPageShow
()
}
}
fun
clearData
()
{
showData
.
clear
()
chatAdapter
?.
notifyDataSetChanged
()
resetPageShow
()
}
/**
* 页面展示状态逻辑
*/
private
fun
resetPageShow
()
{
ll_chat_unusual_view
?.
let
{
if
(
ImIn
.
isLogin
())
{
//登录状态
if
(
showData
.
size
!=
0
)
{
//数据不为空
chat_recyclerview
.
visibility
=
View
.
VISIBLE
ll_chat_unusual_view
.
visibility
=
View
.
GONE
}
else
{
chat_recyclerview
.
visibility
=
View
.
GONE
ll_chat_unusual_view
.
visibility
=
View
.
VISIBLE
ll_chat_unusual_view
.
setUnusualType
(
ChatUnusualView
.
TYPE_CHAT_ALL_NO_DATA
)
ll_chat_unusual_view
.
setListener
(
object
:
ChatUnusualView
.
ChatUnusualListener
{
override
fun
onButtonClick
()
{
startActivity
(
ImIn
.
getConsultService
()
.
expertSearchIntent
(
activity
!!
,
"0"
,
0
,
false
)
)
}
})
}
}
else
{
//未登录状态
chat_recyclerview
.
visibility
=
View
.
GONE
ll_chat_unusual_view
.
visibility
=
View
.
VISIBLE
ll_chat_unusual_view
.
setUnusualType
(
ChatUnusualView
.
TYPE_UNLOGIN
)
ll_chat_unusual_view
.
setListener
(
object
:
ChatUnusualView
.
ChatUnusualListener
{
override
fun
onButtonClick
()
{
ImIn
.
loginByOneKeyLogin
(
mContext
,
true
)
}
})
}
}
}
/**
* 选择私聊列表展示模式
*/
private
fun
selectModel
()
{
setShowData
()
resetPageShow
()
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/medical/im/adapter/MedicalChatAdapter.kt
0 → 100644
View file @
eae736e4
package
com.yidianling.medical.im.adapter
import
android.app.Dialog
import
android.content.Context
import
android.text.TextUtils
import
android.view.View
import
android.view.ViewGroup
import
androidx.appcompat.app.AppCompatActivity
import
androidx.recyclerview.widget.RecyclerView
import
com.netease.nimlib.sdk.NIMClient
import
com.netease.nimlib.sdk.msg.MsgService
import
com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import
com.ydl.ydlcommon.base.lifecycle.ILifecycleable
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.ydl.ydlcommon.view.ListNoCancelDialog
import
com.yidianling.im.api.param.RmHistoryParam
import
com.yidianling.im.api.param.RmTalkParam
import
com.yidianling.im.api.param.TopMessageParam
import
com.yidianling.im.bridge.P2PCustomActionHandlerImpl
import
com.yidianling.im.event.UpdateTabUnreadNumEvent
import
com.yidianling.im.helper.IMChatUtil
import
com.yidianling.im.helper.MsgReceiveHelper
import
com.yidianling.im.http.ImHttpImpl
import
com.yidianling.im.session.SessionHelper
import
com.yidianling.im.ui.page.fragment.bean.ChatItemBean
import
com.yidianling.im.ui.page.fragment.view.ChatTimeItemView
import
com.yidianling.medical.im.view.MedicalChatItemView
import
de.greenrobot.event.EventBus
/**
* 互动列表适配器
* Created by xj on 2019/10/14.
*/
class
MedicalChatAdapter
(
var
context
:
Context
,
private
var
mList
:
ArrayList
<
ChatItemBean
>,
private
var
lifecycleable
:
ILifecycleable
<*>
)
:
RecyclerView
.
Adapter
<
RecyclerView
.
ViewHolder
>()
{
companion
object
{
const
val
TYPE_NORMAL_ITEM
=
1001
// 正常item
const
val
TYPE_TIME_ITEM
=
1002
// 三周前item
}
fun
setData
(
data
:
ArrayList
<
ChatItemBean
>)
{
mList
.
clear
()
mList
.
addAll
(
data
)
notifyDataSetChanged
()
}
override
fun
getItemViewType
(
position
:
Int
):
Int
{
if
(
position
<
mList
.
size
&&
!
mList
[
position
].
isThreeItem
)
return
TYPE_NORMAL_ITEM
return
TYPE_TIME_ITEM
}
override
fun
onBindViewHolder
(
holder
:
RecyclerView
.
ViewHolder
,
position
:
Int
)
{
when
(
holder
)
{
is
ChatItemHolder
->
{
holder
.
view
.
initData
(
mList
[
position
])
holder
.
view
.
setOnClickListener
{
//点击去私聊
if
(
TextUtils
.
equals
(
mList
[
position
].
toUid
.
toString
(),
"4108805"
))
{
SessionHelper
.
startP2PSession
(
context
,
-
1
,
"4108805"
,
null
,
P2PCustomActionHandlerImpl
(
"4108805"
,
"课程小助手-壹壹"
,
"4108805"
)
)
}
else
{
IMChatUtil
.
startChat
(
context
as
AppCompatActivity
,
mList
[
position
])
// IMChatUtil.startCms(context as AppCompatActivity, 18, "main_xinliyisheng")
}
}
holder
.
view
.
setOnLongClickListener
{
var
nowBean
=
mList
[
position
]
val
name
=
java
.
util
.
ArrayList
<
String
>()
name
.
add
(
"删除"
)
if
(
nowBean
.
is_top
==
1
)
{
name
.
add
(
"取消置顶"
)
}
else
if
(
nowBean
.
is_top
==
0
)
{
name
.
add
(
"置顶该聊天"
)
}
val
unread
=
MsgReceiveHelper
.
getUnNum
(
nowBean
.
toUid
.
toString
())
//获取未读消息数量
if
(
unread
>
0
)
{
name
.
add
(
"标记为已读"
)
}
val
builder
=
ListNoCancelDialog
.
Builder
(
context
,
name
,
0
)
builder
.
SetOnItemClickLister
(
object
:
ListNoCancelDialog
.
Builder
.
OnItemClickLister
{
override
fun
onItemClick
(
dialog
:
Dialog
,
view
:
View
,
position1
:
Int
)
{
val
tag
=
name
[
position1
]
when
(
tag
)
{
"删除"
->
{
delete
(
nowBean
)
dialog
.
dismiss
()
}
"置顶该聊天"
->
{
toTop
(
nowBean
,
1
)
dialog
.
dismiss
()
}
"取消置顶"
->
{
toTop
(
nowBean
,
0
)
dialog
.
dismiss
()
}
"标记为已读"
->
{
mark
(
nowBean
)
dialog
.
dismiss
()
}
}
}
override
fun
onItemLongClick
(
dialog
:
Dialog
,
view
:
View
,
position1
:
Int
)
{
}
})
builder
.
create
().
show
()
true
}
}
is
ChatTimeItemHolder
->
{
holder
.
view
.
initData
(
mList
[
position
])
}
else
->
{
}
}
}
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
{
return
when
(
viewType
)
{
TYPE_NORMAL_ITEM
->
{
ChatItemHolder
(
MedicalChatItemView
(
context
))
}
else
->
{
ChatTimeItemHolder
(
ChatTimeItemView
(
context
))
}
}
}
override
fun
getItemCount
():
Int
{
return
mList
.
size
}
private
fun
delete
(
bean
:
ChatItemBean
)
{
LogHelper
.
getInstance
().
writeLogSync
(
"删除聊天:uid = "
+
bean
.
toUid
)
var
dis
=
ImHttpImpl
.
getInstance
().
rmHistory
(
RmHistoryParam
(
bean
.
toUid
.
toString
(),
1
)
)
.
compose
(
RxUtils
.
applySchedulers
(
lifecycleable
))
.
compose
(
RxUtils
.
resultData
())
.
subscribe
({
o
->
LogHelper
.
getInstance
().
writeLogSync
(
"删除聊天成功:uid = "
+
bean
.
toUid
)
NIMClient
.
getService
(
MsgService
::
class
.
java
)
.
clearChattingHistory
(
bean
.
toUid
.
toString
(),
SessionTypeEnum
.
P2P
)
deleteItem
(
bean
)
},
{
t
->
ToastHelper
.
show
(
t
.
message
.
toString
())
LogHelper
.
getInstance
().
writeLogSync
(
"删除聊天失败:uid = "
+
bean
.
toUid
)
})
}
private
fun
deleteItem
(
bean
:
ChatItemBean
)
{
var
dis
=
ImHttpImpl
.
getInstance
().
rmTalk
(
RmTalkParam
(
bean
.
toUid
.
toString
()))
.
compose
(
RxUtils
.
applySchedulers
(
lifecycleable
))
.
compose
(
RxUtils
.
resultData
())
.
subscribe
({
o
->
NIMClient
.
getService
(
MsgService
::
class
.
java
)
.
clearUnreadCount
(
bean
.
toUid
.
toString
(),
SessionTypeEnum
.
P2P
)
NIMClient
.
getService
(
MsgService
::
class
.
java
)
.
clearUnreadCount
(
bean
.
toUid
.
toString
(),
SessionTypeEnum
.
Team
)
MsgReceiveHelper
.
updateNum
(
bean
.
toUid
.
toString
(),
0
)
EventBus
.
getDefault
().
post
(
UpdateTabUnreadNumEvent
())
},
{
t
->
ToastHelper
.
show
(
t
.
message
.
toString
())
})
}
private
fun
toTop
(
bean
:
ChatItemBean
,
istop
:
Int
)
{
LogHelper
.
getInstance
().
writeLogSync
(
"置顶聊天:uid = "
+
bean
.
toUid
.
toString
()
+
"取消置顶 = "
+
(
istop
==
0
)
)
var
dis
=
ImHttpImpl
.
getInstance
().
topMessage
(
TopMessageParam
(
bean
.
toUid
.
toString
(),
1
,
istop
)
)
.
compose
(
RxUtils
.
applySchedulers
(
lifecycleable
))
.
compose
(
RxUtils
.
resultData
())
.
subscribe
({
o
->
LogHelper
.
getInstance
().
writeLogSync
(
"置顶聊天成功:uid = "
+
bean
.
toUid
.
toString
()
+
"取消置顶 = "
+
(
istop
==
0
)
)
mListener
?.
onRefresh
()
},
{
t
->
LogHelper
.
getInstance
().
writeLogSync
(
"置顶聊天失败:uid = "
+
bean
.
toUid
.
toString
()
+
"取消置顶 = "
+
(
istop
==
0
)
)
ToastHelper
.
show
(
"操作失败"
)
})
}
private
fun
mark
(
bean
:
ChatItemBean
)
{
LogHelper
.
getInstance
().
writeLogSync
(
"标记为已读:uid = "
+
bean
.
toUid
.
toString
())
NIMClient
.
getService
(
MsgService
::
class
.
java
)
.
clearUnreadCount
(
bean
.
toUid
.
toString
(),
SessionTypeEnum
.
P2P
)
MsgReceiveHelper
.
updateNum
(
bean
.
toUid
.
toString
(),
0
)
mListener
?.
onRefresh
()
EventBus
.
getDefault
().
post
(
UpdateTabUnreadNumEvent
())
}
private
var
mListener
:
ChatRecyclerViewCallback
?
=
null
fun
setlistener
(
listener
:
ChatRecyclerViewCallback
)
{
this
.
mListener
=
listener
}
interface
ChatRecyclerViewCallback
{
fun
onRefresh
()
//刷新聊天列表
}
/**
* 互动列表正常item的holder
*/
inner
class
ChatItemHolder
(
val
view
:
MedicalChatItemView
)
:
RecyclerView
.
ViewHolder
(
view
)
/**
* 互动列表正常item的holder
*/
inner
class
ChatTimeItemHolder
(
val
view
:
ChatTimeItemView
)
:
RecyclerView
.
ViewHolder
(
view
)
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/medical/im/view/MedicalChatItemView.kt
0 → 100644
View file @
eae736e4
package
com.yidianling.medical.im.view
import
android.content.Context
import
android.text.Html
import
android.view.View
import
android.view.ViewGroup
import
android.widget.LinearLayout
import
android.widget.RelativeLayout
import
com.ydl.ydl_image.module.GlideApp
import
com.yidianling.im.R
import
com.yidianling.im.helper.MsgReceiveHelper
import
com.yidianling.im.preference.ImTempData
import
com.yidianling.im.ui.page.fragment.bean.ChatItemBean
import
kotlinx.android.synthetic.main.im_chat_item_view.view.*
/**
* 互动列表普通itemView
*/
class
MedicalChatItemView
(
mContext
:
Context
)
:
LinearLayout
(
mContext
)
{
init
{
val
params
=
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LinearLayout
.
LayoutParams
.
WRAP_CONTENT
)
layoutParams
=
params
View
.
inflate
(
mContext
,
R
.
layout
.
medical_im_chat_item_view
,
this
)
}
fun
initData
(
bean
:
ChatItemBean
?)
{
bean
?.
let
{
GlideApp
.
with
(
context
)
.
load
(
bean
.
head
)
.
circleCrop
()
.
into
(
chat_message_img
)
chat_message_name
.
text
=
bean
.
toName
if
(
bean
.
doctorTitle
!=
""
)
{
chat_message_tab
.
visibility
=
View
.
VISIBLE
chat_message_tab
.
text
=
bean
.
doctorTitle
}
else
{
chat_message_tab
.
visibility
=
View
.
GONE
}
// 咨询优先显示 再倾诉
when
{
bean
.
orderStatus
==
1
->
{
chat_message_sub_desc
.
visibility
=
View
.
VISIBLE
chat_message_sub_desc
.
text
=
"咨询服务中"
}
bean
.
listenOrderStatus
==
1
->
{
chat_message_sub_desc
.
visibility
=
View
.
VISIBLE
chat_message_sub_desc
.
text
=
"倾诉服务中"
}
bean
.
orderCount
!=
0
->
{
chat_message_sub_desc
.
visibility
=
View
.
VISIBLE
chat_message_sub_desc
.
text
=
"已咨询${bean.orderCount}次"
}
bean
.
listenOrderCount
!=
0
->
{
chat_message_sub_desc
.
visibility
=
View
.
VISIBLE
chat_message_sub_desc
.
text
=
"已倾诉${bean.listenOrderCount}次"
}
else
->
chat_message_sub_desc
.
visibility
=
View
.
GONE
}
chat_message_time
.
text
=
bean
.
timeStr
if
(
ImTempData
.
getInstance
().
getTempMsg
(
bean
.
toUid
.
toString
())
!=
null
&&
ImTempData
.
getInstance
().
getTempMsg
(
bean
.
toUid
.
toString
()
)
!=
""
)
run
{
//if草稿箱有消息则显示
val
th
=
"<font color='#EA0000' charset='utf-8'>[草稿]</font> "
+
ImTempData
.
getInstance
().
getTempMsg
(
bean
.
toUid
.
toString
()
)
chat_message_content
.
setText
(
Html
.
fromHtml
(
th
))
}
else
{
chat_message_content
.
text
=
bean
.
content
}
if
(
bean
.
unReadNum
>
99
)
{
chat_message_unread_num
.
visibility
=
View
.
VISIBLE
chat_message_unread_num
.
text
=
"99+"
}
else
if
(
bean
.
unReadNum
>
0
)
{
chat_message_unread_num
.
visibility
=
View
.
VISIBLE
chat_message_unread_num
.
text
=
"${bean.unReadNum}"
}
else
{
chat_message_unread_num
.
visibility
=
View
.
GONE
}
if
(
bean
.
is_top
==
1
)
{
chat_global_ll
.
setBackgroundResource
(
R
.
drawable
.
im_chat_is_top_bg
)
}
else
{
chat_global_ll
.
setBackgroundResource
(
0
)
}
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceApi.kt
View file @
eae736e4
...
@@ -4,6 +4,7 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN
...
@@ -4,6 +4,7 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA_URL
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA_URL
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.yidianling.medical.archives.bean.MedicalArchivesListBean
import
com.yidianling.medical.archives.bean.MedicalUserArchivesBean
import
com.yidianling.medical.archives.bean.MedicalUserArchivesBean
import
com.yidianling.uikit.custom.http.response.*
import
com.yidianling.uikit.custom.http.response.*
import
com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
import
com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
...
@@ -124,17 +125,26 @@ interface ServiceApi {
...
@@ -124,17 +125,26 @@ interface ServiceApi {
@Query
(
"pageSize"
)
pageSize
:
Int
@Query
(
"pageSize"
)
pageSize
:
Int
):
Observable
<
BaseAPIResponse
<
MedicalUserArchivesBean
>>
):
Observable
<
BaseAPIResponse
<
MedicalUserArchivesBean
>>
//医疗 获取问诊人列表
@GET
(
"ydl-yiliao-api/api/client/user/patient/v1/getList"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA_URL
)
fun
getList
():
Observable
<
BaseAPIResponse
<
List
<
MedicalArchivesListBean
>>>
//医疗 创建问诊人
//医疗 创建问诊人
@POST
(
"ydl-yiliao-api/api/client/user/patient/v1/create"
)
@POST
(
"ydl-yiliao-api/api/client/user/patient/v1/create"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA_URL
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA_URL
)
fun
createArchives
(
fun
createArchives
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
@Query
(
"name"
)
name
:
String
,
@Query
(
"idcardNo"
)
idcardNo
:
String
,
//医疗 创建问诊人
@Query
(
"relation"
)
relation
:
Int
,
@POST
(
"ydl-yiliao-api/api/client/inquiry/v1/create"
)
@Query
(
"merried"
)
merried
:
Int
,
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA_URL
)
@Query
(
"idcardType"
)
idcardType
:
Int
=
1
fun
createArchivesOrder
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
):
Observable
<
BaseAPIResponse
<
Any
>>
//医疗 删除问诊人
@POST
(
"ydl-yiliao-api/api/client/user/patient/v1/delete"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA_URL
)
fun
deleteArchives
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
View file @
eae736e4
...
@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON
...
@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlnet.YDLHttpUtils
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.im.http.ImRetrofitApi
import
com.yidianling.im.http.ImRetrofitApi
import
com.yidianling.medical.archives.bean.
MedicalUserArchivesBean
import
com.yidianling.medical.archives.bean.
*
import
com.yidianling.uikit.custom.http.response.*
import
com.yidianling.uikit.custom.http.response.*
import
com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
import
com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
import
io.reactivex.Observable
import
io.reactivex.Observable
...
@@ -189,13 +189,83 @@ class ServiceImpl private constructor() {
...
@@ -189,13 +189,83 @@ class ServiceImpl private constructor() {
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
getPageList
(
pageNum
,
pageSize
)
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
getPageList
(
pageNum
,
pageSize
)
}
}
/***获取问诊人列表*/
fun
getList
():
Observable
<
BaseAPIResponse
<
List
<
MedicalArchivesListBean
>>>
{
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
getList
()
}
/***
* 创建问诊人
* @param name 名字
* @param idcardNo 身份证号
* @param relation 与问诊人关系
* @param merried 婚姻状态
* */
fun
createArchives
(
fun
createArchives
(
name
:
String
,
name
:
String
,
idcardNo
:
String
,
idcardNo
:
String
,
relation
:
Int
,
relation
:
Int
,
merried
:
Int
merried
:
Int
):
Observable
<
BaseAPIResponse
<
Any
>>
{
):
Observable
<
BaseAPIResponse
<
Any
>>
{
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
createArchives
(
name
,
idcardNo
,
relation
,
merried
)
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
JSON
.
toJSONString
(
CreatePatientDtoBody
(
idcardNo
,
merried
,
name
,
relation
))
)
as
RequestBody
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
)
.
createArchives
(
body
)
}
/***
* 创建问诊订单
* @param images 图片(检查报告或患处图片,逗号分隔)
* @param isFirst 是否首次问诊(0不是、1是)
* @param mainSuit 主诉,自己描述的病情
* @param mainSuitDisease 主诉疾病(医生诊断的疾病名称)
* @param patientId 患者ID
* */
fun
createArchivesOrder
(
images
:
String
,
isFirst
:
Int
,
mainSuit
:
String
,
mainSuitDisease
:
String
,
patientId
:
Int
,
doctorId
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
{
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
JSON
.
toJSONString
(
CreateImageInquiryDtoBody
(
doctorId
,
isFirst
,
images
,
1
,
mainSuitDisease
,
mainSuit
,
1
)
)
)
as
RequestBody
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
)
.
createArchivesOrder
(
body
)
}
/***
* 删除问诊人
* @param patientId 患者ID
* */
fun
deleteArchives
(
patientId
:
Int
):
Observable
<
BaseAPIResponse
<
Any
>>
{
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
JSON
.
toJSONString
(
PatientIdDtoBody
(
patientId
))
)
as
RequestBody
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
deleteArchives
(
body
)
}
}
}
}
\ No newline at end of file
m-im/src/main/res/drawable/im_chat_message_unread_num_bg.xml
View file @
eae736e4
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
<gradient
<gradient
android:angle=
"270"
android:angle=
"270"
android:startColor=
"#FF
5040
"
android:startColor=
"#FF
7766
"
android:endColor=
"#FF
6E52
"
/>
android:endColor=
"#FF
7766
"
/>
<corners
android:radius=
"9dp"
/>
<corners
android:radius=
"9dp"
/>
...
...
m-im/src/main/res/drawable/medical_bg_3464ec_4dp_fill.xml
0 → 100644
View file @
eae736e4
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#ff3464ec"
/>
<corners
android:radius=
"4dp"
/>
</shape>
\ No newline at end of file
m-im/src/main/res/drawable/medical_bg_c0c9d4_8dp.xml
0 → 100644
View file @
eae736e4
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<stroke
android:width=
"1dp"
android:color=
"#ffc0c9d4"
/>
<corners
android:radius=
"8dp"
/>
</shape>
\ No newline at end of file
m-im/src/main/res/drawable/medical_list_check_bg.xml
0 → 100644
View file @
eae736e4
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<stroke
android:width=
"1dp"
android:color=
"#ff3464ec"
/>
<solid
android:color=
"#f2f5f8"
/>
<corners
android:radius=
"4dp"
/>
</shape>
\ No newline at end of file
m-im/src/main/res/layout/medical_add_new_archives_activity.xml
View file @
eae736e4
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<androidx.appcompat.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id=
"@+id/toolbar"
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
5
6dp"
android:layout_height=
"
9
6dp"
android:background=
"@color/white"
android:background=
"@color/white"
android:elevation=
"0dp"
android:elevation=
"0dp"
android:gravity=
"bottom"
android:gravity=
"bottom"
...
...
m-im/src/main/res/layout/medical_archives_list_activity.xml
View file @
eae736e4
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<androidx.appcompat.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id=
"@+id/toolbar"
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
5
6dp"
android:layout_height=
"
9
6dp"
android:background=
"@color/white"
android:background=
"@color/white"
android:elevation=
"0dp"
android:elevation=
"0dp"
android:gravity=
"bottom"
android:gravity=
"bottom"
...
...
m-im/src/main/res/layout/medical_edit_archives_activity.xml
0 → 100644
View file @
eae736e4
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<androidx.appcompat.widget.Toolbar
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"96dp"
android:background=
"@color/white"
android:elevation=
"0dp"
android:gravity=
"bottom"
app:contentInsetStart=
"0dp"
app:layout_collapseMode=
"pin"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"match_parent"
android:layout_height=
"56dp"
android:ellipsize=
"end"
android:gravity=
"center"
android:maxEms=
"10"
android:maxLines=
"1"
android:text=
"编辑问诊人"
android:textColor=
"@color/medical_color_10233a"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
<ImageView
android:id=
"@+id/iv_back"
android:layout_width=
"wrap_content"
android:layout_height=
"56dp"
android:paddingStart=
"16dp"
android:paddingEnd=
"20dp"
android:src=
"@mipmap/medical_icon_title_back"
/>
</RelativeLayout>
</androidx.appcompat.widget.Toolbar>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/toolbar"
android:background=
"@color/white"
android:paddingStart=
"16dp"
android:paddingEnd=
"16dp"
>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"14dp"
android:text=
"姓名"
android:textColor=
"#ff0c1d31"
android:textSize=
"14sp"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/name"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:textColor=
"@color/medical_color_0c1d31"
android:textSize=
"16sp"
app:layout_constraintTop_toBottomOf=
"@id/tv_name"
tools:text=
"真实姓名"
/>
<View
android:id=
"@+id/line_name"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_marginTop=
"12dp"
android:background=
"@color/medical_color_e7ecf0"
app:layout_constraintTop_toBottomOf=
"@id/name"
/>
<TextView
android:id=
"@+id/tv_idcard"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:text=
"身份证号"
android:textColor=
"#ff0c1d31"
android:textSize=
"14sp"
app:layout_constraintLeft_toLeftOf=
"@id/tv_name"
app:layout_constraintTop_toBottomOf=
"@id/line_name"
/>
<TextView
android:id=
"@+id/idcard"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:textColor=
"@color/medical_color_0c1d31"
android:textSize=
"16sp"
app:layout_constraintTop_toBottomOf=
"@id/tv_idcard"
tools:text=
"身份证号码"
/>
<View
android:id=
"@+id/line_idcard"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_marginTop=
"12dp"
android:background=
"@color/medical_color_e7ecf0"
app:layout_constraintTop_toBottomOf=
"@id/idcard"
/>
<TextView
android:id=
"@+id/tv_merried"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:text=
"婚姻状态"
android:textColor=
"#ff0c1d31"
android:textSize=
"14sp"
app:layout_constraintLeft_toLeftOf=
"@id/tv_name"
app:layout_constraintTop_toBottomOf=
"@id/line_idcard"
/>
<TextView
android:id=
"@+id/merried"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:orientation=
"horizontal"
android:textColor=
"@color/medical_color_0c1d31"
android:textSize=
"16sp"
app:layout_constraintTop_toBottomOf=
"@id/tv_merried"
tools:text=
""
/>
<View
android:id=
"@+id/line_merried"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_marginTop=
"12dp"
android:background=
"@color/medical_color_e7ecf0"
app:layout_constraintTop_toBottomOf=
"@id/merried"
/>
<TextView
android:id=
"@+id/tv_relation"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:text=
"与受访者的关系"
android:textColor=
"#ff0c1d31"
android:textSize=
"14sp"
app:layout_constraintLeft_toLeftOf=
"@id/tv_name"
app:layout_constraintTop_toBottomOf=
"@id/line_merried"
/>
<TextView
android:id=
"@+id/relation"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:orientation=
"horizontal"
android:textColor=
"@color/medical_color_0c1d31"
android:textSize=
"16sp"
app:layout_constraintTop_toBottomOf=
"@id/tv_relation"
tools:text=
""
/>
<View
android:id=
"@+id/line_relation"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_marginTop=
"12dp"
android:background=
"@color/medical_color_e7ecf0"
app:layout_constraintTop_toBottomOf=
"@id/relation"
/>
<TextView
android:id=
"@+id/tv_hint"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"28dp"
android:text=
"温馨提示"
android:textColor=
"@color/medical_color_0c1d31"
android:textSize=
"14sp"
app:layout_constraintLeft_toLeftOf=
"@id/tv_name"
app:layout_constraintTop_toBottomOf=
"@id/line_relation"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"4dp"
android:text=
"就诊人姓名、证件信息用于平台审核,不会外传。"
android:textColor=
"#ff495c72"
android:textSize=
"12sp"
app:layout_constraintLeft_toLeftOf=
"@id/tv_name"
app:layout_constraintTop_toBottomOf=
"@id/tv_hint"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_delete"
android:layout_width=
"0dp"
android:layout_height=
"48dp"
android:layout_marginStart=
"16dp"
android:layout_marginBottom=
"34dp"
android:layout_weight=
"1"
android:background=
"@drawable/medical_bg_c0c9d4_8dp"
android:gravity=
"center"
android:text=
"删除"
android:textColor=
"@color/medical_color_8595a9"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_save"
android:layout_width=
"0dp"
android:layout_height=
"48dp"
android:layout_marginStart=
"24dp"
android:layout_marginEnd=
"16dp"
android:layout_marginBottom=
"34dp"
android:layout_weight=
"1"
android:background=
"@drawable/medical_bg_3464ec_8dp"
android:gravity=
"center"
android:text=
"保存"
android:textColor=
"@color/white"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
m-im/src/main/res/layout/medical_graphic_consultation_flow1.xml
View file @
eae736e4
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<androidx.appcompat.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id=
"@+id/toolbar"
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
5
6dp"
android:layout_height=
"
9
6dp"
android:background=
"@color/white"
android:background=
"@color/white"
android:elevation=
"0dp"
android:elevation=
"0dp"
android:gravity=
"bottom"
android:gravity=
"bottom"
...
@@ -322,8 +322,9 @@
...
@@ -322,8 +322,9 @@
android:layout_height=
"48dp"
android:layout_height=
"48dp"
android:layout_marginTop=
"16dp"
android:layout_marginTop=
"16dp"
android:layout_marginBottom=
"36dp"
android:layout_marginBottom=
"36dp"
android:background=
"@drawable/
bg_doctor_detail_bottom
"
android:background=
"@drawable/
medical_bg_d7dfea_8dp
"
android:gravity=
"center"
android:gravity=
"center"
android:enabled=
"false"
android:text=
"下一步"
android:text=
"下一步"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
android:textSize=
"@dimen/sp_16"
...
...
m-im/src/main/res/layout/medical_graphic_consultation_flow2.xml
View file @
eae736e4
This diff is collapsed.
Click to expand it.
m-im/src/main/res/layout/medical_im_chat_fragment_layout.xml
0 → 100644
View file @
eae736e4
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"96dp"
android:background=
"#ffffff"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<androidx.appcompat.widget.Toolbar
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"96dp"
android:background=
"@color/white"
android:elevation=
"0dp"
android:gravity=
"bottom"
app:contentInsetStart=
"0dp"
app:layout_collapseMode=
"pin"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"match_parent"
android:layout_height=
"56dp"
android:ellipsize=
"end"
android:gravity=
"center"
android:maxEms=
"10"
android:maxLines=
"1"
android:text=
"消息"
android:textColor=
"@color/medical_color_10233a"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"56dp"
android:layout_alignParentRight=
"true"
android:paddingLeft=
"16dp"
android:paddingRight=
"16dp"
android:src=
"@mipmap/medical_icon_more"
/>
</RelativeLayout>
</androidx.appcompat.widget.Toolbar>
</LinearLayout>
<LinearLayout
android:id=
"@+id/top_hide"
android:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"#0d3464EC"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingLeft=
"10dp"
android:paddingTop=
"10dp"
android:paddingRight=
"16dp"
android:paddingBottom=
"10dp"
>
<ImageView
android:id=
"@+id/close_hide"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"6dp"
android:paddingRight=
"6dp"
android:src=
"@mipmap/medical_close_ovel"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"开启推送通知,及时查看消息~"
android:textColor=
"#ff3464ec"
android:textSize=
"14sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/medical_bg_3464ec_4dp_fill"
android:gravity=
"center"
android:paddingLeft=
"12dp"
android:paddingTop=
"5dp"
android:paddingRight=
"12dp"
android:paddingBottom=
"6dp"
android:text=
"立即开启"
android:textColor=
"#ffffffff"
android:textSize=
"12sp"
/>
</LinearLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id=
"@+id/chat_recyclerview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/im_white"
></com.jcodecraeer.xrecyclerview.XRecyclerView>
<com.yidianling.im.ui.page.widget.ChatUnusualView
android:id=
"@+id/ll_chat_unusual_view"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/im_white"
android:visibility=
"gone"
/>
</RelativeLayout>
</LinearLayout>
m-im/src/main/res/layout/medical_im_chat_item_view.xml
0 → 100644
View file @
eae736e4
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/chat_global_ll"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:paddingLeft=
"15dp"
android:paddingTop=
"12dp"
android:paddingRight=
"15dp"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
>
<androidx.cardview.widget.CardView
android:id=
"@+id/card_img"
android:layout_width=
"52dp"
android:layout_height=
"52dp"
android:layout_centerInParent=
"true"
app:cardCornerRadius=
"24dp"
app:cardElevation=
"0dp"
app:layout_constraintRight_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageView
android:id=
"@+id/chat_message_img"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:scaleType=
"centerCrop"
/>
</androidx.cardview.widget.CardView>
<TextView
android:id=
"@+id/chat_message_unread_num"
android:layout_width=
"wrap_content"
android:layout_height=
"18dp"
android:layout_alignParentTop=
"true"
android:layout_alignParentRight=
"true"
android:background=
"@drawable/im_chat_message_unread_num_bg"
android:gravity=
"center"
android:minWidth=
"18dp"
android:paddingLeft=
"5dp"
android:paddingRight=
"5dp"
android:textColor=
"@color/im_white"
android:textSize=
"10sp"
android:visibility=
"gone"
app:layout_constraintRight_toRightOf=
"@id/card_img"
app:layout_constraintTop_toTopOf=
"@id/card_img"
tools:text=
"3"
tools:visibility=
"visible"
/>
<TextView
android:id=
"@+id/chat_message_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"16dp"
android:ellipsize=
"end"
android:maxLines=
"1"
android:textColor=
"@color/medical_color_0c1d31"
android:textSize=
"16sp"
android:textStyle=
"bold"
app:layout_constraintLeft_toRightOf=
"@id/card_img"
app:layout_constraintTop_toTopOf=
"@id/card_img"
tools:text=
"林小丽"
/>
<TextView
android:id=
"@+id/chat_message_tab"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"6dp"
android:layout_marginRight=
"8dp"
android:ellipsize=
"end"
android:maxLines=
"1"
android:textColor=
"@color/medical_color_0c1d31"
android:textSize=
"14sp"
android:visibility=
"gone"
app:layout_constraintBaseline_toBaselineOf=
"@id/chat_message_name"
app:layout_constraintLeft_toRightOf=
"@id/chat_message_name"
tools:text=
"高级心理咨询师"
tools:visibility=
"visible"
/>
<TextView
android:id=
"@+id/chat_message_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"end"
android:maxLines=
"1"
android:textColor=
"#8595A9"
android:textSize=
"12sp"
app:layout_constraintBaseline_toBaselineOf=
"@id/chat_message_name"
app:layout_constraintRight_toRightOf=
"parent"
tools:text=
"09-04"
/>
<TextView
android:id=
"@+id/chat_message_content"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"35dp"
android:layout_marginBottom=
"18dp"
android:ellipsize=
"end"
android:gravity=
"left"
android:maxLines=
"1"
android:text=
"你好,请问你遇到了什么烦恼?我可你好,请问你遇到了什么烦恼?我可以帮…"
android:textColor=
"#495C72"
android:textSize=
"14sp"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toLeftOf=
"@id/chat_message_name"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/chat_message_name"
/>
<View
android:layout_width=
"0dp"
android:layout_height=
"0.5dp"
android:layout_marginTop=
"20dp"
android:background=
"#E7ECF0"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toLeftOf=
"@id/card_img"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/chat_message_content"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_weight=
"0"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"bottom"
android:orientation=
"horizontal"
>
</LinearLayout>
</LinearLayout>
</LinearLayout>
m-im/src/main/res/layout/medical_item_archives_flow2_list.xml
0 → 100644
View file @
eae736e4
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/bg"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"16dp"
android:background=
"@drawable/medical_bg_edit_f2f5f8"
android:paddingStart=
"12dp"
android:paddingTop=
"8dp"
tools:background=
"@drawable/medical_list_check_bg"
>
<androidx.constraintlayout.widget.Group
android:id=
"@+id/group_item"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
app:constraint_referenced_ids=
"age,name,sex"
tools:visibility=
"gone"
/>
<TextView
android:id=
"@+id/name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/medical_color_0c1d31"
android:textSize=
"16sp"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:text=
"何照"
/>
<TextView
android:id=
"@+id/sex"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"4dp"
android:layout_marginBottom=
"8dp"
android:textColor=
"#ff495c72"
android:textSize=
"14sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"@id/name"
app:layout_constraintTop_toBottomOf=
"@id/name"
tools:text=
"男"
/>
<TextView
android:id=
"@+id/age"
android:layout_width=
"31dp"
android:layout_height=
"20dp"
android:layout_marginLeft=
"8dp"
android:text=
"20岁"
android:textColor=
"#ff495c72"
android:textSize=
"14sp"
app:layout_constraintBaseline_toBaselineOf=
"@id/sex"
app:layout_constraintLeft_toRightOf=
"@id/sex"
/>
<ImageView
android:visibility=
"gone"
android:id=
"@+id/iv_bottom_check"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/medical_check_bottom_right"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
/>
<androidx.constraintlayout.widget.Group
android:id=
"@+id/group_add"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
app:constraint_referenced_ids=
"add,tv_add"
/>
<ImageView
android:id=
"@+id/add"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"16dp"
android:src=
"@mipmap/medical_add_icon"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_add"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"4dp"
android:layout_marginEnd=
"16dp"
android:paddingBottom=
"10dp"
android:text=
"添加患者"
android:textColor=
"#ff495c72"
android:textSize=
"12sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/add"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
m-im/src/main/res/mipmap-xhdpi/medical_add_icon.png
0 → 100644
View file @
eae736e4
362 Bytes
m-im/src/main/res/mipmap-xhdpi/medical_check_bottom_right.png
0 → 100644
View file @
eae736e4
769 Bytes
m-im/src/main/res/mipmap-xhdpi/medical_close_ovel.png
0 → 100644
View file @
eae736e4
1.07 KB
m-im/src/main/res/mipmap-xhdpi/medical_icon_more.png
0 → 100644
View file @
eae736e4
837 Bytes
settings.gradle
View file @
eae736e4
...
@@ -6,3 +6,4 @@ include ':app',
...
@@ -6,3 +6,4 @@ include ':app',
":m-im"
,
":m-dynamic"
,
"m-article"
,
"m-audioim"
,
"m-user"
,
"m-confide"
":m-im"
,
":m-dynamic"
,
"m-article"
,
"m-audioim"
,
"m-user"
,
"m-confide"
include
':ydl_medical_pay'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment