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
b8c73b1a
Commit
b8c73b1a
authored
Jul 06, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat :分配导医后置,时间判断前置
parent
4bc9694d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
35 deletions
+74
-35
config.gradle
config.gradle
+2
-2
IMChatUtil.kt
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
+24
-6
ImRetrofitApi.kt
m-im/src/main/java/com/yidianling/im/http/ImRetrofitApi.kt
+7
-2
CmsExamQuestionPaperActivity.kt
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
+29
-25
ServiceImpl.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
+12
-0
No files found.
config.gradle
View file @
b8c73b1a
...
...
@@ -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.
29
"
,
"m-im"
:
"0.0.19.
31
"
,
"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.
29
"
,
"m-im"
:
"0.0.19.
31
"
,
"m-dynamic"
:
"0.0.7.24"
,
"m-article"
:
"0.0.0.8"
,
...
...
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
View file @
b8c73b1a
...
...
@@ -178,13 +178,31 @@ object IMChatUtil {
.
compose
(
RxUtils
.
resultJavaData
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
CmsExamQuestionPaperActivity
.
start
(
context
,
chatItemBean
.
toUid
.
toString
(),
expertInfo
,
0
,
it
.
value1
.
subscribe
({
val
skipTime
=
it
.
value1
.
toLong
()
if
(
isJumpToIm
(
skipTime
))
{
SessionHelper
.
startP2PSession
(
context
,
chatItemBean
.
utype
,
chatItemBean
.
toUid
.
toString
(),
null
,
P2PCustomActionHandlerImpl
(
chatItemBean
)
)
}
else
{
CmsExamQuestionPaperActivity
.
start
(
context
,
chatItemBean
.
toUid
.
toString
(),
expertInfo
,
0
,
it
.
value1
)
}
},{
SessionHelper
.
startP2PSession
(
context
,
chatItemBean
.
utype
,
chatItemBean
.
toUid
.
toString
(),
null
,
P2PCustomActionHandlerImpl
(
chatItemBean
)
)
}
}
)
}
})
}
else
{
...
...
m-im/src/main/java/com/yidianling/im/http/ImRetrofitApi.kt
View file @
b8c73b1a
...
...
@@ -118,13 +118,18 @@ interface ImRetrofitApi {
/**已完成订单*/
@GET
(
"consult/user/order/affirmComplete"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
affirmComplete
(
@Query
(
"id"
)
orderId
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
fun
affirmComplete
(
@Query
(
"id"
)
orderId
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
//回答问题接口
@POST
(
"chat/sendCustomizeMessage"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
lingxiAnswerQuestion
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
//回答问题接口批量发送
@POST
(
"chat/batchSendCustomizeMessage"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
batchSendCustomizeMessage
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
//发送通知接口
@POST
(
"chat/sendNoticeMessage"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
...
...
@@ -134,7 +139,7 @@ interface ImRetrofitApi {
/**已完成订单*/
@GET
(
"systemconfig/getSystemConfigByKeyword"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
getSystemConfigByKeyword
(
@Query
(
"keyword"
)
keyword
:
String
):
Observable
<
BaseAPIResponse
<
SystemConfigByKeywordBean
>>
fun
getSystemConfigByKeyword
(
@Query
(
"keyword"
)
keyword
:
String
):
Observable
<
BaseAPIResponse
<
SystemConfigByKeywordBean
>>
//获取咨询助理uid
/*
...
...
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
View file @
b8c73b1a
...
...
@@ -729,22 +729,22 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
if
(
toUid
!=
null
)
{
//代表是聊天列表进来的
mType70RequestList
.
forEach
{
instance
.
lingxiAnswerQuestion
(
JSON
.
toJSONString
(
it
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
Schedulers
.
io
())
.
subscribe
()
}
mType71RequestList
.
forEach
{
instance
.
lingxiAnswerQuestion
(
JSON
.
toJSONString
(
it
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
Schedulers
.
io
())
.
subscribe
()
}
instance
.
batchSendCustomizeMessage
(
JSON
.
toJSONString
(
mType70RequestList
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
Schedulers
.
io
())
.
subscribe
()
instance
.
batchSendCustomizeMessage
(
JSON
.
toJSONString
(
mType71RequestList
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
Schedulers
.
io
())
.
subscribe
()
IMChatUtil
.
startChatSessionByCms
(
toUid
!!
,
expertInfo
,
isFromQingShu
,
this
@CmsExamQuestionPaperActivity
toUid
!!
,
expertInfo
,
isFromQingShu
,
this
@CmsExamQuestionPaperActivity
)
Handler
().
postDelayed
({
...
...
@@ -759,27 +759,31 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
.
subscribe
({
uidBean
->
if
(
uidBean
.
code
==
"200"
&&
uidBean
.
data
!=
0
.
toLong
())
{
mType70RequestList
.
forEach
{
it
.
toUid
=
uidBean
.
data
.
toString
()
instance
.
lingxiAnswerQuestion
(
JSON
.
toJSONString
(
it
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
Schedulers
.
io
())
.
subscribe
()
mType70RequestList
.
forEachIndexed
{
index
,
answerQuestionType70RequestBean
->
mType70RequestList
[
index
].
toUid
=
uidBean
.
data
.
toString
()
}
mType71RequestList
.
forEach
{
it
.
toUid
=
uidBean
.
data
.
toString
()
instance
.
lingxiAnswerQuestion
(
JSON
.
toJSONString
(
it
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
Schedulers
.
io
())
.
subscribe
()
instance
.
batchSendCustomizeMessage
(
JSON
.
toJSONString
(
mType70RequestList
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
Schedulers
.
io
())
.
subscribe
()
mType71RequestList
.
forEachIndexed
{
index
,
answerQuestionType71RequestBean
->
mType71RequestList
[
index
].
toUid
=
uidBean
.
data
.
toString
()
}
instance
.
batchSendCustomizeMessage
(
JSON
.
toJSONString
(
mType71RequestList
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
Schedulers
.
io
())
.
subscribe
()
IMChatUtil
.
startChat
(
this
@CmsExamQuestionPaperActivity
,
uidBean
.
data
.
toString
(),
0
)
Handler
().
postDelayed
({
finish
()
},
1000L
)
...
...
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
View file @
b8c73b1a
...
...
@@ -169,4 +169,15 @@ class ServiceImpl private constructor() {
return
YDLHttpUtils
.
obtainApi
(
ImRetrofitApi
::
class
.
java
).
lingxiAnswerQuestion
(
body
)
}
/**
* 去聊天批量发送 回答问题
*/
fun
batchSendCustomizeMessage
(
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
).
batchSendCustomizeMessage
(
body
)
}
}
\ No newline at end of file
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