Commit 08271c4a by 刘鹏

feat:给杨凯测试

parent f0294026
......@@ -88,8 +88,9 @@ dependencies {
implementation 'com.netease.nimlib:basesdk:7.2.0'
implementation 'com.netease.nimlib:avchat:7.2.0'
implementation 'com.netease.nimlib:nrtc:7.2.0'
api rootProject.ext.dependencies["ydl-user-router"]
implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"]
if (rootProject.ext.dev_mode){
//开发时使用
api project(':ydl-webview')
......
{
"id": "601128023407726592",
"createTime": "2021-06-12T08:29:14.000+0000",
"updateTime": "2021-06-22T09:24:34.000+0000",
"isDeleted": 0,
"category": "pre_diagnosis",
"name": "用户首次进入灵犀系统前置信息收集",
"cateId": 53210621000798,
"cateName": "信息收集卡",
"questionNum": 3,
"status": 0,
"remark": "用户首次进入灵犀系统前置信息收集",
"questionChains": {
"601128318581870592": {
"id": null,
"createTime": null,
"updateTime": null,
"isDeleted": null,
"questionPaperId": "601128023407726592",
"questionId": "601128318581870592",
"head": true,
"options": {
"601128318544121856": "601128931717812224",
"601128318544121857": "601128931717812224",
"601128318544121858": "601129312090853376",
"601128318544121859": "601128931717812224"
}
},
"601128931717812224": {
"id": null,
"createTime": null,
"updateTime": null,
"isDeleted": null,
"questionPaperId": "601128023407726592",
"questionId": "601128931717812224",
"head": false,
"options": {
"601128931680063488": "601129312090853376",
"601128931680063489": "601129312090853376",
"601128931680063490": "601129312090853376",
"601128931680063491": "601129312090853376"
}
},
"601129312090853376": {
"id": null,
"createTime": null,
"updateTime": null,
"isDeleted": null,
"questionPaperId": "601128023407726592",
"questionId": "601129312090853376",
"head": false,
"options": null
}
},
"questions": {
"601128318581870592": {
"id": "601128318581870592",
"createTime": "2021-06-12T08:30:25.000+0000",
"updateTime": "2021-06-12T08:30:25.000+0000",
"isDeleted": 0,
"questionPaperId": "601128023407726592",
"category": "pre_diagnosis",
"order": 1.0,
"name": "服药历",
"type": "radio",
"remarks": [
"请问你有服药史么?"
],
"options": [
{
"id": "601128318544121856",
"name": "1~3 个月",
"relates": [
{
"id": null,
"category": "症状",
"name": "幻觉",
"score": null
}
]
},
{
"id": "601128318544121857",
"name": "4~6 个月",
"relates": [
{
"id": null,
"category": "症状",
"name": "幻觉",
"score": null
}
]
},
{
"id": "601128318544121858",
"name": "7~9 个月",
"relates": [
{
"id": null,
"category": "症状",
"name": "幻觉",
"score": null
}
]
},
{
"id": "601128318544121859",
"name": "10~12 个月",
"relates": [
{
"id": null,
"category": "症状",
"name": "幻觉",
"score": null
}
]
}
]
},
"601128931717812224": {
"id": "601128931717812224",
"createTime": "2021-06-12T08:32:51.000+0000",
"updateTime": "2021-06-12T08:32:51.000+0000",
"isDeleted": 0,
"questionPaperId": "601128023407726592",
"category": "pre_diagnosis",
"order": 2.0,
"name": "晚上睡觉会醒几次",
"type": "radio",
"remarks": [
"晚上睡觉会醒几次?"
],
"options": [
{
"id": "601128931680063488",
"name": "1~3 次",
"relates": [
{
"id": null,
"category": "症状",
"name": "思绪混乱",
"score": null
}
]
},
{
"id": "601128931680063489",
"name": "4~6 次",
"relates": [
{
"id": null,
"category": "症状",
"name": "思绪混乱",
"score": null
}
]
},
{
"id": "601128931680063490",
"name": "7~9 次",
"relates": [
{
"id": null,
"category": "症状",
"name": "思绪混乱",
"score": null
}
]
},
{
"id": "601128931680063491",
"name": "10~12 次",
"relates": [
{
"id": null,
"category": "症状",
"name": "思绪混乱",
"score": null
}
]
}
]
},
"601129312090853376": {
"id": "601129312090853376",
"createTime": "2021-06-12T08:34:22.000+0000",
"updateTime": "2021-06-12T08:34:22.000+0000",
"isDeleted": 0,
"questionPaperId": "601128023407726592",
"category": "pre_diagnosis",
"order": 3.0,
"name": "有逃离的想法么?",
"type": "radio",
"remarks": [
"有逃离的想法么?"
],
"options": [
{
"id": "601129312040521728",
"name": "有",
"relates": [
{
"id": null,
"category": "症状",
"name": "妄想症",
"score": null
}
]
},
{
"id": "601129312040521729",
"name": "无",
"relates": [
{
"id": null,
"category": "症状",
"name": "妄想症",
"score": null
}
]
},
{
"id": "601129312040521730",
"name": "其他",
"relates": null
}
]
}
}
}
\ No newline at end of file
......@@ -88,6 +88,7 @@ import com.yidianling.uikit.custom.http.response.CommonQuestionBean;
import com.yidianling.uikit.custom.http.response.NewUserMesBean;
import com.yidianling.uikit.custom.http.response.SubmitUserInfoBean;
import com.yidianling.uikit.custom.http.response.UserQuestInfoBean;
import com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean;
import com.yidianling.uikit.custom.widget.ConfideOrderInfoView;
import com.yidianling.uikit.custom.widget.ExpertInfoDialog;
import com.yidianling.uikit.custom.widget.TitleBarBottom;
......@@ -314,26 +315,26 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if (ChatStatusCacheHelper.getStatusCache("collectEvent")) {
String time = Calendar.getInstance().get(Calendar.YEAR) + "-" + Calendar.getInstance().get(Calendar.MONTH) + Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
if (!TextUtils.equals(time, SharedPreferencesEditor.getString("skip_time_" + ImIn.INSTANCE.getUserInfo().getUid()))) {
collectInfoPopupWindow = new CollectInfoPopupWindow(getActivity(), new CollectInfoPopupWindow.OnSendMsgListener() {
@Override
public void sendMsg(@NotNull String content, @NotNull List<UserQuestInfoBean> result) {
if (TextUtils.isEmpty(content)) {//点击跳过后当天不再显示此弹窗
SharedPreferencesEditor.putString("skip_time_" + ImIn.INSTANCE.getUserInfo().getUid()
, time);
} else {
IMMessage textMessage = MessageBuilder.createTextMessage(sessionId, sessionType, content);
if (sendMessage(textMessage)) {
openOrCloseCommonQuestionLayout(false);
}
submitUserCollect(result);
}
}
@Override
public void finishPage() {
getActivity().finish();
}
});
// collectInfoPopupWindow = new CollectInfoPopupWindow(getActivity(), new CollectInfoPopupWindow.OnSendMsgListener() {
// @Override
// public void sendMsg(@NotNull String content, @NotNull List<QuestionsInfoBean> result) {
// if (TextUtils.isEmpty(content)) {//点击跳过后当天不再显示此弹窗
// SharedPreferencesEditor.putString("skip_time_" + ImIn.INSTANCE.getUserInfo().getUid()
// , time);
// } else {
// IMMessage textMessage = MessageBuilder.createTextMessage(sessionId, sessionType, content);
// if (sendMessage(textMessage)) {
// openOrCloseCommonQuestionLayout(false);
// }
//// submitUserCollect(result);
// }
// }
//
// @Override
// public void finishPage() {
// getActivity().finish();
// }
// });
getUserInfoCollect();
if (!getActivity().isFinishing()) {
try {
......@@ -1417,12 +1418,12 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
.observeOn(AndroidSchedulers.mainThread())
.subscribe(hasCollectedInResp -> {
if (hasCollectedInResp.data != null && hasCollectedInResp.data.size() > 0) {
collectInfoPopupWindow.setData(resp.data, hasCollectedInResp.data);
// collectInfoPopupWindow.setData(resp.data, hasCollectedInResp.data);
} else {
collectInfoPopupWindow.setData(resp.data, null);
// collectInfoPopupWindow.setData(resp.data, null);
}
}, throwable -> {
collectInfoPopupWindow.setData(resp.data, null);
// collectInfoPopupWindow.setData(resp.data, null);
});
} else {
collectInfoPopupWindow.dismiss();
......
......@@ -8,26 +8,26 @@ import android.view.View
import android.view.ViewGroup
import android.widget.PopupWindow
import com.yidianling.common.tools.ToastUtil
import com.yidianling.uikit.custom.http.response.UserQuestInfoBean
import com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
/**
* @author jiucheng
* @描述:
* @描述: 前置信息收集
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2019/12/10
*/
class CollectInfoPopupWindow(var mContext: Context, var listener: OnSendMsgListener) :
PopupWindow(mContext) {
private var collectUserInformationView: CollectUserInformationView
private var collectUserInformationView: QuestionInformationView
private var isFromBack = true
init {
height = ViewGroup.LayoutParams.MATCH_PARENT
width = ViewGroup.LayoutParams.MATCH_PARENT
setBackgroundDrawable(BitmapDrawable())
collectUserInformationView = CollectUserInformationView(mContext, {
collectUserInformationView = QuestionInformationView(mContext, {
listener.sendMsg("", ArrayList())
isFromBack = false
dismiss()
......@@ -53,12 +53,12 @@ class CollectInfoPopupWindow(var mContext: Context, var listener: OnSendMsgListe
isOutsideTouchable = false
}
fun setData(list: List<UserQuestInfoBean>, hasCompleteInfoList: List<UserQuestInfoBean>?) {
if (list.isEmpty()) {
fun setData(questionInfo: QuestionsInfoBean) {
if (questionInfo == null) {
ToastUtil.toastShort("数据异常,请稍后重试")
return
}
collectUserInformationView.setData(list, hasCompleteInfoList)
collectUserInformationView.setData(questionInfo)
}
......@@ -81,7 +81,7 @@ class CollectInfoPopupWindow(var mContext: Context, var listener: OnSendMsgListe
}
interface OnSendMsgListener {
fun sendMsg(content: String, result: List<UserQuestInfoBean>)
fun sendMsg(content: String, result: List<QuestionsInfoBean>)
fun finishPage()
}
......
package com.yidianling.uikit.business.session.view
import android.annotation.SuppressLint
import android.content.Context
import android.os.Build
import android.view.View
import android.view.ViewGroup
import android.view.inputmethod.InputMethodManager
import android.widget.EditText
import android.widget.LinearLayout
import androidx.annotation.RequiresApi
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R
import com.yidianling.uikit.business.session.view.question.QuestionAdapter
import com.yidianling.uikit.business.session.view.question.QuestionMultiItem
import com.yidianling.uikit.business.session.view.question.QuestionOneCheckListener
import com.yidianling.uikit.custom.http.response.question.OptionsBean
import com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
import kotlinx.android.synthetic.main.im_view_question_infomation.view.*
import java.util.*
import kotlin.collections.ArrayList
/**
* @author jiucheng
* @描述:用户信息采集view
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2019/12/10
*/
@SuppressLint("ViewConstructor")
class QuestionInformationView(
var mContext: Context,
var skipEvent: () -> Unit,
var backEvent: () -> Unit,
var sendMsgEvent: (content: String, list: List<QuestionsInfoBean>) -> Unit
) : LinearLayout(mContext) {
private var dialog: CommonDialog? = null
private lateinit var mQuestionAdapter: QuestionAdapter
private var mData = ArrayList<QuestionMultiItem>();
private var mQuestionBean: QuestionsInfoBean? = null
init {
val params = LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
layoutParams = params
View.inflate(mContext, R.layout.im_view_question_infomation, this)
orientation = VERTICAL
tv_skip.setOnClickListener {
if (Utils.isFastClick()) {
//防止连击
return@setOnClickListener
}
showSkipDialog()
}
val linearLayoutManager = LinearLayoutManager(mContext, RecyclerView.VERTICAL, false)
recycle.layoutManager = linearLayoutManager
mQuestionAdapter = QuestionAdapter(mData)
recycle.adapter = mQuestionAdapter
mQuestionAdapter.setOneCheckListener(object : QuestionOneCheckListener {
override fun itemClick(bean: OptionsBean?, questionId: String) {
val questionMultiItem = QuestionMultiItem()
questionMultiItem.type2Text = bean?.name
questionMultiItem.viewType = 2
mData.add(questionMultiItem)
mQuestionAdapter.notifyDataSetChanged()
val questionMultiItem2 = QuestionMultiItem()
// 使用问题questionId 去questionChains取到选项配置
val options = mQuestionBean!!.questionChains[questionId]?.options
//从配置里找到下一题id
val nextQuestionId = options?.get(bean?.id)
//使用下一题nextQuestionId 取到题
val questionsBean = mQuestionBean!!.questions[nextQuestionId]
if (questionsBean!=null){
//还有下一题
questionMultiItem2.questionsBean = questionsBean
if ("radio" == questionsBean?.type) {
questionMultiItem2.viewType = 3
} else {
questionMultiItem2.viewType = 4
}
mData.add(questionMultiItem2)
}else{
//没有下一题了
}
mQuestionAdapter.notifyDataSetChanged()
}
override fun moreDefineItemClick(list: List<OptionsBean?>?) {
//多选确定
}
override fun showOtherEdit(list: List<OptionsBean?>?) {
//弹出输入框
ToastUtil.toastShort("弹出输入框")
}
})
}
@RequiresApi(Build.VERSION_CODES.N)
fun setData(questionInfo: QuestionsInfoBean) {
mQuestionBean = questionInfo
mData.clear()
val questionMultiItem = QuestionMultiItem()
questionMultiItem.type1Text = questionInfo.name
questionMultiItem.viewType = 1
mData.add(questionMultiItem)
val questionMultiItem2 = QuestionMultiItem()
mQuestionBean!!.questionChains.forEach { (k, v) ->
if (v.head) {
// 代表第一题 ,使用questionId 去questions取到对应的提
val questionsBean = mQuestionBean!!.questions[v.questionId]
questionMultiItem2.questionsBean = questionsBean
if ("radio" == questionsBean?.type) {
questionMultiItem2.viewType = 3
} else {
questionMultiItem2.viewType = 4
}
mData.add(questionMultiItem2)
return@forEach
}
}
// mQuestionAdapter.notifyDataSetChanged()
}
// 隐藏键盘布局
private fun hideInputMethod(et: EditText) {
val imm = mContext.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
imm.hideSoftInputFromWindow(et.windowToken, 0)
et.clearFocus()
}
// 显示键盘布局
private fun showInputMethod(editTextMessage: EditText) {
editTextMessage.requestFocus()
val imm = mContext.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
imm.showSoftInput(editTextMessage, 0)
}
fun showSkipDialog() {
if (dialog == null) {
dialog = CommonDialog.create(mContext)
.setLeftOnclick("下次吧") {
skipEvent()
}
.setRightClick("继续填写") {
dialog!!.dismiss()
}
.setMessage("这个过程可以帮助您更快地改变当前的现状,确定要跳过吗?")
.setTitle_color(R.color.im_color_242424)
.setCancelAble(true)
}
if (!dialog!!.isShowing) {
dialog!!.show()
}
}
}
\ No newline at end of file
package com.yidianling.uikit.business.session.view.question;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ydl.ydl_image.module.GlideApp;
import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.im.R;
import com.yidianling.im.router.ImIn;
import com.yidianling.uikit.custom.http.response.question.OptionsBean;
import java.util.ArrayList;
import java.util.List;
/**
* @author liupeng
*/
public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem, BaseViewHolder> {
/**
* 文字最大数量,大于6个展示单列,小于六个展示双列
*/
private int mTextMaxSize = 6;
private QuestionOneCheckListener mOneCheckListener;
public QuestionAdapter(List<QuestionMultiItem> data) {
super(data);
//左----文字
addItemType(1, R.layout.item_left_text_layout);
//右----文字
addItemType(2, R.layout.item_right_text_layout);
//左----单选
addItemType(3, R.layout.item_left_one_check_layout);
//左----多选
addItemType(4, R.layout.item_left_more_check_layout);
}
@Override
protected void convert(BaseViewHolder helper, QuestionMultiItem item) {
switch (helper.getItemViewType()) {
case 1:
//左文字
helper.setText(R.id.tv_left_text, item.type1Text);
break;
case 2:
//右侧文字
helper.setText(R.id.tv_right_text, item.type2Text);
ImageView iv_header = helper.getView(R.id.iv_header);
String header = ImIn.INSTANCE.getUserInfo().getHead();
if (header != null) {
GlideApp.with(mContext)
.load(header)
.dontAnimate()
.placeholder(R.drawable.platform_head_place_hold_pic)
.error(R.drawable.platform_head_place_hold_pic)
.into(iv_header);
}
break;
case 3:
//单选
RecyclerView OneRecycle = helper.getView(R.id.tv_one_list);
TextView oneTitle = helper.getView(R.id.multiple_choice_title);
oneTitle.setText(item.questionsBean.name);
int oneMaxSize = 0;
for (OptionsBean option : item.questionsBean.options) {
int length = option.name.length();
if (length > mTextMaxSize) {
oneMaxSize = length;
break;
} else if (oneMaxSize < length) {
oneMaxSize = option.name.length();
}
}
GridLayoutManager gridLayoutManager = new GridLayoutManager(AVChatKit.getContext(), oneMaxSize > mTextMaxSize ? 1 : 2);
OneRecycle.setLayoutManager(gridLayoutManager);
QuestionOneCheckAdapter oneCheckAdapter = new QuestionOneCheckAdapter(item.questionsBean.options);
OneRecycle.setAdapter(oneCheckAdapter);
oneCheckAdapter.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
List<OptionsBean> data = oneCheckAdapter.getData();
if ("其他".equals(data.get(position).name)) {
List<OptionsBean> checkList = getCheckOptionsBeans(oneCheckAdapter);
mOneCheckListener.showOtherEdit(checkList);
}else {
for (OptionsBean datum : data) {
if (datum.check) {
return;
}
}
oneCheckAdapter.getData().get(position).check = true;
oneCheckAdapter.notifyDataSetChanged();
mOneCheckListener.itemClick(data.get(position),item.questionsBean.id);
}
}
});
break;
case 4:
//多选
RecyclerView moreRecycle = helper.getView(R.id.tv_more_list);
TextView tv_more_define = helper.getView(R.id.tv_more_define);
TextView moreTitle = helper.getView(R.id.more_title);
moreTitle.setText(item.questionsBean.name);
int moreMaxSize = 0;
for (OptionsBean option : item.questionsBean.options) {
int length = option.name.length();
if (length > mTextMaxSize) {
moreMaxSize = length;
break;
} else if (moreMaxSize < length) {
moreMaxSize = option.name.length();
}
}
GridLayoutManager moreLayoutManager = new GridLayoutManager(AVChatKit.getContext(), moreMaxSize > mTextMaxSize ? 1 : 2);
moreRecycle.setLayoutManager(moreLayoutManager);
QuestionOneCheckAdapter moreCheckAdapter = new QuestionOneCheckAdapter(item.questionsBean.options);
moreRecycle.setAdapter(moreCheckAdapter);
moreCheckAdapter.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
OptionsBean optionsBean = moreCheckAdapter.getData().get(position);
boolean check = optionsBean.check;
moreCheckAdapter.getData().get(position).check = !check;
if ("其他".equals(optionsBean.name)) {
List<OptionsBean> checkList = getCheckOptionsBeans(moreCheckAdapter);
mOneCheckListener.showOtherEdit(checkList);
}
}
});
tv_more_define.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
List<OptionsBean> checkList = getCheckOptionsBeans(moreCheckAdapter);
mOneCheckListener.moreDefineItemClick(checkList);
}
});
break;
default:
break;
}
}
private List<OptionsBean> getCheckOptionsBeans(QuestionOneCheckAdapter moreCheckAdapter) {
List<OptionsBean> data = moreCheckAdapter.getData();
List<OptionsBean> checkList = new ArrayList();
for (OptionsBean datum : data) {
if (datum.check) {
checkList.add(datum);
}
}
return checkList;
}
public void setOneCheckListener(QuestionOneCheckListener listener) {
this.mOneCheckListener = listener;
}
}
package com.yidianling.uikit.business.session.view.question;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.yidianling.uikit.custom.http.response.question.QuestionsBean;
/**
* Created by hzchenkang on 2017/6/21.
*/
public class QuestionMultiItem implements MultiItemEntity {
public int viewType;
public String type1Text;
public String type2Text;
/***type 3 单选 type 4 多选 */
public QuestionsBean questionsBean;
@Override
public int getItemType() {
return viewType;
}
}
package com.yidianling.uikit.business.session.view.question;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yidianling.im.R;
import com.yidianling.uikit.custom.http.response.question.OptionsBean;
import java.util.List;
public class QuestionOneCheckAdapter extends BaseQuickAdapter<OptionsBean, BaseViewHolder> {
public QuestionOneCheckAdapter(@Nullable List<OptionsBean> data) {
super(R.layout.left_one_check_layout_item,data);
}
@Override
protected void convert(BaseViewHolder helper, OptionsBean item) {
TextView tv_which_question= helper.getView(R.id.tv_which_question);
tv_which_question.setText(item.name);
if (item.check){
tv_which_question.setBackground(ContextCompat.getDrawable(mContext, R.drawable.im_background_18dp_1da1f2));
tv_which_question.setTextColor(ContextCompat.getColor(mContext, R.color.white));
}else {
tv_which_question.setBackground(ContextCompat.getDrawable(mContext, R.drawable.im_background_18dp_e8f5fe));
tv_which_question.setTextColor(ContextCompat.getColor(mContext, R.color.platform_color_1DA1F2));
}
}
}
package com.yidianling.uikit.business.session.view.question
import com.yidianling.uikit.custom.http.response.question.OptionsBean
interface QuestionOneCheckListener {
/**
* 单选点击获取item信息
*/
fun itemClick(bean: OptionsBean?,questionId:String)
/**
* 多选确定按钮点击
*/
fun moreDefineItemClick(list: List<OptionsBean?>?)
/**
* 展示其他
*/
fun showOtherEdit(list: List<OptionsBean?>?)
}
\ No newline at end of file
package com.yidianling.uikit.custom.http.response.question;
import java.util.List;
public class OptionsBean {
/**
* id : 601128318544121856
* name : 1~3 个月
* relates : [{"category":"症状","name":"幻觉"}]
*/
public String id;
public String name;
public List<RelatesBean> relates;
public boolean check;
public static class RelatesBean {
/**
* category : 症状
* name : 幻觉
*/
public String category;
public String name;
}
}
package com.yidianling.uikit.custom.http.response.question;
import java.util.Map;
public class QuestionChainsBean {
/**
* id : 601145789934211072
* create_time : 2021-06-12 17:39:50
* update_time : 2021-06-12 17:41:31
* question_paper_id : 601128023407726592
* question_id : 601128318581870592
* head : true
* options : {"601128318544121856":"601128931717812224"}
*/
public String id;
public String createTime;
public String updateTime;
public String isDeleted;
public String questionPaperId;
public String questionId;
public boolean head;
public Map<String, String> options;
}
package com.yidianling.uikit.custom.http.response.question;
import java.util.List;
public class QuestionsBean {
/**
* id : 601128318581870592
* create_time : 2021-06-12 16:30:25
* update_time : 2021-06-12 16:30:25
* is_deleted : 0
* question_paper_id : 601128023407726592
* category : pre_diagnosis
* order : 1
* name : 服药历
* type : radio
* remarks : ["请问你有服药史么?"]
* options : [{"id":"601128318544121856","name":"1~3 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121857","name":"4~6 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121858","name":"7~9 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121859","name":"10~12 个月","relates":[{"category":"症状","name":"幻觉"}]}]
*/
public String id;
public String createTime;
public String updateTime;
public int isDeleted;
public String questionPaperId;
public String category;
public int order;
public String name;
/***类型:
* radio(单选)
* /check(复选)
* /true_or_false(判断)
* /fill(填空)
* */
public String type;
public List<String> remarks;
public List<OptionsBean> options;
}
package com.yidianling.uikit.custom.http.response.question;
import java.util.List;
import java.util.Map;
public class QuestionsInfoBean {
/**
* id : 601128023407726592
* create_time : 2021-06-12 16:29:14
* update_time : 2021-06-12 16:34:22
* is_deleted : 0
* category : pre_diagnosis
* name : 灵犀用户首次进入问诊信息收集
* cate_id : 1313
* cate_name : 信息收集卡
* question_num : 3
* status : 0
* remark : 用户首次进入灵犀系统问诊信息收集
* question_chains : {"601128318581870592":{"id":"601145789934211072","create_time":"2021-06-12 17:39:50","update_time":"2021-06-12 17:41:31","question_paper_id":"601128023407726592","question_id":"601128318581870592","head":true,"options":{"601128318544121856":"601128931717812224"}}}
* questions : {"601128318581870592":{"id":"601128318581870592","create_time":"2021-06-12 16:30:25","update_time":"2021-06-12 16:30:25","is_deleted":0,"question_paper_id":"601128023407726592","category":"pre_diagnosis","order":1,"name":"服药历","type":"radio","remarks":["请问你有服药史么?"],"options":[{"id":"601128318544121856","name":"1~3 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121857","name":"4~6 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121858","name":"7~9 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121859","name":"10~12 个月","relates":[{"category":"症状","name":"幻觉"}]}]},"601128931717812224":{"id":"601128931717812224","create_time":"2021-06-12 16:32:51","update_time":"2021-06-12 16:32:51","is_deleted":0,"question_paper_id":"601128023407726592","category":"pre_diagnosis","order":2,"name":"晚上睡觉会醒几次","type":"radio","remarks":["晚上睡觉会醒几次?"],"options":[{"id":"601128931680063488","name":"1~3 次","relates":[{"category":"症状","name":"思绪混乱"}]},{"id":"601128931680063489","name":"4~6 次","relates":[{"category":"症状","name":"思绪混乱"}]},{"id":"601128931680063490","name":"7~9 次","relates":[{"category":"症状","name":"思绪混乱"}]},{"id":"601128931680063491","name":"10~12 次","relates":[{"category":"症状","name":"思绪混乱"}]}]},"601129312090853376":{"id":"601129312090853376","create_time":"2021-06-12 16:34:22","update_time":"2021-06-12 16:34:22","is_deleted":0,"question_paper_id":"601128023407726592","category":"pre_diagnosis","order":3,"name":"有逃离的想法么?","type":"radio","remarks":["有逃离的想法么?"],"options":[{"id":"601129312040521728","name":"有","relates":[{"category":"症状","name":"妄想症"}]},{"id":"601129312040521729","name":"无","relates":[{"category":"症状","name":"妄想症"}]},{"id":"601129312040521730","name":"其他"}]}}
*/
public String id;
public String createTime;
public String updateTime;
public int isDeleted;
public String category;
public String name;
public long cateId;
public String cateName;
public int questionNum;
public int status;
public String remark;
public Map<String, QuestionChainsBean> questionChains;
public Map<String, QuestionsBean> questions;
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/platform_color_1DA1F2" />
<corners
android:bottomLeftRadius="@dimen/platform_dp_8"
android:bottomRightRadius="@dimen/platform_dp_8"
android:topLeftRadius="@dimen/platform_dp_8"
android:topRightRadius="0dp" />
<padding
android:bottom="9dp"
android:left="22dp"
android:right="22dp"
android:top="9dp" />
</shape>
<?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:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:orientation="vertical"
android:padding="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_header"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/more_title"
android:layout_width="263dp"
android:layout_height="wrap_content"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="请问是发生了什么事情导致的呢?(多选)?"></TextView>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/tv_more_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintStart_toStartOf="@id/multiple_choice_title"
app:layout_constraintTop_toBottomOf="@id/multiple_choice_title"
tools:itemCount="6"
tools:listitem="@layout/left_one_check_layout_item"
tools:spanCount="2" />
<TextView
android:id="@+id/tv_more_define"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="8dp"
android:background="@drawable/im_background_18dp_ebebeb"
android:gravity="center"
android:paddingTop="@dimen/platform_dp_8"
android:paddingBottom="@dimen/platform_dp_8"
android:text="确定(2)"
android:textSize="@dimen/im_text_size_15">
</TextView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:orientation="vertical"
android:padding="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_header"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/multiple_choice_title"
android:layout_width="239dp"
android:layout_height="wrap_content"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="请问是发生了什么事情导致的呢?(多选)?" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/tv_one_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxWidth="270dp"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="12dp"
android:paddingTop="12dp"
android:paddingBottom="12dp">
<ImageView
android:id="@+id/iv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_left_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:maxWidth="270dp"
android:padding="12dp"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_header"
app:layout_constraintTop_toTopOf="parent"
tools:text="你好,为了更好的帮助您我们需要了解些基本信息,我们将会严格保护你的隐私安全,请放心。" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="12dp"
android:paddingRight="12dp"
android:paddingBottom="12dp">
<androidx.cardview.widget.CardView
android:id="@+id/cv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:elevation="0dp"
app:cardCornerRadius="18dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/platform_head_place_hold_pic" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/tv_right_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:background="@drawable/im_question_message_round_1da1f2_8dp_bg"
android:maxWidth="270dp"
android:textColor="@color/white"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@id/cv_header"
app:layout_constraintTop_toTopOf="parent"
tools:text="你好,为了更好的帮助您我们需要了解些基本信息,我们将会严格保护你的隐私安全,请放心。" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tv_which_question"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_16"
android:layout_marginRight="@dimen/platform_dp_9"
android:background="@drawable/im_background_18dp_e8f5fe"
android:gravity="center"
android:paddingTop="@dimen/platform_dp_8"
android:paddingBottom="@dimen/platform_dp_8"
android:text="婚姻家庭婚姻混"
android:textColor="@color/platform_color_1DA1F2">
</TextView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:parentTag="android.widget.LinearLayout">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:background="@color/white">
<ImageView
android:id="@+id/iv_close"
android:layout_width="26dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_marginRight="6dp"
android:layout_toLeftOf="@+id/tv_title"
android:src="@drawable/im_ico_default_avatar" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:gravity="center_vertical"
android:text="咨询前评估"
android:textColor="@color/im_color_242424"
android:textSize="17sp" />
<TextView
android:id="@+id/tv_skip"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:gravity="center_vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:text="跳过"
android:textColor="@color/im_color_grey_999999"
android:textSize="14sp" />
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycle"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/platform_color_F0F0F0">
</androidx.recyclerview.widget.RecyclerView>
</merge>
\ 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