Commit c83bc175 by upwork.021

feat: 代码提交

parent e202a05c
......@@ -184,58 +184,33 @@ dependencies {
api rootProject.ext.dependencies["butterknife"]
kapt rootProject.ext.dependencies["butterknife-compiler"]
if (true) {
//开发模式
implementation fileTree(dir: 'aars', include: ['*.aar'])
implementation project(':m-user')
implementation modularPublication('com.ydl:m-user-api')
implementation project(':m-confide')
implementation modularPublication('com.ydl:m-confide-api')
api project(':m-consultant')
implementation modularPublication('com.ydl:m-consultant-api')
api project(':m-tests')
api project(':m-home')
api project(':m-confide')
// api project(':ydl-medical-pay')
api rootProject.ext.dependencies["ydl-medical-pay"]
implementation project(':ydl-flutter-base')
api(project(':ydl-platform')) {
transitive = true
}
implementation project(':ydl-webview')
implementation project(':ydl-media')
implementation project(':m-muse')
implementation project(':m-im')
implementation modularPublication('com.ydl:m-im-api')
implementation project(':m-dynamic')
implementation project(':m-course')
//文章模块
implementation project(':m-article')
implementation project(':m-audioim')
implementation modularPublication('com.ydl:m-audioim-api')
implementation project(':m-fm')
implementation modularPublication('com.ydl:m-fm-api')
} else {
api project(':ydl-medical-pay')
//发布模式
api 'com.ydl:m-user-module-ydl:0.0.6'
api rootProject.ext.dependencies["ydl-webview"]
api rootProject.ext.dependencies["ydl-m-user-api"]
api rootProject.ext.dependencies["ydl-m-fm-api"]
api rootProject.ext.dependencies["m-article"]
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
implementation fileTree(dir: 'aars', include: ['*.aar'])
implementation project(':m-user')
implementation modularPublication('com.ydl:m-user-api')
implementation project(':m-confide')
implementation modularPublication('com.ydl:m-confide-api')
api project(':m-consultant')
implementation modularPublication('com.ydl:m-consultant-api')
api project(':m-tests')
api project(':m-home')
api project(':m-confide')
api rootProject.ext.dependencies["ydl-medical-pay"]
implementation project(':ydl-flutter-base')
api(project(':ydl-platform')) {
transitive = true
}
implementation project(':ydl-webview')
implementation project(':ydl-media')
implementation project(':m-muse')
implementation project(':m-im')
implementation modularPublication('com.ydl:m-im-api')
implementation project(':m-dynamic')
implementation project(':m-course')
implementation project(':m-article')
implementation project(':m-audioim')
implementation modularPublication('com.ydl:m-audioim-api')
implementation project(':m-fm')
implementation modularPublication('com.ydl:m-fm-api')
implementation rootProject.ext.dependencies["retrofit-url-manager"]
......
......@@ -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.21.32",
"m-im-medical" : "0.0.21.36",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.10",
......@@ -96,7 +96,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.21.32",
"m-im-medical" : "0.0.21.34",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.8",
......
......@@ -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.CustomAttachmentPatientFullInfo;
import com.yidianling.im.session.extension.CustomAttachmentPhoneCallSystemNotice;
import com.yidianling.im.session.extension.CustomAttachmentRecipel;
import com.yidianling.im.session.extension.CustomAttachmentRecommendAssistant;
......@@ -83,6 +84,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.MsgViewHolderPatientFullInfo;
import com.yidianling.im.session.viewholder.MsgViewHolderPerfectConsultData;
import com.yidianling.im.session.viewholder.MsgViewHolderPhoneCallSystemNotice;
import com.yidianling.im.session.viewholder.MsgViewHolderRecipel;
......@@ -452,6 +454,7 @@ public class SessionHelper {
NimUIKit.registerMsgItemViewHolder(CustomAttachmentInquiryStart.class, MsgViewHolderInquiryStart.class);//问诊订单接诊通知消息提醒类型
NimUIKit.registerMsgItemViewHolder(CustomAttachmentInquiryEnd.class, MsgViewHolderInquiryEnd.class);//问诊订单结束通知消息提醒类型
NimUIKit.registerMsgItemViewHolder(CustomAttachmentRecipel.class, MsgViewHolderRecipel.class);//处方单创建消息类型
NimUIKit.registerMsgItemViewHolder(CustomAttachmentPatientFullInfo.class, MsgViewHolderPatientFullInfo.class);//就诊者完善信息
}
......
......@@ -36,7 +36,9 @@ public class CustomAttachParser implements MsgAttachmentParser {
case CustomAttachmentType.TYPE_RECIPE:
attachment = new CustomAttachmentRecipel();
break;
case CustomAttachmentType.TYPE_PATIENT_FULL_INFO:
attachment = new CustomAttachmentPatientFullInfo();
break;
default:
// attachment = new CustomAttachmentFilter();
break;
......
package com.yidianling.im.session.extension;
import com.alibaba.fastjson.JSONObject;
/**
* 提示就诊者完善信息消息类型
*/
public class CustomAttachmentPatientFullInfo extends CustomAttachment {
private static final String KEY_FROM_PATIENT_ID = "patientId";
private String fromPatientId = "";
public CustomAttachmentPatientFullInfo() {
super(CustomAttachmentType.TYPE_PATIENT_FULL_INFO);
}
@Override
protected void parseData(JSONObject data) {
fromPatientId = data.getString(KEY_FROM_PATIENT_ID);
}
@Override
protected JSONObject packData() {
JSONObject data = new JSONObject();
data.put(KEY_FROM_PATIENT_ID, fromPatientId);
return data;
}
public String getFromPatientId() {
return fromPatientId;
}
}
......@@ -61,5 +61,5 @@ public interface CustomAttachmentType {
int TYPE_INQUIRY_START = 82;//问诊订单接诊通知消息提醒类型
int TYPE_INQUIRY_END = 83;//问诊订单结束通知消息提醒类型
int TYPE_RECIPE = 86;//处方单创建消息类型
int TYPE_PATIENT_FULL_INFO = 87; // 就诊患者完善信息
}
package com.yidianling.im.session.viewholder
import android.widget.TextView
import androidx.constraintlayout.widget.ConstraintLayout
import com.yidianling.im.R
import com.yidianling.im.session.extension.CustomAttachmentPatientFullInfo
import com.yidianling.medical.archives.MedicalUpdateArchivesActivity
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase
/**
* 就诊人提示补充信息ui
*/
class MsgViewHolderPatientFullInfo(adapter: BaseMultiItemFetchLoadAdapter<*, *>?) : MsgViewHolderBase(adapter) {
private lateinit var tvContent:TextView
private lateinit var itemBean: CustomAttachmentPatientFullInfo
override fun getContentResId(): Int {
return R.layout.im_nim_patient_full_info_layout
}
override fun inflateContentView() {
tvContent = findViewById(R.id.tv_content)
tvContent.text = "根据相关政策,请完成实名认证,\n后续我将为您开具处方"
}
override fun bindContentView() {
itemBean = message.attachment as CustomAttachmentPatientFullInfo
hideItemBg()
setAvatarRightInVisibity()
}
override fun onItemClick() {
MedicalUpdateArchivesActivity.start(context,itemBean.fromPatientId,message.sessionId)
}
}
\ No newline at end of file
......@@ -3,7 +3,13 @@ package com.yidianling.medical.archives
import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
import android.text.TextUtils
import android.view.*
import com.netease.nimlib.sdk.NIMClient
import com.netease.nimlib.sdk.msg.MessageBuilder
import com.netease.nimlib.sdk.msg.MsgService
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import com.netease.nimlib.sdk.msg.model.IMMessage
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.view.dialog.NormalDialog
......@@ -11,6 +17,7 @@ import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R
import com.yidianling.medical.archives.bean.MedicalArchivesListBean
import com.yidianling.medical.utils.EditTextUtils
import com.yidianling.uikit.business.session.helper.MessageListPanelHelper
import com.yidianling.uikit.custom.http.ServiceImpl
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
......@@ -21,13 +28,15 @@ import kotlinx.android.synthetic.main.medical_add_new_archives_activity.*
* 修改问诊人
* */
class MedicalUpdateArchivesActivity : BaseActivity() {
private var mArchivesBeanExtra: MedicalArchivesListBean?=null
private var mPatientId:String?=null
private var toUid:String?=null
companion object {
//患者id
const val ARCHIVESBEAN_KEY = "archivesBean"
const val ARCHIVESBEAN_KEY = "archivesBean" //患者信息key
const val PATIENT_ID_KEY = "patient_id"
const val SESSION_ID = "session_id"
var mMarried = -1
var mRelation = -1
private lateinit var mArchivesBeanExtra: MedicalArchivesListBean
//之前输入内容长度
......@@ -35,9 +44,16 @@ class MedicalUpdateArchivesActivity : BaseActivity() {
@JvmStatic
fun start(context: Context, archivesBean: MedicalArchivesListBean) {
val starter = Intent(context, MedicalUpdateArchivesActivity::class.java)
val intent = Intent(context, MedicalUpdateArchivesActivity::class.java)
.putExtra(ARCHIVESBEAN_KEY, archivesBean)
context.startActivity(starter)
context.startActivity(intent)
}
fun start(context: Context, patientId:String,toUid:String) {
val intent = Intent(context, MedicalUpdateArchivesActivity::class.java)
.putExtra(PATIENT_ID_KEY, patientId)
.putExtra(SESSION_ID,toUid)
context.startActivity(intent)
}
}
......@@ -46,17 +62,32 @@ class MedicalUpdateArchivesActivity : BaseActivity() {
}
override fun initDataAndEvent() {
initStatus()
tv_title.text="编辑就诊人"
mMarried = -1
mRelation = -1
mArchivesBeanExtra = intent.extras.getSerializable(ARCHIVESBEAN_KEY) as MedicalArchivesListBean
initStatus()
mArchivesBeanExtra.name?.let { name ->
et_name.setText(name)
mPatientId = intent.getStringExtra(PATIENT_ID_KEY)
toUid = intent.getStringExtra(SESSION_ID)
if (TextUtils.isEmpty(mPatientId)){
mArchivesBeanExtra = intent.getSerializableExtra(ARCHIVESBEAN_KEY) as MedicalArchivesListBean
}
mArchivesBeanExtra.idcardNo?.let { idcard ->
et_idcard.setText(idcard)
if (mArchivesBeanExtra!=null){
mArchivesBeanExtra!!.let {
mPatientId = it.patientId.toString()
it.name?.let { name ->
et_name.setText(name)
}
it.idcardNo?.let { idcard ->
et_idcard.setText(idcard)
}
}
setRelation()
setMarried()
}else{
// 接口获取就诊者信息
getPatientInfo()
}
group_merried.setOnCheckedChangeListener { group, checkedId ->
......@@ -115,9 +146,6 @@ class MedicalUpdateArchivesActivity : BaseActivity() {
}
}
}
setRelation()
getMarried()
add_archives_save.setOnClickListener {
//保存新增问诊人
checkInfo()
......@@ -130,10 +158,37 @@ class MedicalUpdateArchivesActivity : BaseActivity() {
}
/**
* 根据接口获取就诊人信息
*/
@SuppressLint("CheckResult")
private fun getPatientInfo(){
if (!TextUtils.isEmpty(mPatientId)){
ServiceImpl.instance.getArchives(mPatientId!!)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
if ("200" == it.code) {
mArchivesBeanExtra = MedicalArchivesListBean(false,idcardNo = it.data.idcardNo,merried = it.data.merried,
name = it.data.name,relation = it.data.relation)
mArchivesBeanExtra!!.let { archivesBeanExtra->
et_name.setText(archivesBeanExtra.name)
et_idcard.setText(archivesBeanExtra.idcardNo)
}
setRelation()
setMarried()
}
}, {
it.printStackTrace()
ToastUtil.toastShort("网络错误")
})
}
}
/**
* 关系
* */
private fun getMarried() {
when (mArchivesBeanExtra.merried) {
private fun setMarried() {
when (mArchivesBeanExtra!!.merried) {
0 -> {
//未婚 0
unmarried.isChecked = true
......@@ -161,7 +216,7 @@ class MedicalUpdateArchivesActivity : BaseActivity() {
* 设置与就诊人关系
* */
private fun setRelation() {
when (mArchivesBeanExtra.relation) {
when (mArchivesBeanExtra!!.relation) {
0 -> {
//0-本人
relation_me.isChecked = true
......@@ -193,7 +248,7 @@ class MedicalUpdateArchivesActivity : BaseActivity() {
private fun showDialogTip() {
val builder = NormalDialog.Builder(this@MedicalUpdateArchivesActivity, "center", false)
builder.setTitle("")
var strs = arrayOf("就诊人的身份证号码", "就诊人的授权同意", "您需要在提供前征得该儿童监护人的同意")
val strs = arrayOf("就诊人的身份证号码", "就诊人的授权同意", "您需要在提供前征得该儿童监护人的同意")
builder.setMessageAndBolds(
"\n为向您添加的就诊人提供问诊服务,您需要向我们提供该就诊人的身份证号码,并确保在提供前已取得该就诊人的授权同意;若该就诊人为儿童的,您需要在提供前征得该儿童监护人的同意。\n",
strs
......@@ -241,17 +296,24 @@ class MedicalUpdateArchivesActivity : BaseActivity() {
return
}
ServiceImpl.instance.updateArchives(
et_name.text.toString(),
et_idcard.text.toString(),
ServiceImpl.instance.updateArchives(et_name.text.toString(), et_idcard.text.toString(),
mMarried,
mRelation,
mArchivesBeanExtra.patientId
mPatientId!!
)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
if ("200" == it.code) {
if (!TextUtils.isEmpty(toUid)){ // 如果是来自云信自定义消息打开的页面,保存完信息,发送一条im消息告知医生
val textMessage: IMMessage = MessageBuilder.createTextMessage(
toUid,
SessionTypeEnum.P2P,
"我已完善信息,请您开具处方"
)
NIMClient.getService(MsgService::class.java).sendMessage(textMessage, false)
MessageListPanelHelper.getInstance().notifyAddMessage(textMessage)
}
finish()
ToastUtil.toastShort("保存成功")
} else {
......
......@@ -9,14 +9,14 @@ data class MedicalArchivesListBean(
val createTime: String = "",
val gender: Int = -1,
val genderName: String = "",
val idcardNo: String = "",
val idcardNo: String="",
val idcardType: Int = -1,
val isDeleted: Boolean = false,
val locationCityId: Int = -1,
val locationCityName: String = "",
val merried: Int = -1,
val merriedName: String = "",
val name: String = "",
val name: String="",
val patientId: Long = -1,
val phone: String = "",
val relation: Int = -1,
......
......@@ -5,6 +5,6 @@ data class UpdataPatientDtoBody(
var merried: Int,
var name: String,
var relation: Int,
var patientId: Long,
var patientId: String,
var idcardType: Int = 1
)
......@@ -146,6 +146,7 @@ interface ServiceApi {
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA_URL)
fun updateArchives(@Body body: RequestBody): Observable<BaseAPIResponse<Any>>
//医疗 获取问诊人信息
@GET("api/client/user/patient/v1/getById")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA_URL)
......
......@@ -232,7 +232,7 @@ class ServiceImpl private constructor() {
idcardNo: String,
merried: Int,
relation: Int,
patientId: Long
patientId: String
): Observable<BaseAPIResponse<Any>> {
val body = RequestBody.create(
MediaType.parse("application/json; charset=utf-8"),
......
<?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="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="@dimen/platform_dp_12"
android:background="@color/white"
android:maxWidth="263dp"
android:minWidth="240dp"
android:elevation="0dp"
app:cardCornerRadius="8dp"
app:cardElevation="0dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_item"
android:layout_width="263dp"
android:layout_height="wrap_content"
android:paddingTop="12dp"
android:paddingBottom="14dp"
>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请完善就诊人信息"
android:textColor="#ff0c1d31"
android:textSize="18sp"
android:includeFontPadding="false"
android:fontFamily="sans-serif-medium"
android:layout_marginStart="12dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:textColor="#ff8595a9"
android:textSize="16sp"
android:includeFontPadding="false"
android:layout_marginStart="12dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_title" />
<View
android:id="@+id/line_center"
android:layout_width="0dp"
android:layout_height="1px"
android:layout_marginTop="12dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="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_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:text="去完善"
android:background="@drawable/medical_bg_3464ec_14dp"
android:textColor="@color/medical_color_3464ec"
android:textSize="14sp"
android:layout_marginBottom="2dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@id/tv_title"
app:layout_constraintTop_toBottomOf="@id/line_center" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
\ 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