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
8de7acb0
Commit
8de7acb0
authored
Jul 03, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
信息收集部分逻辑优化
parent
a50a6fe1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
99 additions
and
40 deletions
+99
-40
config.gradle
config.gradle
+1
-1
AndroidManifest.xml
m-im/src/main/AndroidManifest.xml
+1
-0
IMChatUtil.kt
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
+2
-2
CmsExamQuestionPaperActivity.kt
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
+0
-0
QuestionAdapter.java
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionAdapter.java
+77
-33
QuestionMultiItem.java
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionMultiItem.java
+3
-1
QuestionOneCheckListener.kt
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionOneCheckListener.kt
+7
-0
QuestionsBean.java
m-im/src/main/java/com/yidianling/uikit/custom/http/response/question/QuestionsBean.java
+3
-0
QuestionsInfoBean.java
m-im/src/main/java/com/yidianling/uikit/custom/http/response/question/QuestionsInfoBean.java
+2
-1
im_view_question_infomation.xml
m-im/src/main/res_uikit/layout/im_view_question_infomation.xml
+3
-2
No files found.
config.gradle
View file @
8de7acb0
...
...
@@ -10,7 +10,7 @@ ext {
"m-fm"
:
"0.0.30.03"
,
"m-user"
:
"0.0.61.37"
,
"m-home"
:
"0.0.22.65"
,
"m-im"
:
"0.0.19.2
0
"
,
"m-im"
:
"0.0.19.2
5
"
,
"m-dynamic"
:
"0.0.7.22"
,
"m-article"
:
"0.0.0.10"
,
...
...
m-im/src/main/AndroidManifest.xml
View file @
8de7acb0
...
...
@@ -71,6 +71,7 @@
<activity
android:name=
".ui.activity.CmsExamQuestionPaperActivity"
android:screenOrientation=
"portrait"
android:launchMode=
"singleTask"
android:theme=
"@style/platform_NoTitleTheme"
/>
<!-- 云信 集成配置 -->
...
...
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
View file @
8de7acb0
...
...
@@ -105,7 +105,7 @@ object IMChatUtil {
.
subscribe
({
res
:
BaseResponse
<
UserTypeBean
>
->
if
(
res
.
code
==
200
&&
res
.
data
!=
null
)
{
if
(
res
.
data
!!
.
collectEvent
&&
TextUtils
.
equals
(
res
.
data
!!
.
userType
,
USER_TYPE_ASSISTANT
.
toString
())
&&
res
.
data
!!
.
collectEvent
)
{
if
(
res
.
data
!!
.
collectEvent
&&
TextUtils
.
equals
(
res
.
data
!!
.
userType
,
USER_TYPE_ASSISTANT
.
toString
()))
{
//和助理私聊需要打开信息采集弹窗
prepareAssistantChatData
(
context
,
...
...
@@ -209,7 +209,7 @@ object IMChatUtil {
})
{
t
:
Throwable
?
->
handleError
(
context
,
t
!!
)
}
}
else
if
(
TextUtils
.
equals
(
res
.
data
!!
.
userType
,
USER_TYPE_ASSISTANT
.
toString
())
&&
res
.
data
!!
.
collectEvent
)
{
//助理
}
else
if
(
TextUtils
.
equals
(
res
.
data
!!
.
userType
,
USER_TYPE_ASSISTANT
.
toString
()))
{
//助理
prepareAssistantChatData
(
context
,
toUid
,
object
:
ChatDataRequestListener
{
override
fun
onSuccess
(
expertInfo
:
IMExpertBuild
)
{
//新前置信息收集入口
CmsExamQuestionPaperActivity
.
start
(
...
...
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
View file @
8de7acb0
This diff is collapsed.
Click to expand it.
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionAdapter.java
View file @
8de7acb0
...
...
@@ -46,6 +46,8 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
addItemType
(
4
,
R
.
layout
.
item_left_more_check_layout
);
//左----描述题
addItemType
(
5
,
R
.
layout
.
item_left_describe_layout
);
//主诉----单选
addItemType
(
6
,
R
.
layout
.
item_left_one_check_layout
);
}
...
...
@@ -77,46 +79,88 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
case
4
:
//多选
convertType4
(
helper
,
item
);
break
;
case
5
:
helper
.
setText
(
R
.
id
.
multiple_choice_title
,
item
.
type5Bean
.
question
);
helper
.
setText
(
R
.
id
.
example
,
item
.
type5Bean
.
example
);
SpannableString
spannableString
=
new
SpannableString
(
mContext
.
getResources
().
getString
(
R
.
string
.
question_notes
));
spannableString
.
setSpan
(
new
ForegroundColorSpan
(
Color
.
parseColor
(
"#1DA1F2"
)),
28
,
spannableString
.
length
(),
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
helper
.
setText
(
R
.
id
.
tv_notes
,
spannableString
);
convertType5
(
helper
,
item
);
break
;
case
6
:
convertType6
(
helper
,
item
);
break
;
default
:
break
;
}
}
/**
* 主诉消息
* */
private
void
convertType6
(
BaseViewHolder
helper
,
QuestionMultiItem
item
)
{
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
();
for
(
OptionsBean
datum
:
data
)
{
if
(
datum
.
check
)
{
//如果已有选项被选择,择不触发后续事件
return
;
}
}
oneCheckAdapter
.
getData
().
get
(
position
).
check
=
true
;
oneCheckAdapter
.
notifyDataSetChanged
();
mOneCheckListener
.
zsItemClick
(
data
.
get
(
position
).
name
,
item
.
type6Position
);
}
});
}
View
type5_line
=
helper
.
getView
(
R
.
id
.
type5_line
);
TextView
example
=
helper
.
getView
(
R
.
id
.
example
);
private
void
convertType5
(
BaseViewHolder
helper
,
QuestionMultiItem
item
)
{
helper
.
setText
(
R
.
id
.
multiple_choice_title
,
item
.
type5Bean
.
question
);
helper
.
setText
(
R
.
id
.
example
,
item
.
type5Bean
.
example
);
SpannableString
spannableString
=
new
SpannableString
(
mContext
.
getResources
().
getString
(
R
.
string
.
question_notes
));
spannableString
.
setSpan
(
new
ForegroundColorSpan
(
Color
.
parseColor
(
"#1DA1F2"
)),
28
,
spannableString
.
length
(),
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
helper
.
setText
(
R
.
id
.
tv_notes
,
spannableString
);
if
(
example
.
getVisibility
()
==
View
.
GONE
)
{
type5_line
.
setVisibility
(
View
.
VISIBLE
);
example
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
type5_line
.
setVisibility
(
View
.
GONE
);
example
.
setVisibility
(
View
.
GONE
);
}
if
(
item
.
type5Open
)
{
type5_line
.
setVisibility
(
View
.
VISIBLE
);
example
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
type5_line
.
setVisibility
(
View
.
GONE
);
example
.
setVisibility
(
View
.
GONE
);
}
if
(
item
.
type5CanClick
){
helper
.
getView
(
R
.
id
.
type5_parent
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
mOneCheckListener
.
showKeyboard
();
}
});
View
type5_line
=
helper
.
getView
(
R
.
id
.
type5_line
);
TextView
example
=
helper
.
getView
(
R
.
id
.
example
);
helper
.
addOnClickListener
(
R
.
id
.
tv_notes
);
if
(
example
.
getVisibility
()
==
View
.
GONE
)
{
type5_line
.
setVisibility
(
View
.
VISIBLE
);
example
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
type5_line
.
setVisibility
(
View
.
GONE
);
example
.
setVisibility
(
View
.
GONE
);
}
if
(
item
.
type5Open
)
{
type5_line
.
setVisibility
(
View
.
VISIBLE
);
example
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
type5_line
.
setVisibility
(
View
.
GONE
);
example
.
setVisibility
(
View
.
GONE
);
}
if
(
item
.
type5CanClick
)
{
helper
.
getView
(
R
.
id
.
type5_parent
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
mOneCheckListener
.
showKeyboard
();
}
});
break
;
default
:
break
;
helper
.
addOnClickListener
(
R
.
id
.
tv_notes
);
}
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionMultiItem.java
View file @
8de7acb0
...
...
@@ -14,7 +14,7 @@ public class QuestionMultiItem implements MultiItemEntity {
public
String
type1Text
;
public
String
type2Text
;
/***type 3 单选 type 4 多选 */
/***type 3 单选 type 4 多选
type 6
*/
public
QuestionsBean
questionsBean
;
public
boolean
type4CanClick
;
...
...
@@ -26,6 +26,8 @@ public class QuestionMultiItem implements MultiItemEntity {
/***type5 展开or 收起*/
public
boolean
type5Open
=
true
;
public
int
type6Position
;
@Override
public
int
getItemType
()
{
return
viewType
;
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionOneCheckListener.kt
View file @
8de7acb0
...
...
@@ -21,4 +21,10 @@ interface QuestionOneCheckListener {
* 隐藏其他
*/
fun
hideOtherEdit
()
/**
* 主诉单选点击 多选确定按钮点击获取item信息
*/
fun
zsItemClick
(
answer
:
String
,
postion
:
Int
)
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/response/question/QuestionsBean.java
View file @
8de7acb0
...
...
@@ -3,6 +3,9 @@ package com.yidianling.uikit.custom.http.response.question;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author liupeng
*/
public
class
QuestionsBean
implements
Serializable
{
/**
...
...
m-im/src/main/java/com/yidianling/uikit/custom/http/response/question/QuestionsInfoBean.java
View file @
8de7acb0
...
...
@@ -27,6 +27,7 @@ public class QuestionsInfoBean {
*/
public
QuestionPaperBean
questionPaper
;
public
List
<
QuestionsBeanExample
>
questions
;
//无数据的默认题
public
List
<
QuestionsBean
>
extraQuestions
;
}
m-im/src/main/res_uikit/layout/im_view_question_infomation.xml
View file @
8de7acb0
...
...
@@ -64,11 +64,12 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_input"
android:layout_width=
"match_parent"
app:layout_constraintBottom_toTopOf=
"@id/tv_finish"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"parent"
tools:visibility=
"
visibl
e"
>
tools:visibility=
"
gon
e"
>
<TextView
android:id=
"@+id/tv_problem"
...
...
@@ -199,7 +200,7 @@
android:textSize=
"16sp"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"parent"
tools:visibility=
"
gon
e"
/>
tools:visibility=
"
visibl
e"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
...
...
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