ソースを参照

峰谷策略补充字段

lv.wenbin 11 ヶ月 前
コミット
fe15927e6d

+ 32 - 8
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/domain/ElecPriceStrategy.java

@@ -30,6 +30,9 @@ public class ElecPriceStrategy extends BaseEntity
     @Excel(name = "策略名称")
     private String strategyName;
 
+    @Excel(name = "策略名称")
+    private String strategyDesc;
+
     /** 重复类型 */
     @Excel(name = "重复类型")
     private int repeatType;
@@ -42,6 +45,9 @@ public class ElecPriceStrategy extends BaseEntity
     @Excel(name = "优先级")
     private Long priority;
 
+    /** 编辑标记 */
+    private Integer editFlag = 1;
+
     private List<ElecPriceStrategyHour> hourList;
 
     public Long getId() {
@@ -68,6 +74,14 @@ public class ElecPriceStrategy extends BaseEntity
         this.strategyName = strategyName;
     }
 
+    public String getStrategyDesc() {
+        return strategyDesc;
+    }
+
+    public void setStrategyDesc(String strategyDesc) {
+        this.strategyDesc = strategyDesc;
+    }
+
     public int getRepeatType() {
         return repeatType;
     }
@@ -92,25 +106,35 @@ public class ElecPriceStrategy extends BaseEntity
         this.priority = priority;
     }
 
+    public Integer getEditFlag() {
+        return editFlag;
+    }
+
+    public void setEditFlag(Integer editFlag) {
+        this.editFlag = editFlag;
+    }
+
+    public List<ElecPriceStrategyHour> getHourList() {
+        return hourList;
+    }
+
+    public void setHourList(List<ElecPriceStrategyHour> hourList) {
+        this.hourList = hourList;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
             .append("strategyCode", getStrategyCode())
             .append("strategyName", getStrategyName())
+            .append("strategyDesc", getStrategyDesc())
             .append("repeatType", getRepeatType())
             .append("repeatParam", getRepeatParam())
             .append("priority", getPriority())
+            .append("editFlag", getEditFlag())
             .append("createTime", getCreateTime())
             .append("updateTime", getUpdateTime())
             .toString();
     }
-
-    public List<ElecPriceStrategyHour> getHourList() {
-        return hourList;
-    }
-
-    public void setHourList(List<ElecPriceStrategyHour> hourList) {
-        this.hourList = hourList;
-    }
 }

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

@@ -8,15 +8,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="strategyCode"    column="strategy_code"    />
         <result property="strategyName"    column="strategy_name"    />
+        <result property="strategyDesc"    column="strategy_desc"    />
         <result property="repeatType"    column="repeat_type"    />
         <result property="repeatParam"    column="repeat_param"    />
         <result property="priority"    column="priority"    />
+        <result property="editFlag"    column="edit_flag"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
     </resultMap>
 
     <sql id="selectElecPriceStrategyVo">
-        select id, strategy_code, strategy_name, repeat_type, repeat_param, priority, create_time, update_time from adm_elecprice_strategy
+        select id, strategy_code, strategy_name, strategy_desc, repeat_type, repeat_param, priority, edit_flag, create_time, update_time from adm_elecprice_strategy
     </sql>
 
     <select id="selectList" parameterType="com.ruoyi.ems.domain.ElecPriceStrategy" resultMap="ElecpriceStrategyResult">
@@ -39,18 +41,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="strategyCode != null and strategyCode != ''">strategy_code,</if>
             <if test="strategyName != null and strategyName != ''">strategy_name,</if>
+            <if test="strategyDesc != null and strategyDesc != ''">strategy_desc,</if>
             <if test="repeatType != null">repeat_type,</if>
             <if test="repeatParam != null">repeat_param,</if>
             <if test="priority != null">priority,</if>
+            <if test="editFlag != null">edit_flag,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="strategyCode != null and strategyCode != ''">#{strategyCode},</if>
             <if test="strategyName != null and strategyName != ''">#{strategyName},</if>
+            <if test="strategyDesc != null and strategyDesc != ''">#{strategyDesc},</if>
             <if test="repeatType != null">#{repeatType},</if>
             <if test="repeatParam != null">#{repeatParam},</if>
             <if test="priority != null">#{priority},</if>
+            <if test="editFlag != null">#{editFlag},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
          </trim>
