1
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
15683799673 2025-06-28 02:41:55 +08:00
parent 0d8a4608ce
commit 62b1e1b803
21 changed files with 136 additions and 429 deletions

View File

@ -62,7 +62,7 @@ public class TbCommunityController extends BaseController {
* @return 树结构数据 * @return 树结构数据
*/ */
@GetMapping("/tree/{level}") @GetMapping("/tree/{level}")
public List<TreeNode<String>> tree(@PathVariable("level") Integer level) { public List<TreeNode<Long>> tree(@PathVariable("level") Integer level) {
LoginUser loginUser = LoginHelper.getLoginUser(); LoginUser loginUser = LoginHelper.getLoginUser();
Assert.notNull(loginUser, "获取账户信息失败!"); Assert.notNull(loginUser, "获取账户信息失败!");
Assert.notEmpty(loginUser.getTenantId(), "获取租户信息失败"); Assert.notEmpty(loginUser.getTenantId(), "获取租户信息失败");

View File

@ -1,19 +1,19 @@
package org.dromara.property.domain; package org.dromara.property.domain;
import org.dromara.common.tenant.core.TenantEntity; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date; import org.dromara.common.tenant.core.TenantEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serial; import java.io.Serial;
import java.util.Date;
/** /**
* 建筑对象 tb_building * 建筑对象 tb_building
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -32,12 +32,7 @@ public class TbBuilding extends TenantEntity {
/** /**
* 园区编码 * 园区编码
*/ */
private String communityCode; private String communityId;
/**
* 建筑编码
*/
private String buildingCode;
/** /**
* 建筑名称 * 建筑名称
@ -62,22 +57,22 @@ public class TbBuilding extends TenantEntity {
/** /**
* 总层数 * 总层数
*/ */
private Long floorCount; private Integer floorCount;
/** /**
* 单元数 * 单元数
*/ */
private Long unitCount; private Integer unitCount;
/** /**
* 建筑类型('1住宅','2商业','3:混合') * 建筑类型('1住宅','2商业','3:混合')
*/ */
private Long buildType; private Integer buildType;
/** /**
* 电梯数量 * 电梯数量
*/ */
private Long elevatorCount; private Integer elevatorCount;
/** /**
* 竣工日期 * 竣工日期
@ -99,70 +94,10 @@ public class TbBuilding extends TenantEntity {
*/ */
private String lat; private String lat;
/**
* 产权性质(1:自持2承租3自持+承租,4政府免费使用)
*/
private Long cqxz;
/**
* 不动产编号
*/
private String bdcbh;
/**
* 产权编号
*/
private String cqbh;
/**
* 图地编号
*/
private String tdbh;
/**
* 建筑面积
*/
private Long jzmj;
/**
* 产权面积
*/
private Long cqmj;
/**
* 可租面积
*/
private Long kzmj;
/**
* 自用面积
*/
private Long zymj;
/**
* 配套面积
*/
private Long ptmj;
/**
* 车位面积
*/
private Long cwmj;
/**
* 标准层高
*/
private Long bzcg;
/** /**
* 排序字段 * 排序字段
*/ */
private Long sort; private Integer sort;
/**
* 修改时间
*/
private Date modifyTime;
} }

View File

@ -13,7 +13,7 @@ import java.io.Serial;
* 小区对象 tb_community * 小区对象 tb_community
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -34,15 +34,10 @@ public class TbCommunity extends TenantEntity {
*/ */
private String communityName; private String communityName;
/**
* 社区编码
*/
private String communityCode;
/** /**
* 社区类型 1园区2小区 * 社区类型 1园区2小区
*/ */
private Long communityType; private Integer communityType;
/** /**
* *
@ -77,7 +72,7 @@ public class TbCommunity extends TenantEntity {
/** /**
* 占地面积(平方米) * 占地面积(平方米)
*/ */
private Long area; private Float area;
/** /**
* *

View File

@ -11,7 +11,7 @@ import java.io.Serial;
* 楼层对象 tb_floor * 楼层对象 tb_floor
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -30,12 +30,7 @@ public class TbFloor extends TenantEntity {
/** /**
* 单元编码 * 单元编码
*/ */
private String unitCode; private Long unitId;
/**
* 楼层编码
*/
private String floorCode;
/** /**
* 楼层数名称 * 楼层数名称
@ -45,22 +40,22 @@ public class TbFloor extends TenantEntity {
/** /**
* 楼层号 * 楼层号
*/ */
private Long floorNumber; private Integer floorNumber;
/** /**
* 楼层类型 * 楼层类型
*/ */
private Long floorType; private Integer floorType;
/** /**
* 房间数量 * 房间数量
*/ */
private Long roomCount; private Integer roomCount;
/** /**
* 层高 * 层高
*/ */
private Long floorHeight; private Integer floorHeight;
} }

View File

