Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yichengstreet-be
Project
Project
Details
Activity
Releases
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
yichengstreet
yichengstreet-be
Commits
259d80fd
Commit
259d80fd
authored
Jul 24, 2025
by
lixuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 房源
parent
f14dbfda
Pipeline
#145484
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
18 deletions
+128
-18
HouseResourceServiceImpl.java
...i/system/service/house/impl/HouseResourceServiceImpl.java
+0
-16
HouseResourceMapper.xml
...m/src/main/resources/mapper/house/HouseResourceMapper.xml
+128
-2
No files found.
ruoyi-system/src/main/java/com/ruoyi/system/service/house/impl/HouseResourceServiceImpl.java
View file @
259d80fd
...
...
@@ -188,23 +188,7 @@ public class HouseResourceServiceImpl implements HouseResourceService {
@Override
public
List
<
HouseResourceProfileGraph
>
profileGraphHouseResources
(
HouseResourcePageQuery
query
)
{
List
<
HouseResourcePage
>
list
=
houseResourceMapper
.
selectProfileGraph
(
query
);
list
.
forEach
(
x
->
x
.
setIncome
(
businessEntityInfoMapper
.
selectYearSellByHouseResourceId
(
x
.
getId
())));
List
<
HouseResourcePage
>
houseResourcePages
=
handleHouseList
(
list
,
true
);
if
(
StringUtils
.
hasText
(
query
.
getName
()))
{
houseResourcePages
=
houseResourcePages
.
stream
().
filter
(
x
->
!
CollectionUtils
.
isEmpty
(
x
.
getBusinessEntityInfoNames
())).
filter
(
x
->
x
.
getBusinessEntityInfoNames
().
contains
(
query
.
getName
())).
collect
(
Collectors
.
toList
());
}
if
(
Objects
.
nonNull
(
query
.
getHouseAreaMin
()))
{
houseResourcePages
=
houseResourcePages
.
stream
().
filter
(
x
->
Objects
.
nonNull
(
x
.
getHouseArea
())).
filter
(
x
->
x
.
getHouseArea
().
compareTo
(
query
.
getHouseAreaMin
())
>=
0
).
collect
(
Collectors
.
toList
());
}
if
(
Objects
.
nonNull
(
query
.
getHouseAreaMax
()))
{
houseResourcePages
=
houseResourcePages
.
stream
().
filter
(
x
->
Objects
.
nonNull
(
x
.
getHouseArea
())).
filter
(
x
->
x
.
getHouseArea
().
compareTo
(
query
.
getHouseAreaMax
())
<=
0
).
collect
(
Collectors
.
toList
());
}
if
(
Objects
.
nonNull
(
query
.
getYearSellMin
()))
{
houseResourcePages
=
houseResourcePages
.
stream
().
filter
(
x
->
x
.
getIncome
().
compareTo
(
query
.
getYearSellMin
())
>=
0
).
collect
(
Collectors
.
toList
());
}
if
(
Objects
.
nonNull
(
query
.
getYearSellMax
()))
{
houseResourcePages
=
houseResourcePages
.
stream
().
filter
(
x
->
x
.
getIncome
().
compareTo
(
query
.
getYearSellMax
())
<=
0
).
collect
(
Collectors
.
toList
());
}
if
(
query
.
isZlFlag
())
{
houseResourcePages
=
houseResourcePages
.
stream
().
filter
(
x
->
x
.
getHouseResourceAttribute
()
==
0
).
collect
(
Collectors
.
toList
());
}
...
...
ruoyi-system/src/main/resources/mapper/house/HouseResourceMapper.xml
View file @
259d80fd
...
...
@@ -285,10 +285,18 @@
<select
id=
"selectProfileGraph"
resultType=
"com.ruoyi.system.domain.house.vo.HouseResourcePage"
>
SELECT
t2.wg_name AS wgName4,
t1.*
t1.*,
SUM(t4.year_sell) AS income,
t3.nature,
t3.industry_classification,
ROUND(IFNULL(t1.unit_price,0) * 10000 / 365 / t1.house_area, 1) AS dayPrice,
t3.name,
t4.year
FROM
house_resource t1
LEFT JOIN grid_region t2 ON t2.wg_code = t1.four
LEFT JOIN business_entity_info t3 ON t1.id = t3.house_resource_id
LEFT JOIN business_entity_sell t4 ON t4.business_entity_info_id = t3.id
<where>
<if
test=
"query.wgType != null"
>
and t1.type = #{query.wgType}
...
...
@@ -311,8 +319,126 @@
<if
test=
"query.houseNumber != null and query.houseNumber != ''"
>
and t1.house_number like concat('%', #{query.houseNumber}, '%')
</if>
<if
test=
"query.houseAreaMin != null and query.houseAreaMin != ''"
>
and t1.house_area
<![CDATA[ >= ]]>
#{query.houseAreaMin}
</if>
<if
test=
"query.houseAreaMax != null and query.houseAreaMax != ''"
>
and t1.house_area
<![CDATA[ <= ]]>
#{query.houseAreaMax}
</if>
<if
test=
"query.houseResourceType != null"
>
and t1.house_resource_type = #{query.houseResourceType}
</if>
<if
test=
"query.name != null and query.name != ''"
>
and t3.name like concat('%', #{query.name}, '%')
</if>
<if
test=
"query.yearSellMin != null and query.yearSellMin != ''"
>
and t4.year_sell
<![CDATA[ >= ]]>
#{query.yearSellMin}
</if>
<if
test=
"query.yearSellMax != null and query.yearSellMax != ''"
>
and t4.year_sell
<![CDATA[ <= ]]>
#{query.yearSellMax}
</if>
<if
test=
"query.yearTaxMin != null and query.yearTaxMin != ''"
>
and t4.year_tax
<![CDATA[ >= ]]>
#{query.yearTaxMin}
</if>
<if
test=
"query.yearTaxMax != null and query.yearTaxMax != ''"
>
and t4.year_tax
<![CDATA[ <= ]]>
#{query.yearTaxMax}
</if>
<if
test=
"query.unitPriceMin != null and query.unitPriceMin != ''"
>
and t1.unit_price
<![CDATA[ >= ]]>
#{query.unitPriceMin}
</if>
<if
test=
"query.unitPriceMax != null and query.unitPriceMax != ''"
>
and t4.unit_price
<![CDATA[ <= ]]>
#{query.unitPriceMax}
</if>
<if
test=
"query.gsFlag != null and query.gsFlag != ''"
>
and t3.gs = ${query.gsFlag}
</if>
<if
test=
"query.industryClassification != null and query.industryClassification != ''"
>
and t3.industry_classification like concat('%', #{query.industryClassification}, '%')
</if>
<if
test=
"query.year != null"
>
and t4.`year` = #{query.year}
</if>
<if
test=
"query.registrationPlaceFlag != null"
>
and t3.registration_place_flag = #{query.registrationPlaceFlag}
</if>
<if
test=
"query.address != null and query.address != ''"
>
and t1.address like concat('%', #{query.address}, '%')
</if>
<if
test=
"query.ownership != null and query.ownership != ''"
>
and t1.ownership like concat('%', #{query.ownership}, '%')
</if>
<if
test=
"query.houseResourceEquityTel != null and query.houseResourceEquityTel != ''"
>
and t1.house_resource_equity_tel like concat('%', #{query.houseResourceEquityTel}, '%')
</if>
<if
test=
"query.principal != null and query.principal != ''"
>
and t3.principal like concat('%', #{query.principal}, '%')
</if>
<if
test=
"query.principalTel != null and query.principalTel != ''"
>
and t3.principalTel like concat('%', #{query.principalTel}, '%')
</if>
<if
test=
"query.business != null and query.business != ''"
>
and t3.business like concat('%', #{query.business}, '%')
</if>
<if
test=
"query.workerNumber != null"
>
and t3.worker_number = #{query.workerNumber}
</if>
<if
test=
"query.registeredAddress != null and query.registeredAddress != ''"
>
and t3.registered_address like concat('%', #{query.registeredAddress}, '%')
</if>
<if
test=
"query.nature != null and query.nature != ''"
>
and t3.nature = #{query.nature}
</if>
<if
test=
"query.wgCodes != null and query.wgCodes.size() > 0"
>
and t1.two in
<foreach
item=
"item"
index=
"index"
collection=
"query.wgCodes"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"query.aiQueries != null and query.aiQueries.size() > 0"
>
and (
<foreach
collection=
"query.aiQueries"
item=
"ai"
separator=
" or "
>
(
<if
test=
"ai.two != null and ai.two != ''"
>
t1.two = #{ai.two}
</if>
<if
test=
"ai.three != null and ai.three != ''"
>
<if
test=
"ai.two != null and ai.two != ''"
>
and
</if>
t1.three = #{ai.three}
</if>
<if
test=
"ai.four != null and ai.four != ''"
>
<if
test=
"(ai.two != null and ai.two != '') or (ai.three != null and ai.three != '')"
>
and
</if>
t1.four = #{ai.four}
</if>
<if
test=
"ai.wgType != null"
>
<if
test=
"(ai.two != null and ai.two != '') or (ai.three != null and ai.three != '') or (ai.four != null and ai.four != '')"
>
and
</if>
t1.type = #{ai.wgType}
</if>
)
</foreach>
)
</if>
</where>
order by t1.four DESC
GROUP BY t1.id, t3.id
<trim
prefix=
"having"
prefixOverrides=
"and"
>
<if
test=
"query.dayPriceMin != null and query.dayPriceMin != ''"
>
and dayPrice
<![CDATA[ >= ]]>
#{query.dayPriceMin}
</if>
<if
test=
"query.dayPriceMax != null and query.dayPriceMax != ''"
>
and dayPrice
<![CDATA[ <= ]]>
#{query.dayPriceMax}
</if>
<if
test=
"query.yearSellMin != null and query.yearSellMin != ''"
>
and t4.year_sell
<![CDATA[ >= ]]>
#{query.yearSellMin}
</if>
<if
test=
"query.yearSellMax != null and query.yearSellMax != ''"
>
and t4.year_sell
<![CDATA[ <= ]]>
#{query.yearSellMax}
</if>
</trim>
</select>
<select
id=
"selectList"
resultType=
"com.ruoyi.system.domain.house.vo.HouseResourcePage"
>
SELECT
...
...
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