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
143ffbf3
Commit
143ffbf3
authored
Sep 05, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:消息列表
parent
f4b4ae5a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
29 deletions
+33
-29
MedicinelistBean.kt
m-im/src/main/java/com/yidianling/im/bean/MedicinelistBean.kt
+6
-9
CustomAttachmentPatientMedicineApply.kt
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentPatientMedicineApply.kt
+7
-3
MsgViewHolderPatientMedicineApply.kt
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderPatientMedicineApply.kt
+9
-6
AdapterMedicineApply.kt
m-im/src/main/java/com/yidianling/im/session/viewholder/adapter/AdapterMedicineApply.kt
+5
-5
im_nim_patient_medicine_apply_layout.xml
m-im/src/main/res/layout/im_nim_patient_medicine_apply_layout.xml
+6
-6
No files found.
m-im/src/main/java/com/yidianling/im/bean/MedicinelistBean.kt
View file @
143ffbf3
package
com.yidianling.im.bean
data class
MedicinelistBean
(
val
medicineList
:
MutableList
<
MedicineBean
>
)
data class
MedicineBean
(
val
medicineApplyNumber
:
String
?
=
""
,
val
medicineName
:
String
?
=
""
,
val
medicineSpec
:
String
?
=
""
)
\ No newline at end of file
class
MedicineItemBean
{
var
medicineApplyNumber
:
Int
?
=
0
var
medicineName
:
String
=
""
var
medicineSpec
:
String
=
""
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentPatientMedicineApply.kt
View file @
143ffbf3
package
com.yidianling.im.session.extension
import
com.alibaba.fastjson.JSON
import
com.alibaba.fastjson.JSONObject
import
com.yidianling.im.bean.Medicine
list
Bean
import
com.yidianling.im.bean.Medicine
Item
Bean
/**
* Created by Ykai on 2021/11/12.
...
...
@@ -17,13 +18,16 @@ class CustomAttachmentPatientMedicineApply :
var
title
:
String
?
=
null
var
visitApplyNo
:
String
?
=
null
var
medicinelist
:
MedicinelistBean
?
=
null
var
medicinelist
=
mutableListOf
<
MedicineItemBean
>()
override
fun
parseData
(
data
:
JSONObject
)
{
title
=
data
.
getString
(
TITLE
)
visitApplyNo
=
data
.
getString
(
VISITAPPLYNO
)
medicinelist
=
data
.
getObject
(
MEDICINELIST
,
MedicinelistBean
::
class
.
java
)
medicinelist
=
JSON
.
parseArray
(
data
.
getString
(
MEDICINELIST
),
MedicineItemBean
::
class
.
java
)
as
MutableList
<
MedicineItemBean
>
}
override
fun
packData
():
JSONObject
{
...
...
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderPatientMedicineApply.kt
View file @
143ffbf3
...
...
@@ -3,13 +3,11 @@ package com.yidianling.im.session.viewholder
import
android.widget.TextView
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.webview.H5Params
import
com.ydl.ydlcommon.base.config.HttpConfig.Companion.MH5_URL
import
com.yidianling.im.R
import
com.yidianling.im.session.extension.CustomAttachmentPatientFullInfo
import
com.yidianling.im.session.extension.CustomAttachmentPatientMedicineApply
import
com.yidianling.im.session.viewholder.adapter.AdapterMedicineApply
import
com.yidianling.medical.archives.MedicalUpdateArchivesActivity
import
com.yidianling.medical.extension.YDL_MEDICAL_MESSAGE_DETAIL_PAGE
import
com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
import
com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase
...
...
@@ -33,7 +31,7 @@ class MsgViewHolderPatientMedicineApply(adapter: BaseMultiItemFetchLoadAdapter<*
adapterMedicine
=
AdapterMedicineApply
()
medicine_list
.
layoutManager
=
LinearLayoutManager
(
context
)
medicine_list
.
adapter
=
adapterMedicine
itemBean
.
medicinelist
?.
medicineList
?.
let
{
adapterMedicine
.
setTagData
(
it
)
}
itemBean
.
medicinelist
?.
let
{
adapterMedicine
.
setTagData
(
it
)
}
}
override
fun
bindContentView
()
{
...
...
@@ -43,6 +41,10 @@ class MsgViewHolderPatientMedicineApply(adapter: BaseMultiItemFetchLoadAdapter<*
override
fun
onItemClick
()
{
//跳转开药详情页面
val
h5Params3
=
H5Params
(
MH5_URL
+
"\n"
+
"ct/drug/apply/details?visitApplyNo=${itemBean.visitApplyNo}&hideNavBar=1"
,
null
)
NewH5Activity
.
start
(
getActivity
(),
h5Params3
)
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/im/session/viewholder/adapter/AdapterMedicineApply.kt
View file @
143ffbf3
...
...
@@ -17,7 +17,7 @@ import com.yidianling.im.bean.MedicineBean
* @date 2020/9/7
*/
class
AdapterMedicineApply
:
RecyclerView
.
Adapter
<
AdapterMedicineApply
.
ViewHolder
>()
{
private
lateinit
var
medicineList
:
MutableList
<
MedicineBean
>
private
var
medicineList
:
MutableList
<
MedicineBean
>?
=
mutableListOf
()
class
ViewHolder
(
itemView
:
View
)
:
RecyclerView
.
ViewHolder
(
itemView
)
{
...
...
@@ -37,13 +37,13 @@ class AdapterMedicineApply : RecyclerView.Adapter<AdapterMedicineApply.ViewHolde
}
override
fun
getItemCount
():
Int
{
return
medicineList
.
size
?:
0
return
medicineList
?
.
size
?:
0
}
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
holder
.
medicine_name
.
text
=
medicineList
[
position
]
.
medicineName
holder
.
medicine_spec
.
text
=
medicineList
[
position
]
.
medicineSpec
holder
.
medicine_count
.
text
=
"X"
+
medicineList
[
position
]
.
medicineApplyNumber
holder
.
medicine_name
.
text
=
medicineList
?.
get
(
position
)
?
.
medicineName
holder
.
medicine_spec
.
text
=
medicineList
?.
get
(
position
)
?
.
medicineSpec
holder
.
medicine_count
.
text
=
"X"
+
medicineList
?.
get
(
position
)
?
.
medicineApplyNumber
}
fun
setTagData
(
data
:
MutableList
<
MedicineBean
>)
{
...
...
m-im/src/main/res/layout/im_nim_patient_medicine_apply_layout.xml
View file @
143ffbf3
...
...
@@ -2,7 +2,7 @@
<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:layout_width=
"
match_parent
"
android:layout_width=
"
255dp
"
android:layout_height=
"wrap_content"
>
<View
...
...
@@ -12,7 +12,7 @@
android:background=
"#ecf5ff"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
></View
>
app:layout_constraintTop_toTopOf=
"parent"
/
>
<TextView
android:id=
"@+id/medicine_title"
...
...
@@ -24,19 +24,19 @@
app:layout_constraintBottom_toBottomOf=
"@id/back_top"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:text=
"开药申请"
></TextView
>
tools:text=
"开药申请"
/
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/medicine_list"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:
layout_margin
Start=
"@dimen/platform_dp_16"
android:
padding
Start=
"@dimen/platform_dp_16"
android:layout_marginTop=
"@dimen/platform_dp_16"
android:
layout_margin
End=
"@dimen/platform_dp_16"
android:
padding
End=
"@dimen/platform_dp_16"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/back_top"
tools:itemCount=
"2"
></androidx.recyclerview.widget.RecyclerView
>
tools:itemCount=
"2"
/
>
<View
android:id=
"@+id/line_center"
...
...
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