Commit fd7e5cf0 authored by lixuan's avatar lixuan

Merge branch 'dev' into 'main'

Dev

See merge request !23
parents 147acb1c 5fea5538
Pipeline #142900 passed with stages
in 3 minutes and 43 seconds
...@@ -58,5 +58,7 @@ public class HouseResource implements Serializable { ...@@ -58,5 +58,7 @@ public class HouseResource implements Serializable {
private BigDecimal unitPrice; private BigDecimal unitPrice;
private int rentalUnit;
private String planeGraphUrl; private String planeGraphUrl;
} }
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;
}
}
}
...@@ -30,9 +30,13 @@ public class HouseResourcePage { ...@@ -30,9 +30,13 @@ public class HouseResourcePage {
private Integer houseArea; private Integer houseArea;
private String houseResourceAttribute; private int houseResourceAttribute;
private String houseResourceType; private String houseResourceAttributeText;
private int houseResourceType;
private String houseResourceTypeText;
private String houseResourceUse; private String houseResourceUse;
...@@ -40,9 +44,13 @@ public class HouseResourcePage { ...@@ -40,9 +44,13 @@ public class HouseResourcePage {
private String houseResourceEquityTel; private String houseResourceEquityTel;
private String decorationCondition; private int decorationCondition;
private String decorationConditionText;
private String orientation; private int orientation;
private String orientationText;
private Boolean landingHeadFlag; private Boolean landingHeadFlag;
...@@ -60,5 +68,9 @@ public class HouseResourcePage { ...@@ -60,5 +68,9 @@ public class HouseResourcePage {
private BigDecimal unitPrice; private BigDecimal unitPrice;
private int rentalUnit;
private String rentalUnitText;
private String planeGraphUrl; private String planeGraphUrl;
} }
...@@ -3,6 +3,7 @@ package com.ruoyi.system.service.house.impl; ...@@ -3,6 +3,7 @@ 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.system.domain.house.HouseResource; 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.HouseResourcePage;
import com.ruoyi.system.domain.house.vo.HouseResourcePageQuery; import com.ruoyi.system.domain.house.vo.HouseResourcePageQuery;
import com.ruoyi.system.domain.house.vo.HouseResourceSaveDto; import com.ruoyi.system.domain.house.vo.HouseResourceSaveDto;
...@@ -70,6 +71,11 @@ public class HouseResourceServiceImpl implements HouseResourceService { ...@@ -70,6 +71,11 @@ public class HouseResourceServiceImpl implements HouseResourceService {
IPage<HouseResourcePage> page = houseResourceMapper.selectPage(new Page<>(query.getPageNum(), query.getPageSize()), query); IPage<HouseResourcePage> page = houseResourceMapper.selectPage(new Page<>(query.getPageNum(), query.getPageSize()), query);
page.getRecords().forEach(x -> { page.getRecords().forEach(x -> {
x.setHouseResourceUrlList(Arrays.asList(x.getHouseResourceUrl().split(","))); 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; return page;
} }
......
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
<result property="houseResourceUrl" column="house_resource_url" jdbcType="VARCHAR"/> <result property="houseResourceUrl" column="house_resource_url" jdbcType="VARCHAR"/>
<result property="houseNumber" column="house_number" jdbcType="VARCHAR"/> <result property="houseNumber" column="house_number" jdbcType="VARCHAR"/>
<result property="houseArea" column="house_area" jdbcType="INTEGER"/> <result property="houseArea" column="house_area" jdbcType="INTEGER"/>
<result property="houseResourceAttribute" column="house_resource_attribute" jdbcType="VARCHAR"/> <result property="houseResourceAttribute" column="house_resource_attribute" jdbcType="INTEGER"/>
<result property="houseResourceType" column="house_resource_type" jdbcType="VARCHAR"/> <result property="houseResourceType" column="house_resource_type" jdbcType="INTEGER"/>
<result property="houseResourceUse" column="house_resource_use" jdbcType="VARCHAR"/> <result property="houseResourceUse" column="house_resource_use" jdbcType="VARCHAR"/>
<result property="houseResourceEquity" column="house_resource_equity" jdbcType="VARCHAR"/> <result property="houseResourceEquity" column="house_resource_equity" jdbcType="VARCHAR"/>
<result property="houseResourceEquityTel" column="house_resource_equity_tel" jdbcType="VARCHAR"/> <result property="houseResourceEquityTel" column="house_resource_equity_tel" jdbcType="VARCHAR"/>
<result property="decorationCondition" column="decoration_condition" jdbcType="VARCHAR"/> <result property="decorationCondition" column="decoration_condition" jdbcType="INTEGER"/>
<result property="orientation" column="orientation" jdbcType="VARCHAR"/> <result property="orientation" column="orientation" jdbcType="INTEGER"/>
<result property="landingHeadFlag" column="landing_head_flag" jdbcType="BIT"/> <result property="landingHeadFlag" column="landing_head_flag" jdbcType="BIT"/>
<result property="commonAreaNumber" column="common_area_number" jdbcType="INTEGER"/> <result property="commonAreaNumber" column="common_area_number" jdbcType="INTEGER"/>
<result property="officeNumber" column="office_number" jdbcType="INTEGER"/> <result property="officeNumber" column="office_number" jdbcType="INTEGER"/>
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<result property="setUp" column="set_up" jdbcType="VARCHAR"/> <result property="setUp" column="set_up" jdbcType="VARCHAR"/>
<result property="labelId" column="label_id" jdbcType="VARCHAR"/> <result property="labelId" column="label_id" jdbcType="VARCHAR"/>
<result property="unitPrice" column="unit_price" jdbcType="DECIMAL"/> <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"/> <result property="planeGraphUrl" column="plane_graph_url" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
...@@ -35,12 +36,12 @@ ...@@ -35,12 +36,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, 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, 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 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}, #{houseResourceAttribute}, #{houseResourceType}, #{houseResourceUse}, #{houseResourceEquity}, #{houseResourceEquityTel},
#{decorationCondition}, #{orientation}, #{landingHeadFlag}, #{commonAreaNumber}, #{officeNumber}, #{decorationCondition}, #{orientation}, #{landingHeadFlag}, #{commonAreaNumber}, #{officeNumber},
#{meetingNumber}, #{stationNumber}, #{setUp}, #{labelId}, #{unitPrice}, #{planeGraphUrl}) #{meetingNumber}, #{stationNumber}, #{setUp}, #{labelId}, #{unitPrice}, #{rentalUnit}, #{planeGraphUrl})
</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">
...@@ -73,6 +74,7 @@ ...@@ -73,6 +74,7 @@
set_up = #{setUp}, set_up = #{setUp},
label_id = #{labelId}, label_id = #{labelId},
unit_price = #{unitPrice}, unit_price = #{unitPrice},
rentalUnit = #{rental_unit}
plane_graph_url = #{planeGraphUrl} plane_graph_url = #{planeGraphUrl}
WHERE id = #{id} WHERE id = #{id}
</update> </update>
...@@ -86,14 +88,14 @@ ...@@ -86,14 +88,14 @@
(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, 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, 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 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},
#{item.houseNumber}, #{item.houseArea}, #{item.houseResourceAttribute}, #{item.houseResourceType}, #{item.houseNumber}, #{item.houseArea}, #{item.houseResourceAttribute}, #{item.houseResourceType},
#{item.houseResourceUse}, #{item.houseResourceEquity}, #{item.houseResourceEquityTel}, #{item.decorationCondition}, #{item.houseResourceUse}, #{item.houseResourceEquity}, #{item.houseResourceEquityTel}, #{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.meetingNumber}, #{item.stationNumber}, #{item.setUp}, #{item.labelId}, #{item.unitPrice}, #{item.rentalUnit},
#{item.planeGraphUrl}) #{item.planeGraphUrl})
</foreach> </foreach>
</insert> </insert>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment