浏览代码

建筑区块配置

lv.wenbin 1 年之前
父节点
当前提交
d8ae7d08b4
共有 24 个文件被更改,包括 1862 次插入83 次删除
  1. 105 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/AreaBuildingController.java
  2. 104 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/AreaBuildingZoningController.java
  3. 104 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/AreaController.java
  4. 0 23
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/TestController.java
  5. 236 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/Area.java
  6. 149 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/AreaBuilding.java
  7. 135 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/AreaBuildingZoning.java
  8. 61 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/AreaBuildingMapper.java
  9. 61 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/AreaBuildingZoningMapper.java
  10. 61 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/AreaMapper.java
  11. 61 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IAreaBuildingService.java
  12. 61 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IAreaBuildingZoningService.java
  13. 61 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IAreaService.java
  14. 94 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/AreaBuildingServiceImpl.java
  15. 93 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/AreaBuildingZoningServiceImpl.java
  16. 93 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/AreaServiceImpl.java
  17. 9 6
      ems-cloud/ems-modules/ems-server/src/main/resources/bootstrap.yml
  18. 91 0
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/AreaBuildingMapper.xml
  19. 86 0
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/AreaBuildingZoningMapper.xml
  20. 121 0
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/AreaMapper.xml
  21. 10 8
      ems-cloud/ems-modules/ruoyi-gen/src/main/resources/bootstrap.yml
  22. 1 6
      ems-cloud/ruoyi-gateway/src/main/resources/application-local.yml
  23. 30 30
      ems-cloud/sql/ems_server.sql
  24. 35 10
      ems-cloud/sql/ems_sys.sql

+ 105 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/AreaBuildingController.java

@@ -0,0 +1,105 @@
+package com.ruoyi.ems.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.ems.service.IAreaBuildingService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.ruoyi.ems.domain.AreaBuilding;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+
+/**
+ * 建筑基本信息Controller
+ * 
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+@RestController
+@RequestMapping("/basecfg/area/building")
+public class AreaBuildingController extends BaseController
+{
+    @Autowired
+    private IAreaBuildingService areaBuildingService;
+
+    /**
+     * 查询建筑基本信息列表
+     */
+    @RequiresPermissions("basecfg:building:list")
+    @GetMapping("/list")
+    public TableDataInfo list(AreaBuilding areaBuilding)
+    {
+        startPage();
+        List<AreaBuilding> list = areaBuildingService.selectAreaBuildingList(areaBuilding);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出建筑基本信息列表
+     */
+    @RequiresPermissions("basecfg:building:export")
+    @Log(title = "建筑基本信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, AreaBuilding areaBuilding)
+    {
+        List<AreaBuilding> list = areaBuildingService.selectAreaBuildingList(areaBuilding);
+        ExcelUtil<AreaBuilding> util = new ExcelUtil<AreaBuilding>(AreaBuilding.class);
+        util.exportExcel(response, list, "建筑基本信息数据");
+    }
+
+    /**
+     * 获取建筑基本信息详细信息
+     */
+    @RequiresPermissions("basecfg:building:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(areaBuildingService.selectAreaBuildingById(id));
+    }
+
+    /**
+     * 新增建筑基本信息
+     */
+    @RequiresPermissions("basecfg:building:add")
+    @Log(title = "建筑基本信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody AreaBuilding areaBuilding)
+    {
+        return toAjax(areaBuildingService.insertAreaBuilding(areaBuilding));
+    }
+
+    /**
+     * 修改建筑基本信息
+     */
+    @RequiresPermissions("basecfg:building:edit")
+    @Log(title = "建筑基本信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody AreaBuilding areaBuilding)
+    {
+        return toAjax(areaBuildingService.updateAreaBuilding(areaBuilding));
+    }
+
+    /**
+     * 删除建筑基本信息
+     */
+    @RequiresPermissions("basecfg:building:remove")
+    @Log(title = "建筑基本信息", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(areaBuildingService.deleteAreaBuildingByIds(ids));
+    }
+}

+ 104 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/AreaBuildingZoningController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.ems.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.ruoyi.ems.domain.AreaBuildingZoning;
+import com.ruoyi.ems.service.IAreaBuildingZoningService;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+
+/**
+ * 建筑区域划分Controller
+ * 
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+@RestController
+@RequestMapping("/basecfg/area/building/zoning")
+public class AreaBuildingZoningController extends BaseController
+{
+    @Autowired
+    private IAreaBuildingZoningService areaBuildingZoningService;
+
+    /**
+     * 查询建筑区域划分列表
+     */
+    @RequiresPermissions("basecfg:zoning:list")
+    @GetMapping("/list")
+    public TableDataInfo list(AreaBuildingZoning areaBuildingZoning)
+    {
+        startPage();
+        List<AreaBuildingZoning> list = areaBuildingZoningService.selectAreaBuildingZoningList(areaBuildingZoning);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出建筑区域划分列表
+     */
+    @RequiresPermissions("basecfg:zoning:export")
+    @Log(title = "建筑区域划分", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, AreaBuildingZoning areaBuildingZoning)
+    {
+        List<AreaBuildingZoning> list = areaBuildingZoningService.selectAreaBuildingZoningList(areaBuildingZoning);
+        ExcelUtil<AreaBuildingZoning> util = new ExcelUtil<AreaBuildingZoning>(AreaBuildingZoning.class);
+        util.exportExcel(response, list, "建筑区域划分数据");
+    }
+
+    /**
+     * 获取建筑区域划分详细信息
+     */
+    @RequiresPermissions("basecfg:zoning:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(areaBuildingZoningService.selectAreaBuildingZoningById(id));
+    }
+
+    /**
+     * 新增建筑区域划分
+     */
+    @RequiresPermissions("basecfg:zoning:add")
+    @Log(title = "建筑区域划分", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody AreaBuildingZoning areaBuildingZoning)
+    {
+        return toAjax(areaBuildingZoningService.insertAreaBuildingZoning(areaBuildingZoning));
+    }
+
+    /**
+     * 修改建筑区域划分
+     */
+    @RequiresPermissions("basecfg:zoning:edit")
+    @Log(title = "建筑区域划分", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody AreaBuildingZoning areaBuildingZoning)
+    {
+        return toAjax(areaBuildingZoningService.updateAreaBuildingZoning(areaBuildingZoning));
+    }
+
+    /**
+     * 删除建筑区域划分
+     */
+    @RequiresPermissions("basecfg:zoning:remove")
+    @Log(title = "建筑区域划分", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(areaBuildingZoningService.deleteAreaBuildingZoningByIds(ids));
+    }
+}

+ 104 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/AreaController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.ems.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.ruoyi.ems.domain.Area;
+import com.ruoyi.ems.service.IAreaService;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+
+/**
+ * 服务区Controller
+ * 
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+@RestController
+@RequestMapping("/basecfg/area")
+public class AreaController extends BaseController
+{
+    @Autowired
+    private IAreaService areaService;
+
+    /**
+     * 查询服务区列表
+     */
+    @RequiresPermissions("basecfg:area:list")
+    @GetMapping("/list")
+    public TableDataInfo list(Area area)
+    {
+        startPage();
+        List<Area> list = areaService.selectAreaList(area);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出服务区列表
+     */
+    @RequiresPermissions("basecfg:area:export")
+    @Log(title = "服务区", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, Area area)
+    {
+        List<Area> list = areaService.selectAreaList(area);
+        ExcelUtil<Area> util = new ExcelUtil<Area>(Area.class);
+        util.exportExcel(response, list, "服务区数据");
+    }
+
+    /**
+     * 获取服务区详细信息
+     */
+    @RequiresPermissions("basecfg:area:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(areaService.selectAreaById(id));
+    }
+
+    /**
+     * 新增服务区
+     */
+    @RequiresPermissions("basecfg:area:add")
+    @Log(title = "服务区", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody Area area)
+    {
+        return toAjax(areaService.insertArea(area));
+    }
+
+    /**
+     * 修改服务区
+     */
+    @RequiresPermissions("basecfg:area:edit")
+    @Log(title = "服务区", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody Area area)
+    {
+        return toAjax(areaService.updateArea(area));
+    }
+
+    /**
+     * 删除服务区
+     */
+    @RequiresPermissions("basecfg:area:remove")
+    @Log(title = "服务区", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(areaService.deleteAreaByIds(ids));
+    }
+}

+ 0 - 23
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/TestController.java

@@ -1,23 +0,0 @@
-package com.ruoyi.ems.controller;
-
-import com.ruoyi.common.core.web.controller.BaseController;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * 测试
- *
- * @author huashe
- */
-@RestController
-@RequestMapping("/test")
-public class TestController extends BaseController {
-    /**
-     * 获取参数配置列表
-     */
-    @GetMapping("/time")
-    public String getTimestamp() {
-        return "{\"time\":" + System.currentTimeMillis() + "}";
-    }
-}

+ 236 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/Area.java

@@ -0,0 +1,236 @@
+package com.ruoyi.ems.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+/**
+ * 服务区对象 adm_service_area
+ * 
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+public class Area extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 序号 */
+    private Long id;
+
+    /** 服务区代码 */
+    @Excel(name = "服务区代码")
+    private String areaCode;
+
+    /** 服务区名称 */
+    @Excel(name = "服务区名称")
+    private String areaName;
+
+    /** 服务星级 */
+    @Excel(name = "服务星级")
+    private Long serviceStar;
+
+    /** 所在城市 */
+    @Excel(name = "所在城市")
+    private String city;
+
+    /** 所在高速 */
+    @Excel(name = "所在高速")
+    private String highway;
+
+    /** 方向 */
+    @Excel(name = "方向")
+    private String direction;
+
+    /** 地址 */
+    @Excel(name = "地址")
+    private String address;
+
+    /** 所有单位 */
+    @Excel(name = "所有单位")
+    private String attrOrg;
+
+    /** 所有单位 */
+    @Excel(name = "管理单位")
+    private String mgrOrg;
+
+    /** 开业时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "开业时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date openDate;
+
+    /** 占地面积(亩) */
+    @Excel(name = "占地面积(亩)")
+    private Long landArea;
+
+    /** 建筑面积(平方米) */
+    @Excel(name = "建筑面积(平方米)")
+    private Long floorArea;
+
+    /** 经度 */
+    @Excel(name = "经度")
+    private Long longitude;
+
+    /** 纬度 */
+    @Excel(name = "纬度")
+    private Long latitude;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setAreaCode(String areaCode) 
+    {
+        this.areaCode = areaCode;
+    }
+
+    public String getAreaCode() 
+    {
+        return areaCode;
+    }
+    public void setAreaName(String areaName) 
+    {
+        this.areaName = areaName;
+    }
+
+    public String getAreaName() 
+    {
+        return areaName;
+    }
+    public void setServiceStar(Long serviceStar) 
+    {
+        this.serviceStar = serviceStar;
+    }
+
+    public Long getServiceStar() 
+    {
+        return serviceStar;
+    }
+    public void setCity(String city) 
+    {
+        this.city = city;
+    }
+
+    public String getCity() 
+    {
+        return city;
+    }
+    public void setHighway(String highway) 
+    {
+        this.highway = highway;
+    }
+
+    public String getHighway() 
+    {
+        return highway;
+    }
+    public void setDirection(String direction) 
+    {
+        this.direction = direction;
+    }
+
+    public String getDirection() 
+    {
+        return direction;
+    }
+    public void setAddress(String address) 
+    {
+        this.address = address;
+    }
+
+    public String getAddress() 
+    {
+        return address;
+    }
+    public void setAttrOrg(String attrOrg) 
+    {
+        this.attrOrg = attrOrg;
+    }
+
+    public String getAttrOrg() 
+    {
+        return attrOrg;
+    }
+    public void setMgrOrg(String mgrOrg) 
+    {
+        this.mgrOrg = mgrOrg;
+    }
+
+    public String getMgrOrg() 
+    {
+        return mgrOrg;
+    }
+    public void setOpenDate(Date openDate) 
+    {
+        this.openDate = openDate;
+    }
+
+    public Date getOpenDate() 
+    {
+        return openDate;
+    }
+    public void setLandArea(Long landArea) 
+    {
+        this.landArea = landArea;
+    }
+
+    public Long getLandArea() 
+    {
+        return landArea;
+    }
+    public void setFloorArea(Long floorArea) 
+    {
+        this.floorArea = floorArea;
+    }
+
+    public Long getFloorArea() 
+    {
+        return floorArea;
+    }
+    public void setLongitude(Long longitude) 
+    {
+        this.longitude = longitude;
+    }
+
+    public Long getLongitude() 
+    {
+        return longitude;
+    }
+    public void setLatitude(Long latitude) 
+    {
+        this.latitude = latitude;
+    }
+
+    public Long getLatitude() 
+    {
+        return latitude;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("areaCode", getAreaCode())
+            .append("areaName", getAreaName())
+            .append("serviceStar", getServiceStar())
+            .append("city", getCity())
+            .append("highway", getHighway())
+            .append("direction", getDirection())
+            .append("address", getAddress())
+            .append("attrOrg", getAttrOrg())
+            .append("mgrOrg", getMgrOrg())
+            .append("openDate", getOpenDate())
+            .append("landArea", getLandArea())
+            .append("floorArea", getFloorArea())
+            .append("longitude", getLongitude())
+            .append("latitude", getLatitude())
+            .toString();
+    }
+}

+ 149 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/AreaBuilding.java

@@ -0,0 +1,149 @@
+package com.ruoyi.ems.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+/**
+ * 建筑基本信息对象 adm_area_building
+ * 
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+public class AreaBuilding extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 序号 */
+    private Long id;
+
+    /** 建筑编码 */
+    @Excel(name = "建筑编码")
+    private String bldgCode;
+
+    /** 建筑名称 */
+    @Excel(name = "建筑名称")
+    private String bldgName;
+
+    /** 详细地址 */
+    @Excel(name = "详细地址")
+    private String address;
+
+    /** 建筑层数(地上) */
+    @Excel(name = "建筑层数(地上)")
+    private Long upBldgFloor;
+
+    /** 建筑层数(地下) */
+    @Excel(name = "建筑层数(地下)")
+    private Long downBldgFloor;
+
+    /** 建筑高度 */
+    @Excel(name = "建筑高度")
+    private Long bldgHeight;
+
+    /** 建筑面积(平方米 m²) */
+    @Excel(name = "建筑面积(平方米,m=²)")
+    private Long floorArea;
+
+    /** 主要用途 */
+    @Excel(name = "主要用途")
+    private String bldgUsage;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setBldgCode(String bldgCode) 
+    {
+        this.bldgCode = bldgCode;
+    }
+
+    public String getBldgCode() 
+    {
+        return bldgCode;
+    }
+    public void setBldgName(String bldgName) 
+    {
+        this.bldgName = bldgName;
+    }
+
+    public String getBldgName() 
+    {
+        return bldgName;
+    }
+    public void setAddress(String address) 
+    {
+        this.address = address;
+    }
+
+    public String getAddress() 
+    {
+        return address;
+    }
+    public void setUpBldgFloor(Long upBldgFloor) 
+    {
+        this.upBldgFloor = upBldgFloor;
+    }
+
+    public Long getUpBldgFloor() 
+    {
+        return upBldgFloor;
+    }
+    public void setDownBldgFloor(Long downBldgFloor) 
+    {
+        this.downBldgFloor = downBldgFloor;
+    }
+
+    public Long getDownBldgFloor() 
+    {
+        return downBldgFloor;
+    }
+    public void setBldgHeight(Long bldgHeight) 
+    {
+        this.bldgHeight = bldgHeight;
+    }
+
+    public Long getBldgHeight() 
+    {
+        return bldgHeight;
+    }
+    public void setFloorArea(Long floorArea) 
+    {
+        this.floorArea = floorArea;
+    }
+
+    public Long getFloorArea() 
+    {
+        return floorArea;
+    }
+    public void setBldgUsage(String bldgUsage) 
+    {
+        this.bldgUsage = bldgUsage;
+    }
+
+    public String getBldgUsage() 
+    {
+        return bldgUsage;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("bldgCode", getBldgCode())
+            .append("bldgName", getBldgName())
+            .append("address", getAddress())
+            .append("upBldgFloor", getUpBldgFloor())
+            .append("downBldgFloor", getDownBldgFloor())
+            .append("bldgHeight", getBldgHeight())
+            .append("floorArea", getFloorArea())
+            .append("bldgUsage", getBldgUsage())
+            .toString();
+    }
+}

+ 135 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/AreaBuildingZoning.java

@@ -0,0 +1,135 @@
+package com.ruoyi.ems.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+/**
+ * 建筑区域划分对象 adm_area_building_zoning
+ * 
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+public class AreaBuildingZoning extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 序号 */
+    private Long id;
+
+    /** 建筑编码 */
+    @Excel(name = "建筑编码")
+    private String bldgCode;
+
+    /** 分区编码 */
+    @Excel(name = "分区编码")
+    private String divisionCode;
+
+    /** 分区名称 */
+    @Excel(name = "分区名称")
+    private String divisionName;
+
+    /** 楼层 */
+    @Excel(name = "楼层")
+    private Long floor;
+
+    /** 房间号 */
+    @Excel(name = "房间号")
+    private String roomNo;
+
+    /** 建筑划分面积 */
+    @Excel(name = "建筑划分面积")
+    private Long bldgLdArea;
+
+    /** 使用详情 */
+    @Excel(name = "使用详情")
+    private String usageDetail;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setBldgCode(String bldgCode) 
+    {
+        this.bldgCode = bldgCode;
+    }
+
+    public String getBldgCode() 
+    {
+        return bldgCode;
+    }
+    public void setDivisionCode(String divisionCode) 
+    {
+        this.divisionCode = divisionCode;
+    }
+
+    public String getDivisionCode() 
+    {
+        return divisionCode;
+    }
+    public void setDivisionName(String divisionName) 
+    {
+        this.divisionName = divisionName;
+    }
+
+    public String getDivisionName() 
+    {
+        return divisionName;
+    }
+    public void setFloor(Long floor) 
+    {
+        this.floor = floor;
+    }
+
+    public Long getFloor() 
+    {
+        return floor;
+    }
+    public void setRoomNo(String roomNo) 
+    {
+        this.roomNo = roomNo;
+    }
+
+    public String getRoomNo() 
+    {
+        return roomNo;
+    }
+    public void setBldgLdArea(Long bldgLdArea) 
+    {
+        this.bldgLdArea = bldgLdArea;
+    }
+
+    public Long getBldgLdArea() 
+    {
+        return bldgLdArea;
+    }
+    public void setUsageDetail(String usageDetail) 
+    {
+        this.usageDetail = usageDetail;
+    }
+
+    public String getUsageDetail() 
+    {
+        return usageDetail;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("bldgCode", getBldgCode())
+            .append("divisionCode", getDivisionCode())
+            .append("divisionName", getDivisionName())
+            .append("floor", getFloor())
+            .append("roomNo", getRoomNo())
+            .append("bldgLdArea", getBldgLdArea())
+            .append("usageDetail", getUsageDetail())
+            .toString();
+    }
+}

