浏览代码

模型变更0.5

lv.wenbin 10 月之前
父节点
当前提交
57d0e868c3
共有 30 个文件被更改,包括 775 次插入575 次删除
  1. 12 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/ElecPgSupplyHController.java
  2. 25 25
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/FacsCategoryController.java
  3. 11 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/ElecPgSupplyH.java
  4. 15 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/ElecStoreH.java
  5. 12 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/ElecUseH.java
  6. 53 62
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/EmsFacs.java
  7. 4 4
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/FacsCategory.java
  8. 1 1
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/FacsSubCategory.java
  9. 14 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/PvSupplyH.java
  10. 61 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/vo/QueryIndex.java
  11. 9 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/ElecPgSupplyHMapper.java
  12. 11 11
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/FacsCategoryMapper.java
  13. 13 13
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/FacsSubCategoryMapper.java
  14. 9 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IElecPgSupplyHService.java
  15. 11 11
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IFacsCategoryService.java
  16. 14 14
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IFacsSubCategoryService.java
  17. 0 97
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/EmsFacsSubtypeServiceImpl.java
  18. 7 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/EmsPgSupplyHServiceImpl.java
  19. 33 33
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/FacsCategoryServiceImpl.java
  20. 97 0
      ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/FacsSubCategoryServiceImpl.java
  21. 19 5
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/ElecPgSupplyHMapper.xml
  22. 7 2
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/ElecPvSupplyHMapper.xml
  23. 9 4
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/ElecUseHMapper.xml
  24. 9 4
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/EmsElecStoreHMapper.xml
  25. 21 13
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/EmsFacsMapper.xml
  26. 16 16
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/FacsCategoryMapper.xml
  27. 20 20
      ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/FacsSubCategoryMapper.xml
  28. 196 188
      ems-cloud/sql/ems_init_data.sql
  29. 62 48
      ems-cloud/sql/ems_server.sql
  30. 4 4
      ems-cloud/sql/ems_sys.sql

+ 12 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/ElecPgSupplyHController.java

@@ -3,6 +3,7 @@ package com.ruoyi.ems.controller;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
+import com.ruoyi.ems.domain.vo.QueryIndex;
 import io.swagger.annotations.Api;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -50,6 +51,17 @@ public class ElecPgSupplyHController extends BaseController
     }
 
     /**
+     * 查询电网供应计量-小时列表
+     */
+    @RequiresPermissions("power-mgr:pg:list")
+    @GetMapping("/listByDate")
+    public AjaxResult listByDate(QueryIndex queryIndex)
+    {
+        List<ElecPgSupplyH> list = pgSupplyHService.selectPgSupplyH(queryIndex);
+        return success(list);
+    }
+
+    /**
      * 导出电网供应计量-小时列表
      */
     @RequiresPermissions("power-mgr:pg:export")

+ 25 - 25
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/FacsTypeController.java → ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/FacsCategoryController.java

@@ -7,8 +7,8 @@ import com.ruoyi.common.core.web.page.TableDataInfo;
 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.EmsFacsType;
-import com.ruoyi.ems.service.IEmsFacsTypeService;
+import com.ruoyi.ems.domain.FacsCategory;
+import com.ruoyi.ems.service.IFacsCategoryService;
 import io.swagger.annotations.Api;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.DeleteMapping;
@@ -24,28 +24,28 @@ import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 /**
- * 能源设施/系统类Controller
+ * 能源设施/系统类Controller
  * 
  * @author ruoyi
  * @date 2024-07-11
  */
 @RestController
-@RequestMapping("/basecfg/facstype")
-@Api(value = "FacsTypeController", description = "设施分类管理")
-public class FacsTypeController extends BaseController
+@RequestMapping("/basecfg/facsCategory")
+@Api(value = "FacsCategoryController", description = "设施类别管理")
+public class FacsCategoryController extends BaseController
 {
     @Autowired
-    private IEmsFacsTypeService emsFacsTypeService;
+    private IFacsCategoryService facsCategoryService;
 
     /**
      * 查询能源设施/系统分类列表
      */
-    @RequiresPermissions("basecfg:facstype:list")
+    @RequiresPermissions("basecfg:facscategory:list")
     @GetMapping("/list")
-    public TableDataInfo list(EmsFacsType emsFacsType)
+    public TableDataInfo list(FacsCategory emsFacsType)
     {
         startPage();
-        List<EmsFacsType> list = emsFacsTypeService.selectFacsTypeList(emsFacsType);
+        List<FacsCategory> list = facsCategoryService.selectCategoryList(emsFacsType);
         return getDataTable(list);
     }
 
@@ -55,63 +55,63 @@ public class FacsTypeController extends BaseController
      */
     @GetMapping("/listall")
     public AjaxResult listAll() {
-        List<EmsFacsType> list = emsFacsTypeService.selectFacsTypeList(new EmsFacsType());
+        List<FacsCategory> list = facsCategoryService.selectCategoryList(new FacsCategory());
         return success(list);
     }
 
     /**
      * 导出能源设施/系统分类列表
      */
-    @RequiresPermissions("basecfg:facstype:export")
+    @RequiresPermissions("basecfg:facscategory:export")
     @Log(title = "能源设施/系统分类", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, EmsFacsType emsFacsType)
+    public void export(HttpServletResponse response, FacsCategory emsFacsType)
     {
-        List<EmsFacsType> list = emsFacsTypeService.selectFacsTypeList(emsFacsType);
-        ExcelUtil<EmsFacsType> util = new ExcelUtil<EmsFacsType>(EmsFacsType.class);
+        List<FacsCategory> list = facsCategoryService.selectCategoryList(emsFacsType);
+        ExcelUtil<FacsCategory> util = new ExcelUtil<FacsCategory>(FacsCategory.class);
         util.exportExcel(response, list, "能源设施/系统分类数据");
     }
 
     /**
      * 获取能源设施/系统分类详细信息
      */
-    @RequiresPermissions("basecfg:facstype:query")
+    @RequiresPermissions("basecfg:facscategory:query")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
-        return success(emsFacsTypeService.selectFacsTypeById(id));
+        return success(facsCategoryService.selectCategoryById(id));
     }
 
     /**
      * 新增能源设施/系统分类
      */
-    @RequiresPermissions("basecfg:facstype:add")
+    @RequiresPermissions("basecfg:facscategory:add")
     @Log(title = "能源设施/系统分类", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody EmsFacsType emsFacsType)
+    public AjaxResult add(@RequestBody FacsCategory emsFacsType)
     {
-        return toAjax(emsFacsTypeService.insertFacsType(emsFacsType));
+        return toAjax(facsCategoryService.insertCategory(emsFacsType));
     }
 
     /**
      * 修改能源设施/系统分类
      */
-    @RequiresPermissions("basecfg:facstype:edit")
+    @RequiresPermissions("basecfg:facscategory:edit")
     @Log(title = "能源设施/系统分类", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody EmsFacsType emsFacsType)
+    public AjaxResult edit(@RequestBody FacsCategory emsFacsType)
     {
-        return toAjax(emsFacsTypeService.updateFacsType(emsFacsType));
+        return toAjax(facsCategoryService.updateCategory(emsFacsType));
     }
 
     /**
      * 删除能源设施/系统分类
      */
-    @RequiresPermissions("basecfg:facstype:remove")
+    @RequiresPermissions("basecfg:facscategory:remove")
     @Log(title = "能源设施/系统分类", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)
     {
-        return toAjax(emsFacsTypeService.deleteFacsTypeByIds(ids));
+        return toAjax(facsCategoryService.deleteCategoryByIds(ids));
     }
 }

+ 11 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/ElecPgSupplyH.java

@@ -39,6 +39,9 @@ public class ElecPgSupplyH extends BaseEntity
     @Excel(name = "设施")
     private String facsName;
 
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date recordTime;
+
     /** 日期 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
@@ -117,6 +120,14 @@ public class ElecPgSupplyH extends BaseEntity
         this.facsName = facsName;
     }
 
+    public Date getRecordTime() {
+        return recordTime;
+    }
+
+    public void setRecordTime(Date recordTime) {
+        this.recordTime = recordTime;
+    }
+
     public Date getDate() {
         return date;
     }

+ 15 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/ElecStoreH.java

@@ -42,6 +42,13 @@ public class ElecStoreH extends BaseEntity {
 
     @Excel(name = "设施名称")
     private String facsName;
+
+    /**
+     * 记录时间 yyyy-MM-dd HH:mm:ss
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date recordTime;
+
     /**
      * 日期 yyyy-MM-dd
      */
@@ -121,6 +128,14 @@ public class ElecStoreH extends BaseEntity {
         this.facsName = facsName;
     }
 
+    public Date getRecordTime() {
+        return recordTime;
+    }
+
+    public void setRecordTime(Date recordTime) {
+        this.recordTime = recordTime;
+    }
+
     public Date getDate() {
         return date;
     }

+ 12 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/ElecUseH.java

@@ -43,6 +43,10 @@ public class ElecUseH extends BaseEntity
     @Excel(name = "设施子类")
     private String facsSubtype;
 
+    /** 记录时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date recordTime;
+
     /** 日期 yyyy-MM-dd */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "日期 yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
@@ -126,6 +130,14 @@ public class ElecUseH extends BaseEntity
         this.facsSubtype = facsSubtype;
     }
 
+    public Date getRecordTime() {
+        return recordTime;
+    }
+
+    public void setRecordTime(Date recordTime) {
+        this.recordTime = recordTime;
+    }
+
     public Date getDate() {
         return date;
     }

+ 53 - 62
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/EmsFacs.java

@@ -28,19 +28,18 @@ public class EmsFacs extends BaseEntity
     @Excel(name = "设施名称")
     private String facsName;
 
-    @Excel(name = "设施分类")
-    private String facsType;
+    private String facsCategory;
 
     /** 设施分类-名称 */
-    @Excel(name = "设施类")
-    private String facsTypeName;
+    @Excel(name = "设施类")
+    private String facsCategoryName;
 
     /** 设施子类 */
-    private String facsSubtype;
+    private String facsSubCategory;
 
     /** 设施子类名称 */
     @Excel(name = "设施子类")
-    private String facsSubtypeName;
+    private String facsSubCategoryName;
 
     /** 启用状态0-停用,1-启用 */
     @Excel(name = "启用状态0-停用,1-启用")
@@ -62,92 +61,76 @@ public class EmsFacs extends BaseEntity
     /** 设施事件 */
     private List<EmsFacsEvent> facsEvents;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
+    public Long getId() {
         return id;
     }
-    public void setFacsCode(String facsCode) 
-    {
-        this.facsCode = facsCode;
+
+    public void setId(Long id) {
+        this.id = id;
     }
 
-    public String getFacsCode() 
-    {
+    public String getFacsCode() {
         return facsCode;
     }
-    public void setFacsName(String facsName) 
-    {
-        this.facsName = facsName;
+
+    public void setFacsCode(String facsCode) {
+        this.facsCode = facsCode;
     }
 
-    public String getFacsName() 
-    {
+    public String getFacsName() {
         return facsName;
     }
-    public void setFacsType(String facsType) 
-    {
-        this.facsType = facsType;
-    }
 
-    public String getFacsType() 
-    {
-        return facsType;
+    public void setFacsName(String facsName) {
+        this.facsName = facsName;
     }
-    public void setFacsSubtype(String facsSubtype) 
-    {
-        this.facsSubtype = facsSubtype;
+
+    public String getFacsCategory() {
+        return facsCategory;
     }
 
-    public String getFacsSubtype() 
-    {
-        return facsSubtype;
+    public void setFacsCategory(String facsCategory) {
+        this.facsCategory = facsCategory;
     }
-    public void setEnable(Long enable) 
-    {
-        this.enable = enable;
+
+    public String getFacsCategoryName() {
+        return facsCategoryName;
     }
 
-    public Long getEnable() 
-    {
-        return enable;
+    public void setFacsCategoryName(String facsCategoryName) {
+        this.facsCategoryName = facsCategoryName;
     }
-    public void setRefArea(String refArea) 
-    {
-        this.refArea = refArea;
+
+    public String getFacsSubCategory() {
+        return facsSubCategory;
     }
 
-    public String getRefArea() 
-    {
-        return refArea;
+    public void setFacsSubCategory(String facsSubCategory) {
+        this.facsSubCategory = facsSubCategory;
     }
 
-    public List<EmsFacsAttr> getFacsAttrs() {
-        return facsAttrs;
+    public String getFacsSubCategoryName() {
+        return facsSubCategoryName;
     }
 
-    public void setFacsAttrs(List<EmsFacsAttr> facsAttrs) {
-        this.facsAttrs = facsAttrs;
+    public void setFacsSubCategoryName(String facsSubCategoryName) {
+        this.facsSubCategoryName = facsSubCategoryName;
     }
 
-    public String getFacsTypeName() {
-        return facsTypeName;
+    public Long getEnable() {
+        return enable;
     }
 
-    public void setFacsTypeName(String facsTypeName) {
-        this.facsTypeName = facsTypeName;
+    public void setEnable(Long enable) {
+        this.enable = enable;
     }
 
-    public String getFacsSubtypeName() {
-        return facsSubtypeName;
+    public String getRefArea() {
+        return refArea;
     }
 
-    public void setFacsSubtypeName(String facsSubtypeName) {
-        this.facsSubtypeName = facsSubtypeName;
+    public void setRefArea(String refArea) {
+        this.refArea = refArea;
     }
 
     public String getRefAreaName() {
@@ -158,6 +141,14 @@ public class EmsFacs extends BaseEntity
         this.refAreaName = refAreaName;
     }
 
+    public List<EmsFacsAttr> getFacsAttrs() {
+        return facsAttrs;
+    }
+
+    public void setFacsAttrs(List<EmsFacsAttr> facsAttrs) {
+        this.facsAttrs = facsAttrs;
+    }
+
     public List<EmsFacsAbility> getFacsAbilities() {
         return facsAbilities;
     }
@@ -180,8 +171,8 @@ public class EmsFacs extends BaseEntity
             .append("id", getId())
             .append("facsCode", getFacsCode())
             .append("facsName", getFacsName())
-            .append("facsType", getFacsType())
-            .append("facsSubtype", getFacsSubtype())
+            .append("facsCategory", getFacsCategory())
+            .append("facsSubCategory", getFacsSubCategory())
             .append("enable", getEnable())
             .append("refArea", getRefArea())
             .append("createTime", getCreateTime())

+ 4 - 4
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/EmsFacsType.java → ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/FacsCategory.java

@@ -13,7 +13,7 @@ import java.util.List;
  * @author ruoyi
  * @date 2024-07-10
  */
-public class EmsFacsType extends BaseEntity
+public class FacsCategory extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
@@ -37,7 +37,7 @@ public class EmsFacsType extends BaseEntity
     private String version;
 
     /** 子类 */
-    private List<EmsFacsSubtype> subtypeList;
+    private List<FacsSubCategory> subtypeList;
 
     public void setId(Long id) 
     {
@@ -85,11 +85,11 @@ public class EmsFacsType extends BaseEntity
         return version;
     }
 
-    public List<EmsFacsSubtype> getSubtypeList() {
+    public List<FacsSubCategory> getSubtypeList() {
         return subtypeList;
     }
 
-    public void setSubtypeList(List<EmsFacsSubtype> subtypeList) {
+    public void setSubtypeList(List<FacsSubCategory> subtypeList) {
         this.subtypeList = subtypeList;
     }
 

+ 1 - 1
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/EmsFacsSubtype.java → ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/FacsSubCategory.java

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

+ 14 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/PvSupplyH.java

@@ -49,6 +49,12 @@ public class PvSupplyH extends BaseEntity {
     private String facsName;
 
     /**
+     * 记录时间 yyyy-MM-dd HH:mm:ss
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private String recordTime;
+
+    /**
      * 日期 yyyy-MM-dd
      */
     @JsonFormat(pattern = "yyyy-MM-dd")
@@ -146,6 +152,14 @@ public class PvSupplyH extends BaseEntity {
         this.facsName = facsName;
     }
 
+    public String getRecordTime() {
+        return recordTime;
+    }
+
+    public void setRecordTime(String recordTime) {
+        this.recordTime = recordTime;
+    }
+
     public Date getDate() {
         return date;
     }

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

@@ -0,0 +1,61 @@
+/*
+ * 文 件 名:  QueryIndex
+ * 版    权:  浩鲸云计算科技股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2024/9/10
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.domain.vo;
+
+/**
+ * 查询指标
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2024/9/10]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+public class QueryIndex {
+    /**
+     * 区域编码
+     */
+    private String areaCode;
+
+    /**
+     * 开始时间
+     */
+    private String startTime;
+
+    /**
+     * 结束时间
+     */
+    private String endTime;
+
+    public String getAreaCode() {
+        return areaCode;
+    }
+
+    public void setAreaCode(String areaCode) {
+        this.areaCode = areaCode;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+}

+ 9 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/ElecPgSupplyHMapper.java

@@ -2,6 +2,7 @@ package com.ruoyi.ems.mapper;
 
 import java.util.List;
 import com.ruoyi.ems.domain.ElecPgSupplyH;
+import com.ruoyi.ems.domain.vo.QueryIndex;
 
 /**
  * 电网供应计量-小时Mapper接口
@@ -28,6 +29,14 @@ public interface ElecPgSupplyHMapper
      List<ElecPgSupplyH> selectPgSupplyHList(ElecPgSupplyH elecPgSupplyH);
 
     /**
+     * 查询电网供应计量-小时列表
+     *
+     * @param queryIndex 查询对象
+     * @return 电网供应计量-小时集合
+     */
+     List<ElecPgSupplyH> selectPgSupplyH(QueryIndex queryIndex);
+
+    /**
      * 新增电网供应计量-小时
      * 
      * @param elecPgSupplyH 电网供应计量-小时

+ 11 - 11
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/EmsFacsTypeMapper.java → ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/FacsCategoryMapper.java

@@ -2,7 +2,7 @@ package com.ruoyi.ems.mapper;
 
 import java.util.List;
 
-import com.ruoyi.ems.domain.EmsFacsType;
+import com.ruoyi.ems.domain.FacsCategory;
 
 /**
  * 能源设施/系统分类Mapper接口
@@ -10,38 +10,38 @@ import com.ruoyi.ems.domain.EmsFacsType;
  * @author ruoyi
  * @date 2024-07-10
  */
-public interface EmsFacsTypeMapper {
+public interface FacsCategoryMapper {
     /**
      * 查询能源设施/系统分类
      *
      * @param id 能源设施/系统分类主键
      * @return 能源设施/系统分类
      */
-    EmsFacsType selectFacsTypeById(Long id);
+    FacsCategory selectCategoryById(Long id);
 
     /**
      * 查询能源设施/系统分类列表
      *
-     * @param emsFacsType 能源设施/系统分类
+     * @param category 能源设施/系统分类
      * @return 能源设施/系统分类集合
      */
-    List<EmsFacsType> selectFacsTypeList(EmsFacsType emsFacsType);
+    List<FacsCategory> selectCategoryList(FacsCategory category);
 
     /**
      * 新增能源设施/系统分类
      *
-     * @param emsFacsType 能源设施/系统分类
+     * @param category 能源设施/系统分类
      * @return 结果
      */
-    int insertFacsType(EmsFacsType emsFacsType);
+    int insertCategory(FacsCategory category);
 
     /**
      * 修改能源设施/系统分类
      *
-     * @param emsFacsType 能源设施/系统分类
+     * @param category 能源设施/系统分类
      * @return 结果
      */
-    int updateFacsType(EmsFacsType emsFacsType);
+    int updateCategory(FacsCategory category);
 
     /**
      * 删除能源设施/系统分类
@@ -49,7 +49,7 @@ public interface EmsFacsTypeMapper {
      * @param id 能源设施/系统分类主键
      * @return 结果
      */
-    int deleteFacsTypeById(Long id);
+    int deleteCategoryById(Long id);
 
     /**
      * 批量删除能源设施/系统分类
@@ -57,5 +57,5 @@ public interface EmsFacsTypeMapper {
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
-    int deleteFacsTypeByIds(Long[] ids);
+    int deleteCategoryByIds(Long[] ids);
 }

+ 13 - 13
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/EmsFacsSubtypeMapper.java → ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/FacsSubCategoryMapper.java

@@ -2,7 +2,7 @@ package com.ruoyi.ems.mapper;
 
 import java.util.List;
 
-import com.ruoyi.ems.domain.EmsFacsSubtype;
+import com.ruoyi.ems.domain.FacsSubCategory;
 
 /**
  * 能源设施/系统子类Mapper接口
@@ -10,30 +10,30 @@ import com.ruoyi.ems.domain.EmsFacsSubtype;
  * @author ruoyi
  * @date 2024-07-10
  */
-public interface EmsFacsSubtypeMapper {
+public interface FacsSubCategoryMapper {
     /**
      * 查询能源设施/系统子类
      *
      * @param id 能源设施/系统子类主键
      * @return 能源设施/系统子类
      */
-    EmsFacsSubtype selectFacsSubtypeById(Long id);
+    FacsSubCategory selectSubCategoryById(Long id);
 
     /**
      * 查询能源设施/系统子类列表
      *
-     * @param emsFacsSubtype 能源设施/系统子类
+     * @param subCategory 能源设施/系统子类
      * @return 能源设施/系统子类集合
      */
-    List<EmsFacsSubtype> selectFacsSubtypeList(EmsFacsSubtype emsFacsSubtype);
+    List<FacsSubCategory> selectSubCategoryList(FacsSubCategory subCategory);
 
     /**
      * 新增能源设施/系统子类
      *
-     * @param emsFacsSubtype 能源设施/系统子类
+     * @param subCategory 能源设施/系统子类
      * @return 结果
      */
-    int insertFacsSubtype(EmsFacsSubtype emsFacsSubtype);
+    int insertSubCategory(FacsSubCategory subCategory);
 
     /**
      * 批量新增能源设施/系统子类
@@ -41,15 +41,15 @@ public interface EmsFacsSubtypeMapper {
      * @param list 能源设施/系统子类列表
      * @return 结果
      */
-    void insertFacsSubtypeBatch(List<EmsFacsSubtype> list);
+    void insertSubCategoryBatch(List<FacsSubCategory> list);
 
     /**
      * 修改能源设施/系统子类
      *
-     * @param emsFacsSubtype 能源设施/系统子类
+     * @param subCategory 能源设施/系统子类
      * @return 结果
      */
-    int updateFacsSubtype(EmsFacsSubtype emsFacsSubtype);
+    int updateSubCategory(FacsSubCategory subCategory);
 
     /**
      * 删除能源设施/系统子类
@@ -57,7 +57,7 @@ public interface EmsFacsSubtypeMapper {
      * @param id 能源设施/系统子类主键
      * @return 结果
      */
-    int deleteFacsSubtypeById(Long id);
+    int deleteSubCategoryById(Long id);
 
     /**
      * 批量删除能源设施/系统子类
@@ -65,7 +65,7 @@ public interface EmsFacsSubtypeMapper {
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
-    int deleteFacsSubtypeByIds(Long[] ids);
+    int deleteSubCategoryByIds(Long[] ids);
 
     /**
      * 批量删除能源设施/系统子类
@@ -73,5 +73,5 @@ public interface EmsFacsSubtypeMapper {
      * @param code 父分类ID
      * @return 结果
      */
-    int deleteFacsSubtypeByParentCode(String code);
+    int deleteSubCategoryByParentCode(String code);
 }

+ 9 - 0
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IElecPgSupplyHService.java

@@ -2,6 +2,7 @@ package com.ruoyi.ems.service;
 
 import java.util.List;
 import com.ruoyi.ems.domain.ElecPgSupplyH;
+import com.ruoyi.ems.domain.vo.QueryIndex;
 
 /**
  * 电网供应计量-小时Service接口
@@ -28,6 +29,14 @@ public interface IElecPgSupplyHService
      List<ElecPgSupplyH> selectPgSupplyHList(ElecPgSupplyH pgSupplyH);
 
     /**
+     * 查询电网供应计量-小时列表
+     *
+     * @param queryIndex 参数对象
+     * @return 电网供应计量-小时集合
+     */
+    List<ElecPgSupplyH> selectPgSupplyH(QueryIndex queryIndex);
+
+    /**
      * 新增电网供应计量-小时
      * 
      * @param pgSupplyH 电网供应计量-小时

+ 11 - 11
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IEmsFacsTypeService.java → ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IFacsCategoryService.java

@@ -1,7 +1,7 @@
 package com.ruoyi.ems.service;
 
 import java.util.List;
-import com.ruoyi.ems.domain.EmsFacsType;
+import com.ruoyi.ems.domain.FacsCategory;
 
 /**
  * 能源设施/系统分类Service接口
@@ -9,38 +9,38 @@ import com.ruoyi.ems.domain.EmsFacsType;
  * @author ruoyi
  * @date 2024-07-10
  */
-public interface IEmsFacsTypeService {
+public interface IFacsCategoryService {
     /**
      * 查询能源设施/系统分类
      *
      * @param id 能源设施/系统分类主键
      * @return 能源设施/系统分类
      */
-    EmsFacsType selectFacsTypeById(Long id);
+    FacsCategory selectCategoryById(Long id);
 
     /**
      * 查询能源设施/系统分类列表
      *
-     * @param emsFacsType 能源设施/系统分类
+     * @param emsCategory 能源设施/系统分类
      * @return 能源设施/系统分类集合
      */
-    List<EmsFacsType> selectFacsTypeList(EmsFacsType emsFacsType);
+    List<FacsCategory> selectCategoryList(FacsCategory emsCategory);
 
     /**
      * 新增能源设施/系统分类
      *
-     * @param emsFacsType 能源设施/系统分类
+     * @param emsCategory 能源设施/系统分类
      * @return 结果
      */
-    int insertFacsType(EmsFacsType emsFacsType);
+    int insertCategory(FacsCategory emsCategory);
 
     /**
      * 修改能源设施/系统分类
      *
-     * @param emsFacsType 能源设施/系统分类
+     * @param emsCategory 能源设施/系统分类
      * @return 结果
      */
-    int updateFacsType(EmsFacsType emsFacsType);
+    int updateCategory(FacsCategory emsCategory);
 
     /**
      * 批量删除能源设施/系统分类
@@ -48,7 +48,7 @@ public interface IEmsFacsTypeService {
      * @param ids 需要删除的能源设施/系统分类主键集合
      * @return 结果
      */
-    int deleteFacsTypeByIds(Long[] ids);
+    int deleteCategoryByIds(Long[] ids);
 
     /**
      * 删除能源设施/系统分类信息
@@ -56,5 +56,5 @@ public interface IEmsFacsTypeService {
      * @param id 能源设施/系统分类主键
      * @return 结果
      */
-    int deleteFacsTypeById(Long id);
+    int deleteCategoryById(Long id);
 }

+ 14 - 14
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IEmsFacsSubtypeService.java → ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IFacsSubCategoryService.java

@@ -1,7 +1,7 @@
 package com.ruoyi.ems.service;
 
 import java.util.List;
-import com.ruoyi.ems.domain.EmsFacsSubtype;
+import com.ruoyi.ems.domain.FacsSubCategory;
 
 /**
  * 能源设施/系统子类Service接口
@@ -9,45 +9,45 @@ import com.ruoyi.ems.domain.EmsFacsSubtype;
  * @author ruoyi
  * @date 2024-07-10
  */
-public interface IEmsFacsSubtypeService {
+public interface IFacsSubCategoryService {
     /**
      * 查询能源设施/系统子类
      *
      * @param id 能源设施/系统子类主键
      * @return 能源设施/系统子类
      */
-    EmsFacsSubtype selectFacsSubtypeById(Long id);
+    FacsSubCategory selectSubCategoryById(Long id);
 
     /**
      * 查询能源设施/系统子类列表
      *
-     * @param emsFacsSubtype 能源设施/系统子类
+     * @param subCategory 能源设施/系统子类
      * @return 能源设施/系统子类集合
      */
-    List<EmsFacsSubtype> selectFacsSubtypeList(EmsFacsSubtype emsFacsSubtype);
+    List<FacsSubCategory> selectSubCategoryList(FacsSubCategory subCategory);
 
     /**
      * 新增能源设施/系统子类
      *
-     * @param emsFacsSubtype 能源设施/系统子类
+     * @param subCategory 能源设施/系统子类
      * @return 结果
      */
-    int insertFacsSubtype(EmsFacsSubtype emsFacsSubtype);
+    int insertSubCategory(FacsSubCategory subCategory);
 
     /**
      * 批量新增能源设施/系统子类
-     * @param emsFacsSubtypes 能源设施/系统子类列表
+     * @param subCategorys 能源设施/系统子类列表
      * @return 结果
      */
-    void insertFacsSubtypeBatch(List<EmsFacsSubtype> emsFacsSubtypes);
+    void insertSubCategoryBatch(List<FacsSubCategory> subCategorys);
 
     /**
      * 修改能源设施/系统子类
      *
-     * @param emsFacsSubtype 能源设施/系统子类
+     * @param subCategory 能源设施/系统子类
      * @return 结果
      */
-    int updateFacsSubtype(EmsFacsSubtype emsFacsSubtype);
+    int updateSubCategory(FacsSubCategory subCategory);
 
     /**
      * 批量删除能源设施/系统子类
@@ -55,7 +55,7 @@ public interface IEmsFacsSubtypeService {
      * @param ids 需要删除的能源设施/系统子类主键集合
      * @return 结果
      */
-    int deleteFacsSubtypeByIds(Long[] ids);
+    int deleteSubCategoryByIds(Long[] ids);
 
     /**
      * 删除能源设施/系统子类信息
@@ -63,12 +63,12 @@ public interface IEmsFacsSubtypeService {
      * @param id 能源设施/系统子类主键
      * @return 结果
      */
-    int deleteFacsSubtypeById(Long id);
+    int deleteSubCategoryById(Long id);
 
     /**
      * 删除能源设施/系统子类信息
      * @param code 上级分类code
      * @return 结果
      */
-    int deleteFacsSubtypeByParentCode(String code);
+    int deleteSubCategoryByParentCode(String code);
 }

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

@@ -1,97 +0,0 @@
-package com.ruoyi.ems.service.impl;
-
-import java.util.List;
-
-import com.ruoyi.ems.domain.EmsFacsSubtype;
-import com.ruoyi.ems.mapper.EmsFacsSubtypeMapper;
-import com.ruoyi.ems.service.IEmsFacsSubtypeService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * 能源设施/系统子类Service业务层处理
- *
- * @author ruoyi
- * @date 2024-07-10
- */
-@Service
-public class EmsFacsSubtypeServiceImpl implements IEmsFacsSubtypeService {
-    @Autowired
-    private EmsFacsSubtypeMapper emsFacsSubtypeMapper;
-
-    /**
-     * 查询能源设施/系统子类
-     *
-     * @param id 能源设施/系统子类主键
-     * @return 能源设施/系统子类
-     */
-    @Override
-    public EmsFacsSubtype selectFacsSubtypeById(Long id) {
-        return emsFacsSubtypeMapper.selectFacsSubtypeById(id);
-    }
-
-    /**
-     * 查询能源设施/系统子类列表
-     *
-     * @param emsFacsSubtype 能源设施/系统子类
-     * @return 能源设施/系统子类
-     */
-    @Override
-    public List<EmsFacsSubtype> selectFacsSubtypeList(EmsFacsSubtype emsFacsSubtype) {
-        return emsFacsSubtypeMapper.selectFacsSubtypeList(emsFacsSubtype);
-    }
-
-    /**
-     * 新增能源设施/系统子类
-     *
-     * @param emsFacsSubtype 能源设施/系统子类
-     * @return 结果
-     */
-    @Override
-    public int insertFacsSubtype(EmsFacsSubtype emsFacsSubtype) {
-        return emsFacsSubtypeMapper.insertFacsSubtype(emsFacsSubtype);
-    }
-
-    @Override
-    public void insertFacsSubtypeBatch(List<EmsFacsSubtype> emsFacsSubtypes) {
-        emsFacsSubtypeMapper.insertFacsSubtypeBatch(emsFacsSubtypes);
-    }
-
-    /**
-     * 修改能源设施/系统子类
-     *
-     * @param emsFacsSubtype 能源设施/系统子类
-     * @return 结果
-     */
-    @Override
-    public int updateFacsSubtype(EmsFacsSubtype emsFacsSubtype) {
-        return emsFacsSubtypeMapper.updateFacsSubtype(emsFacsSubtype);
-    }
-
-    /**
-     * 批量删除能源设施/系统子类
-     *
-     * @param ids 需要删除的能源设施/系统子类主键
-     * @return 结果
-     */
-    @Override
-    public int deleteFacsSubtypeByIds(Long[] ids) {
-        return emsFacsSubtypeMapper.deleteFacsSubtypeByIds(ids);
-    }
-
-    /**
-     * 删除能源设施/系统子类信息
-     *
-     * @param id 能源设施/系统子类主键
-     * @return 结果
-     */
-    @Override
-    public int deleteFacsSubtypeById(Long id) {
-        return emsFacsSubtypeMapper.deleteFacsSubtypeById(id);
-    }
-
-    @Override
-    public int deleteFacsSubtypeByParentCode(String code) {
-        return emsFacsSubtypeMapper.deleteFacsSubtypeByParentCode(code);
-    }
-}

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

@@ -1,6 +1,8 @@
 package com.ruoyi.ems.service.impl;
 
 import java.util.List;
+
+import com.ruoyi.ems.domain.vo.QueryIndex;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.ems.mapper.ElecPgSupplyHMapper;
@@ -43,6 +45,11 @@ public class EmsPgSupplyHServiceImpl implements IElecPgSupplyHService
         return emsPgSupplyHMapper.selectPgSupplyHList(admEmsPgSupplyH);
     }
 
+    @Override
+    public List<ElecPgSupplyH> selectPgSupplyH(QueryIndex queryIndex) {
+        return emsPgSupplyHMapper.selectPgSupplyH(queryIndex);
+    }
+
     /**
      * 新增电网供应计量-小时
      * 

+ 33 - 33
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/EmsFacsTypeServiceImpl.java → ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/FacsCategoryServiceImpl.java

@@ -1,10 +1,10 @@
 package com.ruoyi.ems.service.impl;
 
-import com.ruoyi.ems.domain.EmsFacsSubtype;
-import com.ruoyi.ems.domain.EmsFacsType;
-import com.ruoyi.ems.mapper.EmsFacsTypeMapper;
-import com.ruoyi.ems.service.IEmsFacsSubtypeService;
-import com.ruoyi.ems.service.IEmsFacsTypeService;
+import com.ruoyi.ems.domain.FacsSubCategory;
+import com.ruoyi.ems.domain.FacsCategory;
+import com.ruoyi.ems.mapper.FacsCategoryMapper;
+import com.ruoyi.ems.service.IFacsSubCategoryService;
+import com.ruoyi.ems.service.IFacsCategoryService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -18,12 +18,12 @@ import java.util.List;
  * @date 2024-07-10
  */
 @Service
-public class EmsFacsTypeServiceImpl implements IEmsFacsTypeService {
+public class FacsCategoryServiceImpl implements IFacsCategoryService {
     @Autowired
-    private EmsFacsTypeMapper emsFacsTypeMapper;
+    private FacsCategoryMapper categoryMapper;
 
     @Autowired
-    private IEmsFacsSubtypeService facsSubtypeService;
+    private IFacsSubCategoryService subCategoryService;
 
     /**
      * 查询能源设施/系统分类
@@ -32,9 +32,9 @@ public class EmsFacsTypeServiceImpl implements IEmsFacsTypeService {
      * @return 能源设施/系统分类
      */
     @Override
-    public EmsFacsType selectFacsTypeById(Long id) {
+    public FacsCategory selectCategoryById(Long id) {
         // 查询主分类
-        EmsFacsType facsType = emsFacsTypeMapper.selectFacsTypeById(id);
+        FacsCategory facsType = categoryMapper.selectCategoryById(id);
 
         // 查询子分类
         if (null != facsType) {
@@ -51,9 +51,9 @@ public class EmsFacsTypeServiceImpl implements IEmsFacsTypeService {
      * @return 能源设施/系统分类
      */
     @Override
-    public List<EmsFacsType> selectFacsTypeList(EmsFacsType emsFacsType) {
+    public List<FacsCategory> selectCategoryList(FacsCategory emsFacsType) {
         // 查询主分类
-        List<EmsFacsType> list = emsFacsTypeMapper.selectFacsTypeList(emsFacsType);
+        List<FacsCategory> list = categoryMapper.selectCategoryList(emsFacsType);
 
         // 查询子分类
         if (CollectionUtils.isNotEmpty(list)) {
@@ -72,15 +72,15 @@ public class EmsFacsTypeServiceImpl implements IEmsFacsTypeService {
      * @return 结果
      */
     @Override
-    public int insertFacsType(EmsFacsType emsFacsType) {
-        int count = emsFacsTypeMapper.insertFacsType(emsFacsType);
+    public int insertCategory(FacsCategory emsFacsType) {
+        int count = categoryMapper.insertCategory(emsFacsType);
 
         if (CollectionUtils.isNotEmpty(emsFacsType.getSubtypeList())) {
-            facsSubtypeService.deleteFacsSubtypeByParentCode(emsFacsType.getCode());
-            facsSubtypeService.insertFacsSubtypeBatch(emsFacsType.getSubtypeList());
+            subCategoryService.deleteSubCategoryByParentCode(emsFacsType.getCode());
+            subCategoryService.insertSubCategoryBatch(emsFacsType.getSubtypeList());
         }
         else {
-            facsSubtypeService.deleteFacsSubtypeByParentCode(emsFacsType.getCode());
+            subCategoryService.deleteSubCategoryByParentCode(emsFacsType.getCode());
         }
 
         return count;
@@ -93,15 +93,15 @@ public class EmsFacsTypeServiceImpl implements IEmsFacsTypeService {
      * @return 结果
      */
     @Override
-    public int updateFacsType(EmsFacsType emsFacsType) {
-        int count = emsFacsTypeMapper.updateFacsType(emsFacsType);
+    public int updateCategory(FacsCategory emsFacsType) {
+        int count = categoryMapper.updateCategory(emsFacsType);
 
         if (CollectionUtils.isNotEmpty(emsFacsType.getSubtypeList())) {
-            facsSubtypeService.deleteFacsSubtypeByParentCode(emsFacsType.getCode());
-            facsSubtypeService.insertFacsSubtypeBatch(emsFacsType.getSubtypeList());
+            subCategoryService.deleteSubCategoryByParentCode(emsFacsType.getCode());
+            subCategoryService.insertSubCategoryBatch(emsFacsType.getSubtypeList());
         }
         else {
-            facsSubtypeService.deleteFacsSubtypeByParentCode(emsFacsType.getCode());
+            subCategoryService.deleteSubCategoryByParentCode(emsFacsType.getCode());
         }
 
         return count;
@@ -114,17 +114,17 @@ public class EmsFacsTypeServiceImpl implements IEmsFacsTypeService {
      * @return 结果
      */
     @Override
-    public int deleteFacsTypeByIds(Long[] ids) {
+    public int deleteCategoryByIds(Long[] ids) {
         for (Long id : ids) {
-            EmsFacsType facsType = emsFacsTypeMapper.selectFacsTypeById(id);
+            FacsCategory facsType = categoryMapper.selectCategoryById(id);
 
             // 查询扩展属性
             if (null != facsType) {
-                facsSubtypeService.deleteFacsSubtypeByParentCode(facsType.getCode());
+                subCategoryService.deleteSubCategoryByParentCode(facsType.getCode());
             }
         }
 
-        return emsFacsTypeMapper.deleteFacsTypeByIds(ids);
+        return categoryMapper.deleteCategoryByIds(ids);
     }
 
     /**
@@ -134,21 +134,21 @@ public class EmsFacsTypeServiceImpl implements IEmsFacsTypeService {
      * @return 结果
      */
     @Override
-    public int deleteFacsTypeById(Long id) {
-        EmsFacsType facsType = emsFacsTypeMapper.selectFacsTypeById(id);
+    public int deleteCategoryById(Long id) {
+        FacsCategory facsType = categoryMapper.selectCategoryById(id);
 
         // 查询扩展属性
         if (null != facsType) {
-            facsSubtypeService.deleteFacsSubtypeByParentCode(facsType.getCode());
+            subCategoryService.deleteSubCategoryByParentCode(facsType.getCode());
         }
 
-        return emsFacsTypeMapper.deleteFacsTypeById(id);
+        return categoryMapper.deleteCategoryById(id);
     }
 
-    private List<EmsFacsSubtype> getFacsSubtypes(EmsFacsType emsFacsType) {
-        EmsFacsSubtype param = new EmsFacsSubtype();
+    private List<FacsSubCategory> getFacsSubtypes(FacsCategory emsFacsType) {
+        FacsSubCategory param = new FacsSubCategory();
         param.setParentCode(emsFacsType.getCode());
 
-        return facsSubtypeService.selectFacsSubtypeList(param);
+        return subCategoryService.selectSubCategoryList(param);
     }
 }

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

@@ -0,0 +1,97 @@
+package com.ruoyi.ems.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.ems.domain.FacsSubCategory;
+import com.ruoyi.ems.mapper.FacsSubCategoryMapper;
+import com.ruoyi.ems.service.IFacsSubCategoryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 能源设施/系统子类Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-07-10
+ */
+@Service
+public class FacsSubCategoryServiceImpl implements IFacsSubCategoryService {
+    @Autowired
+    private FacsSubCategoryMapper subCategoryMapper;
+
+    /**
+     * 查询能源设施/系统子类
+     *
+     * @param id 能源设施/系统子类主键
+     * @return 能源设施/系统子类
+     */
+    @Override
+    public FacsSubCategory selectSubCategoryById(Long id) {
+        return subCategoryMapper.selectSubCategoryById(id);
+    }
+
+    /**
+     * 查询能源设施/系统子类列表
+     *
+     * @param subCategory 能源设施/系统子类
+     * @return 能源设施/系统子类
+     */
+    @Override
+    public List<FacsSubCategory> selectSubCategoryList(FacsSubCategory subCategory) {
+        return subCategoryMapper.selectSubCategoryList(subCategory);
+    }
+
+    /**
+     * 新增能源设施/系统子类
+     *
+     * @param subCategory 能源设施/系统子类
+     * @return 结果
+     */
+    @Override
+    public int insertSubCategory(FacsSubCategory subCategory) {
+        return subCategoryMapper.insertSubCategory(subCategory);
+    }
+
+    @Override
+    public void insertSubCategoryBatch(List<FacsSubCategory> subCategorys) {
+        subCategoryMapper.insertSubCategoryBatch(subCategorys);
+    }
+
+    /**
+     * 修改能源设施/系统子类
+     *
+     * @param subCategory 能源设施/系统子类
+     * @return 结果
+     */
+    @Override
+    public int updateSubCategory(FacsSubCategory subCategory) {
+        return subCategoryMapper.updateSubCategory(subCategory);
+    }
+
+    /**
+     * 批量删除能源设施/系统子类
+     *
+     * @param ids 需要删除的能源设施/系统子类主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSubCategoryByIds(Long[] ids) {
+        return subCategoryMapper.deleteSubCategoryByIds(ids);
+    }
+
+    /**
+     * 删除能源设施/系统子类信息
+     *
+     * @param id 能源设施/系统子类主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSubCategoryById(Long id) {
+        return subCategoryMapper.deleteSubCategoryById(id);
+    }
+
+    @Override
+    public int deleteSubCategoryByParentCode(String code) {
+        return subCategoryMapper.deleteSubCategoryByParentCode(code);
+    }
+}

+ 19 - 5
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/ElecPgSupplyHMapper.xml

@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="areaShortName"    column="area_short_name"    />
         <result property="facsCode"    column="facs_code"    />
         <result property="facsName"    column="facs_name"    />
+        <result property="recordTime"    column="record_time"    />
         <result property="date"    column="date"    />
         <result property="time"    column="time"    />
         <result property="timeIndex"    column="time_index"    />
@@ -22,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <sql id="selectPgSupplyHVo">
         select
-            pg.`id`, pg.`area_code`, a.`area_name`, a.`short_name` as area_short_name, pg.`facs_code`, f.`facs_name`, pg.`date`, pg.`time`, pg.`time_index`, pg.`meter_type`, pg.`meter_unit_price`, pg.`use_elec_quantity`, pg.`use_elec_cost`
+            pg.`id`, pg.`area_code`, a.`area_name`, a.`short_name` as area_short_name, pg.`facs_code`, f.`facs_name`, pg.`record_time`, pg.`date`, pg.`time`, pg.`time_index`, pg.`meter_type`, pg.`meter_unit_price`, pg.`use_elec_quantity`, pg.`use_elec_cost`
         from adm_ems_pg_supply_h pg
             LEFT JOIN adm_service_area a ON pg.`area_code` = a.`area_code`
             LEFT JOIN adm_ems_facs f ON pg.`facs_code` = f.`facs_code`
@@ -43,6 +44,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
 
+    <select id="selectPgSupplyH" parameterType="com.ruoyi.ems.domain.vo.QueryIndex" resultMap="PgSupplyHResult">
+        <include refid="selectPgSupplyHVo"/>
+        <where>
+            <if test="areaCode != null  and areaCode != ''"> and pg.`area_code` = #{areaCode}</if>
+            <if test="startTime != null  and startTime != '' and endTime != null and endTime !=''">
+             and pg.`record_time` &gt;= #{startTime} and pg.`record_time` &lt;= #{endTime}
+            </if>
+        </where>
+    </select>
+
     <select id="selectPgSupplyHById" parameterType="Long" resultMap="PgSupplyHResult">
         <include refid="selectPgSupplyHVo"/>
         where pg.`id` = #{id}
@@ -53,8 +64,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">area_code,</if>
             <if test="facsCode != null and facsCode != ''">facs_code,</if>
-            <if test="date != null">date,</if>
-            <if test="time != null">time,</if>
+            <if test="recordTime != null and recordTime != ''">record_time,</if>
+            <if test="date != null">`date`,</if>
+            <if test="time != null">`time`,</if>
             <if test="timeIndex != null">time_index,</if>
             <if test="meterType != null">meter_type,</if>
             <if test="meterUnitPrice != null">meter_unit_price,</if>
@@ -64,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">#{areaCode},</if>
             <if test="facsCode != null and facsCode != ''">#{facsCode},</if>
+            <if test="recordTime != null">#{recordTime},</if>
             <if test="date != null">#{date},</if>
             <if test="time != null">#{time},</if>
             <if test="timeIndex != null">#{timeIndex},</if>
@@ -79,8 +92,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">area_code = #{areaCode},</if>
             <if test="facsCode != null and facsCode != ''">facs_code = #{facsCode},</if>
-            <if test="date != null">date = #{date},</if>
-            <if test="time != null">time = #{time},</if>
+            <if test="recordTime != null and recordTime != ''">record_time = #{recordTime},</if>
+            <if test="date != null">`date` = #{date},</if>
+            <if test="time != null">`time` = #{time},</if>
             <if test="timeIndex != null">time_index = #{timeIndex},</if>
             <if test="meterType != null">meter_type = #{meterType},</if>
             <if test="meterUnitPrice != null">meter_unit_price = #{meterUnitPrice},</if>

+ 7 - 2
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/ElecPvSupplyHMapper.xml

@@ -10,6 +10,7 @@
         <result property="areaShortName" column="area_short_name"/>
         <result property="facsCode" column="facs_code"/>
         <result property="facsName" column="facs_name"/>
+        <result property="recordTime" column="record_time" />
         <result property="date" column="date" jdbcType="DATE"/>
         <result property="time" column="time"/>
         <result property="timeIndex" column="time_index"/>
@@ -27,6 +28,7 @@
                a.short_name as area_short_name,
                pv.facs_code,
                f.facs_name,
+               pv.`record_time`,
                pv.`date`,
                pv.`time`,
                pv.time_index,
@@ -130,6 +132,7 @@
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">area_code,</if>
             <if test="facsCode != null and facsCode != ''">facs_code,</if>
+            <if test="recordTime != null">`record_time`,</if>
             <if test="date != null">`date`,</if>
             <if test="time != null">`time`,</if>
             <if test="timeIndex != null">time_index,</if>
@@ -142,6 +145,7 @@
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">#{areaCode},</if>
             <if test="facsCode != null and facsCode != ''">#{facsCode},</if>
+            <if test="recordTime != null">#{recordTime},</if>
             <if test="date != null">#{date},</if>
             <if test="time != null">#{time},</if>
             <if test="timeIndex != null">#{timeIndex},</if>
@@ -158,8 +162,9 @@
         <trim prefix="SET" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">area_code = #{areaCode},</if>
             <if test="facsCode != null and facsCode != ''">facs_code = #{facsCode},</if>
-            <if test="date != null">date = #{date},</if>
-            <if test="time != null">time = #{time},</if>
+            <if test="recordTime != null and recordTime != ''">record_time = #{recordTime},</if>
+            <if test="date != null">`date` = #{date},</if>
+            <if test="time != null">`time` = #{time},</if>
             <if test="timeIndex != null">time_index = #{timeIndex},</if>
             <if test="upUnitPrice != null">up_unit_price = #{upUnitPrice},</if>
             <if test="genElecQuantity != null">gen_elec_quantity = #{genElecQuantity},</if>

+ 9 - 4
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/ElecUseHMapper.xml

@@ -11,6 +11,7 @@
         <result property="areaShortName" column="area_short_name"/>
         <result property="facsCode" column="facs_code"/>
         <result property="facsName" column="facs_name"/>
+        <result property="recordTime" column="record_time"/>
         <result property="date" column="date"/>
         <result property="time" column="time"/>
         <result property="timeIndex" column="time_index"/>
@@ -26,6 +27,7 @@
                f.facs_name,
                f.facs_type,
                f.facs_subtype,
+               u.record_time,
                u.`date`,
                u.`time`,
                u.time_index,
@@ -59,14 +61,16 @@
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">area_code,</if>
             <if test="facsCode != null and facsCode != ''">facs_code,</if>
-            <if test="date != null">date,</if>
-            <if test="time != null">time,</if>
+            <if test="recordTime != null">record_time,</if>
+            <if test="date != null">`date`,</if>
+            <if test="time != null">`time`,</if>
             <if test="timeIndex != null">time_index,</if>
             <if test="elecQuantity != null">elec_quantity,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">#{areaCode},</if>
             <if test="facsCode != null and facsCode != ''">#{facsCode},</if>
+            <if test="recordTime != null">#{recordTime},</if>
             <if test="date != null">#{date},</if>
             <if test="time != null">#{time},</if>
             <if test="timeIndex != null">#{timeIndex},</if>
@@ -79,8 +83,9 @@
         <trim prefix="SET" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">area_code = #{areaCode},</if>
             <if test="facsCode != null and facsCode != ''">facs_code = #{facsCode},</if>
-            <if test="date != null">date = #{date},</if>
-            <if test="time != null">time = #{time},</if>
+            <if test="recordTime != null">record_time = #{recordTime},</if>
+            <if test="date != null">`date` = #{date},</if>
+            <if test="time != null">`time` = #{time},</if>
             <if test="timeIndex != null">time_index = #{timeIndex},</if>
             <if test="elecQuantity != null">elec_quantity = #{elecQuantity},</if>
         </trim>

+ 9 - 4
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/EmsElecStoreHMapper.xml

@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="areaShortName"  column="area_short_name"    />
         <result property="facsCode"    column="facs_code"    />
         <result property="facsName"    column="facs_name"    />
+        <result property="recordTime"    column="record_time"    />
         <result property="date"    column="date"    />
         <result property="time"    column="time"    />
         <result property="timeIndex"    column="time_index"    />
@@ -26,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             area.short_name as area_short_name,
             facs.facs_name,
             st.facs_code,
+            st.`record_time`,
             st.`date`,
             st.`time`,
             st.time_index,
@@ -58,8 +60,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">area_code,</if>
             <if test="facsCode != null and facsCode != ''">facs_code,</if>
-            <if test="date != null">date,</if>
-            <if test="time != null">time,</if>
+            <if test="recordTime != null">record_time,</if>
+            <if test="date != null">`date`,</if>
+            <if test="time != null">`time`,</if>
             <if test="timeIndex != null">time_index,</if>
             <if test="chargeElecQuantity != null">charge_elec_quantity,</if>
             <if test="dischargeElecQuantity != null">discharge_elec_quantity,</if>
@@ -67,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">#{areaCode},</if>
             <if test="facsCode != null and facsCode != ''">#{facsCode},</if>
+            <if test="recordTime != null">#{recordTime},</if>
             <if test="date != null">#{date},</if>
             <if test="time != null">#{time},</if>
             <if test="timeIndex != null">#{timeIndex},</if>
@@ -80,8 +84,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="areaCode != null and areaCode != ''">area_code = #{areaCode},</if>
             <if test="facsCode != null and facsCode != ''">facs_code = #{facsCode},</if>
-            <if test="date != null">date = #{date},</if>
-            <if test="time != null">time = #{time},</if>
+            <if test="recordTime != null">record_time = #{recordTime},</if>
+            <if test="date != null">`date` = #{date},</if>
+            <if test="time != null">`time` = #{time},</if>
             <if test="timeIndex != null">time_index = #{timeIndex},</if>
             <if test="chargeElecQuantity != null">charge_elec_quantity = #{chargeElecQuantity},</if>
             <if test="dischargeElecQuantity != null">discharge_elec_quantity = #{dischargeElecQuantity},</if>

+ 21 - 13
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/EmsFacsMapper.xml

@@ -8,10 +8,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="facsCode"    column="facs_code"    />
         <result property="facsName"    column="facs_name"    />
-        <result property="facsType"    column="facs_type"    />
-        <result property="facsTypeName"    column="facs_type_name"    />
-        <result property="facsSubtype"    column="facs_subtype"    />
-        <result property="facsSubtypeName"    column="facs_subtype_name"    />
+        <result property="facsCategory"    column="facs_category"    />
+        <result property="facsCategoryName"    column="facs_category_name"    />
+        <result property="facsSubCategory"    column="facs_subcategory"    />
+        <result property="facsSubCategoryName"    column="facs_subcategory_name"    />
         <result property="enable"    column="enable"    />
         <result property="refArea"    column="ref_area"    />
         <result property="refAreaName"    column="ref_area_name"    />
@@ -20,7 +20,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectEmsFacsVo">
-        select f.`id`, f.`facs_code`, f.`facs_name`, f.`facs_type`, t.`name` as facs_type_name, f.`facs_subtype`, s.`name` as facs_subtype_name, f.`enable`, f.`ref_area`, a.`area_name` as ref_area_name, f.`create_time`, f.`update_time` from adm_ems_facs f LEFT JOIN dim_ems_facs_type t ON f.`facs_type` = t.`code` LEFT JOIN dim_ems_facs_subtype s ON f.`facs_subtype`= s.`code` LEFT JOIN adm_service_area a ON f.`ref_area` = a.`area_code`
+        SELECT
+            f.`id`, f.`facs_code`, f.`facs_name`, f.`facs_category`, f.`facs_subcategory`, f.`enable`, f.`ref_area`, f.`create_time`, f.`update_time`,
+            t.`name` as facs_category_name,
+            s.`name` as facs_subcategory_name,
+            a.`area_name` as ref_area_name
+        FROM adm_ems_facs f
+            LEFT JOIN dim_ems_facs_category t ON f.`facs_category` = t.`code`
+            LEFT JOIN dim_ems_facs_subcategory s ON f.`facs_subcategory`= s.`code`
+            LEFT JOIN adm_service_area a ON f.`ref_area` = a.`area_code`
     </sql>
 
     <select id="selectEmsFacsList" parameterType="com.ruoyi.ems.domain.EmsFacs" resultMap="EmsFacsResult">
@@ -28,8 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>  
             <if test="facsCode != null  and facsCode != ''"> and f.`facs_code` = #{facsCode}</if>
             <if test="facsName != null  and facsName != ''"> and f.`facs_name` like concat('%', #{facsName}, '%')</if>
-            <if test="facsType != null  and facsType != ''"> and f.`facs_type` = #{facsType}</if>
-            <if test="facsSubtype != null  and facsSubtype != ''"> and f.`facs_subtype` = #{facsSubtype}</if>
+            <if test="facsCategory != null  and facsCategory != ''"> and f.`facs_category` = #{facsCategory}</if>
+            <if test="facsSubCategory != null  and facsSubCategory != ''"> and f.`facs_subcategory` = #{facsSubCategory}</if>
             <if test="enable != null "> and f.`enable` = #{enable}</if>
             <if test="refArea != null  and refArea != ''"> and f.`ref_area` = #{refArea}</if>
         </where>
@@ -50,8 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="facsCode != null and facsCode != ''">facs_code,</if>
             <if test="facsName != null and facsName != ''">facs_name,</if>
-            <if test="facsType != null and facsType != ''">facs_type,</if>
-            <if test="facsSubtype != null and facsSubtype != ''">facs_subtype,</if>
+            <if test="facsCategory != null and facsType != ''">facs_category,</if>
+            <if test="facsSubCategory != null and facsSubtype != ''">facs_subcategory,</if>
             <if test="enable != null">enable,</if>
             <if test="refArea != null and refArea != ''">ref_area,</if>
             <if test="createTime != null">create_time,</if>
@@ -60,8 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="facsCode != null and facsCode != ''">#{facsCode},</if>
             <if test="facsName != null and facsName != ''">#{facsName},</if>
-            <if test="facsType != null and facsType != ''">#{facsType},</if>
-            <if test="facsSubtype != null and facsSubtype != ''">#{facsSubtype},</if>
+            <if test="facsCategory != null and facsCategory != ''">#{facsCategory},</if>
+            <if test="facsSubCategory != null and facsSubCategory != ''">#{facsSubCategory},</if>
             <if test="enable != null">#{enable},</if>
             <if test="refArea != null and refArea != ''">#{refArea},</if>
             <if test="createTime != null">#{createTime},</if>
@@ -74,8 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="facsCode != null and facsCode != ''">facs_code = #{facsCode},</if>
             <if test="facsName != null and facsName != ''">facs_name = #{facsName},</if>
-            <if test="facsType != null and facsType != ''">facs_type = #{facsType},</if>
-            <if test="facsSubtype != null and facsSubtype != ''">facs_subtype = #{facsSubtype},</if>
+            <if test="facsCategory != null and facsCategory != ''">facs_category = #{facsCategory},</if>
+            <if test="facsSubCategory != null and facsSubCategory != ''">facs_subcategory = #{facsSubCategory},</if>
             <if test="enable != null">enable = #{enable},</if>
             <if test="refArea != null and refArea != ''">ref_area = #{refArea},</if>
             <if test="createTime != null">create_time = #{createTime},</if>

+ 16 - 16
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/EmsFacsTypeMapper.xml → ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/FacsCategoryMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.ems.mapper.EmsFacsTypeMapper">
+<mapper namespace="com.ruoyi.ems.mapper.FacsCategoryMapper">
     
-    <resultMap type="com.ruoyi.ems.domain.EmsFacsType" id="EmsFacsTypeResult">
+    <resultMap type="com.ruoyi.ems.domain.FacsCategory" id="FacsCategoryResult">
         <result property="id"    column="id"    />
         <result property="code"    column="code"    />
         <result property="name"    column="name"    />
@@ -12,12 +12,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="version"    column="version"    />
     </resultMap>
 
-    <sql id="selectFacsTypeVo">
-        select `id`, `code`, `name`, `desc`, `version` from dim_ems_facs_type
+    <sql id="selectCategoryVo">
+        select `id`, `code`, `name`, `desc`, `version` from dim_ems_facs_category
     </sql>
 
-    <select id="selectFacsTypeList" parameterType="com.ruoyi.ems.domain.EmsFacsType" resultMap="EmsFacsTypeResult">
-        <include refid="selectFacsTypeVo"/>
+    <select id="selectCategoryList" parameterType="com.ruoyi.ems.domain.FacsCategory" resultMap="FacsCategoryResult">
+        <include refid="selectCategoryVo"/>
         <where>  
             <if test="code != null  and code != ''"> and code = #{code}</if>
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
@@ -26,13 +26,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     
-    <select id="selectFacsTypeById" parameterType="Long" resultMap="EmsFacsTypeResult">
-        <include refid="selectFacsTypeVo"/>
+    <select id="selectCategoryById" parameterType="Long" resultMap="FacsCategoryResult">
+        <include refid="selectCategoryVo"/>
         where id = #{id}
     </select>
         
-    <insert id="insertFacsType" parameterType="com.ruoyi.ems.domain.EmsFacsType" useGeneratedKeys="true" keyProperty="id">
-        insert into dim_ems_facs_type
+    <insert id="insertCategory" parameterType="com.ruoyi.ems.domain.FacsCategory" useGeneratedKeys="true" keyProperty="id">
+        insert into dim_ems_facs_category
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="code != null and code != ''">code,</if>
             <if test="name != null and name != ''">name,</if>
@@ -47,8 +47,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
     </insert>
 
-    <update id="updateFacsType" parameterType="com.ruoyi.ems.domain.EmsFacsType">
-        update dim_ems_facs_type
+    <update id="updateCategory" parameterType="com.ruoyi.ems.domain.FacsCategory">
+        update dim_ems_facs_category
         <trim prefix="SET" suffixOverrides=",">
             <if test="code != null and code != ''">`code` = #{code},</if>
             <if test="name != null and name != ''">`name` = #{name},</if>
@@ -58,12 +58,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where `id` = #{id}
     </update>
 
-    <delete id="deleteFacsTypeById" parameterType="Long">
-        delete from dim_ems_facs_type where id = #{id}
+    <delete id="deleteCategoryById" parameterType="Long">
+        delete from dim_ems_facs_category where id = #{id}
     </delete>
 
-    <delete id="deleteFacsTypeByIds" parameterType="String">
-        delete from dim_ems_facs_type where id in 
+    <delete id="deleteCategoryByIds" parameterType="String">
+        delete from dim_ems_facs_category where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>

+ 20 - 20
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/EmsFacsSubtypeMapper.xml → ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/FacsSubCategoryMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.ems.mapper.EmsFacsSubtypeMapper">
+<mapper namespace="com.ruoyi.ems.mapper.FacsSubCategoryMapper">
     
-    <resultMap type="com.ruoyi.ems.domain.EmsFacsSubtype" id="EmsFacsSubtypeResult">
+    <resultMap type="com.ruoyi.ems.domain.FacsSubCategory" id="subCategoryResult">
         <result property="id"    column="id"    />
         <result property="code"    column="code"    />
         <result property="name"    column="name"    />
@@ -13,12 +13,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="version"    column="version"    />
     </resultMap>
 
-    <sql id="selectFacsSubtypeVo">
-        select `id`, `code`, `name`, `parent_code`, `desc`, `version` from dim_ems_facs_subtype
+    <sql id="selectSubCategoryVo">
+        select `id`, `code`, `name`, `parent_code`, `desc`, `version` from dim_ems_facs_subcategory
     </sql>
 
-    <select id="selectFacsSubtypeList" parameterType="com.ruoyi.ems.domain.EmsFacsSubtype" resultMap="EmsFacsSubtypeResult">
-        <include refid="selectFacsSubtypeVo"/>
+    <select id="selectSubCategoryList" parameterType="com.ruoyi.ems.domain.FacsSubCategory" resultMap="subCategoryResult">
+        <include refid="selectSubCategoryVo"/>
         <where>  
             <if test="code != null  and code != ''"> and code = #{code}</if>
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
@@ -28,13 +28,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     
-    <select id="selectFacsSubtypeById" parameterType="Long" resultMap="EmsFacsSubtypeResult">
-        <include refid="selectFacsSubtypeVo"/>
+    <select id="selectSubCategoryById" parameterType="Long" resultMap="subCategoryResult">
+        <include refid="selectSubCategoryVo"/>
         where id = #{id}
     </select>
         
-    <insert id="insertFacsSubtype" parameterType="com.ruoyi.ems.domain.EmsFacsSubtype" useGeneratedKeys="true" keyProperty="id">
-        insert into dim_ems_facs_subtype
+    <insert id="insertSubCategory" parameterType="com.ruoyi.ems.domain.FacsSubCategory" useGeneratedKeys="true" keyProperty="id">
+        insert into dim_ems_facs_subcategory
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="code != null and code != ''">`code`,</if>
             <if test="name != null and name != ''">`name`,</if>
@@ -51,15 +51,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
     </insert>
 
-    <insert id="insertFacsSubtypeBatch" parameterType="java.util.List">
-        insert into dim_ems_facs_subtype (`code`, `name`, `parent_code`, `desc`, `version`) values
+    <insert id="insertSubCategoryBatch" parameterType="java.util.List">
+        insert into dim_ems_facs_subcategory (`code`, `name`, `parent_code`, `desc`, `version`) values
         <foreach collection="list" item="item" index="index" separator=",">
             (#{item.code},#{item.name},#{item.parentCode},#{item.desc},#{item.version})
         </foreach>
     </insert>
 
-    <update id="updateFacsSubtype" parameterType="com.ruoyi.ems.domain.EmsFacsSubtype">
-        update dim_ems_facs_subtype
+    <update id="updateSubCategory" parameterType="com.ruoyi.ems.domain.FacsSubCategory">
+        update dim_ems_facs_subcategory
         <trim prefix="SET" suffixOverrides=",">
             <if test="code != null and code != ''">`code` = #{code},</if>
             <if test="name != null and name != ''">`name` = #{name},</if>
@@ -70,18 +70,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
-    <delete id="deleteFacsSubtypeById" parameterType="Long">
-        delete from dim_ems_facs_subtype where `id` = #{id}
+    <delete id="deleteSubCategoryById" parameterType="Long">
+        delete from dim_ems_facs_subcategory where `id` = #{id}
     </delete>
 
-    <delete id="deleteFacsSubtypeByIds" parameterType="String">
-        delete from dim_ems_facs_subtype where `id` in
+    <delete id="deleteSubCategoryByIds" parameterType="String">
+        delete from dim_ems_facs_subcategory where `id` in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
 
-    <delete id="deleteFacsSubtypeByParentCode" parameterType="String">
-        delete from dim_ems_facs_subtype where `parent_code` = #{code}
+    <delete id="deleteSubCategoryByParentCode" parameterType="String">
+        delete from dim_ems_facs_subcategory where `parent_code` = #{code}
     </delete>
 </mapper>

+ 196 - 188
ems-cloud/sql/ems_init_data.sql

@@ -102,21 +102,21 @@ INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`,
 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 ('C101', '北区-储能', 'C', 'C1', 1, '321283124S3001');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('C102', '南区-储能', 'C', 'C1', 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');
-INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('E503', '主路-光伏', 'E', 'E5', 1, '321283124S3003');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('W201', '北区-供电网', 'W', 'W2', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('W202', '南区-供电网', 'W', 'W2', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('E501', '北区-光伏', 'E', 'E5', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('E502', '南区-光伏', 'E', 'E5', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('C101', '北区-储能', 'C', 'C1', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('C102', '南区-储能', 'C', 'C1', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('Z101', '北区-室内照明', 'Z', 'Z001', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('Z102', '北区-室外照明', 'Z', 'Z002', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('Z110', '北区-公共设施', 'Z', 'Z010', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('Z120', '北区-空调设施', 'Z', 'Z020', 1, '321283124S3001');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('Z201', '南区-室内照明', 'Z', 'Z001', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('Z202', '南区-室外照明', 'Z', 'Z002', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('Z210', '南区-公共设施', 'Z', 'Z010', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('Z220', '南区-空调设施', 'Z', 'Z020', 1, '321283124S3002');
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('E503', '主路-光伏', 'E', 'E5', 1, '321283124S3003');
 
 -- 设施属性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');
@@ -136,6 +136,7 @@ INSERT INTO `adm_ems_facs_flow_rel` (`code`, `export_facs_code`, `input_facs_cod
 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');
 
 -- 能源设备
+INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'Z010-R101-001', '开水炉',       '1', '2', 'Zoning', 'B-101', '321283124S3001,321283124S300101,B-101', 'Z110', 'SYS_BA');
 INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'Z010-R102-002', '超市照明灯',       '1', '2', 'Zoning', 'B-102', '321283124S3001,321283124S300101,B-102', 'Z110', 'SYS_BA');
 INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'Z010-R102-003', '超市监控和防盗设备', '1', '2', 'Zoning', 'B-102', '321283124S3001,321283124S300101,B-102', 'Z110', 'SYS_BA');
 INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'Z010-R103-001', '空调',             '2', '1', 'Zoning', 'B-103', '321283124S3001,321283124S300101,B-103', 'Z120', 'SYS_BA');
@@ -494,180 +495,187 @@ INSERT INTO adm_meter_reading (`device_code`, `area_code`, `year`, `meter_month`
 INSERT INTO adm_meter_reading (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-D-B-Z120', '321283124S3001', '2024', '202408', 387, '2024-07-31', 465, '2024-08-31', 3900, NULL, NULL);
 
 -- 电网计量指标数据
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '00:00:00', 1, 0, 0.75, 70, 52.5);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '01:00:00', 2, 0, 0.75, 65, 48.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '02:00:00', 3, 0, 0.75, 60, 45);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '03:00:00', 4, 0, 0.75, 68, 51);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '04:00:00', 5, 0, 0.75, 77, 57.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '05:00:00', 6, 0, 0.75, 86, 63);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '06:00:00', 7, 0, 0.75, 97, 72.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '07:00:00', 8, 0, 0.75, 127, 96);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '08:00:00', 9, 0, 0.75, 133, 99.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '09:00:00', 10, 0, 0.75, 150, 112.2);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '10:00:00', 11, 0, 0.75, 120, 90);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '11:00:00', 12, 0, 0.75, 158, 118.5);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '12:00:00', 13, 0, 0.75, 164, 112.2);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '13:00:00', 14, 0, 0.75, 147, 110.25);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '14:00:00', 15, 0, 0.75, 184, 138);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '15:00:00', 16, 0, 0.75, 135, 101.25);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '16:00:00', 17, 0, 0.75, 120, 90);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '17:00:00', 18, 0, 0.75, 117, 112.2);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '18:00:00', 19, 0, 0.75, 110, 87.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '19:00:00', 20, 0, 0.75, 98, 73.5);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '20:00:00', 21, 0, 0.75, 87, 65.25);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '21:00:00', 22, 0, 0.75, 77, 57.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '22:00:00', 23, 0, 0.75, 84, 63);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01', '23:00:00', 24, 0, 0.75, 62, 46.5);
-
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '01:00:00', 1, 0, 0.75, 164, 112.2);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '02:00:00', 2, 0, 0.75, 147, 110.25);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '03:00:00', 3, 0, 0.75, 184, 138);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '04:00:00', 4, 0, 0.75, 135, 101.25);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '05:00:00', 5, 0, 0.75, 120, 90);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '06:00:00', 6, 0, 0.75, 117, 112.2);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '07:00:00', 7, 0, 0.75, 110, 87.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '08:00:00', 8, 0, 0.75, 98, 73.5);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '09:00:00', 9, 0, 0.75, 87, 65.25);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '10:00:00', 10, 0, 0.75, 77, 57.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '11:00:00', 11, 0, 0.75, 84, 63);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '12:00:00', 12, 0, 0.75, 62, 46.5);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '13:00:00', 13, 0, 0.75, 70, 52.5);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '14:00:00', 14, 0, 0.75, 65, 48.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '15:00:00', 15, 0, 0.75, 60, 45);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '16:00:00', 16, 0, 0.75, 68, 51);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '17:00:00', 17, 0, 0.75, 77, 57.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '18:00:00', 18, 0, 0.75, 86, 63);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '19:00:00', 19, 0, 0.75, 97, 72.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '20:00:00', 20, 0, 0.75, 127, 96);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '21:00:00', 21, 0, 0.75, 133, 99.75);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '22:00:00', 22, 0, 0.75, 150, 112.2);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '23:00:00', 23, 0, 0.75, 120, 90);
-INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01', '24:00:00', 24, 0, 0.75, 158, 118.5);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 00:00:00', '2024-09-01', '00:00:00', 1, 0, 0.75, 70, 52.5);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 01:00:00', '2024-09-01', '01:00:00', 2, 0, 0.75, 65, 48.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 02:00:00', '2024-09-01', '02:00:00', 3, 0, 0.75, 60, 45);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 03:00:00', '2024-09-01', '03:00:00', 4, 0, 0.75, 68, 51);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 04:00:00', '2024-09-01', '04:00:00', 5, 0, 0.75, 77, 57.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 05:00:00', '2024-09-01', '05:00:00', 6, 0, 0.75, 86, 63);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 06:00:00', '2024-09-01', '06:00:00', 7, 0, 0.75, 97, 72.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 07:00:00', '2024-09-01', '07:00:00', 8, 0, 0.75, 127, 96);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 08:00:00', '2024-09-01', '08:00:00', 9, 0, 0.75, 133, 99.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 09:00:00', '2024-09-01', '09:00:00', 10, 0, 0.75, 150, 112.2);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 10:00:00', '2024-09-01', '10:00:00', 11, 0, 0.75, 120, 90);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 11:00:00', '2024-09-01', '11:00:00', 12, 0, 0.75, 158, 118.5);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 12:00:00', '2024-09-01', '12:00:00', 13, 0, 0.75, 164, 112.2);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 13:00:00', '2024-09-01', '13:00:00', 14, 0, 0.75, 147, 110.25);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 14:00:00', '2024-09-01', '14:00:00', 15, 0, 0.75, 184, 138);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 15:00:00', '2024-09-01', '15:00:00', 16, 0, 0.75, 135, 101.25);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 16:00:00', '2024-09-01', '16:00:00', 17, 0, 0.75, 120, 90);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 17:00:00', '2024-09-01', '17:00:00', 18, 0, 0.75, 117, 112.2);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 18:00:00', '2024-09-01', '18:00:00', 19, 0, 0.75, 110, 87.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 19:00:00', '2024-09-01', '19:00:00', 20, 0, 0.75, 98, 73.5);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 20:00:00', '2024-09-01', '20:00:00', 21, 0, 0.75, 87, 65.25);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 21:00:00', '2024-09-01', '21:00:00', 22, 0, 0.75, 77, 57.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 22:00:00', '2024-09-01', '22:00:00', 23, 0, 0.75, 84, 63);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3001', 'W201', '2024-09-01 23:00:00', '2024-09-01', '23:00:00', 24, 0, 0.75, 62, 46.5);
+
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 00:00:00', '2024-09-01', '00:00:00', 1, 0, 0.75, 164, 112.2);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 01:00:00', '2024-09-01', '01:00:00', 2, 0, 0.75, 164, 112.2);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 02:00:00', '2024-09-01', '02:00:00', 3, 0, 0.75, 147, 110.25);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 03:00:00', '2024-09-01', '03:00:00', 4, 0, 0.75, 184, 138);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 04:00:00', '2024-09-01', '04:00:00', 5, 0, 0.75, 135, 101.25);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 05:00:00', '2024-09-01', '05:00:00', 6, 0, 0.75, 120, 90);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 06:00:00', '2024-09-01', '06:00:00', 7, 0, 0.75, 117, 112.2);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 07:00:00', '2024-09-01', '07:00:00', 8, 0, 0.75, 110, 87.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 08:00:00', '2024-09-01', '08:00:00', 9, 0, 0.75, 98, 73.5);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 09:00:00', '2024-09-01', '09:00:00', 10, 0, 0.75, 87, 65.25);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 10:00:00', '2024-09-01', '10:00:00', 11, 0, 0.75, 77, 57.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 11:00:00', '2024-09-01', '11:00:00', 12, 0, 0.75, 84, 63);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 12:00:00', '2024-09-01', '12:00:00', 13, 0, 0.75, 62, 46.5);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 13:00:00', '2024-09-01', '13:00:00', 14, 0, 0.75, 70, 52.5);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 14:00:00', '2024-09-01', '14:00:00', 15, 0, 0.75, 65, 48.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 15:00:00', '2024-09-01', '15:00:00', 16, 0, 0.75, 60, 45);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 16:00:00', '2024-09-01', '16:00:00', 17, 0, 0.75, 68, 51);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 17:00:00', '2024-09-01', '17:00:00', 18, 0, 0.75, 77, 57.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 18:00:00', '2024-09-01', '18:00:00', 19, 0, 0.75, 86, 63);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 19:00:00', '2024-09-01', '19:00:00', 20, 0, 0.75, 97, 72.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 20:00:00', '2024-09-01', '20:00:00', 21, 0, 0.75, 127, 96);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 21:00:00', '2024-09-01', '21:00:00', 22, 0, 0.75, 133, 99.75);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 22:00:00', '2024-09-01', '22:00:00', 23, 0, 0.75, 150, 112.2);
+INSERT INTO `adm_ems_pg_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `meter_type`, `meter_unit_price`, `use_elec_quantity`, `use_elec_cost`) VALUES ('321283124S3002', 'W202', '2024-09-01 23:00:00', '2024-09-01', '23:00:00', 24, 0, 0.75, 120, 90);
+
 
 -- 光伏指标数据
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '00:00:00', 1, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '01:00:00', 2, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '02:00:00', 3, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '03:00:00', 4, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '04:00:00', 5, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '05:00:00', 6, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '06:00:00', 7, 0.45, 10, 10, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '07:00:00', 8, 0.45, 17, 12, 5, 2.25);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '08:00:00', 9, 0.45, 28, 15, 13, 5.85);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '09:00:00', 10, 0.45, 40, 25, 25, 11.25);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '10:00:00', 11, 0.45, 67, 30, 37, 16.65);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '11:00:00', 12, 0.45, 88, 50, 38, 17.1);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '12:00:00', 13, 0.45, 96, 72, 24, 10.8);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '13:00:00', 14, 0.45, 112, 80, 32, 14.4);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '14:00:00', 15, 0.45, 128, 97, 31, 13.95);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '15:00:00', 16, 0.45, 108, 60, 48, 21.6);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '16:00:00', 17, 0.45, 68, 38, 30, 13.5);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '17:00:00', 18, 0.45, 37, 20, 17, 7.65);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '18:00:00', 19, 0.45, 23, 10, 13, 5.85);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '19:00:00', 20, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '20:00:00', 21, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '21:00:00', 22, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '22:00:00', 23, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01', '23:00:00', 24, 0.45, 0, 0, 0, 0);
-
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '00:00:00', 1, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '01:00:00', 2, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '02:00:00', 3, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '03:00:00', 4, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '04:00:00', 5, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '05:00:00', 6, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '06:00:00', 7, 0.45, 10, 10, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '07:00:00', 8, 0.45, 17, 12, 5, 2.25);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '08:00:00', 9, 0.45, 28, 15, 13, 5.85);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '09:00:00', 10, 0.45, 40, 25, 25, 11.25);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '10:00:00', 11, 0.45, 67, 30, 37, 16.65);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '11:00:00', 12, 0.45, 88, 50, 38, 17.1);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '12:00:00', 13, 0.45, 96, 72, 24, 10.8);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '13:00:00', 14, 0.45, 112, 80, 32, 14.4);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '14:00:00', 15, 0.45, 128, 97, 31, 13.95);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '15:00:00', 16, 0.45, 108, 60, 48, 21.6);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '16:00:00', 17, 0.45, 68, 38, 30, 13.5);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '17:00:00', 18, 0.45, 37, 20, 17, 7.65);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '18:00:00', 19, 0.45, 23, 10, 13, 5.85);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '19:00:00', 20, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '20:00:00', 21, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '21:00:00', 22, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '22:00:00', 23, 0.45, 0, 0, 0, 0);
-INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01', '23:00:00', 24, 0.45, 0, 0, 0, 0);
-
-
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '00:00:00', 1, 35, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '01:00:00', 2, 43, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '02:00:00', 3, 55, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '03:00:00', 4, 51, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '04:00:00', 5, 46, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '05:00:00', 6, 49, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '06:00:00', 7, 35, 5);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '07:00:00', 8, 20, 10);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '08:00:00', 9, 10, 5);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '09:00:00', 10, 0, 30);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '10:00:00', 11, 0, 35);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '11:00:00', 12, 0, 40);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '12:00:00', 13, 0, 45);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '13:00:00', 14, 0, 48);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '14:00:00', 15, 0, 57);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '15:00:00', 16, 0, 49);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '16:00:00', 17, 0, 37);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '17:00:00', 18, 0, 20);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '18:00:00', 19, 33, 10);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '19:00:00', 20, 42, 15);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '20:00:00', 21, 44, 18);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '21:00:00', 22, 56, 13);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '22:00:00', 23, 40, 10);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01', '23:00:00', 24, 47, 5);
-
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '00:00:00', 1, 53, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '01:00:00', 2, 34, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '02:00:00', 3, 55, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '03:00:00', 4, 45, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '04:00:00', 5, 64, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '05:00:00', 6, 54, 0);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '06:00:00', 7, 53, 8);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '07:00:00', 8, 42, 12);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '08:00:00', 9, 37, 11);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '09:00:00', 10, 0, 22);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '10:00:00', 11, 0, 45);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '11:00:00', 12, 0, 46);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '12:00:00', 13, 0, 51);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '13:00:00', 14, 0, 39);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '14:00:00', 15, 0, 60);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '15:00:00', 16, 0, 39);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '16:00:00', 17, 0, 46);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '17:00:00', 18, 0, 18);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '18:00:00', 19, 37, 15);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '19:00:00', 20, 34, 19);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '20:00:00', 21, 41, 13);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '21:00:00', 22, 60, 17);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '22:00:00', 23, 48, 15);
-INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01', '23:00:00', 24, 43, 11);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 00:00:00', '2024-09-01', '00:00:00', 1, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 01:00:00', '2024-09-01', '01:00:00', 2, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 02:00:00', '2024-09-01', '02:00:00', 3, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 03:00:00', '2024-09-01', '03:00:00', 4, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 04:00:00', '2024-09-01', '04:00:00', 5, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 05:00:00', '2024-09-01', '05:00:00', 6, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 06:00:00', '2024-09-01', '06:00:00', 7, 0.45, 10, 10, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 07:00:00', '2024-09-01', '07:00:00', 8, 0.45, 17, 12, 5, 2.25);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 08:00:00', '2024-09-01', '08:00:00', 9, 0.45, 28, 15, 13, 5.85);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 09:00:00', '2024-09-01', '09:00:00', 10, 0.45, 40, 25, 25, 11.25);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 10:00:00', '2024-09-01', '10:00:00', 11, 0.45, 67, 30, 37, 16.65);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 11:00:00', '2024-09-01', '11:00:00', 12, 0.45, 88, 50, 38, 17.1);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 12:00:00', '2024-09-01', '12:00:00', 13, 0.45, 96, 72, 24, 10.8);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 13:00:00', '2024-09-01', '13:00:00', 14, 0.45, 112, 80, 32, 14.4);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 14:00:00', '2024-09-01', '14:00:00', 15, 0.45, 128, 97, 31, 13.95);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 15:00:00', '2024-09-01', '15:00:00', 16, 0.45, 108, 60, 48, 21.6);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 16:00:00', '2024-09-01', '16:00:00', 17, 0.45, 68, 38, 30, 13.5);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 17:00:00', '2024-09-01', '17:00:00', 18, 0.45, 37, 20, 17, 7.65);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 18:00:00', '2024-09-01', '18:00:00', 19, 0.45, 23, 10, 13, 5.85);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 19:00:00', '2024-09-01', '19:00:00', 20, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 20:00:00', '2024-09-01', '20:00:00', 21, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 21:00:00', '2024-09-01', '21:00:00', 22, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 22:00:00', '2024-09-01', '22:00:00', 23, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3001', 'E501', '2024-09-01 23:00:00', '2024-09-01', '23:00:00', 24, 0.45, 0, 0, 0, 0);
+
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 00:00:00', '2024-09-01', '00:00:00', 1, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 01:00:00', '2024-09-01', '01:00:00', 2, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 02:00:00', '2024-09-01', '02:00:00', 3, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 03:00:00', '2024-09-01', '03:00:00', 4, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 04:00:00', '2024-09-01', '04:00:00', 5, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 05:00:00', '2024-09-01', '05:00:00', 6, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 06:00:00', '2024-09-01', '06:00:00', 7, 0.45, 10, 10, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 07:00:00', '2024-09-01', '07:00:00', 8, 0.45, 17, 12, 5, 2.25);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 08:00:00', '2024-09-01', '08:00:00', 9, 0.45, 28, 15, 13, 5.85);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 09:00:00', '2024-09-01', '09:00:00', 10, 0.45, 40, 25, 25, 11.25);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 10:00:00', '2024-09-01', '10:00:00', 11, 0.45, 67, 30, 37, 16.65);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 11:00:00', '2024-09-01', '11:00:00', 12, 0.45, 88, 50, 38, 17.1);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 12:00:00', '2024-09-01', '12:00:00', 13, 0.45, 96, 72, 24, 10.8);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 13:00:00', '2024-09-01', '13:00:00', 14, 0.45, 112, 80, 32, 14.4);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 14:00:00', '2024-09-01', '14:00:00', 15, 0.45, 128, 97, 31, 13.95);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 15:00:00', '2024-09-01', '15:00:00', 16, 0.45, 108, 60, 48, 21.6);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 16:00:00', '2024-09-01', '16:00:00', 17, 0.45, 68, 38, 30, 13.5);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 17:00:00', '2024-09-01', '17:00:00', 18, 0.45, 37, 20, 17, 7.65);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 18:00:00', '2024-09-01', '18:00:00', 19, 0.45, 23, 10, 13, 5.85);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 19:00:00', '2024-09-01', '19:00:00', 20, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 20:00:00', '2024-09-01', '20:00:00', 21, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 21:00:00', '2024-09-01', '21:00:00', 22, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 22:00:00', '2024-09-01', '22:00:00', 23, 0.45, 0, 0, 0, 0);
+INSERT INTO `adm_ems_pv_supply_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `up_unit_price`, `gen_elec_quantity`, `use_elec_quantity`, `up_elec_quantity`, `up_elec_earn`) VALUES ('321283124S3002', 'E502', '2024-09-01 23:00:00', '2024-09-01', '23:00:00', 24, 0.45, 0, 0, 0, 0);
+
+-- 储能计量demo数据
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 00:00:00', '2024-09-01', '00:00:00', 1, 35, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 01:00:00', '2024-09-01', '01:00:00', 2, 43, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 02:00:00', '2024-09-01', '02:00:00', 3, 55, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 03:00:00', '2024-09-01', '03:00:00', 4, 51, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 04:00:00', '2024-09-01', '04:00:00', 5, 46, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 05:00:00', '2024-09-01', '05:00:00', 6, 49, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 06:00:00', '2024-09-01', '06:00:00', 7, 35, 5);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 07:00:00', '2024-09-01', '07:00:00', 8, 20, 10);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 08:00:00', '2024-09-01', '08:00:00', 9, 10, 5);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 09:00:00', '2024-09-01', '09:00:00', 10, 0, 30);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 10:00:00', '2024-09-01', '10:00:00', 11, 0, 35);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 11:00:00', '2024-09-01', '11:00:00', 12, 0, 40);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 12:00:00', '2024-09-01', '12:00:00', 13, 0, 45);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 13:00:00', '2024-09-01', '13:00:00', 14, 0, 48);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 14:00:00', '2024-09-01', '14:00:00', 15, 0, 57);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 15:00:00', '2024-09-01', '15:00:00', 16, 0, 49);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 16:00:00', '2024-09-01', '16:00:00', 17, 0, 37);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 17:00:00', '2024-09-01', '17:00:00', 18, 0, 20);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 18:00:00', '2024-09-01', '18:00:00', 19, 33, 10);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 19:00:00', '2024-09-01', '19:00:00', 20, 42, 15);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 20:00:00', '2024-09-01', '20:00:00', 21, 44, 18);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 21:00:00', '2024-09-01', '21:00:00', 22, 56, 13);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 22:00:00', '2024-09-01', '22:00:00', 23, 40, 10);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', '2024-09-01 23:00:00', '2024-09-01', '23:00:00', 24, 47, 5);
+
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 00:00:00', '2024-09-01', '00:00:00', 1, 53, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 01:00:00', '2024-09-01', '01:00:00', 2, 34, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 02:00:00', '2024-09-01', '02:00:00', 3, 55, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 03:00:00', '2024-09-01', '03:00:00', 4, 45, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 04:00:00', '2024-09-01', '04:00:00', 5, 64, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 05:00:00', '2024-09-01', '05:00:00', 6, 54, 0);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 06:00:00', '2024-09-01', '06:00:00', 7, 53, 8);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 07:00:00', '2024-09-01', '07:00:00', 8, 42, 12);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 08:00:00', '2024-09-01', '08:00:00', 9, 37, 11);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 09:00:00', '2024-09-01', '09:00:00', 10, 0, 22);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 10:00:00', '2024-09-01', '10:00:00', 11, 0, 45);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 11:00:00', '2024-09-01', '11:00:00', 12, 0, 46);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 12:00:00', '2024-09-01', '12:00:00', 13, 0, 51);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 13:00:00', '2024-09-01', '13:00:00', 14, 0, 39);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 14:00:00', '2024-09-01', '14:00:00', 15, 0, 60);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 15:00:00', '2024-09-01', '15:00:00', 16, 0, 39);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 16:00:00', '2024-09-01', '16:00:00', 17, 0, 46);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 17:00:00', '2024-09-01', '17:00:00', 18, 0, 18);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 18:00:00', '2024-09-01', '18:00:00', 19, 37, 15);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 19:00:00', '2024-09-01', '19:00:00', 20, 34, 19);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 20:00:00', '2024-09-01', '20:00:00', 21, 41, 13);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 21:00:00', '2024-09-01', '21:00:00', 22, 60, 17);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 22:00:00', '2024-09-01', '22:00:00', 23, 48, 15);
+INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', '2024-09-01 23:00:00', '2024-09-01', '23:00:00', 24, 43, 11);
 
 -- 设施用能计量demo数据
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '00:00:00', 1, 12);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '01:00:00', 2, 13);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '02:00:00', 3, 10);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '03:00:00', 4, 13);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '04:00:00', 5, 15);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '05:00:00', 6, 12);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '06:00:00', 7, 8);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '07:00:00', 8, 0);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '08:00:00', 9, 0);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '09:00:00', 10, 0);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '10:00:00', 11, 0);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '11:00:00', 12, 0);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '12:00:00', 13, 0);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '13:00:00', 14, 0);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '14:00:00', 15, 0);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '15:00:00', 16, 0);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '16:00:00', 17, 0);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '17:00:00', 18, 0);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '18:00:00', 19, 10);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '19:00:00', 20, 13);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '20:00:00', 21, 20);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '21:00:00', 22, 17);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '22:00:00', 23, 15);
-INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01', '23:00:00', 24, 13);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 00:00:00', '2024-09-01', '00:00:00', 1, 12);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 01:00:00', '2024-09-01', '01:00:00', 2, 13);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 02:00:00', '2024-09-01', '02:00:00', 3, 10);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 03:00:00', '2024-09-01', '03:00:00', 4, 13);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 04:00:00', '2024-09-01', '04:00:00', 5, 15);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 05:00:00', '2024-09-01', '05:00:00', 6, 12);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 06:00:00', '2024-09-01', '06:00:00', 7, 8);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 07:00:00', '2024-09-01', '07:00:00', 8, 0);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 08:00:00', '2024-09-01', '08:00:00', 9, 0);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 09:00:00', '2024-09-01', '09:00:00', 10, 0);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 10:00:00', '2024-09-01', '10:00:00', 11, 0);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 11:00:00', '2024-09-01', '11:00:00', 12, 0);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 12:00:00', '2024-09-01', '12:00:00', 13, 0);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 13:00:00', '2024-09-01', '13:00:00', 14, 0);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 14:00:00', '2024-09-01', '14:00:00', 15, 0);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 15:00:00', '2024-09-01', '15:00:00', 16, 0);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 16:00:00', '2024-09-01', '16:00:00', 17, 0);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 17:00:00', '2024-09-01', '17:00:00', 18, 0);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 18:00:00', '2024-09-01', '18:00:00', 19, 10);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 19:00:00', '2024-09-01', '19:00:00', 20, 13);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 20:00:00', '2024-09-01', '20:00:00', 21, 20);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 21:00:00', '2024-09-01', '21:00:00', 22, 17);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 22:00:00', '2024-09-01', '22:00:00', 23, 15);
+INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`) VALUES ('321283124S3001', 'Z101', NULL, '2024-09-01 23:00:00', '2024-09-01', '23:00:00', 24, 13);
+
+
+-- 台账数据
+INSERT INTO `adm_ems_device_rbook` (`record_code`, `obj_type`, `obj_code`, `obj_name`, `record_time`, `ins_location`, `maintain_title`, `maintain_content`, `maintain_person`) VALUES ('TZ-20240901001', 1, 'W201', '北区-电网', '2024-09-01 10:32:00', '北区-广场', '北区广场变压器维护', '执行例行维护', '李大航');
+INSERT INTO `adm_ems_device_rbook` (`record_code`, `obj_type`, `obj_code`, `obj_name`, `record_time`, `ins_location`, `maintain_title`, `maintain_content`, `maintain_person`) VALUES ('TZ-20240901002', 2, 'Z010-R101-001', '北区-开水炉', '2024-09-10 17:34:56', '北区/综合楼/一楼开水间', '开水炉除垢', '执行开水炉除垢', '王凯');
+

+ 62 - 48
ems-cloud/sql/ems_server.sql

@@ -185,30 +185,30 @@ INSERT INTO `dim_gb_ems_cls` (`code`, `name`, `desc`, `level`, `parent_code`, `v
 -- ----------------------------
 -- 能源设施/系统分类
 -- ----------------------------
-drop table if exists dim_ems_facs_type;
-create table dim_ems_facs_type (
+drop table if exists dim_ems_facs_category;
+create table dim_ems_facs_category (
   `id`        bigint(20)      not null auto_increment    comment '序号',
   `code`      varchar(8)      not null                   comment '设施系统代码',
   `name`      varchar(16)     not null                   comment '设施系统名称',
   `desc`      varchar(64)     default null               comment '说明',
   `version`   varchar(64)     default null               comment '数据版本',
   primary key (`id`),
-  unique key ux_ems_facs_type_code(`code`)
+  unique key ux_ems_facs_category_code(`code`)
 ) engine=innodb auto_increment=1 comment = '能源设施/系统分类';
 
 -- 能源设施/系统初始数据
-INSERT INTO `dim_ems_facs_type` (`code`, `name`, `desc`, `version`) VALUES ('E', '能源生产系统', '全站码', 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_type` (`code`, `name`, `desc`, `version`) VALUES ('T', '中转系统', '全站码', 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_type` (`code`, `name`, `desc`, `version`) VALUES ('W', '传输系统', '区位码', 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_type` (`code`, `name`, `desc`, `version`) VALUES ('C', '存储系统', '全站码', 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_type` (`code`, `name`, `desc`, `version`) VALUES ('Z', '用能系统', '区位码', 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_category` (`code`, `name`, `desc`, `version`) VALUES ('E', '能源生产系统', '全站码', 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_category` (`code`, `name`, `desc`, `version`) VALUES ('T', '中转系统', '全站码', 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_category` (`code`, `name`, `desc`, `version`) VALUES ('W', '传输系统', '区位码', 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_category` (`code`, `name`, `desc`, `version`) VALUES ('C', '存储系统', '全站码', 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_category` (`code`, `name`, `desc`, `version`) VALUES ('Z', '用能系统', '区位码', 'GB/T 43033-2013');
 
 
 -- ----------------------------
 -- 能源设施/系统子类
 -- ----------------------------
-drop table if exists dim_ems_facs_subtype;
-create table dim_ems_facs_subtype (
+drop table if exists dim_ems_facs_subcategory;
+create table dim_ems_facs_subcategory (
   `id`            bigint(20)      not null auto_increment    comment '序号',
   `code`          varchar(8)      not null                   comment '设施子类代码',
   `name`          varchar(16)     not null                   comment '设施子类名称',
@@ -216,32 +216,33 @@ create table dim_ems_facs_subtype (
   `desc`          varchar(64)     default null               comment '说明',
   `version`       varchar(64)     default null               comment '数据版本',
   primary key (`id`),
-  unique key ux_ems_facs_sub_code(`code`)
+  unique key ux_ems_facs_subcategory_code(`code`)
 ) engine=innodb auto_increment=1 comment = '能源设施/系统子类';
 
 -- 能源设施/系统初始数据
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E1', '天然气分布式供能站', 'E', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E2', '生物质发电站', 'E', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E3', '分布式风力发电场', 'E', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E4', '小型水力发电站', 'E', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E5', '分布式光伏发电系统', 'E', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E6', '太阳能供热站', 'E', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E7', '锅炉供热站(电、燃气等型式)', 'E', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('T1', '换热站', 'T', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('T2', '制冷/热站', 'T', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('T3', '热泵站', 'T', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('T4', '供氢站', 'T', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('W1', '管网', 'W', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('W2', '配电网', 'W', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('W3', '中继泵站', 'W', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('C1', '电化学储能站', 'C', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('C2', '飞轮、压缩空气等机械储能站', 'C', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('C3', '蓄冷/热站', 'C', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('C4', '储氢站', 'C', null, 'GB/T 43033-2013');
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('Z001', '室内照明', 'Z', null, null);
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('Z002', '室外照明', 'Z', null, null);
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('Z010', '公共设施', 'Z', null, null);
-INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('Z020', '空调设施', 'Z', null, null);
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E1', '天然气分布式供能站', 'E', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E2', '生物质发电站', 'E', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E3', '分布式风力发电场', 'E', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E4', '小型水力发电站', 'E', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E5', '分布式光伏发电系统', 'E', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E6', '太阳能供热站', 'E', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('E7', '锅炉供热站(电、燃气等型式)', 'E', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('T1', '换热站', 'T', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('T2', '制冷/热站', 'T', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('T3', '热泵站', 'T', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('T4', '供氢站', 'T', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('W1', '管网', 'W', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('W2', '配电网', 'W', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('W3', '中继泵站', 'W', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('C1', '电化学储能站', 'C', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('C2', '飞轮、压缩空气等机械储能站', 'C', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('C3', '蓄冷/热站', 'C', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('C4', '储氢站', 'C', null, 'GB/T 43033-2013');
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('Z001', '室内照明', 'Z', null, null);
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('Z002', '室外照明', 'Z', null, null);
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('Z010', '公共设施', 'Z', null, null);
+INSERT INTO `dim_ems_facs_subcategory` (`code`, `name`, `parent_code`, `desc`, `version`) VALUES ('Z020', '空调设施', 'Z', null, null);
+
 
 -- ----------------------------
 -- 标签分类
@@ -441,15 +442,15 @@ create table adm_area_building_zoning (
 -- ----------------------------
 drop table if exists adm_ems_facs;
 create table adm_ems_facs  (
-  `id`              bigint(20)      not null auto_increment      comment '序号',
-  `facs_code`       varchar(16)     not null                     comment '设施代码',
-  `facs_name`       varchar(32)     not null                     comment '设施名称',
-  `facs_type`       varchar(32)     not null                     comment '设施分类',
-  `facs_subtype`    varchar(32)     not null                     comment '设施子类',
-  `enable`          int             default '0'                  comment '启用状态0-停用,1-启用',
-  `ref_area`        varchar(32)     not null                     comment '归属区域代码',
-  `create_time`     datetime        default CURRENT_TIMESTAMP    comment '创建时间',
-  `update_time`     datetime        default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment '更新时间',
+  `id`                bigint(20)      not null auto_increment      comment '序号',
+  `facs_code`         varchar(16)     not null                     comment '设施代码',
+  `facs_name`         varchar(32)     not null                     comment '设施名称',
+  `facs_category`     varchar(32)     not null                     comment '设施分类',
+  `facs_subcategory`  varchar(32)     not null                     comment '设施子类',
+  `enable`            int             default '0'                  comment '启用状态0-停用,1-启用',
+  `ref_area`          varchar(32)     not null                     comment '归属区域代码',
+  `create_time`       datetime        default CURRENT_TIMESTAMP    comment '创建时间',
+  `update_time`       datetime        default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment '更新时间',
   primary key (`id`),
   unique key ux_ems_facs_code(`facs_code`)
 ) engine=innodb auto_increment=1 comment = '能源设施表';
@@ -799,12 +800,13 @@ create table adm_ems_device_rbook (
   `obj_type`         int             not null                     comment '对象类型 1:设施 2:设备',
   `obj_code`         varchar(32)     not null                     comment '对象代码',
   `obj_name`         varchar(64)     default null                 comment '对象名称',
+  `record_time`      timestamp       not null                     comment '日期 yyyy-MM-dd HH:mm:ss',
   `ins_location`     varchar(128)    default null                 comment '安装位置',
   `maintain_title`   varchar(128)    not null                     comment '维护标题',
   `maintain_content` text            default null                 comment '维护内容',
   `maintain_person`  varchar(32)     default null                 comment '维护人',
-  `create_time`      datetime        default null                 comment '创建时间',
-  `update_time`      datetime        default null                 comment '更新时间',
+  `create_time`      datetime        default CURRENT_TIMESTAMP    comment '创建时间',
+  `update_time`      datetime        default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment '更新时间',
   primary key (`id`),
   key inx_ems_device_rbook(`record_code`)
 ) engine=innodb auto_increment=1 comment = '设备台账表';
@@ -982,6 +984,7 @@ create table adm_ems_pg_supply_h (
   `id`                 bigint(20)      not null auto_increment      comment '序号',
   `area_code`          varchar(16)     not null                     comment '园区代码',
   `facs_code`          varchar(16)     not null                     comment '设施代码',
+  `record_time`        timestamp       not null                     comment '记录时间',
   `date`               date            not null                     comment '日期 yyyy-MM-dd',
   `time`               time            not null                     comment '时间 HH:mm:ss',
   `time_index`         int             not null                     comment '时间序列',
@@ -989,8 +992,10 @@ create table adm_ems_pg_supply_h (
   `meter_unit_price`   double          default null                 comment '单位电价(1度电)',
   `use_elec_quantity`  double          default null                 comment '用电量 单位:kW-h(千瓦时)',
   `use_elec_cost`      double          default null                 comment '用电电费 单位: ¥(元)',
+  `create_time`        datetime        default CURRENT_TIMESTAMP    comment '创建时间',
   primary key (`id`),
-  unique key ux_ems_pg_supply_h(`area_code`, `facs_code`, `date`, `time`)
+  unique key ux_ems_pg_supply_h(`area_code`, `facs_code`, `date`, `time`),
+  key ix_ems_pg_supply_h_rt(`area_code`, `record_time`)
 ) engine=innodb auto_increment=1 comment = '电网供应计量表-小时';
 
 
@@ -1002,6 +1007,7 @@ create table adm_ems_pv_supply_h (
   `id`                 bigint(20)      not null auto_increment      comment '序号',
   `area_code`          varchar(16)     not null                     comment '园区代码',
   `facs_code`          varchar(16)     not null                     comment '设施代码',
+  `record_time`        timestamp       not null                     comment '记录时间',
   `date`               date            not null                     comment '日期 yyyy-MM-dd',
   `time`               time            not null                     comment '时间 HH:mm:ss',
   `time_index`         int             not null                     comment '时间序列',
@@ -1010,8 +1016,10 @@ create table adm_ems_pv_supply_h (
   `use_elec_quantity`  double          default null                 comment '自用电量 单位:kW-h(千瓦时)',
   `up_elec_quantity`   double          default null                 comment '上网电量 单位:kW-h(千瓦时)',
   `up_elec_earn`       double          default null                 comment '上网收益 单位: ¥(元)',
+  `create_time`        datetime        default CURRENT_TIMESTAMP    comment '创建时间',
   primary key (`id`),
-  unique key ux_ems_pg_supply_h(`area_code`, `facs_code`, `date`, `time`)
+  unique key ux_ems_pg_supply_h(`area_code`, `facs_code`, `date`, `time`),
+  key ix_ems_pv_supply_h_rt(`area_code`, `record_time`)
 ) engine=innodb auto_increment=1 comment = '光伏并网计量表光伏并网计量表-小时';
 
 
@@ -1024,12 +1032,15 @@ create table adm_ems_facs_use_h (
   `area_code`          varchar(16)     not null                     comment '园区代码',
   `facs_code`          varchar(16)     not null                     comment '设施代码',
   `device_code`        varchar(64)     default null                 comment '设备代码',
+  `record_time`        timestamp       not null                     comment '记录时间',
   `date`               date            not null                     comment '日期 yyyy-MM-dd',
   `time`               time            not null                     comment '时间 HH:mm:ss',
   `time_index`         int             not null                     comment '时间序列',
   `elec_quantity`      double          default null                 comment '用电量 单位:kW-h(千瓦时)',
+  `create_time`        datetime        default CURRENT_TIMESTAMP    comment '创建时间',
   primary key (`id`),
-  unique key ux_ems_facs_use_h(`area_code`, `facs_code`, `date`, `time_index`)
+  unique key ux_ems_facs_use_h(`area_code`, `facs_code`, `date`, `time_index`),
+  key ix_ems_facs_use_h_rt(`area_code`, `record_time`)
 ) engine=innodb auto_increment=1 comment = '用能计量表-小时';
 
 
@@ -1041,13 +1052,16 @@ create table adm_ems_elec_store_h (
   `id`                        bigint(20)      not null auto_increment      comment '序号',
   `area_code`                 varchar(16)     not null                     comment '园区代码',
   `facs_code`                 varchar(16)     not null                     comment '设施代码',
+  `record_time`               timestamp       not null                     comment '记录时间',
   `date`                      date            not null                     comment '日期 yyyy-MM-dd',
   `time`                      time            not null                     comment '时间 HH:mm:ss',
   `time_index`                int             not null                     comment '时间序列',
   `charge_elec_quantity`      double          default null                 comment '充电电量 单位:kW-h(千瓦时)',
   `discharge_elec_quantity`   double          default null                 comment '放电电量 单位:kW-h(千瓦时)',
+  `create_time`               datetime        default CURRENT_TIMESTAMP    comment '创建时间',
   primary key (`id`),
-  unique key ux_ems_elec_store_h(`area_code`, `facs_code`, `date`, `time`)
+  unique key ux_ems_elec_store_h(`area_code`, `facs_code`, `date`, `time`),
+  key ix_ems_elec_store_h_rt(`area_code`, `record_time`)
 ) engine=innodb auto_increment=1 comment = '储能计量表-小时';
 
 

+ 4 - 4
ems-cloud/sql/ems_sys.sql

@@ -246,7 +246,7 @@ insert into sys_menu values ('1213',  '自定义',     '121', '4',  'statement-w
 insert into sys_menu values ('1610',  '地块划分',   '161', '1',  'basecfg-servicearea',    'basecfg/area/index',         '', 1, 0, 'C', '0', '0',   'basecfg:area:list',           'cfgwrite',   'admin', sysdate(), '', null, '服务区配置');
 insert into sys_menu values ('1611',  '建筑配置',   '161', '2',  'basecfg-building',       'basecfg/building/index',     '', 1, 0, 'C', '0', '0',   'basecfg:building:list',        'cfgwrite',   'admin', sysdate(), '', null, '楼宇建筑配置');
 insert into sys_menu values ('1612',  '功能分区',   '161', '3',  'basecfg-zoning',         'basecfg/zoning/index',       '', 1, 0, 'C', '0', '0',   'basecfg:zoning:list',          'cfgwrite',   'admin', sysdate(), '', null, '区块配置');
-insert into sys_menu values ('1620',  '设施类',   '162', '1',  'basecfg-facstype',       'basecfg/facstype/index',     '', 1, 0, 'C', '0', '0',   'basecfg:facstype:list',        'cfgwrite',   'admin', sysdate(), '', null, '设施配置');
+insert into sys_menu values ('1620',  '设施类',   '162', '1',  'basecfg-facscategory',   'basecfg/facscategory/index', '', 1, 0, 'C', '0', '0',   'basecfg:facscategory:list',    'cfgwrite',   'admin', sysdate(), '', null, '设施配置');
 insert into sys_menu values ('1621',  '能源设施',   '162', '2',  'basecfg-facscfg',        'basecfg/emsfacs/index',      '', 1, 0, 'C', '0', '0',   'basecfg:emsfacs:list',         'cfgwrite',   'admin', sysdate(), '', null, '设施配置');
 insert into sys_menu values ('1622',  '能流关系',   '162', '3',  'basecfg-flowrel',        'basecfg/flowrel/index',      '', 1, 0, 'C', '0', '0',   'basecfg:flowrel:list',         'cfgwrite',   'admin', sysdate(), '', null, '设备配置');
 insert into sys_menu values ('1623',  '能源设备',   '162', '4',  'basecfg-devccfg',        'basecfg/device/index',       '', 1, 0, 'C', '0', '0',   'basecfg:device:list',          'cfgwrite',   'admin', sysdate(), '', null, '设备配置');
@@ -334,9 +334,9 @@ insert into sys_menu values ('16121', '分区修改', '1612', '2', '#', '', '',
 insert into sys_menu values ('16122', '分区删除', '1612', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:remove','#', 'admin', sysdate(), '', null, '');
 insert into sys_menu values ('16123', '分区导出', '1612', '4', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:zoning:export','#', 'admin', sysdate(), '', null, '');
 -- 能源设施分类配置按钮
-insert into sys_menu values ('16200', '分类新增', '1620', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facstype:add',   '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('16201', '分类修改', '1620', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facstype:edit',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values ('16202', '分类删除', '1620', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facstype:remove','#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('16200', '分类新增', '1620', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facscategory:add',   '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('16201', '分类修改', '1620', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facscategory:edit',  '#', 'admin', sysdate(), '', null, '');
+insert into sys_menu values ('16202', '分类删除', '1620', '3', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:facscategory:remove','#', 'admin', sysdate(), '', null, '');
 -- 服务区能源设施配置按钮
 insert into sys_menu values ('16210', '设施新增', '1621', '1', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:emsfacs:add',   '#', 'admin', sysdate(), '', null, '');
 insert into sys_menu values ('16211', '设施修改', '1621', '2', '#', '', '', 1, 0, 'F', '0', '0', 'basecfg:emsfacs:edit',  '#', 'admin', sysdate(), '', null, '');