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
9854d2a5
Commit
9854d2a5
authored
Jul 06, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/yk_sort_2' into 'd/v4.4.01'
Feat/yk sort 2 See merge request app_android_lib/YDL-Component!232
parents
7caf25d2
3a701987
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
70 additions
and
74 deletions
+70
-74
config.gradle
config.gradle
+2
-2
ExpertSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
+2
-5
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+2
-2
ExpertSearchPresenter.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchPresenter.kt
+17
-5
EnquiryItem.kt
m-consultant/src/main/java/com/yidianling/consultant/model/bean/EnquiryItem.kt
+3
-2
Filters.kt
m-consultant/src/main/java/com/yidianling/consultant/model/bean/Filters.kt
+3
-2
PriceRangesItem.kt
m-consultant/src/main/java/com/yidianling/consultant/model/bean/PriceRangesItem.kt
+9
-6
FilterPopupWindow.kt
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
+25
-41
consultant_item_price_range.xml
m-consultant/src/main/res/layout/consultant_item_price_range.xml
+1
-3
consultant_layout_search_content.xml
m-consultant/src/main/res/layout/consultant_layout_search_content.xml
+1
-1
consultant_ui_filter_popup.xml
m-consultant/src/main/res/layout/consultant_ui_filter_popup.xml
+5
-5
No files found.
config.gradle
View file @
9854d2a5
...
...
@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.50.50"
,
"m-consultant"
:
"0.0.60.7
4
"
,
"m-consultant"
:
"0.0.60.7
7
"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.72"
,
"m-home"
:
"0.0.24.00"
,
...
...
@@ -89,7 +89,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.50.50"
,
"m-consultant"
:
"0.0.60.7
4
"
,
"m-consultant"
:
"0.0.60.7
7
"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.72"
,
"m-home"
:
"0.0.24.00"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
View file @
9854d2a5
...
...
@@ -114,10 +114,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
private
const
val
FILTER_STATUS_NORMAL
=
0
//默认筛选状态
private
const
val
FILTER_STATUS_FILTERED
=
1
//非默认筛选状态
private
const
val
FILTER_STATUS_OPEN
=
2
//筛选窗打开状态
const
val
FROM_HOME_SREARCH
=
0
const
val
FROM_FIND_EXPERT
=
1
const
val
FROM_ONLINE_EXPERT
=
2
const
val
PAGE_SIZE
=
15
fun
newIntent
(
activity
:
Activity
,
...
...
@@ -1061,8 +1058,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
viewDim
.
visibility
=
View
.
INVISIBLE
viewDim_filter
.
visibility
=
View
.
GONE
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
doctorEdu
.
size
+
allFilter
.
title
.
size
>
0
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
min
P
rice
)
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
max
P
rice
)
allFilter
.
priceRanges
?.
min
_p
rice
)
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
max
_p
rice
)
)
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_FILTERED
)
}
else
{
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
9854d2a5
...
...
@@ -940,8 +940,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
viewDim
.
visibility
=
View
.
INVISIBLE
viewDim_filter
.
visibility
=
View
.
GONE
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
doctorEdu
.
size
+
allFilter
.
title
.
size
+
allFilter
.
specialityCrowd
.
size
>
0
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
min
P
rice
)
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
max
P
rice
)
allFilter
.
priceRanges
?.
min
_p
rice
)
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
max
_p
rice
)
)
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_FILTERED
)
}
else
{
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchPresenter.kt
View file @
9854d2a5
...
...
@@ -87,10 +87,18 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
filterMap
[
"tags.tag_id"
]
=
categoriesMap
}
// 地区
if
(
allFilter
.
region
.
value
==
"海外"
)
{
if
(
allFilter
.
region
.
code
==
"ABROAD"
)
{
// 海外
if
(
allFilter
.
region
.
code
==
allFilter
.
sub
.
code
){
// 海外不限
val
abroadMap
=
HashMap
<
String
,
Any
>()
abroadMap
[
"ne"
]
=
"1"
filterMap
[
"country_code"
]
=
abroadMap
}
else
{
filterMap
[
"country_code"
]
=
allFilter
.
sub
.
code
!!
}
}
else
if
(
allFilter
.
region
.
code
==
"1"
&&
allFilter
.
region
.
code
==
allFilter
.
sub
.
code
){
// 全国不限
filterMap
[
"country_code"
]
=
allFilter
.
sub
.
code
}
else
{
if
(
allFilter
.
region
.
code
!=
null
&&
allFilter
.
region
.
code
!=
"1"
)
{
}
else
{
if
(
allFilter
.
region
.
code
!=
null
)
{
filterMap
[
"province_code"
]
=
allFilter
.
region
.
code
}
if
(
allFilter
.
sub
.
code
!=
null
&&
allFilter
.
sub
.
code
!=
allFilter
.
region
.
code
)
{
...
...
@@ -110,8 +118,12 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
// 服务均价
if
(
allFilter
.
priceRanges
!=
null
)
{
val
avgPriceMap
=
HashMap
<
String
,
Any
?>()
avgPriceMap
[
"gte"
]
=
allFilter
.
priceRanges
?.
minPrice
avgPriceMap
[
"lte"
]
=
allFilter
.
priceRanges
?.
maxPrice
if
(!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
min_price
)){
avgPriceMap
[
"gte"
]
=
allFilter
.
priceRanges
?.
min_price
}
if
(!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
max_price
))
{
avgPriceMap
[
"lte"
]
=
allFilter
.
priceRanges
?.
max_price
}
filterMap
[
"avg_price"
]
=
avgPriceMap
}
// 年龄
...
...
m-consultant/src/main/java/com/yidianling/consultant/model/bean/EnquiryItem.kt
View file @
9854d2a5
...
...
@@ -10,6 +10,6 @@ data class EnquiryItem(
@field
:
SerializedName
(
"key"
)
val
key
:
Int
,
val
check
R
rl
:
String
?,
val
un
CheckU
rl
:
String
?
val
check
_u
rl
:
String
?,
val
un
_check_u
rl
:
String
?
)
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/model/bean/Filters.kt
View file @
9854d2a5
...
...
@@ -30,7 +30,7 @@ data class Filters(
/**
* 服务均价
*/
@field
:
SerializedName
(
"price
R
anges"
)
@field
:
SerializedName
(
"price
_r
anges"
)
val
priceRanges
:
List
<
PriceRangesItem
>
=
ArrayList
(),
/**
...
...
@@ -49,6 +49,6 @@ data class Filters(
/**
* 擅长人群
*/
@field
:
SerializedName
(
"speciality
C
rowd"
)
@field
:
SerializedName
(
"speciality
_c
rowd"
)
val
specialityCrowd
:
ArrayList
<
SpecialityCrowdBean
>
=
ArrayList
()
)
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/model/bean/PriceRangesItem.kt
View file @
9854d2a5
...
...
@@ -4,12 +4,14 @@ import com.google.gson.annotations.SerializedName
data class
PriceRangesItem
(
@field
:
SerializedName
(
"min
P
rice"
)
var
min
P
rice
:
String
?
=
null
,
@field
:
SerializedName
(
"min
_p
rice"
)
var
min
_p
rice
:
String
?
=
null
,
@field
:
SerializedName
(
"max
P
rice"
)
var
max
P
rice
:
String
?
=
null
,
@field
:
SerializedName
(
"max
_p
rice"
)
var
max
_p
rice
:
String
?
=
null
,
@SerializedName
(
"recommendPercent"
)
var
recommendPercent
:
String
?
=
null
@SerializedName
(
"recommend_percent"
)
var
recommend_percent
:
String
?
=
null
,
var
display_range
:
String
?
=
null
)
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
View file @
9854d2a5
...
...
@@ -43,7 +43,6 @@ class FilterPopupWindow(
private
val
tempFilter
:
AllFilter
)
:
PopupWindow
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
{
private
val
mDisposableList
=
CompositeDisposable
()
private
val
showTypeViews
:
ArrayList
<
View
>
=
ArrayList
()
private
val
enquiryViews
:
ArrayList
<
View
>
=
ArrayList
()
...
...
@@ -168,7 +167,7 @@ class FilterPopupWindow(
tempFilter
.
enquiries
.
forEach
{
if
(
textView
.
text
.
toString
()
==
it
.
value
)
{
Glide
.
with
(
context
)
.
load
(
it
.
un
CheckU
rl
)
.
load
(
it
.
un
_check_u
rl
)
.
into
(
ivIcon
)
}
}
...
...
@@ -269,15 +268,15 @@ class FilterPopupWindow(
}
if
(
tempFilter
.
priceRanges
!=
null
)
{
sb
.
append
(
"&minPrice="
).
append
(
tempFilter
.
priceRanges
?.
min
P
rice
)
sb
.
append
(
"&maxPrice="
).
append
(
tempFilter
.
priceRanges
?.
max
P
rice
)
sb
.
append
(
"&minPrice="
).
append
(
tempFilter
.
priceRanges
?.
min
_p
rice
)
sb
.
append
(
"&maxPrice="
).
append
(
tempFilter
.
priceRanges
?.
max
_p
rice
)
if
(
ConsultBIConstants
.
POSITION_AVERAGE_SERVICE_INPUT
==
biEventName
)
{
var
account
=
0.0
if
(!
TextUtils
.
isEmpty
(
tempFilter
.
priceRanges
?.
min
P
rice
))
{
account
+=
tempFilter
.
priceRanges
?.
min
P
rice
?.
toDouble
()
!!
if
(!
TextUtils
.
isEmpty
(
tempFilter
.
priceRanges
?.
min
_p
rice
))
{
account
+=
tempFilter
.
priceRanges
?.
min
_p
rice
?.
toDouble
()
!!
}
if
(!
TextUtils
.
isEmpty
(
tempFilter
.
priceRanges
?.
max
P
rice
))
{
account
+=
tempFilter
.
priceRanges
?.
max
P
rice
?.
toDouble
()
!!
if
(!
TextUtils
.
isEmpty
(
tempFilter
.
priceRanges
?.
max
_p
rice
))
{
account
+=
tempFilter
.
priceRanges
?.
max
_p
rice
?.
toDouble
()
!!
}
biEventParams
=
((
account
/
2
).
roundToInt
()).
toString
()
...
...
@@ -334,9 +333,6 @@ class FilterPopupWindow(
}
}
fun
addSubscription
(
disposable
:
Disposable
)
{
mDisposableList
.
add
(
disposable
)
}
/**
* 其他选择
...
...
@@ -573,7 +569,7 @@ class FilterPopupWindow(
llLayout
.
layoutParams
=
params
textView
.
text
=
enquiry
.
value
Glide
.
with
(
context
)
.
load
(
enquiry
.
un
CheckU
rl
)
.
load
(
enquiry
.
un
_check_u
rl
)
.
into
(
ivIcon
)
enquiryViews
.
add
(
llLayout
)
...
...
@@ -581,7 +577,7 @@ class FilterPopupWindow(
llLayout
.
isSelected
=
true
textView
.
paint
.
isFakeBoldText
=
true
Glide
.
with
(
context
)
.
load
(
enquiry
.
check
R
rl
)
.
load
(
enquiry
.
check
_u
rl
)
.
into
(
ivIcon
)
}
llLayout
.
setOnClickListener
{
...
...
@@ -590,14 +586,14 @@ class FilterPopupWindow(
llLayout
.
isSelected
=
false
textView
.
paint
.
isFakeBoldText
=
false
Glide
.
with
(
context
)
.
load
(
enquiry
.
un
CheckU
rl
)
.
load
(
enquiry
.
un
_check_u
rl
)
.
into
(
ivIcon
)
}
else
{
tempFilter
.
enquiries
.
add
(
enquiry
)
llLayout
.
isSelected
=
true
textView
.
paint
.
isFakeBoldText
=
true
Glide
.
with
(
context
)
.
load
(
enquiry
.
check
R
rl
)
.
load
(
enquiry
.
check
_u
rl
)
.
into
(
ivIcon
)
}
updateCount
(
ConsultBIConstants
.
POSITION_CONSULT_TYPE_CLICK
)
...
...
@@ -607,14 +603,13 @@ class FilterPopupWindow(
}
private
fun
initPriceViews
(
view
:
View
)
{
val
priceRange
=
View
.
inflate
(
context
,
R
.
layout
.
consultant_item_price_range
,
null
)
as
LinearLayout
val
priceRange
=
View
.
inflate
(
context
,
R
.
layout
.
consultant_item_price_range
,
null
)
as
LinearLayout
etMinPrice
=
priceRange
.
findViewById
(
R
.
id
.
etMinPrice
);
etMaxPrice
=
priceRange
.
findViewById
(
R
.
id
.
etMaxPrice
);
val
imm
=
context
.
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
)
as
InputMethodManager
//
context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
va
r
listener
:
TextView
.
OnEditorActionListener
=
va
l
listener
:
TextView
.
OnEditorActionListener
=
TextView
.
OnEditorActionListener
{
_
,
actionId
,
event
->
if
(
actionId
==
EditorInfo
.
IME_ACTION_DONE
||
event
!=
null
&&
event
.
keyCode
==
KeyEvent
.
KEYCODE_ENTER
)
{
updatePriceFilter
()
...
...
@@ -625,8 +620,8 @@ class FilterPopupWindow(
}
if
(
tempFilter
.
priceRanges
!=
null
)
{
etMinPrice
?.
setText
(
tempFilter
.
priceRanges
?.
min
P
rice
)
etMaxPrice
?.
setText
(
tempFilter
.
priceRanges
?.
max
P
rice
)
etMinPrice
?.
setText
(
tempFilter
.
priceRanges
?.
min
_p
rice
)
etMaxPrice
?.
setText
(
tempFilter
.
priceRanges
?.
max
_p
rice
)
}
etMaxPrice
?.
setOnEditorActionListener
(
listener
)
...
...
@@ -673,16 +668,7 @@ class FilterPopupWindow(
0
)
textView
.
layoutParams
=
params
val
maxPriceStr
=
if
(
TextUtils
.
isEmpty
(
priceRangesItem
.
maxPrice
))
"+"
else
"-"
+
priceRangesItem
.
maxPrice
val
contentStr
=
String
.
format
(
"%s%s\n%s"
,
priceRangesItem
.
minPrice
,
maxPriceStr
,
priceRangesItem
.
recommendPercent
)
val
contentStr
=
String
.
format
(
"%s\n%s"
,
priceRangesItem
.
display_range
,
priceRangesItem
.
recommend_percent
)
val
msp
=
SpannableString
(
contentStr
)
msp
.
setSpan
(
AbsoluteSizeSpan
(
10
,
true
),
...
...
@@ -690,8 +676,7 @@ class FilterPopupWindow(
contentStr
.
length
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
)
textView
.
text
=
msp
;
textView
.
text
=
msp
textView
.
setSingleLine
(
false
)
textView
.
setLineSpacing
(
1.0f
,
1.2f
)
...
...
@@ -717,13 +702,14 @@ class FilterPopupWindow(
etMaxPrice
?.
setText
(
""
)
etMinPrice
?.
setText
(
""
)
}
else
{
tempFilter
.
priceRanges
=
priceRangesItem
.
copy
(
priceRangesItem
.
minPrice
,
priceRangesItem
.
maxPrice
)
tempFilter
.
priceRanges
=
priceRangesItem
.
copy
(
min_price
=
priceRangesItem
.
min_price
,
max_price
=
priceRangesItem
.
max_price
)
textView
.
isSelected
=
true
textView
.
paint
.
isFakeBoldText
=
true
tempFilter
.
priceRangesView
=
textView
etMinPrice
?.
setText
(
priceRangesItem
.
minPrice
)
etMaxPrice
?.
setText
(
priceRangesItem
.
maxPrice
)
etMinPrice
?.
setText
(
priceRangesItem
.
min_price
)
etMaxPrice
?.
setText
(
priceRangesItem
.
max_price
)
etMinPrice
?.
setSelection
(
etMinPrice
?.
text
!!
.
length
)
etMaxPrice
?.
setSelection
(
etMaxPrice
?.
text
!!
.
length
)
}
updateCount
(
ConsultBIConstants
.
POSITION_AVERAGE_SERVICE_INPUT
)
...
...
@@ -743,8 +729,8 @@ class FilterPopupWindow(
tempFilter
.
priceRanges
=
priceRangesItem
;
}
tempFilter
.
priceRanges
!!
.
max
P
rice
=
etMaxPrice
?.
text
.
toString
()
tempFilter
.
priceRanges
!!
.
min
P
rice
=
etMinPrice
?.
text
.
toString
()
tempFilter
.
priceRanges
!!
.
max
_p
rice
=
etMaxPrice
?.
text
.
toString
()
tempFilter
.
priceRanges
!!
.
min
_p
rice
=
etMinPrice
?.
text
.
toString
()
tempFilter
.
priceRangesView
?.
isSelected
=
false
tempFilter
.
priceRangesView
?.
paint
?.
isFakeBoldText
=
false
tempFilter
.
priceRangesView
=
null
...
...
@@ -794,7 +780,6 @@ class FilterPopupWindow(
}
override
fun
dismiss
()
{
mDisposableList
.
clear
()
super
.
dismiss
()
}
}
\ No newline at end of file
m-consultant/src/main/res/layout/consultant_item_price_range.xml
View file @
9854d2a5
...
...
@@ -27,7 +27,6 @@
android:background=
"@drawable/shape_round_gray_bored"
android:inputType=
"number"
android:maxLines=
"1"
android:textCursorDrawable=
"@color/platform_main_theme"
android:textSize=
"13sp"
android:maxLength=
"7"
/>
...
...
@@ -45,9 +44,8 @@
android:layout_marginLeft=
"10dp"
android:background=
"@drawable/shape_round_gray_bored"
android:inputType=
"number"
android:maxLines=
"1"
android:textCursorDrawable=
"@color/platform_main_theme"
android:textSize=
"13sp"
android:maxLines=
"1"
android:maxLength=
"7"
/>
...
...
m-consultant/src/main/res/layout/consultant_layout_search_content.xml
View file @
9854d2a5
...
...
@@ -33,7 +33,7 @@
android:width=
"0dp"
android:drawableEnd=
"@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight=
"@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text=
"
@string/platform_theme
"
android:text=
"
困扰
"
android:textColor=
"@color/platform_color_242424"
/>
<com.ydl.ydlcommon.view.DrawableRightTextView
...
...
m-consultant/src/main/res/layout/consultant_ui_filter_popup.xml
View file @
9854d2a5
...
...
@@ -195,15 +195,16 @@
android:background=
"@color/platform_white"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/btnReset"
android:layout_width=
"0dp"
android:layout_height=
"44dp"
android:layout_weight=
"1"
android:background=
"@drawable/consultant_
bg_radius_gray_6
"
android:background=
"@drawable/consultant_
stroke_ebebeb_r_8
"
android:gravity=
"center"
android:text=
"@string/platform_reset"
android:textColor=
"@color/platform_color_
999999
"
android:textColor=
"@color/platform_color_
242424
"
android:textSize=
"16sp"
/>
<TextView
...
...
@@ -212,11 +213,10 @@
android:layout_height=
"44dp"
android:layout_marginStart=
"10dp"
android:layout_weight=
"1"
android:background=
"@drawable/consultant_
bg_radius_5_dark
"
android:background=
"@drawable/consultant_
solid_main_theme_color_r_8
"
android:gravity=
"center"
android:
hin
t=
"确定"
android:
tex
t=
"确定"
android:textColor=
"@color/white"
android:textColorHint=
"@color/platform_color_E0E0E0"
android:textSize=
"16sp"
/>
</LinearLayout>
</LinearLayout>
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