Răsfoiți Sursa

15分钟指标接口

lv.wenbin 9 luni în urmă
părinte
comite
c5ebc2a46e

+ 19 - 43
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/controller/ElecLoadIndexController.java

@@ -40,10 +40,23 @@ public class ElecLoadIndexController extends BaseController {
     /**
      * 查询电力负荷设施指标列表
      */
-    @GetMapping("/list")
-    public TableDataInfo list(ElecLoadIndex index) {
+    @GetMapping("/min/15/list")
+    public TableDataInfo min15List(QueryIndex index) {
         startPage();
-        List<ElecLoadIndex> list = indexService.selectIndexList(index);
+        List<ElecLoadIndex> list = indexService.selectMin15IndexList(index);
+        return getDataTable(list);
+    }
+
+    @GetMapping("/min/15/getMaxLoad")
+    public AjaxResult getMin15MaxLoad(QueryIndex index) {
+        Double maxLoad = indexService.selectMin15IndexMaxLoad(index);
+        return success(maxLoad);
+    }
+
+    @GetMapping("/day/getMaxLoad")
+    public TableDataInfo getMaxLoad(QueryIndex index) {
+        startPage();
+        List<ElecLoadIndex> list = indexService.selectDayIndexMaxLoad(index);
         return getDataTable(list);
     }
 
@@ -62,59 +75,22 @@ public class ElecLoadIndexController extends BaseController {
     }
 
     /**
-     * 根据时间查询电力负荷设施指标
-     *
-     * @param queryIndex 参数
-     * @return 电力负荷设施指标集合
-     */
-    @GetMapping("/getByTime")
-    public AjaxResult getByTime(QueryIndex queryIndex) {
-        return success(indexService.selectByTime(queryIndex));
-    }
-
-    /**
      * 导出电力负荷设施指标列表
      */
     @Log(title = "电力负荷设施指标", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, ElecLoadIndex index) {
-        List<ElecLoadIndex> list = indexService.selectIndexList(index);
+    public void export(HttpServletResponse response, QueryIndex index) {
+        List<ElecLoadIndex> list = indexService.selectMin15IndexList(index);
         ExcelUtil<ElecLoadIndex> util = new ExcelUtil<ElecLoadIndex>(ElecLoadIndex.class);
         util.exportExcel(response, list, "电力负荷设施指标数据");
     }
 
     /**
-     * 获取电力负荷设施指标详细信息
-     */
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
-        return success(indexService.selectIndexById(id));
-    }
-
-    /**
      * 新增电力负荷设施指标
      */
     @Log(title = "电力负荷设施指标", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody ElecLoadIndex index) {
-        return toAjax(indexService.insertIndex(index));
-    }
-
-    /**
-     * 修改电力负荷设施指标
-     */
-    @Log(title = "电力负荷设施指标", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody ElecLoadIndex index) {
-        return toAjax(indexService.updateIndex(index));
-    }
-
-    /**
-     * 删除电力负荷设施指标
-     */
-    @Log(title = "电力负荷设施指标", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(indexService.deleteIndexByIds(ids));
+        return toAjax(indexService.insertMin15Index(index));
     }
 }

+ 36 - 4
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/ElecLoadIndex.java

@@ -22,17 +22,25 @@ public class ElecLoadIndex extends BaseEntity
     private Long id;
 
     /** 园区代码 */
-    @Excel(name = "园区代码")
     private String areaCode;
 
+    /** 园区名称 */
+    @Excel(name = "园区名称")
+    private String areaName;
+
+    /** 园区简称 */
+    private String areaShortName;
+
     /** 对象类型 */
     @Excel(name = "对象类型")
     private Long objType;
 
     /** 对象编码 */
-    @Excel(name = "对象编码")
     private String objCode;
 
+    @Excel(name = "对象名称")
+    private String objName;
+
     /** 记录时间 */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd")
@@ -40,12 +48,12 @@ public class ElecLoadIndex extends BaseEntity
 
     /** 日期 yyyy-MM-dd */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "日期 yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
+    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date date;
 
     /** 时间 HH:mm:ss */
     @JsonFormat(pattern = "HH:mm:ss")
-    @Excel(name = "时间 HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
+    @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Time time;
 
     /** 事件序列 */
@@ -296,6 +304,30 @@ public class ElecLoadIndex extends BaseEntity
         this.pf = pf;
     }
 
+    public String getAreaName() {
+        return areaName;
+    }
+
+    public void setAreaName(String areaName) {
+        this.areaName = areaName;
+    }
+
+    public String getAreaShortName() {
+        return areaShortName;
+    }
+
+    public void setAreaShortName(String areaShortName) {
+        this.areaShortName = areaShortName;
+    }
+
+    public String getObjName() {
+        return objName;
+    }
+
+    public void setObjName(String objName) {
+        this.objName = objName;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

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

@@ -10,6 +10,8 @@
  */
 package com.ruoyi.ems.domain.vo;
 
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
 /**
  * 查询指标
  * <功能详细描述>
@@ -19,7 +21,7 @@ package com.ruoyi.ems.domain.vo;
  * @see [相关类/方法]
  * @since [产品/模块版本]
  */
-public class QueryIndex {
+public class QueryIndex extends BaseEntity {
     /**
      * 区域编码
      */

+ 18 - 9
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/ElecLoadIndexMapper.java → ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/mapper/ElecLoadIndex15minMapper.java

@@ -12,7 +12,7 @@ import org.apache.ibatis.annotations.Param;
  * @author ruoyi
  * @date 2024-09-27
  */
-public interface ElecLoadIndexMapper {
+public interface ElecLoadIndex15minMapper {
     /**
      * 查询电力负荷设施指标
      *
@@ -23,29 +23,38 @@ public interface ElecLoadIndexMapper {
 
     /**
      * 查询最新电力负荷设施指标
+     *
      * @param areaCode 区域代码
-     * @param objType 对象类型
-     * @param objCode 对象代码
+     * @param objType  对象类型
+     * @param objCode  对象代码
      * @return 电力负荷设施指标
      */
     ElecLoadIndex selectNewIndex(@Param("areaCode") String areaCode, @Param("objType") String objType,
         @Param("objCode") String objCode);
 
     /**
-     * 根据时间查询电力负荷设施指标
+     * 查询电力负荷设施指标列表
      *
-     * @param queryIndex 参数
+     * @param queryIndex 查询条件
      * @return 电力负荷设施指标集合
      */
-    List<ElecLoadIndex> selectByTime(QueryIndex queryIndex);
+    List<ElecLoadIndex> selectIndexList(QueryIndex queryIndex);
 
     /**
-     * 查询电力负荷设施指标列表
+     * 查询电力负荷设施指标(最大负荷)
      *
-     * @param loadIndex 电力负荷设施指标
+     * @param queryIndex 查询条件
+     * @return 电力负荷设施指标集合
+     */
+    Double selectIndexMaxLoad(QueryIndex queryIndex);
+
+    /**
+     * 查询每日电力负荷设施指标(最大负荷)
+     *
+     * @param queryIndex 查询条件
      * @return 电力负荷设施指标集合
      */
-    List<ElecLoadIndex> selectIndexList(ElecLoadIndex loadIndex);
+    List<ElecLoadIndex> selectDayIndexMaxLoad(QueryIndex queryIndex);
 
     /**
      * 新增电力负荷设施指标

+ 11 - 37
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IElecLoadIndexService.java

@@ -14,14 +14,6 @@ import org.apache.ibatis.annotations.Param;
  */
 public interface IElecLoadIndexService {
     /**
-     * 查询电力负荷设施指标
-     *
-     * @param id 电力负荷设施指标主键
-     * @return 电力负荷设施指标
-     */
-    ElecLoadIndex selectIndexById(Long id);
-
-    /**
      * 查询最新电力负荷设施指标
      * @param areaCode 区域代码
      * @param objType 对象类型
@@ -31,50 +23,32 @@ public interface IElecLoadIndexService {
     ElecLoadIndex selectNewIndex(String areaCode, String objType, String objCode);
 
     /**
-     * 根据时间查询电力负荷设施指标
-     *
-     * @param queryIndex 参数
-     * @return 电力负荷设施指标集合
-     */
-    List<ElecLoadIndex> selectByTime(QueryIndex queryIndex);
-
-    /**
      * 查询电力负荷设施指标列表
      *
-     * @param index 电力负荷设施指标
+     * @param queryIndex 电力负荷设施指标
      * @return 电力负荷设施指标集合
      */
-    List<ElecLoadIndex> selectIndexList(ElecLoadIndex index);
+    List<ElecLoadIndex> selectMin15IndexList(QueryIndex queryIndex);
 
     /**
-     * 新增电力负荷设施指标
-     *
-     * @param index 电力负荷设施指标
+     * 查询最大功率负荷
+     * @param queryIndex 条件
      * @return 结果
      */
-    int insertIndex(ElecLoadIndex index);
+    Double selectMin15IndexMaxLoad(QueryIndex queryIndex);
 
     /**
-     * 修改电力负荷设施指标
-     *
-     * @param index 电力负荷设施指标
+     * 查询日最大功率负荷
+     * @param queryIndex 条件
      * @return 结果
      */
-    int updateIndex(ElecLoadIndex index);
+    List<ElecLoadIndex> selectDayIndexMaxLoad(QueryIndex queryIndex);
 
     /**
-     * 批量删除电力负荷设施指标
-     *
-     * @param ids 需要删除的电力负荷设施指标主键集合
-     * @return 结果
-     */
-    int deleteIndexByIds(Long[] ids);
-
-    /**
-     * 删除电力负荷设施指标信息
+     * 新增电力负荷设施指标
      *
-     * @param id 电力负荷设施指标主键
+     * @param index 电力负荷设施指标
      * @return 结果
      */
-    int deleteIndexById(Long id);
+    int insertMin15Index(ElecLoadIndex index);
 }

+ 14 - 52
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/ElecLoadIndexServiceImpl.java

@@ -5,7 +5,7 @@ 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.ElecLoadIndexMapper;
+import com.ruoyi.ems.mapper.ElecLoadIndex15minMapper;
 import com.ruoyi.ems.domain.ElecLoadIndex;
 import com.ruoyi.ems.service.IElecLoadIndexService;
 
@@ -18,81 +18,43 @@ import com.ruoyi.ems.service.IElecLoadIndexService;
 @Service
 public class ElecLoadIndexServiceImpl implements IElecLoadIndexService {
     @Autowired
-    private ElecLoadIndexMapper indexMapper;
+    private ElecLoadIndex15minMapper index15minMapper;
 
-    /**
-     * 查询电力负荷设施指标
-     *
-     * @param id 电力负荷设施指标主键
-     * @return 电力负荷设施指标
-     */
-    @Override
-    public ElecLoadIndex selectIndexById(Long id) {
-        return indexMapper.selectIndexById(id);
-    }
 
     @Override
     public ElecLoadIndex selectNewIndex(String areaCode, String objType, String objCode) {
-        return indexMapper.selectNewIndex(areaCode, objType, objCode);
-    }
-
-    @Override
-    public List<ElecLoadIndex> selectByTime(QueryIndex queryIndex) {
-        return indexMapper.selectByTime(queryIndex);
+        return index15minMapper.selectNewIndex(areaCode, objType, objCode);
     }
 
     /**
      * 查询电力负荷设施指标列表
      *
-     * @param admEmsElecLoadIndex 电力负荷设施指标
+     * @param queryIndex 查询参数
      * @return 电力负荷设施指标
      */
     @Override
-    public List<ElecLoadIndex> selectIndexList(ElecLoadIndex admEmsElecLoadIndex) {
-        return indexMapper.selectIndexList(admEmsElecLoadIndex);
-    }
-
-    /**
-     * 新增电力负荷设施指标
-     *
-     * @param admEmsElecLoadIndex 电力负荷设施指标
-     * @return 结果
-     */
-    @Override
-    public int insertIndex(ElecLoadIndex admEmsElecLoadIndex) {
-        return indexMapper.insertIndex(admEmsElecLoadIndex);
+    public List<ElecLoadIndex> selectMin15IndexList(QueryIndex queryIndex) {
+        return index15minMapper.selectIndexList(queryIndex);
     }
 
-    /**
-     * 修改电力负荷设施指标
-     *
-     * @param admEmsElecLoadIndex 电力负荷设施指标
-     * @return 结果
-     */
     @Override
-    public int updateIndex(ElecLoadIndex admEmsElecLoadIndex) {
-        return indexMapper.updateIndex(admEmsElecLoadIndex);
+    public Double selectMin15IndexMaxLoad(QueryIndex queryIndex) {
+        return index15minMapper.selectIndexMaxLoad(queryIndex);
     }
 
-    /**
-     * 批量删除电力负荷设施指标
-     *
-     * @param ids 需要删除的电力负荷设施指标主键
-     * @return 结果
-     */
     @Override
-    public int deleteIndexByIds(Long[] ids) {
-        return indexMapper.deleteIndexByIds(ids);
+    public List<ElecLoadIndex> selectDayIndexMaxLoad(QueryIndex queryIndex) {
+        return index15minMapper.selectDayIndexMaxLoad(queryIndex);
     }
 
     /**
-     * 删除电力负荷设施指标信息
+     * 新增电力负荷设施指标
      *
-     * @param id 电力负荷设施指标主键
+     * @param loadIndex 电力负荷设施指标
      * @return 结果
      */
     @Override
-    public int deleteIndexById(Long id) {
-        return indexMapper.deleteIndexById(id);
+    public int insertMin15Index(ElecLoadIndex loadIndex) {
+        return index15minMapper.insertIndex(loadIndex);
     }
 }

+ 278 - 0
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/ElecLoadIndex15minMapper.xml

@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.ems.mapper.ElecLoadIndex15minMapper">
+    
+    <resultMap type="com.ruoyi.ems.domain.ElecLoadIndex" id="indexResult">
+        <result property="id"    column="id"    />
+        <result property="areaCode"    column="area_code"    />
+        <result property="areaName"    column="area_name"    />
+        <result property="areaShortName"    column="area_short_name"    />
+        <result property="objType"    column="obj_type"    />
+        <result property="objCode"    column="obj_code"    />
+        <result property="objName"    column="obj_name"    />
+        <result property="recordTime"    column="record_time"    />
+        <result property="date"    column="date"    />
+        <result property="time"    column="time"    />
+        <result property="timeIndex"    column="time_index"    />
+        <result property="ua"    column="ua"    />
+        <result property="ub"    column="ub"    />
+        <result property="uc"    column="uc"    />
+        <result property="la"    column="la"    />
+        <result property="lb"    column="lb"    />
+        <result property="lc"    column="lc"    />
+        <result property="p"    column="p"    />
+        <result property="pa"    column="pa"    />
+        <result property="pb"    column="pb"    />
+        <result property="pc"    column="pc"    />
+        <result property="q"    column="q"    />
+        <result property="qa"    column="qa"    />
+        <result property="qb"    column="qb"    />
+        <result property="qc"    column="qc"    />
+        <result property="pf"    column="pf"    />
+    </resultMap>
+
+    <sql id="selectIndexVo">
+        select id, area_code, obj_type, obj_code, record_time, `date`, `time`, time_index, ua, ub, uc, la, lb, lc, p, pa, pb, pc, q, qa, qb, qc, pf from adm_ems_elec_load_index_15min
+    </sql>
+
+    <select id="selectIndexList" parameterType="com.ruoyi.ems.domain.ElecLoadIndex" resultMap="indexResult">
+        select
+        <if test="areaCode != null and areaCode != '' and areaCode != '-1'">
+          i.area_code,
+          a.area_name,
+          a.short_name as area_short_name,
+        </if>
+        <if test="objCode != null and objCode != ''">
+          i.obj_code,
+          CASE
+            WHEN i.obj_type = 1 THEN f.facs_name
+            WHEN i.obj_type = 2 THEN d.device_name
+          END as obj_name,
+        </if>
+        <if test="(facsCategory != null and facsCategory != '') or (facsSubCategory != null and facsSubCategory != '')">
+          fa.facs_category,
+          fa.facs_subcategory,
+          <if test="objCode == null or objCode == ''">
+            fs.name as obj_name,
+          </if>
+        </if>
+          i.record_time,
+          i.`date`,
+          i.`time`,
+          i.`time_index`,
+          sum(i.ua) as ua,
+          sum(i.ub) as ub,
+          sum(i.uc) as uc,
+          sum(i.la) as la,
+          sum(i.lb) as lb,
+          sum(i.lc) as lc,
+          sum(i.p) as p,
+          sum(i.pa) as pa,
+          sum(i.pb) as pb,
+          sum(i.pc) as pc,
+          sum(i.q) as q,
+          sum(i.qa) as qa,
+          sum(i.qb) as qb,
+          sum(i.qc) as qc,
+          sum(i.pf) as pf
+        from adm_ems_elec_load_index_15min i
+        <if test="areaCode != null and areaCode != '' and areaCode != '-1'">
+            LEFT JOIN adm_service_area a ON i.`area_code` = a.`area_code`
+        </if>
+        <if test="objCode != null and objCode != ''">
+            LEFT JOIN adm_ems_facs f ON i.`obj_code` = f.`facs_code`
+            LEFT JOIN adm_ems_device d ON i.`obj_code` = d.`device_code`
+        </if>
+        <if test="(facsCategory != null  and facsCategory != '') or (facsSubCategory != null  and facsSubCategory != '')">
+            LEFT JOIN adm_ems_facs fa ON i.`obj_code` = fa.`facs_code`
+            <if test="objCode == null or objCode == ''">
+                LEFT JOIN dim_ems_facs_subcategory fs ON fa.`facs_subcategory` = fs.`code`
+            </if>
+        </if>
+        <where>
+            <if test="areaCode != null and areaCode != '' and areaCode != '-1'">and i.area_code = #{areaCode}</if>
+            <if test="objType != null">and i.obj_type = #{objType}</if>
+            <if test="objCode != null  and objCode != ''">and i.obj_code = #{objCode}</if>
+            <if test="facsCategory != null and facsCategory != ''">and fa.facs_category = #{facsCategory}</if>
+            <if test="facsSubCategory != null and facsSubCategory != ''">and fa.facs_subcategory = #{facsSubCategory}</if>
+            <if test="startTime != null and startTime != '' and endTime != null and endTime !=''">
+                and i.`record_time` &gt;= #{startTime} and i.`record_time` &lt;= #{endTime}
+            </if>
+        </where>
+        GROUP BY i.`record_time`
+        ORDER BY i.`record_time`
+    </select>
+
+    <select id="selectIndexMaxLoad" parameterType="com.ruoyi.ems.domain.ElecLoadIndex" resultType="java.lang.Double">
+        SELECT
+            MAX(t.total_p) AS p
+        FROM (
+            SELECT
+             i.`date` as date_part,
+             i.`time` as time_part,
+             SUM(p) AS total_p
+            FROM
+        adm_ems_elec_load_index_15min i
+        <if test="(facsCategory != null  and facsCategory != '') or (facsSubCategory != null  and facsSubCategory != '')">
+            LEFT JOIN adm_ems_facs fa ON i.`obj_code` = fa.`facs_code`
+            <if test="objCode == null or objCode == ''">
+                LEFT JOIN dim_ems_facs_subcategory fs ON fa.`facs_subcategory` = fs.`code`
+            </if>
+        </if>
+        <where>
+            <if test="areaCode != null  and areaCode != '' and areaCode != '-1'">and i.area_code = #{areaCode}</if>
+            <if test="objType != null">and i.obj_type = #{objType}</if>
+            <if test="objCode != null  and objCode != ''">and i.obj_code = #{objCode}</if>
+            <if test="facsCategory != null and facsCategory != ''">and fa.facs_category = #{facsCategory}</if>
+            <if test="facsSubCategory != null and facsSubCategory != ''">and fa.facs_subcategory = #{facsSubCategory}</if>
+            <if test="startTime != null and startTime != '' and endTime != null and endTime !=''">
+                and i.`record_time` BETWEEN  #{startTime} and #{endTime}
+            </if>
+        </where>
+        GROUP BY
+            i.`date`,
+            i.`time`) t
+    </select>
+
+    <select id="selectDayIndexMaxLoad" parameterType="com.ruoyi.ems.domain.ElecLoadIndex" resultMap="indexResult">
+        SELECT
+            date_part as `date`,
+            MAX(total_p) AS p
+        FROM (
+             SELECT
+               DATE(record_time) AS date_part,
+               SUM(p) AS total_p
+            FROM
+        adm_ems_elec_load_index_15min i
+        <if test="(facsCategory != null  and facsCategory != '') or (facsSubCategory != null  and facsSubCategory != '')">
+            LEFT JOIN adm_ems_facs fa ON i.`obj_code` = fa.`facs_code`
+            <if test="objCode == null or objCode == ''">
+                LEFT JOIN dim_ems_facs_subcategory fs ON fa.`facs_subcategory` = fs.`code`
+            </if>
+        </if>
+        <where>
+            <if test="areaCode != null  and areaCode != '' and areaCode != '-1'">and i.area_code = #{areaCode}</if>
+            <if test="objType != null">and i.obj_type = #{objType}</if>
+            <if test="objCode != null  and objCode != ''">and i.obj_code = #{objCode}</if>
+            <if test="facsCategory != null and facsCategory != ''">and fa.facs_category = #{facsCategory}</if>
+            <if test="facsSubCategory != null and facsSubCategory != ''">and fa.facs_subcategory = #{facsSubCategory}</if>
+            <if test="startTime != null and startTime != '' and endTime != null and endTime !=''">
+                and i.`date` between #{startTime} and #{endTime}
+            </if>
+        </where>
+        GROUP BY
+            i.`date`,
+            i.`time`
+            ) AS power_sums
+        GROUP BY
+            date_part
+        ORDER BY
+            date_part
+    </select>
+
+    <select id="selectIndexById" parameterType="Long" resultMap="indexResult">
+        <include refid="selectIndexVo"/>
+        where id = #{id}
+    </select>
+
+    <select id="selectNewIndex" resultMap="indexResult">
+        <include refid="selectIndexVo"/>
+        where area_code = #{areaCode} and obj_type = #{objType} and obj_code = #{objCode}
+        order by record_time
+        desc limit 1
+    </select>
+        
+    <insert id="insertIndex" parameterType="com.ruoyi.ems.domain.ElecLoadIndex" useGeneratedKeys="true" keyProperty="id">
+        insert into adm_ems_elec_load_index_15min
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="areaCode != null and areaCode != ''">area_code,</if>
+            <if test="objType != null">obj_type,</if>
+            <if test="objCode != null and objCode != ''">obj_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>
+            <if test="ua != null">ua,</if>
+            <if test="ub != null">ub,</if>
+            <if test="uc != null">uc,</if>
+            <if test="la != null">la,</if>
+            <if test="lb != null">lb,</if>
+            <if test="lc != null">lc,</if>
+            <if test="p != null">p,</if>
+            <if test="pa != null">pa,</if>
+            <if test="pb != null">pb,</if>
+            <if test="pc != null">pc,</if>
+            <if test="q != null">q,</if>
+            <if test="qa != null">qa,</if>
+            <if test="qb != null">qb,</if>
+            <if test="qc != null">qc,</if>
+            <if test="pf != null">pf,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="areaCode != null and areaCode != ''">#{areaCode},</if>
+            <if test="objType != null">#{objType},</if>
+            <if test="objCode != null and objCode != ''">#{objCode},</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>
+            <if test="ua != null">#{ua},</if>
+            <if test="ub != null">#{ub},</if>
+            <if test="uc != null">#{uc},</if>
+            <if test="la != null">#{la},</if>
+            <if test="lb != null">#{lb},</if>
+            <if test="lc != null">#{lc},</if>
+            <if test="p != null">#{p},</if>
+            <if test="pa != null">#{pa},</if>
+            <if test="pb != null">#{pb},</if>
+            <if test="pc != null">#{pc},</if>
+            <if test="q != null">#{q},</if>
+            <if test="qa != null">#{qa},</if>
+            <if test="qb != null">#{qb},</if>
+            <if test="qc != null">#{qc},</if>
+            <if test="pf != null">#{pf},</if>
+         </trim>
+    </insert>
+
+    <update id="updateIndex" parameterType="com.ruoyi.ems.domain.ElecLoadIndex">
+        update adm_ems_elec_load_index_15min
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="areaCode != null and areaCode != ''">area_code = #{areaCode},</if>
+            <if test="objType != null">obj_type = #{objType},</if>
+            <if test="objCode != null and objCode != ''">obj_code = #{objCode},</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="ua != null">ua = #{ua},</if>
+            <if test="ub != null">ub = #{ub},</if>
+            <if test="uc != null">uc = #{uc},</if>
+            <if test="la != null">la = #{la},</if>
+            <if test="lb != null">lb = #{lb},</if>
+            <if test="lc != null">lc = #{lc},</if>
+            <if test="p != null">p = #{p},</if>
+            <if test="pa != null">pa = #{pa},</if>
+            <if test="pb != null">pb = #{pb},</if>
+            <if test="pc != null">pc = #{pc},</if>
+            <if test="q != null">q = #{q},</if>
+            <if test="qa != null">qa = #{qa},</if>
+            <if test="qb != null">qb = #{qb},</if>
+            <if test="qc != null">qc = #{qc},</if>
+            <if test="pf != null">pf = #{pf},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteIndexById" parameterType="Long">
+        delete from adm_ems_elec_load_index_15min where id = #{id}
+    </delete>
+
+    <delete id="deleteIndexByIds" parameterType="String">
+        delete from adm_ems_elec_load_index_15min where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 0 - 164
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/ElecLoadIndexMapper.xml

@@ -1,164 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.ems.mapper.ElecLoadIndexMapper">
-    
-    <resultMap type="com.ruoyi.ems.domain.ElecLoadIndex" id="indexResult">
-        <result property="id"    column="id"    />
-        <result property="areaCode"    column="area_code"    />
-        <result property="objType"    column="obj_type"    />
-        <result property="objCode"    column="obj_code"    />
-        <result property="recordTime"    column="record_time"    />
-        <result property="date"    column="date"    />
-        <result property="time"    column="time"    />
-        <result property="timeIndex"    column="time_index"    />
-        <result property="ua"    column="ua"    />
-        <result property="ub"    column="ub"    />
-        <result property="uc"    column="uc"    />
-        <result property="la"    column="la"    />
-        <result property="lb"    column="lb"    />
-        <result property="lc"    column="lc"    />
-        <result property="p"    column="p"    />
-        <result property="pa"    column="pa"    />
-        <result property="pb"    column="pb"    />
-        <result property="pc"    column="pc"    />
-        <result property="q"    column="q"    />
-        <result property="qa"    column="qa"    />
-        <result property="qb"    column="qb"    />
-        <result property="qc"    column="qc"    />
-        <result property="pf"    column="pf"    />
-    </resultMap>
-
-    <sql id="selectIndexVo">
-        select id, area_code, obj_type, obj_code, record_time, `date`, `time`, time_index, ua, ub, uc, la, lb, lc, p, pa, pb, pc, q, qa, qb, qc, pf from adm_ems_elec_load_index
-    </sql>
-
-    <select id="selectIndexList" parameterType="com.ruoyi.ems.domain.ElecLoadIndex" resultMap="indexResult">
-        <include refid="selectIndexVo"/>
-        <where>  
-            <if test="areaCode != null  and areaCode != ''"> and area_code = #{areaCode}</if>
-            <if test="objType != null "> and obj_type = #{objType}</if>
-            <if test="objCode != null  and objCode != ''"> and obj_code = #{objCode}</if>
-            <if test="recordTime != null "> and record_time = #{recordTime}</if>
-            <if test="date != null "> and `date` = #{date}</if>
-            <if test="time != null "> and `time` = #{time}</if>
-            <if test="timeIndex != null "> and time_index = #{timeIndex}</if>
-        </where>
-    </select>
-
-    <select id="selectByTime" parameterType="com.ruoyi.ems.domain.vo.QueryIndex" resultMap="indexResult">
-        <include refid="selectIndexVo"/>
-        <where>
-            <if test="areaCode != null  and areaCode != ''"> and area_code = #{areaCode}</if>
-            <if test="objType != null "> and obj_type = #{objType}</if>
-            <if test="objCode != null  and objCode != ''"> and obj_code = #{objCode}</if>
-            <if test="startTime != null  and startTime != ''"> and record_time >= #{startTime}</if>
-            <if test="endTime != null  and endTime != ''"> and record_time = #{endTime}</if>
-        </where>
-    </select>
-    
-    <select id="selectIndexById" parameterType="Long" resultMap="indexResult">
-        <include refid="selectIndexVo"/>
-        where id = #{id}
-    </select>
-
-    <select id="selectNewIndex" resultMap="indexResult">
-        <include refid="selectIndexVo"/>
-        where area_code = #{areaCode} and obj_type = #{objType} and obj_code = #{objCode}
-        order by record_time
-        desc limit 1
-    </select>
-        
-    <insert id="insertIndex" parameterType="com.ruoyi.ems.domain.ElecLoadIndex" useGeneratedKeys="true" keyProperty="id">
-        insert into adm_ems_elec_load_index
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="areaCode != null and areaCode != ''">area_code,</if>
-            <if test="objType != null">obj_type,</if>
-            <if test="objCode != null and objCode != ''">obj_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>
-            <if test="ua != null">ua,</if>
-            <if test="ub != null">ub,</if>
-            <if test="uc != null">uc,</if>
-            <if test="la != null">la,</if>
-            <if test="lb != null">lb,</if>
-            <if test="lc != null">lc,</if>
-            <if test="p != null">p,</if>
-            <if test="pa != null">pa,</if>
-            <if test="pb != null">pb,</if>
-            <if test="pc != null">pc,</if>
-            <if test="q != null">q,</if>
-            <if test="qa != null">qa,</if>
-            <if test="qb != null">qb,</if>
-            <if test="qc != null">qc,</if>
-            <if test="pf != null">pf,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="areaCode != null and areaCode != ''">#{areaCode},</if>
-            <if test="objType != null">#{objType},</if>
-            <if test="objCode != null and objCode != ''">#{objCode},</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>
-            <if test="ua != null">#{ua},</if>
-            <if test="ub != null">#{ub},</if>
-            <if test="uc != null">#{uc},</if>
-            <if test="la != null">#{la},</if>
-            <if test="lb != null">#{lb},</if>
-            <if test="lc != null">#{lc},</if>
-            <if test="p != null">#{p},</if>
-            <if test="pa != null">#{pa},</if>
-            <if test="pb != null">#{pb},</if>
-            <if test="pc != null">#{pc},</if>
-            <if test="q != null">#{q},</if>
-            <if test="qa != null">#{qa},</if>
-            <if test="qb != null">#{qb},</if>
-            <if test="qc != null">#{qc},</if>
-            <if test="pf != null">#{pf},</if>
-         </trim>
-    </insert>
-
-    <update id="updateIndex" parameterType="com.ruoyi.ems.domain.ElecLoadIndex">
-        update adm_ems_elec_load_index
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="areaCode != null and areaCode != ''">area_code = #{areaCode},</if>
-            <if test="objType != null">obj_type = #{objType},</if>
-            <if test="objCode != null and objCode != ''">obj_code = #{objCode},</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="ua != null">ua = #{ua},</if>
-            <if test="ub != null">ub = #{ub},</if>
-            <if test="uc != null">uc = #{uc},</if>
-            <if test="la != null">la = #{la},</if>
-            <if test="lb != null">lb = #{lb},</if>
-            <if test="lc != null">lc = #{lc},</if>
-            <if test="p != null">p = #{p},</if>
-            <if test="pa != null">pa = #{pa},</if>
-            <if test="pb != null">pb = #{pb},</if>
-            <if test="pc != null">pc = #{pc},</if>
-            <if test="q != null">q = #{q},</if>
-            <if test="qa != null">qa = #{qa},</if>
-            <if test="qb != null">qb = #{qb},</if>
-            <if test="qc != null">qc = #{qc},</if>
-            <if test="pf != null">pf = #{pf},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteIndexById" parameterType="Long">
-        delete from adm_ems_elec_load_index where id = #{id}
-    </delete>
-
-    <delete id="deleteIndexByIds" parameterType="String">
-        delete from adm_ems_elec_load_index where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-</mapper>

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

@@ -52,7 +52,7 @@
     <select id="selectElecUseHList" parameterType="com.ruoyi.ems.domain.ElecUseH" resultMap="elecUseHResult">
         <include refid="selectElecUseHVo"/>
         <where>
-            <if test="areaCode != null  and areaCode != ''">and u.area_code = #{areaCode}</if>
+            <if test="areaCode != null and areaCode != ''">and u.area_code = #{areaCode}</if>
             <if test="objType != null">and u.obj_type = #{objType}</if>
             <if test="objCode != null  and objCode != ''">and u.obj_code = #{objCode}</if>
             <if test="facsCategory != null  and facsCategory != ''">and f.facs_category = #{facsCategory}</if>

+ 12 - 3
ems-cloud/sql/ems_init_data.sql

@@ -442,7 +442,7 @@ 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-102', '321283124S3001', '2024', '202403', 238, '2024-02-29', 365, '2024-03-31', 127, NULL, NULL);
 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-102', '321283124S3001', '2024', '202404', 365, '2024-03-31', 537, '2024-04-30', 172, NULL, NULL);
 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-102', '321283124S3001', '2024', '202405', 537, '2024-04-30', 686, '2024-05-31', 149, NULL, NULL);
-INSERT INTO L (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-D-B-102', '321283124S3001', '2024', '202406', 686, '2024-05-31', 921, '2024-06-30', 235, NULL, NULL);
+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-102', '321283124S3001', '2024', '202406', 686, '2024-05-31', 921, '2024-06-30', 235, NULL, NULL);
 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-102', '321283124S3001', '2024', '202407', 921, '2024-06-30', 1189, '2024-07-31', 268, NULL, NULL);
 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-102', '321283124S3001', '2024', '202408', 1189, '2024-07-31', 1464, '2024-08-31', 275, NULL, NULL);
 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-102', '321283124S3001', '2024', '202409', 1464, '2024-08-31', 1797, '2024-09-30', 333, NULL, NULL);
@@ -606,8 +606,17 @@ INSERT INTO `adm_ems_facs_use_h` (`area_code`, `facs_code`, `device_code`, `reco
 
 
 -- 电力负荷数据
-INSERT INTO `adm_ems_elec_load_index` (`area_code`, `obj_type`, `obj_code`, `record_time`, `date`, `time`, `time_index`, `ua`, `ub`, `uc`, `la`, `lb`, `lc`, `p`, `pa`, `pb`, `pc`, `q`, `qa`, `qb`, `qc`, `pf`) VALUES ('321283124S3001', 2, 'D-B-1001', '2024-09-27 00:00:00', '2024-09-27', '00:00:00', 1, 380, 380, 380, 27, 2.1, 2.8, 5120, 2121, 2145, 2247, 321, 101, 121, 121, 7.5);
-INSERT INTO `adm_ems_elec_load_index` (`area_code`, `obj_type`, `obj_code`, `record_time`, `date`, `time`, `time_index`, `ua`, `ub`, `uc`, `la`, `lb`, `lc`, `p`, `pa`, `pb`, `pc`, `q`, `qa`, `qb`, `qc`, `pf`) VALUES ('321283124S3001', 2, 'D-B-1001', '2024-09-27 00:05:00', '2024-09-27', '00:00:00', 2, 380, 380, 380, 27, 2.1, 2.8, 5220, 1821, 2345, 2047, 200, 151, 178, 144, 6.5);
+---- 储能负荷
+INSERT INTO `adm_ems_elec_load_index_15min` (`area_code`, `obj_type`, `obj_code`, `record_time`, `date`, `time`, `time_index`, `ua`, `ub`, `uc`, `la`, `lb`, `lc`, `p`, `pa`, `pb`, `pc`, `q`, `qa`, `qb`, `qc`, `pf`) VALUES ('321283124S3001', 1, 'C101', DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d %H:%i:00'), DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d'), DATE_FORMAT(CURRENT_TIME, '%H:%i:00'), FLOOR((HOUR(NOW()) * 60 + MINUTE(NOW())) / 15) + 1, 380, 380, 380, FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 5000) , FLOOR(RAND() * 1000) , FLOOR(RAND() * 1000), FLOOR(RAND() * 1000), 500, 200, 150, 150, FLOOR(RAND() * 100));
+INSERT INTO `adm_ems_elec_load_index_15min` (`area_code`, `obj_type`, `obj_code`, `record_time`, `date`, `time`, `time_index`, `ua`, `ub`, `uc`, `la`, `lb`, `lc`, `p`, `pa`, `pb`, `pc`, `q`, `qa`, `qb`, `qc`, `pf`) VALUES ('321283124S3002', 1, 'C102', DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d %H:%i:00'), DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d'), DATE_FORMAT(CURRENT_TIME, '%H:%i:00'), FLOOR((HOUR(NOW()) * 60 + MINUTE(NOW())) / 15) + 1, 380, 380, 380, FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 5000) , FLOOR(RAND() * 1000) , FLOOR(RAND() * 1000), FLOOR(RAND() * 1000), 500, 200, 150, 150, FLOOR(RAND() * 100));
+
+---- 变压器负荷
+INSERT INTO `adm_ems_elec_load_index_15min` (`area_code`, `obj_type`, `obj_code`, `record_time`, `date`, `time`, `time_index`, `ua`, `ub`, `uc`, `la`, `lb`, `lc`, `p`, `pa`, `pb`, `pc`, `q`, `qa`, `qb`, `qc`, `pf`) VALUES ('321283124S3001', 2, 'D-B-1001', DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d %H:%i:00'), DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d'), DATE_FORMAT(CURRENT_TIME, '%H:%i:00'), FLOOR((HOUR(NOW()) * 60 + MINUTE(NOW())) / 15) + 1, 380, 380, 380, FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 5000) , FLOOR(RAND() * 1000) , FLOOR(RAND() * 1000), FLOOR(RAND() * 1000), 500, 200, 150, 150, FLOOR(RAND() * 100));
+INSERT INTO `adm_ems_elec_load_index_15min` (`area_code`, `obj_type`, `obj_code`, `record_time`, `date`, `time`, `time_index`, `ua`, `ub`, `uc`, `la`, `lb`, `lc`, `p`, `pa`, `pb`, `pc`, `q`, `qa`, `qb`, `qc`, `pf`) VALUES ('321283124S3002', 2, 'D-N-1001', DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d %H:%i:00'), DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d'), DATE_FORMAT(CURRENT_TIME, '%H:%i:00'), FLOOR((HOUR(NOW()) * 60 + MINUTE(NOW())) / 15) + 1, 380, 380, 380, FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 5000) , FLOOR(RAND() * 1000) , FLOOR(RAND() * 1000), FLOOR(RAND() * 1000), 500, 200, 150, 150, FLOOR(RAND() * 100));
+
+---- 空调负荷
+INSERT INTO `adm_ems_elec_load_index_15min` (`area_code`, `obj_type`, `obj_code`, `record_time`, `date`, `time`, `time_index`, `ua`, `ub`, `uc`, `la`, `lb`, `lc`, `p`, `pa`, `pb`, `pc`, `q`, `qa`, `qb`, `qc`, `pf`) VALUES ('321283124S3001', 1, 'Z120', DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d %H:%i:00'), DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d'), DATE_FORMAT(CURRENT_TIME, '%H:%i:00'), FLOOR((HOUR(NOW()) * 60 + MINUTE(NOW())) / 15) + 1, 380, 380, 380, FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 5000) , FLOOR(RAND() * 1000) , FLOOR(RAND() * 1000), FLOOR(RAND() * 1000), 500, 200, 150, 150, FLOOR(RAND() * 100));
+INSERT INTO `adm_ems_elec_load_index_15min` (`area_code`, `obj_type`, `obj_code`, `record_time`, `date`, `time`, `time_index`, `ua`, `ub`, `uc`, `la`, `lb`, `lc`, `p`, `pa`, `pb`, `pc`, `q`, `qa`, `qb`, `qc`, `pf`) VALUES ('321283124S3002', 1, 'Z220', DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d %H:%i:00'), DATE_FORMAT(CURRENT_TIME, '%Y-%m-%d'), DATE_FORMAT(CURRENT_TIME, '%H:%i:00'), FLOOR((HOUR(NOW()) * 60 + MINUTE(NOW())) / 15) + 1, 380, 380, 380, FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 20) , FLOOR(RAND() * 5000) , FLOOR(RAND() * 1000) , FLOOR(RAND() * 1000), FLOOR(RAND() * 1000), 500, 200, 150, 150, FLOOR(RAND() * 100));
 
 
 -- 台账数据

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

@@ -1221,8 +1221,8 @@ create table adm_ems_elec_store_index (
 -- ----------------------------
 -- 电力负荷设施指标表
 -- ----------------------------
-drop table if exists adm_ems_elec_load_index;
-create table adm_ems_elec_load_index (
+drop table if exists adm_ems_elec_load_index_15min;
+create table adm_ems_elec_load_index_15min (
   `id`                        bigint(20)      not null auto_increment      comment '序号',
   `area_code`                 varchar(32)     not null                     comment '园区代码',
   `obj_type`                  int             not null                     comment '对象类型',
@@ -1249,7 +1249,7 @@ create table adm_ems_elec_load_index (
   primary key (`id`),
   unique key ux_ems_elec_load_index(`area_code`, `obj_type`, `obj_code`, `record_time`),
   key ux_ems_elec_load_index_date(`date`)
-) engine=innodb auto_increment=1 comment = '电力负荷设施指标表';
+) engine=innodb auto_increment=1 comment = '电力负荷设施15分钟指标表';
 
 
 -- ----------------------------