/*
 Navicat Premium Data Transfer

 Source Server         : A云-14-2
 Source Server Type    : PostgreSQL
 Source Server Version : 90518
 Source Host           : 172.19.101.14:5433
 Source Catalog        : wems
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 90518
 File Encoding         : 65001

 Date: 31/05/2024 18:18:08
*/


-- ----------------------------
-- Table structure for emms_job_config
-- ----------------------------
DROP TABLE IF EXISTS "public"."emms_job_config";
CREATE TABLE "public"."emms_job_config" (
  "id" int8 NOT NULL,
  "job_code" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "job_desc" varchar(255) COLLATE "pg_catalog"."default",
  "job_cron" varchar(100) COLLATE "pg_catalog"."default" NOT NULL,
  "mqtt_topic" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "mqtt_topic_regex" varchar(300) COLLATE "pg_catalog"."default",
  "mqtt_topic_desc" varchar(300) COLLATE "pg_catalog"."default",
  "enabled" int2 DEFAULT 1,
  "current_send_date" timestamp(0),
  "is_only_change_send" int2 DEFAULT 1,
  "reserve1" varchar COLLATE "pg_catalog"."default",
  "reserve2" varchar COLLATE "pg_catalog"."default",
  "reserve3" varchar COLLATE "pg_catalog"."default",
  "reserve4" varchar COLLATE "pg_catalog"."default",
  "create_user" int8,
  "create_time" timestamp(6),
  "update_user" int8,
  "update_time" timestamp(6),
  "is_deleted" int4 DEFAULT 0,
  "status" int4 DEFAULT 0,
  "create_dept" int8
)
;
COMMENT ON COLUMN "public"."emms_job_config"."id" IS '主键id';
COMMENT ON COLUMN "public"."emms_job_config"."job_code" IS '任务编号';
COMMENT ON COLUMN "public"."emms_job_config"."job_desc" IS '任务描述';
COMMENT ON COLUMN "public"."emms_job_config"."job_cron" IS '任务执行cron';
COMMENT ON COLUMN "public"."emms_job_config"."mqtt_topic" IS 'mqttde的Topic';
COMMENT ON COLUMN "public"."emms_job_config"."mqtt_topic_regex" IS 'mqtt的topic正则表达式';
COMMENT ON COLUMN "public"."emms_job_config"."mqtt_topic_desc" IS 'mqtt的topic描述';
COMMENT ON COLUMN "public"."emms_job_config"."enabled" IS '是否可用，1-使用，0-停止';
COMMENT ON COLUMN "public"."emms_job_config"."current_send_date" IS '最近发送时间';
COMMENT ON COLUMN "public"."emms_job_config"."is_only_change_send" IS '是否仅仅数据变化上报，默认1-是 0-否';
COMMENT ON COLUMN "public"."emms_job_config"."create_user" IS '创建者';
COMMENT ON COLUMN "public"."emms_job_config"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."emms_job_config"."update_user" IS '修改者';
COMMENT ON COLUMN "public"."emms_job_config"."update_time" IS '修改时间';
COMMENT ON COLUMN "public"."emms_job_config"."is_deleted" IS '删除标志: 0 正常   1已删除';
COMMENT ON COLUMN "public"."emms_job_config"."status" IS '状态';
COMMENT ON COLUMN "public"."emms_job_config"."create_dept" IS '部门';
COMMENT ON TABLE "public"."emms_job_config" IS 'emms数据发送配置表';

