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
faefa158
Commit
faefa158
authored
Mar 11, 2025
by
luben
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'main'
Dev See merge request
!104
parents
497503b1
031bc9ad
Pipeline
#143109
passed with stages
in 6 minutes and 8 seconds
Changes
20
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
424 additions
and
126 deletions
+424
-126
.gitlab-ci.yml
.gitlab-ci.yml
+3
-0
RegionController.java
.../java/com/ruoyi/web/controller/grid/RegionController.java
+38
-3
HouseResourceController.java
...m/ruoyi/web/controller/house/HouseResourceController.java
+2
-1
application-prod.yml
ruoyi-admin/src/main/resources/application-prod.yml
+6
-5
BusinessEntityInfo.java
...ava/com/ruoyi/system/domain/house/BusinessEntityInfo.java
+27
-0
BusinessEntitySell.java
...ava/com/ruoyi/system/domain/house/BusinessEntitySell.java
+19
-0
HouseResource.java
...ain/java/com/ruoyi/system/domain/house/HouseResource.java
+6
-0
HouseEnums.java
.../java/com/ruoyi/system/domain/house/enums/HouseEnums.java
+5
-4
BusinessEntityDto.java
...a/com/ruoyi/system/domain/house/vo/BusinessEntityDto.java
+30
-0
HouseResourceDetail.java
...com/ruoyi/system/domain/house/vo/HouseResourceDetail.java
+6
-0
HouseResourcePage.java
...a/com/ruoyi/system/domain/house/vo/HouseResourcePage.java
+8
-0
HouseResourceSaveUpdateDto.java
...yi/system/domain/house/vo/HouseResourceSaveUpdateDto.java
+1
-5
BusinessEntityInfoMapper.java
...m/ruoyi/system/mapper/house/BusinessEntityInfoMapper.java
+28
-0
BusinessEntitySellMapper.java
...m/ruoyi/system/mapper/house/BusinessEntitySellMapper.java
+27
-0
GridRegionFacadeService.java
...om/ruoyi/system/service/grid/GridRegionFacadeService.java
+50
-6
HouseResourceService.java
.../com/ruoyi/system/service/house/HouseResourceService.java
+1
-2
HouseResourceServiceImpl.java
...i/system/service/house/impl/HouseResourceServiceImpl.java
+42
-95
BusinessEntityInfoMapper.xml
.../main/resources/mapper/house/BusinessEntityInfoMapper.xml
+61
-0
BusinessEntitySellMapper.xml
.../main/resources/mapper/house/BusinessEntitySellMapper.xml
+53
-0
HouseResourceMapper.xml
...m/src/main/resources/mapper/house/HouseResourceMapper.xml
+11
-5
No files found.
.gitlab-ci.yml
View file @
faefa158
...
@@ -13,6 +13,7 @@ variables:
...
@@ -13,6 +13,7 @@ variables:
IMAGESTREAM
:
yichengstreet-be
#项目英文名
IMAGESTREAM
:
yichengstreet-be
#项目英文名
TAG
:
$CI_COMMIT_REF_NAME
TAG
:
$CI_COMMIT_REF_NAME
cache
:
cache
:
paths
:
paths
:
-
.m2/repository2
-
.m2/repository2
...
@@ -33,6 +34,7 @@ package:
...
@@ -33,6 +34,7 @@ package:
image
:
hub.eazytec-cloud.com/devops/maven:3.3.9-jdk-8
image
:
hub.eazytec-cloud.com/devops/maven:3.3.9-jdk-8
only
:
only
:
-
main
-
main
-
dev
deploy
:
deploy
:
...
@@ -51,6 +53,7 @@ deploy:
...
@@ -51,6 +53,7 @@ deploy:
-
docker push ${REPO}/${NAMESPACE}/${IMAGE}:${TAG}
-
docker push ${REPO}/${NAMESPACE}/${IMAGE}:${TAG}
only
:
only
:
-
main
-
main
-
dev
# publish:
# publish:
# image: hub.eazytec-cloud.com/devops/oc:3.11
# image: hub.eazytec-cloud.com/devops/oc:3.11
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/grid/RegionController.java
View file @
faefa158
...
@@ -7,10 +7,12 @@ import com.ruoyi.common.core.controller.BaseController;
...
@@ -7,10 +7,12 @@ import com.ruoyi.common.core.controller.BaseController;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.zqt.ZQTImportExcelUtil
;
import
com.ruoyi.common.zqt.ZQTImportExcelUtil
;
import
com.ruoyi.system.domain.grid.GridRegion
;
import
com.ruoyi.system.domain.grid.GridRegion
;
import
com.ruoyi.system.domain.grid.GridRegionExample
;
import
com.ruoyi.system.domain.grid.GridRegionExample
;
import
com.ruoyi.system.domain.grid.GridRegionUser
;
import
com.ruoyi.system.domain.grid.GridRegionUser
;
import
com.ruoyi.system.domain.grid.GridRegionUserExample
;
import
com.ruoyi.system.domain.grid.vo.GridDxbVO
;
import
com.ruoyi.system.domain.grid.vo.GridDxbVO
;
import
com.ruoyi.system.domain.grid.vo.GridTreeNode
;
import
com.ruoyi.system.domain.grid.vo.GridTreeNode
;
import
com.ruoyi.system.mapper.grid.GridRegionMapper
;
import
com.ruoyi.system.mapper.grid.GridRegionMapper
;
...
@@ -67,10 +69,27 @@ public class RegionController extends BaseController {
...
@@ -67,10 +69,27 @@ public class RegionController extends BaseController {
@RequestParam
(
"pageSize"
)
Integer
pageSize
)
{
@RequestParam
(
"pageSize"
)
Integer
pageSize
)
{
try
{
try
{
AjaxResult
result
=
new
AjaxResult
();
AjaxResult
result
=
new
AjaxResult
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
//网格
GridRegionUserExample
example
=
new
GridRegionUserExample
();
GridRegionUserExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
user
.
getUserId
());
// criteria.andUserIdEqualTo("2");
criteria
.
andIsValidEqualTo
(
"1"
);
List
<
GridRegionUser
>
relationship
=
gridRegionUserService
.
selectByExample
(
example
);
String
region
=
relationship
.
stream
().
map
(
GridRegionUser:
:
getWgId
).
collect
(
Collectors
.
joining
(
","
));
List
<
String
>
regions
=
Arrays
.
asList
(
region
.
split
(
","
));
List
<
String
>
regionList
=
new
ArrayList
<>();
if
(!
regions
.
get
(
0
).
equals
(
"320282001"
)){
regionList
.
add
(
"320282001"
);
}
regionList
.
addAll
(
regions
);
if
(
wgType
.
equals
(
"0"
)){
if
(
wgType
.
equals
(
"0"
)){
gridRegionFacadeService
.
getRolesWhereTypeZero
(
wgName
,
wgCode
,
wgType
,
level
,
wgPurpose
,
pageNum
,
pageSize
,
result
);
gridRegionFacadeService
.
getRolesWhereTypeZero
(
wgName
,
wgCode
,
wgType
,
level
,
wgPurpose
,
pageNum
,
pageSize
,
result
);
}
else
{
}
else
{
gridRegionFacadeService
.
getRoles
(
wgName
,
wgCode
,
wgType
,
level
,
wgPurpose
,
pageNum
,
pageSize
,
result
);
gridRegionFacadeService
.
getRoles
(
wgName
,
wgCode
,
wgType
,
level
,
wgPurpose
,
pageNum
,
pageSize
,
result
,
regionList
);
}
}
return
JSON
.
toJSONString
(
result
);
return
JSON
.
toJSONString
(
result
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -552,8 +571,24 @@ public class RegionController extends BaseController {
...
@@ -552,8 +571,24 @@ public class RegionController extends BaseController {
@RequestMapping
(
value
=
"/getWsTreeNode"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getWsTreeNode"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
AjaxResult
getWsTreeNode
(
@RequestParam
(
"wgType"
)
String
wgType
,
String
isShow
,
@RequestParam
(
value
=
"isAll"
,
required
=
false
)
String
isAll
)
{
public
AjaxResult
getWsTreeNode
(
@RequestParam
(
"wgType"
)
String
wgType
,
String
isShow
,
@RequestParam
(
value
=
"isAll"
,
required
=
false
)
String
isAll
)
{
// SysUser user = SecurityUtils.getLoginUser().getUser();
//网格
GridRegionUserExample
example
=
new
GridRegionUserExample
();
GridRegionUserExample
.
Criteria
criteria
=
example
.
createCriteria
();
// criteria.andUserIdEqualTo(user.getUserId());
criteria
.
andUserIdEqualTo
(
"2"
);
criteria
.
andIsValidEqualTo
(
"1"
);
List
<
GridRegionUser
>
relationship
=
gridRegionUserService
.
selectByExample
(
example
);
String
region
=
relationship
.
stream
().
map
(
GridRegionUser:
:
getWgId
).
collect
(
Collectors
.
joining
(
","
));
List
<
String
>
regions
=
Arrays
.
asList
(
region
.
split
(
","
));
List
<
String
>
regionList
=
new
ArrayList
<>();
if
(!
regions
.
get
(
0
).
equals
(
"320282001"
)){
regionList
.
add
(
"320282001"
);
}
regionList
.
addAll
(
regions
);
if
(
wgType
.
equals
(
"0"
)){
if
(
wgType
.
equals
(
"0"
)){
return
AjaxResult
.
success
(
gridRegionFacadeService
.
getWsTreeNodeIncludeTwoPointFive
(
null
,
null
,
null
));
return
AjaxResult
.
success
(
gridRegionFacadeService
.
getWsTreeNodeIncludeTwoPointFive
(
null
,
null
,
null
,
regionList
));
}
}
SysUser
sysUser
=
getLoginUser
().
getUser
();
SysUser
sysUser
=
getLoginUser
().
getUser
();
...
@@ -566,7 +601,7 @@ public class RegionController extends BaseController {
...
@@ -566,7 +601,7 @@ public class RegionController extends BaseController {
}
}
wgCodeList
=
list
.
stream
().
map
(
GridRegionUser:
:
getWgId
).
collect
(
Collectors
.
toList
());
wgCodeList
=
list
.
stream
().
map
(
GridRegionUser:
:
getWgId
).
collect
(
Collectors
.
toList
());
}
}
return
AjaxResult
.
success
(
gridRegionFacadeService
.
getWsTreeNode
(
wgType
,
wgCodeList
,
isShow
));
return
AjaxResult
.
success
(
gridRegionFacadeService
.
getWsTreeNode
(
wgType
,
wgCodeList
,
isShow
,
regions
));
}
}
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/house/HouseResourceController.java
View file @
faefa158
...
@@ -32,7 +32,8 @@ public class HouseResourceController {
...
@@ -32,7 +32,8 @@ public class HouseResourceController {
@PutMapping
@PutMapping
public
AjaxResult
updateHouseResource
(
@RequestBody
HouseResourceSaveUpdateDto
dto
)
{
public
AjaxResult
updateHouseResource
(
@RequestBody
HouseResourceSaveUpdateDto
dto
)
{
return
houseResourceService
.
updateHouseResource
(
dto
);
houseResourceService
.
updateHouseResource
(
dto
);
return
AjaxResult
.
success
();
}
}
@DeleteMapping
@DeleteMapping
...
...
ruoyi-admin/src/main/resources/application-prod.yml
View file @
faefa158
...
@@ -72,13 +72,14 @@ spring:
...
@@ -72,13 +72,14 @@ spring:
# redis 配置
# redis 配置
redis
:
redis
:
# 地址
# 地址
host
:
redis
host
:
redis
-prod.yx-street.svc.cluster.local
# 端口,默认为6379
# 端口,默认为6379
port
:
6379
port
:
6379
# 数据库索引
# 数据库索引
database
:
0
database
:
0
# 连接超时时间
# 连接超时时间
timeout
:
10s
timeout
:
10s
password
:
digital
lettuce
:
lettuce
:
pool
:
pool
:
# 连接池中的最小空闲连接
# 连接池中的最小空闲连接
...
@@ -95,16 +96,16 @@ spring:
...
@@ -95,16 +96,16 @@ spring:
druid
:
druid
:
# 主库数据源
# 主库数据源
master
:
master
:
url
:
jdbc:mysql://
192.168.70.2
:3306/yichengstreet?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
url
:
jdbc:mysql://
mysql-prod.yx-street.svc.cluster.local
:3306/yichengstreet?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username
:
root
username
:
root
password
:
Zhuo@2023
password
:
P@44w0rd
# 从库数据源
# 从库数据源
slave
:
slave
:
# 从数据源开关/默认关闭
# 从数据源开关/默认关闭
enabled
:
true
enabled
:
true
url
:
jdbc:mysql://
192.168.70.2
:3306/yichengstreet-party?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
url
:
jdbc:mysql://
mysql-prod.yx-street.svc.cluster.local
:3306/yichengstreet-party?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username
:
root
username
:
root
password
:
Zhuo@2023
password
:
P@44w0rd
# 初始连接数
# 初始连接数
initialSize
:
5
initialSize
:
5
# 最小连接池数量
# 最小连接池数量
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/BusinessEntityInfo.java
0 → 100644
View file @
faefa158
package
com
.
ruoyi
.
system
.
domain
.
house
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
BusinessEntityInfo
implements
Serializable
{
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
;
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/BusinessEntitySell.java
0 → 100644
View file @
faefa158
package
com
.
ruoyi
.
system
.
domain
.
house
;
import
lombok.Data
;
@Data
public
class
BusinessEntitySell
{
private
String
id
;
private
String
businessEntityInfoId
;
private
Integer
year
;
private
String
yearSell
;
private
String
yearTax
;
private
String
compare
;
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/HouseResource.java
View file @
faefa158
...
@@ -65,4 +65,10 @@ public class HouseResource implements Serializable {
...
@@ -65,4 +65,10 @@ public class HouseResource implements Serializable {
private
String
planeGraphUrl
;
private
String
planeGraphUrl
;
private
int
hireStatus
;
private
int
hireStatus
;
private
String
address
;
private
String
log
;
private
String
lat
;
}
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/enums/HouseEnums.java
View file @
faefa158
...
@@ -5,8 +5,8 @@ public class HouseEnums {
...
@@ -5,8 +5,8 @@ public class HouseEnums {
public
enum
HouseResourceAttributeEnum
{
public
enum
HouseResourceAttributeEnum
{
// 房源属性
// 房源属性
ZL
(
0
,
"租赁"
),
ZL
(
0
,
"租赁"
),
XS
(
1
,
"销售
"
),
QT
(
1
,
"其他
"
),
ZY
(
2
,
"自
用
"
);
ZY
(
2
,
"自
有
"
);
private
final
int
code
;
private
final
int
code
;
private
final
String
desc
;
private
final
String
desc
;
...
@@ -36,8 +36,9 @@ public class HouseEnums {
...
@@ -36,8 +36,9 @@ public class HouseEnums {
public
enum
HouseResourceTypeEnum
{
public
enum
HouseResourceTypeEnum
{
// 房源类型
// 房源类型
FY
(
0
,
"房源"
),
ZY
(
0
,
"在营"
),
QTQY
(
1
,
"其他区域"
);
KZ
(
1
,
"空置"
),
GK
(
2
,
"挂靠"
);
private
final
int
code
;
private
final
int
code
;
private
final
String
desc
;
private
final
String
desc
;
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/BusinessEntityDto.java
0 → 100644
View file @
faefa158
package
com
.
ruoyi
.
system
.
domain
.
house
.
vo
;
import
com.ruoyi.system.domain.house.BusinessEntitySell
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
BusinessEntityDto
{
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
List
<
BusinessEntitySell
>
businessEntitySells
;
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/HouseResourceDetail.java
View file @
faefa158
...
@@ -83,4 +83,10 @@ public class HouseResourceDetail {
...
@@ -83,4 +83,10 @@ public class HouseResourceDetail {
private
int
hireStatus
;
private
int
hireStatus
;
private
String
hireStatusText
;
private
String
hireStatusText
;
private
String
address
;
private
String
log
;
private
String
lat
;
}
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/HouseResourcePage.java
View file @
faefa158
...
@@ -83,4 +83,12 @@ public class HouseResourcePage {
...
@@ -83,4 +83,12 @@ public class HouseResourcePage {
private
int
hireStatus
;
private
int
hireStatus
;
private
String
hireStatusText
;
private
String
hireStatusText
;
private
String
address
;
private
String
log
;
private
String
lat
;
private
List
<
String
>
businessEntityInfoNames
;
}
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/HouseResourceSaveUpdateDto.java
View file @
faefa158
package
com
.
ruoyi
.
system
.
domain
.
house
.
vo
;
package
com
.
ruoyi
.
system
.
domain
.
house
.
vo
;
import
com.ruoyi.system.domain.grid.GridCompany
;
import
com.ruoyi.system.domain.grid.GridShop
;
import
com.ruoyi.system.domain.house.HouseResource
;
import
com.ruoyi.system.domain.house.HouseResource
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -12,7 +10,5 @@ public class HouseResourceSaveUpdateDto {
...
@@ -12,7 +10,5 @@ public class HouseResourceSaveUpdateDto {
private
HouseResource
houseResource
;
private
HouseResource
houseResource
;
private
List
<
GridCompany
>
companyList
;
private
List
<
BusinessEntityDto
>
businessEntityDtoList
;
private
List
<
GridShop
>
shopList
;
}
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/house/BusinessEntityInfoMapper.java
0 → 100644
View file @
faefa158
package
com
.
ruoyi
.
system
.
mapper
.
house
;
import
com.ruoyi.system.domain.house.BusinessEntityInfo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
BusinessEntityInfoMapper
{
// 插入业务实体信息
void
insertBusinessEntityInfo
(
BusinessEntityInfo
businessEntityInfo
);
// 根据ID查询业务实体信息
BusinessEntityInfo
selectBusinessEntityInfoById
(
@Param
(
"id"
)
String
id
);
// 更新业务实体信息
void
updateBusinessEntityInfo
(
BusinessEntityInfo
businessEntityInfo
);
// 删除业务实体信息
void
deleteBusinessEntityInfoById
(
@Param
(
"id"
)
String
id
);
// 查询所有业务实体信息
List
<
BusinessEntityInfo
>
selectAllBusinessEntityInfos
();
void
deleteByHouseResourceId
(
@Param
(
"houseResourceId"
)
String
houseResourceId
);
List
<
BusinessEntityInfo
>
selectAllBusinessEntityInfosByHouseResourceId
(
@Param
(
"houseResourceId"
)
String
houseResourceId
);
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/house/BusinessEntitySellMapper.java
0 → 100644
View file @
faefa158
package
com
.
ruoyi
.
system
.
mapper
.
house
;
import
com.ruoyi.system.domain.house.BusinessEntitySell
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
BusinessEntitySellMapper
{
// 插入业务实体销售信息
void
insertBusinessEntitySell
(
BusinessEntitySell
businessEntitySell
);
// 根据ID查询业务实体销售信息
BusinessEntitySell
selectBusinessEntitySellById
(
@Param
(
"id"
)
String
id
);
// 更新业务实体销售信息
void
updateBusinessEntitySell
(
BusinessEntitySell
businessEntitySell
);
// 删除业务实体销售信息
void
deleteBusinessEntitySellById
(
@Param
(
"id"
)
String
id
);
// 查询所有业务实体销售信息
List
<
BusinessEntitySell
>
selectAllBusinessEntitySells
();
void
deleteBusinessEntitySellByEntityId
(
@Param
(
"businessEntityId"
)
String
businessEntityId
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/grid/GridRegionFacadeService.java
View file @
faefa158
...
@@ -247,7 +247,7 @@ public class GridRegionFacadeService {
...
@@ -247,7 +247,7 @@ public class GridRegionFacadeService {
return
gridRegion
;
return
gridRegion
;
}
}
public
void
getRoles
(
String
wgName
,
String
wgCode
,
String
wgType
,
String
level
,
String
purpose
,
Integer
pageNum
,
Integer
pageSize
,
AjaxResult
result
)
{
public
void
getRoles
(
String
wgName
,
String
wgCode
,
String
wgType
,
String
level
,
String
purpose
,
Integer
pageNum
,
Integer
pageSize
,
AjaxResult
result
,
List
<
String
>
regions
)
{
if
(
null
==
pageNum
||
pageNum
<=
0
)
{
if
(
null
==
pageNum
||
pageNum
<=
0
)
{
pageNum
=
1
;
pageNum
=
1
;
}
}
...
@@ -295,10 +295,26 @@ public class GridRegionFacadeService {
...
@@ -295,10 +295,26 @@ public class GridRegionFacadeService {
result
.
buildSuccess
(
"success"
,
appPageModel
);
result
.
buildSuccess
(
"success"
,
appPageModel
);
return
;
return
;
}
}
List
<
GridRegion
>
res
=
new
ArrayList
<>();
if
(!(
regions
.
size
()==
1
&&
regions
.
get
(
0
).
equals
(
"320282001"
))){
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
for
(
String
region:
regions
){
map
.
put
(
region
,
1
);
}
for
(
GridRegion
region:
roles
){
if
(
map
.
containsKey
(
region
.
getWgCode
())){
res
.
add
(
region
);
}
}
}
else
{
res
=
roles
;
}
appPageModel
.
setCurPage
(
pageNum
);
appPageModel
.
setCurPage
(
pageNum
);
appPageModel
.
setRecordCount
(
count
);
appPageModel
.
setRecordCount
(
res
.
size
()
);
appPageModel
.
setPageCount
((
long
)
Math
.
ceil
(
1.0
*
count
/
pageSize
));
appPageModel
.
setPageCount
((
long
)
Math
.
ceil
(
1.0
*
count
/
pageSize
));
List
<
GridRegionWithCompanyItem
>
itemList
=
BeanCopyUtil
.
bathToBean
(
r
ol
es
,
GridRegionWithCompanyItem
.
class
);
List
<
GridRegionWithCompanyItem
>
itemList
=
BeanCopyUtil
.
bathToBean
(
res
,
GridRegionWithCompanyItem
.
class
);
itemList
.
forEach
(
e
->
{
itemList
.
forEach
(
e
->
{
GridCompanyLandExample
gridCompanyLandExample
=
new
GridCompanyLandExample
();
GridCompanyLandExample
gridCompanyLandExample
=
new
GridCompanyLandExample
();
GridCompanyLandExample
.
Criteria
gridCompanyLandExampleCriteria
=
gridCompanyLandExample
.
createCriteria
();
GridCompanyLandExample
.
Criteria
gridCompanyLandExampleCriteria
=
gridCompanyLandExample
.
createCriteria
();
...
@@ -769,7 +785,7 @@ public class GridRegionFacadeService {
...
@@ -769,7 +785,7 @@ public class GridRegionFacadeService {
return
;
return
;
}
}
public
List
<
GridTreeNode
>
getWsTreeNode
(
String
wgType
,
List
<
String
>
wgList
,
String
isShow
)
{
public
List
<
GridTreeNode
>
getWsTreeNode
(
String
wgType
,
List
<
String
>
wgList
,
String
isShow
,
List
<
String
>
regions
)
{
GridRegionSearchParam
param
=
new
GridRegionSearchParam
();
GridRegionSearchParam
param
=
new
GridRegionSearchParam
();
param
.
setWgType
(
wgType
);
param
.
setWgType
(
wgType
);
if
(!
CollectionUtils
.
isEmpty
(
wgList
)){
if
(!
CollectionUtils
.
isEmpty
(
wgList
)){
...
@@ -779,7 +795,21 @@ public class GridRegionFacadeService {
...
@@ -779,7 +795,21 @@ public class GridRegionFacadeService {
param
.
setShow
(
false
);
param
.
setShow
(
false
);
}
}
List
<
GridRegion
>
gridRegionList
=
gridRegionMapper
.
getByParams
(
param
);
List
<
GridRegion
>
gridRegionList
=
gridRegionMapper
.
getByParams
(
param
);
return
convertFrRegion
(
gridRegionList
,
wgList
);
List
<
GridTreeNode
>
res
=
convertFrRegion
(
gridRegionList
,
wgList
);
List
<
GridTreeNode
>
degree_second
=
new
ArrayList
<>();
if
(!(
regions
.
size
()==
1
&&
regions
.
get
(
0
).
equals
(
"320282001"
))){
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
for
(
String
region:
regions
){
map
.
put
(
region
,
1
);
}
for
(
GridTreeNode
region:
res
.
get
(
0
).
getChild
()){
if
(
map
.
containsKey
(
region
.
getCode
())){
degree_second
.
add
(
region
);
}
}
res
.
get
(
0
).
setChild
(
degree_second
);
}
return
res
;
}
}
private
List
<
GridTreeNode
>
convertFrRegion
(
List
<
GridRegion
>
gridRegionList
,
List
<
String
>
wgCodes
)
{
private
List
<
GridTreeNode
>
convertFrRegion
(
List
<
GridRegion
>
gridRegionList
,
List
<
String
>
wgCodes
)
{
...
@@ -1139,7 +1169,7 @@ public class GridRegionFacadeService {
...
@@ -1139,7 +1169,7 @@ public class GridRegionFacadeService {
return
gridRegionList
;
return
gridRegionList
;
}
}
public
List
<
GridTreeNode
>
getWsTreeNodeIncludeTwoPointFive
(
String
wgType
,
List
<
String
>
wgList
,
String
isShow
)
{
public
List
<
GridTreeNode
>
getWsTreeNodeIncludeTwoPointFive
(
String
wgType
,
List
<
String
>
wgList
,
String
isShow
,
List
<
String
>
regions
)
{
//获取一级树
//获取一级树
List
<
GridRegion
>
gridRegionList
=
gridRegionMapper
.
getRegionByTypeAndCode
(
"1"
,
new
ArrayList
<>(),
"1"
);
List
<
GridRegion
>
gridRegionList
=
gridRegionMapper
.
getRegionByTypeAndCode
(
"1"
,
new
ArrayList
<>(),
"1"
);
List
<
GridTreeNode
>
res
=
new
ArrayList
<>();
List
<
GridTreeNode
>
res
=
new
ArrayList
<>();
...
@@ -1237,6 +1267,20 @@ public class GridRegionFacadeService {
...
@@ -1237,6 +1267,20 @@ public class GridRegionFacadeService {
gridTreeNode
.
setChild
(
secondFiveTree
);
gridTreeNode
.
setChild
(
secondFiveTree
);
}
}
List
<
GridTreeNode
>
degree_second
=
new
ArrayList
<>();
if
(!(
regions
.
size
()==
1
&&
regions
.
get
(
0
).
equals
(
"320282001"
))){
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
for
(
String
region:
regions
){
map
.
put
(
region
,
1
);
}
for
(
GridTreeNode
region:
res
.
get
(
0
).
getChild
()){
if
(
map
.
containsKey
(
region
.
getCode
())){
degree_second
.
add
(
region
);
}
}
res
.
get
(
0
).
setChild
(
degree_second
);
}
return
res
;
return
res
;
}
}
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/house/HouseResourceService.java
View file @
faefa158
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.common.core.domain.AjaxResult
;
import
com.ruoyi.system.domain.house.HouseResource
;
import
com.ruoyi.system.domain.house.HouseResource
;
import
com.ruoyi.system.domain.house.vo.HouseResourceDetail
;
import
com.ruoyi.system.domain.house.vo.HouseResourceDetail
;
import
com.ruoyi.system.domain.house.vo.HouseResourcePage
;
import
com.ruoyi.system.domain.house.vo.HouseResourcePage
;
...
@@ -16,7 +15,7 @@ public interface HouseResourceService {
...
@@ -16,7 +15,7 @@ public interface HouseResourceService {
HouseResourceDetail
queryHouseResourceById
(
String
id
);
HouseResourceDetail
queryHouseResourceById
(
String
id
);
AjaxResult
updateHouseResource
(
HouseResourceSaveUpdateDto
dto
);
void
updateHouseResource
(
HouseResourceSaveUpdateDto
dto
);
void
deleteHouseResourceById
(
String
id
);
void
deleteHouseResourceById
(
String
id
);
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/house/impl/HouseResourceServiceImpl.java
View file @
faefa158
...
@@ -2,30 +2,23 @@ package com.ruoyi.system.service.house.impl;
...
@@ -2,30 +2,23 @@ package com.ruoyi.system.service.house.impl;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.system.domain.grid.GridCompany
;
import
com.ruoyi.system.domain.grid.GridRegion
;
import
com.ruoyi.system.domain.grid.GridRegion
;
import
com.ruoyi.system.domain.grid.GridRegionExample
;
import
com.ruoyi.system.domain.grid.GridRegionExample
;
import
com.ruoyi.system.domain.grid.GridShop
;
import
com.ruoyi.system.domain.house.BusinessEntityInfo
;
import
com.ruoyi.system.domain.house.BusinessEntitySell
;
import
com.ruoyi.system.domain.house.HouseResource
;
import
com.ruoyi.system.domain.house.HouseResource
;
import
com.ruoyi.system.domain.house.HouseResourceAssociationObject
;
import
com.ruoyi.system.domain.house.enums.HouseEnums
;
import
com.ruoyi.system.domain.house.enums.HouseEnums
;
import
com.ruoyi.system.domain.house.vo.HouseResourceDetail
;
import
com.ruoyi.system.domain.house.vo.*
;
import
com.ruoyi.system.domain.house.vo.HouseResourcePage
;
import
com.ruoyi.system.domain.house.vo.HouseResourcePageQuery
;
import
com.ruoyi.system.domain.house.vo.HouseResourceSaveUpdateDto
;
import
com.ruoyi.system.domain.other.Labels
;
import
com.ruoyi.system.domain.other.LabelsExample
;
import
com.ruoyi.system.mapper.grid.GridRegionMapper
;
import
com.ruoyi.system.mapper.grid.GridRegionMapper
;
import
com.ruoyi.system.mapper.house.BusinessEntityInfoMapper
;
import
com.ruoyi.system.mapper.house.BusinessEntitySellMapper
;
import
com.ruoyi.system.mapper.house.HouseResourceAssociationObjectMapper
;
import
com.ruoyi.system.mapper.house.HouseResourceAssociationObjectMapper
;
import
com.ruoyi.system.mapper.house.HouseResourceMapper
;
import
com.ruoyi.system.mapper.house.HouseResourceMapper
;
import
com.ruoyi.system.mapper.other.LabelsMapper
;
import
com.ruoyi.system.service.grid.GridCompanyService
;
import
com.ruoyi.system.service.grid.GridShopService
;
import
com.ruoyi.system.service.house.HouseResourceService
;
import
com.ruoyi.system.service.house.HouseResourceService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.*
;
import
java.util.*
;
...
@@ -36,23 +29,17 @@ public class HouseResourceServiceImpl implements HouseResourceService {
...
@@ -36,23 +29,17 @@ public class HouseResourceServiceImpl implements HouseResourceService {
private
final
HouseResourceMapper
houseResourceMapper
;
private
final
HouseResourceMapper
houseResourceMapper
;
private
final
HouseResourceAssociationObjectMapper
houseResourceAssociationObject
Mapper
;
private
final
BusinessEntityInfoMapper
businessEntityInfo
Mapper
;
private
final
GridRegionMapper
gridRegionMapper
;
private
final
BusinessEntitySellMapper
businessEntitySellMapper
;
private
final
GridCompanyService
gridCompanyService
;
private
final
GridShopService
gridShopService
;
private
final
LabelsMapper
labels
Mapper
;
private
final
GridRegionMapper
gridRegion
Mapper
;
public
HouseResourceServiceImpl
(
HouseResourceMapper
houseResourceMapper
,
HouseResourceAssociationObjectMapper
houseResourceAssociationObjectMapper
,
GridRegionMapper
gridRegionMapper
,
GridCompanyService
gridCompanyService
,
GridShopService
gridShopService
,
LabelsMapper
labels
Mapper
)
{
public
HouseResourceServiceImpl
(
HouseResourceMapper
houseResourceMapper
,
BusinessEntityInfoMapper
businessEntityInfoMapper
,
BusinessEntitySellMapper
businessEntitySellMapper
,
GridRegionMapper
gridRegion
Mapper
)
{
this
.
houseResourceMapper
=
houseResourceMapper
;
this
.
houseResourceMapper
=
houseResourceMapper
;
this
.
houseResourceAssociationObjectMapper
=
houseResourceAssociationObjectMapper
;
this
.
businessEntityInfoMapper
=
businessEntityInfoMapper
;
this
.
businessEntitySellMapper
=
businessEntitySellMapper
;
this
.
gridRegionMapper
=
gridRegionMapper
;
this
.
gridRegionMapper
=
gridRegionMapper
;
this
.
gridCompanyService
=
gridCompanyService
;
this
.
gridShopService
=
gridShopService
;
this
.
labelsMapper
=
labelsMapper
;
}
}
@Override
@Override
...
@@ -62,33 +49,17 @@ public class HouseResourceServiceImpl implements HouseResourceService {
...
@@ -62,33 +49,17 @@ public class HouseResourceServiceImpl implements HouseResourceService {
dto
.
getHouseResource
().
setId
(
houseResourceId
);
dto
.
getHouseResource
().
setId
(
houseResourceId
);
houseResourceMapper
.
insertHouseResource
(
dto
.
getHouseResource
());
houseResourceMapper
.
insertHouseResource
(
dto
.
getHouseResource
());
for
(
GridCompany
gridCompany
:
dto
.
getCompanyList
())
{
for
(
BusinessEntityDto
businessEntityDto
:
dto
.
getBusinessEntityDtoList
())
{
AjaxResult
result
=
gridCompanyService
.
add
(
gridCompany
);
BusinessEntityInfo
businessEntityInfo
=
new
BusinessEntityInfo
();
if
(
result
.
isSuccess
())
{
BeanUtils
.
copyProperties
(
businessEntityDto
,
businessEntityInfo
);
String
id
=
result
.
get
(
"data"
).
toString
();
String
businessEntityInfoId
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
HouseResourceAssociationObject
houseResourceAssociationObject
=
new
HouseResourceAssociationObject
();
businessEntityInfo
.
setId
(
businessEntityInfoId
);
houseResourceAssociationObject
.
setId
(
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
));
businessEntityInfo
.
setHouseResourceId
(
houseResourceId
);
houseResourceAssociationObject
.
setHouseResourceId
(
houseResourceId
);
businessEntityInfoMapper
.
insertBusinessEntityInfo
(
businessEntityInfo
);
houseResourceAssociationObject
.
setBusinessId
(
id
);
houseResourceAssociationObject
.
setType
(
1
);
for
(
BusinessEntitySell
businessEntitySell
:
businessEntityDto
.
getBusinessEntitySells
())
{
houseResourceAssociationObjectMapper
.
insertHouseResourceObjectAssociation
(
houseResourceAssociationObject
);
businessEntitySell
.
setBusinessEntityInfoId
(
businessEntityInfoId
);
}
businessEntitySellMapper
.
insertBusinessEntitySell
(
businessEntitySell
);
}
for
(
GridShop
gridShop
:
dto
.
getShopList
())
{
try
{
AjaxResult
result
=
gridShopService
.
addGridShop
(
gridShop
);
if
(
result
.
isSuccess
())
{
String
id
=
result
.
get
(
"data"
).
toString
();
HouseResourceAssociationObject
houseResourceAssociationObject
=
new
HouseResourceAssociationObject
();
houseResourceAssociationObject
.
setId
(
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
));
houseResourceAssociationObject
.
setHouseResourceId
(
houseResourceId
);
houseResourceAssociationObject
.
setBusinessId
(
id
);
houseResourceAssociationObject
.
setType
(
2
);
houseResourceAssociationObjectMapper
.
insertHouseResourceObjectAssociation
(
houseResourceAssociationObject
);
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"新增shop出错"
);
}
}
}
}
}
}
...
@@ -121,57 +92,29 @@ public class HouseResourceServiceImpl implements HouseResourceService {
...
@@ -121,57 +92,29 @@ public class HouseResourceServiceImpl implements HouseResourceService {
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
AjaxResult
updateHouseResource
(
HouseResourceSaveUpdateDto
dto
)
{
public
void
updateHouseResource
(
HouseResourceSaveUpdateDto
dto
)
{
if
(
Objects
.
isNull
(
dto
.
getHouseResource
().
getId
()))
{
if
(
Objects
.
isNull
(
dto
.
getHouseResource
().
getId
()))
{
throw
new
RuntimeException
(
"房源id不能为空"
);
throw
new
RuntimeException
(
"房源id不能为空"
);
}
}
houseResourceMapper
.
updateHouseResource
(
dto
.
getHouseResource
());
houseResourceMapper
.
updateHouseResource
(
dto
.
getHouseResource
());
for
(
GridCompany
gridCompany
:
dto
.
getCompanyList
())
{
businessEntityInfoMapper
.
deleteByHouseResourceId
(
dto
.
getHouseResource
().
getId
());
if
(!
StringUtils
.
hasText
(
gridCompany
.
getId
()))
{
for
(
String
s
:
dto
.
getBusinessEntityDtoList
().
stream
().
map
(
BusinessEntityDto:
:
getId
).
collect
(
Collectors
.
toList
()))
{
AjaxResult
result
=
gridCompanyService
.
add
(
gridCompany
);
businessEntitySellMapper
.
deleteBusinessEntitySellById
(
s
);
if
(
result
.
isSuccess
())
{
String
id
=
result
.
get
(
"data"
).
toString
();
HouseResourceAssociationObject
houseResourceAssociationObject
=
new
HouseResourceAssociationObject
();
houseResourceAssociationObject
.
setId
(
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
));
houseResourceAssociationObject
.
setHouseResourceId
(
dto
.
getHouseResource
().
getId
());
houseResourceAssociationObject
.
setBusinessId
(
id
);
houseResourceAssociationObject
.
setType
(
1
);
houseResourceAssociationObjectMapper
.
insertHouseResourceObjectAssociation
(
houseResourceAssociationObject
);
}
}
else
{
gridCompanyService
.
edit
(
gridCompany
);
}
}
}
for
(
BusinessEntityDto
businessEntityDto
:
dto
.
getBusinessEntityDtoList
())
{
for
(
GridShop
gridShop
:
dto
.
getShopList
())
{
BusinessEntityInfo
businessEntityInfo
=
new
BusinessEntityInfo
();
if
(
Objects
.
isNull
(
gridShop
.
getId
()))
{
BeanUtils
.
copyProperties
(
businessEntityDto
,
businessEntityInfo
);
AjaxResult
result
=
null
;
String
businessEntityInfoId
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
try
{
businessEntityInfo
.
setId
(
businessEntityInfoId
);
result
=
gridShopService
.
addGridShop
(
gridShop
);
businessEntityInfo
.
setHouseResourceId
(
dto
.
getHouseResource
().
getId
());
}
catch
(
Exception
e
)
{
businessEntityInfoMapper
.
insertBusinessEntityInfo
(
businessEntityInfo
);
throw
new
RuntimeException
(
"新增shop出错"
);
}
for
(
BusinessEntitySell
businessEntitySell
:
businessEntityDto
.
getBusinessEntitySells
())
{
if
(
result
.
isSuccess
())
{
businessEntitySell
.
setBusinessEntityInfoId
(
businessEntityInfoId
);
String
id
=
result
.
get
(
"data"
).
toString
();
businessEntitySellMapper
.
insertBusinessEntitySell
(
businessEntitySell
);
HouseResourceAssociationObject
houseResourceAssociationObject
=
new
HouseResourceAssociationObject
();
houseResourceAssociationObject
.
setId
(
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
));
houseResourceAssociationObject
.
setHouseResourceId
(
dto
.
getHouseResource
().
getId
());
houseResourceAssociationObject
.
setBusinessId
(
id
);
houseResourceAssociationObject
.
setType
(
2
);
houseResourceAssociationObjectMapper
.
insertHouseResourceObjectAssociation
(
houseResourceAssociationObject
);
}
else
{
return
result
;
}
}
else
{
try
{
gridShopService
.
updateGridShop
(
gridShop
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"更新shop出错"
);
}
}
}
}
}
return
AjaxResult
.
success
();
}
}
@Override
@Override
...
@@ -205,6 +148,10 @@ public class HouseResourceServiceImpl implements HouseResourceService {
...
@@ -205,6 +148,10 @@ public class HouseResourceServiceImpl implements HouseResourceService {
x
.
setDecorationConditionText
(
HouseEnums
.
DecorationConditionEnum
.
getDescByCode
(
x
.
getDecorationCondition
()));
x
.
setDecorationConditionText
(
HouseEnums
.
DecorationConditionEnum
.
getDescByCode
(
x
.
getDecorationCondition
()));
x
.
setRentalUnitText
(
HouseEnums
.
RentalUnitEnum
.
getDescByCode
(
x
.
getRentalUnit
()));
x
.
setRentalUnitText
(
HouseEnums
.
RentalUnitEnum
.
getDescByCode
(
x
.
getRentalUnit
()));
x
.
setHireStatusText
(
HouseEnums
.
hireStatusTextEnum
.
getDescByCode
(
x
.
getHireStatus
()));
x
.
setHireStatusText
(
HouseEnums
.
hireStatusTextEnum
.
getDescByCode
(
x
.
getHireStatus
()));
List
<
BusinessEntityInfo
>
businessEntityInfos
=
businessEntityInfoMapper
.
selectAllBusinessEntityInfosByHouseResourceId
(
x
.
getId
());
if
(!
CollectionUtils
.
isEmpty
(
businessEntityInfos
))
{
x
.
setBusinessEntityInfoNames
(
businessEntityInfos
.
stream
().
map
(
BusinessEntityInfo:
:
getName
).
collect
(
Collectors
.
toList
()));
}
});
});
return
page
;
return
page
;
}
}
...
...
ruoyi-system/src/main/resources/mapper/house/BusinessEntityInfoMapper.xml
0 → 100644
View file @
faefa158
<?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.BusinessEntityInfoMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.system.domain.house.BusinessEntityInfo"
>
<id
column=
"id"
property=
"id"
jdbcType=
"VARCHAR"
/>
<result
column=
"house_resource_id"
property=
"houseResourceId"
jdbcType=
"VARCHAR"
/>
<result
column=
"name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"nature"
property=
"nature"
jdbcType=
"VARCHAR"
/>
<result
column=
"social_credit_code"
property=
"socialCreditCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"principal"
property=
"principal"
jdbcType=
"VARCHAR"
/>
<result
column=
"principal_tel"
property=
"principalTel"
jdbcType=
"VARCHAR"
/>
<result
column=
"business"
property=
"business"
jdbcType=
"VARCHAR"
/>
<result
column=
"worker_number"
property=
"workerNumber"
jdbcType=
"INTEGER"
/>
</resultMap>
<insert
id=
"insertBusinessEntityInfo"
parameterType=
"com.ruoyi.system.domain.house.BusinessEntityInfo"
>
INSERT INTO business_entity_info (
id, house_resource_id, name, nature, social_credit_code,
principal, principal_tel, business, worker_number
) VALUES (
#{id}, #{houseResourceId}, #{name}, #{nature}, #{socialCreditCode},
#{principal}, #{principalTel}, #{business}, #{workerNumber}
)
</insert>
<select
id=
"selectBusinessEntityInfoById"
resultMap=
"BaseResultMap"
>
SELECT * FROM business_entity_info WHERE id = #{id}
</select>
<update
id=
"updateBusinessEntityInfo"
parameterType=
"com.ruoyi.system.domain.house.BusinessEntityInfo"
>
UPDATE business_entity_info
<set>
<if
test=
"houseResourceId != null"
>
house_resource_id=#{houseResourceId},
</if>
<if
test=
"name != null"
>
name=#{name},
</if>
<if
test=
"nature != null"
>
nature=#{nature},
</if>
<if
test=
"socialCreditCode != null"
>
social_credit_code=#{socialCreditCode},
</if>
<if
test=
"principal != null"
>
principal=#{principal},
</if>
<if
test=
"principalTel != null"
>
principal_tel=#{principalTel},
</if>
<if
test=
"business != null"
>
business=#{business},
</if>
<if
test=
"workerNumber != null"
>
worker_number=#{workerNumber},
</if>
</set>
WHERE id=#{id}
</update>
<delete
id=
"deleteBusinessEntityInfoById"
>
DELETE FROM business_entity_info WHERE id = #{id}
</delete>
<select
id=
"selectAllBusinessEntityInfos"
resultMap=
"BaseResultMap"
>
SELECT * FROM business_entity_info
</select>
<delete
id=
"deleteByHouseResourceId"
>
DELETE FROM business_entity_info WHERE house_resource_id = #{houseResourceId}
</delete>
<select
id=
"selectAllBusinessEntityInfosByHouseResourceId"
resultType=
"com.ruoyi.system.domain.house.BusinessEntityInfo"
>
SELECT * FROM business_entity_info WHERE house_resource_id = #{houseResourceId}
</select>
</mapper>
\ No newline at end of file
ruoyi-system/src/main/resources/mapper/house/BusinessEntitySellMapper.xml
0 → 100644
View file @
faefa158
<?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.BusinessEntitySellMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.system.domain.house.BusinessEntitySell"
>
<id
column=
"id"
property=
"id"
jdbcType=
"VARCHAR"
/>
<result
column=
"business_entity_info_id"
property=
"businessEntityInfoId"
jdbcType=
"VARCHAR"
/>
<result
column=
"year"
property=
"year"
jdbcType=
"INTEGER"
/>
<result
column=
"year_sell"
property=
"yearSell"
jdbcType=
"VARCHAR"
/>
<result
column=
"year_tax"
property=
"yearTax"
jdbcType=
"VARCHAR"
/>
<result
column=
"compare"
property=
"compare"
jdbcType=
"VARCHAR"
/>
</resultMap>
<!-- 插入操作 -->
<insert
id=
"insertBusinessEntitySell"
parameterType=
"com.ruoyi.system.domain.house.BusinessEntitySell"
>
INSERT INTO business_entity_sell (
id, business_entity_info_id, year, year_sell, year_tax, compare
) VALUES (
#{id}, #{businessEntityInfoId}, #{year}, #{yearSell}, #{yearTax}, #{compare}
)
</insert>
<!-- 根据ID查询操作 -->
<select
id=
"selectBusinessEntitySellById"
resultMap=
"BaseResultMap"
>
SELECT * FROM business_entity_sell WHERE id = #{id}
</select>
<!-- 更新操作 -->
<update
id=
"updateBusinessEntitySell"
parameterType=
"com.ruoyi.system.domain.house.BusinessEntitySell"
>
UPDATE business_entity_sell
<set>
<if
test=
"BusinessEntityInfoId != null"
>
business_entity_info_id=#{businessEntityInfoId},
</if>
<if
test=
"year != null"
>
year=#{year},
</if>
<if
test=
"yearSell != null"
>
year_sell=#{yearSell},
</if>
<if
test=
"yearTax != null"
>
year_tax=#{yearTax},
</if>
<if
test=
"compare != null"
>
compare=#{compare},
</if>
</set>
WHERE id=#{id}
</update>
<!-- 删除操作 -->
<delete
id=
"deleteBusinessEntitySellById"
>
DELETE FROM business_entity_sell WHERE id = #{id}
</delete>
<!-- 查询所有记录操作 -->
<select
id=
"selectAllBusinessEntitySells"
resultMap=
"BaseResultMap"
>
SELECT * FROM business_entity_sell
</select>
<delete
id=
"deleteBusinessEntitySellByEntityId"
>
DELETE FROM business_entity_sell WHERE business_entity_info_id = #{businessEntityId}
</delete>
</mapper>
\ No newline at end of file
ruoyi-system/src/main/resources/mapper/house/HouseResourceMapper.xml
View file @
faefa158
...
@@ -31,6 +31,9 @@
...
@@ -31,6 +31,9 @@
<result
property=
"rentalUnit"
column=
"rental_unit"
jdbcType=
"INTEGER"
/>
<result
property=
"rentalUnit"
column=
"rental_unit"
jdbcType=
"INTEGER"
/>
<result
property=
"planeGraphUrl"
column=
"plane_graph_url"
jdbcType=
"VARCHAR"
/>
<result
property=
"planeGraphUrl"
column=
"plane_graph_url"
jdbcType=
"VARCHAR"
/>
<result
property=
"hireStatus"
column=
"hire_status"
jdbcType=
"INTEGER"
/>
<result
property=
"hireStatus"
column=
"hire_status"
jdbcType=
"INTEGER"
/>
<result
property=
"address"
column=
"address"
jdbcType=
"VARCHAR"
/>
<result
property=
"log"
column=
"log"
jdbcType=
"VARCHAR"
/>
<result
property=
"lat"
column=
"lat"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<insert
id=
"insertHouseResource"
parameterType=
"com.ruoyi.system.domain.house.HouseResource"
>
<insert
id=
"insertHouseResource"
parameterType=
"com.ruoyi.system.domain.house.HouseResource"
>
...
@@ -38,12 +41,12 @@
...
@@ -38,12 +41,12 @@
(id, relation_id, two, three, four, type, project_id, house_resource_url, house_number, house_area,
(id, relation_id, two, three, four, type, project_id, house_resource_url, house_number, house_area,
house_resource_attribute, house_resource_type, house_resource_use, house_resource_equity, house_resource_equity_tel, ownership,
house_resource_attribute, house_resource_type, house_resource_use, house_resource_equity, house_resource_equity_tel, ownership,
decoration_condition, orientation, landing_head_flag, common_area_number, office_number,
decoration_condition, orientation, landing_head_flag, common_area_number, office_number,
meeting_number, station_number, set_up, label_id, unit_price, rental_unit, plane_graph_url, hire_status)
meeting_number, station_number, set_up, label_id, unit_price, rental_unit, plane_graph_url, hire_status
, address, log, lat
)
VALUES
VALUES
(#{id}, #{relationId}, #{two}, #{three}, #{four}, #{type}, #{projectId}, #{houseResourceUrl}, #{houseNumber}, #{houseArea},
(#{id}, #{relationId}, #{two}, #{three}, #{four}, #{type}, #{projectId}, #{houseResourceUrl}, #{houseNumber}, #{houseArea},
#{houseResourceAttribute}, #{houseResourceType}, #{houseResourceUse}, #{houseResourceEquity}, #{houseResourceEquityTel}, #{ownership},
#{houseResourceAttribute}, #{houseResourceType}, #{houseResourceUse}, #{houseResourceEquity}, #{houseResourceEquityTel}, #{ownership},
#{decorationCondition}, #{orientation}, #{landingHeadFlag}, #{commonAreaNumber}, #{officeNumber},
#{decorationCondition}, #{orientation}, #{landingHeadFlag}, #{commonAreaNumber}, #{officeNumber},
#{meetingNumber}, #{stationNumber}, #{setUp}, #{labelId}, #{unitPrice}, #{rentalUnit}, #{planeGraphUrl}, #{hireStatus})
#{meetingNumber}, #{stationNumber}, #{setUp}, #{labelId}, #{unitPrice}, #{rentalUnit}, #{planeGraphUrl}, #{hireStatus}
, #{address}, #{log}, #{lat}
)
</insert>
</insert>
<select
id=
"selectHouseResourceById"
resultType=
"com.ruoyi.system.domain.house.HouseResource"
parameterType=
"string"
>
<select
id=
"selectHouseResourceById"
resultType=
"com.ruoyi.system.domain.house.HouseResource"
parameterType=
"string"
>
...
@@ -79,7 +82,10 @@
...
@@ -79,7 +82,10 @@
unit_price = #{unitPrice},
unit_price = #{unitPrice},
rental_unit = #{rentalUnit},
rental_unit = #{rentalUnit},
plane_graph_url = #{planeGraphUrl},
plane_graph_url = #{planeGraphUrl},
hire_status = #{hireStatus}
hire_status = #{hireStatus},
address = #{address},
log = #{log},
lat = #{lat}
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
...
@@ -92,7 +98,7 @@
...
@@ -92,7 +98,7 @@
(id, relation_id, two, three, four, type, project_id, house_resource_url, house_number, house_area,
(id, relation_id, two, three, four, type, project_id, house_resource_url, house_number, house_area,
house_resource_attribute, house_resource_type, house_resource_use, house_resource_equity, house_resource_equity_tel, ownership,
house_resource_attribute, house_resource_type, house_resource_use, house_resource_equity, house_resource_equity_tel, ownership,
decoration_condition, orientation, landing_head_flag, common_area_number, office_number,
decoration_condition, orientation, landing_head_flag, common_area_number, office_number,
meeting_number, station_number, set_up, label_id, unit_price, rental_unit, plane_graph_url, hire_status)
meeting_number, station_number, set_up, label_id, unit_price, rental_unit, plane_graph_url, hire_status
, address, log, lat
)
VALUES
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.id}, #{item.relationId}, #{two}, #{three}, #{four}, #{item.type}, #{item.projectId}, #{item.houseResourceUrl},
(#{item.id}, #{item.relationId}, #{two}, #{three}, #{four}, #{item.type}, #{item.projectId}, #{item.houseResourceUrl},
...
@@ -100,7 +106,7 @@
...
@@ -100,7 +106,7 @@
#{item.houseResourceUse}, #{item.houseResourceEquity}, #{item.houseResourceEquityTel}, #{ownership}, #{item.decorationCondition},
#{item.houseResourceUse}, #{item.houseResourceEquity}, #{item.houseResourceEquityTel}, #{ownership}, #{item.decorationCondition},
#{item.orientation}, #{item.landingHeadFlag}, #{item.commonAreaNumber}, #{item.officeNumber},
#{item.orientation}, #{item.landingHeadFlag}, #{item.commonAreaNumber}, #{item.officeNumber},
#{item.meetingNumber}, #{item.stationNumber}, #{item.setUp}, #{item.labelId}, #{item.unitPrice}, #{item.rentalUnit},
#{item.meetingNumber}, #{item.stationNumber}, #{item.setUp}, #{item.labelId}, #{item.unitPrice}, #{item.rentalUnit},
#{item.planeGraphUrl}, #{item.hireStatus})
#{item.planeGraphUrl}, #{item.hireStatus}
, #{item.address}, #{item.log}, #{item.lat}
)
</foreach>
</foreach>
</insert>
</insert>
...
...
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