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
4d2fb21f
Commit
4d2fb21f
authored
Mar 07, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : 处方单消息
parent
cf689cc6
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
187 additions
and
2 deletions
+187
-2
config.gradle
config.gradle
+2
-2
SessionHelper.java
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
+3
-0
CustomAttachParser.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachParser.java
+3
-0
CustomAttachmentRecipel.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentRecipel.java
+42
-0
CustomAttachmentType.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentType.java
+1
-0
MsgViewHolderRecipel.kt
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderRecipel.kt
+48
-0
im_nim_recipel_layout.xml
m-im/src/main/res/layout/im_nim_recipel_layout.xml
+88
-0
No files found.
config.gradle
View file @
4d2fb21f
...
...
@@ -11,7 +11,7 @@ ext {
"m-user"
:
"0.0.61.90"
,
"m-user-medical"
:
"0.0.61.99"
,
"m-home"
:
"0.0.22.70"
,
"m-im-medical"
:
"0.0.20.8
7
"
,
"m-im-medical"
:
"0.0.20.8
8
"
,
"m-im"
:
"0.0.20.76"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.10"
,
...
...
@@ -97,7 +97,7 @@ ext {
"m-user"
:
"0.0.61.90"
,
"m-user-medical"
:
"0.0.61.99"
,
"m-home"
:
"0.0.22.70"
,
"m-im-medical"
:
"0.0.20.8
7
"
,
"m-im-medical"
:
"0.0.20.8
8
"
,
"m-im"
:
"0.0.20.76"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.8"
,
...
...
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
View file @
4d2fb21f
...
...
@@ -69,6 +69,7 @@ import com.yidianling.im.session.extension.CustomAttachmentPhoneCallRedPacket;
import
com.yidianling.im.session.extension.CustomAttachmentPhoneCallSystemNotice
;
import
com.yidianling.im.session.extension.CustomAttachmentReceivedSuccess
;
import
com.yidianling.im.session.extension.CustomAttachmentReceivedTimeout
;
import
com.yidianling.im.session.extension.CustomAttachmentRecipel
;
import
com.yidianling.im.session.extension.CustomAttachmentRecommendAssistant
;
import
com.yidianling.im.session.extension.CustomAttachmentRedStatus
;
import
com.yidianling.im.session.extension.CustomAttachmentShareMsg
;
...
...
@@ -108,6 +109,7 @@ import com.yidianling.im.session.viewholder.MsgViewHolderPhoneCallSystemNotice;
import
com.yidianling.im.session.viewholder.MsgViewHolderPleaseSubscribeConsultDate
;
import
com.yidianling.im.session.viewholder.MsgViewHolderReceivedMoney
;
import
com.yidianling.im.session.viewholder.MsgViewHolderReceivedStatus
;
import
com.yidianling.im.session.viewholder.MsgViewHolderRecipel
;
import
com.yidianling.im.session.viewholder.MsgViewHolderRecommendAssistant
;
import
com.yidianling.im.session.viewholder.MsgViewHolderRecommendExpertList
;
import
com.yidianling.im.session.viewholder.MsgViewHolderRedPacket
;
...
...
@@ -489,6 +491,7 @@ public class SessionHelper {
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachmentInquiryReceive
.
class
,
MsgViewHolderInquiryreceive
.
class
);
//接诊通知
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachmentInquiryStart
.
class
,
MsgViewHolderInquiryStart
.
class
);
//问诊订单接诊通知消息提醒类型
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachmentInquiryEnd
.
class
,
MsgViewHolderInquiryEnd
.
class
);
//问诊订单结束通知消息提醒类型
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachmentRecipel
.
class
,
MsgViewHolderRecipel
.
class
);
//处方单创建消息类型
}
...
...
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachParser.java
View file @
4d2fb21f
...
...
@@ -33,6 +33,9 @@ public class CustomAttachParser implements MsgAttachmentParser {
case
CustomAttachmentType
.
TYPE_INQUIRY_END
:
attachment
=
new
CustomAttachmentInquiryEnd
();
break
;
case
CustomAttachmentType
.
TYPE_RECIPE
:
attachment
=
new
CustomAttachmentRecipel
();
break
;
//// case CustomAttachmentType.SnapChat:
// return new SnapChatAttachment(data);
...
...
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentRecipel.java
0 → 100644
View file @
4d2fb21f
package
com
.
yidianling
.
im
.
session
.
extension
;
import
com.alibaba.fastjson.JSONObject
;
/**
* 处方单创建消息类型
*/
public
class
CustomAttachmentRecipel
extends
CustomAttachment
{
private
static
final
String
KEY_FROM_RECIPELID
=
"recipelId"
;
private
static
final
String
KEY_FROM_SICKNESS
=
"sickness"
;
private
String
fromRecipelId
=
""
;
private
String
fromSickness
=
""
;
public
CustomAttachmentRecipel
()
{
super
(
CustomAttachmentType
.
TYPE_RECIPE
);
}
@Override
protected
void
parseData
(
JSONObject
data
)
{
fromRecipelId
=
data
.
getString
(
KEY_FROM_RECIPELID
);
fromSickness
=
data
.
getString
(
KEY_FROM_SICKNESS
);
}
@Override
protected
JSONObject
packData
()
{
JSONObject
data
=
new
JSONObject
();
data
.
put
(
KEY_FROM_RECIPELID
,
fromRecipelId
);
data
.
put
(
KEY_FROM_SICKNESS
,
fromSickness
);
return
data
;
}
public
String
getFromRecipelId
()
{
return
fromRecipelId
;
}
public
String
getFromSickness
()
{
return
fromSickness
;
}
}
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentType.java
View file @
4d2fb21f
...
...
@@ -60,5 +60,6 @@ public interface CustomAttachmentType {
int
TYPE_INQUIRY_RECEIVE
=
81
;
//接诊通知
int
TYPE_INQUIRY_START
=
82
;
//问诊订单接诊通知消息提醒类型
int
TYPE_INQUIRY_END
=
83
;
//问诊订单结束通知消息提醒类型
int
TYPE_RECIPE
=
86
;
//处方单创建消息类型
}
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderRecipel.kt
0 → 100644
View file @
4d2fb21f
package
com.yidianling.im.session.viewholder
import
android.widget.TextView
import
androidx.constraintlayout.widget.ConstraintLayout
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.yidianling.im.R
import
com.yidianling.im.session.extension.CustomAttachmentInquiryEnd
import
com.yidianling.im.session.extension.CustomAttachmentRecipel
import
com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
import
com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase
/**
* 处方单创建消息类型
*/
class
MsgViewHolderRecipel
(
adapter
:
BaseMultiItemFetchLoadAdapter
<*,
*>?)
:
MsgViewHolderBase
(
adapter
)
{
private
var
name
:
TextView
?
=
null
private
var
item
:
ConstraintLayout
?
=
null
var
itemBean
:
CustomAttachmentRecipel
?
=
null
override
fun
getContentResId
():
Int
{
return
R
.
layout
.
im_nim_recipel_layout
}
override
fun
inflateContentView
()
{
name
=
findViewById
(
R
.
id
.
name
)
item
=
findViewById
(
R
.
id
.
item
)
}
override
fun
bindContentView
()
{
itemBean
=
message
.
attachment
as
CustomAttachmentRecipel
name
?.
text
=
itemBean
?.
fromSickness
hideItemBg
()
setAvatarRightInVisibity
()
item
?.
setOnClickListener
{
NewH5Activity
.
start
(
view
?.
context
,
H5Params
(
"${HttpConfig.MEDICAL_H5URL}/ct/prescription/details?recipeId=${itemBean?.fromRecipelId}&hideNavBar=1"
,
"处方详情"
)
)
}
}
}
\ No newline at end of file
m-im/src/main/res/layout/im_nim_recipel_layout.xml
0 → 100644
View file @
4d2fb21f
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
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=
"263dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"left"
android:layout_marginTop=
"@dimen/platform_dp_12"
android:background=
"@color/white"
android:elevation=
"0dp"
app:cardCornerRadius=
"8dp"
app:cardElevation=
"0dp"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/item"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:maxWidth=
"263dp"
android:minWidth=
"263dp"
android:padding=
"@dimen/platform_dp_12"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"处方详情"
android:textColor=
"#ff0c1d31"
android:textSize=
"18sp"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_info"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:text=
"病情诊断:"
android:textColor=
"#ff8595a9"
android:textSize=
"16sp"
app:layout_constraintLeft_toLeftOf=
"@id/tv_title"
app:layout_constraintTop_toBottomOf=
"@id/tv_title"
/>
<TextView
android:id=
"@+id/name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"4dp"
android:textColor=
"#ff0c1d31"
android:textSize=
"16sp"
app:layout_constraintBaseline_toBaselineOf=
"@id/tv_info"
app:layout_constraintLeft_toRightOf=
"@id/tv_info"
tools:text=
"青少年忧郁症"
/>
<View
android:id=
"@+id/line_center"
android:layout_width=
"0dp"
android:layout_height=
"1px"
android:layout_marginTop=
"12dp"
android:background=
"@color/medical_color_e7ecf0"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_info"
/>
<TextView
android:id=
"@+id/detail"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:text=
"查看处方详情"
android:textColor=
"#ff8595a9"
android:textSize=
"14sp"
app:layout_constraintLeft_toLeftOf=
"@id/tv_title"
app:layout_constraintTop_toBottomOf=
"@id/line_center"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/medical_icon_arrow_right"
app:layout_constraintBottom_toBottomOf=
"@id/detail"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/detail"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
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