-- ----------------------------
-- Records of emms_job_config
-- ----------------------------
INSERT INTO "public"."emms_job_config" VALUES (5, 'sendStationCellHealthy', '向云端发送站点电芯健康度，默认1小时秒发送一次 ', '0 0 */1 * * ?', '/emms/%s/cellHealthy', '', '/emms/[站点编号]/cellHealthy', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-07 17:45:08', NULL, '2023-02-07 17:45:11', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (31, 'sendDeviceCellStruct', '向云端发送电芯结构数(堆数，簇数，包数，电芯数)，默认30分钟发送一次', '0 */30 * * * ?', '/emms/%s/device/cellStruct', NULL, '/emms/[站点编号]/device/cellStruct', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-15 11:13:57', NULL, '2023-02-15 11:14:02', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (51, 'sendAlarmHisLevelDistr', '向云端发送告警历史分布，默认5分钟，支持变化上报', '0 */5 * * * ?', '/emms/%s/alarm/hisLevel', NULL, '/emms/[站点编号]/alarm/hisLevel', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-15 16:00:32', NULL, '2023-02-15 16:00:37', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (101, 'sendEmsAlarmDistr', '向云端发送EMS告警分布统计信息，默认1分钟一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/ems/alarmDistr', NULL, '/emms/[站点编号]/ems/alarmDistr', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (201, 'sendBmsAlarmDistr', '向云端发送BMS告警分布统计信息，默认1分钟一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/bms/alarmDistr', NULL, '/emms/[站点编号]/bms/alarmDistr', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (301, 'sendPcsAlarmDistr', '向云端发送PCS告警分布统计信息，默认1分钟一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/pcs/alarmDistr', NULL, '/emms/[站点编号]/pcs/alarmDistr', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (1000, 'sendVideoUrl', '向云端发送播放地址，默认1分钟一次', '0 */1 * * * ?', '/emms/%s/video/url', NULL, '/emms/[站点编号]/video/url', 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, '2023-04-24 15:04:47', NULL, '2023-04-24 15:04:49', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (102, 'sendEmsAlarmRealMaxLevel', '向云端发送EMS最高告警级别，默认1分钟一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/ems/alarmRealMaxLevel', NULL, '/emms/[站点编号]/ems/alarmRealMaxLevel', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (203, 'sendBmsAlarmRealMaxLevel', '向云端发送BMS最高告警级别，默认1分钟一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/bms/alarmRealMaxLevel', NULL, '/emms/[站点编号]/bms/alarmRealMaxLevel', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (2, 'sendStationHealthy', '向云端发送站点健康度，默认1小时秒发送一次 ', '0 0 */1 * * ?', '/emms/%s/healthy', '', '/emms/[站点编号]/healthy', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-07 17:45:08', NULL, '2023-02-07 17:45:11', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (303, 'sendPcsAlarmRealMaxLevel', '向云端发送PCS最高告警级别，默认1分钟一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/pcs/alarmRealMaxLevel', NULL, '/emms/[站点编号]/pcs/alarmRealMaxLevel', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (20, 'sendProfitBms', '向云端发送站点储能用电量和收益数据，默认15秒发送一次', '*/15 * * * * ?', '/emms/%s/profit/bms', '', '/emms/[站点编号]/profit/bms', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-07 17:45:15', NULL, '2023-02-07 17:45:17', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (950, 'sendCellStatistics', '向云端发送电芯统计数据，默认30分钟一次，支持变化上报', '0 */30 * * * ?', '/emms/%s/device/cellStatistics', NULL, '/emms/[站点编号]/device/cellStatistics', 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, '2023-03-10 15:12:32', NULL, '2023-03-10 15:12:34', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (3, 'sendStationRunInfo', '向云端发送站点运行信息(储能功率和SOC)，默认15秒发送一次 ', '*/15 * * * * ?', '/emms/%s/runInfo', '', '/emms/[站点编号]/runInfo', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-07 17:45:08', NULL, '2023-02-07 17:45:11', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (902, 'sendRackRV', '向云端发送电簇电压温度极差方差，默认10秒一次，不支持变化上报', '0 */5 * * * ?', '/emms/%s/cu/sendRackRV', NULL, '/emms/[站点编号]/cu/sendRackRV', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (100, 'sendEmsBaseStatus', '向云端发送EMS基本状态(通讯和工作状态)，默认10秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/ems/baseData', NULL, '/emms/[站点编号]/ems/baseData', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (200, 'sendBmsBaseStatus', '向云端发送BMS基本状态(通讯和工作状态)，默认10秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/bms/baseData', NULL, '/emms/[站点编号]/bms/baseData', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (300, 'sendPcsBaseStatus', '向云端发送PCS基本状态(通讯和工作状态)，默认10秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/pcs/baseData', NULL, '/emms/[站点编号]/pcs/baseData', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (302, 'sendPcsParam', '向云端发送PCS参数，默认15秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/pcs/param', NULL, '/emms/[站点编号]/pcs/param', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (400, 'sendMeterBaseStatus', '向云端发送电表(通讯)，默认10秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/meter/baseData', NULL, '/emms/[站点编号]/meter/baseData', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (401, 'sendMeterQtyParam', '向云端发送电表(电量数据)，默认30秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/meter/qtyParam', NULL, '/emms/[站点编号]/meter/qtyParam', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (500, 'sendAirBaseStatus', '向云端发送空调(通讯状态，工作状态)，默认10秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/kt/baseData', NULL, '/emms/[站点编号]/kt/baseData', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (501, 'sendAirParam', '向云端发送空调参数(温度)，默认30秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/kt/param', NULL, '/emms/[站点编号]/kt/param', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (600, 'sendDiBaseStatus', '向云端发送消防(通讯状态，工作状态)，默认10秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/di/baseData', NULL, '/emms/[站点编号]/di/baseData', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (700, 'sendUpsBaseStatus', '向云端发送UPS(通讯状态，工作状态)，默认10秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/ups/baseData', NULL, '/emms/[站点编号]/ups/baseData', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (900, 'sendRackParam', '向云端发送电簇参数（电压,电流,SOC,SOH），默认10秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/cu/param', NULL, '/emms/[站点编号]/cu/param', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (901, 'sendRackMaxMinVolTemp', '向云端发送电簇参数（簇中最高最低电压，最高最低温度），默认10秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/cu/maxMinVolTemp', NULL, '/emms/[站点编号]/cu/maxMinVolTemp', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (4, 'sendStationUsageOverview', '向云端发送站点使用情况(累计效率,运行天数,运行设备数,节约电费数,总充电量,总放电量)，默认15秒发送一次 ', '0 */1 * * * ?', '/emms/%s/usage', '', '/emms/[站点编号]/usage', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-07 17:45:08', NULL, '2023-02-07 17:45:11', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (202, 'sendBmsParam', '向云端发送Bms参数，默认15秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/bms/param', NULL, '/emms/[站点编号]/bms/param', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-24 13:38:42', NULL, '2023-02-24 13:38:42', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (30, 'sendDeviceInfo', '向云端发送站点设备信息，默认30分钟发送一次', '0 */6 * * * ?', '/emms/%s/device/info', NULL, '/emms/[站点编号]/device/info', 1, NULL, 0, NULL, NULL, NULL, NULL, NULL, '2023-02-15 11:13:57', NULL, '2023-02-15 11:14:02', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (1003, 'sendDiParam', '发送动环实时数据', '0 */1 * * * ?', '/emms/%s/di/param', NULL, '/emms/[站点编号]/di/param', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2024-01-19 15:04:47', NULL, '2024-01-19 15:04:49', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (1, 'sendStationInfo', '向云端发送站点信息任务，默认5秒发送一次 ', '0 */1 * * * ?', '/emms/%s/info', '', '/emms/[站点编号]/info', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-07 17:45:08', NULL, '2023-02-07 17:45:11', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (50, 'sendAlarmRealData', '向云端发送实时告警信息，默认5秒一次，不支持变化上报', '0 */1 * * * ?', '/emms/%s/alarm/data', NULL, '/emms/[站点编号]/alarm/data', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2023-02-15 16:00:32', NULL, '2023-02-15 16:00:37', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (1001, 'sendCellV', '发送电芯电压数据', '0 */1 * * * ?', '/emms/%s/cu/cellV', NULL, '/emms/[站点编号]/cu/cellV', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2024-01-19 15:04:47', NULL, '2024-01-19 15:04:49', 0, 0, NULL);
INSERT INTO "public"."emms_job_config" VALUES (1002, 'sendCellT', '发送电芯温度数据', '0 */1 * * * ?', '/emms/%s/cu/cellT', NULL, '/emms/[站点编号]/cu/cellT', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, '2024-01-19 15:04:47', NULL, '2024-01-19 15:04:49', 0, 0, NULL);

-- ----------------------------
-- Indexes structure for table emms_job_config
-- ----------------------------
CREATE INDEX "emms_job_config_idx1" ON "public"."emms_job_config" USING btree (
  "job_code" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Uniques structure for table emms_job_config
-- ----------------------------
ALTER TABLE "public"."emms_job_config" ADD CONSTRAINT "job_code" UNIQUE ("job_code");

-- ----------------------------
-- Primary Key structure for table emms_job_config
-- ----------------------------
ALTER TABLE "public"."emms_job_config" ADD CONSTRAINT "emms_job_config_pkey" PRIMARY KEY ("id");
