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
1431c090
Commit
1431c090
authored
Jul 07, 2025
by
lixuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 房源
parent
73221044
Pipeline
#145288
failed with stages
Changes
8
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
171 additions
and
1 deletion
+171
-1
ContrastController.java
...va/com/ruoyi/web/controller/house/ContrastController.java
+72
-0
Contrast.java
...src/main/java/com/ruoyi/system/domain/house/Contrast.java
+21
-0
GridRegionMapper.java
...n/java/com/ruoyi/system/mapper/grid/GridRegionMapper.java
+3
-1
ContrastMapper.java
...in/java/com/ruoyi/system/mapper/house/ContrastMapper.java
+12
-0
HouseResourceMapper.java
...va/com/ruoyi/system/mapper/house/HouseResourceMapper.java
+2
-0
GridRegionMapper.xml
...ystem/src/main/resources/mapper/grid/GridRegionMapper.xml
+4
-0
ContrastMapper.xml
...system/src/main/resources/mapper/house/ContrastMapper.xml
+24
-0
HouseResourceMapper.xml
...m/src/main/resources/mapper/house/HouseResourceMapper.xml
+33
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/house/ContrastController.java
0 → 100644
View file @
1431c090
package
com
.
ruoyi
.
web
.
controller
.
house
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.system.domain.grid.GridRegion
;
import
com.ruoyi.system.domain.house.Contrast
;
import
com.ruoyi.system.domain.house.vo.HouseResourcePage
;
import
com.ruoyi.system.mapper.grid.GridRegionMapper
;
import
com.ruoyi.system.mapper.house.ContrastMapper
;
import
com.ruoyi.system.mapper.house.HouseResourceMapper
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.Objects
;
@RestController
@RequestMapping
(
"/api/contrast"
)
public
class
ContrastController
extends
BaseController
{
private
final
ContrastMapper
contrastMapper
;
private
final
GridRegionMapper
gridRegionMapper
;
private
final
HouseResourceMapper
houseResourceMapper
;
public
ContrastController
(
ContrastMapper
contrastMapper
,
GridRegionMapper
gridRegionMapper
,
HouseResourceMapper
houseResourceMapper
)
{
this
.
contrastMapper
=
contrastMapper
;
this
.
gridRegionMapper
=
gridRegionMapper
;
this
.
houseResourceMapper
=
houseResourceMapper
;
}
@PutMapping
(
"/start"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
AjaxResult
start
()
{
List
<
Contrast
>
contrasts
=
contrastMapper
.
selectAll
();
for
(
Contrast
contrast
:
contrasts
)
{
if
(
Objects
.
isNull
(
contrast
.
getWgName
()))
{
setFlag
(
contrast
,
"未设置网格名称"
);
}
else
{
GridRegion
gridRegion
=
gridRegionMapper
.
selectByWgName
(
contrast
.
getWgName
());
if
(
Objects
.
isNull
(
contrast
.
getName
()))
{
setFlag
(
contrast
,
"未设置经营主体名称"
);
}
else
{
List
<
HouseResourcePage
>
list
=
houseResourceMapper
.
selectForContrast
(
gridRegion
.
getWgCode
(),
contrast
.
getName
());
if
(
list
.
isEmpty
())
{
setFlag
(
contrast
,
"该网格下没有该经营主体"
);
}
else
if
(
list
.
size
()
>
1
)
{
setFlag
(
contrast
,
"该网格下有多个同样名字的经营主体"
);
}
else
{
String
flag
=
""
;
HouseResourcePage
houseResourcePage
=
list
.
get
(
0
);
if
(
Objects
.
isNull
(
contrast
.
getPrincipal
())
||
!
houseResourcePage
.
getPrincipal
().
equals
(
contrast
.
getPrincipal
()))
{
flag
=
flag
+=
"联系人不一致,"
;
}
else
if
(
Objects
.
isNull
(
contrast
.
getPrincipalTel
())
||
!
houseResourcePage
.
getPrincipalTel
().
equals
(
contrast
.
getPrincipalTel
()))
{
flag
=
flag
+=
"联系电话不一致,"
;
}
setFlag
(
contrast
,
flag
);
}
}
}
}
return
AjaxResult
.
success
();
}
private
void
setFlag
(
Contrast
contrast
,
String
flag
)
{
contrast
.
setFlag
(
flag
);
contrastMapper
.
updateById
(
contrast
);
}
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/Contrast.java
0 → 100644
View file @
1431c090
package
com
.
ruoyi
.
system
.
domain
.
house
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
Contrast
implements
Serializable
{
private
Long
id
;
private
String
wgName
;
private
String
name
;
private
String
principal
;
private
String
principalTel
;
private
String
flag
;
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/grid/GridRegionMapper.java
View file @
1431c090
...
@@ -94,4 +94,6 @@ public interface GridRegionMapper {
...
@@ -94,4 +94,6 @@ public interface GridRegionMapper {
int
countByFourthCode
(
String
code
);
int
countByFourthCode
(
String
code
);
int
selectMaxPosition
();
int
selectMaxPosition
();
GridRegion
selectByWgName
(
@Param
(
"wgName"
)
String
wgName
);
}
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/house/ContrastMapper.java
0 → 100644
View file @
1431c090
package
com
.
ruoyi
.
system
.
mapper
.
house
;
import
com.ruoyi.system.domain.house.Contrast
;
import
java.util.List
;
public
interface
ContrastMapper
{
List
<
Contrast
>
selectAll
();
void
updateById
(
Contrast
contrast
);
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/house/HouseResourceMapper.java
View file @
1431c090
...
@@ -31,4 +31,6 @@ public interface HouseResourceMapper {
...
@@ -31,4 +31,6 @@ public interface HouseResourceMapper {
List
<
HouseResource
>
selectAll
();
List
<
HouseResource
>
selectAll
();
List
<
HouseResource
>
selectPageBusinessEntityStatistics
();
List
<
HouseResource
>
selectPageBusinessEntityStatistics
();
List
<
HouseResourcePage
>
selectForContrast
(
@Param
(
"two"
)
String
two
,
@Param
(
"name"
)
String
name
);
}
}
ruoyi-system/src/main/resources/mapper/grid/GridRegionMapper.xml
View file @
1431c090
...
@@ -793,5 +793,9 @@
...
@@ -793,5 +793,9 @@
SELECT MAX(position)
SELECT MAX(position)
FROM grid_region
FROM grid_region
</select>
</select>
<select
id=
"selectByWgName"
resultType=
"com.ruoyi.system.domain.grid.GridRegion"
>
select * from grid_region
where wg_name = #{wgName} and is_valid = '1' limit 1
</select>
</mapper>
</mapper>
ruoyi-system/src/main/resources/mapper/house/ContrastMapper.xml
0 → 100644
View file @
1431c090
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.system.mapper.house.ContrastMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.system.domain.house.Contrast"
>
<id
property=
"id"
column=
"id"
jdbcType=
"NUMERIC"
/>
<result
property=
"wgName"
column=
"wg_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"name"
column=
"name"
jdbcType=
"VARCHAR"
/>
<result
property=
"principal"
column=
"principal"
jdbcType=
"VARCHAR"
/>
<result
property=
"principalTel"
column=
"principal_tel"
jdbcType=
"VARCHAR"
/>
<result
property=
"flag"
column=
"flag"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"selectAll"
resultType=
"com.ruoyi.system.domain.house.Contrast"
>
SELECT * FROM contrast
</select>
<update
id=
"updateById"
>
UPDATE contrast
SET wg_name = #{wgName,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
principal = #{principal,jdbcType=VARCHAR},
principal_tel = #{principalTel,jdbcType=VARCHAR},
flag = #{flag,jdbcType=VARCHAR}
WHERE id = #{id,jdbcType=NUMERIC}
</update>
</mapper>
ruoyi-system/src/main/resources/mapper/house/HouseResourceMapper.xml
View file @
1431c090
...
@@ -356,4 +356,37 @@
...
@@ -356,4 +356,37 @@
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
</select>
</select>
<select
id=
"selectForContrast"
resultType=
"com.ruoyi.system.domain.house.vo.HouseResourcePage"
>
SELECT
t1.id,
t1.two,
t1.three,
t2.wg_name AS wgName4,
t1.type,
t1.house_number,
t1.address,
t1.house_area,
t1.house_resource_attribute,
t1.house_resource_type,
t1.ownership,
t1.house_resource_equity_tel,
t1.unit_price,
t3.nature,
t3.NAME,
t3.principal_tel,
t3.business,
t3.worker_number,
t3.registration_place_flag,
t3.registered_address,
t3.industry_classification,
t3.gs,
t1.remark,
t3.name AS businessEntityInfoName,
t3.principal
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
WHERE t1.two = #{two} AND t3.NAME = #{name}
</select>
</mapper>
</mapper>
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