Commit b8c73b1a by 刘鹏

feat :分配导医后置,时间判断前置

parent 4bc9694d
......@@ -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",
......
......@@ -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 {
......
......@@ -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
/*
......
......@@ -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)
......
......@@ -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
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