+ 61 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/AreaBuildingMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.ems.mapper;
+
+import java.util.List;
+
+import com.ruoyi.ems.domain.AreaBuilding;
+
+/**
+ * 建筑基本信息Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+public interface AreaBuildingMapper {
+    /**
+     * 查询建筑基本信息
+     *
+     * @param id 建筑基本信息主键
+     * @return 建筑基本信息
+     */
+    AreaBuilding selectAreaBuildingById(Long id);
+
+    /**
+     * 查询建筑基本信息列表
+     *
+     * @param areaBuilding 建筑基本信息
+     * @return 建筑基本信息集合
+     */
+    List<AreaBuilding> selectAreaBuildingList(AreaBuilding areaBuilding);
+
+    /**
+     * 新增建筑基本信息
+     *
+     * @param areaBuilding 建筑基本信息
+     * @return 结果
+     */
+    int insertAreaBuilding(AreaBuilding areaBuilding);
+
+    /**
+     * 修改建筑基本信息
+     *
+     * @param areaBuilding 建筑基本信息
+     * @return 结果
+     */
+    int updateAreaBuilding(AreaBuilding areaBuilding);
+
+    /**
+     * 删除建筑基本信息
+     *
+     * @param id 建筑基本信息主键
+     * @return 结果
+     */
+    int deleteAreaBuildingById(Long id);
+
+    /**
+     * 批量删除建筑基本信息
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteAreaBuildingByIds(Long[] ids);
+}

+ 61 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/AreaBuildingZoningMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.ems.mapper;
+
+import java.util.List;
+
+import com.ruoyi.ems.domain.AreaBuildingZoning;
+
+/**
+ * 建筑区域划分Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+public interface AreaBuildingZoningMapper {
+    /**
+     * 查询建筑区域划分
+     *
+     * @param id 建筑区域划分主键
+     * @return 建筑区域划分
+     */
+    AreaBuildingZoning selectAreaBuildingZoningById(Long id);
+
+    /**
+     * 查询建筑区域划分列表
+     *
+     * @param areaBuildingZoning 建筑区域划分
+     * @return 建筑区域划分集合
+     */
+    List<AreaBuildingZoning> selectAreaBuildingZoningList(AreaBuildingZoning areaBuildingZoning);
+
+    /**
+     * 新增建筑区域划分
+     *
+     * @param areaBuildingZoning 建筑区域划分
+     * @return 结果
+     */
+    int insertAreaBuildingZoning(AreaBuildingZoning areaBuildingZoning);
+
+    /**
+     * 修改建筑区域划分
+     *
+     * @param areaBuildingZoning 建筑区域划分
+     * @return 结果
+     */
+    int updateAreaBuildingZoning(AreaBuildingZoning areaBuildingZoning);
+
+    /**
+     * 删除建筑区域划分
+     *
+     * @param id 建筑区域划分主键
+     * @return 结果
+     */
+    int deleteAreaBuildingZoningById(Long id);
+
+    /**
+     * 批量删除建筑区域划分
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteAreaBuildingZoningByIds(Long[] ids);
+}

+ 61 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/AreaMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.ems.mapper;
+
+import java.util.List;
+import com.ruoyi.ems.domain.Area;
+
+/**
+ * 服务区Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+public interface AreaMapper
+{
+    /**
+     * 查询服务区
+     * 
+     * @param id 服务区主键
+     * @return 服务区
+     */
+    public Area selectAreaById(Long id);
+
+    /**
+     * 查询服务区列表
+     * 
+     * @param admServiceArea 服务区
+     * @return 服务区集合
+     */
+    public List<Area> selectAreaList(Area admServiceArea);
+
+    /**
+     * 新增服务区
+     * 
+     * @param admServiceArea 服务区
+     * @return 结果
+     */
+    public int insertArea(Area admServiceArea);
+
+    /**
+     * 修改服务区
+     * 
+     * @param admServiceArea 服务区
+     * @return 结果
+     */
+    public int updateArea(Area admServiceArea);
+
+    /**
+     * 删除服务区
+     * 
+     * @param id 服务区主键
+     * @return 结果
+     */
+    public int deleteAreaById(Long id);
+
+    /**
+     * 批量删除服务区
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteAreaByIds(Long[] ids);
+}

+ 61 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IAreaBuildingService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.ems.service;
+
+import java.util.List;
+
+import com.ruoyi.ems.domain.AreaBuilding;
+
+/**
+ * 建筑基本信息Service接口
+ *
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+public interface IAreaBuildingService {
+    /**
+     * 查询建筑基本信息
+     *
+     * @param id 建筑基本信息主键
+     * @return 建筑基本信息
+     */
+    AreaBuilding selectAreaBuildingById(Long id);
+
+    /**
+     * 查询建筑基本信息列表
+     *
+     * @param areaBuilding 建筑基本信息
+     * @return 建筑基本信息集合
+     */
+    List<AreaBuilding> selectAreaBuildingList(AreaBuilding areaBuilding);
+
+    /**
+     * 新增建筑基本信息
+     *
+     * @param areaBuilding 建筑基本信息
+     * @return 结果
+     */
+    int insertAreaBuilding(AreaBuilding areaBuilding);
+
+    /**
+     * 修改建筑基本信息
+     *
+     * @param areaBuilding 建筑基本信息
+     * @return 结果
+     */
+    int updateAreaBuilding(AreaBuilding areaBuilding);
+
+    /**
+     * 批量删除建筑基本信息
+     *
+     * @param ids 需要删除的建筑基本信息主键集合
+     * @return 结果
+     */
+    int deleteAreaBuildingByIds(Long[] ids);
+
+    /**
+     * 删除建筑基本信息信息
+     *
+     * @param id 建筑基本信息主键
+     * @return 结果
+     */
+    int deleteAreaBuildingById(Long id);
+}

+ 61 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IAreaBuildingZoningService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.ems.service;
+
+import java.util.List;
+
+import com.ruoyi.ems.domain.AreaBuildingZoning;
+
+/**
+ * 建筑区域划分Service接口
+ *
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+public interface IAreaBuildingZoningService {
+    /**
+     * 查询建筑区域划分
+     *
+     * @param id 建筑区域划分主键
+     * @return 建筑区域划分
+     */
+    AreaBuildingZoning selectAreaBuildingZoningById(Long id);
+
+    /**
+     * 查询建筑区域划分列表
+     *
+     * @param areaBuildingZoning 建筑区域划分
+     * @return 建筑区域划分集合
+     */
+    List<AreaBuildingZoning> selectAreaBuildingZoningList(AreaBuildingZoning areaBuildingZoning);
+
+    /**
+     * 新增建筑区域划分
+     *
+     * @param areaBuildingZoning 建筑区域划分
+     * @return 结果
+     */
+    int insertAreaBuildingZoning(AreaBuildingZoning areaBuildingZoning);
+
+    /**
+     * 修改建筑区域划分
+     *
+     * @param areaBuildingZoning 建筑区域划分
+     * @return 结果
+     */
+    int updateAreaBuildingZoning(AreaBuildingZoning areaBuildingZoning);
+
+    /**
+     * 批量删除建筑区域划分
+     *
+     * @param ids 需要删除的建筑区域划分主键集合
+     * @return 结果
+     */
+    int deleteAreaBuildingZoningByIds(Long[] ids);
+
+    /**
+     * 删除建筑区域划分信息
+     *
+     * @param id 建筑区域划分主键
+     * @return 结果
+     */
+    int deleteAreaBuildingZoningById(Long id);
+}

