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
fd7e5cf0
Commit
fd7e5cf0
authored
Mar 05, 2025
by
lixuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'main'
Dev See merge request
!23
parents
147acb1c
5fea5538
Pipeline
#142900
passed with stages
in 3 minutes and 43 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
206 additions
and
12 deletions
+206
-12
HouseResource.java
...ain/java/com/ruoyi/system/domain/house/HouseResource.java
+2
-0
HouseEnums.java
.../java/com/ruoyi/system/domain/house/enums/HouseEnums.java
+172
-0
HouseResourcePage.java
...a/com/ruoyi/system/domain/house/vo/HouseResourcePage.java
+16
-4
HouseResourceServiceImpl.java
...i/system/service/house/impl/HouseResourceServiceImpl.java
+6
-0
HouseResourceMapper.xml
...m/src/main/resources/mapper/house/HouseResourceMapper.xml
+10
-8
No files found.
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/HouseResource.java
View file @
fd7e5cf0
...
...
@@ -58,5 +58,7 @@ public class HouseResource implements Serializable {
private
BigDecimal
unitPrice
;
private
int
rentalUnit
;
private
String
planeGraphUrl
;
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/enums/HouseEnums.java
0 → 100644
View file @
fd7e5cf0
package
com
.
ruoyi
.
system
.
domain
.
house
.
enums
;
public
class
HouseEnums
{
public
enum
HouseResourceAttributeEnum
{
// 房源属性
ZL
(
0
,
"租赁"
),
XS
(
1
,
"销售"
),
ZY
(
2
,
"自用"
);
private
final
int
code
;
private
final
String
desc
;
HouseResourceAttributeEnum
(
int
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
static
String
getDescByCode
(
int
code
)
{
for
(
HouseResourceAttributeEnum
value
:
HouseResourceAttributeEnum
.
values
())
{
if
(
value
.
getCode
()
==
code
)
{
return
value
.
getDesc
();
}
}
return
null
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDesc
()
{
return
desc
;
}
}
public
enum
HouseResourceTypeEnum
{
// 房源类型
FY
(
0
,
"房源"
),
QTQY
(
1
,
"其他区域"
);
private
final
int
code
;
private
final
String
desc
;
HouseResourceTypeEnum
(
int
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDesc
()
{
return
desc
;
}
public
static
String
getDescByCode
(
int
code
)
{
for
(
HouseResourceAttributeEnum
value
:
HouseResourceAttributeEnum
.
values
())
{
if
(
value
.
getCode
()
==
code
)
{
return
value
.
getDesc
();
}
}
return
null
;
}
}
public
enum
DecorationConditionEnum
{
// 装修情况
JZ
(
0
,
"精装"
),
JIANZHUAN
(
1
,
"简装"
),
MP
(
2
,
"毛胚"
);
private
final
int
code
;
private
final
String
desc
;
DecorationConditionEnum
(
int
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDesc
()
{
return
desc
;
}
public
static
String
getDescByCode
(
int
code
)
{
for
(
HouseResourceAttributeEnum
value
:
HouseResourceAttributeEnum
.
values
())
{
if
(
value
.
getCode
()
==
code
)
{
return
value
.
getDesc
();
}
}
return
null
;
}
}
public
enum
OrientationEnum
{
// 朝向
D
(
0
,
"东"
),
N
(
1
,
"南"
),
X
(
2
,
"西"
),
B
(
3
,
"北"
),
DN
(
4
,
"东南"
),
DB
(
5
,
"东北"
),
XN
(
6
,
"西南"
),
XB
(
7
,
"西北"
),
NB
(
8
,
"南北"
),
DX
(
9
,
"东西"
);
private
final
int
code
;
private
final
String
desc
;
OrientationEnum
(
int
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDesc
()
{
return
desc
;
}
public
static
String
getDescByCode
(
int
code
)
{
for
(
HouseResourceAttributeEnum
value
:
HouseResourceAttributeEnum
.
values
())
{
if
(
value
.
getCode
()
==
code
)
{
return
value
.
getDesc
();
}
}
return
null
;
}
}
public
enum
RentalUnitEnum
{
// 租金单位
A
(
0
,
"元/㎡*天"
),
B
(
1
,
"元/天"
),
C
(
2
,
"元/㎡*月"
),
D
(
3
,
"元/月"
),
E
(
4
,
"元/年"
);
private
final
int
code
;
private
final
String
desc
;
RentalUnitEnum
(
int
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDesc
()
{
return
desc
;
}
public
static
String
getDescByCode
(
int
code
)
{
for
(
HouseResourceAttributeEnum
value
:
HouseResourceAttributeEnum
.
values
())
{
if
(
value
.
getCode
()
==
code
)
{
return
value
.
getDesc
();
}
}
return
null
;
}
}
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/HouseResourcePage.java
View file @
fd7e5cf0
...
...
@@ -30,9 +30,13 @@ public class HouseResourcePage {
private
Integer
houseArea
;
private
String
houseResourceAttribute
;
private
int
houseResourceAttribute
;
private
String
houseResourceType
;
private
String
houseResourceAttributeText
;
private
int
houseResourceType
;
private
String
houseResourceTypeText
;
private
String
houseResourceUse
;
...
...
@@ -40,9 +44,13 @@ public class HouseResourcePage {
private
String
houseResourceEquityTel
;
private
String
decorationCondition
;
private
int
decorationCondition
;
private
String
decorationConditionText
;
private
String
orientation
;
private
int
orientation
;
private
String
orientationText
;
private
Boolean
landingHeadFlag
;
...
...
@@ -60,5 +68,9 @@ public class HouseResourcePage {
private
BigDecimal
unitPrice
;
private
int
rentalUnit
;
private
String
rentalUnitText
;
private
String
planeGraphUrl
;
}
ruoyi-system/src/main/java/com/ruoyi/system/service/house/impl/HouseResourceServiceImpl.java
View file @
fd7e5cf0
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.system.service.house.impl;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.ruoyi.system.domain.house.HouseResource
;
import
com.ruoyi.system.domain.house.enums.HouseEnums
;
import
com.ruoyi.system.domain.house.vo.HouseResourcePage
;
import
com.ruoyi.system.domain.house.vo.HouseResourcePageQuery
;
import
com.ruoyi.system.domain.house.vo.HouseResourceSaveDto
;
...
...
@@ -70,6 +71,11 @@ public class HouseResourceServiceImpl implements HouseResourceService {
IPage
<
HouseResourcePage
>
page
=
houseResourceMapper
.
selectPage
(
new
Page
<>(
query
.
getPageNum
(),
query
.
getPageSize
()),
query
);
page
.
getRecords
().
forEach
(
x
->
{
x
.
setHouseResourceUrlList
(
Arrays
.
asList
(
x
.
getHouseResourceUrl
().
split
(
","
)));
x
.
setHouseResourceAttributeText
(
HouseEnums
.
HouseResourceAttributeEnum
.
getDescByCode
(
x
.
getHouseResourceAttribute
()));
x
.
setHouseResourceTypeText
(
HouseEnums
.
HouseResourceTypeEnum
.
getDescByCode
(
x
.
getHouseResourceType
()));
x
.
setOrientationText
(
HouseEnums
.
OrientationEnum
.
getDescByCode
(
x
.
getOrientation
()));
x
.
setDecorationConditionText
(
HouseEnums
.
DecorationConditionEnum
.
getDescByCode
(
x
.
getDecorationCondition
()));
x
.
setRentalUnitText
(
HouseEnums
.
RentalUnitEnum
.
getDescByCode
(
x
.
getRentalUnit
()));
});
return
page
;
}
...
...
ruoyi-system/src/main/resources/mapper/house/HouseResourceMapper.xml
View file @
fd7e5cf0
...
...
@@ -12,13 +12,13 @@
<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=
"houseResourceAttribute"
column=
"house_resource_attribute"
jdbcType=
"
VARCHA
R"
/>
<result
property=
"houseResourceType"
column=
"house_resource_type"
jdbcType=
"
VARCHA
R"
/>
<result
property=
"houseResourceAttribute"
column=
"house_resource_attribute"
jdbcType=
"
INTEGE
R"
/>
<result
property=
"houseResourceType"
column=
"house_resource_type"
jdbcType=
"
INTEGE
R"
/>
<result
property=
"houseResourceUse"
column=
"house_resource_use"
jdbcType=
"VARCHAR"
/>
<result
property=
"houseResourceEquity"
column=
"house_resource_equity"
jdbcType=
"VARCHAR"
/>
<result
property=
"houseResourceEquityTel"
column=
"house_resource_equity_tel"
jdbcType=
"VARCHAR"
/>
<result
property=
"decorationCondition"
column=
"decoration_condition"
jdbcType=
"
VARCHA
R"
/>
<result
property=
"orientation"
column=
"orientation"
jdbcType=
"
VARCHA
R"
/>
<result
property=
"decorationCondition"
column=
"decoration_condition"
jdbcType=
"
INTEGE
R"
/>
<result
property=
"orientation"
column=
"orientation"
jdbcType=
"
INTEGE
R"
/>
<result
property=
"landingHeadFlag"
column=
"landing_head_flag"
jdbcType=
"BIT"
/>
<result
property=
"commonAreaNumber"
column=
"common_area_number"
jdbcType=
"INTEGER"
/>
<result
property=
"officeNumber"
column=
"office_number"
jdbcType=
"INTEGER"
/>
...
...
@@ -27,6 +27,7 @@
<result
property=
"setUp"
column=
"set_up"
jdbcType=
"VARCHAR"
/>
<result
property=
"labelId"
column=
"label_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"unitPrice"
column=
"unit_price"
jdbcType=
"DECIMAL"
/>
<result
property=
"rentalUnit"
column=
"rental_unit"
jdbcType=
"INTEGER"
/>
<result
property=
"planeGraphUrl"
column=
"plane_graph_url"
jdbcType=
"VARCHAR"
/>
</resultMap>
...
...
@@ -35,12 +36,12 @@
(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,
decoration_condition, orientation, landing_head_flag, common_area_number, office_number,
meeting_number, station_number, set_up, label_id, unit_price, plane_graph_url)
meeting_number, station_number, set_up, label_id, unit_price,
rental_unit,
plane_graph_url)
VALUES
(#{id}, #{relationId}, #{two}, #{three}, #{four}, #{type}, #{projectId}, #{houseResourceUrl}, #{houseNumber}, #{houseArea},
#{houseResourceAttribute}, #{houseResourceType}, #{houseResourceUse}, #{houseResourceEquity}, #{houseResourceEquityTel},
#{decorationCondition}, #{orientation}, #{landingHeadFlag}, #{commonAreaNumber}, #{officeNumber},
#{meetingNumber}, #{stationNumber}, #{setUp}, #{labelId}, #{unitPrice}, #{planeGraphUrl})
#{meetingNumber}, #{stationNumber}, #{setUp}, #{labelId}, #{unitPrice}, #{
rentalUnit}, #{
planeGraphUrl})
</insert>
<select
id=
"selectHouseResourceById"
resultType=
"com.ruoyi.system.domain.house.HouseResource"
parameterType=
"string"
>
...
...
@@ -73,6 +74,7 @@
set_up = #{setUp},
label_id = #{labelId},
unit_price = #{unitPrice},
rentalUnit = #{rental_unit}
plane_graph_url = #{planeGraphUrl}
WHERE id = #{id}
</update>
...
...
@@ -86,14 +88,14 @@
(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,
decoration_condition, orientation, landing_head_flag, common_area_number, office_number,
meeting_number, station_number, set_up, label_id, unit_price, plane_graph_url)
meeting_number, station_number, set_up, label_id, unit_price,
rental_unit,
plane_graph_url)
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.id}, #{item.relationId}, #{two}, #{three}, #{four}, #{item.type}, #{item.projectId}, #{item.houseResourceUrl},
#{item.houseNumber}, #{item.houseArea}, #{item.houseResourceAttribute}, #{item.houseResourceType},
#{item.houseResourceUse}, #{item.houseResourceEquity}, #{item.houseResourceEquityTel}, #{item.decorationCondition},
#{item.orientation}, #{item.landingHeadFlag}, #{item.commonAreaNumber}, #{item.officeNumber},
#{item.meetingNumber}, #{item.stationNumber}, #{item.setUp}, #{item.labelId}, #{item.unitPrice},
#{item.meetingNumber}, #{item.stationNumber}, #{item.setUp}, #{item.labelId}, #{item.unitPrice},
#{item.rentalUnit},
#{item.planeGraphUrl})
</foreach>
</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