Commit b8c73b1a by 刘鹏

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

parent 4bc9694d
...@@ -10,7 +10,7 @@ ext { ...@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.03", "m-fm" : "0.0.30.03",
"m-user" : "0.0.61.37", "m-user" : "0.0.61.37",
"m-home" : "0.0.22.67", "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-dynamic" : "0.0.7.24",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
...@@ -93,7 +93,7 @@ ext { ...@@ -93,7 +93,7 @@ ext {
"m-fm" : "0.0.30.01", "m-fm" : "0.0.30.01",
"m-user" : "0.0.61.37", "m-user" : "0.0.61.37",
"m-home" : "0.0.22.67", "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-dynamic" : "0.0.7.24",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
......
...@@ -178,13 +178,31 @@ object IMChatUtil { ...@@ -178,13 +178,31 @@ object IMChatUtil {
.compose(RxUtils.resultJavaData()) .compose(RxUtils.resultJavaData())
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe { .subscribe ({
val skipTime = it.value1.toLong()
if (isJumpToIm(skipTime)) {
SessionHelper.startP2PSession(
context,
chatItemBean.utype,
chatItemBean.toUid.toString(),
null,
P2PCustomActionHandlerImpl(chatItemBean)
)
}else{
CmsExamQuestionPaperActivity.start( CmsExamQuestionPaperActivity.start(
context, chatItemBean.toUid.toString(), expertInfo, context, chatItemBean.toUid.toString(), expertInfo,
0, it.value1 0, it.value1
) )
} }
},{
SessionHelper.startP2PSession(
context,
chatItemBean.utype,
chatItemBean.toUid.toString(),
null,
P2PCustomActionHandlerImpl(chatItemBean)
)
})
} }
}) })
} else { } else {
......
...@@ -118,13 +118,18 @@ interface ImRetrofitApi { ...@@ -118,13 +118,18 @@ interface ImRetrofitApi {
/**已完成订单*/ /**已完成订单*/
@GET("consult/user/order/affirmComplete") @GET("consult/user/order/affirmComplete")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @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") @POST("chat/sendCustomizeMessage")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun lingxiAnswerQuestion(@Body body: RequestBody): Observable<BaseAPIResponse<Any>> 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") @POST("chat/sendNoticeMessage")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
...@@ -134,7 +139,7 @@ interface ImRetrofitApi { ...@@ -134,7 +139,7 @@ interface ImRetrofitApi {
/**已完成订单*/ /**已完成订单*/
@GET("systemconfig/getSystemConfigByKeyword") @GET("systemconfig/getSystemConfigByKeyword")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @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 //获取咨询助理uid
/* /*
......
...@@ -729,22 +729,22 @@ class CmsExamQuestionPaperActivity : BaseActivity() { ...@@ -729,22 +729,22 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
if (toUid != null) { if (toUid != null) {
//代表是聊天列表进来的 //代表是聊天列表进来的
mType70RequestList.forEach {
instance.lingxiAnswerQuestion(JSON.toJSONString(it)) instance.batchSendCustomizeMessage(JSON.toJSONString(mType70RequestList))
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(Schedulers.io()) .observeOn(Schedulers.io())
.subscribe() .subscribe()
}
mType71RequestList.forEach { instance.batchSendCustomizeMessage(JSON.toJSONString(mType71RequestList))
instance.lingxiAnswerQuestion(JSON.toJSONString(it))
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(Schedulers.io()) .observeOn(Schedulers.io())
.subscribe() .subscribe()
}
IMChatUtil.startChatSessionByCms( IMChatUtil.startChatSessionByCms(
toUid!!, expertInfo, isFromQingShu, this@CmsExamQuestionPaperActivity toUid!!,
expertInfo,
isFromQingShu,
this@CmsExamQuestionPaperActivity
) )
Handler().postDelayed({ Handler().postDelayed({
...@@ -759,27 +759,31 @@ class CmsExamQuestionPaperActivity : BaseActivity() { ...@@ -759,27 +759,31 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
.subscribe({ uidBean -> .subscribe({ uidBean ->
if (uidBean.code == "200" && uidBean.data != 0.toLong()) { if (uidBean.code == "200" && uidBean.data != 0.toLong()) {
mType70RequestList.forEach {
it.toUid = uidBean.data.toString() mType70RequestList.forEachIndexed { index, answerQuestionType70RequestBean ->
instance.lingxiAnswerQuestion(JSON.toJSONString(it)) mType70RequestList[index].toUid = uidBean.data.toString()
}
instance.batchSendCustomizeMessage(JSON.toJSONString(mType70RequestList))
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(Schedulers.io()) .observeOn(Schedulers.io())
.subscribe() .subscribe()
mType71RequestList.forEachIndexed { index, answerQuestionType71RequestBean ->
mType71RequestList[index].toUid = uidBean.data.toString()
} }
mType71RequestList.forEach { instance.batchSendCustomizeMessage(JSON.toJSONString(mType71RequestList))
it.toUid = uidBean.data.toString()
instance.lingxiAnswerQuestion(JSON.toJSONString(it))
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(Schedulers.io()) .observeOn(Schedulers.io())
.subscribe() .subscribe()
}
IMChatUtil.startChat( IMChatUtil.startChat(
this@CmsExamQuestionPaperActivity, this@CmsExamQuestionPaperActivity,
uidBean.data.toString(), uidBean.data.toString(),
0 0
) )
Handler().postDelayed({ Handler().postDelayed({
finish() finish()
}, 1000L) }, 1000L)
......
...@@ -169,4 +169,15 @@ class ServiceImpl private constructor() { ...@@ -169,4 +169,15 @@ class ServiceImpl private constructor() {
return YDLHttpUtils.obtainApi(ImRetrofitApi::class.java).lingxiAnswerQuestion(body) 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