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
3b3155e2
Commit
3b3155e2
authored
Jan 14, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : 云信通知,查询订单状态加入surplusInquiryTime 倒计时字段
parent
20a232d4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
87 additions
and
10 deletions
+87
-10
config.gradle
config.gradle
+2
-2
DoctorInquIryIngInfoBean.kt
m-im/src/main/java/com/yidianling/im/bean/DoctorInquIryIngInfoBean.kt
+6
-1
Type91Bean.kt
m-im/src/main/java/com/yidianling/medical/im/Type91Bean.kt
+6
-1
YDLP2PMessageActivity.java
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLP2PMessageActivity.java
+1
-1
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+58
-2
im_ydl_nim_message_fragment.xml
m-im/src/main/res_uikit/layout/im_ydl_nim_message_fragment.xml
+14
-3
No files found.
config.gradle
View file @
3b3155e2
...
...
@@ -12,7 +12,7 @@ ext {
"m-user-medical"
:
"0.0.61.90"
,
"m-home"
:
"0.0.22.70"
,
"m-im"
:
"0.0.20.76"
,
"m-im-medical"
:
"0.0.20.76
"
,
"m-im-medical"
:
"0.0.20.79
"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.10"
,
...
...
@@ -98,7 +98,7 @@ ext {
"m-user-medical"
:
"0.0.61.90"
,
"m-home"
:
"0.0.22.70"
,
"m-im"
:
"0.0.20.76"
,
"m-im-medical"
:
"0.0.20.76
"
,
"m-im-medical"
:
"0.0.20.79
"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.8"
,
...
...
m-im/src/main/java/com/yidianling/im/bean/DoctorInquIryIngInfoBean.kt
View file @
3b3155e2
...
...
@@ -6,10 +6,15 @@ data class DoctorInquIryIngInfoBean(
val
inquiryOrderId
:
String
,
//问诊订单状态: 10:待支付、 20:待接诊、 30:待诊断(已接诊、问诊中)、40:已完成、50:已结束、60:已关闭
val
status
:
Int
,
//问诊订单状态: 10:待支付、 20:待接诊、 30:待诊断(已接诊、问诊中)、40:已完成、50:已结束、60:已关闭
val
statusName
:
String
,
//当前用户是否和医生在问诊中0不在问诊中、1在问诊中(问诊中状态包括待诊断和已完成)
val
inquiryIng
:
Int
,
//医生ID
val
doctorId
:
String
,
//用户ID
val
userId
:
String
val
userId
:
String
,
//倒计时,单位秒
var
surplusInquiryTime
:
Long
)
m-im/src/main/java/com/yidianling/medical/im/Type91Bean.kt
View file @
3b3155e2
...
...
@@ -8,7 +8,12 @@ data class Type91Bean(
//订单状态
var
status
:
Int
,
//订单状态名称
var
statusName
:
String
var
statusName
:
String
,
//倒计时,单位秒
var
surplusInquiryTime
:
Long
,
var
surplusBeginTime
:
Long
,
var
surplusPayTime
:
Long
)
}
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLP2PMessageActivity.java
View file @
3b3155e2
...
...
@@ -224,7 +224,7 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
try
{
Type91Bean
type91Bean
=
new
Gson
().
fromJson
(
content
,
Type91Bean
.
class
);
if
(
type91Bean
.
getType
()
==
MESSAGE_TYPE
)
{
messageFragment
.
upReceiceType
(
type91Bean
.
getData
().
getStatus
(),
type91Bean
.
getData
().
getStatusName
());
messageFragment
.
upReceiceType
(
type91Bean
.
getData
().
getStatus
(),
type91Bean
.
getData
().
getStatusName
()
,
type91Bean
.
getData
().
getSurplusInquiryTime
()
);
}
}
catch
(
Exception
e
)
{
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
3b3155e2
...
...
@@ -2,9 +2,14 @@ package com.yidianling.uikit.business.session.fragment;
import
android.annotation.SuppressLint
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.media.AudioManager
;
import
android.os.Bundle
;
import
android.os.CountDownTimer
;
import
android.text.SpannableStringBuilder
;
import
android.text.Spanned
;
import
android.text.TextUtils
;
import
android.text.style.ForegroundColorSpan
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.View
;
...
...
@@ -143,6 +148,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private
TextView
tv_receive_unstart
;
//待诊断
private
TextView
tv_receive_undiagnosis
;
//待诊断 倒计时
private
TextView
time_count_down
;
private
CountDownTimer
timer
;
//诊断结束
private
TextView
tv_receive_end
;
private
int
expertInfoViewHeight
=
0
;
// 专家信息栏高度
...
...
@@ -182,6 +191,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
receive_unstart
=
rootView
.
findViewById
(
R
.
id
.
receive_unstart
);
//待诊断
receive_undiagnosis
=
rootView
.
findViewById
(
R
.
id
.
receive_undiagnosis
);
//问诊中 倒计时
time_count_down
=
rootView
.
findViewById
(
R
.
id
.
time_count_down
);
//诊断结束
receive_end
=
rootView
.
findViewById
(
R
.
id
.
receive_end
);
messageListView
.
setItemAnimator
(
null
);
...
...
@@ -480,7 +492,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
response
->
{
if
(
"200"
.
equals
(
response
.
code
))
{
upReceiceType
(
response
.
data
.
getStatus
(),
""
);
upReceiceType
(
response
.
data
.
getStatus
(),
response
.
data
.
getStatusName
(),
response
.
data
.
getSurplusInquiryTime
()
);
}
else
{
ToastUtil
.
toastShort
(
response
.
msg
);
...
...
@@ -499,7 +511,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
public
void
upReceiceType
(
int
type
,
String
statusName
)
{
public
void
upReceiceType
(
int
type
,
String
statusName
,
Long
time
)
{
if
(
ActionHandlerStorage
.
getL
(
sessionId
).
getUserType
()
==
USER_TYPE_EXPERT
)
{
if
(
type
==
30
)
{
// 30:待诊断(已接诊、问诊中)
...
...
@@ -511,6 +523,44 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if
(!
TextUtils
.
isEmpty
(
statusName
))
{
tv_receive_undiagnosis
.
setText
(
statusName
);
}
timer
=
new
CountDownTimer
(
time
*
1000
,
1
)
{
@Override
public
void
onTick
(
long
millisUntilFinished
)
{
//单位时
long
hour
=
millisUntilFinished
/
(
1000
*
60
*
60
);
//单位分
long
minute
=
(
millisUntilFinished
-
hour
*
(
1000
*
60
*
60
))
/
(
1000
*
60
);
//单位秒
long
second
=
(
millisUntilFinished
-
hour
*
(
1000
*
60
*
60
)
-
minute
*
(
1000
*
60
))
/
1000
;
String
timeStr
=
""
;
if
(
hour
!=
0
)
{
timeStr
=
hour
+
"小时"
+
minute
+
"分"
+
second
+
"秒"
;
}
else
if
(
hour
==
0
&&
minute
!=
0
)
{
timeStr
=
minute
+
"分"
+
second
+
"秒"
;
}
else
if
(
hour
==
0
&&
minute
==
0
&&
second
!=
0
)
{
timeStr
=
second
+
"秒"
;
}
if
(!
TextUtils
.
isEmpty
(
timeStr
)){
String
timeEnd
=
"后问诊结束"
;
SpannableStringBuilder
spannable
=
new
SpannableStringBuilder
(
timeStr
+
timeEnd
);
spannable
.
setSpan
(
new
ForegroundColorSpan
(
Color
.
parseColor
(
"#007AFF"
)),
0
,
timeStr
.
length
(),
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
time_count_down
.
setText
(
spannable
);
}
else
{
time_count_down
.
setText
(
""
);
}
}
@Override
public
void
onFinish
()
{
}
};
timer
.
start
();
}
else
if
(
type
==
20
)
{
//待接诊
...
...
@@ -532,9 +582,15 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if
(!
TextUtils
.
isEmpty
(
statusName
))
{
tv_receive_end
.
setText
(
statusName
);
}
if
(
timer
!=
null
)
{
timer
.
cancel
();
}
}
else
{
top_expert_info_ll
.
setVisibility
(
View
.
GONE
);
inputPanel
.
setVisible
(
false
);
if
(
timer
!=
null
)
{
timer
.
cancel
();
}
}
}
}
...
...
m-im/src/main/res_uikit/layout/im_ydl_nim_message_fragment.xml
View file @
3b3155e2
...
...
@@ -71,15 +71,15 @@
android:id=
"@+id/receive_undiagnosis"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
app:constraint_referenced_ids=
"iv_receive_undiagnosis,tv_receive_undiagnosis"
tools:visibility=
"
gon
e"
/>
app:constraint_referenced_ids=
"iv_receive_undiagnosis,tv_receive_undiagnosis
,time_count_down
"
tools:visibility=
"
visibl
e"
/>
<androidx.constraintlayout.widget.Group
android:id=
"@+id/receive_end"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
app:constraint_referenced_ids=
"iv_receive_end,tv_receive_end"
tools:visibility=
"
visibl
e"
/>
tools:visibility=
"
gon
e"
/>
<ImageView
android:id=
"@+id/iv_receive_unstart"
...
...
@@ -125,6 +125,17 @@
app:layout_constraintLeft_toRightOf=
"@id/iv_receive_undiagnosis"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/time_count_down"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"16dp"
android:textColor=
"#495C72"
android:textSize=
"14sp"
app:layout_constraintBaseline_toBaselineOf=
"@id/tv_receive_undiagnosis"
app:layout_constraintRight_toRightOf=
"parent"
tools:text=
"23小时58分21秒后问诊结束"
/>
<ImageView
android:id=
"@+id/iv_receive_end"
android:layout_width=
"wrap_content"
...
...
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