Commit 07f0dfe4 by YKai

feat: 新增患者报到报到消息类型

parent 065eb23a
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.03",
"m-user-medical" : "0.0.62.14",
"m-home" : "0.0.22.70",
"m-im-medical" : "0.0.21.43",
"m-im-medical" : "0.0.21.44",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.10",
......
......@@ -8,6 +8,7 @@ import android.view.View;
import android.widget.Button;
import android.widget.Chronometer;
import android.widget.TextView;
import com.netease.nimlib.sdk.avchat.AVChatCallback;
import com.netease.nimlib.sdk.avchat.AVChatManager;
import com.netease.nimlib.sdk.avchat.constant.AVChatControlCommand;
......@@ -16,7 +17,6 @@ import com.netease.nimlib.sdk.avchat.model.AVChatData;
import com.tbruyelle.rxpermissions2.Permission;
import com.tbruyelle.rxpermissions2.RxPermissions;
import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.im.R;
import com.yidianling.avchatkit.activity.AVChatActivity;
import com.yidianling.avchatkit.common.imageview.HeadImageView;
import com.yidianling.avchatkit.common.log.LogUtil;
......@@ -30,7 +30,7 @@ import com.yidianling.avchatkit.controll.AVChatController;
import com.yidianling.avchatkit.module.AVChatControllerCallback;
import com.yidianling.avchatkit.module.AVSwitchListener;
import com.yidianling.common.tools.ToastUtil;
import com.ydl.ydlcommon.utils.DeviceTool;
import com.yidianling.im.R;
import io.reactivex.functions.Consumer;
......@@ -391,7 +391,7 @@ public class AVChatAudioUI implements View.OnClickListener, ToggleListener {
requestPermission();
}else {
ToastUtil.toastLong(context,"请开启相机和麦克风权限后重试");
DeviceTool.openPersisonSetting((Activity) AVChatAudioUI.this.context);
// DeviceTool.openPersisonSetting((Activity) AVChatAudioUI.this.context);
((Activity) AVChatAudioUI.this.context).finish();
}
}
......
......@@ -16,6 +16,7 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.netease.nimlib.sdk.avchat.AVChatManager;
import com.netease.nimlib.sdk.avchat.constant.AVChatType;
import com.netease.nimlib.sdk.avchat.constant.AVChatVideoScalingType;
......@@ -26,7 +27,6 @@ import com.netease.nrtc.video.render.IVideoRender;
import com.tbruyelle.rxpermissions2.Permission;
import com.tbruyelle.rxpermissions2.RxPermissions;
import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.im.R;
import com.yidianling.avchatkit.common.imageview.HeadImageView;
import com.yidianling.avchatkit.common.permission.BaseMPermission;
import com.yidianling.avchatkit.common.util.ScreenUtil;
......@@ -38,7 +38,7 @@ import com.yidianling.avchatkit.controll.AVChatController;
import com.yidianling.avchatkit.module.AVChatControllerCallback;
import com.yidianling.avchatkit.module.AVSwitchListener;
import com.yidianling.common.tools.ToastUtil;
import com.ydl.ydlcommon.utils.DeviceTool;
import com.yidianling.im.R;
import java.util.List;
......@@ -671,7 +671,7 @@ public class AVChatVideoUI implements View.OnClickListener, ToggleListener {
requestPermission();
}else {
ToastUtil.toastLong(context,"请开启相机和麦克风权限后重试");
DeviceTool.openPersisonSetting((Activity) AVChatVideoUI.this.context);
// DeviceTool.openPersisonSetting((Activity) AVChatVideoUI.this.context);
((Activity) AVChatVideoUI.this.context).finish();
}
}
......
......@@ -53,6 +53,7 @@ import com.yidianling.im.session.extension.CustomAttachmentInquiryReceive;
import com.yidianling.im.session.extension.CustomAttachmentInquiryStart;
import com.yidianling.im.session.extension.CustomAttachmentOrderAlreadyDone;
import com.yidianling.im.session.extension.CustomAttachmentOrderStatus;
import com.yidianling.im.session.extension.CustomAttachmentPatientCheckIn;
import com.yidianling.im.session.extension.CustomAttachmentPatientFullInfo;
import com.yidianling.im.session.extension.CustomAttachmentPhoneCallSystemNotice;
import com.yidianling.im.session.extension.CustomAttachmentRecipel;
......@@ -84,6 +85,7 @@ import com.yidianling.im.session.viewholder.MsgViewHolderLingxiWhichQuestion;
import com.yidianling.im.session.viewholder.MsgViewHolderModifyTime;
import com.yidianling.im.session.viewholder.MsgViewHolderOrderAlreadyDone;
import com.yidianling.im.session.viewholder.MsgViewHolderOrderStatus;
import com.yidianling.im.session.viewholder.MsgViewHolderPatientCheckIn;
import com.yidianling.im.session.viewholder.MsgViewHolderPatientFullInfo;
import com.yidianling.im.session.viewholder.MsgViewHolderPerfectConsultData;
import com.yidianling.im.session.viewholder.MsgViewHolderPhoneCallSystemNotice;
......@@ -454,6 +456,7 @@ public class SessionHelper {
NimUIKit.registerMsgItemViewHolder(CustomAttachmentInquiryStart.class, MsgViewHolderInquiryStart.class);//问诊订单接诊通知消息提醒类型
NimUIKit.registerMsgItemViewHolder(CustomAttachmentInquiryEnd.class, MsgViewHolderInquiryEnd.class);//问诊订单结束通知消息提醒类型
NimUIKit.registerMsgItemViewHolder(CustomAttachmentRecipel.class, MsgViewHolderRecipel.class);//处方单创建消息类型
NimUIKit.registerMsgItemViewHolder(CustomAttachmentPatientCheckIn.class, MsgViewHolderPatientCheckIn.class);//患者报到
NimUIKit.registerMsgItemViewHolder(CustomAttachmentPatientFullInfo.class, MsgViewHolderPatientFullInfo.class);//就诊者完善信息
}
......
......@@ -39,14 +39,15 @@ public class CustomAttachParser implements MsgAttachmentParser {
case CustomAttachmentType.TYPE_PATIENT_FULL_INFO:
attachment = new CustomAttachmentPatientFullInfo();
break;
case CustomAttachmentType.TYPE_PATIENT_CHECK_IN:
attachment = new CustomAttachmentPatientCheckIn();
break;
default:
// attachment = new CustomAttachmentFilter();
break;
}
if (attachment != null) {
attachment.fromJson(data);
}
attachment.fromJson(data);
} catch (Exception e) {
e.printStackTrace();
}
......
package com.yidianling.im.session.extension
import com.alibaba.fastjson.JSONObject
/**
* Created by Ykai on 2021/11/12.
*
* 患者报道消息解析器
*/
class CustomAttachmentPatientCheckIn :
CustomAttachment(CustomAttachmentType.TYPE_PATIENT_CHECK_IN) {
private val USER_CONTENT = "userContent"
var userContent: String? = null
override fun parseData(data: JSONObject) {
userContent = data.getString(USER_CONTENT)
}
override fun packData(): JSONObject {
val data = JSONObject()
data[USER_CONTENT] = userContent
return data
}
}
\ No newline at end of file
......@@ -62,4 +62,5 @@ public interface CustomAttachmentType {
int TYPE_INQUIRY_END = 83;//问诊订单结束通知消息提醒类型
int TYPE_RECIPE = 86;//处方单创建消息类型
int TYPE_PATIENT_FULL_INFO = 87; // 就诊患者完善信息
int TYPE_PATIENT_CHECK_IN = 88; // 患者报到
}
package com.yidianling.im.session.viewholder
import android.widget.TextView
import com.yidianling.im.R
import com.yidianling.im.session.extension.CustomAttachmentPatientCheckIn
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase
/**
* Created by Ykai on 2021/11/12.
*
* 患者报到ui
*/
class MsgViewHolderPatientCheckIn(adapter: BaseMultiItemFetchLoadAdapter<*, *>) :
MsgViewHolderBase(adapter) {
private lateinit var tvContent: TextView
override fun getContentResId(): Int {
return R.layout.im_nim_inquiry_end_layout
}
override fun inflateContentView() {
tvContent = findViewById(R.id.content)
}
override fun bindContentView() {
val patientCheckInAttachment = message.attachment as CustomAttachmentPatientCheckIn
tvContent.text = patientCheckInAttachment.userContent
}
override fun isShowHeadImage(): Boolean {
return false
}
override fun isShowBubble(): Boolean {
return false
}
override fun shouldDisplayReceipt(): Boolean {
return false
}
override fun isMiddleItem(): Boolean {
return true
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment