Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	ems-cloud/sql/ems_sys.sql
chen.cheng 11 сар өмнө
parent
commit
d37da63908
21 өөрчлөгдсөн 1757 нэмэгдсэн , 565 устгасан
  1. 108 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/AdmEmsDeviceRbookController.java
  2. 1 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/EmsTagController.java
  3. 71 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/MeterReadingManualController.java
  4. 151 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/AdmEmsDeviceRbook.java
  5. 38 48
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/CoChargingConfig.java
  6. 1 1
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/CoChargingConfigRel.java
  7. 13 1
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/MeterDevice.java
  8. 169 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/MeterReadingManual.java
  9. 77 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/vo/QueryMeterReading.java
  10. 61 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/AdmEmsDeviceRbookMapper.java
  11. 56 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/MeterReadingManualMapper.java
  12. 61 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IAdmEmsDeviceRbookService.java
  13. 56 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IMeterReadingManualService.java
  14. 96 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/AdmEmsDeviceRbookServiceImpl.java
  15. 47 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/MeterReadingManualServiceImpl.java
  16. 99 0
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/AdmEmsDeviceRbookMapper.xml
  17. 5 2
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/MeterDeviceMapper.xml
  18. 88 0
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/MeterReadingManualMapper.xml
  19. 240 0
      ems-cloud/sql/ems_init_data.sql
  20. 58 195
      ems-cloud/sql/ems_server.sql
  21. 261 318
      ems-cloud/sql/ems_sys.sql

+ 108 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/AdmEmsDeviceRbookController.java