+ 61 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IAreaService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.ems.service;
+
+import java.util.List;
+
+import com.ruoyi.ems.domain.Area;
+
+/**
+ * 服务区Service接口
+ *
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+public interface IAreaService {
+    /**
+     * 查询服务区
+     *
+     * @param id 服务区主键
+     * @return 服务区
+     */
+    Area selectAreaById(Long id);
+
+    /**
+     * 查询服务区列表
+     *
+     * @param area 服务区
+     * @return 服务区集合
+     */
+    List<Area> selectAreaList(Area area);
+
+    /**
+     * 新增服务区
+     *
+     * @param area 服务区
+     * @return 结果
+     */
+    int insertArea(Area area);
+
+    /**
+     * 修改服务区
+     *
+     * @param area 服务区
+     * @return 结果
+     */
+    int updateArea(Area area);
+
+    /**
+     * 批量删除服务区
+     *
+     * @param ids 需要删除的服务区主键集合
+     * @return 结果
+     */
+    int deleteAreaByIds(Long[] ids);
+
+    /**
+     * 删除服务区信息
+     *
+     * @param id 服务区主键
+     * @return 结果
+     */
+    int deleteAreaById(Long id);
+}

+ 94 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/AreaBuildingServiceImpl.java

@@ -0,0 +1,94 @@
+package com.ruoyi.ems.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.ems.service.IAreaBuildingService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.ems.mapper.AreaBuildingMapper;
+import com.ruoyi.ems.domain.AreaBuilding;
+
+/**
+ * 建筑基本信息Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+@Service
+public class AreaBuildingServiceImpl implements IAreaBuildingService
+{
+    @Autowired
+    private AreaBuildingMapper areaBuildingMapper;
+
+    /**
+     * 查询建筑基本信息
+     * 
+     * @param id 建筑基本信息主键
+     * @return 建筑基本信息
+     */
+    @Override
+    public AreaBuilding selectAreaBuildingById(Long id)
+    {
+        return areaBuildingMapper.selectAreaBuildingById(id);
+    }
+
+    /**
+     * 查询建筑基本信息列表
+     * 
+     * @param areaBuilding 建筑基本信息
+     * @return 建筑基本信息
+     */
+    @Override
+    public List<AreaBuilding> selectAreaBuildingList(AreaBuilding areaBuilding)
+    {
+        return areaBuildingMapper.selectAreaBuildingList(areaBuilding);
+    }
+
+    /**
+     * 新增建筑基本信息
+     * 
+     * @param areaBuilding 建筑基本信息
+     * @return 结果
+     */
+    @Override
+    public int insertAreaBuilding(AreaBuilding areaBuilding)
+    {
+        return areaBuildingMapper.insertAreaBuilding(areaBuilding);
+    }
+
+    /**
+     * 修改建筑基本信息
+     * 
+     * @param areaBuilding 建筑基本信息
+     * @return 结果
+     */
+    @Override
+    public int updateAreaBuilding(AreaBuilding areaBuilding)
+    {
+        return areaBuildingMapper.updateAreaBuilding(areaBuilding);
+    }
+
+    /**
+     * 批量删除建筑基本信息
+     * 
+     * @param ids 需要删除的建筑基本信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAreaBuildingByIds(Long[] ids)
+    {
+        return areaBuildingMapper.deleteAreaBuildingByIds(ids);
+    }
+
+    /**
+     * 删除建筑基本信息信息
+     * 
+     * @param id 建筑基本信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAreaBuildingById(Long id)
+    {
+        return areaBuildingMapper.deleteAreaBuildingById(id);
+    }
+}

+ 93 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/AreaBuildingZoningServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.ems.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.ems.mapper.AreaBuildingZoningMapper;
+import com.ruoyi.ems.domain.AreaBuildingZoning;
+import com.ruoyi.ems.service.IAreaBuildingZoningService;
+
+/**
+ * 建筑区域划分Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+@Service
+public class AreaBuildingZoningServiceImpl implements IAreaBuildingZoningService
+{
+    @Autowired
+    private AreaBuildingZoningMapper areaBuildingZoningMapper;
+
+    /**
+     * 查询建筑区域划分
+     * 
+     * @param id 建筑区域划分主键
+     * @return 建筑区域划分
+     */
+    @Override
+    public AreaBuildingZoning selectAreaBuildingZoningById(Long id)
+    {
+        return areaBuildingZoningMapper.selectAreaBuildingZoningById(id);
+    }
+
+    /**
+     * 查询建筑区域划分列表
+     * 
+     * @param areaBuildingZoning 建筑区域划分
+     * @return 建筑区域划分
+     */
+    @Override
+    public List<AreaBuildingZoning> selectAreaBuildingZoningList(AreaBuildingZoning areaBuildingZoning)
+    {
+        return areaBuildingZoningMapper.selectAreaBuildingZoningList(areaBuildingZoning);
+    }
+
+    /**
+     * 新增建筑区域划分
+     * 
+     * @param areaBuildingZoning 建筑区域划分
+     * @return 结果
+     */
+    @Override
+    public int insertAreaBuildingZoning(AreaBuildingZoning areaBuildingZoning)
+    {
+        return areaBuildingZoningMapper.insertAreaBuildingZoning(areaBuildingZoning);
+    }
+
+    /**
+     * 修改建筑区域划分
+     * 
+     * @param areaBuildingZoning 建筑区域划分
+     * @return 结果
+     */
+    @Override
+    public int updateAreaBuildingZoning(AreaBuildingZoning areaBuildingZoning)
+    {
+        return areaBuildingZoningMapper.updateAreaBuildingZoning(areaBuildingZoning);
+    }
+
+    /**
+     * 批量删除建筑区域划分
+     * 
+     * @param ids 需要删除的建筑区域划分主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAreaBuildingZoningByIds(Long[] ids)
+    {
+        return areaBuildingZoningMapper.deleteAreaBuildingZoningByIds(ids);
+    }
+
+    /**
+     * 删除建筑区域划分信息
+     * 
+     * @param id 建筑区域划分主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAreaBuildingZoningById(Long id)
+    {
+        return areaBuildingZoningMapper.deleteAreaBuildingZoningById(id);
+    }
+}

+ 93 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/AreaServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.ems.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.ems.mapper.AreaMapper;
+import com.ruoyi.ems.domain.Area;
+import com.ruoyi.ems.service.IAreaService;
+
+/**
+ * 服务区Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-07-09
+ */
+@Service
+public class AreaServiceImpl implements IAreaService
+{
+    @Autowired
+    private AreaMapper areaMapper;
+
+    /**
+     * 查询服务区
+     * 
+     * @param id 服务区主键
+     * @return 服务区
+     */
+    @Override
+    public Area selectAreaById(Long id)
+    {
+        return areaMapper.selectAreaById(id);
+    }
+
+    /**
+     * 查询服务区列表
+     * 
+     * @param area 服务区
+     * @return 服务区
+     */
+    @Override
+    public List<Area> selectAreaList(Area area)
+    {
+        return areaMapper.selectAreaList(area);
+    }
+
+    /**
+     * 新增服务区
+     * 
+     * @param area 服务区
+     * @return 结果
+     */
+    @Override
+    public int insertArea(Area area)
+    {
+        return areaMapper.insertArea(area);
+    }
+
+    /**
+     * 修改服务区
+     * 
+     * @param area 服务区
+     * @return 结果
+     */
+    @Override
+    public int updateArea(Area area)
+    {
+        return areaMapper.updateArea(area);
+    }
+
+    /**
+     * 批量删除服务区
+     * 
+     * @param ids 需要删除的服务区主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAreaByIds(Long[] ids)
+    {
+        return areaMapper.deleteAreaByIds(ids);
+    }
+
+    /**
+     * 删除服务区信息
+     * 
+     * @param id 服务区主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAreaById(Long id)
+    {
+        return areaMapper.deleteAreaById(id);
+    }
+}

+ 9 - 6
ems-cloud/ems-modules/ems-server/src/main/resources/bootstrap.yml

@@ -7,23 +7,26 @@ server:
 spring:
   application:
     # 应用名称
-    name: ${APPLICATION_NAME:ems-server}
+    name: ems-server
   profiles:
     # 环境配置
-    active: ${APPLICATION_NAME:local}
+    active: local
   cloud:
     nacos:
       discovery:
         # 服务注册地址
-        server-addr: ${NACOS_SERVER:172.192.10.105:30003}
+        server-addr: 172.192.10.105:30003
         group: ems
+        #server-addr: 172.10.0.71:8848
+        #group: public
       config:
         # 配置中心地址
-        server-addr: ${NACOS_SERVER:172.192.10.105:30003}
+        server-addr: 172.192.10.105:30003
         group: ems
+        #server-addr: 172.10.0.71:8848
+        #group: public
         # 配置文件格式
         file-extension: yml
         # 共享配置
         shared-configs:
-          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
-
+          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

+ 91 - 0
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/AreaBuildingMapper.xml

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.ems.mapper.AreaBuildingMapper">
+    
+    <resultMap type="com.ruoyi.ems.domain.AreaBuilding" id="AreaBuildingResult">
+        <result property="id"    column="id"    />
+        <result property="bldgCode"    column="bldg_code"    />
+        <result property="bldgName"    column="bldg_name"    />
+        <result property="address"    column="address"    />
+        <result property="upBldgFloor"    column="up_bldg_floor"    />
+        <result property="downBldgFloor"    column="down_bldg_floor"    />
+        <result property="bldgHeight"    column="bldg_height"    />
+        <result property="floorArea"    column="floor_area"    />
+        <result property="bldgUsage"    column="bldg_usage"    />
+    </resultMap>
+
+    <sql id="selectAreaBuildingVo">
+        select id, bldg_code, bldg_name, address, up_bldg_floor, down_bldg_floor, bldg_height, floor_area, bldg_usage from adm_area_building
+    </sql>
+
+    <select id="selectAreaBuildingList" parameterType="com.ruoyi.ems.domain.AreaBuilding" resultMap="AreaBuildingResult">
+        <include refid="selectAreaBuildingVo"/>
+        <where>  
+            <if test="bldgCode != null  and bldgCode != ''"> and bldg_code = #{bldgCode}</if>
+            <if test="bldgName != null  and bldgName != ''"> and bldg_name like concat('%', #{bldgName}, '%')</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="upBldgFloor != null "> and up_bldg_floor = #{upBldgFloor}</if>
+            <if test="downBldgFloor != null "> and down_bldg_floor = #{downBldgFloor}</if>
+            <if test="bldgHeight != null "> and bldg_height = #{bldgHeight}</if>
+            <if test="floorArea != null "> and floor_area = #{floorArea}</if>
+            <if test="bldgUsage != null  and bldgUsage != ''"> and bldg_usage = #{bldgUsage}</if>
+        </where>
+    </select>
+    
+    <select id="selectAreaBuildingById" parameterType="Long" resultMap="AreaBuildingResult">
+        <include refid="selectAreaBuildingVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertAreaBuilding" parameterType="com.ruoyi.ems.domain.AreaBuilding" useGeneratedKeys="true" keyProperty="id">
+        insert into adm_area_building
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="bldgCode != null and bldgCode != ''">bldg_code,</if>
+            <if test="bldgName != null and bldgName != ''">bldg_name,</if>
+            <if test="address != null">address,</if>
+            <if test="upBldgFloor != null">up_bldg_floor,</if>
+            <if test="downBldgFloor != null">down_bldg_floor,</if>
+            <if test="bldgHeight != null">bldg_height,</if>
+            <if test="floorArea != null">floor_area,</if>
+            <if test="bldgUsage != null">bldg_usage,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="bldgCode != null and bldgCode != ''">#{bldgCode},</if>
+            <if test="bldgName != null and bldgName != ''">#{bldgName},</if>
+            <if test="address != null">#{address},</if>
+            <if test="upBldgFloor != null">#{upBldgFloor},</if>
+            <if test="downBldgFloor != null">#{downBldgFloor},</if>
+            <if test="bldgHeight != null">#{bldgHeight},</if>
+            <if test="floorArea != null">#{floorArea},</if>
+            <if test="bldgUsage != null">#{bldgUsage},</if>
+         </trim>
+    </insert>
+
+    <update id="updateAreaBuilding" parameterType="com.ruoyi.ems.domain.AreaBuilding">
+        update adm_area_building
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="bldgCode != null and bldgCode != ''">bldg_code = #{bldgCode},</if>
+            <if test="bldgName != null and bldgName != ''">bldg_name = #{bldgName},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="upBldgFloor != null">up_bldg_floor = #{upBldgFloor},</if>
+            <if test="downBldgFloor != null">down_bldg_floor = #{downBldgFloor},</if>
+            <if test="bldgHeight != null">bldg_height = #{bldgHeight},</if>
+            <if test="floorArea != null">floor_area = #{floorArea},</if>
+            <if test="bldgUsage != null">bldg_usage = #{bldgUsage},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteAreaBuildingById" parameterType="Long">
+        delete from adm_area_building where id = #{id}
+    </delete>
+
+    <delete id="deleteAreaBuildingByIds" parameterType="String">
+        delete from adm_area_building where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 86 - 0
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/AreaBuildingZoningMapper.xml

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.ems.mapper.AreaBuildingZoningMapper">
+    
+    <resultMap type="com.ruoyi.ems.domain.AreaBuildingZoning" id="AreaBuildingZoningResult">
+        <result property="id"    column="id"    />
+        <result property="bldgCode"    column="bldg_code"    />
+        <result property="divisionCode"    column="division_code"    />
+        <result property="divisionName"    column="division_name"    />
+        <result property="floor"    column="floor"    />
+        <result property="roomNo"    column="room_no"    />
+        <result property="bldgLdArea"    column="bldg_ld_area"    />
+        <result property="usageDetail"    column="usage_detail"    />
+    </resultMap>
+
+    <sql id="selectAreaBuildingZoningVo">
+        select id, bldg_code, division_code, division_name, floor, room_no, bldg_ld_area, usage_detail from adm_area_building_zoning
+    </sql>
+
+    <select id="selectAreaBuildingZoningList" parameterType="com.ruoyi.ems.domain.AreaBuildingZoning" resultMap="AreaBuildingZoningResult">
+        <include refid="selectAreaBuildingZoningVo"/>
+        <where>  
+            <if test="bldgCode != null  and bldgCode != ''"> and bldg_code = #{bldgCode}</if>
+            <if test="divisionCode != null  and divisionCode != ''"> and division_code = #{divisionCode}</if>
+            <if test="divisionName != null  and divisionName != ''"> and division_name like concat('%', #{divisionName}, '%')</if>
+            <if test="floor != null "> and floor = #{floor}</if>
+            <if test="roomNo != null  and roomNo != ''"> and room_no = #{roomNo}</if>
+            <if test="bldgLdArea != null "> and bldg_ld_area = #{bldgLdArea}</if>
+            <if test="usageDetail != null  and usageDetail != ''"> and usage_detail = #{usageDetail}</if>
+        </where>
+    </select>
+    
+    <select id="selectAreaBuildingZoningById" parameterType="Long" resultMap="AreaBuildingZoningResult">
+        <include refid="selectAreaBuildingZoningVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertAreaBuildingZoning" parameterType="com.ruoyi.ems.domain.AreaBuildingZoning" useGeneratedKeys="true" keyProperty="id">
+        insert into adm_area_building_zoning
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="bldgCode != null and bldgCode != ''">bldg_code,</if>
+            <if test="divisionCode != null and divisionCode != ''">division_code,</if>
+            <if test="divisionName != null and divisionName != ''">division_name,</if>
+            <if test="floor != null">floor,</if>
+            <if test="roomNo != null">room_no,</if>
+            <if test="bldgLdArea != null">bldg_ld_area,</if>
+            <if test="usageDetail != null">usage_detail,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="bldgCode != null and bldgCode != ''">#{bldgCode},</if>
+            <if test="divisionCode != null and divisionCode != ''">#{divisionCode},</if>
+            <if test="divisionName != null and divisionName != ''">#{divisionName},</if>
+            <if test="floor != null">#{floor},</if>
+            <if test="roomNo != null">#{roomNo},</if>
+            <if test="bldgLdArea != null">#{bldgLdArea},</if>
+            <if test="usageDetail != null">#{usageDetail},</if>
+         </trim>
+    </insert>
+
+    <update id="updateAreaBuildingZoning" parameterType="com.ruoyi.ems.domain.AreaBuildingZoning">
+        update adm_area_building_zoning
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="bldgCode != null and bldgCode != ''">bldg_code = #{bldgCode},</if>
+            <if test="divisionCode != null and divisionCode != ''">division_code = #{divisionCode},</if>
+            <if test="divisionName != null and divisionName != ''">division_name = #{divisionName},</if>
+            <if test="floor != null">floor = #{floor},</if>
+            <if test="roomNo != null">room_no = #{roomNo},</if>
+            <if test="bldgLdArea != null">bldg_ld_area = #{bldgLdArea},</if>
+            <if test="usageDetail != null">usage_detail = #{usageDetail},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteAreaBuildingZoningById" parameterType="Long">
+        delete from adm_area_building_zoning where id = #{id}
+    </delete>
+
+    <delete id="deleteAreaBuildingZoningByIds" parameterType="String">
+        delete from adm_area_building_zoning where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 121 - 0
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/AreaMapper.xml

@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.ems.mapper.AreaMapper">
+    
+    <resultMap type="com.ruoyi.ems.domain.Area" id="AdmServiceAreaResult">
+        <result property="id"    column="id"    />
+        <result property="areaCode"    column="area_code"    />
+        <result property="areaName"    column="area_name"    />
+        <result property="serviceStar"    column="service_star"    />
+        <result property="city"    column="city"    />
+        <result property="highway"    column="highway"    />
+        <result property="direction"    column="direction"    />
+        <result property="address"    column="address"    />
+        <result property="attrOrg"    column="attr_org"    />
+        <result property="mgrOrg"    column="mgr_org"    />
+        <result property="openDate"    column="open_date"    />
+        <result property="landArea"    column="land_area"    />
+        <result property="floorArea"    column="floor_area"    />
+        <result property="longitude"    column="longitude"    />
+        <result property="latitude"    column="latitude"    />
+    </resultMap>
+
+    <sql id="selectAreaVo">
+        select id, area_code, area_name, service_star, city, highway, direction, address, attr_org, mgr_org, open_date, land_area, floor_area, longitude, latitude from adm_service_area
+    </sql>
+
+    <select id="selectAreaList" parameterType="com.ruoyi.ems.domain.Area" resultMap="AdmServiceAreaResult">
+        <include refid="selectAreaVo"/>
+        <where>  
+            <if test="areaCode != null  and areaCode != ''"> and area_code = #{areaCode}</if>
+            <if test="areaName != null  and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
+            <if test="serviceStar != null "> and service_star = #{serviceStar}</if>
+            <if test="city != null  and city != ''"> and city = #{city}</if>
+            <if test="highway != null  and highway != ''"> and highway = #{highway}</if>
+            <if test="direction != null  and direction != ''"> and direction = #{direction}</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="attrOrg != null  and attrOrg != ''"> and attr_org = #{attrOrg}</if>
+            <if test="mgrOrg != null  and mgrOrg != ''"> and mgr_org = #{mgrOrg}</if>
+            <if test="openDate != null "> and open_date = #{openDate}</if>
+            <if test="landArea != null "> and land_area = #{landArea}</if>
+            <if test="floorArea != null "> and floor_area = #{floorArea}</if>
+            <if test="longitude != null "> and longitude = #{longitude}</if>
+            <if test="latitude != null "> and latitude = #{latitude}</if>
+        </where>
+    </select>
+    
+    <select id="selectAreaById" parameterType="Long" resultMap="AdmServiceAreaResult">
+        <include refid="selectAreaVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertArea" parameterType="com.ruoyi.ems.domain.Area" useGeneratedKeys="true" keyProperty="id">
+        insert into adm_service_area
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="areaCode != null and areaCode != ''">area_code,</if>
+            <if test="areaName != null and areaName != ''">area_name,</if>
+            <if test="serviceStar != null">service_star,</if>
+            <if test="city != null">city,</if>
+            <if test="highway != null">highway,</if>
+            <if test="direction != null">direction,</if>
+            <if test="address != null">address,</if>
+            <if test="attrOrg != null">attr_org,</if>
+            <if test="mgrOrg != null">mgr_org,</if>
+            <if test="openDate != null">open_date,</if>
+            <if test="landArea != null">land_area,</if>
+            <if test="floorArea != null">floor_area,</if>
+            <if test="longitude != null">longitude,</if>
+            <if test="latitude != null">latitude,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="areaCode != null and areaCode != ''">#{areaCode},</if>
+            <if test="areaName != null and areaName != ''">#{areaName},</if>
+            <if test="serviceStar != null">#{serviceStar},</if>
+            <if test="city != null">#{city},</if>
+            <if test="highway != null">#{highway},</if>
+            <if test="direction != null">#{direction},</if>
+            <if test="address != null">#{address},</if>
+            <if test="attrOrg != null">#{attrOrg},</if>
+            <if test="mgrOrg != null">#{mgrOrg},</if>
+            <if test="openDate != null">#{openDate},</if>
+            <if test="landArea != null">#{landArea},</if>
+            <if test="floorArea != null">#{floorArea},</if>
+            <if test="longitude != null">#{longitude},</if>
+            <if test="latitude != null">#{latitude},</if>
+         </trim>
+    </insert>
+
+    <update id="updateArea" parameterType="com.ruoyi.ems.domain.Area">
+        update adm_service_area
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="areaCode != null and areaCode != ''">area_code = #{areaCode},</if>
+            <if test="areaName != null and areaName != ''">area_name = #{areaName},</if>
+            <if test="serviceStar != null">service_star = #{serviceStar},</if>
+            <if test="city != null">city = #{city},</if>
+            <if test="highway != null">highway = #{highway},</if>
+            <if test="direction != null">direction = #{direction},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="attrOrg != null">attr_org = #{attrOrg},</if>
+            <if test="mgrOrg != null">mgr_org = #{mgrOrg},</if>
+            <if test="openDate != null">open_date = #{openDate},</if>
+            <if test="landArea != null">land_area = #{landArea},</if>
+            <if test="floorArea != null">floor_area = #{floorArea},</if>
+            <if test="longitude != null">longitude = #{longitude},</if>
+            <if test="latitude != null">latitude = #{latitude},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteAreaById" parameterType="Long">
+        delete from adm_service_area where id = #{id}
+    </delete>
+
+    <delete id="deleteAreaByIds" parameterType="String">
+        delete from adm_service_area where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 10 - 8
ems-cloud/ems-modules/ruoyi-gen/src/main/resources/bootstrap.yml

@@ -1,6 +1,6 @@
 # Tomcat
 server:
-  port: 9202
+  port: 9900
 # Spring
 spring:
   application:
@@ -8,19 +8,21 @@ spring:
     name: ruoyi-gen
   profiles:
     # 环境配置
-    active: demo
+    active: local
   cloud:
     nacos:
       discovery:
         # 服务注册地址
-        #server-addr: 172.192.10.105:30003
-        server-addr: 172.10.0.71:8848
-        group: public
+        server-addr: 172.192.10.105:30003
+        group: ems
+        #server-addr: 172.10.0.71:8848
+        #group: public
       config:
         # 配置中心地址
-        #server-addr: 172.192.10.105:30003
-        server-addr: 172.10.0.71:8848
-        group: public
+        server-addr: 172.192.10.105:30003
+        group: ems
+        #server-addr: 172.10.0.71:8848
+        #group: public
         # 配置文件格式
         file-extension: yml
         # 共享配置

+ 1 - 6
ems-cloud/ruoyi-gateway/src/main/resources/application-local.yml

@@ -31,14 +31,9 @@ spring:
         - id: ems-server
           uri: lb://ems-server
           predicates:
-            - Path=/nrg/**
+            - Path=/ems/**
           filters:
             - StripPrefix=0
-        # Ali任务执行器
-        - id: executer-ali-collect
-          uri: lb://executer-ali-collect
-          predicates:
-            - Path=/job-ali-col/**
         # 定时任务
         - id: ruoyi-job
           uri: lb://ruoyi-job

+ 30 - 30
ems-cloud/sql/ems_server.sql

@@ -313,7 +313,7 @@ create table adm_service_area (
   `direction`      varchar(32)     default null               comment '方向',
   `address`        varchar(64)     default null               comment '地址',
   `attr_org`       varchar(32)     default null               comment '所有单位',
-  `mgr_org`        varchar(32)     default null               comment '所有单位',
+  `mgr_org`        varchar(32)     default null               comment '管理单位',
   `open_date`      date            default null               comment '开业时间',
   `land_area`      double          default null               comment '占地面积(亩)',
   `floor_area`     double          default null               comment '建筑面积(平方米)',
@@ -330,8 +330,8 @@ INSERT INTO `adm_service_area` (`area_code`, `area_name`, `service_star`, `city`
 -- ----------------------------
 -- 建筑基本信息表
 -- ----------------------------
-drop table if exists adm_structure;
-create table adm_structure (
+drop table if exists adm_area_building;
+create table adm_area_building (
   `id`               bigint(20)      not null auto_increment    comment '序号',
   `bldg_code`        varchar(64)     not null                   comment '建筑编码',
   `bldg_name`        varchar(32)     not null                   comment '建筑名称',
@@ -346,36 +346,36 @@ create table adm_structure (
 ) engine=innodb auto_increment=1 comment = '建筑基本信息表';
 
 -- 建筑区块初始数据
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300101', '综合楼(北区)', '北区中部', 2, 1, 13.7, 4700, '一层提供商业、餐饮、卫生间、开水服务,二层为办公区、会议区');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300102', '配电泵房(北区)', '北区西北角', 1, 0, null, 300, '配电设施,水泵设施工作区');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300103', '维修间&货车之家(北区)', '北区东侧', 2, 0, null, 300, '提供车辆维修服务');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300104', '加油站(北区)', '北区西南角', 1, 0, null, 200, '提供加油服务');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300105', '警务站(北区)', '北区东北角', 1, 0, null, 70, '警务办公场地');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300106', '小客停车位(北区)', '北区前广场', 1, 0, null, null, '小客车停车位');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300107', '充电车位(北区)', '北区前广场', 1, 0, null, null, '充电停车位');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300108', '无障碍车位(北区)', '北区前广场', 1, 0, null, null, '无障碍车位');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300109', '大客车停车位(北区)', '北区后广场', 1, 0, null, null, '大客车车位');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300110', '货车车位(北区)', '北区后广场', 1, 0, null, null, '货车车位');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300111', '危险品车位(北区)', '北区后广场', 1, 0, null, null, '危险品车位');
-
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300201', '综合楼(南区)', '南区中部', 2, 1, 14.2, 4788.2, '一层提供商业、餐饮、卫生间、开水服务,二层为员工餐厅、展厅');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300202', '配电泵房(南区)', '南区东南角', 1, 0, null, 300, '配电设施,水泵设施工作区');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300203', '维修间&货车之家(南区)', '南区西侧', 2, 0, null, 300, '提供车辆维修服务');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300204', '加油站(南区)', '南区东北角', 1, 0, null, 200, '提供加油服务');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300205', '宿舍楼(南区)', '南区西南角', 2, 0, null, 920, '提供员工住宿服务');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300206', '小客停车位(南区)', '南区前广场', 1, 0, null, null, '小客车停车位');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300207', '充电车位(南区)', '南区前广场', 1, 0, null, null, '充电停车位');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300208', '无障碍车位(南区)', '南区前广场', 1, 0, null, null, '无障碍车位');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300209', '大客车停车位(南区)', '南区后广场', 1, 0, null, null, '大客车车位');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300210', '货车车位(南区)', '南区后广场', 1, 0, null, null, '货车车位');
-INSERT INTO `adm_structure` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300211', '危险品车位(南区)', '南区后广场', 1, 0, null, null, '危险品车位');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300101', '综合楼(北区)', '北区中部', 2, 1, 13.7, 4700, '一层提供商业、餐饮、卫生间、开水服务,二层为办公区、会议区');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300102', '配电泵房(北区)', '北区西北角', 1, 0, null, 300, '配电设施,水泵设施工作区');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300103', '维修间&货车之家(北区)', '北区东侧', 2, 0, null, 300, '提供车辆维修服务');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300104', '加油站(北区)', '北区西南角', 1, 0, null, 200, '提供加油服务');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300105', '警务站(北区)', '北区东北角', 1, 0, null, 70, '警务办公场地');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300106', '小客停车位(北区)', '北区前广场', 1, 0, null, null, '小客车停车位');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300107', '充电车位(北区)', '北区前广场', 1, 0, null, null, '充电停车位');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300108', '无障碍车位(北区)', '北区前广场', 1, 0, null, null, '无障碍车位');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300109', '大客车停车位(北区)', '北区后广场', 1, 0, null, null, '大客车车位');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300110', '货车车位(北区)', '北区后广场', 1, 0, null, null, '货车车位');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300111', '危险品车位(北区)', '北区后广场', 1, 0, null, null, '危险品车位');
+
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300201', '综合楼(南区)', '南区中部', 2, 1, 14.2, 4788.2, '一层提供商业、餐饮、卫生间、开水服务,二层为员工餐厅、展厅');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300202', '配电泵房(南区)', '南区东南角', 1, 0, null, 300, '配电设施,水泵设施工作区');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300203', '维修间&货车之家(南区)', '南区西侧', 2, 0, null, 300, '提供车辆维修服务');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300204', '加油站(南区)', '南区东北角', 1, 0, null, 200, '提供加油服务');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300205', '宿舍楼(南区)', '南区西南角', 2, 0, null, 920, '提供员工住宿服务');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300206', '小客停车位(南区)', '南区前广场', 1, 0, null, null, '小客车停车位');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300207', '充电车位(南区)', '南区前广场', 1, 0, null, null, '充电停车位');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300208', '无障碍车位(南区)', '南区前广场', 1, 0, null, null, '无障碍车位');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300209', '大客车停车位(南区)', '南区后广场', 1, 0, null, null, '大客车车位');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300210', '货车车位(南区)', '南区后广场', 1, 0, null, null, '货车车位');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`) VALUES ('321283124S300211', '危险品车位(南区)', '南区后广场', 1, 0, null, null, '危险品车位');
 
 
 -- ----------------------------
 -- 建筑划分表
 -- ----------------------------
-drop table if exists adm_structure_division;
-create table adm_structure_division (
+drop table if exists adm_area_building_zoning;
+create table adm_area_building_zoning (
   `id`               bigint(20)      not null auto_increment    comment '序号',
   `bldg_code`        varchar(64)     not null                   comment '建筑编码',
   `division_code`    varchar(64)     not null                   comment '分区编码',
@@ -386,7 +386,7 @@ create table adm_structure_division (
   `usage_detail`     varchar(200)    default null               comment '使用详情',
   primary key (`id`),
     unique key ux_structure_division_code(`bldg_code`, `division_code`)
-) engine=innodb auto_increment=1 comment = '建筑划分表';
+) engine=innodb auto_increment=1 comment = '建筑区域划分表';
 
 -- ----------------------------
 -- 能源设施/系统表
@@ -652,7 +652,7 @@ create table adm_ems_pg_supply_h (
   `date`               date            not null                     comment '日期 yyyy-MM-dd',
   `time`               time            not null                     comment '时间 HH:mm:ss',
   `time_index`         int             not null                     comment '时间序列',
-  `meter_type`         int             default null                 comment '计量类型 1:峰电计量  2:谷电计量',
+  `meter_type`         int             default null                 comment '计量类型 0:不区分 1:峰电计量  2:谷电计量',
   `meter_unit_price`   double          default null                 comment '单位电价(1度电)',
   `use_elec_reading`   double          default null                 comment '用电读数',
   `use_elec_quantity`  double          default null                 comment '用电量 单位:kW-h(千瓦时)',

+ 35 - 10
ems-cloud/sql/ems_sys.sql

@@ -193,9 +193,9 @@ insert into sys_menu values ('119',  '设备接入',       '7',    '3',  'device
 insert into sys_menu values ('120',  '设备状态',       '7',    '4',  'device-status',      'device/status',          '', 1, 0, 'C', '0', '0',   'device:status',          'devicestatus',   'admin', sysdate(), '', null, '设备状态');
 insert into sys_menu values ('121',  '巡检任务',       '8',    '1',  'oper-task',          'oper-mgr/task',          '', 1, 0, 'C', '0', '0',   'oper-mgr:task',          'task',           'admin', sysdate(), '', null, '巡检任务');
 insert into sys_menu values ('122',  '巡检报告',       '8',    '2',  'oper-report',        'oper-mgr/report',        '', 1, 0, 'C', '0', '0',   'oper-mgr:report',        'note',           'admin', sysdate(), '', null, '巡检报告');
-insert into sys_menu values ('123',  '建筑区块',       '9',    '1',  'buildingcfg',        'param/building',         '', 1, 0, 'M', '0', '0',   'system:user:list',       'building',       'admin', sysdate(), '', null, '用户管理菜单');
-insert into sys_menu values ('124',  '设备设施',       '9',    '2',  'devicecfg',          'param/device',           '', 1, 0, 'M', '0', '0',   'system:user:list',       'devicemgr',      'admin', sysdate(), '', null, '用户管理菜单');
-insert into sys_menu values ('125',  '能源计量',       '9',    '3',  'energycfg',          'param/energy',           '', 1, 0, 'M', '0', '0',   'system:user:list',       'energy',         'admin', sysdate(), '', null, '用户管理菜单');
+insert into sys_menu values ('123',  '建筑区块',       '9',    '1',  'buildingcfg',        '',                       '', 1, 0, 'M', '0', '0',   'basecfg:building',       'building',       'admin', sysdate(), '', null, '用户管理菜单');
+insert into sys_menu values ('124',  '设备设施',       '9',    '2',  'devicecfg',          '',                       '', 1, 0, 'M', '0', '0',   'basecfg:device',         'devicemgr',      'admin', sysdate(), '', null, '用户管理菜单');
+insert into sys_menu values ('125',  '能源计量',       '9',    '3',  'energycfg',          '',                       '', 1, 0, 'M', '0', '0',   'basecfg:energy',         'energy',         'admin', sysdate(), '', null, '用户管理菜单');
 insert into sys_menu values ('190',  '用户管理',       '10',   '1',  'user',               'system/user/index',      '', 1, 0, 'C', '0', '0',   'system:user:list',       'user',           'admin', sysdate(), '', null, '用户管理菜单');
 insert into sys_menu values ('191',  '角色管理',       '10',   '2',  'role',               'system/role/index',      '', 1, 0, 'C', '0', '0',   'system:role:list',       'peoples',        'admin', sysdate(), '', null, '角色管理菜单');
 insert into sys_menu values ('192',  '菜单管理',       '10',   '3',  'menu',               'system/menu/index',      '', 1, 0, 'C', '0', '0',   'system:menu:list',       'tree-table',     'admin', sysdate(), '', null, '菜单管理菜单');
@@ -222,13 +222,14 @@ insert into sys_menu values ('530',  '产能报表', '111', '1',  'statement-pro
 insert into sys_menu values ('531',  '用能报表', '111', '2',  'statement-consume', 'analysis/statement/consume', '', 1, 0, 'C', '0', '0',    'analysis:statement:consume',   'energyconsume',  'admin', sysdate(), '', null, '用能报表');
 insert into sys_menu values ('532',  '告警报表', '111', '3',  'statement-warn',    'analysis/statement/warn',    '', 1, 0, 'C', '0', '0',    'analysis:statement:warn',      'warn',     'admin', sysdate(), '', null, '告警报表');
 insert into sys_menu values ('533',  '自定义报表', '111', '4',  'statement-warn',  'analysis/statement/custom',   '', 1, 0, 'C', '0', '0',   'analysis:statement:custom',    'statement-zdy',   'admin', sysdate(), '', null, '自定义报表');
-insert into sys_menu values ('534',  '服务区配置', '123', '1',  'param-area',      'param/building/areacfg',      '', 1, 0, 'C', '0', '0',   'param:config:area',            'cfgwrite',   'admin', sysdate(), '', null, '自定义报表');
-insert into sys_menu values ('535',  '建筑配置',   '123', '2',  'param-building',  'param/building/cfg',          '', 1, 0, 'C', '0', '0',   'param:config:building',        'cfgwrite',   'admin', sysdate(), '', null, '自定义报表');
-insert into sys_menu values ('536',  '区块配置',   '123', '3',  'param-bunit',     'param/building/unitcfg',      '', 1, 0, 'C', '0', '0',   'param:config:unit',            'cfgwrite',   'admin', sysdate(), '', null, '自定义报表');
-insert into sys_menu values ('537',  '设施配置',   '124', '1',  'param-facscfg',   'param/device/facscfg',        '', 1, 0, 'C', '0', '0',   'param:config:facs',            'cfgwrite',   'admin', sysdate(), '', null, '自定义报表');
-insert into sys_menu values ('538',  '设备配置',   '124', '2',  'param-devccfg',   'param/device/cfg',            '', 1, 0, 'C', '0', '0',   'param:config:device',          'cfgwrite',   'admin', sysdate(), '', null, '自定义报表');
-insert into sys_menu values ('539',  '电价配置',   '125', '1',  'param-electrovalency',  'param/energy/electrovalency',   '', 1, 0, 'C', '0', '0',   'param:config:electrovalency',        'cfgwrite',   'admin', sysdate(), '', null, '自定义报表');
-insert into sys_menu values ('540',  '碳核算配置', '125', '2',  'param-cacfg',      'param/energy/cacfg',         '', 1, 0, 'C', '0', '0',   'param:config:ca',              'cfgwrite',           'admin', sysdate(), '', null, '核算配置');
+-- 业务配置菜单
+insert into sys_menu values ('534',  '服务区',     '123', '1',  'basecfg-servicearea',    'basecfg/area/index',             '', 1, 0, 'C', '0', '0',   'basecfg:area:list',           'cfgwrite',   'admin', sysdate(), '', null, '服务区配置');
+insert into sys_menu values ('535',  '建筑配置',   '123', '2',  'basecfg-building',       'basecfg/building/index',         '', 1, 0, 'C', '0', '0',   'basecfg:building:list',        'cfgwrite',   'admin', sysdate(), '', null, '楼宇建筑配置');
+insert into sys_menu values ('536',  '区块配置',   '123', '3',  'basecfg-zoning',         'basecfg/zoning/index',           '', 1, 0, 'C', '0', '0',   'basecfg:zoning:list',          'cfgwrite',   'admin', sysdate(), '', null, '区块配置');
+insert into sys_menu values ('537',  '设施配置',   '124', '1',  'basecfg-facscfg',        'basecfg/facs/index',             '', 1, 0, 'C', '0', '0',   'basecfg:facs:list',            'cfgwrite',   'admin', sysdate(), '', null, '设施配置');
+insert into sys_menu values ('538',  '设备配置',   '124', '2',  'basecfg-devccfg',        'basecfg/device/index',           '', 1, 0, 'C', '0', '0',   'basecfg:device:list',          'cfgwrite',   'admin', sysdate(), '', null, '自定义报表');
+insert into sys_menu values ('539',  '电价配置',   '125', '1',  'basecfg-electrovalency', 'basecfg/electrovalency/index',   '', 1, 0, 'C', '0', '0',   'basecfg:electrovalency:list',  'cfgwrite',   'admin', sysdate(), '', null, '自定义报表');
+insert into sys_menu values ('540',  '碳核算配置', '125', '2',  'basecfg-carbon',          'basecfg/carbon/index',          '', 1, 0, 'C', '0', '0',   'basecfg:carbon:list',           'cfgwrite',   'admin', sysdate(), '', null, '核算配置');
 
 -- 用户管理按钮
 insert into sys_menu values ('1000', '用户查询', '190', '1',  '', '', '', 1, 0, 'F', '0', '0', 'system:user:query',          '#', 'admin', sysdate(), '', null, '');
@@ -290,6 +291,22 @@ insert into sys_menu values ('1045', '账户解锁', '501', '4', '#', '', '', 1,
 insert into sys_menu values ('1046', '在线查询', '129', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query',       '#', 'admin', sysdate(), '', null, '');
 insert into sys_menu values ('1047', '批量强退', '129', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', sysdate(), '', null, '');
 insert into sys_menu values ('1048', '单条强退', '129', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', sysdate(), '', null, '');
+-- 服务区配置按钮
+insert into sys_menu values ('1049', '服务区新增', '534', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:add',   '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('1050', '服务区修改', '534', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:edit',  '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('1051', '服务区删除', '534', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:remove','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('1052', '服务区导出', '534', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:export','#', 'admin', sysdate(), '', null, '');
+-- 服务区建筑配置按钮
+insert into sys_menu values ('1053', '建筑新增', '535', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:add',   '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('1054', '建筑修改', '535', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:edit',  '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('1055', '建筑删除', '535', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:remove','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('1056', '建筑导出', '535', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:export','#', 'admin', sysdate(), '', null, '');
+-- 服务区建筑区块配置按钮
+insert into sys_menu values ('1057', '区块新增', '536', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:add',   '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('1058', '区块修改', '536', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:edit',  '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('1059', '区块删除', '536', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:remove','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('1060', '区块导出', '536', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:export','#', 'admin', sysdate(), '', null, '');
+
 
 -- ----------------------------
 -- 6、用户和角色关联表  用户N-1角色
@@ -438,6 +455,14 @@ insert into sys_role_menu values ('2', '1045');
 insert into sys_role_menu values ('2', '1046');
 insert into sys_role_menu values ('2', '1047');
 insert into sys_role_menu values ('2', '1048');
+insert into sys_role_menu values ('2', '1049');
+insert into sys_role_menu values ('2', '1050');
+insert into sys_role_menu values ('2', '1051');
+insert into sys_role_menu values ('2', '1052');
+insert into sys_role_menu values ('2', '1053');
+insert into sys_role_menu values ('2', '1054');
+insert into sys_role_menu values ('2', '1055');
+insert into sys_role_menu values ('2', '1056');
 
 -- ----------------------------
 -- 8、角色和部门关联表  角色1-N部门