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
a50a6fe1
Commit
a50a6fe1
authored
Jul 03, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前置信息收集逻辑完善
parent
94c76795
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
111 additions
and
3 deletions
+111
-3
CmsExamQuestionPaperActivity.kt
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
+47
-1
QuestionAdapter.java
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionAdapter.java
+9
-1
QuestionMultiItem.java
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionMultiItem.java
+1
-0
QuestionOneCheckListener.kt
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionOneCheckListener.kt
+4
-1
ServiceImpl.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
+13
-0
AnswerQuestionType70RequestBean.java
m-im/src/main/java/com/yidianling/uikit/custom/http/response/question/AnswerQuestionType70RequestBean.java
+9
-0
AnswerQuestionType71RequestBean.java
m-im/src/main/java/com/yidianling/uikit/custom/http/response/question/AnswerQuestionType71RequestBean.java
+27
-0
item_left_describe_layout.xml
m-im/src/main/res/layout/item_left_describe_layout.xml
+1
-0
No files found.
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
View file @
a50a6fe1
...
@@ -140,6 +140,16 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
...
@@ -140,6 +140,16 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
},
500L
)
},
500L
)
}
}
override
fun
showKeyboard
()
{
//显示输入框
cl_input
.
visibility
=
LinearLayout
.
VISIBLE
tv_problem
.
visibility
=
LinearLayout
.
GONE
hsv_problem_tips
.
visibility
=
LinearLayout
.
VISIBLE
et_input_problem
.
hint
=
"请简单描述遇到的问题……\n\n\n"
// 打开软件盘
showInputMethod
(
et_input_problem
)
}
override
fun
hideOtherEdit
()
{
override
fun
hideOtherEdit
()
{
//隐藏其他软键盘
//隐藏其他软键盘
et_input_problem
.
setText
(
""
)
et_input_problem
.
setText
(
""
)
...
@@ -185,6 +195,28 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
...
@@ -185,6 +195,28 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
showSkipDialog
()
showSkipDialog
()
}
}
tv_finish
.
setOnClickListener
{
tv_finish
.
setOnClickListener
{
mType70RequestList
.
forEach
{
instance
.
lingxiAnswerQuestion
(
JSON
.
toJSONString
(
it
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
Schedulers
.
io
())
.
subscribe
()
}
val
answerQuestionType71RequestBean
=
AnswerQuestionType71RequestBean
()
val
dataBean
=
AnswerQuestionType71RequestBean
.
DataBean
()
dataBean
.
answer
=
lastAnswer
answerQuestionType71RequestBean
.
data
=
dataBean
answerQuestionType71RequestBean
.
toUid
=
toUid
answerQuestionType71RequestBean
.
fromUid
=
ImIn
.
getUserInfo
()
?.
uid
instance
.
lingxiAnswerQuestion
(
JSON
.
toJSONString
(
answerQuestionType71RequestBean
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
Schedulers
.
io
())
.
subscribe
()
Handler
().
postDelayed
({
skipToIm
()
},
500L
)
}
}
...
@@ -194,6 +226,18 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
...
@@ -194,6 +226,18 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
//最后一题 点击发送
//最后一题 点击发送
lastAnswer
=
et_input_problem
.
text
.
toString
()
lastAnswer
=
et_input_problem
.
text
.
toString
()
tv_finish
.
visibility
=
View
.
VISIBLE
tv_finish
.
visibility
=
View
.
VISIBLE
val
questionMultiItem
=
QuestionMultiItem
()
questionMultiItem
.
type2Text
=
lastAnswer
questionMultiItem
.
viewType
=
2
mData
.
add
(
questionMultiItem
)
mQuestionAdapter
.
notifyDataSetChanged
()
//滑动到底部
recycle
.
scrollToPosition
(
mData
.
size
-
1
)
mData
.
forEachIndexed
{
index
,
_
->
mData
[
index
].
type5CanClick
=
false
}
}
else
{
}
else
{
//答题过程中点击 其他的弹窗
//答题过程中点击 其他的弹窗
otherQuestionsBean
?.
let
{
it1
->
otherQuestionsBean
?.
let
{
it1
->
...
@@ -204,7 +248,6 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
...
@@ -204,7 +248,6 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
}
}
}
}
et_input_problem
.
setText
(
""
)
et_input_problem
.
setText
(
""
)
hideInputMethod
(
et_input_problem
)
hideInputMethod
(
et_input_problem
)
//隐藏输入框
//隐藏输入框
...
@@ -440,6 +483,9 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
...
@@ -440,6 +483,9 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
val
type70RequestBean
=
AnswerQuestionType70RequestBean
()
val
type70RequestBean
=
AnswerQuestionType70RequestBean
()
type70RequestBean
.
data
=
answerQuestionRequestBean
type70RequestBean
.
data
=
answerQuestionRequestBean
type70RequestBean
.
fromUid
=
ImIn
.
getUserInfo
()
?.
uid
type70RequestBean
.
toUid
=
toUid
//添加回答数据到
//添加回答数据到
mType70RequestList
.
add
(
type70RequestBean
)
mType70RequestList
.
add
(
type70RequestBean
)
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionAdapter.java
View file @
a50a6fe1
...
@@ -103,8 +103,16 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
...
@@ -103,8 +103,16 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
type5_line
.
setVisibility
(
View
.
GONE
);
type5_line
.
setVisibility
(
View
.
GONE
);
example
.
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
();
}
});
helper
.
addOnClickListener
(
R
.
id
.
tv_notes
);
helper
.
addOnClickListener
(
R
.
id
.
tv_notes
);
}
break
;
break
;
default
:
default
:
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionMultiItem.java
View file @
a50a6fe1
...
@@ -22,6 +22,7 @@ public class QuestionMultiItem implements MultiItemEntity {
...
@@ -22,6 +22,7 @@ public class QuestionMultiItem implements MultiItemEntity {
* type5
* type5
*/
*/
public
QuestionsBeanExample
type5Bean
;
public
QuestionsBeanExample
type5Bean
;
public
boolean
type5CanClick
=
true
;
/***type5 展开or 收起*/
/***type5 展开or 收起*/
public
boolean
type5Open
=
true
;
public
boolean
type5Open
=
true
;
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionOneCheckListener.kt
View file @
a50a6fe1
...
@@ -13,7 +13,10 @@ interface QuestionOneCheckListener {
...
@@ -13,7 +13,10 @@ interface QuestionOneCheckListener {
* 展示其他
* 展示其他
*/
*/
fun
showOtherEdit
(
list
:
List
<
OptionsBean
>,
question
:
QuestionsBean
)
fun
showOtherEdit
(
list
:
List
<
OptionsBean
>,
question
:
QuestionsBean
)
/**
*展示软键盘
* */
fun
showKeyboard
()
/**
/**
* 隐藏其他
* 隐藏其他
*/
*/
...
...
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
View file @
a50a6fe1
...
@@ -3,6 +3,7 @@ package com.yidianling.uikit.custom.http
...
@@ -3,6 +3,7 @@ package com.yidianling.uikit.custom.http
import
com.alibaba.fastjson.JSON
import
com.alibaba.fastjson.JSON
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlnet.YDLHttpUtils
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.im.http.ImRetrofitApi
import
com.yidianling.uikit.custom.http.response.*
import
com.yidianling.uikit.custom.http.response.*
import
com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
import
com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
import
io.reactivex.Observable
import
io.reactivex.Observable
...
@@ -157,4 +158,15 @@ class ServiceImpl private constructor() {
...
@@ -157,4 +158,15 @@ class ServiceImpl private constructor() {
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
answerQuestion
(
id
,
body
)
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
answerQuestion
(
id
,
body
)
}
}
/**
* 去聊天 回答问题
*/
fun
lingxiAnswerQuestion
(
params
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
{
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
params
)
as
RequestBody
return
YDLHttpUtils
.
obtainApi
(
ImRetrofitApi
::
class
.
java
).
lingxiAnswerQuestion
(
body
)
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/response/question/AnswerQuestionType70RequestBean.java
View file @
a50a6fe1
...
@@ -10,6 +10,15 @@ package com.yidianling.uikit.custom.http.response.question;
...
@@ -10,6 +10,15 @@ package com.yidianling.uikit.custom.http.response.question;
* 地址 https://note.youdao.com/ynoteshare1/index.html?id=ac018cb5b65b7d5fc5e961410b14621a&type=note
* 地址 https://note.youdao.com/ynoteshare1/index.html?id=ac018cb5b65b7d5fc5e961410b14621a&type=note
*/
*/
public
class
AnswerQuestionType70RequestBean
{
public
class
AnswerQuestionType70RequestBean
{
/**
* 顾问or咨询师id
*/
public
String
toUid
;
/**
* 用户id
*/
public
String
fromUid
;
public
String
type
=
"70"
;
public
String
type
=
"70"
;
public
AnswerQuestionRequestBean
data
;
public
AnswerQuestionRequestBean
data
;
}
}
m-im/src/main/java/com/yidianling/uikit/custom/http/response/question/AnswerQuestionType71RequestBean.java
0 → 100644
View file @
a50a6fe1
package
com
.
yidianling
.
uikit
.
custom
.
http
.
response
.
question
;
/**
* @author liupeng
* <p>
* 测试前置-回答消息(区分其他类型与主诉类型)
* 用户APP -》灵犀
* type 70
* <p>
* 地址 https://note.youdao.com/ynoteshare1/index.html?id=ac018cb5b65b7d5fc5e961410b14621a&type=note
*/
public
class
AnswerQuestionType71RequestBean
{
public
String
type
=
"71"
;
/**
* 顾问or咨询师id
*/
public
String
toUid
;
/**
* 用户id
*/
public
String
fromUid
;
public
DataBean
data
;
public
static
class
DataBean
{
public
String
answer
;
}
}
m-im/src/main/res/layout/item_left_describe_layout.xml
View file @
a50a6fe1
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:id=
"@+id/type5_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
>
<ImageView
<ImageView
...
...
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