@ -11,7 +11,7 @@ import java.io.Serial;
* 房间信息对象 tb_room * 房间信息对象 tb_room
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -30,12 +30,7 @@ public class TbRoom extends TenantEntity {
/** /**
* 所属楼层ID * 所属楼层ID
*/ */
private String floorCode; private Long floorId;
/**
* 房间编码
*/
private String roomCode;
/** /**
* 房间号(如101,202) * 房间号(如101,202)
@ -45,32 +40,32 @@ public class TbRoom extends TenantEntity {
/** /**
* 房间类型('住宅','商铺','办公室','设备间','公共区域') * 房间类型('住宅','商铺','办公室','设备间','公共区域')
*/ */
private Long roomType; private Integer roomType;
/** /**
* 面积(平方米) * 面积(平方米)
*/ */
private Long area; private Float area;
/** /**
* 户型(如2室1厅1卫) * 户型(如2室1厅1卫)
*/ */
private String layout; private Integer layout;
/** /**
* 朝向('东','南','西','北','东南','东北','西南','西北') * 朝向('东','南','西','北','东南','东北','西南','西北')
*/ */
private Long orientation; private Integer orientation;
/** /**
* 是否可售 * 是否可售
*/ */
private Long isForSale; private Integer isForSale;
/** /**
* 状态'空置','已售','已租','自用' * 状态'空置','已售','已租','自用'
*/ */
private Long status; private Integer status;
} }

View File

@ -11,7 +11,7 @@ import java.io.Serial;
* 单元对象 tb_unit * 单元对象 tb_unit
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -30,12 +30,7 @@ public class TbUnit extends TenantEntity {
/** /**
* 建筑名称 * 建筑名称
*/ */
private String buildingCode; private Long buildingId;
/**
* 单元编码
*/
private String unitCode;
/** /**
* 单元名称 * 单元名称
@ -45,17 +40,17 @@ public class TbUnit extends TenantEntity {
/** /**
* 单元层数 * 单元层数
*/ */
private Long floorCount; private Integer floorCount;
/** /**
* 单元户数 * 单元户数
*/ */
private Long householdCount; private Integer householdCount;
/** /**
* 楼梯数量 * 楼梯数量
*/ */
private Long stairCount; private Integer stairCount;
} }

View File

