Compare commits
2 Commits
0cfdac1bae
...
0f382df17d
Author | SHA1 | Date | |
---|---|---|---|
0f382df17d | |||
d624566f7a |
8
pom.xml
8
pom.xml
@ -73,10 +73,10 @@
|
||||
<properties>
|
||||
<!-- 环境标识,需要与配置文件的名称相对应 -->
|
||||
<profiles.active>dev</profiles.active>
|
||||
<!-- <nacos.server>127.0.0.1:8848</nacos.server>-->
|
||||
<!-- <logstash.address>127.0.0.1:4560</logstash.address>-->
|
||||
<nacos.server>47.109.37.87:8848</nacos.server>
|
||||
<logstash.address>47.109.37.87:4560</logstash.address>
|
||||
<nacos.server>127.0.0.1:8848</nacos.server>
|
||||
<logstash.address>127.0.0.1:4560</logstash.address>
|
||||
<!-- <nacos.server>47.109.37.87:8848</nacos.server>-->
|
||||
<!-- <logstash.address>47.109.37.87:4560</logstash.address>-->
|
||||
<nacos.discovery.group>DEFAULT_GROUP</nacos.discovery.group>
|
||||
<nacos.config.group>DEFAULT_GROUP</nacos.config.group>
|
||||
<nacos.username>nacos</nacos.username>
|
||||
|
@ -7,6 +7,7 @@ import java.util.List;
|
||||
* @param <E>
|
||||
*/
|
||||
public interface TreeEntity<E, T> {
|
||||
|
||||
T getId();
|
||||
|
||||
T getParentId();
|
||||
|
@ -23,11 +23,11 @@ import org.dromara.property.service.ITbBuildingService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 建筑管理
|
||||
* 建筑
|
||||
* 前端访问路由地址为:/property/building
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@ -38,7 +38,7 @@ public class TbBuildingController extends BaseController {
|
||||
private final ITbBuildingService tbBuildingService;
|
||||
|
||||
/**
|
||||
* 查询建筑管理列表
|
||||
* 查询建筑列表
|
||||
*/
|
||||
@SaCheckPermission("property:building:list")
|
||||
@GetMapping("/list")
|
||||
@ -47,18 +47,18 @@ public class TbBuildingController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出建筑管理列表
|
||||
* 导出建筑列表
|
||||
*/
|
||||
@SaCheckPermission("property:building:export")
|
||||
@Log(title = "建筑管理", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "建筑", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TbBuildingBo bo, HttpServletResponse response) {
|
||||
List<TbBuildingVo> list = tbBuildingService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "建筑管理", TbBuildingVo.class, response);
|
||||
ExcelUtil.exportExcel(list, "建筑", TbBuildingVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取建筑管理详细信息
|
||||
* 获取建筑详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@ -70,10 +70,10 @@ public class TbBuildingController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增建筑管理
|
||||
* 新增建筑
|
||||
*/
|
||||
@SaCheckPermission("property:building:add")
|
||||
@Log(title = "建筑管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "建筑", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TbBuildingBo bo) {
|
||||
@ -81,10 +81,10 @@ public class TbBuildingController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改建筑管理
|
||||
* 修改建筑
|
||||
*/
|
||||
@SaCheckPermission("property:building:edit")
|
||||
@Log(title = "建筑管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "建筑", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TbBuildingBo bo) {
|
||||
@ -92,12 +92,12 @@ public class TbBuildingController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除建筑管理
|
||||
* 删除建筑
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:building:remove")
|
||||
@Log(title = "建筑管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "建筑", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
|
@ -23,11 +23,11 @@ import org.dromara.property.service.ITbCommunityService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 小区管理
|
||||
* 小区
|
||||
* 前端访问路由地址为:/property/community
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@ -38,7 +38,7 @@ public class TbCommunityController extends BaseController {
|
||||
private final ITbCommunityService tbCommunityService;
|
||||
|
||||
/**
|
||||
* 查询小区管理列表
|
||||
* 查询小区列表
|
||||
*/
|
||||
@SaCheckPermission("property:community:list")
|
||||
@GetMapping("/list")
|
||||
@ -47,18 +47,18 @@ public class TbCommunityController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出小区管理列表
|
||||
* 导出小区列表
|
||||
*/
|
||||
@SaCheckPermission("property:community:export")
|
||||
@Log(title = "小区管理", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "小区", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TbCommunityBo bo, HttpServletResponse response) {
|
||||
List<TbCommunityVo> list = tbCommunityService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "小区管理", TbCommunityVo.class, response);
|
||||
ExcelUtil.exportExcel(list, "小区", TbCommunityVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取小区管理详细信息
|
||||
* 获取小区详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@ -70,10 +70,10 @@ public class TbCommunityController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增小区管理
|
||||
* 新增小区
|
||||
*/
|
||||
@SaCheckPermission("property:community:add")
|
||||
@Log(title = "小区管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "小区", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TbCommunityBo bo) {
|
||||
@ -81,10 +81,10 @@ public class TbCommunityController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改小区管理
|
||||
* 修改小区
|
||||
*/
|
||||
@SaCheckPermission("property:community:edit")
|
||||
@Log(title = "小区管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "小区", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TbCommunityBo bo) {
|
||||
@ -92,12 +92,12 @@ public class TbCommunityController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除小区管理
|
||||
* 删除小区
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:community:remove")
|
||||
@Log(title = "小区管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "小区", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
|
@ -23,11 +23,11 @@ import org.dromara.property.service.ITbFloorService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 楼层管理
|
||||
* 楼层
|
||||
* 前端访问路由地址为:/property/floor
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@ -38,7 +38,7 @@ public class TbFloorController extends BaseController {
|
||||
private final ITbFloorService tbFloorService;
|
||||
|
||||
/**
|
||||
* 查询楼层管理列表
|
||||
* 查询楼层列表
|
||||
*/
|
||||
@SaCheckPermission("property:floor:list")
|
||||
@GetMapping("/list")
|
||||
@ -47,18 +47,18 @@ public class TbFloorController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出楼层管理列表
|
||||
* 导出楼层列表
|
||||
*/
|
||||
@SaCheckPermission("property:floor:export")
|
||||
@Log(title = "楼层管理", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "楼层", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TbFloorBo bo, HttpServletResponse response) {
|
||||
List<TbFloorVo> list = tbFloorService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "楼层管理", TbFloorVo.class, response);
|
||||
ExcelUtil.exportExcel(list, "楼层", TbFloorVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取楼层管理详细信息
|
||||
* 获取楼层详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@ -70,10 +70,10 @@ public class TbFloorController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增楼层管理
|
||||
* 新增楼层
|
||||
*/
|
||||
@SaCheckPermission("property:floor:add")
|
||||
@Log(title = "楼层管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "楼层", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TbFloorBo bo) {
|
||||
@ -81,10 +81,10 @@ public class TbFloorController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改楼层管理
|
||||
* 修改楼层
|
||||
*/
|
||||
@SaCheckPermission("property:floor:edit")
|
||||
@Log(title = "楼层管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "楼层", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TbFloorBo bo) {
|
||||
@ -92,12 +92,12 @@ public class TbFloorController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除楼层管理
|
||||
* 删除楼层
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:floor:remove")
|
||||
@Log(title = "楼层管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "楼层", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
|
@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.TbRoomVo;
|
||||
import org.dromara.property.domain.bo.TbRoomBo;
|
||||
import org.dromara.property.service.ITbRoomService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 房间信息
|
||||
* 前端访问路由地址为:/property/room
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/room")
|
||||
public class TbRoomController extends BaseController {
|
||||
|
||||
private final ITbRoomService tbRoomService;
|
||||
|
||||
/**
|
||||
* 查询房间信息列表
|
||||
*/
|
||||
@SaCheckPermission("property:room:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TbRoomVo> list(TbRoomBo bo, PageQuery pageQuery) {
|
||||
return tbRoomService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出房间信息列表
|
||||
*/
|
||||
@SaCheckPermission("property:room:export")
|
||||
@Log(title = "房间信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TbRoomBo bo, HttpServletResponse response) {
|
||||
List<TbRoomVo> list = tbRoomService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "房间信息", TbRoomVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取房间信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:room:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TbRoomVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(tbRoomService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增房间信息
|
||||
*/
|
||||
@SaCheckPermission("property:room:add")
|
||||
@Log(title = "房间信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TbRoomBo bo) {
|
||||
return toAjax(tbRoomService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改房间信息
|
||||
*/
|
||||
@SaCheckPermission("property:room:edit")
|
||||
@Log(title = "房间信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TbRoomBo bo) {
|
||||
return toAjax(tbRoomService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除房间信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:room:remove")
|
||||
@Log(title = "房间信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(tbRoomService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.TbUnitVo;
|
||||
import org.dromara.property.domain.bo.TbUnitBo;
|
||||
import org.dromara.property.service.ITbUnitService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 单元
|
||||
* 前端访问路由地址为:/property/unit
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/unit")
|
||||
public class TbUnitController extends BaseController {
|
||||
|
||||
private final ITbUnitService tbUnitService;
|
||||
|
||||
/**
|
||||
* 查询单元列表
|
||||
*/
|
||||
@SaCheckPermission("property:unit:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TbUnitVo> list(TbUnitBo bo, PageQuery pageQuery) {
|
||||
return tbUnitService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出单元列表
|
||||
*/
|
||||
@SaCheckPermission("property:unit:export")
|
||||
@Log(title = "单元", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TbUnitBo bo, HttpServletResponse response) {
|
||||
List<TbUnitVo> list = tbUnitService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "单元", TbUnitVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单元详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:unit:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TbUnitVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(tbUnitService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单元
|
||||
*/
|
||||
@SaCheckPermission("property:unit:add")
|
||||
@Log(title = "单元", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TbUnitBo bo) {
|
||||
return toAjax(tbUnitService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单元
|
||||
*/
|
||||
@SaCheckPermission("property:unit:edit")
|
||||
@Log(title = "单元", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TbUnitBo bo) {
|
||||
return toAjax(tbUnitService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单元
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:unit:remove")
|
||||
@Log(title = "单元", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(tbUnitService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -10,10 +10,10 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 建筑管理对象 tb_building
|
||||
* 建筑对象 tb_building
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ -59,6 +59,31 @@ public class TbBuilding extends TenantEntity {
|
||||
*/
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 总层数
|
||||
*/
|
||||
private Long floorCount;
|
||||
|
||||
/**
|
||||
* 单元数
|
||||
*/
|
||||
private Long unitCount;
|
||||
|
||||
/**
|
||||
* 建筑类型('1:住宅','2:商业','3:混合')
|
||||
*/
|
||||
private Long buildType;
|
||||
|
||||
/**
|
||||
* 电梯数量
|
||||
*/
|
||||
private Long elevatorCount;
|
||||
|
||||
/**
|
||||
* 竣工日期
|
||||
*/
|
||||
private Date completionDate;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@ -134,25 +159,10 @@ public class TbBuilding extends TenantEntity {
|
||||
*/
|
||||
private Long sort;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
*/
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date modifyTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@ -4,18 +4,16 @@ import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 小区管理对象 tb_community
|
||||
* 小区对象 tb_community
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ -26,7 +24,7 @@ public class TbCommunity extends TenantEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
@ -76,30 +74,35 @@ public class TbCommunity extends TenantEntity {
|
||||
*/
|
||||
private String lat;
|
||||
|
||||
/**
|
||||
* 占地面积(平方米)
|
||||
*/
|
||||
private Long area;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Date builtYear;
|
||||
|
||||
/**
|
||||
* 物业公司
|
||||
*/
|
||||
private String propertyCompany;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 社区描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 小图图片
|
||||
*/
|
||||
private String img;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
*/
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date modifyTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 楼层管理对象 tb_floor
|
||||
* 楼层对象 tb_floor
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ -22,20 +22,15 @@ public class TbFloor extends TenantEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 社区编码
|
||||
* 单元编码
|
||||
*/
|
||||
private String communityCode;
|
||||
|
||||
/**
|
||||
* 建筑名称
|
||||
*/
|
||||
private String buildingCode;
|
||||
private String unitCode;
|
||||
|
||||
/**
|
||||
* 楼层编码
|
||||
@ -48,19 +43,24 @@ public class TbFloor extends TenantEntity {
|
||||
private String floorName;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
* 楼层号
|
||||
*/
|
||||
private String orgCode;
|
||||
private Long floorNumber;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
* 楼层类型
|
||||
*/
|
||||
private Long dataState;
|
||||
private Long floorType;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
* 房间数量
|
||||
*/
|
||||
private String searchValue;
|
||||
private Long roomCount;
|
||||
|
||||
/**
|
||||
* 层高
|
||||
*/
|
||||
private Long floorHeight;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,76 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 房间信息对象 tb_room
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tb_room")
|
||||
public class TbRoom extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 所属楼层ID
|
||||
*/
|
||||
private String floorCode;
|
||||
|
||||
/**
|
||||
* 房间编码
|
||||
*/
|
||||
private String roomCode;
|
||||
|
||||
/**
|
||||
* 房间号(如101,202)
|
||||
*/
|
||||
private String roomNumber;
|
||||
|
||||
/**
|
||||
* 房间类型('住宅','商铺','办公室','设备间','公共区域')
|
||||
*/
|
||||
private Long roomType;
|
||||
|
||||
/**
|
||||
* 面积(平方米)
|
||||
*/
|
||||
private Long area;
|
||||
|
||||
/**
|
||||
* 户型(如2室1厅1卫)
|
||||
*/
|
||||
private String layout;
|
||||
|
||||
/**
|
||||
* 朝向('东','南','西','北','东南','东北','西南','西北')
|
||||
*/
|
||||
private Long orientation;
|
||||
|
||||
/**
|
||||
* 是否可售
|
||||
*/
|
||||
private Long isForSale;
|
||||
|
||||
/**
|
||||
* 状态('空置','已售','已租','自用')
|
||||
*/
|
||||
private Long status;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 单元对象 tb_unit
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tb_unit")
|
||||
public class TbUnit extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 建筑名称
|
||||
*/
|
||||
private String buildingCode;
|
||||
|
||||
/**
|
||||
* 单元编码
|
||||
*/
|
||||
private String unitCode;
|
||||
|
||||
/**
|
||||
* 单元名称
|
||||
*/
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 单元层数
|
||||
*/
|
||||
private Long floorCount;
|
||||
|
||||
/**
|
||||
* 单元户数
|
||||
*/
|
||||
private Long householdCount;
|
||||
|
||||
/**
|
||||
* 楼梯数量
|
||||
*/
|
||||
private Long stairCount;
|
||||
|
||||
|
||||
}
|
@ -12,10 +12,10 @@ import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 建筑管理业务对象 tb_building
|
||||
* 建筑业务对象 tb_building
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ -64,6 +64,31 @@ public class TbBuildingBo extends BaseEntity {
|
||||
@NotBlank(message = "区不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 总层数
|
||||
*/
|
||||
private Long floorCount;
|
||||
|
||||
/**
|
||||
* 单元数
|
||||
*/
|
||||
private Long unitCount;
|
||||
|
||||
/**
|
||||
* 建筑类型('1:住宅','2:商业','3:混合')
|
||||
*/
|
||||
private Long buildType;
|
||||
|
||||
/**
|
||||
* 电梯数量
|
||||
*/
|
||||
private Long elevatorCount;
|
||||
|
||||
/**
|
||||
* 竣工日期
|
||||
*/
|
||||
private Date completionDate;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@ -85,25 +110,21 @@ public class TbBuildingBo extends BaseEntity {
|
||||
/**
|
||||
* 产权性质(1:自持,2:承租,3:自持+承租,4:政府免费使用)
|
||||
*/
|
||||
@NotNull(message = "产权性质(1:自持,2:承租,3:自持+承租,4:政府免费使用)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long cqxz;
|
||||
|
||||
/**
|
||||
* 不动产编号
|
||||
*/
|
||||
@NotBlank(message = "不动产编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String bdcbh;
|
||||
|
||||
/**
|
||||
* 产权编号
|
||||
*/
|
||||
@NotBlank(message = "产权编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String cqbh;
|
||||
|
||||
/**
|
||||
* 图地编号
|
||||
*/
|
||||
@NotBlank(message = "图地编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String tdbh;
|
||||
|
||||
/**
|
||||
@ -121,31 +142,26 @@ public class TbBuildingBo extends BaseEntity {
|
||||
/**
|
||||
* 可租面积
|
||||
*/
|
||||
@NotNull(message = "可租面积不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long kzmj;
|
||||
|
||||
/**
|
||||
* 自用面积
|
||||
*/
|
||||
@NotNull(message = "自用面积不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long zymj;
|
||||
|
||||
/**
|
||||
* 配套面积
|
||||
*/
|
||||
@NotNull(message = "配套面积不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long ptmj;
|
||||
|
||||
/**
|
||||
* 车位面积
|
||||
*/
|
||||
@NotNull(message = "车位面积不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long cwmj;
|
||||
|
||||
/**
|
||||
* 标准层高
|
||||
*/
|
||||
@NotNull(message = "标准层高不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long bzcg;
|
||||
|
||||
/**
|
||||
@ -153,26 +169,10 @@ public class TbBuildingBo extends BaseEntity {
|
||||
*/
|
||||
private Long sort;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
*/
|
||||
@NotBlank(message = "组织编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date modifyTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@ -8,16 +8,14 @@ import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
|
||||
/**
|
||||
* 小区管理业务对象 tb_community
|
||||
* 小区业务对象 tb_community
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ -25,9 +23,9 @@ import org.dromara.common.translation.constant.TransConstant;
|
||||
public class TbCommunityBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@ -84,27 +82,35 @@ public class TbCommunityBo extends BaseEntity {
|
||||
@NotBlank(message = "维度不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String lat;
|
||||
|
||||
/**
|
||||
* 占地面积(平方米)
|
||||
*/
|
||||
private Long area;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Date builtYear;
|
||||
|
||||
/**
|
||||
* 物业公司
|
||||
*/
|
||||
private String propertyCompany;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 社区描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 小图图片
|
||||
*/
|
||||
private String img;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
*/
|
||||
@NotBlank(message = "组织编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
@NotNull(message = "数据状态:1有效,0无效不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date modifyTime;
|
||||
|
||||
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 楼层管理业务对象 tb_floor
|
||||
* 楼层业务对象 tb_floor
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ -21,22 +21,16 @@ import jakarta.validation.constraints.*;
|
||||
public class TbFloorBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 社区编码
|
||||
* 单元编码
|
||||
*/
|
||||
@NotBlank(message = "社区编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String communityCode;
|
||||
|
||||
/**
|
||||
* 建筑名称
|
||||
*/
|
||||
@NotBlank(message = "建筑名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String buildingCode;
|
||||
@NotBlank(message = "单元编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String unitCode;
|
||||
|
||||
/**
|
||||
* 楼层编码
|
||||
@ -51,15 +45,25 @@ public class TbFloorBo extends BaseEntity {
|
||||
private String floorName;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
* 楼层号
|
||||
*/
|
||||
@NotBlank(message = "组织编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String orgCode;
|
||||
@NotNull(message = "楼层号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long floorNumber;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
* 楼层类型
|
||||
*/
|
||||
private Long dataState;
|
||||
private Long floorType;
|
||||
|
||||
/**
|
||||
* 房间数量
|
||||
*/
|
||||
private Long roomCount;
|
||||
|
||||
/**
|
||||
* 层高
|
||||
*/
|
||||
private Long floorHeight;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,77 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.TbRoom;
|
||||
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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 房间信息业务对象 tb_room
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = TbRoom.class, reverseConvertGenerate = false)
|
||||
public class TbRoomBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 所属楼层ID
|
||||
*/
|
||||
@NotBlank(message = "所属楼层ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String floorCode;
|
||||
|
||||
/**
|
||||
* 房间编码
|
||||
*/
|
||||
private String roomCode;
|
||||
|
||||
/**
|
||||
* 房间号(如101,202)
|
||||
*/
|
||||
@NotBlank(message = "房间号(如101,202)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String roomNumber;
|
||||
|
||||
/**
|
||||
* 房间类型('住宅','商铺','办公室','设备间','公共区域')
|
||||
*/
|
||||
private Long roomType;
|
||||
|
||||
/**
|
||||
* 面积(平方米)
|
||||
*/
|
||||
private Long area;
|
||||
|
||||
/**
|
||||
* 户型(如2室1厅1卫)
|
||||
*/
|
||||
private String layout;
|
||||
|
||||
/**
|
||||
* 朝向('东','南','西','北','东南','东北','西南','西北')
|
||||
*/
|
||||
private Long orientation;
|
||||
|
||||
/**
|
||||
* 是否可售
|
||||
*/
|
||||
private Long isForSale;
|
||||
|
||||
/**
|
||||
* 状态('空置','已售','已租','自用')
|
||||
*/
|
||||
private Long status;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.TbUnit;
|
||||
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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 单元业务对象 tb_unit
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = TbUnit.class, reverseConvertGenerate = false)
|
||||
public class TbUnitBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 建筑名称
|
||||
*/
|
||||
@NotBlank(message = "建筑名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String buildingCode;
|
||||
|
||||
/**
|
||||
* 单元编码
|
||||
*/
|
||||
@NotBlank(message = "单元编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String unitCode;
|
||||
|
||||
/**
|
||||
* 单元名称
|
||||
*/
|
||||
@NotBlank(message = "单元名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 单元层数
|
||||
*/
|
||||
private Long floorCount;
|
||||
|
||||
/**
|
||||
* 单元户数
|
||||
*/
|
||||
private Long householdCount;
|
||||
|
||||
/**
|
||||
* 楼梯数量
|
||||
*/
|
||||
private Long stairCount;
|
||||
|
||||
|
||||
}
|
@ -17,10 +17,10 @@ import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 建筑管理视图对象 tb_building
|
||||
* 建筑视图对象 tb_building
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@ -72,6 +72,36 @@ public class TbBuildingVo implements Serializable {
|
||||
@ExcelProperty(value = "区")
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 总层数
|
||||
*/
|
||||
@ExcelProperty(value = "总层数")
|
||||
private Long floorCount;
|
||||
|
||||
/**
|
||||
* 单元数
|
||||
*/
|
||||
@ExcelProperty(value = "单元数")
|
||||
private Long unitCount;
|
||||
|
||||
/**
|
||||
* 建筑类型('1:住宅','2:商业','3:混合')
|
||||
*/
|
||||
@ExcelProperty(value = "建筑类型('1:住宅','2:商业','3:混合')")
|
||||
private Long buildType;
|
||||
|
||||
/**
|
||||
* 电梯数量
|
||||
*/
|
||||
@ExcelProperty(value = "电梯数量")
|
||||
private Long elevatorCount;
|
||||
|
||||
/**
|
||||
* 竣工日期
|
||||
*/
|
||||
@ExcelProperty(value = "竣工日期")
|
||||
private Date completionDate;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@ -93,8 +123,7 @@ public class TbBuildingVo implements Serializable {
|
||||
/**
|
||||
* 产权性质(1:自持,2:承租,3:自持+承租,4:政府免费使用)
|
||||
*/
|
||||
@ExcelProperty(value = "产权性质(1:自持,2:承租,3:自持+承租,4:政府免费使用)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "wy_cqxz")
|
||||
@ExcelProperty(value = "产权性质(1:自持,2:承租,3:自持+承租,4:政府免费使用)")
|
||||
private Long cqxz;
|
||||
|
||||
/**
|
||||
@ -163,29 +192,11 @@ public class TbBuildingVo implements Serializable {
|
||||
@ExcelProperty(value = "排序字段")
|
||||
private Long sort;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
*/
|
||||
@ExcelProperty(value = "组织编码")
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
@ExcelProperty(value = "数据状态:1有效,0无效")
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ExcelProperty(value = "修改时间")
|
||||
private Date modifyTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.property.domain.TbCommunity;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
@ -19,10 +17,10 @@ import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 小区管理视图对象 tb_community
|
||||
* 小区视图对象 tb_community
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@ -33,9 +31,9 @@ public class TbCommunityVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@ -53,8 +51,7 @@ public class TbCommunityVo implements Serializable {
|
||||
/**
|
||||
* 社区类型 1:园区,2:小区
|
||||
*/
|
||||
@ExcelProperty(value = "社区类型 1:园区,2:小区", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "wy_sqlx")
|
||||
@ExcelProperty(value = "社区类型 1:园区,2:小区")
|
||||
private Long communityType;
|
||||
|
||||
/**
|
||||
@ -93,34 +90,41 @@ public class TbCommunityVo implements Serializable {
|
||||
@ExcelProperty(value = "维度")
|
||||
private String lat;
|
||||
|
||||
/**
|
||||
* 占地面积(平方米)
|
||||
*/
|
||||
@ExcelProperty(value = "占地面积(平方米)")
|
||||
private Long area;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Date builtYear;
|
||||
|
||||
/**
|
||||
* 物业公司
|
||||
*/
|
||||
@ExcelProperty(value = "物业公司")
|
||||
private String propertyCompany;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@ExcelProperty(value = "联系电话")
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 社区描述
|
||||
*/
|
||||
@ExcelProperty(value = "社区描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 小图图片
|
||||
*/
|
||||
@ExcelProperty(value = "小图图片")
|
||||
private String img;
|
||||
|
||||
/**
|
||||
* 小图图片Url
|
||||
*/
|
||||
@Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "img")
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 组织编码
|
||||
*/
|
||||
@ExcelProperty(value = "组织编码")
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
@ExcelProperty(value = "数据状态:1有效,0无效")
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ExcelProperty(value = "修改时间")
|
||||
private Date modifyTime;
|
||||
|
||||
|
||||
}
|
||||
|
@ -15,10 +15,10 @@ import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 楼层管理视图对象 tb_floor
|
||||
* 楼层视图对象 tb_floor
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@ -29,16 +29,16 @@ public class TbFloorVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 社区编码
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "社区编码")
|
||||
private String communityCode;
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 建筑名称
|
||||
* 单元编码
|
||||
*/
|
||||
@ExcelProperty(value = "建筑名称")
|
||||
private String buildingCode;
|
||||
@ExcelProperty(value = "单元编码")
|
||||
private String unitCode;
|
||||
|
||||
/**
|
||||
* 楼层编码
|
||||
@ -53,10 +53,28 @@ public class TbFloorVo implements Serializable {
|
||||
private String floorName;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
* 楼层号
|
||||
*/
|
||||
@ExcelProperty(value = "组织编码")
|
||||
private String orgCode;
|
||||
@ExcelProperty(value = "楼层号")
|
||||
private Long floorNumber;
|
||||
|
||||
/**
|
||||
* 楼层类型
|
||||
*/
|
||||
@ExcelProperty(value = "楼层类型")
|
||||
private Long floorType;
|
||||
|
||||
/**
|
||||
* 房间数量
|
||||
*/
|
||||
@ExcelProperty(value = "房间数量")
|
||||
private Long roomCount;
|
||||
|
||||
/**
|
||||
* 层高
|
||||
*/
|
||||
@ExcelProperty(value = "层高")
|
||||
private Long floorHeight;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,93 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.TbRoom;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 房间信息视图对象 tb_room
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = TbRoom.class)
|
||||
public class TbRoomVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 所属楼层ID
|
||||
*/
|
||||
@ExcelProperty(value = "所属楼层ID")
|
||||
private String floorCode;
|
||||
|
||||
/**
|
||||
* 房间编码
|
||||
*/
|
||||
@ExcelProperty(value = "房间编码")
|
||||
private String roomCode;
|
||||
|
||||
/**
|
||||
* 房间号(如101,202)
|
||||
*/
|
||||
@ExcelProperty(value = "房间号(如101,202)")
|
||||
private String roomNumber;
|
||||
|
||||
/**
|
||||
* 房间类型('住宅','商铺','办公室','设备间','公共区域')
|
||||
*/
|
||||
@ExcelProperty(value = "房间类型('住宅','商铺','办公室','设备间','公共区域')")
|
||||
private Long roomType;
|
||||
|
||||
/**
|
||||
* 面积(平方米)
|
||||
*/
|
||||
@ExcelProperty(value = "面积(平方米)")
|
||||
private Long area;
|
||||
|
||||
/**
|
||||
* 户型(如2室1厅1卫)
|
||||
*/
|
||||
@ExcelProperty(value = "户型(如2室1厅1卫)")
|
||||
private String layout;
|
||||
|
||||
/**
|
||||
* 朝向('东','南','西','北','东南','东北','西南','西北')
|
||||
*/
|
||||
@ExcelProperty(value = "朝向('东','南','西','北','东南','东北','西南','西北')")
|
||||
private Long orientation;
|
||||
|
||||
/**
|
||||
* 是否可售
|
||||
*/
|
||||
@ExcelProperty(value = "是否可售")
|
||||
private Long isForSale;
|
||||
|
||||
/**
|
||||
* 状态('空置','已售','已租','自用')
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "'=空置','已售','已租','自用'")
|
||||
private Long status;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.TbUnit;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 单元视图对象 tb_unit
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = TbUnit.class)
|
||||
public class TbUnitVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 建筑名称
|
||||
*/
|
||||
@ExcelProperty(value = "建筑名称")
|
||||
private String buildingCode;
|
||||
|
||||
/**
|
||||
* 单元编码
|
||||
*/
|
||||
@ExcelProperty(value = "单元编码")
|
||||
private String unitCode;
|
||||
|
||||
/**
|
||||
* 单元名称
|
||||
*/
|
||||
@ExcelProperty(value = "单元名称")
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 单元层数
|
||||
*/
|
||||
@ExcelProperty(value = "单元层数")
|
||||
private Long floorCount;
|
||||
|
||||
/**
|
||||
* 单元户数
|
||||
*/
|
||||
@ExcelProperty(value = "单元户数")
|
||||
private Long householdCount;
|
||||
|
||||
/**
|
||||
* 楼梯数量
|
||||
*/
|
||||
@ExcelProperty(value = "楼梯数量")
|
||||
private Long stairCount;
|
||||
|
||||
|
||||
}
|
@ -5,10 +5,10 @@ import org.dromara.property.domain.vo.TbBuildingVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 建筑管理Mapper接口
|
||||
* 建筑Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
public interface TbBuildingMapper extends BaseMapperPlus<TbBuilding, TbBuildingVo> {
|
||||
|
||||
|
@ -5,10 +5,10 @@ import org.dromara.property.domain.vo.TbCommunityVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 小区管理Mapper接口
|
||||
* 小区Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
public interface TbCommunityMapper extends BaseMapperPlus<TbCommunity, TbCommunityVo> {
|
||||
|
||||
|
@ -5,10 +5,10 @@ import org.dromara.property.domain.vo.TbFloorVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 楼层管理Mapper接口
|
||||
* 楼层Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
public interface TbFloorMapper extends BaseMapperPlus<TbFloor, TbFloorVo> {
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.TbRoom;
|
||||
import org.dromara.property.domain.vo.TbRoomVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 房间信息Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
public interface TbRoomMapper extends BaseMapperPlus<TbRoom, TbRoomVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.TbUnit;
|
||||
import org.dromara.property.domain.vo.TbUnitVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 单元Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
public interface TbUnitMapper extends BaseMapperPlus<TbUnit, TbUnitVo> {
|
||||
|
||||
}
|
@ -10,56 +10,56 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 建筑管理Service接口
|
||||
* 建筑Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
public interface ITbBuildingService {
|
||||
|
||||
/**
|
||||
* 查询建筑管理
|
||||
* 查询建筑
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 建筑管理
|
||||
* @return 建筑
|
||||
*/
|
||||
TbBuildingVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询建筑管理列表
|
||||
* 分页查询建筑列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 建筑管理分页列表
|
||||
* @return 建筑分页列表
|
||||
*/
|
||||
TableDataInfo<TbBuildingVo> queryPageList(TbBuildingBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的建筑管理列表
|
||||
* 查询符合条件的建筑列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 建筑管理列表
|
||||
* @return 建筑列表
|
||||
*/
|
||||
List<TbBuildingVo> queryList(TbBuildingBo bo);
|
||||
|
||||
/**
|
||||
* 新增建筑管理
|
||||
* 新增建筑
|
||||
*
|
||||
* @param bo 建筑管理
|
||||
* @param bo 建筑
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(TbBuildingBo bo);
|
||||
|
||||
/**
|
||||
* 修改建筑管理
|
||||
* 修改建筑
|
||||
*
|
||||
* @param bo 建筑管理
|
||||
* @param bo 建筑
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(TbBuildingBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除建筑管理信息
|
||||
* 校验并批量删除建筑信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
|
@ -10,56 +10,56 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小区管理Service接口
|
||||
* 小区Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
public interface ITbCommunityService {
|
||||
|
||||
/**
|
||||
* 查询小区管理
|
||||
* 查询小区
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 小区管理
|
||||
* @return 小区
|
||||
*/
|
||||
TbCommunityVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询小区管理列表
|
||||
* 分页查询小区列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 小区管理分页列表
|
||||
* @return 小区分页列表
|
||||
*/
|
||||
TableDataInfo<TbCommunityVo> queryPageList(TbCommunityBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的小区管理列表
|
||||
* 查询符合条件的小区列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 小区管理列表
|
||||
* @return 小区列表
|
||||
*/
|
||||
List<TbCommunityVo> queryList(TbCommunityBo bo);
|
||||
|
||||
/**
|
||||
* 新增小区管理
|
||||
* 新增小区
|
||||
*
|
||||
* @param bo 小区管理
|
||||
* @param bo 小区
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(TbCommunityBo bo);
|
||||
|
||||
/**
|
||||
* 修改小区管理
|
||||
* 修改小区
|
||||
*
|
||||
* @param bo 小区管理
|
||||
* @param bo 小区
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(TbCommunityBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除小区管理信息
|
||||
* 校验并批量删除小区信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
|
@ -10,56 +10,56 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 楼层管理Service接口
|
||||
* 楼层Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
public interface ITbFloorService {
|
||||
|
||||
/**
|
||||
* 查询楼层管理
|
||||
* 查询楼层
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 楼层管理
|
||||
* @return 楼层
|
||||
*/
|
||||
TbFloorVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询楼层管理列表
|
||||
* 分页查询楼层列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 楼层管理分页列表
|
||||
* @return 楼层分页列表
|
||||
*/
|
||||
TableDataInfo<TbFloorVo> queryPageList(TbFloorBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的楼层管理列表
|
||||
* 查询符合条件的楼层列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 楼层管理列表
|
||||
* @return 楼层列表
|
||||
*/
|
||||
List<TbFloorVo> queryList(TbFloorBo bo);
|
||||
|
||||
/**
|
||||
* 新增楼层管理
|
||||
* 新增楼层
|
||||
*
|
||||
* @param bo 楼层管理
|
||||
* @param bo 楼层
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(TbFloorBo bo);
|
||||
|
||||
/**
|
||||
* 修改楼层管理
|
||||
* 修改楼层
|
||||
*
|
||||
* @param bo 楼层管理
|
||||
* @param bo 楼层
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(TbFloorBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除楼层管理信息
|
||||
* 校验并批量删除楼层信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.TbRoom;
|
||||
import org.dromara.property.domain.vo.TbRoomVo;
|
||||
import org.dromara.property.domain.bo.TbRoomBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房间信息Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
public interface ITbRoomService {
|
||||
|
||||
/**
|
||||
* 查询房间信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 房间信息
|
||||
*/
|
||||
TbRoomVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询房间信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 房间信息分页列表
|
||||
*/
|
||||
TableDataInfo<TbRoomVo> queryPageList(TbRoomBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的房间信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 房间信息列表
|
||||
*/
|
||||
List<TbRoomVo> queryList(TbRoomBo bo);
|
||||
|
||||
/**
|
||||
* 新增房间信息
|
||||
*
|
||||
* @param bo 房间信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(TbRoomBo bo);
|
||||
|
||||
/**
|
||||
* 修改房间信息
|
||||
*
|
||||
* @param bo 房间信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(TbRoomBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除房间信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.TbUnit;
|
||||
import org.dromara.property.domain.vo.TbUnitVo;
|
||||
import org.dromara.property.domain.bo.TbUnitBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单元Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
public interface ITbUnitService {
|
||||
|
||||
/**
|
||||
* 查询单元
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单元
|
||||
*/
|
||||
TbUnitVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询单元列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 单元分页列表
|
||||
*/
|
||||
TableDataInfo<TbUnitVo> queryPageList(TbUnitBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的单元列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 单元列表
|
||||
*/
|
||||
List<TbUnitVo> queryList(TbUnitBo bo);
|
||||
|
||||
/**
|
||||
* 新增单元
|
||||
*
|
||||
* @param bo 单元
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(TbUnitBo bo);
|
||||
|
||||
/**
|
||||
* 修改单元
|
||||
*
|
||||
* @param bo 单元
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(TbUnitBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除单元信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -21,10 +21,10 @@ import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 建筑管理Service业务层处理
|
||||
* 建筑Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@ -34,10 +34,10 @@ public class TbBuildingServiceImpl implements ITbBuildingService {
|
||||
private final TbBuildingMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询建筑管理
|
||||
* 查询建筑
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 建筑管理
|
||||
* @return 建筑
|
||||
*/
|
||||
@Override
|
||||
public TbBuildingVo queryById(Long id){
|
||||
@ -45,11 +45,11 @@ public class TbBuildingServiceImpl implements ITbBuildingService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询建筑管理列表
|
||||
* 分页查询建筑列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 建筑管理分页列表
|
||||
* @return 建筑分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TbBuildingVo> queryPageList(TbBuildingBo bo, PageQuery pageQuery) {
|
||||
@ -59,10 +59,10 @@ public class TbBuildingServiceImpl implements ITbBuildingService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的建筑管理列表
|
||||
* 查询符合条件的建筑列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 建筑管理列表
|
||||
* @return 建筑列表
|
||||
*/
|
||||
@Override
|
||||
public List<TbBuildingVo> queryList(TbBuildingBo bo) {
|
||||
@ -80,6 +80,11 @@ public class TbBuildingServiceImpl implements ITbBuildingService {
|
||||
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.getDistrict()), TbBuilding::getDistrict, bo.getDistrict());
|
||||
lqw.eq(bo.getFloorCount() != null, TbBuilding::getFloorCount, bo.getFloorCount());
|
||||
lqw.eq(bo.getUnitCount() != null, TbBuilding::getUnitCount, bo.getUnitCount());
|
||||
lqw.eq(bo.getBuildType() != null, TbBuilding::getBuildType, bo.getBuildType());
|
||||
lqw.eq(bo.getElevatorCount() != null, TbBuilding::getElevatorCount, bo.getElevatorCount());
|
||||
lqw.eq(bo.getCompletionDate() != null, TbBuilding::getCompletionDate, bo.getCompletionDate());
|
||||
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.getLat()), TbBuilding::getLat, bo.getLat());
|
||||
@ -95,17 +100,14 @@ public class TbBuildingServiceImpl implements ITbBuildingService {
|
||||
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(StringUtils.isNotBlank(bo.getOrgCode()), TbBuilding::getOrgCode, bo.getOrgCode());
|
||||
lqw.eq(bo.getDataState() != null, TbBuilding::getDataState, bo.getDataState());
|
||||
lqw.eq(bo.getModifyTime() != null, TbBuilding::getModifyTime, bo.getModifyTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), TbBuilding::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增建筑管理
|
||||
* 新增建筑
|
||||
*
|
||||
* @param bo 建筑管理
|
||||
* @param bo 建筑
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
@ -120,9 +122,9 @@ public class TbBuildingServiceImpl implements ITbBuildingService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改建筑管理
|
||||
* 修改建筑
|
||||
*
|
||||
* @param bo 建筑管理
|
||||
* @param bo 建筑
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
@ -140,7 +142,7 @@ public class TbBuildingServiceImpl implements ITbBuildingService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除建筑管理信息
|
||||
* 校验并批量删除建筑信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
|
@ -21,10 +21,10 @@ import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 小区管理Service业务层处理
|
||||
* 小区Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@ -34,10 +34,10 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
|
||||
private final TbCommunityMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询小区管理
|
||||
* 查询小区
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 小区管理
|
||||
* @return 小区
|
||||
*/
|
||||
@Override
|
||||
public TbCommunityVo queryById(Long id){
|
||||
@ -45,11 +45,11 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询小区管理列表
|
||||
* 分页查询小区列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 小区管理分页列表
|
||||
* @return 小区分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TbCommunityVo> queryPageList(TbCommunityBo bo, PageQuery pageQuery) {
|
||||
@ -59,10 +59,10 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的小区管理列表
|
||||
* 查询符合条件的小区列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 小区管理列表
|
||||
* @return 小区列表
|
||||
*/
|
||||
@Override
|
||||
public List<TbCommunityVo> queryList(TbCommunityBo bo) {
|
||||
@ -83,17 +83,19 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAddr()), TbCommunity::getAddr, bo.getAddr());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLon()), TbCommunity::getLon, bo.getLon());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLat()), TbCommunity::getLat, bo.getLat());
|
||||
lqw.eq(bo.getArea() != null, TbCommunity::getArea, bo.getArea());
|
||||
lqw.eq(bo.getBuiltYear() != null, TbCommunity::getBuiltYear, bo.getBuiltYear());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPropertyCompany()), TbCommunity::getPropertyCompany, bo.getPropertyCompany());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContactPhone()), TbCommunity::getContactPhone, bo.getContactPhone());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDescription()), TbCommunity::getDescription, bo.getDescription());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getImg()), TbCommunity::getImg, bo.getImg());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOrgCode()), TbCommunity::getOrgCode, bo.getOrgCode());
|
||||
lqw.eq(bo.getDataState() != null, TbCommunity::getDataState, bo.getDataState());
|
||||
lqw.eq(bo.getModifyTime() != null, TbCommunity::getModifyTime, bo.getModifyTime());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增小区管理
|
||||
* 新增小区
|
||||
*
|
||||
* @param bo 小区管理
|
||||
* @param bo 小区
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
@ -108,9 +110,9 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改小区管理
|
||||
* 修改小区
|
||||
*
|
||||
* @param bo 小区管理
|
||||
* @param bo 小区
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
@ -128,7 +130,7 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除小区管理信息
|
||||
* 校验并批量删除小区信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
|
@ -21,10 +21,10 @@ import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 楼层管理Service业务层处理
|
||||
* 楼层Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-18
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@ -34,10 +34,10 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
private final TbFloorMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询楼层管理
|
||||
* 查询楼层
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 楼层管理
|
||||
* @return 楼层
|
||||
*/
|
||||
@Override
|
||||
public TbFloorVo queryById(Long id){
|
||||
@ -45,11 +45,11 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询楼层管理列表
|
||||
* 分页查询楼层列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 楼层管理分页列表
|
||||
* @return 楼层分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TbFloorVo> queryPageList(TbFloorBo bo, PageQuery pageQuery) {
|
||||
@ -59,10 +59,10 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的楼层管理列表
|
||||
* 查询符合条件的楼层列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 楼层管理列表
|
||||
* @return 楼层列表
|
||||
*/
|
||||
@Override
|
||||
public List<TbFloorVo> queryList(TbFloorBo bo) {
|
||||
@ -74,19 +74,20 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TbFloor> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(TbFloor::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCommunityCode()), TbFloor::getCommunityCode, bo.getCommunityCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBuildingCode()), TbFloor::getBuildingCode, bo.getBuildingCode());
|
||||
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.eq(StringUtils.isNotBlank(bo.getOrgCode()), TbFloor::getOrgCode, bo.getOrgCode());
|
||||
lqw.eq(bo.getDataState() != null, TbFloor::getDataState, bo.getDataState());
|
||||
lqw.eq(bo.getFloorNumber() != null, TbFloor::getFloorNumber, bo.getFloorNumber());
|
||||
lqw.eq(bo.getFloorType() != null, TbFloor::getFloorType, bo.getFloorType());
|
||||
lqw.eq(bo.getRoomCount() != null, TbFloor::getRoomCount, bo.getRoomCount());
|
||||
lqw.eq(bo.getFloorHeight() != null, TbFloor::getFloorHeight, bo.getFloorHeight());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增楼层管理
|
||||
* 新增楼层
|
||||
*
|
||||
* @param bo 楼层管理
|
||||
* @param bo 楼层
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
@ -101,9 +102,9 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改楼层管理
|
||||
* 修改楼层
|
||||
*
|
||||
* @param bo 楼层管理
|
||||
* @param bo 楼层
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
@ -121,7 +122,7 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除楼层管理信息
|
||||
* 校验并批量删除楼层信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
|
@ -0,0 +1,140 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.TbRoomBo;
|
||||
import org.dromara.property.domain.vo.TbRoomVo;
|
||||
import org.dromara.property.domain.TbRoom;
|
||||
import org.dromara.property.mapper.TbRoomMapper;
|
||||
import org.dromara.property.service.ITbRoomService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 房间信息Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TbRoomServiceImpl implements ITbRoomService {
|
||||
|
||||
private final TbRoomMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询房间信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 房间信息
|
||||
*/
|
||||
@Override
|
||||
public TbRoomVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询房间信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 房间信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TbRoomVo> queryPageList(TbRoomBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TbRoom> lqw = buildQueryWrapper(bo);
|
||||
Page<TbRoomVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的房间信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 房间信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<TbRoomVo> queryList(TbRoomBo bo) {
|
||||
LambdaQueryWrapper<TbRoom> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TbRoom> buildQueryWrapper(TbRoomBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TbRoom> lqw = Wrappers.lambdaQuery();
|
||||
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(bo.getRoomType() != null, TbRoom::getRoomType, bo.getRoomType());
|
||||
lqw.eq(bo.getArea() != null, TbRoom::getArea, bo.getArea());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLayout()), TbRoom::getLayout, bo.getLayout());
|
||||
lqw.eq(bo.getOrientation() != null, TbRoom::getOrientation, bo.getOrientation());
|
||||
lqw.eq(bo.getIsForSale() != null, TbRoom::getIsForSale, bo.getIsForSale());
|
||||
lqw.eq(bo.getStatus() != null, TbRoom::getStatus, bo.getStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增房间信息
|
||||
*
|
||||
* @param bo 房间信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(TbRoomBo bo) {
|
||||
TbRoom add = MapstructUtils.convert(bo, TbRoom.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改房间信息
|
||||
*
|
||||
* @param bo 房间信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TbRoomBo bo) {
|
||||
TbRoom update = MapstructUtils.convert(bo, TbRoom.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TbRoom entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除房间信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.TbUnitBo;
|
||||
import org.dromara.property.domain.vo.TbUnitVo;
|
||||
import org.dromara.property.domain.TbUnit;
|
||||
import org.dromara.property.mapper.TbUnitMapper;
|
||||
import org.dromara.property.service.ITbUnitService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 单元Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-26
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TbUnitServiceImpl implements ITbUnitService {
|
||||
|
||||
private final TbUnitMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询单元
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单元
|
||||
*/
|
||||
@Override
|
||||
public TbUnitVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询单元列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 单元分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TbUnitVo> queryPageList(TbUnitBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TbUnit> lqw = buildQueryWrapper(bo);
|
||||
Page<TbUnitVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的单元列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 单元列表
|
||||
*/
|
||||
@Override
|
||||
public List<TbUnitVo> queryList(TbUnitBo bo) {
|
||||
LambdaQueryWrapper<TbUnit> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TbUnit> buildQueryWrapper(TbUnitBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TbUnit> lqw = Wrappers.lambdaQuery();
|
||||
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.eq(bo.getFloorCount() != null, TbUnit::getFloorCount, bo.getFloorCount());
|
||||
lqw.eq(bo.getHouseholdCount() != null, TbUnit::getHouseholdCount, bo.getHouseholdCount());
|
||||
lqw.eq(bo.getStairCount() != null, TbUnit::getStairCount, bo.getStairCount());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单元
|
||||
*
|
||||
* @param bo 单元
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(TbUnitBo bo) {
|
||||
TbUnit add = MapstructUtils.convert(bo, TbUnit.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单元
|
||||
*
|
||||
* @param bo 单元
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TbUnitBo bo) {
|
||||
TbUnit update = MapstructUtils.convert(bo, TbUnit.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TbUnit entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除单元信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?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="org.dromara.property.mapper.TbRoomMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?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="org.dromara.property.mapper.TbUnitMapper">
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user