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
c6ac5e3f
Commit
c6ac5e3f
authored
Mar 17, 2025
by
lixuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'main'
Dev See merge request
!143
parents
0d07092b
bf86d636
Pipeline
#143326
passed with stages
in 5 minutes and 15 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
38 deletions
+48
-38
HouseResource.java
...ain/java/com/ruoyi/system/domain/house/HouseResource.java
+1
-1
HouseResourceDetail.java
...com/ruoyi/system/domain/house/vo/HouseResourceDetail.java
+1
-1
HouseResourcePage.java
...a/com/ruoyi/system/domain/house/vo/HouseResourcePage.java
+1
-1
HouseResourceServiceImpl.java
...i/system/service/house/impl/HouseResourceServiceImpl.java
+16
-7
HouseResourceMapper.xml
...m/src/main/resources/mapper/house/HouseResourceMapper.xml
+29
-28
No files found.
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/HouseResource.java
View file @
c6ac5e3f
...
...
@@ -26,7 +26,7 @@ public class HouseResource implements Serializable {
private
String
houseNumber
;
private
Integer
houseArea
;
private
BigDecimal
houseArea
;
private
String
houseResourceAttribute
;
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/HouseResourceDetail.java
View file @
c6ac5e3f
...
...
@@ -34,7 +34,7 @@ public class HouseResourceDetail {
private
String
houseNumber
;
private
Integer
houseArea
;
private
BigDecimal
houseArea
;
private
int
houseResourceAttribute
;
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/HouseResourcePage.java
View file @
c6ac5e3f
...
...
@@ -34,7 +34,7 @@ public class HouseResourcePage {
private
String
houseNumber
;
private
Integer
houseArea
;
private
BigDecimal
houseArea
;
private
int
houseResourceAttribute
;
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/house/impl/HouseResourceServiceImpl.java
View file @
c6ac5e3f
...
...
@@ -163,8 +163,10 @@ public class HouseResourceServiceImpl implements HouseResourceService {
collect
.
forEach
((
k
,
v
)
->
{
HouseResourceProfileGraph
houseResourceProfileGraph
=
new
HouseResourceProfileGraph
();
houseResourceProfileGraph
.
setId
(
k
);
GridRegion
gridRegion
=
gridRegionMapper
.
selectByPrimaryKey
(
k
);
houseResourceProfileGraph
.
setWgName
(
gridRegion
.
getWgName
());
String
wgName
=
gridRegionMapper
.
getWgNameByCode
(
k
);
if
(
StringUtils
.
hasText
(
wgName
))
{
houseResourceProfileGraph
.
setWgName
(
wgName
);
}
houseResourceProfileGraph
.
setHouseResources
(
handleHouseList
(
v
));
resourceProfileGraphList
.
add
(
houseResourceProfileGraph
);
});
...
...
@@ -183,11 +185,18 @@ public class HouseResourceServiceImpl implements HouseResourceService {
private
List
<
HouseResourcePage
>
handleHouseList
(
List
<
HouseResourcePage
>
list
)
{
list
.
forEach
(
x
->
{
GridRegion
two
=
gridRegionMapper
.
selectByPrimaryKey
(
x
.
getTwo
());
x
.
setWgName2
(
two
.
getWgName
());
GridRegion
three
=
gridRegionMapper
.
selectByPrimaryKey
(
x
.
getThree
());
x
.
setWgName3
(
three
.
getWgName
());
GridRegionExample
twoExample
=
new
GridRegionExample
();
twoExample
.
createCriteria
().
andWgTypeEqualTo
(
String
.
valueOf
(
x
.
getType
())).
andWgCodeEqualTo
(
x
.
getTwo
());
List
<
GridRegion
>
two
=
gridRegionMapper
.
selectByExample
(
twoExample
);
if
(!
CollectionUtils
.
isEmpty
(
two
))
{
x
.
setWgName2
(
two
.
get
(
0
).
getWgName
());
}
GridRegionExample
threeExample
=
new
GridRegionExample
();
threeExample
.
createCriteria
().
andWgTypeEqualTo
(
String
.
valueOf
(
x
.
getType
())).
andWgCodeEqualTo
(
x
.
getThree
());
List
<
GridRegion
>
three
=
gridRegionMapper
.
selectByExample
(
threeExample
);
if
(!
CollectionUtils
.
isEmpty
(
three
))
{
x
.
setWgName3
(
three
.
get
(
0
).
getWgName
());
}
x
.
setHouseResourceAttributeText
(
HouseEnums
.
HouseResourceAttributeEnum
.
getDescByCode
(
x
.
getHouseResourceAttribute
()));
x
.
setHouseResourceTypeText
(
HouseEnums
.
HouseResourceTypeEnum
.
getDescByCode
(
x
.
getHouseResourceType
()));
x
.
setOrientationText
(
HouseEnums
.
OrientationEnum
.
getDescByCode
(
x
.
getOrientation
()));
...
...
ruoyi-system/src/main/resources/mapper/house/HouseResourceMapper.xml
View file @
c6ac5e3f
...
...
@@ -11,7 +11,7 @@
<result
property=
"projectId"
column=
"project_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"houseResourceUrl"
column=
"house_resource_url"
jdbcType=
"VARCHAR"
/>
<result
property=
"houseNumber"
column=
"house_number"
jdbcType=
"VARCHAR"
/>
<result
property=
"houseArea"
column=
"house_area"
jdbcType=
"
INTEGER
"
/>
<result
property=
"houseArea"
column=
"house_area"
jdbcType=
"
DECIMAL
"
/>
<result
property=
"houseResourceAttribute"
column=
"house_resource_attribute"
jdbcType=
"INTEGER"
/>
<result
property=
"houseResourceType"
column=
"house_resource_type"
jdbcType=
"INTEGER"
/>
<result
property=
"houseResourceUse"
column=
"house_resource_use"
jdbcType=
"VARCHAR"
/>
...
...
@@ -112,37 +112,37 @@
<select
id=
"selectPage"
resultType=
"com.ruoyi.system.domain.house.vo.HouseResourcePage"
>
SELECT
t
1
.wg_name AS wgName4,
t
2
.*
t
2
.wg_name AS wgName4,
t
1
.*
FROM
grid_region
t1
LEFT JOIN
house_resource t2 ON t1.id = t2
.four
house_resource
t1
LEFT JOIN
grid_region t2 ON t2.wg_code = t1
.four
<where>
<if
test=
"query.wgType != null"
>
and t
2
.type = #{query.wgType}
and t
1
.type = #{query.wgType}
</if>
<if
test=
"query.two != null and query.two != ''"
>
and t
2
.two = #{query.two}
and t
1
.two = #{query.two}
</if>
<if
test=
"query.three != null and query.three != ''"
>
and t
2
.three = #{query.three}
and t
1
.three = #{query.three}
</if>
<if
test=
"query.four != null and query.four != ''"
>
and t
2
.four = #{query.four}
and t
1
.four = #{query.four}
</if>
<if
test=
"query.houseResourceAttribute != null"
>
and t
2
.house_resource_attribute = #{query.houseResourceAttribute}
and t
1
.house_resource_attribute = #{query.houseResourceAttribute}
</if>
<if
test=
"query.hireStatus != null"
>
and t
2
.hire_status = #{query.hireStatus}
and t
1
.hire_status = #{query.hireStatus}
</if>
<if
test=
"query.houseNumber != null and query.houseNumber != ''"
>
and t
2
.house_number like concat('%', #{query.houseNumber}, '%')
and t
1
.house_number like concat('%', #{query.houseNumber}, '%')
</if>
</where>
<if
test=
"query.sortWay != null and query.sortWay != ''"
>
order by t2
.house_area ${query.sortWay}
order by t1
.house_area ${query.sortWay}
</if>
</where>
</select>
<select
id=
"selectProfileGraph"
resultType=
"com.ruoyi.system.domain.house.vo.HouseResourcePage"
>
SELECT
...
...
@@ -150,7 +150,7 @@
t1.*
FROM
house_resource t1
LEFT JOIN grid_region t2 ON t
1.four = t2.id
LEFT JOIN grid_region t2 ON t
2.wg_code = t1.four
<where>
<if
test=
"query.wgType != null"
>
and t1.type = #{query.wgType}
...
...
@@ -174,38 +174,39 @@
and t1.house_number like concat('%', #{query.houseNumber}, '%')
</if>
</where>
order by t1.four DESC
</select>
<select
id=
"selectList"
resultType=
"com.ruoyi.system.domain.house.vo.HouseResourcePage"
>
SELECT
t
1
.wg_name AS wgName4,
t
2
.*
t
2
.wg_name AS wgName4,
t
1
.*
FROM
grid_region
t1
LEFT JOIN
house_resource t2 ON t1.id = t2
.four
house_resource
t1
LEFT JOIN
grid_region t2 ON t2.wg_code = t1
.four
<where>
<if
test=
"query.wgType != null"
>
and t
2
.type = #{query.wgType}
and t
1
.type = #{query.wgType}
</if>
<if
test=
"query.two != null and query.two != ''"
>
and t
2
.two = #{query.two}
and t
1
.two = #{query.two}
</if>
<if
test=
"query.three != null and query.three != ''"
>
and t
2
.three = #{query.three}
and t
1
.three = #{query.three}
</if>
<if
test=
"query.four != null and query.four != ''"
>
and t
2
.four = #{query.four}
and t
1
.four = #{query.four}
</if>
<if
test=
"query.houseResourceAttribute != null"
>
and t
2
.house_resource_attribute = #{query.houseResourceAttribute}
and t
1
.house_resource_attribute = #{query.houseResourceAttribute}
</if>
<if
test=
"query.hireStatus != null"
>
and t
2
.hire_status = #{query.hireStatus}
and t
1
.hire_status = #{query.hireStatus}
</if>
<if
test=
"query.houseNumber != null and query.houseNumber != ''"
>
and t
2
.house_number like concat('%', #{query.houseNumber}, '%')
and t
1
.house_number like concat('%', #{query.houseNumber}, '%')
</if>
<if
test=
"query.sortWay != null and query.sortWay != ''"
>
order by t
2
.house_area ${query.sortWay}
order by t
1
.house_area ${query.sortWay}
</if>
</where>
</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