@ -1,21 +1,22 @@
package org.dromara.property.domain.bo; package org.dromara.property.domain.bo;
import org.dromara.property.domain.TbBuilding;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper; import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*; import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.property.domain.TbBuilding;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/** /**
* 建筑业务对象 tb_building * 建筑业务对象 tb_building
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -25,64 +26,58 @@ public class TbBuildingBo extends BaseEntity {
/** /**
* *
*/ */
@NotNull(message = "不能为空", groups = { EditGroup.class }) @NotNull(message = "不能为空", groups = {EditGroup.class})
private Long id; private Long id;
/** /**
* 园区编码 * 园区编码
*/ */
@NotBlank(message = "园区编码不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "园区编码不能为空", groups = {AddGroup.class, EditGroup.class})
private String communityCode; private String communityId;
/**
* 建筑编码
*/
@NotBlank(message = "建筑编码不能为空", groups = { AddGroup.class, EditGroup.class })
private String buildingCode;
/** /**
* 建筑名称 * 建筑名称
*/ */
@NotBlank(message = "建筑名称不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "建筑名称不能为空", groups = {AddGroup.class, EditGroup.class})
private String buildingName; private String buildingName;
/** /**
* *
*/ */
@NotBlank(message = "省不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "省不能为空", groups = {AddGroup.class, EditGroup.class})
private String province; private String province;
/** /**
* *
*/ */
@NotBlank(message = "市不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "市不能为空", groups = {AddGroup.class, EditGroup.class})
private String city; private String city;
/** /**
* *
*/ */
@NotBlank(message = "区不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "区不能为空", groups = {AddGroup.class, EditGroup.class})
private String district; private String district;
/** /**
* 总层数 * 总层数
*/ */
private Long floorCount; private Integer floorCount;
/** /**
* 单元数 * 单元数
*/ */
private Long unitCount; private Integer unitCount;
/** /**
* 建筑类型('1住宅','2商业','3:混合') * 建筑类型('1住宅','2商业','3:混合')
*/ */
private Long buildType; private Integer buildType;
/** /**
* 电梯数量 * 电梯数量
*/ */
private Long elevatorCount; private Integer elevatorCount;
/** /**
* 竣工日期 * 竣工日期
@ -92,87 +87,24 @@ public class TbBuildingBo extends BaseEntity {
/** /**
* 地址 * 地址
*/ */
@NotBlank(message = "地址不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "地址不能为空", groups = {AddGroup.class, EditGroup.class})
private String addr; private String addr;
/** /**
* 经度 * 经度
*/ */
@NotBlank(message = "经度不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "经度不能为空", groups = {AddGroup.class, EditGroup.class})
private String lon; private String lon;
/** /**
* 维度 * 维度
*/ */
@NotBlank(message = "维度不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "维度不能为空", groups = {AddGroup.class, EditGroup.class})
private String lat; private String lat;
/**
* 产权性质(1:自持2承租3自持+承租,4政府免费使用)
*/
private Long cqxz;
/**
* 不动产编号
*/
private String bdcbh;
/**
* 产权编号
*/
private String cqbh;
/**
* 图地编号
*/
private String tdbh;
/**
* 建筑面积
*/
@NotNull(message = "建筑面积不能为空", groups = { AddGroup.class, EditGroup.class })
private Long jzmj;
/**
* 产权面积
*/
@NotNull(message = "产权面积不能为空", groups = { AddGroup.class, EditGroup.class })
private Long cqmj;
/**
* 可租面积
*/
private Long kzmj;
/**
* 自用面积
*/
private Long zymj;
/**
* 配套面积
*/
private Long ptmj;
/**
* 车位面积
*/
private Long cwmj;
/**
* 标准层高
*/
private Long bzcg;
/** /**
* 排序字段 * 排序字段
*/ */
private Long sort; private Integer sort;
/**
* 修改时间
*/
private Date modifyTime;
} }

View File

@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
* 小区业务对象 tb_community * 小区业务对象 tb_community
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -34,17 +34,11 @@ public class TbCommunityBo extends BaseEntity {
@NotBlank(message = "社区名称不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "社区名称不能为空", groups = { AddGroup.class, EditGroup.class })
private String communityName; private String communityName;
/**
* 社区编码
*/
@NotBlank(message = "社区编码不能为空", groups = { AddGroup.class, EditGroup.class })
private String communityCode;
/** /**
* 社区类型 1园区2小区 * 社区类型 1园区2小区
*/ */
@NotNull(message = "社区类型 1园区2小区不能为空", groups = { AddGroup.class, EditGroup.class }) @NotNull(message = "社区类型 1园区2小区不能为空", groups = { AddGroup.class, EditGroup.class })
private Long communityType; private Integer communityType;
/** /**
* *

View File

@ -13,7 +13,7 @@ import jakarta.validation.constraints.*;
* 楼层业务对象 tb_floor * 楼层业务对象 tb_floor
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -30,13 +30,7 @@ public class TbFloorBo extends BaseEntity {
* 单元编码 * 单元编码
*/ */
@NotBlank(message = "单元编码不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "单元编码不能为空", groups = { AddGroup.class, EditGroup.class })
private String unitCode; private Long unitId;
/**
* 楼层编码
*/
@NotNull(message = "楼层编码不能为空", groups = { AddGroup.class, EditGroup.class })
private String floorCode;
/** /**
* 楼层数名称 * 楼层数名称
@ -48,22 +42,22 @@ public class TbFloorBo extends BaseEntity {
* 楼层号 * 楼层号
*/ */
@NotNull(message = "楼层号不能为空", groups = { AddGroup.class, EditGroup.class }) @NotNull(message = "楼层号不能为空", groups = { AddGroup.class, EditGroup.class })
private Long floorNumber; private Integer floorNumber;
/** /**
* 楼层类型 * 楼层类型
*/ */
private Long floorType; private Integer floorType;
/** /**
* 房间数量 * 房间数量
*/ */
private Long roomCount; private Integer roomCount;
/** /**
* 层高 * 层高
*/ */
private Long floorHeight; private Integer floorHeight;
} }

View File

@ -13,7 +13,7 @@ import jakarta.validation.constraints.*;
* 房间信息业务对象 tb_room * 房间信息业务对象 tb_room
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -30,12 +30,7 @@ public class TbRoomBo extends BaseEntity {
* 所属楼层ID * 所属楼层ID
*/ */
@NotBlank(message = "所属楼层ID不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "所属楼层ID不能为空", groups = { AddGroup.class, EditGroup.class })
private String floorCode; private Long floorId;
/**
* 房间编码
*/
private String roomCode;
/** /**
* 房间号(如101,202) * 房间号(如101,202)
@ -46,12 +41,12 @@ public class TbRoomBo extends BaseEntity {
/** /**
* 房间类型('住宅','商铺','办公室','设备间','公共区域') * 房间类型('住宅','商铺','办公室','设备间','公共区域')
*/ */
private Long roomType; private Integer roomType;
/** /**
* 面积(平方米) * 面积(平方米)
*/ */
private Long area; private Float area;
/** /**
* 户型(如2室1厅1卫) * 户型(如2室1厅1卫)
@ -61,17 +56,17 @@ public class TbRoomBo extends BaseEntity {
/** /**
* 朝向('东','南','西','北','东南','东北','西南','西北') * 朝向('东','南','西','北','东南','东北','西南','西北')
*/ */
private Long orientation; private Integer orientation;
/** /**
* 是否可售 * 是否可售
*/ */
private Long isForSale; private Integer isForSale;
/** /**
* 状态'空置','已售','已租','自用' * 状态'空置','已售','已租','自用'
*/ */
private Long status; private Integer status;
} }

View File

@ -13,7 +13,7 @@ import jakarta.validation.constraints.*;
* 单元业务对象 tb_unit * 单元业务对象 tb_unit
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -30,13 +30,7 @@ public class TbUnitBo extends BaseEntity {
* 建筑名称 * 建筑名称
*/ */
@NotBlank(message = "建筑名称不能为空", groups = { AddGroup.class, EditGroup.class }) @NotBlank(message = "建筑名称不能为空", groups = { AddGroup.class, EditGroup.class })
private String buildingCode; private Long buildingId;
/**
* 单元编码
*/
@NotBlank(message = "单元编码不能为空", groups = { AddGroup.class, EditGroup.class })
private String unitCode;
/** /**
* 单元名称 * 单元名称
@ -47,17 +41,17 @@ public class TbUnitBo extends BaseEntity {
/** /**
* 单元层数 * 单元层数
*/ */
private Long floorCount; private Integer floorCount;
/** /**
* 单元户数 * 单元户数
*/ */
private Long householdCount; private Integer householdCount;
/** /**
* 楼梯数量 * 楼梯数量
*/ */
private Long stairCount; private Integer stairCount;
} }

View File

@ -20,7 +20,7 @@ import java.util.Date;
* 建筑视图对象 tb_building * 建筑视图对象 tb_building
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated
@ -30,23 +30,14 @@ public class TbBuildingVo implements Serializable {
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** @ExcelProperty(value = "主键id")
*
*/
@ExcelProperty(value = "")
private Long id; private Long id;
/** /**
* 园区编码 * 园区编码
*/ */
@ExcelProperty(value = "园区编码") @ExcelProperty(value = "园区编码")
private String communityCode; private Long communityId;
/**
* 建筑编码
*/
@ExcelProperty(value = "建筑编码")
private String buildingCode;
/** /**
* 建筑名称 * 建筑名称
@ -82,19 +73,19 @@ public class TbBuildingVo implements Serializable {
* 单元数 * 单元数
*/ */
@ExcelProperty(value = "单元数") @ExcelProperty(value = "单元数")
private Long unitCount; private Integer unitCount;
/** /**
* 建筑类型('1住宅','2商业','3:混合') * 建筑类型('1住宅','2商业','3:混合')
*/ */
@ExcelProperty(value = "建筑类型('1住宅','2商业','3:混合')") @ExcelProperty(value = "建筑类型('1住宅','2商业','3:混合')")
private Long buildType; private Integer buildType;
/** /**
* 电梯数量 * 电梯数量
*/ */
@ExcelProperty(value = "电梯数量") @ExcelProperty(value = "电梯数量")
private Long elevatorCount; private Integer elevatorCount;
/** /**
* 竣工日期 * 竣工日期
@ -124,67 +115,7 @@ public class TbBuildingVo implements Serializable {
* 产权性质(1:自持2承租3自持+承租,4政府免费使用) * 产权性质(1:自持2承租3自持+承租,4政府免费使用)
*/ */
@ExcelProperty(value = "产权性质(1:自持2承租3自持+承租,4政府免费使用)") @ExcelProperty(value = "产权性质(1:自持2承租3自持+承租,4政府免费使用)")
private Long cqxz; private Integer cqxz;
/**
* 不动产编号
*/
@ExcelProperty(value = "不动产编号")
private String bdcbh;
/**
* 产权编号
*/
@ExcelProperty(value = "产权编号")
private String cqbh;
/**
* 图地编号
*/
@ExcelProperty(value = "图地编号")
private String tdbh;
/**
* 建筑面积
*/
@ExcelProperty(value = "建筑面积")
private Long jzmj;
/**
* 产权面积
*/
@ExcelProperty(value = "产权面积")
private Long cqmj;
/**
* 可租面积
*/
@ExcelProperty(value = "可租面积")
private Long kzmj;
/**
* 自用面积
*/
@ExcelProperty(value = "自用面积")
private Long zymj;
/**
* 配套面积
*/
@ExcelProperty(value = "配套面积")
private Long ptmj;
/**
* 车位面积
*/
@ExcelProperty(value = "车位面积")
private Long cwmj;
/**
* 标准层高
*/
@ExcelProperty(value = "标准层高")
private Long bzcg;
/** /**
* 排序字段 * 排序字段
@ -192,11 +123,4 @@ public class TbBuildingVo implements Serializable {
@ExcelProperty(value = "排序字段") @ExcelProperty(value = "排序字段")
private Long sort; private Long sort;
/**
* 修改时间
*/
@ExcelProperty(value = "修改时间")
private Date modifyTime;
} }

View File

@ -20,7 +20,7 @@ import java.util.Date;
* 小区视图对象 tb_community * 小区视图对象 tb_community
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated
@ -42,12 +42,6 @@ public class TbCommunityVo implements Serializable {
@ExcelProperty(value = "社区名称") @ExcelProperty(value = "社区名称")
private String communityName; private String communityName;
/**
* 社区编码
*/
@ExcelProperty(value = "社区编码")
private String communityCode;
/** /**
* 社区类型 1园区2小区 * 社区类型 1园区2小区
*/ */

View File

@ -18,7 +18,7 @@ import java.util.Date;
* 楼层视图对象 tb_floor * 楼层视图对象 tb_floor
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated
@ -38,13 +38,7 @@ public class TbFloorVo implements Serializable {
* 单元编码 * 单元编码
*/ */
@ExcelProperty(value = "单元编码") @ExcelProperty(value = "单元编码")
private String unitCode; private Long unitId;
/**
* 楼层编码
*/
@ExcelProperty(value = "楼层编码")
private String floorCode;
/** /**
* 楼层数名称 * 楼层数名称
@ -62,19 +56,19 @@ public class TbFloorVo implements Serializable {
* 楼层类型 * 楼层类型
*/ */
@ExcelProperty(value = "楼层类型") @ExcelProperty(value = "楼层类型")
private Long floorType; private Integer floorType;
/** /**
* 房间数量 * 房间数量
*/ */
@ExcelProperty(value = "房间数量") @ExcelProperty(value = "房间数量")
private Long roomCount; private Integer roomCount;
/** /**
* 层高 * 层高
*/ */
@ExcelProperty(value = "层高") @ExcelProperty(value = "层高")
private Long floorHeight; private Integer floorHeight;
} }

View File

@ -18,7 +18,7 @@ import java.util.Date;
* 房间信息视图对象 tb_room * 房间信息视图对象 tb_room
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated
@ -38,13 +38,7 @@ public class TbRoomVo implements Serializable {
* 所属楼层ID * 所属楼层ID
*/ */
@ExcelProperty(value = "所属楼层ID") @ExcelProperty(value = "所属楼层ID")
private String floorCode; private Long floorId;
/**
* 房间编码
*/
@ExcelProperty(value = "房间编码")
private String roomCode;
/** /**
* 房间号(如101,202) * 房间号(如101,202)
@ -56,7 +50,7 @@ public class TbRoomVo implements Serializable {
* 房间类型('住宅','商铺','办公室','设备间','公共区域') * 房间类型('住宅','商铺','办公室','设备间','公共区域')
*/ */
@ExcelProperty(value = "房间类型('住宅','商铺','办公室','设备间','公共区域')") @ExcelProperty(value = "房间类型('住宅','商铺','办公室','设备间','公共区域')")
private Long roomType; private Integer roomType;
/** /**
* 面积(平方米) * 面积(平方米)
@ -74,20 +68,20 @@ public class TbRoomVo implements Serializable {
* 朝向('东','南','西','北','东南','东北','西南','西北') * 朝向('东','南','西','北','东南','东北','西南','西北')
*/ */
@ExcelProperty(value = "朝向('东','南','西','北','东南','东北','西南','西北')") @ExcelProperty(value = "朝向('东','南','西','北','东南','东北','西南','西北')")
private Long orientation; private Integer orientation;
/** /**
* 是否可售 * 是否可售
*/ */
@ExcelProperty(value = "是否可售") @ExcelProperty(value = "是否可售")
private Long isForSale; private Integer isForSale;
/** /**
* 状态'空置','已售','已租','自用' * 状态'空置','已售','已租','自用'
*/ */
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class) @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "'=空置','已售','已租','自用'") @ExcelDictFormat(readConverterExp = "'=空置','已售','已租','自用'")
private Long status; private Integer status;
} }

View File

@ -18,7 +18,7 @@ import java.util.Date;
* 单元视图对象 tb_unit * 单元视图对象 tb_unit
* *
* @author mocheng * @author mocheng
* @date 2025-06-26 * @date 2025-06-28
*/ */
@Data @Data
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated
@ -38,13 +38,7 @@ public class TbUnitVo implements Serializable {
* 建筑名称 * 建筑名称
*/ */
@ExcelProperty(value = "建筑名称") @ExcelProperty(value = "建筑名称")
private String buildingCode; private Long buildingId;
/**
* 单元编码
*/
@ExcelProperty(value = "单元编码")
private String unitCode;
/** /**
* 单元名称 * 单元名称
@ -56,19 +50,19 @@ public class TbUnitVo implements Serializable {
* 单元层数 * 单元层数
*/ */
@ExcelProperty(value = "单元层数") @ExcelProperty(value = "单元层数")
private Long floorCount; private Integer floorCount;
/** /**
* 单元户数 * 单元户数
*/ */
@ExcelProperty(value = "单元户数") @ExcelProperty(value = "单元户数")
private Long householdCount; private Integer householdCount;
/** /**
* 楼梯数量 * 楼梯数量
*/ */
@ExcelProperty(value = "楼梯数量") @ExcelProperty(value = "楼梯数量")
private Long stairCount; private Integer stairCount;
} }

View File

@ -74,8 +74,7 @@ public class TbBuildingServiceImpl implements ITbBuildingService {
Map<String, Object> params = bo.getParams(); Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<TbBuilding> lqw = Wrappers.lambdaQuery(); LambdaQueryWrapper<TbBuilding> lqw = Wrappers.lambdaQuery();
lqw.orderByAsc(TbBuilding::getId); lqw.orderByAsc(TbBuilding::getId);
lqw.eq(StringUtils.isNotBlank(bo.getCommunityCode()), TbBuilding::getCommunityCode, bo.getCommunityCode()); lqw.eq(bo.getCommunityId() != null, TbBuilding::getCommunityId, bo.getCommunityId());
lqw.eq(StringUtils.isNotBlank(bo.getBuildingCode()), TbBuilding::getBuildingCode, bo.getBuildingCode());
lqw.like(StringUtils.isNotBlank(bo.getBuildingName()), TbBuilding::getBuildingName, bo.getBuildingName()); lqw.like(StringUtils.isNotBlank(bo.getBuildingName()), TbBuilding::getBuildingName, bo.getBuildingName());
lqw.eq(StringUtils.isNotBlank(bo.getProvince()), TbBuilding::getProvince, bo.getProvince()); lqw.eq(StringUtils.isNotBlank(bo.getProvince()), TbBuilding::getProvince, bo.getProvince());
lqw.eq(StringUtils.isNotBlank(bo.getCity()), TbBuilding::getCity, bo.getCity()); lqw.eq(StringUtils.isNotBlank(bo.getCity()), TbBuilding::getCity, bo.getCity());
@ -88,19 +87,7 @@ public class TbBuildingServiceImpl implements ITbBuildingService {
lqw.eq(StringUtils.isNotBlank(bo.getAddr()), TbBuilding::getAddr, bo.getAddr()); lqw.eq(StringUtils.isNotBlank(bo.getAddr()), TbBuilding::getAddr, bo.getAddr());
lqw.eq(StringUtils.isNotBlank(bo.getLon()), TbBuilding::getLon, bo.getLon()); lqw.eq(StringUtils.isNotBlank(bo.getLon()), TbBuilding::getLon, bo.getLon());
lqw.eq(StringUtils.isNotBlank(bo.getLat()), TbBuilding::getLat, bo.getLat()); lqw.eq(StringUtils.isNotBlank(bo.getLat()), TbBuilding::getLat, bo.getLat());
lqw.eq(bo.getCqxz() != null, TbBuilding::getCqxz, bo.getCqxz());
lqw.eq(StringUtils.isNotBlank(bo.getBdcbh()), TbBuilding::getBdcbh, bo.getBdcbh());
lqw.eq(StringUtils.isNotBlank(bo.getCqbh()), TbBuilding::getCqbh, bo.getCqbh());
lqw.eq(StringUtils.isNotBlank(bo.getTdbh()), TbBuilding::getTdbh, bo.getTdbh());
lqw.eq(bo.getJzmj() != null, TbBuilding::getJzmj, bo.getJzmj());
lqw.eq(bo.getCqmj() != null, TbBuilding::getCqmj, bo.getCqmj());
lqw.eq(bo.getKzmj() != null, TbBuilding::getKzmj, bo.getKzmj());
lqw.eq(bo.getZymj() != null, TbBuilding::getZymj, bo.getZymj());
lqw.eq(bo.getPtmj() != null, TbBuilding::getPtmj, bo.getPtmj());
lqw.eq(bo.getCwmj() != null, TbBuilding::getCwmj, bo.getCwmj());
lqw.eq(bo.getBzcg() != null, TbBuilding::getBzcg, bo.getBzcg());
lqw.eq(bo.getSort() != null, TbBuilding::getSort, bo.getSort()); lqw.eq(bo.getSort() != null, TbBuilding::getSort, bo.getSort());
lqw.eq(bo.getModifyTime() != null, TbBuilding::getModifyTime, bo.getModifyTime());
return lqw; return lqw;
} }

View File

@ -41,18 +41,18 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
private final ITbRoomService roomService; private final ITbRoomService roomService;
@Override @Override
public List<TreeNode<String>> tree(Integer level, String tenantId) { public List<TreeNode<Long>> tree(Integer level, String tenantId) {
// 默认加载社区树 // 默认加载社区树
List<TbCommunityVo> tbCommunityVos = queryByTenantId(tenantId); List<TbCommunityVo> tbCommunityVos = queryByTenantId(tenantId);
if (tbCommunityVos == null || tbCommunityVos.isEmpty()) { if (tbCommunityVos == null || tbCommunityVos.isEmpty()) {
return new ArrayList<>(); return new ArrayList<>();
} }
List<TreeNode<String>> community = new ArrayList<>(tbCommunityVos.stream().map(item -> { List<TreeNode<Long>> community = new ArrayList<>(tbCommunityVos.stream().map(item -> {
TreeNode<String> node = new TreeNode<>(); TreeNode<Long> node = new TreeNode<>();
node.setChildren(new ArrayList<>()); node.setChildren(new ArrayList<>());
node.setCode(item.getCommunityCode()); node.setCode(item.getId());
node.setLabel(item.getCommunityName()); node.setLabel(item.getCommunityName());
node.setParentCode(""); node.setParentCode(0L);
node.setLevel(1); node.setLevel(1);
return node; return node;
}).toList()); }).toList());
@ -62,12 +62,12 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
if (level >= 2) { if (level >= 2) {
List<TbBuildingVo> vos = buildingService.queryByTenantId(tenantId); List<TbBuildingVo> vos = buildingService.queryByTenantId(tenantId);
if (vos != null && !vos.isEmpty()) { if (vos != null && !vos.isEmpty()) {
List<TreeNode<String>> list = vos.stream().map(item -> { List<TreeNode<Long>> list = vos.stream().map(item -> {
TreeNode<String> node = new TreeNode<>(); TreeNode<Long> node = new TreeNode<>();
node.setChildren(new ArrayList<>()); node.setChildren(new ArrayList<>());
node.setCode(item.getBuildingCode()); node.setCode(item.getId());
node.setLabel(item.getBuildingName()); node.setLabel(item.getBuildingName());
node.setParentCode(item.getCommunityCode()); node.setParentCode(item.getCommunityId());
node.setLevel(2); node.setLevel(2);
return node; return node;
}).toList(); }).toList();
@ -77,12 +77,12 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
if (level >= 3) { if (level >= 3) {
List<TbUnitVo> vos = unitService.queryByTenantId(tenantId); List<TbUnitVo> vos = unitService.queryByTenantId(tenantId);
if (vos != null && !vos.isEmpty()) { if (vos != null && !vos.isEmpty()) {
List<TreeNode<String>> list = vos.stream().map(item -> { List<TreeNode<Long>> list = vos.stream().map(item -> {
TreeNode<String> node = new TreeNode<>(); TreeNode<Long> node = new TreeNode<>();
node.setChildren(new ArrayList<>()); node.setChildren(new ArrayList<>());
node.setCode(item.getUnitCode()); node.setCode(item.getId());
node.setLabel(item.getUnitName()); node.setLabel(item.getUnitName());
node.setParentCode(item.getBuildingCode()); node.setParentCode(item.getBuildingId());
node.setLevel(3); node.setLevel(3);
return node; return node;
}).toList(); }).toList();
@ -92,12 +92,12 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
if (level >= 4) { if (level >= 4) {
List<TbFloorVo> vos = floorService.queryByTenantId(tenantId); List<TbFloorVo> vos = floorService.queryByTenantId(tenantId);
if (vos != null && !vos.isEmpty()) { if (vos != null && !vos.isEmpty()) {
List<TreeNode<String>> list = vos.stream().map(item -> { List<TreeNode<Long>> list = vos.stream().map(item -> {
TreeNode<String> node = new TreeNode<>(); TreeNode<Long> node = new TreeNode<>();
node.setChildren(new ArrayList<>()); node.setChildren(new ArrayList<>());
node.setCode(item.getFloorCode()); node.setCode(item.getId());
node.setLabel(item.getFloorName()); node.setLabel(item.getFloorName());
node.setParentCode(item.getUnitCode()); node.setParentCode(item.getUnitId());
node.setLevel(4); node.setLevel(4);
return node; return node;
}).toList(); }).toList();
@ -108,19 +108,19 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
if (level >= 5) { if (level >= 5) {
List<TbRoomVo> vos = roomService.queryByTenantId(tenantId); List<TbRoomVo> vos = roomService.queryByTenantId(tenantId);
if (vos != null && !vos.isEmpty()) { if (vos != null && !vos.isEmpty()) {
List<TreeNode<String>> list = vos.stream().map(item -> { List<TreeNode<Long>> list = vos.stream().map(item -> {
TreeNode<String> node = new TreeNode<>(); TreeNode<Long> node = new TreeNode<>();
node.setChildren(new ArrayList<>()); node.setChildren(new ArrayList<>());
node.setCode(item.getRoomCode()); node.setCode(item.getId());
node.setLabel(item.getRoomNumber()); node.setLabel(item.getRoomNumber());
node.setParentCode(item.getFloorCode()); node.setParentCode(item.getFloorId());
node.setLevel(5); node.setLevel(5);
return node; return node;
}).toList(); }).toList();
community.addAll(list); community.addAll(list);
} }
} }
return TreeUtils.build(community, ""); return TreeUtils.build(community, 0L);
} }
@Override @Override
@ -172,7 +172,6 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
LambdaQueryWrapper<TbCommunity> lqw = Wrappers.lambdaQuery(); LambdaQueryWrapper<TbCommunity> lqw = Wrappers.lambdaQuery();
lqw.orderByAsc(TbCommunity::getId); lqw.orderByAsc(TbCommunity::getId);
lqw.like(StringUtils.isNotBlank(bo.getCommunityName()), TbCommunity::getCommunityName, bo.getCommunityName()); lqw.like(StringUtils.isNotBlank(bo.getCommunityName()), TbCommunity::getCommunityName, bo.getCommunityName());
lqw.eq(StringUtils.isNotBlank(bo.getCommunityCode()), TbCommunity::getCommunityCode, bo.getCommunityCode());
lqw.eq(bo.getCommunityType() != null, TbCommunity::getCommunityType, bo.getCommunityType()); lqw.eq(bo.getCommunityType() != null, TbCommunity::getCommunityType, bo.getCommunityType());
lqw.eq(StringUtils.isNotBlank(bo.getProvince()), TbCommunity::getProvince, bo.getProvince()); lqw.eq(StringUtils.isNotBlank(bo.getProvince()), TbCommunity::getProvince, bo.getProvince());
lqw.eq(StringUtils.isNotBlank(bo.getCity()), TbCommunity::getCity, bo.getCity()); lqw.eq(StringUtils.isNotBlank(bo.getCity()), TbCommunity::getCity, bo.getCity());

View File

@ -74,10 +74,9 @@ public class TbFloorServiceImpl implements ITbFloorService {
Map<String, Object> params = bo.getParams(); Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<TbFloor> lqw = Wrappers.lambdaQuery(); LambdaQueryWrapper<TbFloor> lqw = Wrappers.lambdaQuery();
lqw.orderByAsc(TbFloor::getId); lqw.orderByAsc(TbFloor::getId);
lqw.eq(StringUtils.isNotBlank(bo.getUnitCode()), TbFloor::getUnitCode, bo.getUnitCode());
lqw.eq(bo.getFloorCode() != null, TbFloor::getFloorCode, bo.getFloorCode());
lqw.like(StringUtils.isNotBlank(bo.getFloorName()), TbFloor::getFloorName, bo.getFloorName()); lqw.like(StringUtils.isNotBlank(bo.getFloorName()), TbFloor::getFloorName, bo.getFloorName());
lqw.eq(bo.getFloorNumber() != null, TbFloor::getFloorNumber, bo.getFloorNumber()); lqw.eq(bo.getFloorNumber() != null, TbFloor::getFloorNumber, bo.getFloorNumber());
lqw.eq(bo.getUnitId() != null, TbFloor::getUnitId, bo.getUnitId());
lqw.eq(bo.getFloorType() != null, TbFloor::getFloorType, bo.getFloorType()); lqw.eq(bo.getFloorType() != null, TbFloor::getFloorType, bo.getFloorType());
lqw.eq(bo.getRoomCount() != null, TbFloor::getRoomCount, bo.getRoomCount()); lqw.eq(bo.getRoomCount() != null, TbFloor::getRoomCount, bo.getRoomCount());
lqw.eq(bo.getFloorHeight() != null, TbFloor::getFloorHeight, bo.getFloorHeight()); lqw.eq(bo.getFloorHeight() != null, TbFloor::getFloorHeight, bo.getFloorHeight());

View File

@ -74,10 +74,9 @@ public class TbRoomServiceImpl implements ITbRoomService {
Map<String, Object> params = bo.getParams(); Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<TbRoom> lqw = Wrappers.lambdaQuery(); LambdaQueryWrapper<TbRoom> lqw = Wrappers.lambdaQuery();
lqw.orderByAsc(TbRoom::getId); lqw.orderByAsc(TbRoom::getId);
lqw.eq(StringUtils.isNotBlank(bo.getFloorCode()), TbRoom::getFloorCode, bo.getFloorCode());
lqw.eq(StringUtils.isNotBlank(bo.getRoomCode()), TbRoom::getRoomCode, bo.getRoomCode());
lqw.eq(StringUtils.isNotBlank(bo.getRoomNumber()), TbRoom::getRoomNumber, bo.getRoomNumber()); lqw.eq(StringUtils.isNotBlank(bo.getRoomNumber()), TbRoom::getRoomNumber, bo.getRoomNumber());
lqw.eq(bo.getRoomType() != null, TbRoom::getRoomType, bo.getRoomType()); lqw.eq(bo.getRoomType() != null, TbRoom::getRoomType, bo.getRoomType());
lqw.eq(bo.getFloorId() != null, TbRoom::getFloorId, bo.getFloorId());
lqw.eq(bo.getArea() != null, TbRoom::getArea, bo.getArea()); lqw.eq(bo.getArea() != null, TbRoom::getArea, bo.getArea());
lqw.eq(StringUtils.isNotBlank(bo.getLayout()), TbRoom::getLayout, bo.getLayout()); lqw.eq(StringUtils.isNotBlank(bo.getLayout()), TbRoom::getLayout, bo.getLayout());
lqw.eq(bo.getOrientation() != null, TbRoom::getOrientation, bo.getOrientation()); lqw.eq(bo.getOrientation() != null, TbRoom::getOrientation, bo.getOrientation());

View File

@ -74,10 +74,9 @@ public class TbUnitServiceImpl implements ITbUnitService {
Map<String, Object> params = bo.getParams(); Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<TbUnit> lqw = Wrappers.lambdaQuery(); LambdaQueryWrapper<TbUnit> lqw = Wrappers.lambdaQuery();
lqw.orderByAsc(TbUnit::getId); lqw.orderByAsc(TbUnit::getId);
lqw.eq(StringUtils.isNotBlank(bo.getBuildingCode()), TbUnit::getBuildingCode, bo.getBuildingCode());
lqw.eq(StringUtils.isNotBlank(bo.getUnitCode()), TbUnit::getUnitCode, bo.getUnitCode());
lqw.like(StringUtils.isNotBlank(bo.getUnitName()), TbUnit::getUnitName, bo.getUnitName()); lqw.like(StringUtils.isNotBlank(bo.getUnitName()), TbUnit::getUnitName, bo.getUnitName());
lqw.eq(bo.getFloorCount() != null, TbUnit::getFloorCount, bo.getFloorCount()); lqw.eq(bo.getFloorCount() != null, TbUnit::getFloorCount, bo.getFloorCount());
lqw.eq(bo.getBuildingId() != null, TbUnit::getBuildingId, bo.getBuildingId());
lqw.eq(bo.getHouseholdCount() != null, TbUnit::getHouseholdCount, bo.getHouseholdCount()); lqw.eq(bo.getHouseholdCount() != null, TbUnit::getHouseholdCount, bo.getHouseholdCount());
lqw.eq(bo.getStairCount() != null, TbUnit::getStairCount, bo.getStairCount()); lqw.eq(bo.getStairCount() != null, TbUnit::getStairCount, bo.getStairCount());
return lqw; return lqw;