@@ -61,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="strategyCode != null and strategyCode != ''">strategy_code = #{strategyCode},</if>
             <if test="strategyName != null and strategyName != ''">strategy_name = #{strategyName},</if>
+            <if test="strategyDesc != null and strategyDesc != ''">strategy_desc = #{strategyDesc},</if>
             <if test="repeatType != null">repeat_type = #{repeatType},</if>
             <if test="repeatParam != null">repeat_param = #{repeatParam},</if>
             <if test="priority != null">priority = #{priority},</if>

+ 57 - 2
ems-cloud/sql/ems_server.sql

@@ -480,7 +480,27 @@ 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 ('321283124S300106', '321283124S3001_CW-DKC', '大客车停车位', 1, 'CW-DKC', 100, '使用中');
 INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-HC', '货车车位', 1, 'CW-HC', 100, '使用中');
 INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-WXP', '危险品车位', 1, 'CW-WXP', 100, '使用中');
-                                                                                                                                   
+
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-101', '开水泡面间', 1, '101', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-102', '超市', 1, '102', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-103', '中式糕点', 1, '103', 150, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-104', '特色产品市集', 1, '104', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-105', '奶茶/咖啡', 1, '105', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-106', '中式套餐', 1, '106', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-107', '特色小吃', 1, '107', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-108', '串串/卤味', 1, '108', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-109', '糖葫芦/水果', 1, '109', 100, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-110', '美食广场', 1, '110', 300, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-111', '男卫', 1, '111', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-112', '男盥洗室', 1, '112', 150, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-113', '女卫', 1, '113', 200, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-114', '女盥洗室', 1, '114', 150, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-115', '工具间1', 1, '115', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-116', '工具间2', 1, '116', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-117', '工具间3', 1, '117', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-118', '工具间4', 1, '118', 50, '使用中');
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300201', 'N-119', '货车服务空间', 1, '119', 50, '使用中');
+
 INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-XK', '小客停车位', 1, 'CW-XK', 100, '使用中');
 INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-CD', '充电车位', 1, 'CW-XK', 100, '使用中');
 INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-WZA', '无障碍车位', 1, 'CW-XK', 100, '使用中');
@@ -916,6 +936,39 @@ insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-117
 insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-118','Area_00');
 insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','B-119','Area_00');
 
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-CD','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-DKC','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-HC','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-WXP','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-WZA','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3001_CW-XK','Area_00');
+
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-101','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-102','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-103','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-104','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-105','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-106','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-107','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-108','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-109','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-110','Area_01');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-111','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-112','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-113','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-114','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-115','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-116','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-117','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-118','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','N-119','Area_00');
+
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-CD','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-DKC','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-HC','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-WXP','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-WZA','Area_00');
+insert into adm_obj_tag_rel(`tag_type`,`obj_code`,`tag_code`) VALUES ('3','321283124S3002_CW-XK','Area_00');
 
 -- ----------------------------
 -- 服务区用电属性表
@@ -992,9 +1045,11 @@ create table adm_elecprice_strategy (
   `id`                   bigint(20)      not null auto_increment      comment '序号',
   `strategy_code`        varchar(32)     not null                     comment '策略代码',
   `strategy_name`        varchar(16)     not null                     comment '策略名称',
+  `strategy_desc`        varchar(128)    default null                 comment '策略描述',
   `repeat_type`          int             not null                     comment '重复类型',
   `repeat_param`         varchar(128)    default null                 comment '重复参数',
   `priority`             int             default 0                    comment '优先级',
+  `edit_flag`            int             default 1                    comment '编辑标识',
   `create_time`          datetime        default CURRENT_TIMESTAMP    comment '创建时间',
   `update_time`          datetime        default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment '更新时间',
   primary key (`id`),
@@ -1002,7 +1057,7 @@ create table adm_elecprice_strategy (
 ) engine=innodb auto_increment=1 comment = '电价策略表';
 
 -- 默认策略
-INSERT INTO adm_elecprice_strategy (`strategy_code`, `strategy_name`, `repeat_type`, `repeat_param`, `priority`) VALUES ('-1', '默认策略', 2, null, 0);
+INSERT INTO adm_elecprice_strategy (`strategy_code`, `strategy_name`, `strategy_desc`, `repeat_type`, `repeat_param`, `priority`) VALUES ('-1', '默认策略', '0:00-24:00 执行平峰电价', 2, null, 0);
 
 -- ----------------------------
 -- 电价策略小时表