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
6b0bea3f
Commit
6b0bea3f
authored
Apr 15, 2025
by
lixuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
be7a4a9f
d5bdd1c5
Pipeline
#144125
failed with stages
in 29 minutes and 23 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
7 deletions
+59
-7
BusinessEntityStatisticsDetail.java
...ystem/domain/house/vo/BusinessEntityStatisticsDetail.java
+4
-0
HouseResourcePageQuery.java
.../ruoyi/system/domain/house/vo/HouseResourcePageQuery.java
+2
-0
HouseResourceProfileGraph.java
...oyi/system/domain/house/vo/HouseResourceProfileGraph.java
+2
-1
BusinessEntityInfoMapper.java
...m/ruoyi/system/mapper/house/BusinessEntityInfoMapper.java
+3
-0
HouseResourceServiceImpl.java
...i/system/service/house/impl/HouseResourceServiceImpl.java
+35
-5
BusinessEntityInfoMapper.xml
.../main/resources/mapper/house/BusinessEntityInfoMapper.xml
+10
-1
HouseResourceMapper.xml
...m/src/main/resources/mapper/house/HouseResourceMapper.xml
+3
-0
No files found.
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/BusinessEntityStatisticsDetail.java
View file @
6b0bea3f
...
...
@@ -39,6 +39,8 @@ public class BusinessEntityStatisticsDetail {
private
long
gkCount
;
private
long
ztCount
;
private
BigDecimal
gyCount
=
BigDecimal
.
ZERO
;
private
BigDecimal
jzyCount
=
BigDecimal
.
ZERO
;
...
...
@@ -54,4 +56,6 @@ public class BusinessEntityStatisticsDetail {
private
BigDecimal
fwyCount
=
BigDecimal
.
ZERO
;
private
BigDecimal
qtjjfzCount
=
BigDecimal
.
ZERO
;
private
BigDecimal
jjzl
=
BigDecimal
.
ZERO
;
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/HouseResourcePageQuery.java
View file @
6b0bea3f
...
...
@@ -39,4 +39,6 @@ public class HouseResourcePageQuery extends PageDomain {
private
BigDecimal
yearSellMax
;
private
List
<
String
>
wgCodes
;
private
String
name
;
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/HouseResourceProfileGraph.java
View file @
6b0bea3f
...
...
@@ -18,8 +18,9 @@ public class HouseResourceProfileGraph {
private
long
kzCount
;
@Deprecated
private
BigDecimal
jzArea
;
private
BigDecimal
areaTotal
;
private
List
<
HouseResourcePage
>
houseResources
;
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/house/BusinessEntityInfoMapper.java
View file @
6b0bea3f
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.system.mapper.house;
import
com.ruoyi.system.domain.house.BusinessEntityInfo
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.util.List
;
public
interface
BusinessEntityInfoMapper
{
...
...
@@ -27,4 +28,6 @@ public interface BusinessEntityInfoMapper {
List
<
BusinessEntityInfo
>
selectAllBusinessEntityInfosByHouseResourceId
(
@Param
(
"houseResourceId"
)
String
houseResourceId
);
List
<
BusinessEntityInfo
>
selectAllBusinessEntityInfosByHouseResourceIds
(
@Param
(
"houseResourceIds"
)
List
<
String
>
houseResourceIds
);
BigDecimal
selectYearSellByHouseResourceId
(
@Param
(
"houseResourceId"
)
String
houseResourceId
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/house/impl/HouseResourceServiceImpl.java
View file @
6b0bea3f
...
...
@@ -178,8 +178,25 @@ 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
);
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
());
}
List
<
HouseResourceProfileGraph
>
resourceProfileGraphList
=
new
ArrayList
<>();
Map
<
String
,
List
<
HouseResourcePage
>>
collect
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
HouseResourcePage:
:
getFour
));
Map
<
String
,
List
<
HouseResourcePage
>>
collect
=
houseResourcePages
.
stream
().
collect
(
Collectors
.
groupingBy
(
HouseResourcePage:
:
getFour
));
collect
.
forEach
((
k
,
v
)
->
{
HouseResourceProfileGraph
houseResourceProfileGraph
=
new
HouseResourceProfileGraph
();
houseResourceProfileGraph
.
setId
(
k
);
...
...
@@ -187,11 +204,15 @@ public class HouseResourceServiceImpl implements HouseResourceService {
if
(
StringUtils
.
hasText
(
wgName
))
{
houseResourceProfileGraph
.
setWgName
(
wgName
);
}
String
jzAreaByCode
=
gridRegionMapper
.
getJzAreaByCode
(
k
);
if
(
StringUtils
.
hasText
(
jzAreaByCode
))
{
houseResourceProfileGraph
.
setJzArea
(
new
BigDecimal
(
jzAreaByCode
));
}
houseResourceProfileGraph
.
setJyArea
(
v
.
stream
().
map
(
HouseResourcePage:
:
getHouseArea
).
filter
(
Objects:
:
nonNull
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
));
houseResourceProfileGraph
.
setKzCount
(
v
.
stream
().
filter
(
x
->
x
.
getHouseResourceType
()
==
HouseEnums
.
HouseResourceTypeEnum
.
KZ
.
getCode
()).
count
());
houseResourceProfileGraph
.
setKzArea
(
v
.
stream
().
filter
(
x
->
x
.
getHouseResourceType
()
==
HouseEnums
.
HouseResourceTypeEnum
.
KZ
.
getCode
()).
map
(
HouseResourcePage:
:
getHouseArea
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
));
List
<
HouseResourcePage
>
houseResourcePages
=
handleHouseList
(
v
);
houseResourceProfileGraph
.
setHouseResources
(
houseResourcePages
.
stream
().
sorted
(
Comparator
.
comparing
(
HouseResourcePage:
:
getHouseNumber
)).
collect
(
Collectors
.
toList
()));
houseResourceProfileGraph
.
setAreaTotal
(
v
.
stream
().
map
(
HouseResourcePage:
:
getHouseArea
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
)
);
houseResourceProfileGraph
.
setHouseResources
(
v
.
stream
().
sorted
(
Comparator
.
comparing
(
HouseResourcePage:
:
getHouseNumber
)).
collect
(
Collectors
.
toList
()));
resourceProfileGraphList
.
add
(
houseResourceProfileGraph
);
});
return
resourceProfileGraphList
.
stream
().
sorted
(
Comparator
.
comparing
(
HouseResourceProfileGraph:
:
getId
)).
collect
(
Collectors
.
toList
());
...
...
@@ -236,8 +257,8 @@ public class HouseResourceServiceImpl implements HouseResourceService {
businessEntityStatisticsDetail
.
setSjScCount
(
list
.
stream
().
filter
(
x
->
x
.
getType
()
==
7
).
collect
(
Collectors
.
groupingBy
(
HouseResource:
:
getThree
)).
size
());
businessEntityStatisticsDetail
.
setZlCount
(
list
.
stream
().
filter
(
x
->
x
.
getHouseResourceAttribute
()
==
0
).
count
());
businessEntityStatisticsDetail
.
setZyCount
(
list
.
stream
().
filter
(
x
->
x
.
getHouseResourceAttribute
()
==
1
).
count
());
businessEntityStatisticsDetail
.
setQtCount
(
list
.
stream
().
filter
(
x
->
x
.
getHouseResourceAttribute
()
==
2
).
count
());
businessEntityStatisticsDetail
.
setZyCount
(
list
.
stream
().
filter
(
x
->
x
.
getHouseResourceAttribute
()
==
2
).
count
());
businessEntityStatisticsDetail
.
setQtCount
(
list
.
stream
().
filter
(
x
->
x
.
getHouseResourceAttribute
()
==
1
).
count
());
businessEntityStatisticsDetail
.
setZaiyingCount
(
list
.
stream
().
filter
(
x
->
x
.
getHouseResourceType
()
==
0
).
count
());
businessEntityStatisticsDetail
.
setXzCount
(
list
.
stream
().
filter
(
x
->
x
.
getHouseResourceType
()
==
1
).
count
());
...
...
@@ -248,6 +269,7 @@ public class HouseResourceServiceImpl implements HouseResourceService {
if
(
CollectionUtils
.
isEmpty
(
businessEntityInfos
))
{
return
businessEntityStatisticsDetail
;
}
businessEntityStatisticsDetail
.
setZtCount
(
businessEntityInfos
.
size
());
List
<
String
>
gyIds
=
businessEntityInfos
.
stream
().
filter
(
x
->
StringUtils
.
hasText
(
x
.
getIndustryClassification
())
&&
x
.
getIndustryClassification
().
equals
(
"工业"
)).
map
(
BusinessEntityInfo:
:
getId
).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
gyIds
))
{
...
...
@@ -312,6 +334,14 @@ public class HouseResourceServiceImpl implements HouseResourceService {
businessEntityStatisticsDetail
.
setQtjjfzCount
(
businessEntitySells
.
stream
().
map
(
BusinessEntitySell:
:
getYearSell
).
filter
(
Objects:
:
nonNull
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
));
}
}
businessEntityStatisticsDetail
.
setJjzl
(
businessEntityStatisticsDetail
.
getGyCount
()
.
add
(
businessEntityStatisticsDetail
.
getJzyCount
())
.
add
(
businessEntityStatisticsDetail
.
getPfCount
())
.
add
(
businessEntityStatisticsDetail
.
getLsCount
())
.
add
(
businessEntityStatisticsDetail
.
getZsCount
())
.
add
(
businessEntityStatisticsDetail
.
getCyCount
())
.
add
(
businessEntityStatisticsDetail
.
getFwyCount
())
.
add
(
businessEntityStatisticsDetail
.
getQtjjfzCount
()));
return
businessEntityStatisticsDetail
;
}
...
...
ruoyi-system/src/main/resources/mapper/house/BusinessEntityInfoMapper.xml
View file @
6b0bea3f
...
...
@@ -66,4 +66,13 @@
resultType=
"com.ruoyi.system.domain.house.BusinessEntityInfo"
>
SELECT * FROM business_entity_info WHERE house_resource_id in
<foreach
collection=
"houseResourceIds"
item=
"houseResourceId"
open=
"("
close=
")"
separator=
","
>
#{houseResourceId}
</foreach>
</select>
</mapper>
\ No newline at end of file
<select
id=
"selectYearSellByHouseResourceId"
resultType=
"java.math.BigDecimal"
>
SELECT
IFNULL(SUM(t2.year_sell), 0)
FROM
business_entity_info t1
LEFT JOIN business_entity_sell t2 ON t1.id = t2.business_entity_info_id
WHERE
t1.house_resource_id = #{houseResourceId}
</select>
</mapper>
ruoyi-system/src/main/resources/mapper/house/HouseResourceMapper.xml
View file @
6b0bea3f
...
...
@@ -152,6 +152,9 @@
<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 query.yearSellMax != null and query.yearSellMax != ''"
>
and t4.year_sell
<![CDATA[ >= ]]>
#{query.yearSellMin} and t4.year_sell
<![CDATA[ <= ]]>
#{query.yearSellMax}
</if>
...
...
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