@@ -0,0 +1,108 @@
+package com.ruoyi.ems.controller;
+
+import java.util.List;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+
+import io.swagger.annotations.Api;
+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.AdmEmsDeviceRbook;
+import com.ruoyi.ems.service.IAdmEmsDeviceRbookService;
+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-08-26
+ */
+@RestController
+@RequestMapping("/device/rbook")
+@Api(value = "AdmEmsDeviceRbookController", description = "设备台账")
+public class AdmEmsDeviceRbookController extends BaseController
+{
+    @Autowired
+    private IAdmEmsDeviceRbookService emsDeviceRbookService;
+
+    /**
+     * 查询设备台账列表
+     */
+    //@RequiresPermissions("ems:rbook:list")
+    @GetMapping("/list")
+    public TableDataInfo list(AdmEmsDeviceRbook admEmsDeviceRbook)
+    {
+        startPage();
+        List<AdmEmsDeviceRbook> list = emsDeviceRbookService.selectAdmEmsDeviceRbookList(admEmsDeviceRbook);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出设备台账列表
+     */
+    @RequiresPermissions("ems:rbook:export")
+    @Log(title = "设备台账", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, AdmEmsDeviceRbook admEmsDeviceRbook)
+    {
+        List<AdmEmsDeviceRbook> list = emsDeviceRbookService.selectAdmEmsDeviceRbookList(admEmsDeviceRbook);
+        ExcelUtil<AdmEmsDeviceRbook> util = new ExcelUtil<AdmEmsDeviceRbook>(AdmEmsDeviceRbook.class);
+        util.exportExcel(response, list, "设备台账数据");
+    }
+
+    /**
+     * 获取设备台账详细信息
+     */
+    @RequiresPermissions("ems:rbook:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(emsDeviceRbookService.selectAdmEmsDeviceRbookById(id));
+    }
+
+    /**
+     * 新增设备台账
+     */
+    @RequiresPermissions("ems:rbook:add")
+    @Log(title = "设备台账", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody AdmEmsDeviceRbook admEmsDeviceRbook)
+    {
+        return toAjax(emsDeviceRbookService.insertAdmEmsDeviceRbook(admEmsDeviceRbook));
+    }
+
+    /**
+     * 修改设备台账
+     */
+    @RequiresPermissions("ems:rbook:edit")
+    @Log(title = "设备台账", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody AdmEmsDeviceRbook admEmsDeviceRbook)
+    {
+        return toAjax(emsDeviceRbookService.updateAdmEmsDeviceRbook(admEmsDeviceRbook));
+    }
+
+    /**
+     * 删除设备台账
+     */
+    @RequiresPermissions("ems:rbook:remove")
+    @Log(title = "设备台账", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(emsDeviceRbookService.deleteAdmEmsDeviceRbookByIds(ids));
+    }
+}

+ 1 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/EmsTagController.java

@@ -91,6 +91,7 @@ public class EmsTagController extends BaseController
     @PutMapping
     public AjaxResult edit(@RequestBody EmsTag dimEmsTag)
     {
+
         return toAjax(emsTagService.updateEmsTag(dimEmsTag));
     }
 

+ 71 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/MeterReadingManualController.java

@@ -0,0 +1,71 @@
+package com.ruoyi.ems.controller;
+
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+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.MeterReadingManual;
+import com.ruoyi.ems.domain.vo.QueryMeterReading;
+import com.ruoyi.ems.service.IMeterReadingManualService;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 手动抄记录Controller
+ *
+ * @author ruoyi
+ * @date 2024-08-28
+ */
+@RestController
+@RequestMapping("/meterReading")
+public class MeterReadingManualController extends BaseController {
+    @Autowired
+    private IMeterReadingManualService meterReadingManualService;
+
+    /**
+     * 查询手动抄记录列表
+     */
+    @GetMapping("/listByParam")
+    public AjaxResult listByParam(QueryMeterReading queryMeterReading) {
+        List<MeterReadingManual> list = meterReadingManualService.selectList(queryMeterReading);
+        return success(list);
+    }
+
+    /**
+     * 获取设备最后一条抄表记录
+     */
+    @GetMapping(value = "/getLastRecord")
+    public AjaxResult getLastRecord(@RequestParam(name = "areaCode") String areaCode,
+        @RequestParam(name = "deviceCode") String deviceCode) {
+        return success(meterReadingManualService.selectLastItem(areaCode, deviceCode));
+    }
+
+    /**
+     * 新增手动抄记录
+     */
+    @RequiresPermissions("ems:meterReading:add")
+    @Log(title = "手动抄记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody MeterReadingManual meterReadingManual) {
+        return toAjax(meterReadingManualService.insert(meterReadingManual));
+    }
+
+    /**
+     * 修改手动抄记录
+     */
+    @RequiresPermissions("ems:meterReading:edit")
+    @Log(title = "手动抄记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody MeterReadingManual meterReadingManual) {
+        return toAjax(meterReadingManualService.update(meterReadingManual));
+    }
+}

+ 151 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/AdmEmsDeviceRbook.java

@@ -0,0 +1,151 @@
+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_ems_device_rbook
+ * 
+ * @author ruoyi
+ * @date 2024-08-26
+ */
+public class AdmEmsDeviceRbook extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 序号 */
+    private Long id;
+
+    /** 记录编号 */
+    @Excel(name = "记录编号")
+    private String recordCode;
+
+    /** 对象类型 1:设施 2:设备 */
+    @Excel(name = "对象类型 1:设施 2:设备")
+    private Long objType;
+
+    /** 对象代码 */
+    @Excel(name = "对象代码")
+    private String objCode;
+
+    /** 对象名称 */
+    @Excel(name = "对象名称")
+    private String objName;
+
+    /** 安装位置 */
+    @Excel(name = "安装位置")
+    private String insLocation;
+
+    /** 维护标题 */
+    @Excel(name = "维护标题")
+    private String maintainTitle;
+
+    /** 维护内容 */
+    @Excel(name = "维护内容")
+    private String maintainContent;
+
+    /** 维护人 */
+    @Excel(name = "维护人")
+    private String maintainPerson;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setRecordCode(String recordCode) 
+    {
+        this.recordCode = recordCode;
+    }
+
+    public String getRecordCode() 
+    {
+        return recordCode;
+    }
+    public void setObjType(Long objType) 
+    {
+        this.objType = objType;
+    }
+
+    public Long getObjType() 
+    {
+        return objType;
+    }
+    public void setObjCode(String objCode) 
+    {
+        this.objCode = objCode;
+    }
+
+    public String getObjCode() 
+    {
+        return objCode;
+    }
+    public void setObjName(String objName) 
+    {
+        this.objName = objName;
+    }
+
+    public String getObjName() 
+    {
+        return objName;
+    }
+    public void setInsLocation(String insLocation) 
+    {
+        this.insLocation = insLocation;
+    }
+
+    public String getInsLocation() 
+    {
+        return insLocation;
+    }
+    public void setMaintainTitle(String maintainTitle) 
+    {
+        this.maintainTitle = maintainTitle;
+    }
+
+    public String getMaintainTitle() 
+    {
+        return maintainTitle;
+    }
+    public void setMaintainContent(String maintainContent) 
+    {
+        this.maintainContent = maintainContent;
+    }
+
+    public String getMaintainContent() 
+    {
+        return maintainContent;
+    }
+    public void setMaintainPerson(String maintainPerson) 
+    {
+        this.maintainPerson = maintainPerson;
+    }
+
+    public String getMaintainPerson() 
+    {
+        return maintainPerson;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("recordCode", getRecordCode())
+            .append("objType", getObjType())
+            .append("objCode", getObjCode())
+            .append("objName", getObjName())
+            .append("insLocation", getInsLocation())
+            .append("maintainTitle", getMaintainTitle())
+            .append("maintainContent", getMaintainContent())
+            .append("maintainPerson", getMaintainPerson())
+            .append("createTime", getCreateTime())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 38 - 48
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/CoChargingConfig.java

@@ -33,11 +33,11 @@ public class CoChargingConfig extends BaseEntity
 
     /** 电计量单价 1度 */
     @Excel(name = "电计量单价")
-    private Long elecUnitPrice;
+    private Double elecUnitPrice;
 
     /** 电公摊计算类型 */
     @Excel(name = "电公摊计算类型")
-    private Long elecGtComputeType;
+    private Integer elecGtComputeType;
 
     /** 电费计算说明 */
     @Excel(name = "电费计算说明")
@@ -45,11 +45,11 @@ public class CoChargingConfig extends BaseEntity
 
     /** 水计量单价 1吨 */
     @Excel(name = "水计量单价")
-    private Long waterUnitPrice;
+    private Double waterUnitPrice;
 
     /** 水公摊计算类型 */
     @Excel(name = "水公摊计算类型")
-    private Long waterGtComputeType;
+    private Integer waterGtComputeType;
 
     /** 水费计算说明 */
     @Excel(name = "水费计算说明")
@@ -57,25 +57,22 @@ public class CoChargingConfig extends BaseEntity
 
     private List<CoChargingConfigRel> relCoList;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
+    public Long getId() {
         return id;
     }
-    public void setAreaCode(String areaCode) 
-    {
-        this.areaCode = areaCode;
+
+    public void setId(Long id) {
+        this.id = id;
     }
 
-    public String getAreaCode() 
-    {
+    public String getAreaCode() {
         return areaCode;
     }
 
+    public void setAreaCode(String areaCode) {
+        this.areaCode = areaCode;
+    }
+
     public String getAreaName() {
         return areaName;
     }
@@ -92,61 +89,54 @@ public class CoChargingConfig extends BaseEntity
         this.areaShortName = areaShortName;
     }
 
-    public void setElecUnitPrice(Long elecUnitPrice)
-    {
-        this.elecUnitPrice = elecUnitPrice;
-    }
-
-    public Long getElecUnitPrice()
-    {
+    public Double getElecUnitPrice() {
         return elecUnitPrice;
     }
-    public void setElecGtComputeType(Long elecGtComputeType)
-    {
-        this.elecGtComputeType = elecGtComputeType;
+
+    public void setElecUnitPrice(Double elecUnitPrice) {
+        this.elecUnitPrice = elecUnitPrice;
     }
 
-    public Long getElecGtComputeType()
-    {
+    public Integer getElecGtComputeType() {
         return elecGtComputeType;
     }
-    public void setElecComputeDesc(String elecComputeDesc)
-    {
-        this.elecComputeDesc = elecComputeDesc;
+
+    public void setElecGtComputeType(Integer elecGtComputeType) {
+        this.elecGtComputeType = elecGtComputeType;
     }
 
-    public String getElecComputeDesc()
-    {
+    public String getElecComputeDesc() {
         return elecComputeDesc;
     }
-    public void setWaterUnitPrice(Long waterUnitPrice)
-    {
-        this.waterUnitPrice = waterUnitPrice;
+
+    public void setElecComputeDesc(String elecComputeDesc) {
+        this.elecComputeDesc = elecComputeDesc;
     }
 
-    public Long getWaterUnitPrice()
-    {
+    public Double getWaterUnitPrice() {
         return waterUnitPrice;
     }
-    public void setWaterGtComputeType(Long waterGtComputeType)
-    {
-        this.waterGtComputeType = waterGtComputeType;
+
+    public void setWaterUnitPrice(Double waterUnitPrice) {
+        this.waterUnitPrice = waterUnitPrice;
     }
 
-    public Long getWaterGtComputeType()
-    {
+    public Integer getWaterGtComputeType() {
         return waterGtComputeType;
     }
-    public void setWaterComputeDesc(String waterComputeDesc)
-    {
-        this.waterComputeDesc = waterComputeDesc;
+
+    public void setWaterGtComputeType(Integer waterGtComputeType) {
+        this.waterGtComputeType = waterGtComputeType;
     }
 
-    public String getWaterComputeDesc()
-    {
+    public String getWaterComputeDesc() {
         return waterComputeDesc;
     }
 
+    public void setWaterComputeDesc(String waterComputeDesc) {
+        this.waterComputeDesc = waterComputeDesc;
+    }
+
     public List<CoChargingConfigRel> getRelCoList() {
         return relCoList;
     }

+ 1 - 1
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/CoChargingConfigRel.java

@@ -10,7 +10,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
  * @author ruoyi
  * @date 2024-08-26
  */
-public class CoChargingConfigRel extends BaseEntity
+public class CoChargingConfigRel
 {
     private static final long serialVersionUID = 1L;
 

+ 13 - 1
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/MeterDevice.java

@@ -31,7 +31,8 @@ public class MeterDevice extends BaseEntity
      * 计量对象类型
      * obj_type=1
      *  - 1: 园区  2: 建筑  3:区块
-     *
+     * obj_type =2
+     *    1: 设施  2:设备
      */
     private Long objSubType;
 
@@ -46,6 +47,9 @@ public class MeterDevice extends BaseEntity
     /** 采集方式 */
     private Long colMode;
 
+    /** 倍率 */
+    private Integer magnification;
+
     /** 规格描述 */
     private String specDesc;
 
@@ -129,6 +133,14 @@ public class MeterDevice extends BaseEntity
         this.colMode = colMode;
     }
 
+    public Integer getMagnification() {
+        return magnification;
+    }
+
+    public void setMagnification(Integer magnification) {
+        this.magnification = magnification;
+    }
+
     public String getSpecDesc() {
         return specDesc;
     }

+ 169 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/MeterReadingManual.java

@@ -0,0 +1,169 @@
+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_meter_reading_manual
+ * 
+ * @author ruoyi
+ * @date 2024-08-28
+ */
+public class MeterReadingManual extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 序号 */
+    private Long id;
+
+    /** 计量设备code */
+    @Excel(name = "计量设备code")
+    private String deviceCode;
+
+    /** 服务区代码 */
+    @Excel(name = "服务区代码")
+    private String areaCode;
+
+    /** 年份yyyy */
+    @Excel(name = "年份yyyy")
+    private String year;
+
+    /** 计量月yyyyMM */
+    @Excel(name = "计量月yyyyMM")
+    private String meterMonth;
+
+    /** 上次示数 */
+    @Excel(name = "上次示数")
+    private Long lastReading;
+
+    /** 上次抄表日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "上次抄表日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date lastTime;
+
+    /** 抄表值 */
+    @Excel(name = "抄表值")
+    private Long meterReading;
+
+    /** 本次抄表日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "本次抄表日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date meterTime;
+
+    /** 增量 */
+    @Excel(name = "增量")
+    private Long increase;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setDeviceCode(String deviceCode) 
+    {
+        this.deviceCode = deviceCode;
+    }
+
+    public String getDeviceCode() 
+    {
+        return deviceCode;
+    }
+    public void setAreaCode(String areaCode) 
+    {
+        this.areaCode = areaCode;
+    }
+
+    public String getAreaCode() 
+    {
+        return areaCode;
+    }
+    public void setYear(String year) 
+    {
+        this.year = year;
+    }
+
+    public String getYear() 
+    {
+        return year;
+    }
+    public void setMeterMonth(String meterMonth) 
+    {
+        this.meterMonth = meterMonth;
+    }
+
+    public String getMeterMonth() 
+    {
+        return meterMonth;
+    }
+    public void setLastReading(Long lastReading) 
+    {
+        this.lastReading = lastReading;
+    }
+
+    public Long getLastReading() 
+    {
+        return lastReading;
+    }
+    public void setLastTime(Date lastTime) 
+    {
+        this.lastTime = lastTime;
+    }
+
+    public Date getLastTime() 
+    {
+        return lastTime;
+    }
+    public void setMeterReading(Long meterReading) 
+    {
+        this.meterReading = meterReading;
+    }
+
+    public Long getMeterReading() 
+    {
+        return meterReading;
+    }
+    public void setMeterTime(Date meterTime) 
+    {
+        this.meterTime = meterTime;
+    }
+
+    public Date getMeterTime() 
+    {
+        return meterTime;
+    }
+    public void setIncrease(Long increase) 
+    {
+        this.increase = increase;
+    }
+
+    public Long getIncrease() 
+    {
+        return increase;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("deviceCode", getDeviceCode())
+            .append("areaCode", getAreaCode())
+            .append("year", getYear())
+            .append("meterMonth", getMeterMonth())
+            .append("lastReading", getLastReading())
+            .append("lastTime", getLastTime())
+            .append("meterReading", getMeterReading())
+            .append("meterTime", getMeterTime())
+            .append("increase", getIncrease())
+            .append("createTime", getCreateTime())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 77 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/vo/QueryMeterReading.java

@@ -0,0 +1,77 @@
+/*
+ * 文 件 名:  QueryMeterReading
+ * 版    权:  浩鲸云计算科技股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2024/8/28
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.domain.vo;
+
+/**
+ * 查询抄表记录
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2024/8/28]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+public class QueryMeterReading {
+    /** 服务区代码 */
+    private String areaCode;
+
+    /** 设备编号 */
+    private String deviceCode;
+
+    /** 年份 */
+    private String year;
+
+    /** 开始月份 */
+    private String startMonth;
+
+    /** 结束月份 */
+    private String endMonth;
+
+    public String getAreaCode() {
+        return areaCode;
+    }
+
+    public void setAreaCode(String areaCode) {
+        this.areaCode = areaCode;
+    }
+
+    public String getDeviceCode() {
+        return deviceCode;
+    }
+
+    public void setDeviceCode(String deviceCode) {
+        this.deviceCode = deviceCode;
+    }
+
+    public String getYear() {
+        return year;
+    }
+
+    public void setYear(String year) {
+        this.year = year;
+    }
+
+    public String getStartMonth() {
+        return startMonth;
+    }
+
+    public void setStartMonth(String startMonth) {
+        this.startMonth = startMonth;
+    }
+
+    public String getEndMonth() {
+        return endMonth;
+    }
+
+    public void setEndMonth(String endMonth) {
+        this.endMonth = endMonth;
+    }
+}

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

@@ -0,0 +1,61 @@
+package com.ruoyi.ems.mapper;
+
+import java.util.List;
+import com.ruoyi.ems.domain.AdmEmsDeviceRbook;
+
+/**
+ * 设备台账Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-08-26
+ */
+public interface AdmEmsDeviceRbookMapper 
+{
+    /**
+     * 查询设备台账
+     * 
+     * @param id 设备台账主键
+     * @return 设备台账
+     */
+    public AdmEmsDeviceRbook selectAdmEmsDeviceRbookById(Long id);
+
+    /**
+     * 查询设备台账列表
+     * 
+     * @param admEmsDeviceRbook 设备台账
+     * @return 设备台账集合
+     */
+    public List<AdmEmsDeviceRbook> selectAdmEmsDeviceRbookList(AdmEmsDeviceRbook admEmsDeviceRbook);
+
+    /**
+     * 新增设备台账
+     * 
+     * @param admEmsDeviceRbook 设备台账
+     * @return 结果
+     */
+     int insertAdmEmsDeviceRbook(AdmEmsDeviceRbook admEmsDeviceRbook);
+
+    /**
+     * 修改设备台账
+     * 
+     * @param admEmsDeviceRbook 设备台账
+     * @return 结果
+     */
+     int updateAdmEmsDeviceRbook(AdmEmsDeviceRbook admEmsDeviceRbook);
+
+    /**
+     * 删除设备台账
+     * 
+     * @param id 设备台账主键
+     * @return 结果
+     */
+    int deleteAdmEmsDeviceRbookById(Long id);
+
+    /**
+     * 批量删除设备台账
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+     int deleteAdmEmsDeviceRbookByIds(Long[] ids);
+}

+ 56 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/MeterReadingManualMapper.java

@@ -0,0 +1,56 @@
+package com.ruoyi.ems.mapper;
+
+import java.util.List;
+
+import com.ruoyi.ems.domain.MeterReadingManual;
+import com.ruoyi.ems.domain.vo.QueryMeterReading;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 手动抄记录Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-08-28
+ */
+public interface MeterReadingManualMapper {
+    /**
+     * 查询手动抄记录列表
+     *
+     * @param areaCode   区域编码
+     * @param deviceCode 设备编码
+     * @return 手动抄记录集合
+     */
+    MeterReadingManual selectLastItem(@Param("areaCode") String areaCode, @Param("deviceCode") String deviceCode);
+
+    /**
+     * 查询手动抄记录列表
+     *
+     * @param queryMeterReading 参数
+     * @return 手动抄记录集合
+     */
+    List<MeterReadingManual> selectList(QueryMeterReading queryMeterReading);
+
+    /**
+     * 新增手动抄记录
+     *
+     * @param meterReadingManual 手动抄记录
+     * @return 结果
+     */
+    int insert(MeterReadingManual meterReadingManual);
+
+    /**
+     * 修改手动抄记录
+     *
+     * @param meterReadingManual 手动抄记录
+     * @return 结果
+     */
+    int update(MeterReadingManual meterReadingManual);
+
+    /**
+     * 删除手动抄记录
+     *
+     * @param id 手动抄记录主键
+     * @return 结果
+     */
+    int deleteById(Long id);
+}

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

@@ -0,0 +1,61 @@
+package com.ruoyi.ems.service;
+
+import java.util.List;
+import com.ruoyi.ems.domain.AdmEmsDeviceRbook;
+
+/**
+ * 设备台账Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-08-26
+ */
+public interface IAdmEmsDeviceRbookService 
+{
+    /**
+     * 查询设备台账
+     * 
+     * @param id 设备台账主键
+     * @return 设备台账
+     */
+    public AdmEmsDeviceRbook selectAdmEmsDeviceRbookById(Long id);
+
+    /**
+     * 查询设备台账列表
+     * 
+     * @param admEmsDeviceRbook 设备台账
+     * @return 设备台账集合
+     */
+    public List<AdmEmsDeviceRbook> selectAdmEmsDeviceRbookList(AdmEmsDeviceRbook admEmsDeviceRbook);
+
+    /**
+     * 新增设备台账
+     * 
+     * @param admEmsDeviceRbook 设备台账
+     * @return 结果
+     */
+    public int insertAdmEmsDeviceRbook(AdmEmsDeviceRbook admEmsDeviceRbook);
+
+    /**
+     * 修改设备台账
+     * 
+     * @param admEmsDeviceRbook 设备台账
+     * @return 结果
+     */
+     int updateAdmEmsDeviceRbook(AdmEmsDeviceRbook admEmsDeviceRbook);
+
+    /**
+     * 批量删除设备台账
+     * 
+     * @param ids 需要删除的设备台账主键集合
+     * @return 结果
+     */
+     int deleteAdmEmsDeviceRbookByIds(Long[] ids);
+
+    /**
+     * 删除设备台账信息
+     * 
+     * @param id 设备台账主键
+     * @return 结果
+     */
+    int deleteAdmEmsDeviceRbookById(Long id);
+}

+ 56 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IMeterReadingManualService.java

@@ -0,0 +1,56 @@
+package com.ruoyi.ems.service;
+
+import com.ruoyi.ems.domain.MeterReadingManual;
+import com.ruoyi.ems.domain.vo.QueryMeterReading;
+
+import java.util.List;
+
+/**
+ * 手动抄记录Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-08-28
+ */
+public interface IMeterReadingManualService
+{
+    /**
+     * 查询手动抄记录列表
+     *
+     * @param areaCode 区域编码
+     * @param deviceCode 设备编码
+     * @return 手动抄记录集合
+     */
+    MeterReadingManual selectLastItem(String areaCode, String deviceCode);
+
+    /**
+     * 查询手动抄记录列表
+     *
+     * @param queryMeterReading 查询条件参数
+     * @return 手动抄记录集合
+     */
+    List<MeterReadingManual> selectList(QueryMeterReading queryMeterReading);
+
+    /**
+     * 新增手动抄记录
+     *
+     * @param meterReadingManual 手动抄记录
+     * @return 结果
+     */
+    int insert(MeterReadingManual meterReadingManual);
+
+    /**
+     * 修改手动抄记录
+     *
+     * @param meterReadingManual 手动抄记录
+     * @return 结果
+     */
+    int update(MeterReadingManual meterReadingManual);
+
+    /**
+     * 删除手动抄记录
+     *
+     * @param id 手动抄记录主键
+     * @return 结果
+     */
+    int deleteById(Long id);
+}

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

@@ -0,0 +1,96 @@
+package com.ruoyi.ems.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.core.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.ems.mapper.AdmEmsDeviceRbookMapper;
+import com.ruoyi.ems.domain.AdmEmsDeviceRbook;
+import com.ruoyi.ems.service.IAdmEmsDeviceRbookService;
+
+/**
+ * 设备台账Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-08-26
+ */
+@Service
+public class AdmEmsDeviceRbookServiceImpl implements IAdmEmsDeviceRbookService 
+{
+    @Autowired
+    private AdmEmsDeviceRbookMapper admEmsDeviceRbookMapper;
+
+    /**
+     * 查询设备台账
+     * 
+     * @param id 设备台账主键
+     * @return 设备台账
+     */
+    @Override
+    public AdmEmsDeviceRbook selectAdmEmsDeviceRbookById(Long id)
+    {
+        return admEmsDeviceRbookMapper.selectAdmEmsDeviceRbookById(id);
+    }
+
+    /**
+     * 查询设备台账列表
+     * 
+     * @param admEmsDeviceRbook 设备台账
+     * @return 设备台账
+     */
+    @Override
+    public List<AdmEmsDeviceRbook> selectAdmEmsDeviceRbookList(AdmEmsDeviceRbook admEmsDeviceRbook)
+    {
+        return admEmsDeviceRbookMapper.selectAdmEmsDeviceRbookList(admEmsDeviceRbook);
+    }
+
+    /**
+     * 新增设备台账
+     * 
+     * @param admEmsDeviceRbook 设备台账
+     * @return 结果
+     */
+    @Override
+    public int insertAdmEmsDeviceRbook(AdmEmsDeviceRbook admEmsDeviceRbook)
+    {
+        admEmsDeviceRbook.setCreateTime(DateUtils.getNowDate());
+        return admEmsDeviceRbookMapper.insertAdmEmsDeviceRbook(admEmsDeviceRbook);
+    }
+
+    /**
+     * 修改设备台账
+     * 
+     * @param admEmsDeviceRbook 设备台账
+     * @return 结果
+     */
+    @Override
+    public int updateAdmEmsDeviceRbook(AdmEmsDeviceRbook admEmsDeviceRbook)
+    {
+        admEmsDeviceRbook.setUpdateTime(DateUtils.getNowDate());
+        return admEmsDeviceRbookMapper.updateAdmEmsDeviceRbook(admEmsDeviceRbook);
+    }
+
+    /**
+     * 批量删除设备台账
+     * 
+     * @param ids 需要删除的设备台账主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAdmEmsDeviceRbookByIds(Long[] ids)
+    {
+        return admEmsDeviceRbookMapper.deleteAdmEmsDeviceRbookByIds(ids);
+    }
+
+    /**
+     * 删除设备台账信息
+     * 
+     * @param id 设备台账主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAdmEmsDeviceRbookById(Long id)
+    {
+        return admEmsDeviceRbookMapper.deleteAdmEmsDeviceRbookById(id);
+    }
+}

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

@@ -0,0 +1,47 @@
+package com.ruoyi.ems.service.impl;
+
+import com.ruoyi.ems.domain.MeterReadingManual;
+import com.ruoyi.ems.domain.vo.QueryMeterReading;
+import com.ruoyi.ems.mapper.MeterReadingManualMapper;
+import com.ruoyi.ems.service.IMeterReadingManualService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 手动抄记录Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-08-28
+ */
+@Service
+public class MeterReadingManualServiceImpl implements IMeterReadingManualService {
+    @Autowired
+    private MeterReadingManualMapper meterReadingManualMapper;
+
+    @Override
+    public MeterReadingManual selectLastItem(String areaCode, String deviceCode) {
+        return meterReadingManualMapper.selectLastItem(areaCode, deviceCode);
+    }
+
+    @Override
+    public List<MeterReadingManual> selectList(QueryMeterReading queryMeterReading) {
+        return meterReadingManualMapper.selectList(queryMeterReading);
+    }
+
+    @Override
+    public int insert(MeterReadingManual meterReadingManual) {
+        return meterReadingManualMapper.insert(meterReadingManual);
+    }
+
+    @Override
+    public int update(MeterReadingManual meterReadingManual) {
+        return meterReadingManualMapper.update(meterReadingManual);
+    }
+
+    @Override
+    public int deleteById(Long id) {
+        return meterReadingManualMapper.deleteById(id);
+    }
+}

+ 99 - 0
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/AdmEmsDeviceRbookMapper.xml

@@ -0,0 +1,99 @@
+<?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.AdmEmsDeviceRbookMapper">
+    
+    <resultMap type="com.ruoyi.ems.domain.AdmEmsDeviceRbook" id="AdmEmsDeviceRbookResult">
+        <result property="id"    column="id"    />
+        <result property="recordCode"    column="record_code"    />
+        <result property="objType"    column="obj_type"    />
+        <result property="objCode"    column="obj_code"    />
+        <result property="objName"    column="obj_name"    />
+        <result property="insLocation"    column="ins_location"    />
+        <result property="maintainTitle"    column="maintain_title"    />
+        <result property="maintainContent"    column="maintain_content"    />
+        <result property="maintainPerson"    column="maintain_person"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectAdmEmsDeviceRbookVo">
+        select id, record_code, obj_type, obj_code, obj_name, ins_location, maintain_title, maintain_content, maintain_person, create_time, update_time from adm_ems_device_rbook
+    </sql>
+
+    <select id="selectAdmEmsDeviceRbookList" parameterType="com.ruoyi.ems.domain.AdmEmsDeviceRbook" resultMap="AdmEmsDeviceRbookResult">
+        <include refid="selectAdmEmsDeviceRbookVo"/>
+        <where>  
+            <if test="recordCode != null  and recordCode != ''"> and record_code = #{recordCode}</if>
+            <if test="objType != null "> and obj_type = #{objType}</if>
+            <if test="objCode != null  and objCode != ''"> and obj_code = #{objCode}</if>
+            <if test="objName != null  and objName != ''"> and obj_name like concat('%', #{objName}, '%')</if>
+            <if test="insLocation != null  and insLocation != ''"> and ins_location = #{insLocation}</if>
+            <if test="maintainTitle != null  and maintainTitle != ''"> and maintain_title = #{maintainTitle}</if>
+            <if test="maintainContent != null  and maintainContent != ''"> and maintain_content = #{maintainContent}</if>
+            <if test="maintainPerson != null  and maintainPerson != ''"> and maintain_person = #{maintainPerson}</if>
+        </where>
+    </select>
+    
+    <select id="selectAdmEmsDeviceRbookById" parameterType="Long" resultMap="AdmEmsDeviceRbookResult">
+        <include refid="selectAdmEmsDeviceRbookVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertAdmEmsDeviceRbook" parameterType="com.ruoyi.ems.domain.AdmEmsDeviceRbook" useGeneratedKeys="true" keyProperty="id">
+        insert into adm_ems_device_rbook
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="recordCode != null and recordCode != ''">record_code,</if>
+            <if test="objType != null">obj_type,</if>
+            <if test="objCode != null and objCode != ''">obj_code,</if>
+            <if test="objName != null">obj_name,</if>
+            <if test="insLocation != null">ins_location,</if>
+            <if test="maintainTitle != null and maintainTitle != ''">maintain_title,</if>
+            <if test="maintainContent != null">maintain_content,</if>
+            <if test="maintainPerson != null">maintain_person,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="recordCode != null and recordCode != ''">#{recordCode},</if>
+            <if test="objType != null">#{objType},</if>
+            <if test="objCode != null and objCode != ''">#{objCode},</if>
+            <if test="objName != null">#{objName},</if>
+            <if test="insLocation != null">#{insLocation},</if>
+            <if test="maintainTitle != null and maintainTitle != ''">#{maintainTitle},</if>
+            <if test="maintainContent != null">#{maintainContent},</if>
+            <if test="maintainPerson != null">#{maintainPerson},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateAdmEmsDeviceRbook" parameterType="com.ruoyi.ems.domain.AdmEmsDeviceRbook">
+        update adm_ems_device_rbook
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="recordCode != null and recordCode != ''">record_code = #{recordCode},</if>
+            <if test="objType != null">obj_type = #{objType},</if>
+            <if test="objCode != null and objCode != ''">obj_code = #{objCode},</if>
+            <if test="objName != null">obj_name = #{objName},</if>
+            <if test="insLocation != null">ins_location = #{insLocation},</if>
+            <if test="maintainTitle != null and maintainTitle != ''">maintain_title = #{maintainTitle},</if>
+            <if test="maintainContent != null">maintain_content = #{maintainContent},</if>
+            <if test="maintainPerson != null">maintain_person = #{maintainPerson},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteAdmEmsDeviceRbookById" parameterType="Long">
+        delete from adm_ems_device_rbook where id = #{id}
+    </delete>
+
+    <delete id="deleteAdmEmsDeviceRbookByIds" parameterType="String">
+        delete from adm_ems_device_rbook where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 5 - 2
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/MeterDeviceMapper.xml

@@ -15,11 +15,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="objName"     column="obj_name"    />
         <result property="colCycle"    column="col_cycle"    />
         <result property="colMode"     column="col_mode"    />
+        <result property="magnification" column="magnification" />
         <result property="specDesc"    column="spec_desc"    />
     </resultMap>
 
     <sql id="selectMeterDeviceVo">
-        select id, device_code, area_code, meter_cls, obj_type, obj_sub_type, obj_code, col_cycle, col_mode, spec_desc from adm_meter_device
+        select id, device_code, area_code, meter_cls, obj_type, obj_sub_type, obj_code, col_cycle, col_mode, magnification, spec_desc from adm_meter_device
     </sql>
 
     <select id="selectMeterDeviceList" parameterType="com.ruoyi.ems.domain.MeterDevice" resultMap="meterDeviceResult">
@@ -33,7 +34,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="objCode != null  and objCode != ''"> and obj_code = #{objCode}</if>
             <if test="colCycle != null "> and col_cycle = #{colCycle}</if>
             <if test="colMode != null "> and col_mode = #{colMode}</if>
-            <if test="specDesc != null  and specDesc != ''"> and spec_desc = #{specDesc}</if>
         </where>
         ORDER BY obj_type, obj_sub_type
     </select>
@@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="objCode != null and objCode != ''">obj_code,</if>
             <if test="colCycle != null">col_cycle,</if>
             <if test="colMode != null">col_mode,</if>
+            <if test="magnification != null">magnification,</if>
             <if test="specDesc != null">spec_desc,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -65,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="objCode != null and objCode != ''">#{objCode},</if>
             <if test="colCycle != null">#{colCycle},</if>
             <if test="colMode != null">#{colMode},</if>
+            <if test="magnification != null">#{magnification},</if>
             <if test="specDesc != null">#{specDesc},</if>
          </trim>
     </insert>
@@ -80,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="objCode != null and objCode != ''">obj_code = #{objCode},</if>
             <if test="colCycle != null">col_cycle = #{colCycle},</if>
             <if test="colMode != null">col_mode = #{colMode},</if>
+            <if test="magnification != null">magnification = #{magnification},</if>
             <if test="specDesc != null">spec_desc = #{specDesc},</if>
         </trim>
         where id = #{id}

+ 88 - 0
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/MeterReadingManualMapper.xml

@@ -0,0 +1,88 @@
+<?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.MeterReadingManualMapper">
+    
+    <resultMap type="com.ruoyi.ems.domain.MeterReadingManual" id="MeterReadingManualResult">
+        <result property="id"    column="id"    />
+        <result property="deviceCode"    column="device_code"    />
+        <result property="areaCode"    column="area_code"    />
+        <result property="year"    column="year"    />
+        <result property="meterMonth"    column="meter_month"    />
+        <result property="lastReading"    column="last_reading"    />
+        <result property="lastTime"    column="last_time"    />
+        <result property="meterReading"    column="meter_reading"    />
+        <result property="meterTime"    column="meter_time"    />
+        <result property="increase"    column="increase"    />
+        <result property="increase"    column="increase"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectMeterReadingManualVo">
+        select id, device_code, area_code, `year`, meter_month, last_reading, last_time, meter_reading, meter_time, increase, create_time, update_time from adm_meter_reading_manual
+    </sql>
+
+    <select id="selectLastItem"  resultMap="MeterReadingManualResult">
+        <include refid="selectMeterReadingManualVo"/>
+        where area_code = #{areaCode} and device_code = #{deviceCode}
+        order by meter_time desc
+        limit 1
+    </select>
+
+    <select id="selectList" parameterType="com.ruoyi.ems.domain.vo.QueryMeterReading" resultMap="MeterReadingManualResult">
+        <include refid="selectMeterReadingManualVo"/>
+        <where>  
+            <if test="deviceCode != null  and deviceCode != ''"> and device_code = #{deviceCode}</if>
+            <if test="areaCode != null  and areaCode != ''"> and area_code = #{areaCode}</if>
+            <if test="year != null  and year != ''"> and year = #{year}</if>
+            <if test="startMonth != null  and startMonth != ''"> and meter_month &gt;= #{startMonth}</if>
+            <if test="endMonth != null  and endMonth != ''"> and meter_month &lt;= #{endMonth}</if>
+        </where>
+    </select>
+
+    <insert id="insert" parameterType="com.ruoyi.ems.domain.MeterReadingManual" useGeneratedKeys="true" keyProperty="id">
+        insert into adm_meter_reading_manual
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="deviceCode != null and deviceCode != ''">device_code,</if>
+            <if test="areaCode != null and areaCode != ''">area_code,</if>
+            <if test="year != null and year != ''">year,</if>
+            <if test="meterMonth != null and meterMonth != ''">meter_month,</if>
+            <if test="lastReading != null">last_reading,</if>
+            <if test="lastTime != null">last_time,</if>
+            <if test="meterReading != null">meter_reading,</if>
+            <if test="meterTime != null">meter_time,</if>
+            <if test="increase != null">increase,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="deviceCode != null and deviceCode != ''">#{deviceCode},</if>
+            <if test="areaCode != null and areaCode != ''">#{areaCode},</if>
+            <if test="year != null and year != ''">#{year},</if>
+            <if test="meterMonth != null and meterMonth != ''">#{meterMonth},</if>
+            <if test="lastReading != null">#{lastReading},</if>
+            <if test="lastTime != null">#{lastTime},</if>
+            <if test="meterReading != null">#{meterReading},</if>
+            <if test="meterTime != null">#{meterTime},</if>
+            <if test="increase != null">#{increase},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="update" parameterType="com.ruoyi.ems.domain.MeterReadingManual">
+        update adm_meter_reading_manual
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="meterReading != null">meter_reading = #{meterReading},</if>
+            <if test="meterTime != null">meter_time = #{meterTime},</if>
+            <if test="increase != null">increase = #{increase},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteById" parameterType="Long">
+        delete from adm_meter_reading_manual where id = #{id}
+    </delete>
+</mapper>

+ 240 - 0
ems-cloud/sql/ems_init_data.sql

@@ -0,0 +1,240 @@
+-- 服务区初始数据
+INSERT INTO `adm_service_area` (`area_code`, `area_name`, `short_name`, `service_star`, `city`, `highway`, `direction`, `address`, `attr_org`, `mgr_org`, `open_date`, `land_area`, `floor_area`, `longitude`, `latitude`) VALUES ('321283124S3001', '常泰高速服务区(北区)', '北区', 4, '泰州', 'S30如常高速', '常州方向', '江苏省泰州市泰兴市虹桥镇常泰高速常州方向', null, null, '2025-01-01', '72.5', '6000', '120.050937', '32.071956');
+INSERT INTO `adm_service_area` (`area_code`, `area_name`, `short_name`, `service_star`, `city`, `highway`, `direction`, `address`, `attr_org`, `mgr_org`, `open_date`, `land_area`, `floor_area`, `longitude`, `latitude`) VALUES ('321283124S3002', '常泰高速服务区(南区)', '南区', 4, '泰州', 'S30如常高速', '泰兴方向', '江苏省泰州市泰兴市虹桥镇常泰高速泰州方向', null, null, '2025-01-01', '72.5', '6000', '120.052389', '32.070408');
+
+-- 建筑初始数据
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300101', '综合楼', '北区中部', 2, 1, 13.7, 4700, '一层提供商业、餐饮、卫生间、开水服务,二层为办公区、会议区', '321283124S3001');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300102', '配电泵房', '北区西北角', 1, 0, null, 300, '配电设施,水泵设施工作区', '321283124S3001');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300103', '维修间&货车之家', '北区东侧', 2, 0, null, 300, '提供车辆维修服务', '321283124S3001');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300104', '加油站', '北区西南角', 1, 0, null, 200, '提供加油服务', '321283124S3001');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300105', '警务站', '北区东北角', 1, 0, null, 50000, '警务办公场地', '321283124S3001');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300106', '停车场', '北区广场', 1, 0, null, 50000, '车位', '321283124S3001');
+
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300201', '综合楼', '南区中部', 2, 1, 14.2, 4788.2, '一层提供商业、餐饮、卫生间、开水服务,二层为员工餐厅、展厅', '321283124S3002');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300202', '配电泵房', '南区东南角', 1, 0, null, 300, '配电设施,水泵设施工作区', '321283124S3002');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300203', '维修间&货车之家', '南区西侧', 2, 0, null, 300, '提供车辆维修服务', '321283124S3002');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300204', '加油站', '南区东北角', 1, 0, null, 200, '提供加油服务', '321283124S3002');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300205', '宿舍楼', '南区西南角', 2, 0, null, 920, '提供员工住宿服务', '321283124S3002');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300206', '停车场', '南区广场', 1, 0, null, 50000, '车位', '321283124S3002');
+
+
+-- 建筑初始数据
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-101', '开水泡面间', 1, '101', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-102', '超市', 1, '102', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-103', '中式糕点', 1, '103', 150, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-104', '特色产品市集', 1, '104', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-105', '奶茶&咖啡', 1, '105', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-106', '中式套餐', 1, '106', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-107', '特色小吃', 1, '107', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-108', '串串&卤味', 1, '108', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-109', '糖葫芦&水果', 1, '109', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-110', '美食广场', 1, '110', 300, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-111', '男卫', 1, '111', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-112', '男盥洗室', 1, '112', 150, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-113', '女卫', 1, '113', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-114', '女盥洗室', 1, '114', 150, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-115', '工具间1', 1, '115', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-116', '工具间2', 1, '116', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-117', '工具间3', 1, '117', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-118', '工具间4', 1, '118', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-119', '货车服务空间', 1, '119', 50, '使用中');
+
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-XK', '小客停车位', 1, 'CW-XK', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-CD', '充电车位', 1, 'CW-CD', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-WZA', '无障碍车位', 1, 'CW-WZA', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-DKC', '大客车停车位', 1, 'CW-DKC', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-HC', '货车车位', 1, 'CW-HC', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-WXP', '危险品车位', 1, 'CW-WXP', 100, '使用中');
+
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-101', '开水泡面间', 1, '101', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-102', '超市', 1, '102', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-103', '中式糕点', 1, '103', 150, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-104', '特色产品市集', 1, '104', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-105', '奶茶&咖啡', 1, '105', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-106', '中式套餐', 1, '106', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-107', '特色小吃', 1, '107', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-108', '串串&卤味', 1, '108', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-109', '糖葫芦&水果', 1, '109', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-110', '美食广场', 1, '110', 300, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-111', '男卫', 1, '111', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-112', '男盥洗室', 1, '112', 150, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-113', '女卫', 1, '113', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-114', '女盥洗室', 1, '114', 150, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-115', '工具间1', 1, '115', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-116', '工具间2', 1, '116', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-117', '工具间3', 1, '117', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-118', '工具间4', 1, '118', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-119', '货车服务空间', 1, '119', 50, '使用中');
+
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-XK', '小客停车位', 1, 'CW-XK', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-CD', '充电车位', 1, 'CW-XK', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-WZA', '无障碍车位', 1, 'CW-XK', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-DKC', '大客车停车位', 1, 'CW-XK', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-HC', '货车车位', 1, 'CW-XK', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-WXP','危险品车位', 1, 'CW-XK', 100, '使用中');
+
+-- 能源设施初始数据
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('W201', '北区-供电网', 'W', 'W2', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('W202', '南区-供电网', 'W', 'W2', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('E501', '北区-光伏', 'E', 'E5', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('E502', '南区-光伏', 'E', 'E5', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z101', '北区-室内照明', 'Z', 'Z001', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z102', '北区-室外照明', 'Z', 'Z002', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z110', '北区-公共设施', 'Z', 'Z010', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z120', '北区-空调设施', 'Z', 'Z020', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z201', '南区-室内照明', 'Z', 'Z001', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z202', '南区-室外照明', 'Z', 'Z002', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z210', '南区-公共设施', 'Z', 'Z010', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z220', '南区-空调设施', 'Z', 'Z020', 1, '321283124S3002');
+
+
+-- 设施属性DEMO数据
+INSERT INTO `adm_ems_facs_attr` (`facs_code`, `attr_name`, `attr_desc`, `attr_value`, `attr_unit`) VALUES ('W201', 'input_load', '进线负荷', '293.55', 'kw/h');
+INSERT INTO `adm_ems_facs_attr` (`facs_code`, `attr_name`, `attr_desc`, `attr_value`, `attr_unit`) VALUES ('E501', 'installed_capacity', '装机容量', '2000', 'MW');
+
+-- 设施属性DEMO数据
+INSERT INTO `adm_ems_facs_ability` (`facs_code`, `ability_name`, `ability_desc`, `ability_param`) VALUES ('Z020', '开启', '开启空调', '{\"enable\":1}');
+INSERT INTO `adm_ems_facs_ability` (`facs_code`, `ability_name`, `ability_desc`, `ability_param`) VALUES ('Z020', '关闭', '关闭空调', '{\"enable\":0}');
+
+-- 设施事件DEMO数据
+INSERT INTO `adm_ems_facs_event` (`facs_code`, `event_name`, `event_type`, `event_desc`, `event_code`, `ext_event_code`) VALUES ('Z101', '电压告警', '2', '电压过低告警', 'LOW_V',  '10001001');
+
+
+-- 能源设施能流关系DEMO数据
+INSERT INTO `adm_ems_facs_flow_rel` (`code`, `export_facs_code`, `input_facs_code`, `ems_cls`, `state`, `action_type`) VALUES ('W201_Z101', 'W201', 'Z101', '45', 1, '4501');
+INSERT INTO `adm_ems_facs_flow_rel` (`code`, `export_facs_code`, `input_facs_code`, `ems_cls`, `state`, `action_type`) VALUES ('E501_W201', 'E501', 'W201', '45', 1, '4502');
+INSERT INTO `adm_ems_facs_flow_rel` (`code`, `export_facs_code`, `input_facs_code`, `ems_cls`, `state`, `action_type`) VALUES ('E501_Z101', 'E501', 'Z101', '45', 1, '4505');
+
+
+-- 能源计量设备DEMO数据
+INSERT INTO `adm_meter_device` (`device_code`, `area_code`, `meter_cls`, `obj_type`, `obj_sub_type`, `obj_code`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('J-D-B-102', '321283124S3001', 45, 1, 3, 'B-102', 4, 1, 1, '直采表');
+INSERT INTO `adm_meter_device` (`device_code`, `area_code`, `meter_cls`, `obj_type`, `obj_sub_type`, `obj_code`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('J-D-B-103', '321283124S3001', 45, 1, 3, 'B-103', 4, 1, 1, '直采表');
+INSERT INTO `adm_meter_device` (`device_code`, `area_code`, `meter_cls`, `obj_type`, `obj_sub_type`, `obj_code`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('J-D-B-104', '321283124S3001', 45, 1, 3, 'B-104', 4, 1, 1, '直采表');
+INSERT INTO `adm_meter_device` (`device_code`, `area_code`, `meter_cls`, `obj_type`, `obj_sub_type`, `obj_code`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('J-D-B-105', '321283124S3001', 45, 1, 3, 'B-105', 4, 1, 1, '直采表');
+INSERT INTO `adm_meter_device` (`device_code`, `area_code`, `meter_cls`, `obj_type`, `obj_sub_type`, `obj_code`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('J-D-B-106', '321283124S3001', 45, 1, 3, 'B-106', 4, 1, 1, '直采表');
+INSERT INTO `adm_meter_device` (`device_code`, `area_code`, `meter_cls`, `obj_type`, `obj_sub_type`, `obj_code`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('J-D-B-107', '321283124S3001', 45, 1, 3, 'B-107', 4, 1, 1, '直采表');
+INSERT INTO `adm_meter_device` (`device_code`, `area_code`, `meter_cls`, `obj_type`, `obj_sub_type`, `obj_code`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('J-D-B-108', '321283124S3001', 45, 1, 3, 'B-108', 4, 1, 1, '直采表');
+INSERT INTO `adm_meter_device` (`device_code`, `area_code`, `meter_cls`, `obj_type`, `obj_sub_type`, `obj_code`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('J-D-B-109', '321283124S3001', 45, 1, 3, 'B-109', 4, 1, 1, '直采表');
+INSERT INTO `adm_meter_device` (`device_code`, `area_code`, `meter_cls`, `obj_type`, `obj_sub_type`, `obj_code`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('J-D-B-110', '321283124S3001', 45, 1, 3, 'B-110', 4, 1, 1, '直采表');
+INSERT INTO `adm_meter_device` (`device_code`, `area_code`, `meter_cls`, `obj_type`, `obj_sub_type`, `obj_code`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('J-D-Z010-R103-001', '321283124S3001', 45, 2, 2, 'Z010-R103-001', 4, 1, 20, '互感器表');
+
+-- 配电柜DEMO数据
+INSERT INTO adm_power_box (`box_code`, `box_type`, `area_code`, `location`, `box_size`, `gateway_addr`, `gateway_port`) VALUES ('D-B-1001', 1, '321283124S3001', '综合楼配电间', '100*200', '0.0.0.0', 9999);
+INSERT INTO adm_power_box (`box_code`, `box_type`, `area_code`, `location`, `box_size`, `gateway_addr`, `gateway_port`) VALUES ('D-B-1002', 1, '321283124S3001', '广场配电柜', '100*200', '0.0.0.0', 9999);
+INSERT INTO adm_power_box (`box_code`, `box_type`, `area_code`, `location`, `box_size`, `gateway_addr`, `gateway_port`) VALUES ('D-N-1001', 1, '321283124S3002', '综合楼配电间', '100*200', '0.0.0.0', 9999);
+INSERT INTO adm_power_box (`box_code`, `box_type`, `area_code`, `location`, `box_size`, `gateway_addr`, `gateway_port`) VALUES ('D-N-1002', 1, '321283124S3002', '广场配电柜', '100*200', '0.0.0.0', 9999);
+
+-- 动力箱柜电气设备表
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-B-1001', 'D-B-1001-10000', '0x0001', 'RCD', '总开(漏保)', 380, 200, null, null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-B-1001', 'D-B-1001-10011', '0x0002', 'QF', '分开(空开)', 380, 60, 'D-B-1001-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-B-1001', 'D-B-1001-11012', '0x0003', 'QF', '分开(空开)', 380, 60, 'D-B-1001-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-B-1001', 'D-B-1001-11013', '0x0003', 'QF', '分开(空开)', 380, 60, 'D-B-1001-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-B-1001', 'D-B-1001-11014', '0x0004', 'QF', '分开(空开)', 380, 60, 'D-B-1001-10000', null);
+
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-B-1002', 'D-B-1002-10000', '0x0011', 'RCD', '总开(漏保)', 380, 200, null, null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-B-1002', 'D-B-1002-10011', '0x0012', 'QF', '分开(空开)', 380, 60, 'D-B-1002-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-B-1002', 'D-B-1002-11012', '0x0013', 'QF', '分开(空开)', 380, 60, 'D-B-1002-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-B-1002', 'D-B-1002-11013', '0x0013', 'QF', '分开(空开)', 380, 60, 'D-B-1002-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-B-1002', 'D-B-1002-11014', '0x0014', 'QF', '分开(空开)', 380, 60, 'D-B-1002-10000', null);
+
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-N-1001', 'D-N-1001-10000', '0x0101', 'RCD', '总开(漏保)', 380, 200, null, null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-N-1001', 'D-N-1001-10011', '0x0102', 'QF', '分开(空开)', 380, 60, 'D-N-1001-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-N-1001', 'D-N-1001-11012', '0x0103', 'QF', '分开(空开)', 380, 60, 'D-N-1001-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-N-1001', 'D-N-1001-11013', '0x0103', 'QF', '分开(空开)', 380, 60, 'D-N-1001-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-N-1001', 'D-N-1001-11014', '0x0104', 'QF', '分开(空开)', 380, 60, 'D-N-1001-10000', null);
+
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-N-1002', 'D-B-1002-10000', '0x0201', 'RCD', '总开(漏保)', 380, 200, null, null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-N-1002', 'D-B-1002-10011', '0x0202', 'QF', '分开(空开)', 380, 60, 'D-B-1002-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-N-1002', 'D-B-1002-11012', '0x0203', 'QF', '分开(空开)', 380, 60, 'D-B-1002-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-N-1002', 'D-B-1002-11013', '0x0203', 'QF', '分开(空开)', 380, 60, 'D-B-1002-10000', null);
+INSERT INTO adm_box_elec_eqpt (`box_code`, `eqpt_code`, `ext_eqpt_code`, `eqpt_type`, `eqpt_spec`, `rated_voltage`, `rated_current`, `parent_eqpt`, `meter_device`) VALUES ('D-N-1002', 'D-B-1002-11014', '0x0204', 'QF', '分开(空开)', 380, 60, 'D-B-1002-10000', null);
+
+-- 区域&标签关系表
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-101','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-102','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-103','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-104','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-105','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-106','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-107','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-108','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-109','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-110','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-111','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-112','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-113','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-114','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-115','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-116','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-117','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-118','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-119','Area_00');
+
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-CD','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-DKC','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-HC','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-WXP','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-WZA','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-XK','Area_00');
+
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-101','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-102','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-103','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-104','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-105','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-106','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-107','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-108','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-109','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-110','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-111','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-112','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-113','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-114','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-115','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-116','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-117','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-118','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-119','Area_00');
+
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-CD','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-DKC','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-HC','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-WXP','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-WZA','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-XK','Area_00');
+
+-- 服务区用电属性数据
+INSERT INTO adm_area_elec_attr (`area_code`, `price_code`, `req_capacity_flag`, `trans_capacity`, `req_quantity`) VALUES ('321283124S3001', '4001', 1, 630, NULL);
+INSERT INTO adm_area_elec_attr (`area_code`, `price_code`, `req_capacity_flag`, `trans_capacity`, `req_quantity`) VALUES ('321283124S3002', '4001', 1, 630, NULL);
+
+-- 国网电价数据
+-- 单一制初始电价数据
+INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('3001', 3, '不满1千伏', 0.7624, 1.5296, 1.2747, 0.7624, 0.3445, NULL, NULL);
+INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('3002', 3, '1-10(20)千伏', 0.7364, 1.4774, 1.2312, 0.7364, 0.3327, NULL, NULL);
+INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('3003', 3, '35千伏', 0.7114, 1.4273, 1.1894, 0.7114, 0.3214, NULL, NULL);
+
+-- 两部制初始电价数据
+INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4001', 4, '1-10(20)千伏', 0.6587, 1.3592, 1.1327, 0.6587, 0.2757, 51.2, 32);
+INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4002', 4, '35千伏', 0.6337, 1.3076, 1.0897, 0.6337, 0.2652, 48, 30);
+INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4003', 4, '110千伏', 0.6087, 1.256, 1.0467, 0.6087, 0.2547, 44.8, 28);
+INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4004', 4, '220千伏及以上', 0.5827, 1.2024, 1.002, 0.5827, 0.2439, 41.6, 26);
+
+
+-- 峰谷电价策略数据
+-- 默认策略
+INSERT INTO adm_elecprice_strategy (`strategy_code`, `strategy_name`, `strategy_desc`, `repeat_type`, `repeat_param`, `priority`, `edit_flag`) VALUES ('-1', '默认策略', '0:00-24:00 执行平峰电价', 2, null, 0, 0);
+INSERT INTO adm_elecprice_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES ('-1', '00:00:00', '23:59:59', 0);
+
+-- 默认策略
+INSERT INTO adm_elecprice_strategy (`strategy_code`, `strategy_name`, `strategy_desc`, `repeat_type`, `repeat_param`, `priority`, `edit_flag`) VALUES ('1001', '100千伏安', '100千伏安以上峰谷电价', 2, null, 1, 1);
+INSERT INTO adm_elecprice_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES ('1001', '00:00:00', '08:00:00', -1);
+INSERT INTO adm_elecprice_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES ('1001', '08:00:00', '10:00:00', 1);
+INSERT INTO adm_elecprice_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES ('1001', '11:00:00', '17:00:00', 0);
+INSERT INTO adm_elecprice_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES ('1001', '17:00:00', '22:00:00', 1);
+INSERT INTO adm_elecprice_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES ('1001', '22:00:00', '23:59:59', 0);
+
+-- 商户能源计费策略
+INSERT INTO adm_co_charging_config (`area_code`, `elec_unit_price`, `elec_gt_compute_type`, `elec_compute_desc`, `water_unit_price`, `water_gt_compute_type`, `water_compute_desc`) VALUES ('321283124S3001', 0.6068, 1, '1.按户数均摊\n公摊电费每户收费 = 公摊电费 / 户数\n2、按面积分摊\n单户公摊电费 = 公摊电费 * (单户面积 / 总面积)', 3.04, 0, NULL);
+INSERT INTO adm_co_charging_config (`area_code`, `elec_unit_price`, `elec_gt_compute_type`, `elec_compute_desc`, `water_unit_price`, `water_gt_compute_type`, `water_compute_desc`) VALUES ('321283124S3002', 0.6068, 1, '1.按户数均摊\n公摊电费每户收费 = 公摊电费 / 户数\n2、按面积分摊\n单户公摊电费 = 公摊电费 * (单户面积 / 总面积)', 3.04, 0, NULL);
+

+ 58 - 195
ems-cloud/sql/ems_server.sql

@@ -398,9 +398,6 @@ create table adm_service_area (
   unique key ux_area_code(`area_code`)
 ) engine=innodb auto_increment=1 comment = '服务区表';
 
--- 服务区初始数据
-INSERT INTO `adm_service_area` (`area_code`, `area_name`, `short_name`, `service_star`, `city`, `highway`, `direction`, `address`, `attr_org`, `mgr_org`, `open_date`, `land_area`, `floor_area`, `longitude`, `latitude`) VALUES ('321283124S3001', '常泰高速服务区(北区)', '北区', 4, '泰州', 'S30如常高速', '常州方向', '江苏省泰州市泰兴市虹桥镇常泰高速常州方向', null, null, '2025-01-01', '72.5', '6000', '120.050937', '32.071956');
-INSERT INTO `adm_service_area` (`area_code`, `area_name`, `short_name`, `service_star`, `city`, `highway`, `direction`, `address`, `attr_org`, `mgr_org`, `open_date`, `land_area`, `floor_area`, `longitude`, `latitude`) VALUES ('321283124S3002', '常泰高速服务区(南区)', '南区', 4, '泰州', 'S30如常高速', '泰兴方向', '江苏省泰州市泰兴市虹桥镇常泰高速泰州方向', null, null, '2025-01-01', '72.5', '6000', '120.052389', '32.070408');
 
 -- ----------------------------
 -- 建筑基本信息表
@@ -421,21 +418,6 @@ create table adm_area_building (
   unique key ux_structure_code(`bldg_code`)
 ) engine=innodb auto_increment=1 comment = '建筑基本信息表';
 
--- 建筑区块初始数据
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300101', '综合楼', '北区中部', 2, 1, 13.7, 4700, '一层提供商业、餐饮、卫生间、开水服务,二层为办公区、会议区', '321283124S3001');
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300102', '配电泵房', '北区西北角', 1, 0, null, 300, '配电设施,水泵设施工作区', '321283124S3001');
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300103', '维修间&货车之家', '北区东侧', 2, 0, null, 300, '提供车辆维修服务', '321283124S3001');
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300104', '加油站', '北区西南角', 1, 0, null, 200, '提供加油服务', '321283124S3001');
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300105', '警务站', '北区东北角', 1, 0, null, 50000, '警务办公场地', '321283124S3001');
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300106', '停车场', '北区广场', 1, 0, null, 50000, '车位', '321283124S3001');
-
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300201', '综合楼', '南区中部', 2, 1, 14.2, 4788.2, '一层提供商业、餐饮、卫生间、开水服务,二层为员工餐厅、展厅', '321283124S3002');
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300202', '配电泵房', '南区东南角', 1, 0, null, 300, '配电设施,水泵设施工作区', '321283124S3002');
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300203', '维修间&货车之家', '南区西侧', 2, 0, null, 300, '提供车辆维修服务', '321283124S3002');
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300204', '加油站', '南区东北角', 1, 0, null, 200, '提供加油服务', '321283124S3002');
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300205', '宿舍楼', '南区西南角', 2, 0, null, 920, '提供员工住宿服务', '321283124S3002');
-INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300206', '停车场', '南区广场', 1, 0, null, 50000, '车位', '321283124S3002');
-
 
 -- ----------------------------
 -- 建筑划分表
@@ -454,59 +436,6 @@ create table adm_area_building_zoning (
   unique key ux_building_zoning_code(`bldg_code`, `zoning_code`)
 ) engine=innodb auto_increment=1 comment = '建筑区域划分表';
 
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-101', '开水泡面间', 1, '101', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-102', '超市', 1, '102', 200, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-103', '中式糕点', 1, '103', 150, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-104', '特色产品市集', 1, '104', 200, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-105', '奶茶/咖啡', 1, '105', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-106', '中式套餐', 1, '106', 200, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-107', '特色小吃', 1, '107', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-108', '串串/卤味', 1, '108', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-109', '糖葫芦/水果', 1, '109', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-110', '美食广场', 1, '110', 300, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-111', '男卫', 1, '111', 200, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-112', '男盥洗室', 1, '112', 150, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-113', '女卫', 1, '113', 200, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-114', '女盥洗室', 1, '114', 150, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-115', '工具间1', 1, '115', 50, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-116', '工具间2', 1, '116', 50, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-117', '工具间3', 1, '117', 50, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-118', '工具间4', 1, '118', 50, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-119', '货车服务空间', 1, '119', 50, '使用中');
-                                                                                                                                   
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-XK', '小客停车位', 1, 'CW-XK', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-CD', '充电车位', 1, 'CW-CD', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-WZA', '无障碍车位', 1, 'CW-WZA', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-DKC', '大客车停车位', 1, 'CW-DKC', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-HC', '货车车位', 1, 'CW-HC', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-WXP', '危险品车位', 1, 'CW-WXP', 100, '使用中');
-
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-101', '开水泡面间', 1, '101', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-102', '超市', 1, '102', 200, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-103', '中式糕点', 1, '103', 150, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-104', '特色产品市集', 1, '104', 200, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-105', '奶茶/咖啡', 1, '105', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-106', '中式套餐', 1, '106', 200, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-107', '特色小吃', 1, '107', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-108', '串串/卤味', 1, '108', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-109', '糖葫芦/水果', 1, '109', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-110', '美食广场', 1, '110', 300, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-111', '男卫', 1, '111', 200, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-112', '男盥洗室', 1, '112', 150, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-113', '女卫', 1, '113', 200, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-114', '女盥洗室', 1, '114', 150, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-115', '工具间1', 1, '115', 50, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-116', '工具间2', 1, '116', 50, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-117', '工具间3', 1, '117', 50, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-118', '工具间4', 1, '118', 50, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-119', '货车服务空间', 1, '119', 50, '使用中');
-
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-XK', '小客停车位', 1, 'CW-XK', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-CD', '充电车位', 1, 'CW-XK', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-WZA', '无障碍车位', 1, 'CW-XK', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-DKC', '大客车停车位', 1, 'CW-XK', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-HC', '货车车位', 1, 'CW-XK', 100, '使用中');
-INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-WXP','危险品车位', 1, 'CW-XK', 100, '使用中');
 
 -- ----------------------------
 -- 能源设施/系统表
@@ -526,20 +455,6 @@ create table adm_ems_facs  (
   unique key ux_ems_facs_code(`facs_code`)
 ) engine=innodb auto_increment=1 comment = '能源设施表';
 
--- 能源设施/系统DEMO数据
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('W201', '北区-供电网', 'W', 'W2', 1, '321283124S3001');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('W202', '南区-供电网', 'W', 'W2', 1, '321283124S3002');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('E501', '北区-光伏', 'E', 'E5', 1, '321283124S3001');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('E502', '南区-光伏', 'E', 'E5', 1, '321283124S3002');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z101', '北区-室内照明', 'Z', 'Z001', 1, '321283124S3001');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z102', '北区-室外照明', 'Z', 'Z002', 1, '321283124S3001');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z110', '北区-公共设施', 'Z', 'Z010', 1, '321283124S3001');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z120', '北区-空调设施', 'Z', 'Z020', 1, '321283124S3001');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z201', '南区-室内照明', 'Z', 'Z001', 1, '321283124S3002');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z202', '南区-室外照明', 'Z', 'Z002', 1, '321283124S3002');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z210', '南区-公共设施', 'Z', 'Z010', 1, '321283124S3002');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z220', '南区-空调设施', 'Z', 'Z020', 1, '321283124S3002');
-
 
 -- ----------------------------
 -- 能源设施属性表
@@ -556,10 +471,6 @@ create table adm_ems_facs_attr  (
    key ux_ems_facs_code(`facs_code`)
 ) engine=innodb auto_increment=1 comment = '能源设施属性表';
 
--- 设施属性DEMO数据
-INSERT INTO `adm_ems_facs_attr` (`facs_code`, `attr_name`, `attr_desc`, `attr_value`, `attr_unit`) VALUES ('W201', 'input_load', '进线负荷', '293.55', 'kw/h');
-INSERT INTO `adm_ems_facs_attr` (`facs_code`, `attr_name`, `attr_desc`, `attr_value`, `attr_unit`) VALUES ('E501', 'installed_capacity', '装机容量', '2000', 'MW');
-
 
 -- ----------------------------
 -- 能源设施能力表
@@ -575,10 +486,6 @@ create table adm_ems_facs_ability  (
   key ux_ems_facs_ability(`facs_code`)
 ) engine=innodb auto_increment=1 comment = '能源设施能力表';
 
--- 设施属性DEMO数据
-INSERT INTO `adm_ems_facs_ability` (`facs_code`, `ability_name`, `ability_desc`, `ability_param`) VALUES ('Z020', '开启', '开启空调', '{\"enable\":1}');
-INSERT INTO `adm_ems_facs_ability` (`facs_code`, `ability_name`, `ability_desc`, `ability_param`) VALUES ('Z020', '关闭', '关闭空调', '{\"enable\":0}');
-
 
 -- ----------------------------
 -- 能源设施事件表
@@ -596,8 +503,6 @@ create table adm_ems_facs_event  (
   key ux_ems_facs_event(`facs_code`)
 ) engine=innodb auto_increment=1 comment = '能源设施事件表';
 
-INSERT INTO `adm_ems_facs_event` (`facs_code`, `event_name`, `event_type`, `event_desc`, `event_code`, `ext_event_code`) VALUES ('Z101', '电压告警', '2', '电压过低告警', 'LOW_V',  '10001001');
-
 
 -- ----------------------------
 -- 能源子系统表
@@ -638,11 +543,6 @@ create table adm_ems_facs_flow_rel  (
   key idx_ems_facs_flow_rel_code(`export_facs_code`,`input_facs_code`)
 ) engine=innodb auto_increment=1 comment = '能源设施能流关系表';
 
--- 能源设施DEMO数据
-INSERT INTO `adm_ems_facs_flow_rel` (`code`, `export_facs_code`, `input_facs_code`, `ems_cls`, `state`, `action_type`) VALUES ('W201_Z101', 'W201', 'Z101', '45', 1, '4501');
-INSERT INTO `adm_ems_facs_flow_rel` (`code`, `export_facs_code`, `input_facs_code`, `ems_cls`, `state`, `action_type`) VALUES ('E501_W201', 'E501', 'W201', '45', 1, '4502');
-INSERT INTO `adm_ems_facs_flow_rel` (`code`, `export_facs_code`, `input_facs_code`, `ems_cls`, `state`, `action_type`) VALUES ('E501_Z101', 'E501', 'Z101', '45', 1, '4505');
-
 
 -- ----------------------------
 -- 用能设备表
@@ -679,6 +579,7 @@ create table adm_meter_device  (
   `obj_code`        varchar(32)     not null                     comment '计量对象编码',
   `col_cycle`       int             default null                 comment '采集周期',
   `col_mode`        int             default null                 comment '采集方式',
+  `magnification`   int             default 1                    comment '倍率',
   `spec_desc`       varchar(128)    default null                 comment '规格描述',
   primary key (`id`),
   unique key ux_meter_device(`device_code`)
@@ -833,6 +734,7 @@ drop table if exists adm_op_alarm;
 create table adm_op_alarm  (
   `id`                  bigint(20)      not null auto_increment      comment '序号',
   `area_code`           varchar(32)     not null                     comment '园区代码',
+  `system_code`         varchar(16)     default null                 comment '子系统代码',
   `obj_type`            int             not null                     comment '对象类型 0:园区,1:区块,2:设施,3:设备',
   `obj_code`            varchar(32)     not null                     comment '对象代码',
   `alarm_date`          date            default null                 comment '告警日期',
@@ -916,59 +818,40 @@ create table adm_obj_tag_rel (
   key inx_obj_tag_rel(`tag_type`, `tag_code`)
 ) engine=innodb auto_increment=1 comment = '对象&标签关系表';
 
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-101','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-102','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-103','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-104','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-105','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-106','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-107','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-108','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-109','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-110','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-111','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-112','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-113','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-114','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-115','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-116','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-117','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-118','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-119','Area_00');
-
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-CD','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-DKC','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-HC','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-WXP','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-WZA','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-XK','Area_00');
-
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-101','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-102','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-103','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-104','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-105','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-106','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-107','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-108','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-109','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-110','Area_01');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-111','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-112','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-113','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-114','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-115','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-116','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-117','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-118','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-119','Area_00');
-
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-CD','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-DKC','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-HC','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-WXP','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-WZA','Area_00');
-insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-XK','Area_00');
+
+-- ----------------------------
+-- 手动抄表记录表
+-- ----------------------------
+drop table if exists adm_meter_reading_manual;
+create table adm_meter_reading_manual (
+  `id`               bigint(20)      not null auto_increment      comment '序号',
+  `device_code`      varchar(16)     not null                     comment '计量设备code',
+  `area_code`        varchar(16)     not null                     comment '服务区代码',
+  `year`             year            not null                     comment '年份yyyy',
+  `meter_month`      varchar(6)      not null                     comment '计量月yyyyMM',
+  `last_reading`     int             default null                 comment '上次示数',
+  `last_time`        date            default null                 comment '上次抄表日期',
+  `meter_reading`    int             not null                     comment '抄表值',
+  `meter_time`       date            not null                     comment '本次抄表日期',
+  `increase`         int             not null                     comment '增量',
+  `create_time`      datetime        default null                 comment '创建时间',
+  `update_time`      datetime        default null                 comment '更新时间',
+  primary key (`id`),
+  key meter_reading_manual(`device_code`)
+) engine=innodb auto_increment=1 comment = '手动抄表记录表';
+
+
+-- ----------------------------
+-- 对象&标签关系表
+-- ----------------------------
+drop table if exists adm_obj_tag_rel;
+create table adm_obj_tag_rel (
+  `tag_type`         int             not null                     comment '标签类型',
+  `tag_code`         varchar(64)     not null                     comment '标签代码',
+  `obj_code`         varchar(64)     not null                     comment '对象代码',
+  key inx_obj_tag_rel(`tag_type`, `tag_code`)
+) engine=innodb auto_increment=1 comment = '对象&标签关系表';
+
 
 -- ----------------------------
 -- 服务区用电属性表
@@ -987,8 +870,6 @@ create table adm_area_elec_attr (
   unique key ux_area_elec_attr(`area_code`)
 ) engine=innodb auto_increment=1 comment = '服务区用电属性表';
 
-INSERT INTO adm_area_elec_attr (`area_code`, `price_code`, `req_capacity_flag`, `trans_capacity`, `req_quantity`) VALUES ('321283124S3001', '4001', 1, 630, NULL);
-INSERT INTO adm_area_elec_attr (`area_code`, `price_code`, `req_capacity_flag`, `trans_capacity`, `req_quantity`) VALUES ('321283124S3002', '4001', 1, 630, NULL);
 
 -- ----------------------------
 -- 国网电价配置表
@@ -1010,16 +891,6 @@ create table adm_gw_elecprice_config (
   unique key ux_gw_elecprice_config(`cfg_code`)
 ) engine=innodb auto_increment=1 comment = '电价配置表';
 
--- 单一制初始电价数据
-INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('3001', 3, '不满1千伏', 0.7624, 1.5296, 1.2747, 0.7624, 0.3445, NULL, NULL);
-INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('3002', 3, '1-10(20)千伏', 0.7364, 1.4774, 1.2312, 0.7364, 0.3327, NULL, NULL);
-INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('3003', 3, '35千伏', 0.7114, 1.4273, 1.1894, 0.7114, 0.3214, NULL, NULL);
-
--- 两部制初始电价数据
-INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4001', 4, '1-10(20)千伏', 0.6587, 1.3592, 1.1327, 0.6587, 0.2757, 51.2, 32);
-INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4002', 4, '35千伏', 0.6337, 1.3076, 1.0897, 0.6337, 0.2652, 48, 30);
-INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4003', 4, '110千伏', 0.6087, 1.256, 1.0467, 0.6087, 0.2547, 44.8, 28);
-INSERT INTO adm_gw_elecprice_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4004', 4, '220千伏及以上', 0.5827, 1.2024, 1.002, 0.5827, 0.2439, 41.6, 26);
 
 -- ----------------------------
 -- 光伏电价配置表
@@ -1056,8 +927,6 @@ create table adm_elecprice_strategy (
   unique key ux_elecprice_strategy(`strategy_code`)
 ) engine=innodb auto_increment=1 comment = '电价策略表';
 
--- 默认策略
-INSERT INTO adm_elecprice_strategy (`strategy_code`, `strategy_name`, `strategy_desc`, `repeat_type`, `repeat_param`, `priority`) VALUES ('-1', '默认策略', '0:00-24:00 执行平峰电价', 2, null, 0);
 
 -- ----------------------------
 -- 电价策略小时表
@@ -1072,8 +941,6 @@ create table adm_elecprice_strategy_hour (
   primary key (`id`)
 ) engine=innodb auto_increment=1 comment = '电价策略小时表';
 
-INSERT INTO adm_elecprice_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES ('-1', '00:00:00', '23:59:59', 0);
-
 
 -- ----------------------------
 -- 商户能源计费配置
@@ -1094,27 +961,6 @@ create table adm_co_charging_config (
 
 
 -- ----------------------------
--- 商户能源计费配置
--- ----------------------------
-drop table if exists adm_co_charging_config;
-create table adm_co_charging_config (
-  `id`                    bigint(20)      not null auto_increment      comment '序号',
-  `area_code`             varchar(16)     not null                     comment '服务区代码',
-  `elec_unit_price`       double          not null                     comment '电计量单价 1度',
-  `elec_gt_compute_type`  int             not null                     comment '电公摊计算类型',
-  `elec_compute_desc`     varchar(200)    default null                 comment '电费计算说明',
-  `water_unit_price`      double          not null                     comment '水计量单价 1吨',
-  `water_gt_compute_type` int             not null                     comment '水公摊计算类型',
-  `water_compute_desc`    varchar(200)    default null                 comment '水费计算说明',
-  primary key (`id`),
-  unique key ux_co_charging_config(`area_code`)
-) engine=innodb auto_increment=1 comment = '商户能源计费配置';
-
-INSERT INTO adm_co_charging_config (`area_code`, `elec_unit_price`, `elec_gt_compute_type`, `elec_compute_desc`, `water_unit_price`, `water_gt_compute_type`, `water_compute_desc`) VALUES ('321283124S3001', 0.6068, 1, '1.按户数均摊\n公摊电费每户收费 = 公摊电费 / 户数\n2、按面积分摊\n单户公摊电费 = 公摊电费 * (单户面积 / 总面积)', 3.04, 0, NULL);
-INSERT INTO adm_co_charging_config (`area_code`, `elec_unit_price`, `elec_gt_compute_type`, `elec_compute_desc`, `water_unit_price`, `water_gt_compute_type`, `water_compute_desc`) VALUES ('321283124S3002', 0.6068, 1, '1.按户数均摊\n公摊电费每户收费 = 公摊电费 / 户数\n2、按面积分摊\n单户公摊电费 = 公摊电费 * (单户面积 / 总面积)', 3.04, 0, NULL);
-
-
--- ----------------------------
 -- 商户能源计费关系表
 -- ----------------------------
 drop table if exists adm_co_charging_config_rel;
@@ -1238,6 +1084,23 @@ create table adm_ems_ca_meter_d (
 
 
 -- ----------------------------
+-- 能源指标范围表
+-- ----------------------------
+drop table if exists adm_ems_index_range;
+create table adm_ems_index_range (
+  `id`                        bigint(20)      not null auto_increment      comment '序号',
+  `obj_code`                  varchar(16)     not null                     comment '对象代码',
+  `obj_type`                  int             not null                     comment '对象类型',
+  `index_name`                varchar(64)     not null                     comment '指标名称',
+  `index_desc`                varchar(200)    default null                 comment '指标描述',
+  `index_upper_limit`         double          default null                 comment '指标上限',
+  `index_lower_limit`         double          default null                 comment '指标下限',
+  primary key (`id`),
+  key ux_ems_elec_pg_index(`obj_code`)
+) engine=innodb auto_increment=1 comment = '能源指标范围表';
+
+
+-- ----------------------------
 -- 电网设施指标表
 -- ----------------------------
 drop table if exists adm_ems_elec_pg_index;
@@ -1248,7 +1111,7 @@ create table adm_ems_elec_pg_index (
   `date`                      date            not null                     comment '日期 yyyy-MM-dd',
   `time`                      datetime        not null                     comment '时间 yyyy-MM-dd HH:mm:ss',
   `voltage`                   double          default null                 comment '电压 单位:kV(千伏)',
-  `amperage`                  double          default null                 comment '电流 单位:A(安培)',
+  `electricity`               double          default null                 comment '电流 单位:A(安培)',
   `power`                     double          default null                 comment '功率 单位:kW(千瓦)',
   primary key (`id`),
   unique key ux_ems_elec_pg_index(`facs_code`, `time`)
@@ -1266,7 +1129,7 @@ create table adm_ems_elec_pv_index (
   `date`                      date            not null                     comment '日期 yyyy-MM-dd',
   `time`                      datetime        not null                     comment '时间 yyyy-MM-dd HH:mm:ss',
   `voltage`                   double          default null                 comment '电压 单位:kV(千伏)',
-  `amperage`                  double          default null                 comment '电流 单位:A(安培)',
+  `electricity`               double          default null                 comment '电流 单位:A(安培)',
   `power`                     double          default null                 comment '功率 单位:kW(千瓦)',
   primary key (`id`),
   unique key ux_ems_elec_pg_index(`facs_code`, `time`)
@@ -1284,9 +1147,9 @@ create table adm_ems_elec_store_index (
   `date`                      date            not null                     comment '日期 yyyy-MM-dd',
   `time`                      datetime        not null                     comment '时间 yyyy-MM-dd HH:mm:ss',
   `input_voltage`             double          default null                 comment '输入电压 单位:kV(千伏)',
-  `input_amperage`            double          default null                 comment '输入电流 单位:A(安培)',
+  `input_electricity`         double          default null                 comment '输入电流 单位:A(安培)',
   `output_voltage`            double          default null                 comment '输出电压 单位:kV(千伏)',
-  `output_amperage`           double          default null                 comment '输出电流 单位:A(安培)',
+  `output_electricity`        double          default null                 comment '输出电流 单位:A(安培)',
   `current_capacity`          double          default null                 comment '当前容量 单位:kW-h(千瓦·时)',
   primary key (`id`),
   unique key ux_ems_elec_store_index(`facs_code`, `time`)
@@ -1304,7 +1167,7 @@ create table adm_ems_elec_load_index (
   `date`                      date            not null                     comment '日期 yyyy-MM-dd',
   `time`                      datetime        not null                     comment '时间 yyyy-MM-dd HH:mm:ss',
   `voltage`                   double          default null                 comment '电压 单位:kV(千伏)',
-  `amperage`                  double          default null                 comment '电流 单位:A(安培)',
+  `electricity`               double          default null                 comment '电流 单位:A(安培)',
   `power`                     double          default null                 comment '功率 单位:kW(千瓦)',
   primary key (`id`),
   unique key ux_ems_elec_load_index(`facs_code`, `time`)

+ 261 - 318
ems-cloud/sql/ems_sys.sql

@@ -172,35 +172,33 @@ insert into sys_menu values ('99', '开发工具', '0', '99', 'tool',
 insert into sys_menu values ('100',  '服务区',         '1',   '1',   'hp-view-sa',         'view/servicearea',          '', 1, 0, 'C', '0', '0',   'view:service-area',      'servicearea',    'admin', sysdate(), '', null, '园区能源概览');
 insert into sys_menu values ('101',  '主路光伏',       '1',   '2',   'hp-view-rpv',        'view/road/photovoltaic',    '', 1, 0, 'C', '0', '0',   'view:road-pv',           'photovoltaic',   'admin', sysdate(), '', null, '主路光伏概览');
 
-    insert into sys_menu values ('102',  '源网',            '2',    '1',  'strategy-pg',        'mgr/powergrid',             '', 1, 0, 'C', '0', '0',   'power-mgr:pg',           'powergrid',      'admin', sysdate(), '', null, '源网协调');
+insert into sys_menu values ('102',  '源网',            '2',    '1',  'strategy-pg',        'mgr/powergrid',             '', 1, 0, 'C', '0', '0',   'power-mgr:pg',           'powergrid',      'admin', sysdate(), '', null, '源网协调');
 insert into sys_menu values ('103',  '储能',            '2',    '2',  'strategy-gs',        'mgr/powerstore',            '', 1, 0, 'C', '0', '0',   'power-mgr:gs',           'powerstore',     'admin', sysdate(), '', null, '网储互动');
-insert into sys_menu values ('104',  '负荷',            '2',    '3',  'strategy-use',       'mgr/poweruse',              '', 1, 0, 'C', '0', '0',   'power-mgr:use',          'powerload',      'admin', sysdate(), '', null, '源荷互动');
-insert into sys_menu values ('105',  '配电',            '2',    '4',  'strategy-dist',      'mgr/powerdist',             '', 1, 0, 'C', '0', '0',   'power-mgr:dist',         'powerdist',      'admin', sysdate(), '', null, '配电监控');
-insert into sys_menu values ('106',  '调度',            '2',    '5',  'strategy-mgr',       'mgr/strategy',              '', 1, 0, 'C', '0', '0',   'power-mgr:strategy',     'strategy',       'admin', sysdate(), '', null, '管能策略');
-
-insert into sys_menu values ('107',  '产能分析',       '3',    '1',  'power-prod',         'analysis/power/prod',       '', 1, 0, 'C', '0', '0',    'analysis:power:prod',    'energyprod',     'admin', sysdate(), '', null, '产能分析');
-insert into sys_menu values ('108',  '储能分析',       '3',    '2',  'power-store',        'analysis/power/store',      '', 1, 0, 'C', '0', '0',    'analysis:power:store',   'energystore',    'admin', sysdate(), '', null, '储能分析');
-insert into sys_menu values ('109',  '用能分析',       '3',    '3',  'power-consume',      'analysis/power/consume',    '', 1, 0, 'C', '0', '0',    'analysis:power:consume', 'energyconsume',  'admin', sysdate(), '', null, '用能分析');
-insert into sys_menu values ('110',  '节能分析',       '3',    '4',  'power-save',         'analysis/power/save',       '', 1, 0, 'C', '0', '0',    'analysis:power:save',    'energysave',     'admin', sysdate(), '', null, '节能分析');
-insert into sys_menu values ('111',  '趋势预测',       '3',    '5',  'prediction',         '',                          '', 1, 0, 'M', '0', '0',    '',                       'prediction',     'admin', sysdate(), '', null, '趋势预测');
-insert into sys_menu values ('112',  '数据报表',       '3',    '6',  'analysis-statement', '',                          '', 1, 0, 'M', '0', '0',    'analysis:statement',     'statement',      'admin', sysdate(), '', null, '数据报表');
-
-insert into sys_menu values ('113',  '碳排计量',       '4',    '1',  'ca-emission',        'ca/emission',            '', 1, 0, 'C', '0', '0',   'ca-analysis:emission',   'caemission',     'admin', sysdate(), '', null, '碳排分析');
-insert into sys_menu values ('114',  '碳汇测算',       '4',    '2',  'ca-sink',            'ca/sink',                '', 1, 0, 'C', '0', '0',   'ca-analysis:sink',       'casink',         'admin', sysdate(), '', null, '碳汇分析');
-
-insert into sys_menu values ('115',  '设备状态',       '5',    '1',  'device-state',        'devmgr/state',           '', 1, 0, 'C', '0', '0',  'device:status',          'devicestatus',   'admin', sysdate(), '', null, '设备状态');
-insert into sys_menu values ('116',  '设备台账',       '5',    '2',  'device-el',          'device/el',              '', 1, 0, 'C', '0', '0',   'device:el',              'excel',       'admin', sysdate(), '', null, '设备台账');
-insert into sys_menu values ('117',  '设备告警',       '5',    '3',  'analysis-warn',      'analysis/device/warn',   '', 1, 0, 'C', '0', '0',   'analysis:device',        'deviceanalyze',  'admin', sysdate(), '', null, '设备分析');
-
-insert into sys_menu values ('118',  '告警策略',       '6',    '1',  'warn-strategy',      'warn/strategy',          '', 1, 0, 'C', '0', '0',   'warn:strategy',          'warnstrategy',   'admin', sysdate(), '', null, '告警策略');
-insert into sys_menu values ('119',  '告警列表',       '6',    '2',  'warn-list',          'warn/list',              '', 1, 0, 'C', '0', '0',   'warn:list',              'warnmsg',        'admin', sysdate(), '', null, '告警策略');
-insert into sys_menu values ('120',  '巡检任务',       '6',    '3',  'oper-task',          'oper-mgr/task',          '', 1, 0, 'C', '0', '0',   'oper-mgr:task',          'task',           'admin', sysdate(), '', null, '巡检任务');
-insert into sys_menu values ('121',  '巡检报告',       '6',    '4',  'oper-report',        'oper-mgr/report',        '', 1, 0, 'C', '0', '0',   'oper-mgr:report',        'note',           'admin', sysdate(), '', null, '巡检报告');
-
-insert into sys_menu values ('122',  '建筑区块',       '7',    '1',  'buildingcfg',        '',                       '', 1, 0, 'M', '0', '0',   'basecfg:building',       'building',       'admin', sysdate(), '', null, '建筑区块菜单');
-insert into sys_menu values ('123',  '设备设施',       '7',    '2',  'devicecfg',          '',                       '', 1, 0, 'M', '0', '0',   'basecfg:device',         'devicemgr',      'admin', sysdate(), '', null, '设备设施菜单');
-insert into sys_menu values ('124',  '能源计量',       '7',    '3',  'energycfg',          '',                       '', 1, 0, 'M', '0', '0',   'basecfg:energy',         'energy',         'admin', sysdate(), '', null, '能源计量菜单');
-insert into sys_menu values ('125',  '标签管理',       '7',    '4',  'emstag',             'basecfg/tag',            '', 1, 0, 'C', '0', '0',   'basecfg:tag:list',       'tree',           'admin', sysdate(), '', null, '标签菜单');
+insert into sys_menu values ('104',  '负荷',            '2',    '3',  'strategy-use',       'mgr/poweruse',              '', 1, 0, 'C', '0', '0',   'power-mgr:use',           'powerload',      'admin', sysdate(), '', null, '源荷互动');
+insert into sys_menu values ('105',  '调度',           '2',    '4',  'strategy-mgr',       'mgr/strategy',              '', 1, 0, 'C', '0', '0',   'power-mgr:strategy',     'strategy',       'admin', sysdate(), '', null, '管能策略');
+
+insert into sys_menu values ('106',  '产能分析',       '3',    '1',  'power-prod',         'analysis/power/prod',       '', 1, 0, 'C', '0', '0',    'analysis:power:prod',    'energyprod',     'admin', sysdate(), '', null, '产能分析');
+insert into sys_menu values ('107',  '储能分析',       '3',    '2',  'power-store',        'analysis/power/store',      '', 1, 0, 'C', '0', '0',    'analysis:power:store',   'energystore',    'admin', sysdate(), '', null, '储能分析');
+insert into sys_menu values ('108',  '用能分析',       '3',    '3',  'power-consume',      'analysis/power/consume',    '', 1, 0, 'C', '0', '0',    'analysis:power:consume', 'energyconsume',  'admin', sysdate(), '', null, '用能分析');
+insert into sys_menu values ('109',  '节能分析',       '3',    '4',  'power-save',         'analysis/power/save',       '', 1, 0, 'C', '0', '0',    'analysis:power:save',    'energysave',     'admin', sysdate(), '', null, '节能分析');
+insert into sys_menu values ('110',  '趋势预测',       '3',    '5',  'prediction',         '',                          '', 1, 0, 'M', '0', '0',    '',                       'prediction',     'admin', sysdate(), '', null, '趋势预测');
+insert into sys_menu values ('111',  '数据报表',       '3',    '6',  'analysis-statement', '',                          '', 1, 0, 'M', '0', '0',    'analysis:statement',     'statement',      'admin', sysdate(), '', null, '数据报表');
+
+insert into sys_menu values ('112',  '碳排计量',       '4',    '1',  'ca-emission',        'ca/emission',            '', 1, 0, 'C', '0', '0',   'ca-analysis:emission',   'caemission',     'admin', sysdate(), '', null, '碳排分析');
+insert into sys_menu values ('113',  '碳汇测算',       '4',    '2',  'ca-sink',            'ca/sink',                '', 1, 0, 'C', '0', '0',   'ca-analysis:sink',       'casink',         'admin', sysdate(), '', null, '碳汇分析');
+
+insert into sys_menu values ('114',  '设备状态',       '5',    '1',  'device-state',        'devmgr/state',           '', 1, 0, 'C', '0', '0',  'device:status',          'devicestatus',   'admin', sysdate(), '', null, '设备状态');
+insert into sys_menu values ('115',  '设备台账',       '5',    '2',  'device-el',          'devmgr/el',              '', 1, 0, 'C', '0', '0',   'device:el',              'excel',       'admin', sysdate(), '', null, '设备台账');
+insert into sys_menu values ('116',  '设备告警',       '5',    '3',  'analysis-warn',      'analysis/device/warn',   '', 1, 0, 'C', '0', '0',   'analysis:device',        'deviceanalyze',  'admin', sysdate(), '', null, '设备分析');
+
+insert into sys_menu values ('117',  '告警策略',       '6',    '1',  'warn-strategy',      'warn/strategy',          '', 1, 0, 'C', '0', '0',   'warn:strategy',          'warnstrategy',   'admin', sysdate(), '', null, '告警策略');
+insert into sys_menu values ('118',  '告警列表',       '6',    '2',  'warn-list',          'warn/list',              '', 1, 0, 'C', '0', '0',   'warn:list',              'warnmsg',        'admin', sysdate(), '', null, '告警策略');
+insert into sys_menu values ('119',  '巡检任务',       '6',    '3',  'oper-task',          'oper-mgr/task',          '', 1, 0, 'C', '0', '0',   'oper-mgr:task',          'task',           'admin', sysdate(), '', null, '巡检任务');
+insert into sys_menu values ('120',  '巡检报告',       '6',    '4',  'oper-report',        'oper-mgr/report',        '', 1, 0, 'C', '0', '0',   'oper-mgr:report',        'note',           'admin', sysdate(), '', null, '巡检报告');
+
+insert into sys_menu values ('121',  '建筑区块',       '7',    '1',  'buildingcfg',        '',                       '', 1, 0, 'M', '0', '0',   'basecfg:building',       'building',       'admin', sysdate(), '', null, '用户管理菜单');
+insert into sys_menu values ('122',  '设备设施',       '7',    '2',  'devicecfg',          '',                       '', 1, 0, 'M', '0', '0',   'basecfg:device',         'devicemgr',      'admin', sysdate(), '', null, '用户管理菜单');
+insert into sys_menu values ('123',  '能源计量',       '7',    '3',  'energycfg',          '',                       '', 1, 0, 'M', '0', '0',   'basecfg:energy',         'energy',         'admin', sysdate(), '', null, '用户管理菜单');
 
 insert into sys_menu values ('170',  '用户管理',       '8',   '1',  'user',               'system/user/index',      '', 1, 0, 'C', '0', '0',   'system:user:list',       'user',           'admin', sysdate(), '', null, '用户管理菜单');
 insert into sys_menu values ('171',  '角色管理',       '8',   '2',  'role',               'system/role/index',      '', 1, 0, 'C', '0', '0',   'system:role:list',       'peoples',        'admin', sysdate(), '', null, '角色管理菜单');
@@ -213,44 +211,41 @@ insert into sys_menu values ('177',  '通知公告',       '8',   '8',  'notice'
 insert into sys_menu values ('178',  '日志管理',       '8',   '9',  'log',                '',                       '', 1, 0, 'M', '0', '0',   '',                       'log',            'admin', sysdate(), '', null, '日志管理菜单');
 insert into sys_menu values ('179',  '在线用户',       '8',   '10', 'online',             'monitor/online/index',   '', 1, 0, 'C', '0', '0',   'monitor:online:list',    'online',         'admin', sysdate(), '', null, '在线用户菜单');
 
-insert into sys_menu values ('180',  '系统信息',       '9',   '1',  'adapter-subsystem',  'adapter/subsystem/index',  '', 1, 0, 'C', '0', '0',   'adapter:subsystem:list',  'note',           'admin', sysdate(), '', null, '光伏');
-insert into sys_menu values ('181',  '光伏',          '9',   '2',  'adapter-pv',         'adapter/pv/index',         '', 1, 0, 'C', '0', '0',   'adapter:pv:list',         'photovoltaic',   'admin', sysdate(), '', null, '光伏');
-insert into sys_menu values ('182',  '光储直柔',       '9',   '3',  'adapter-gczr',       'adapter/gczr/index',       '', 1, 0, 'C', '0', '0',   'adapter:gczr:list',       'deviceaccess',   'admin', sysdate(), '', null, '光储直柔');
-insert into sys_menu values ('183',  '光储充',         '9',   '4',  'adapter-gcc',        'adapter/gcc/index',        '', 1, 0, 'C', '0', '0',   'adapter:gcc:list',       'energyconsume',   'admin', sysdate(), '', null, '光储充');
-insert into sys_menu values ('184',  '充电桩',         '9',   '5',  'adapter-cdz',        'adapter/cdz/index',        '', 1, 0, 'C', '0', '0',   'adapter:cdz:list',       'powerstore',      'admin', sysdate(), '', null, '充电桩');
-insert into sys_menu values ('185',  '智慧照明',       '9',   '6',  'adapter-zm',         'adapter/zm/index',         '', 1, 0, 'C', '0', '0',   'adapter:zm:list',        'illumination',    'admin', sysdate(), '', null, '智慧照明');
-insert into sys_menu values ('186',  '智慧海绵',       '9',   '7',  'adapter-hm',         'adapter/hm/index',         '', 1, 0, 'C', '0', '0',   'adapter:hm:list',        'sponge',          'admin', sysdate(), '', null, '智慧海绵');
-insert into sys_menu values ('187',  '垃圾厨余',       '9',   '8',  'adapter-ljcy',       'adapter/ljcy/index',       '', 1, 0, 'C', '0', '0',   'adapter:ljcy:list',      'foodwaste',       'admin', sysdate(), '', null, '垃圾厨余');
-insert into sys_menu values ('188',  '能耗监测',       '9',   '9',  'adapter-nhjc',       'adapter/nhjc/index',       '', 1, 0, 'C', '0', '0',   'adapter:nhjc:list',      'econsumption',    'admin', sysdate(), '', null, '能耗监测');
-insert into sys_menu values ('189',  '设备管理',       '9',   '10', 'adapter-devc',       'adapter/devc/index',       '', 1, 0, 'M', '0', '0',   'adapter:devc:list',      'devicemgr',         'admin', sysdate(), '', null, '设备管理');
+insert into sys_menu values ('180',  '光伏',          '9',   '1',  'adapter-pv',         'adapter/pv/index',      '', 1, 0, 'C', '0', '0',   'adapter:user:list',       'photovoltaic',        'admin', sysdate(), '', null, '光伏');
+insert into sys_menu values ('181',  '光储直柔',       '9',   '2',  'adapter-gczr',       'adapter/gczr/index',    '', 1, 0, 'C', '0', '0',   'adapter:role:list',       'deviceaccess',      'admin', sysdate(), '', null, '光储直柔');
+insert into sys_menu values ('182',  '光储充',         '9',   '3',  'adapter-gcc',        'adapter/gcc/index',     '', 1, 0, 'C', '0', '0',   'adapter:menu:list',       'energyconsume',       'admin', sysdate(), '', null, '光储充');
+insert into sys_menu values ('183',  '充电桩',         '9',   '4',  'adapter-cdz',        'adapter/cdz/index',     '', 1, 0, 'C', '0', '0',   'adapter:dept:list',       'powerstore',       'admin', sysdate(), '', null, '充电桩');
+insert into sys_menu values ('184',  '智慧照明',       '9',   '5',  'adapter-zm',         'adapter/zm/index',      '', 1, 0, 'C', '0', '0',   'adapter:post:list',       'system',        'admin', sysdate(), '', null, '智慧照明');
+insert into sys_menu values ('185',  '智慧海绵',       '9',   '6',  'adapter-hm',         'adapter/hm/index',      '', 1, 0, 'C', '0', '0',   'adapter:dict:list',       'system',        'admin', sysdate(), '', null, '智慧海绵');
+insert into sys_menu values ('186',  '垃圾厨余',       '9',   '7',  'adapter-ljcy',       'adapter/ljcy/index',    '', 1, 0, 'C', '0', '0',   'adapter:config:list',     'system',      'admin', sysdate(), '', null, '垃圾厨余');
+insert into sys_menu values ('187',  '能耗监测',       '9',   '8',  'adapter-nhjc',       'adapter/nhjc/index',    '', 1, 0, 'C', '0', '0',   'adapter:notice:list',     'system',      'admin', sysdate(), '', null, '能耗监测');
+insert into sys_menu values ('188',  '设备管理',       '9',   '9',  'adapter-devc',       'adapter/devc/index',    '', 1, 0, 'M', '0', '0',   'adapter:devc:list',       'system',      'admin', sysdate(), '', null, '设备管理');
 INSERT INTO sys_menu VALUES (190, '任务调度', 8, 0, 'task/job', 'monitor/job/index', NULL, 1, 0, 'C', '0', '0', 'monitor:job', 'date-range', 'admin', sysdate(), '', NULL, '任务调度');
 
-insert into sys_menu values ('997',  '表单构建',       '99',   '1',  'build',              'tool/build/index',       '', 1, 0, 'C', '0', '0',   'tool:build:list',        'build',          'admin', sysdate(), '', null, '表单构建菜单');
-insert into sys_menu values ('998',  '代码生成',       '99',   '2',  'gen',                'tool/gen/index',         '', 1, 0, 'C', '0', '0',   'tool:gen:list',          'code',           'admin', sysdate(), '', null, '代码生成菜单');
-insert into sys_menu values ('999',  '系统接口',       '99',   '3',  'http://localhost:9100/swagger-ui/index.html',   '', '', 0, 0, 'C', '0', '0', 'tool:swagger:list',   'swagger',        'admin', sysdate(), '', null, '系统接口菜单');
+insert into sys_menu values ('998',  '表单构建',       '99',   '1',  'build',              'tool/build/index',       '', 1, 0, 'C', '0', '0',   'tool:build:list',        'build',          'admin', sysdate(), '', null, '表单构建菜单');
+insert into sys_menu values ('999',  '代码生成',       '99',   '2',  'gen',                'tool/gen/index',         '', 1, 0, 'C', '0', '0',   'tool:gen:list',          'code',           'admin', sysdate(), '', null, '代码生成菜单');
 
 -- 三级菜单
 -- 预测菜单
-insert into sys_menu values ('1110',  '产能预测', '111', '1',  'prediction-prod',    'prediction/prod',        '', 1, 0, 'C', '0', '0',   'prediction:prod',        'energyprod',     'admin', sysdate(), '', null, '产能预测');
-insert into sys_menu values ('1111',  '用能预测', '111', '2',  'prediction-consume', 'prediction/consume',     '', 1, 0, 'C', '0', '0',   'prediction:consume',     'energyconsume',  'admin', sysdate(), '', null, '用能预测');
-insert into sys_menu values ('1112',  '碳排预测', '111', '3',  'prediction-ca',      'prediction/ca',          '', 1, 0, 'C', '0', '0',   'prediction:ca',          'caemission',     'admin', sysdate(), '', null, '碳排预测');
+insert into sys_menu values ('1100',  '产能预测', '110', '1',  'prediction-prod',    'prediction/prod',        '', 1, 0, 'C', '0', '0',   'prediction:prod',        'energyprod',     'admin', sysdate(), '', null, '产能预测');
+insert into sys_menu values ('1101',  '用能预测', '110', '2',  'prediction-consume', 'prediction/consume',     '', 1, 0, 'C', '0', '0',   'prediction:consume',     'energyconsume',  'admin', sysdate(), '', null, '用能预测');
+insert into sys_menu values ('1102',  '碳排预测', '110', '3',  'prediction-ca',      'prediction/ca',          '', 1, 0, 'C', '0', '0',   'prediction:ca',          'caemission',     'admin', sysdate(), '', null, '碳排预测');
 -- 报表菜单
-insert into sys_menu values ('1120',  '产能报表',   '112', '1',  'statement-prod',    'analysis/statement/prod',     '', 1, 0, 'C', '0', '0',    'analysis:statement:prod',      'energyprod',     'admin', sysdate(), '', null, '产能报表');
-insert into sys_menu values ('1121',  '用能报表',   '112', '2',  'statement-consume', 'analysis/statement/consume',  '', 1, 0, 'C', '0', '0',    'analysis:statement:consume',   'energyconsume',  'admin', sysdate(), '', null, '用能报表');
-insert into sys_menu values ('1122',  '告警报表',   '112', '3',  'statement-warn',    'analysis/statement/warn',     '', 1, 0, 'C', '0', '0',    'analysis:statement:warn',      'warn',     'admin', sysdate(), '', null, '告警报表');
-insert into sys_menu values ('1123',  '自定义',     '112', '4',  'statement-warn',    'analysis/statement/custom',   '', 1, 0, 'C', '0', '0',   'analysis:statement:custom',    'statement-zdy',   'admin', sysdate(), '', null, '自定义报表');
+insert into sys_menu values ('1110',  '产能报表',   '111', '1',  'statement-prod',    'analysis/statement/prod',     '', 1, 0, 'C', '0', '0',    'analysis:statement:prod',      'energyprod',     'admin', sysdate(), '', null, '产能报表');
+insert into sys_menu values ('1111',  '用能报表',   '111', '2',  'statement-consume', 'analysis/statement/consume',  '', 1, 0, 'C', '0', '0',    'analysis:statement:consume',   'energyconsume',  'admin', sysdate(), '', null, '用能报表');
+insert into sys_menu values ('1112',  '告警报表',   '111', '3',  'statement-warn',    'analysis/statement/warn',     '', 1, 0, 'C', '0', '0',    'analysis:statement:warn',      'warn',     'admin', sysdate(), '', null, '告警报表');
+insert into sys_menu values ('1113',  '自定义',     '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 ('1220',  '地块划分',   '122', '1',  'basecfg-servicearea',    'basecfg/area/index',         '', 1, 0, 'C', '0', '0',   'basecfg:area:list',           'cfgwrite',   'admin', sysdate(), '', null, '地块划分');
-insert into sys_menu values ('1221',  '建筑配置',   '122', '2',  'basecfg-building',       'basecfg/building/index',     '', 1, 0, 'C', '0', '0',   'basecfg:building:list',        'cfgwrite',   'admin', sysdate(), '', null, '建筑配置');
-insert into sys_menu values ('1222',  '功能分区',   '122', '3',  'basecfg-zoning',         'basecfg/zoning/index',       '', 1, 0, 'C', '0', '0',   'basecfg:zoning:list',          'cfgwrite',   'admin', sysdate(), '', null, '功能分区');
-insert into sys_menu values ('1230',  '设施分类',   '123', '1',  'basecfg-facstype',       'basecfg/facstype/index',     '', 1, 0, 'C', '0', '0',   'basecfg:facstype:list',        'cfgwrite',   'admin', sysdate(), '', null, '设施分类');
-insert into sys_menu values ('1231',  '能源设施',   '123', '2',  'basecfg-facscfg',        'basecfg/emsfacs/index',      '', 1, 0, 'C', '0', '0',   'basecfg:emsfacs:list',         'cfgwrite',   'admin', sysdate(), '', null, '能源设施');
-insert into sys_menu values ('1232',  '能流关系',   '123', '3',  'basecfg-flowrel',        'basecfg/flowrel/index',      '', 1, 0, 'C', '0', '0',   'basecfg:flowrel:list',         'cfgwrite',   'admin', sysdate(), '', null, '能流关系');
-insert into sys_menu values ('1233',  '能源设备',   '123', '4',  'basecfg-devccfg',        'basecfg/device/index',       '', 1, 0, 'C', '0', '0',   'basecfg:device:list',          'cfgwrite',   'admin', sysdate(), '', null, '能源设备');
-insert into sys_menu values ('1234',  '配电设施',   '123', '5',  'basecfg-powerbox',       'basecfg/powerbox/index',     '', 1, 0, 'C', '0', '0',   'ems:powerbox:list',            'cfgwrite',   'admin', sysdate(), '', null, '配电设施');
-insert into sys_menu values ('1240',  '价格策略',   '124', '1',  'basecfg-electricity',    'basecfg/price/index',        '', 1, 0, 'C', '0', '0',   'basecfg:price:list',           'cfgwrite',   'admin', sysdate(), '', null, '价格策略');
-insert into sys_menu values ('1241',  '计量设备',   '124', '2',  'basecfg-meterdevc',      'basecfg/meterdevc/index',     '', 1, 0, 'C', '0', '0',  'ems:meterdevc:list',           'cfgwrite',   'admin', sysdate(), '', null, '计量设备');
-insert into sys_menu values ('1242',  '碳核算',     '124', '3',  'basecfg-cacfg',          'basecfg/cacfg/index',        '', 1, 0, 'C', '0', '0',   'basecfg:cacfg:list',           'cfgwrite',   'admin', sysdate(), '', null, '碳排因子');
+insert into sys_menu values ('1210',  '服务区',     '121', '1',  'basecfg-servicearea',    'basecfg/area/index',         '', 1, 0, 'C', '0', '0',   'basecfg:area:list',           'cfgwrite',   'admin', sysdate(), '', null, '服务区配置');
+insert into sys_menu values ('1211',  '地块配置',   '121', '2',  'basecfg-building',       'basecfg/building/index',     '', 1, 0, 'C', '0', '0',   'basecfg:building:list',        'cfgwrite',   'admin', sysdate(), '', null, '楼宇建筑配置');
+insert into sys_menu values ('1212',  '区域配置',   '121', '3',  'basecfg-zoning',         'basecfg/zoning/index',       '', 1, 0, 'C', '0', '0',   'basecfg:zoning:list',          'cfgwrite',   'admin', sysdate(), '', null, '区块配置');
+insert into sys_menu values ('1220',  '设施分类',   '122', '1',  'basecfg-facstype',       'basecfg/facstype/index',     '', 1, 0, 'C', '0', '0',   'basecfg:facstype:list',        'cfgwrite',   'admin', sysdate(), '', null, '设施配置');
+insert into sys_menu values ('1221',  '能源设施',   '122', '2',  'basecfg-facscfg',        'basecfg/emsfacs/index',      '', 1, 0, 'C', '0', '0',   'basecfg:emsfacs:list',         'cfgwrite',   'admin', sysdate(), '', null, '设施配置');
+insert into sys_menu values ('1222',  '能流关系',   '122', '3',  'basecfg-flowrel',        'basecfg/flowrel/index',      '', 1, 0, 'C', '0', '0',   'basecfg:flowrel:list',         'cfgwrite',   'admin', sysdate(), '', null, '设备配置');
+insert into sys_menu values ('1223',  '用能设备',   '122', '4',  'basecfg-devccfg',        'basecfg/device/index',       '', 1, 0, 'C', '0', '0',   'basecfg:device:list',          'cfgwrite',   'admin', sysdate(), '', null, '设备配置');
+insert into sys_menu values ('1230',  '国网电价',   '123', '1',  'basecfg-electricity',    'basecfg/electricity/index',   '', 1, 0, 'C', '0', '0',  'basecfg:electricity:list',     'cfgwrite',   'admin', sysdate(), '', null, '电价属性');
+insert into sys_menu values ('1231',  '计量设备',   '123', '2',  'basecfg-meterdevc',      'basecfg/meterdevc/index',     '', 1, 0, 'C', '0', '0',  'ems:meterdevc:list',           'cfgwrite',   'admin', sysdate(), '', null, '计量设备');
+insert into sys_menu values ('1232',  '碳核算',     '123', '3',  'basecfg-cacfg',          'basecfg/cacfg/index',        '', 1, 0, 'C', '0', '0',   'basecfg:cacfg:list',           'cfgwrite',   'admin', sysdate(), '', null, '碳排因子');
 
 -- 用户管理按钮
 insert into sys_menu values ('1700', '用户查询', '170', '1',  '', '', '', 1, 0, 'F', '0', '0', 'system:user:query',          '#', 'admin', sysdate(), '', null, '');
@@ -299,8 +294,8 @@ insert into sys_menu values ('1770', '公告查询', '177', '1', '#', '', '', 1,
 insert into sys_menu values ('1771', '公告新增', '177', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:add',          '#', 'admin', sysdate(), '', null, '');
 insert into sys_menu values ('1772', '公告修改', '177', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit',         '#', 'admin', sysdate(), '', null, '');
 insert into sys_menu values ('1773', '公告删除', '177', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove',       '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('1780', '操作日志', '178', '1',  'operlog',           'system/operlog/index',       '', 1, 0, 'C', '0', '0',    'system:operlog:list',          'form',          'admin', sysdate(), '', null, '操作日志菜单');
-insert into sys_menu values ('1781', '登录日志', '178', '2',  'logininfor',        'system/logininfor/index',    '', 1, 0, 'C', '0', '0',    'system:logininfor:list',       'logininfor',    'admin', sysdate(), '', null, '登录日志菜单');
+insert into sys_menu values ('1780',  '操作日志', '178', '1',  'operlog',           'system/operlog/index',       '', 1, 0, 'C', '0', '0',    'system:operlog:list',          'form',          'admin', sysdate(), '', null, '操作日志菜单');
+insert into sys_menu values ('1781',  '登录日志', '178', '2',  'logininfor',        'system/logininfor/index',    '', 1, 0, 'C', '0', '0',    'system:logininfor:list',       'logininfor',    'admin', sysdate(), '', null, '登录日志菜单');
 
 -- 操作日志按钮
 insert into sys_menu values ('17800', '操作查询', '1780', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:operlog:query',       '#', 'admin', sysdate(), '', null, '');
@@ -316,38 +311,38 @@ insert into sys_menu values ('1790', '在线查询', '179', '1', '#', '', '', 1,
 insert into sys_menu values ('1791', '批量强退', '179', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', sysdate(), '', null, '');
 insert into sys_menu values ('1792', '单条强退', '179', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', sysdate(), '', null, '');
 -- 服务区配置按钮
-insert into sys_menu values ('12200', '地块新增', '1220', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:add',   '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12201', '地块修改', '1220', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:edit',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12202', '地块删除', '1220', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:remove','#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12203', '地块导出', '1220', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:export','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12100', '服务区新增', '1210', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:add',   '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12101', '服务区修改', '1210', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:edit',  '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12102', '服务区删除', '1210', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:remove','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12103', '服务区导出', '1210', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:area:export','#', 'admin', sysdate(), '', null, '');
 -- 服务区建筑配置按钮
-insert into sys_menu values ('12210', '建筑新增', '1221', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:add',   '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12211', '建筑修改', '1221', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:edit',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12212', '建筑删除', '1221', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:remove','#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12213', '建筑导出', '1221', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:export','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12110', '建筑新增', '1211', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:add',   '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12111', '建筑修改', '1211', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:edit',  '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12112', '建筑删除', '1211', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:remove','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12113', '建筑导出', '1211', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:building:export','#', 'admin', sysdate(), '', null, '');
 -- 服务区建筑区块配置按钮
-insert into sys_menu values ('12220', '区块新增', '1222', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:add',   '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12221', '区块修改', '1222', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:edit',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12222', '区块删除', '1222', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:remove','#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12223', '区块导出', '1222', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:export','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12120', '区块新增', '1212', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:add',   '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12121', '区块修改', '1212', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:edit',  '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12122', '区块删除', '1212', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:remove','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12123', '区块导出', '1212', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:export','#', 'admin', sysdate(), '', null, '');
 -- 能源设施分类配置按钮
-insert into sys_menu values ('12300', '分类新增', '1230', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facstype:add',   '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12301', '分类修改', '1230', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facstype:edit',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12302', '分类删除', '1230', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facstype:remove','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12200', '分类新增', '1220', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facstype:add',   '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12201', '分类修改', '1220', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facstype:edit',  '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12202', '分类删除', '1220', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facstype:remove','#', 'admin', sysdate(), '', null, '');
 -- 服务区能源设施配置按钮
-insert into sys_menu values ('12310', '设施新增', '1231', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:emsfacs:add',   '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12311', '设施修改', '1231', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:emsfacs:edit',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12312', '设施删除', '1231', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:emsfacs:remove','#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12313', '设施导出', '1231', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:emsfacs:export','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12210', '设施新增', '1221', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:emsfacs:add',   '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12211', '设施修改', '1221', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:emsfacs:edit',  '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12212', '设施删除', '1221', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:emsfacs:remove','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12213', '设施导出', '1221', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:emsfacs:export','#', 'admin', sysdate(), '', null, '');
 -- 服务区能流关系配置按钮
-insert into sys_menu values ('12320', '关系新增', '1232', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:add',   '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12321', '关系修改', '1232', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:edit',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12322', '关系删除', '1232', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:remove','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12220', '关系新增', '1222', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:add',   '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12221', '关系修改', '1222', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:edit',  '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12222', '关系删除', '1222', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:remove','#', 'admin', sysdate(), '', null, '');
 -- 服务区设备配置按钮
-insert into sys_menu values ('12330', '设备新增', '1233', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:add',   '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12331', '设备修改', '1233', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:edit',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12332', '设备删除', '1233', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:remove','#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('12333', '设备导出', '1233', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:export','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12230', '设备新增', '1223', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:add',   '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12231', '设备修改', '1223', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:edit',  '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12232', '设备删除', '1223', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:remove','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('12233', '设备导出', '1223', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:flowrel:export','#', 'admin', sysdate(), '', null, '');
 
 -- 能源策略按钮
 INSERT INTO sys_menu VALUES (2000, 'list', 103, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:strategy:list', '#', 'admin', sysdate(), '', NULL, '');
@@ -372,45 +367,45 @@ INSERT INTO `sys_menu` VALUES (2015,'add',105, 1, '', NULL, NULL, 1, 0, 'F', '0'
 INSERT INTO `sys_menu` VALUES (2016,'edit',105, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:gs:edit', '#', 'admin', sysdate(), '', NULL, '');
 INSERT INTO `sys_menu` VALUES (2017,'remove',105, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'power-mgr:gs:remove', '#', 'admin', sysdate(), '', NULL, '');
 -- 产能预测
-INSERT INTO `sys_menu` VALUES (2018,'list',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:list', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2019,'export',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:export', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2020,'query',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:query', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2021,'add',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:add', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2022,'edit',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:edit', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2023,'remove',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:remove', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'list',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:list', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'export',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:export', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'query',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:query', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'add',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:add', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'edit',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:edit', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'remove',1100, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:prod:remove', '#', 'admin', sysdate(), '', NULL, '');
 
 -- 用能预测
-INSERT INTO `sys_menu` VALUES (2024,'list',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:list', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2025,'export',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:export', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2026,'query',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:query', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2027,'add',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:add', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2028,'edit',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:edit', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2029,'remove',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:remove', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'list',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:list', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'export',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:export', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'query',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:query', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'add',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:add', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'edit',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:edit', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'remove',1101, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:consume:remove', '#', 'admin', sysdate(), '', NULL, '');
 
 -- 碳排预测
-INSERT INTO `sys_menu` VALUES (2030,'list',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:list', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2031,'export',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:export', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2032,'query',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:query', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2033,'add',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:add', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2034,'edit',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:edit', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2035,'remove',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:remove', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'list',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:list', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'export',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:export', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'query',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:query', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'add',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:add', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'edit',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:edit', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'remove',1102, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'prediction:ca:remove', '#', 'admin', sysdate(), '', NULL, '');
 
 -- 碳排计量
-INSERT INTO `sys_menu` VALUES (2036,'list',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:list', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2037,'export',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:export', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2038,'query',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:query', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2039,'add',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:add', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2040,'edit',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:edit', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2041,'remove',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:remove', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'list',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:list', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'export',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:export', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'query',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:query', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'add',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:add', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'edit',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:edit', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'remove',112, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:emission:remove', '#', 'admin', sysdate(), '', NULL, '');
 
 
 -- 碳排计量
-INSERT INTO `sys_menu` VALUES (2042,'list',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:list', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2043,'export',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:export', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2044,'query',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:query', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2045,'add',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:add', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2046,'edit',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:edit', '#', 'admin', sysdate(), '', NULL, '');
-INSERT INTO `sys_menu` VALUES (2047,'remove',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:remove', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'list',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:list', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'export',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:export', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'query',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:query', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'add',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:add', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'edit',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:edit', '#', 'admin', sysdate(), '', NULL, '');
+INSERT INTO `sys_menu` VALUES (null,'remove',113, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ca-analysis:sink:remove', '#', 'admin', sysdate(), '', NULL, '');
 
 -- 告警策略
 INSERT INTO sys_menu VALUES(17823, 'list', 118, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'ems:alarm-strategy:list', '#', 'admin', '2024-08-26 11:08:42', '', NULL, '');
@@ -468,207 +463,155 @@ create table sys_role_menu (
 -- ----------------------------
 -- 初始化-角色和菜单关联表数据
 -- ----------------------------
-insert into sys_role_menu values ('2',1);
-insert into sys_role_menu values ('2',2);
-insert into sys_role_menu values ('2',3);
-insert into sys_role_menu values ('2',4);
-insert into sys_role_menu values ('2',5);
-insert into sys_role_menu values ('2',6);
-insert into sys_role_menu values ('2',7);
-insert into sys_role_menu values ('2',8);
-insert into sys_role_menu values ('2',9);
-insert into sys_role_menu values ('2',99);
-insert into sys_role_menu values ('2',100);
-insert into sys_role_menu values ('2',101);
-insert into sys_role_menu values ('2',102);
-insert into sys_role_menu values ('2',103);
-insert into sys_role_menu values ('2',104);
-insert into sys_role_menu values ('2',105);
-insert into sys_role_menu values ('2',106);
-insert into sys_role_menu values ('2',107);
-insert into sys_role_menu values ('2',108);
-insert into sys_role_menu values ('2',109);
-insert into sys_role_menu values ('2',110);
-insert into sys_role_menu values ('2',111);
-insert into sys_role_menu values ('2',112);
-insert into sys_role_menu values ('2',113);
-insert into sys_role_menu values ('2',114);
-insert into sys_role_menu values ('2',115);
-insert into sys_role_menu values ('2',116);
-insert into sys_role_menu values ('2',117);
-insert into sys_role_menu values ('2',118);
-insert into sys_role_menu values ('2',119);
-insert into sys_role_menu values ('2',120);
-insert into sys_role_menu values ('2',121);
-insert into sys_role_menu values ('2',122);
-insert into sys_role_menu values ('2',123);
-insert into sys_role_menu values ('2',124);
-insert into sys_role_menu values ('2',125);
-insert into sys_role_menu values ('2',170);
-insert into sys_role_menu values ('2',171);
-insert into sys_role_menu values ('2',172);
-insert into sys_role_menu values ('2',173);
-insert into sys_role_menu values ('2',174);
-insert into sys_role_menu values ('2',175);
-insert into sys_role_menu values ('2',176);
-insert into sys_role_menu values ('2',177);
-insert into sys_role_menu values ('2',178);
-insert into sys_role_menu values ('2',179);
-insert into sys_role_menu values ('2',180);
-insert into sys_role_menu values ('2',181);
-insert into sys_role_menu values ('2',182);
-insert into sys_role_menu values ('2',183);
-insert into sys_role_menu values ('2',184);
-insert into sys_role_menu values ('2',185);
-insert into sys_role_menu values ('2',186);
-insert into sys_role_menu values ('2',187);
-insert into sys_role_menu values ('2',188);
-insert into sys_role_menu values ('2',189);
-insert into sys_role_menu values ('2',998);
-insert into sys_role_menu values ('2',999);
-insert into sys_role_menu values ('2',1110);
-insert into sys_role_menu values ('2',1111);
-insert into sys_role_menu values ('2',1112);
-insert into sys_role_menu values ('2',1120);
-insert into sys_role_menu values ('2',1121);
-insert into sys_role_menu values ('2',1122);
-insert into sys_role_menu values ('2',1123);
-insert into sys_role_menu values ('2',1220);
-insert into sys_role_menu values ('2',1221);
-insert into sys_role_menu values ('2',1222);
-insert into sys_role_menu values ('2',1230);
-insert into sys_role_menu values ('2',1231);
-insert into sys_role_menu values ('2',1232);
-insert into sys_role_menu values ('2',1233);
-insert into sys_role_menu values ('2',1234);
-insert into sys_role_menu values ('2',1240);
-insert into sys_role_menu values ('2',1241);
-insert into sys_role_menu values ('2',1242);
-insert into sys_role_menu values ('2',1700);
-insert into sys_role_menu values ('2',1701);
-insert into sys_role_menu values ('2',1702);
-insert into sys_role_menu values ('2',1703);
-insert into sys_role_menu values ('2',1704);
-insert into sys_role_menu values ('2',1705);
-insert into sys_role_menu values ('2',1706);
-insert into sys_role_menu values ('2',1710);
-insert into sys_role_menu values ('2',1711);
-insert into sys_role_menu values ('2',1712);
-insert into sys_role_menu values ('2',1713);
-insert into sys_role_menu values ('2',1714);
-insert into sys_role_menu values ('2',1720);
-insert into sys_role_menu values ('2',1721);
-insert into sys_role_menu values ('2',1722);
-insert into sys_role_menu values ('2',1723);
-insert into sys_role_menu values ('2',1730);
-insert into sys_role_menu values ('2',1731);
-insert into sys_role_menu values ('2',1732);
-insert into sys_role_menu values ('2',1733);
-insert into sys_role_menu values ('2',1740);
-insert into sys_role_menu values ('2',1741);
-insert into sys_role_menu values ('2',1742);
-insert into sys_role_menu values ('2',1743);
-insert into sys_role_menu values ('2',1744);
-insert into sys_role_menu values ('2',1750);
-insert into sys_role_menu values ('2',1751);
-insert into sys_role_menu values ('2',1752);
-insert into sys_role_menu values ('2',1753);
-insert into sys_role_menu values ('2',1754);
-insert into sys_role_menu values ('2',1760);
-insert into sys_role_menu values ('2',1761);
-insert into sys_role_menu values ('2',1762);
-insert into sys_role_menu values ('2',1763);
-insert into sys_role_menu values ('2',1764);
-insert into sys_role_menu values ('2',1770);
-insert into sys_role_menu values ('2',1771);
-insert into sys_role_menu values ('2',1772);
-insert into sys_role_menu values ('2',1773);
-insert into sys_role_menu values ('2',1780);
-insert into sys_role_menu values ('2',1781);
-insert into sys_role_menu values ('2',1790);
-insert into sys_role_menu values ('2',1791);
-insert into sys_role_menu values ('2',1792);
-insert into sys_role_menu values ('2',2000);
-insert into sys_role_menu values ('2',2001);
-insert into sys_role_menu values ('2',2002);
-insert into sys_role_menu values ('2',2003);
-insert into sys_role_menu values ('2',2004);
-insert into sys_role_menu values ('2',2005);
-insert into sys_role_menu values ('2',2006);
-insert into sys_role_menu values ('2',2007);
-insert into sys_role_menu values ('2',2008);
-insert into sys_role_menu values ('2',2009);
-insert into sys_role_menu values ('2',2010);
-insert into sys_role_menu values ('2',2011);
-insert into sys_role_menu values ('2',2012);
-insert into sys_role_menu values ('2',2013);
-insert into sys_role_menu values ('2',2014);
-insert into sys_role_menu values ('2',2015);
-insert into sys_role_menu values ('2',2016);
-insert into sys_role_menu values ('2',2017);
-insert into sys_role_menu values ('2',2018);
-insert into sys_role_menu values ('2',2019);
-insert into sys_role_menu values ('2',2020);
-insert into sys_role_menu values ('2',2021);
-insert into sys_role_menu values ('2',2022);
-insert into sys_role_menu values ('2',2023);
-insert into sys_role_menu values ('2',2024);
-insert into sys_role_menu values ('2',2025);
-insert into sys_role_menu values ('2',2026);
-insert into sys_role_menu values ('2',2027);
-insert into sys_role_menu values ('2',2028);
-insert into sys_role_menu values ('2',2029);
-insert into sys_role_menu values ('2',2030);
-insert into sys_role_menu values ('2',2031);
-insert into sys_role_menu values ('2',2032);
-insert into sys_role_menu values ('2',2033);
-insert into sys_role_menu values ('2',2034);
-insert into sys_role_menu values ('2',2035);
-insert into sys_role_menu values ('2',2036);
-insert into sys_role_menu values ('2',2037);
-insert into sys_role_menu values ('2',2038);
-insert into sys_role_menu values ('2',2039);
-insert into sys_role_menu values ('2',2040);
-insert into sys_role_menu values ('2',2041);
-insert into sys_role_menu values ('2',2042);
-insert into sys_role_menu values ('2',2043);
-insert into sys_role_menu values ('2',2044);
-insert into sys_role_menu values ('2',2045);
-insert into sys_role_menu values ('2',2046);
-insert into sys_role_menu values ('2',2047);
-insert into sys_role_menu values ('2',12200);
-insert into sys_role_menu values ('2',12201);
-insert into sys_role_menu values ('2',12202);
-insert into sys_role_menu values ('2',12203);
-insert into sys_role_menu values ('2',12210);
-insert into sys_role_menu values ('2',12211);
-insert into sys_role_menu values ('2',12212);
-insert into sys_role_menu values ('2',12213);
-insert into sys_role_menu values ('2',12220);
-insert into sys_role_menu values ('2',12221);
-insert into sys_role_menu values ('2',12222);
-insert into sys_role_menu values ('2',12223);
-insert into sys_role_menu values ('2',12300);
-insert into sys_role_menu values ('2',12301);
-insert into sys_role_menu values ('2',12302);
-insert into sys_role_menu values ('2',12310);
-insert into sys_role_menu values ('2',12311);
-insert into sys_role_menu values ('2',12312);
-insert into sys_role_menu values ('2',12313);
-insert into sys_role_menu values ('2',12320);
-insert into sys_role_menu values ('2',12321);
-insert into sys_role_menu values ('2',12322);
-insert into sys_role_menu values ('2',12330);
-insert into sys_role_menu values ('2',12331);
-insert into sys_role_menu values ('2',12332);
-insert into sys_role_menu values ('2',12333);
-insert into sys_role_menu values ('2',17800);
-insert into sys_role_menu values ('2',17801);
-insert into sys_role_menu values ('2',17802);
-insert into sys_role_menu values ('2',17810);
-insert into sys_role_menu values ('2',17811);
-insert into sys_role_menu values ('2',17812);
-insert into sys_role_menu values ('2',17813);
+insert into sys_role_menu values ('2', '1');
+insert into sys_role_menu values ('2', '2');
+insert into sys_role_menu values ('2', '3');
+insert into sys_role_menu values ('2', '4');
+insert into sys_role_menu values ('2', '5');
+insert into sys_role_menu values ('2', '6');
+insert into sys_role_menu values ('2', '7');
+insert into sys_role_menu values ('2', '8');
+insert into sys_role_menu values ('2', '9');
+insert into sys_role_menu values ('2', '10');
+insert into sys_role_menu values ('2', '99');
+insert into sys_role_menu values ('2', '100');
+insert into sys_role_menu values ('2', '101');
+insert into sys_role_menu values ('2', '102');
+insert into sys_role_menu values ('2', '103');
+insert into sys_role_menu values ('2', '104');
+insert into sys_role_menu values ('2', '105');
+insert into sys_role_menu values ('2', '106');
+insert into sys_role_menu values ('2', '107');
+insert into sys_role_menu values ('2', '108');
+insert into sys_role_menu values ('2', '109');
+insert into sys_role_menu values ('2', '110');
+insert into sys_role_menu values ('2', '111');
+insert into sys_role_menu values ('2', '112');
+insert into sys_role_menu values ('2', '113');
+insert into sys_role_menu values ('2', '114');
+insert into sys_role_menu values ('2', '115');
+insert into sys_role_menu values ('2', '116');
+insert into sys_role_menu values ('2', '117');
+insert into sys_role_menu values ('2', '118');
+insert into sys_role_menu values ('2', '119');
+insert into sys_role_menu values ('2', '120');
+insert into sys_role_menu values ('2', '121');
+insert into sys_role_menu values ('2', '122');
+insert into sys_role_menu values ('2', '123');
+insert into sys_role_menu values ('2', '124');
+insert into sys_role_menu values ('2', '125');
+insert into sys_role_menu values ('2', '190');
+insert into sys_role_menu values ('2', '191');
+insert into sys_role_menu values ('2', '192');
+insert into sys_role_menu values ('2', '193');
+insert into sys_role_menu values ('2', '194');
+insert into sys_role_menu values ('2', '195');
+insert into sys_role_menu values ('2', '196');
+insert into sys_role_menu values ('2', '197');
+insert into sys_role_menu values ('2', '198');
+insert into sys_role_menu values ('2', '199');
+insert into sys_role_menu values ('2', '188');
+insert into sys_role_menu values ('2', '189');
+insert into sys_role_menu values ('2', '500');
+insert into sys_role_menu values ('2', '501');
+insert into sys_role_menu values ('2', '510');
+insert into sys_role_menu values ('2', '511');
+insert into sys_role_menu values ('2', '520');
+insert into sys_role_menu values ('2', '521');
+insert into sys_role_menu values ('2', '522');
+insert into sys_role_menu values ('2', '523');
+insert into sys_role_menu values ('2', '530');
+insert into sys_role_menu values ('2', '531');
+insert into sys_role_menu values ('2', '532');
+insert into sys_role_menu values ('2', '533');
+insert into sys_role_menu values ('2', '534');
+insert into sys_role_menu values ('2', '535');
+insert into sys_role_menu values ('2', '536');
+insert into sys_role_menu values ('2', '537');
+insert into sys_role_menu values ('2', '538');
+insert into sys_role_menu values ('2', '539');
+insert into sys_role_menu values ('2', '540');
+insert into sys_role_menu values ('2', '541');
+insert into sys_role_menu values ('2', '542');
+insert into sys_role_menu values ('2', '543');
+insert into sys_role_menu values ('2', '1000');
+insert into sys_role_menu values ('2', '1001');
+insert into sys_role_menu values ('2', '1002');
+insert into sys_role_menu values ('2', '1003');
+insert into sys_role_menu values ('2', '1004');
+insert into sys_role_menu values ('2', '1005');
+insert into sys_role_menu values ('2', '1006');
+insert into sys_role_menu values ('2', '1007');
+insert into sys_role_menu values ('2', '1008');
+insert into sys_role_menu values ('2', '1009');
+insert into sys_role_menu values ('2', '1010');
+insert into sys_role_menu values ('2', '1011');
+insert into sys_role_menu values ('2', '1012');
+insert into sys_role_menu values ('2', '1013');
+insert into sys_role_menu values ('2', '1014');
+insert into sys_role_menu values ('2', '1015');
+insert into sys_role_menu values ('2', '1016');
+insert into sys_role_menu values ('2', '1017');
+insert into sys_role_menu values ('2', '1018');
+insert into sys_role_menu values ('2', '1019');
+insert into sys_role_menu values ('2', '1020');
+insert into sys_role_menu values ('2', '1021');
+insert into sys_role_menu values ('2', '1022');
+insert into sys_role_menu values ('2', '1023');
+insert into sys_role_menu values ('2', '1024');
+insert into sys_role_menu values ('2', '1025');
+insert into sys_role_menu values ('2', '1026');
+insert into sys_role_menu values ('2', '1027');
+insert into sys_role_menu values ('2', '1028');
+insert into sys_role_menu values ('2', '1029');
+insert into sys_role_menu values ('2', '1030');
+insert into sys_role_menu values ('2', '1031');
+insert into sys_role_menu values ('2', '1032');
+insert into sys_role_menu values ('2', '1033');
+insert into sys_role_menu values ('2', '1034');
+insert into sys_role_menu values ('2', '1035');
+insert into sys_role_menu values ('2', '1036');
+insert into sys_role_menu values ('2', '1037');
+insert into sys_role_menu values ('2', '1038');
+insert into sys_role_menu values ('2', '1039');
+insert into sys_role_menu values ('2', '1040');
+insert into sys_role_menu values ('2', '1041');
+insert into sys_role_menu values ('2', '1042');
+insert into sys_role_menu values ('2', '1043');
+insert into sys_role_menu values ('2', '1044');
+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');
+insert into sys_role_menu values ('2', '1057');
+insert into sys_role_menu values ('2', '1058');
+insert into sys_role_menu values ('2', '1059');
+insert into sys_role_menu values ('2', '1060');
+insert into sys_role_menu values ('2', '1061');
+insert into sys_role_menu values ('2', '1062');
+insert into sys_role_menu values ('2', '1063');
+insert into sys_role_menu values ('2', '1064');
+insert into sys_role_menu values ('2', '1065');
+insert into sys_role_menu values ('2', '1066');
+insert into sys_role_menu values ('2', '1067');
+insert into sys_role_menu values ('2', '1068');
+insert into sys_role_menu values ('2', '1069');
+insert into sys_role_menu values ('2', '1071');
+insert into sys_role_menu values ('2', '1072');
+insert into sys_role_menu values ('2', '1073');
+insert into sys_role_menu values ('2', '1074');
+insert into sys_role_menu values ('2', '1075');
+insert into sys_role_menu values ('2', '1076');
+insert into sys_role_menu values ('2', '1077');
+insert into sys_role_menu values ('2', '1078');
 
 -- ----------------------------
 -- 8、角色和部门关联表  角色1-N部门