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
72b3fd63
Commit
72b3fd63
authored
Jul 07, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:选择题修改
parent
4b9462e5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
17 deletions
+11
-17
config.gradle
config.gradle
+2
-2
CustomAttachLingxiAnswerQuestion.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachLingxiAnswerQuestion.java
+4
-0
MsgViewHolderLingxiWhichQuestion.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
+5
-15
No files found.
config.gradle
View file @
72b3fd63
...
...
@@ -10,7 +10,7 @@ ext {
"m-fm"
:
"0.0.30.03"
,
"m-user"
:
"0.0.61.37"
,
"m-home"
:
"0.0.22.67"
,
"m-im"
:
"0.0.19.3
6
"
,
"m-im"
:
"0.0.19.3
7
"
,
"m-dynamic"
:
"0.0.7.24"
,
"m-article"
:
"0.0.0.10"
,
...
...
@@ -93,7 +93,7 @@ ext {
"m-fm"
:
"0.0.30.01"
,
"m-user"
:
"0.0.61.37"
,
"m-home"
:
"0.0.22.67"
,
"m-im"
:
"0.0.19.3
6
"
,
"m-im"
:
"0.0.19.3
7
"
,
"m-dynamic"
:
"0.0.7.24"
,
"m-article"
:
"0.0.0.8"
,
...
...
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachLingxiAnswerQuestion.java
View file @
72b3fd63
...
...
@@ -9,10 +9,12 @@ import java.util.ArrayList;
public
class
CustomAttachLingxiAnswerQuestion
extends
CustomAttachment
{
private
final
String
ANSWERS
=
"answers"
;
private
final
String
QUESTIONID
=
"questionId"
;
private
final
String
EXAMID
=
"examId"
;
public
ArrayList
<
QuestionItemBean
>
answers
;
public
String
questionId
;
public
String
examId
;
public
CustomAttachLingxiAnswerQuestion
()
{
super
(
CustomAttachmentType
.
TYPE_LINGXI_ANSWER_QUESTION
);
...
...
@@ -21,6 +23,7 @@ public class CustomAttachLingxiAnswerQuestion extends CustomAttachment{
protected
void
parseData
(
JSONObject
data
)
{
this
.
answers
=(
ArrayList
<
QuestionItemBean
>)
JSON
.
parseArray
(
data
.
getString
(
ANSWERS
),
QuestionItemBean
.
class
);
this
.
questionId
=
data
.
getString
(
QUESTIONID
);
this
.
examId
=
data
.
getString
(
EXAMID
);
}
@Override
...
...
@@ -28,6 +31,7 @@ public class CustomAttachLingxiAnswerQuestion extends CustomAttachment{
JSONObject
data
=
new
JSONObject
();
data
.
put
(
ANSWERS
,
answers
);
data
.
put
(
QUESTIONID
,
questionId
);
data
.
put
(
EXAMID
,
examId
);
return
data
;
}
}
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
View file @
72b3fd63
...
...
@@ -25,7 +25,6 @@ import com.yidianling.im.router.ImIn;
import
com.yidianling.im.session.extension.CustomAttachLingxiAnswerQuestion
;
import
com.yidianling.im.session.extension.CustomAttachLingxiWhichQuestion
;
import
com.yidianling.im.session.viewholder.adapter.AdapterLingxiMultipleChoice
;
import
com.yidianling.im.session.viewholder.adapter.AdapterLingxiWhichQuestion
;
import
com.yidianling.im.session.viewholder.bean.AnswerBean
;
import
com.yidianling.im.session.viewholder.bean.AnswersItem
;
import
com.yidianling.im.session.viewholder.bean.LingxiAnswerBean
;
...
...
@@ -69,7 +68,7 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
private
ArrayList
<
AnswersItem
>
answersItems
=
new
ArrayList
<>();
Map
<
String
,
Object
>
mapMessageFromCustom
;
Map
map1
=
new
HashMap
();
private
ArrayList
<
String
>
answeredExamid
=
new
ArrayList
<>();
public
MsgViewHolderLingxiWhichQuestion
(
BaseMultiItemFetchLoadAdapter
adapter
)
{
super
(
adapter
);
}
...
...
@@ -127,13 +126,10 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
MsgAttachment
attachment
=
msg
.
getAttachment
();
if
(
attachment
instanceof
CustomAttachLingxiAnswerQuestion
)
{
CustomAttachLingxiAnswerQuestion
customattachlingxianswerquestion
=
(
CustomAttachLingxiAnswerQuestion
)
attachment
;
map1
.
put
(
customattachlingxianswerquestion
.
questionId
,
true
);
map1
.
put
(
customattachlingxianswerquestion
.
questionId
+
customattachlingxianswerquestion
.
examId
,
true
);
mapMessageFromCustom
=
map1
;
UpdateFromLocalExtention
();
LogUtil
.
e
(
"aaaaaquestionID:"
+
customattachlingxianswerquestion
.
questionId
);
}
else
{
//用户没有回答问题;
}
}
}
...
...
@@ -154,17 +150,12 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
private
void
UpdateFromLocalExtention
()
{
try
{
Map
<
String
,
Object
>
mapMessage
;
Map
<
String
,
Object
>
mapMessage
=
new
HashMap
<>()
;
if
(
mapMessageFromCustom
!=
null
){
mapMessage
=
mapMessageFromCustom
;
}
else
{
mapMessage
=
message
.
getLocalExtension
();
}
if
(
mapMessage
!=
null
)
{
Object
questionPaperId
=
mapMessage
.
get
(
customAttachLingxiWhichQuestion
.
id
);
LogUtil
.
e
(
"aaaaaIDIDI:"
+
customAttachLingxiWhichQuestion
.
id
);
Object
questionPaperId
=
mapMessage
.
get
(
customAttachLingxiWhichQuestion
.
id
+
customAttachLingxiWhichQuestion
.
examId
);
if
(
questionPaperId
!=
null
)
{
boolean
b
=
(
boolean
)
questionPaperId
;
if
(
b
)
{
...
...
@@ -176,7 +167,6 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
confirm_multiple_choice
.
setVisibility
(
View
.
VISIBLE
);
}
}
else
{
//隐藏回答的信息
if
(
singleOrMultipletype
.
contains
(
"radio"
)){
recycleviewMultipleChoice
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
...
...
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