Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
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
1c88526e
You need to sign in or sign up before continuing.
Commit
1c88526e
authored
Jul 23, 2025
by
lixuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 房源
parent
ade2f0e9
Pipeline
#145470
failed with stages
Changes
8
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
107 additions
and
25 deletions
+107
-25
HouseResourceController.java
...m/ruoyi/web/controller/house/HouseResourceController.java
+5
-0
BusinessEntityInfo.java
...ava/com/ruoyi/system/domain/house/BusinessEntityInfo.java
+2
-0
AssociationBusinessEntityHouseResourceDto.java
...n/house/vo/AssociationBusinessEntityHouseResourceDto.java
+39
-0
BusinessEntityDto.java
...a/com/ruoyi/system/domain/house/vo/BusinessEntityDto.java
+2
-0
HouseResourceService.java
.../com/ruoyi/system/service/house/HouseResourceService.java
+3
-0
HouseResourceServiceImpl.java
...i/system/service/house/impl/HouseResourceServiceImpl.java
+49
-18
BusinessEntityInfoMapper.xml
.../main/resources/mapper/house/BusinessEntityInfoMapper.xml
+5
-3
HouseResourceMapper.xml
...m/src/main/resources/mapper/house/HouseResourceMapper.xml
+2
-4
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/house/HouseResourceController.java
View file @
1c88526e
...
@@ -106,4 +106,9 @@ public class HouseResourceController {
...
@@ -106,4 +106,9 @@ public class HouseResourceController {
ExcelUtil
<
HouseResourceExport
>
util
=
new
ExcelUtil
<>(
HouseResourceExport
.
class
);
ExcelUtil
<
HouseResourceExport
>
util
=
new
ExcelUtil
<>(
HouseResourceExport
.
class
);
util
.
exportExcel
(
response
,
exportList
,
"房源数据"
);
util
.
exportExcel
(
response
,
exportList
,
"房源数据"
);
}
}
@GetMapping
(
"/businessEntityInfo"
)
public
AjaxResult
getBusinessEntityInfo
(
@RequestParam
(
"name"
)
String
name
)
{
return
AjaxResult
.
success
(
houseResourceService
.
listByBusinessEntityInfoName
(
name
));
}
}
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/BusinessEntityInfo.java
View file @
1c88526e
...
@@ -32,4 +32,6 @@ public class BusinessEntityInfo implements Serializable {
...
@@ -32,4 +32,6 @@ public class BusinessEntityInfo implements Serializable {
private
Boolean
gs
;
private
Boolean
gs
;
private
Boolean
registrationPlaceFlag
;
private
Boolean
registrationPlaceFlag
;
private
boolean
associationBusinessEntityFlag
;
}
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/AssociationBusinessEntityHouseResourceDto.java
0 → 100644
View file @
1c88526e
package
com
.
ruoyi
.
system
.
domain
.
house
.
vo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
AssociationBusinessEntityHouseResourceDto
{
private
String
id
;
private
String
houseResourceId
;
private
String
name
;
private
String
nature
;
private
String
socialCreditCode
;
private
String
principal
;
private
String
principalTel
;
private
String
business
;
private
Integer
workerNumber
;
private
String
registeredAddress
;
private
String
industryClassification
;
private
Boolean
gs
;
private
Boolean
registrationPlaceFlag
;
private
boolean
associationBusinessEntityFlag
;
private
HouseResourcePage
houseResource
;
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/BusinessEntityDto.java
View file @
1c88526e
...
@@ -35,4 +35,6 @@ public class BusinessEntityDto {
...
@@ -35,4 +35,6 @@ public class BusinessEntityDto {
private
List
<
BusinessEntitySell
>
businessEntitySells
;
private
List
<
BusinessEntitySell
>
businessEntitySells
;
private
Boolean
registrationPlaceFlag
;
private
Boolean
registrationPlaceFlag
;
private
boolean
associationBusinessEntityFlag
;
}
}
ruoyi-system/src/main/java/com/ruoyi/system/service/house/HouseResourceService.java
View file @
1c88526e
package
com
.
ruoyi
.
system
.
service
.
house
;
package
com
.
ruoyi
.
system
.
service
.
house
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.ruoyi.system.domain.house.BusinessEntityInfo
;
import
com.ruoyi.system.domain.house.HouseResource
;
import
com.ruoyi.system.domain.house.HouseResource
;
import
com.ruoyi.system.domain.house.vo.*
;
import
com.ruoyi.system.domain.house.vo.*
;
...
@@ -33,4 +34,6 @@ public interface HouseResourceService {
...
@@ -33,4 +34,6 @@ public interface HouseResourceService {
PageBusinessEntityStatisticsDetail
pageBusinessEntityStatistics
(
PageBusinessEntityStatisticsQuery
query
);
PageBusinessEntityStatisticsDetail
pageBusinessEntityStatistics
(
PageBusinessEntityStatisticsQuery
query
);
void
saveYearTax
(
YearTaxSaveUpdateDto
dto
);
void
saveYearTax
(
YearTaxSaveUpdateDto
dto
);
List
<
AssociationBusinessEntityHouseResourceDto
>
listByBusinessEntityInfoName
(
String
name
);
}
}
ruoyi-system/src/main/java/com/ruoyi/system/service/house/impl/HouseResourceServiceImpl.java
View file @
1c88526e
...
@@ -57,13 +57,20 @@ public class HouseResourceServiceImpl implements HouseResourceService {
...
@@ -57,13 +57,20 @@ public class HouseResourceServiceImpl implements HouseResourceService {
houseResourceMapper
.
insertHouseResource
(
dto
.
getHouseResource
());
houseResourceMapper
.
insertHouseResource
(
dto
.
getHouseResource
());
for
(
BusinessEntityDto
businessEntityDto
:
dto
.
getBusinessEntityDtoList
())
{
for
(
BusinessEntityDto
businessEntityDto
:
dto
.
getBusinessEntityDtoList
())
{
String
businessEntityInfoId
;
if
(
StringUtils
.
hasText
(
businessEntityDto
.
getId
()))
{
businessEntityInfoId
=
businessEntityDto
.
getId
();
BusinessEntityInfo
existingInfo
=
businessEntityInfoMapper
.
selectBusinessEntityInfoById
(
businessEntityDto
.
getId
());
BeanUtils
.
copyProperties
(
businessEntityDto
,
existingInfo
);
businessEntityInfoMapper
.
updateBusinessEntityInfo
(
existingInfo
);
}
else
{
BusinessEntityInfo
businessEntityInfo
=
new
BusinessEntityInfo
();
BusinessEntityInfo
businessEntityInfo
=
new
BusinessEntityInfo
();
BeanUtils
.
copyProperties
(
businessEntityDto
,
businessEntityInfo
);
BeanUtils
.
copyProperties
(
businessEntityDto
,
businessEntityInfo
);
String
businessEntityInfoId
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
businessEntityInfoId
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
businessEntityInfo
.
setId
(
businessEntityInfoId
);
businessEntityInfo
.
setId
(
businessEntityInfoId
);
businessEntityInfo
.
setHouseResourceId
(
houseResourceId
);
businessEntityInfo
.
setHouseResourceId
(
houseResourceId
);
businessEntityInfoMapper
.
insertBusinessEntityInfo
(
businessEntityInfo
);
businessEntityInfoMapper
.
insertBusinessEntityInfo
(
businessEntityInfo
);
}
for
(
BusinessEntitySell
businessEntitySell
:
businessEntityDto
.
getBusinessEntitySells
())
{
for
(
BusinessEntitySell
businessEntitySell
:
businessEntityDto
.
getBusinessEntitySells
())
{
businessEntitySell
.
setId
(
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
));
businessEntitySell
.
setId
(
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
));
businessEntitySell
.
setBusinessEntityInfoId
(
businessEntityInfoId
);
businessEntitySell
.
setBusinessEntityInfoId
(
businessEntityInfoId
);
...
@@ -126,18 +133,21 @@ public class HouseResourceServiceImpl implements HouseResourceService {
...
@@ -126,18 +133,21 @@ public class HouseResourceServiceImpl implements HouseResourceService {
}
}
houseResourceMapper
.
updateHouseResource
(
dto
.
getHouseResource
());
houseResourceMapper
.
updateHouseResource
(
dto
.
getHouseResource
());
businessEntityInfoMapper
.
deleteByHouseResourceId
(
dto
.
getHouseResource
().
getId
());
for
(
String
s
:
dto
.
getBusinessEntityDtoList
().
stream
().
map
(
BusinessEntityDto:
:
getId
).
collect
(
Collectors
.
toList
()))
{
businessEntitySellMapper
.
deleteBusinessEntitySellById
(
s
);
}
for
(
BusinessEntityDto
businessEntityDto
:
dto
.
getBusinessEntityDtoList
())
{
for
(
BusinessEntityDto
businessEntityDto
:
dto
.
getBusinessEntityDtoList
())
{
String
businessEntityInfoId
;
if
(
StringUtils
.
hasText
(
businessEntityDto
.
getId
()))
{
businessEntityInfoId
=
businessEntityDto
.
getId
();
BusinessEntityInfo
existingInfo
=
businessEntityInfoMapper
.
selectBusinessEntityInfoById
(
businessEntityDto
.
getId
());
BeanUtils
.
copyProperties
(
businessEntityDto
,
existingInfo
);
businessEntityInfoMapper
.
updateBusinessEntityInfo
(
existingInfo
);
}
else
{
BusinessEntityInfo
businessEntityInfo
=
new
BusinessEntityInfo
();
BusinessEntityInfo
businessEntityInfo
=
new
BusinessEntityInfo
();
BeanUtils
.
copyProperties
(
businessEntityDto
,
businessEntityInfo
);
BeanUtils
.
copyProperties
(
businessEntityDto
,
businessEntityInfo
);
String
businessEntityInfoId
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
businessEntityInfoId
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
businessEntityInfo
.
setId
(
businessEntityInfoId
);
businessEntityInfo
.
setId
(
businessEntityInfoId
);
businessEntityInfo
.
setHouseResourceId
(
dto
.
getHouseResource
().
getId
());
businessEntityInfo
.
setHouseResourceId
(
dto
.
getHouseResource
().
getId
());
businessEntityInfoMapper
.
insertBusinessEntityInfo
(
businessEntityInfo
);
businessEntityInfoMapper
.
insertBusinessEntityInfo
(
businessEntityInfo
);
}
for
(
BusinessEntitySell
businessEntitySell
:
businessEntityDto
.
getBusinessEntitySells
())
{
for
(
BusinessEntitySell
businessEntitySell
:
businessEntityDto
.
getBusinessEntitySells
())
{
businessEntitySell
.
setId
(
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
));
businessEntitySell
.
setId
(
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
));
businessEntitySell
.
setBusinessEntityInfoId
(
businessEntityInfoId
);
businessEntitySell
.
setBusinessEntityInfoId
(
businessEntityInfoId
);
...
@@ -487,6 +497,27 @@ public class HouseResourceServiceImpl implements HouseResourceService {
...
@@ -487,6 +497,27 @@ public class HouseResourceServiceImpl implements HouseResourceService {
}
}
}
}
@Override
public
List
<
AssociationBusinessEntityHouseResourceDto
>
listByBusinessEntityInfoName
(
String
name
)
{
List
<
BusinessEntityInfo
>
businessEntityInfos
=
businessEntityInfoMapper
.
selectByName
(
name
);
if
(
CollectionUtils
.
isEmpty
(
businessEntityInfos
))
{
return
Collections
.
emptyList
();
}
List
<
AssociationBusinessEntityHouseResourceDto
>
result
=
new
ArrayList
<>();
businessEntityInfos
.
forEach
(
x
->
{
AssociationBusinessEntityHouseResourceDto
associationBusinessEntityHouseResourceDto
=
new
AssociationBusinessEntityHouseResourceDto
();
BeanUtils
.
copyProperties
(
x
,
associationBusinessEntityHouseResourceDto
);
if
(
StringUtils
.
hasText
(
x
.
getHouseResourceId
()))
{
HouseResource
houseResource
=
houseResourceMapper
.
selectHouseResourceById
(
x
.
getHouseResourceId
());
HouseResourcePage
houseResourcePage
=
new
HouseResourcePage
();
BeanUtils
.
copyProperties
(
houseResource
,
houseResourcePage
);
List
<
HouseResourcePage
>
list
=
handleHouseList
(
Collections
.
singletonList
(
houseResourcePage
),
false
);
associationBusinessEntityHouseResourceDto
.
setHouseResource
(
list
.
get
(
0
));
}
});
return
result
;
}
private
List
<
HouseResourcePage
>
handleHouseList
(
List
<
HouseResourcePage
>
list
,
boolean
houseNumberSortFlag
)
{
private
List
<
HouseResourcePage
>
handleHouseList
(
List
<
HouseResourcePage
>
list
,
boolean
houseNumberSortFlag
)
{
list
.
forEach
(
x
->
{
list
.
forEach
(
x
->
{
GridRegionExample
twoExample
=
new
GridRegionExample
();
GridRegionExample
twoExample
=
new
GridRegionExample
();
...
...
ruoyi-system/src/main/resources/mapper/house/BusinessEntityInfoMapper.xml
View file @
1c88526e
...
@@ -15,15 +15,16 @@
...
@@ -15,15 +15,16 @@
<result
column=
"industry_classification"
property=
"industryClassification"
jdbcType=
"VARCHAR"
/>
<result
column=
"industry_classification"
property=
"industryClassification"
jdbcType=
"VARCHAR"
/>
<result
property=
"gs"
column=
"gs"
jdbcType=
"BIT"
/>
<result
property=
"gs"
column=
"gs"
jdbcType=
"BIT"
/>
<result
property=
"registrationPlaceFlag"
column=
"registration_place_flag"
jdbcType=
"INTEGER"
/>
<result
property=
"registrationPlaceFlag"
column=
"registration_place_flag"
jdbcType=
"INTEGER"
/>
<result
property=
"associationBusinessEntityFlag"
column=
"association_business_entity_flag"
jdbcType=
"INTEGER"
/>
</resultMap>
</resultMap>
<insert
id=
"insertBusinessEntityInfo"
parameterType=
"com.ruoyi.system.domain.house.BusinessEntityInfo"
>
<insert
id=
"insertBusinessEntityInfo"
parameterType=
"com.ruoyi.system.domain.house.BusinessEntityInfo"
>
INSERT INTO business_entity_info (
INSERT INTO business_entity_info (
id, house_resource_id, name, nature, social_credit_code,
id, house_resource_id, name, nature, social_credit_code,
principal, principal_tel, business, worker_number, registered_address, industry_classification, gs, registration_place_flag
principal, principal_tel, business, worker_number, registered_address, industry_classification, gs, registration_place_flag
, association_business_entity_flag
) VALUES (
) VALUES (
#{id}, #{houseResourceId}, #{name}, #{nature}, #{socialCreditCode},
#{id}, #{houseResourceId}, #{name}, #{nature}, #{socialCreditCode},
#{principal}, #{principalTel}, #{business}, #{workerNumber}, #{registeredAddress}, #{industryClassification}, #{gs}, #{registrationPlaceFlag}
#{principal}, #{principalTel}, #{business}, #{workerNumber}, #{registeredAddress}, #{industryClassification}, #{gs}, #{registrationPlaceFlag}
, #{associationBusinessEntityFlag}
)
)
</insert>
</insert>
...
@@ -46,6 +47,7 @@
...
@@ -46,6 +47,7 @@
<if
test=
"industryClassification != null"
>
industry_classification=#{industryClassification},
</if>
<if
test=
"industryClassification != null"
>
industry_classification=#{industryClassification},
</if>
<if
test=
"gs != null"
>
gs=#{gs},
</if>
<if
test=
"gs != null"
>
gs=#{gs},
</if>
<if
test=
"registrationPlaceFlag != null"
>
registration_place_flag=#{registrationPlaceFlag},
</if>
<if
test=
"registrationPlaceFlag != null"
>
registration_place_flag=#{registrationPlaceFlag},
</if>
<if
test=
"associationBusinessEntityFlag != null"
>
association_business_entity_flag=#{associationBusinessEntityFlag},
</if>
</set>
</set>
WHERE id=#{id}
WHERE id=#{id}
</update>
</update>
...
@@ -80,6 +82,6 @@
...
@@ -80,6 +82,6 @@
t1.house_resource_id = #{houseResourceId}
t1.house_resource_id = #{houseResourceId}
</select>
</select>
<select
id=
"selectByName"
resultType=
"com.ruoyi.system.domain.house.BusinessEntityInfo"
>
<select
id=
"selectByName"
resultType=
"com.ruoyi.system.domain.house.BusinessEntityInfo"
>
SELECT t2.* FROM house_resource t1 LEFT JOIN business_entity_info t2 ON t1.id = t2.house_resource_id WHERE t2.name
= #{name}
SELECT t2.* FROM house_resource t1 LEFT JOIN business_entity_info t2 ON t1.id = t2.house_resource_id WHERE t2.name
like concat('%', #{name}, '%')
</select>
</select>
</mapper>
</mapper>
ruoyi-system/src/main/resources/mapper/house/HouseResourceMapper.xml
View file @
1c88526e
...
@@ -543,15 +543,13 @@
...
@@ -543,15 +543,13 @@
</select>
</select>
<select
id=
"selectPageBusinessEntityStatistics"
resultType=
"com.ruoyi.system.domain.house.HouseResource"
>
<select
id=
"selectPageBusinessEntityStatistics"
resultType=
"com.ruoyi.system.domain.house.HouseResource"
>
SELECT
SELECT
t2.wg_name AS wgName4,
t1.*
t1.*,
t4.year_sell
FROM
FROM
house_resource t1
house_resource t1
LEFT JOIN grid_region t2 ON t2.wg_code = t1.four
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_info t3 ON t1.id = t3.house_resource_id
LEFT JOIN business_entity_sell t4 ON t4.business_entity_info_id = t3.id
LEFT JOIN business_entity_sell t4 ON t4.business_entity_info_id = t3.id
GROUP BY t1.id
GROUP BY t1.id
, t3.id
</select>
</select>
<select
id=
"selectForContrast"
resultType=
"com.ruoyi.system.domain.house.vo.HouseResourcePage"
>
<select
id=
"selectForContrast"
resultType=
"com.ruoyi.system.domain.house.vo.HouseResourcePage"
>
SELECT
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