2020-07-09 long
ALTER TABLE sc_customer ADD parent_id INT(11) NOT NULL DEFAULT 0 COMMENT 'parentId';
ALTER TABLE sc_customer ADD children_num INT(11) NOT NULL DEFAULT 0 COMMENT 'childrenNum';
2019-01-09 lin
INSERT INTO `sc_config_t`(`id`, `config_name`, `config_value`, `config_desc`, `parent_id`, `status`, `create_by`, `update_by`, `date_create`, `date_update`) VALUES (53, '告警类型属性', 'alarm_type_property', NULL, 0, 1, '系统初始化', '系统初始化', '2018-12-29 17:48:35', '2018-12-29 17:48:35');
INSERT INTO `sc_config_t`(`id`, `config_name`, `config_value`, `config_desc`, `parent_id`, `status`, `create_by`, `update_by`, `date_create`, `date_update`) VALUES (54, '预定义', '1', NULL, 53, 1, '系统初始化', '系统初始化', '2018-12-29 17:48:35', '2018-12-29 17:48:35');
INSERT INTO `sc_config_t`(`id`, `config_name`, `config_value`, `config_desc`, `parent_id`, `status`, `create_by`, `update_by`, `date_create`, `date_update`) VALUES (55, '自定义', '2', NULL, 53, 1, '系统初始化', '系统初始化', '2018-12-29 17:48:35', '2018-12-29 17:48:35');
ALTER TABLE sc_alarm_type ADD type_desc VARCHAR(256) DEFAULT '' COMMENT 'desc';
ALTER TABLE sc_alarm_type ADD alarm_type_property INT(11) DEFAULT 1 COMMENT 'alarmTypeProperty';
ALTER TABLE sc_alarm_type ADD site_id INT(11) DEFAULT 0 COMMENT 'siteId';
2019-01-10 lin
ALTER TABLE sc_device_alarm_rule ADD rule_desc VARCHAR(256) DEFAULT '' COMMENT 'ruleDesc';
ALTER TABLE sc_device_alarm_rule ADD value1 VARCHAR(128) DEFAULT '' COMMENT 'value1';
ALTER TABLE sc_device_alarm_rule ADD value2 VARCHAR(128) DEFAULT '' COMMENT 'value2';
ALTER TABLE sc_device_alarm_rule ADD measuring_data_type INT(11) DEFAULT 1 COMMENT 'measuingDataType';
2019-01-15 lin
ALTER TABLE sc_channel ADD channel_desc VARCHAR(256) DEFAULT '' COMMENT '描述';
ALTER TABLE sc_channel ADD icon VARCHAR(256) DEFAULT '' COMMENT '图标';
ALTER TABLE sc_channel DROP COLUMN related_menu_id;
ALTER TABLE sc_channel ADD sort INT(11) DEFAULT 1 COMMENT '排序';
INSERT INTO `sc_permission`(`id`, `parent_id`, `name`, `permission`, `icon`, `path`, `sort`, `is_menu`, `status`, `create_date`, `create_by`, `update_date`, `update_by`, `is_super_admin_menu`, `is_site_menu`, `sys_id`) VALUES (null, 4, '场景管理', '/system/channel', '/', '/', 12, 1, 1, '2019-01-15 10:09:57', 'admin', '2019-01-15 10:10:30', 'admin', 1, 0, NULL);
INSERT INTO `sc_permission`(`id`, `parent_id`, `name`, `permission`, `icon`, `path`, `sort`, `is_menu`, `status`, `create_date`, `create_by`, `update_date`, `update_by`, `is_super_admin_menu`, `is_site_menu`, `sys_id`) VALUES (null, 157, '查询', 'sys:channel:query', '/', '/', 1, 0, 1, '2019-01-15 10:11:53', 'admin', '2019-01-15 10:11:53', 'admin', 1, 0, NULL);
INSERT INTO `sc_permission`(`id`, `parent_id`, `name`, `permission`, `icon`, `path`, `sort`, `is_menu`, `status`, `create_date`, `create_by`, `update_date`, `update_by`, `is_super_admin_menu`, `is_site_menu`, `sys_id`) VALUES (null, 157, '添加', 'sys:channel:add', '/', '/', 2, 0, 1, '2019-01-15 10:12:34', 'admin', '2019-01-15 10:12:34', 'admin', 1, 0, NULL);
INSERT INTO `sc_permission`(`id`, `parent_id`, `name`, `permission`, `icon`, `path`, `sort`, `is_menu`, `status`, `create_date`, `create_by`, `update_date`, `update_by`, `is_super_admin_menu`, `is_site_menu`, `sys_id`) VALUES (null, 157, '编辑', 'sys:channel:edit', '/', '/', 3, 0, 1, '2019-01-15 10:12:57', 'admin', '2019-01-15 10:12:57', 'admin', 1, 0, NULL);
INSERT INTO `sc_permission`(`id`, `parent_id`, `name`, `permission`, `icon`, `path`, `sort`, `is_menu`, `status`, `create_date`, `create_by`, `update_date`, `update_by`, `is_super_admin_menu`, `is_site_menu`, `sys_id`) VALUES (null, 157, '删除', 'sys:channel:del', '/', '/', 4, 0, 1, '2019-01-15 10:13:33', 'admin', '2019-01-15 10:13:33', 'admin', 1, 0, NULL);
INSERT INTO `sc_permission`(`id`, `parent_id`, `name`, `permission`, `icon`, `path`, `sort`, `is_menu`, `status`, `create_date`, `create_by`, `update_date`, `update_by`, `is_super_admin_menu`, `is_site_menu`, `sys_id`) VALUES (null, 157, '分配设备类型', 'sys:channel:allocation', '/', '/', 5, 0, 1, '2019-01-15 10:14:30', 'admin', '2019-01-15 10:14:30', 'admin', 1, 0, NULL);
ALTER TABLE sc_device_type DROP COLUMN channel_id;
2019-01-17 lin
ALTER TABLE sc_device_alarm_rule ADD specification VARCHAR(128) DEFAULT '' COMMENT 'specification';
2019-01-25 lin
CREATE TABLE sc_organization(
id INT (11) NOT NULL AUTO_INCREMENT COMMENT 'id',
parent_id INT (11) DEFAULT -1 COMMENT 'parentId',
site_id INT (11) DEFAULT -1 COMMENT 'siteId',
name VARCHAR (128) DEFAULT '' COMMENT 'nane',
type INT (11) DEFAULT 1 COMMENT 'type',
address VARCHAR (256) DEFAULT '' COMMENT 'address',
collections VARCHAR (256) DEFAULT '' COMMENT 'address',
status tinyint (1) DEFAULT 1 COMMENT 'status',
create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'createDate',
create_by VARCHAR (128) DEFAULT '' COMMENT 'createBy',
update_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'updateDate',
update_by VARCHAR (128) DEFAULT '' COMMENT 'updateBy',
PRIMARY KEY (id)
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '机构';
INSERT INTO `smart_city_sit`.`sc_permission`(`id`, `parent_id`, `name`, `permission`, `icon`, `path`, `sort`, `is_menu`, `status`, `create_date`, `create_by`, `update_date`, `update_by`, `is_super_admin_menu`, `is_site_menu`, `sys_id`) VALUES (null, 4, '机构管理', '/', '/', '/system/organ', 13, 1, 1, '2019-01-25 11:25:06', 'admin', '2019-01-25 11:29:14', 'admin', 0, 1, NULL);
INSERT INTO `smart_city_sit`.`sc_permission`(`id`, `parent_id`, `name`, `permission`, `icon`, `path`, `sort`, `is_menu`, `status`, `create_date`, `create_by`, `update_date`, `update_by`, `is_super_admin_menu`, `is_site_menu`, `sys_id`) VALUES (null, 270, '查询', 'sys:organ:query', '/', '/', 1, 0, 1, '2019-01-25 11:26:15', 'admin', '2019-01-25 11:26:15', 'admin', 0, 1, NULL);
INSERT INTO `smart_city_sit`.`sc_permission`(`id`, `parent_id`, `name`, `permission`, `icon`, `path`, `sort`, `is_menu`, `status`, `create_date`, `create_by`, `update_date`, `update_by`, `is_super_admin_menu`, `is_site_menu`, `sys_id`) VALUES (null, 270, '添加', 'sys:organ:add', '/', '/', 2, 0, 1, '2019-01-25 11:26:54', 'admin', '2019-01-25 11:26:54', 'admin', 0, 1, NULL);
INSERT INTO `smart_city_sit`.`sc_permission`(`id`, `parent_id`, `name`, `permission`, `icon`, `path`, `sort`, `is_menu`, `status`, `create_date`, `create_by`, `update_date`, `update_by`, `is_super_admin_menu`, `is_site_menu`, `sys_id`) VALUES (null, 270, '编辑', 'sys:organ:edit', '/', '/', 3, 0, 1, '2019-01-25 11:27:28', 'admin', '2019-01-25 11:27:28', 'admin', 0, 1, NULL);
INSERT INTO `smart_city_sit`.`sc_permission`(`id`, `parent_id`, `name`, `permission`, `icon`, `path`, `sort`, `is_menu`, `status`, `create_date`, `create_by`, `update_date`, `update_by`, `is_super_admin_menu`, `is_site_menu`, `sys_id`) VALUES (null, 270, '删除', 'sys:organ:del', '/', '/', 4, 0, 1, '2019-01-25 11:27:55', 'admin', '2019-01-25 11:27:55', 'admin', 0, 1, NULL);
ALTER TABLE sc_user ADD organ_id INT(11) DEFAULT -1 COMMENT 'organId';
ALTER TABLE sc_process_def ADD running_version INT(11) DEFAULT 0 COMMENT 'runningVersion';
2019-02-20 lin
ALTER TABLE sc_inspection_object ADD standard_id INT(11) COMMENT 'standardId';
ALTER TABLE sc_inspection_object ADD object_status INT(11) COMMENT 'objectStatus';
ALTER TABLE sc_inspection_object ADD device_id INT(20) COMMENT 'deviceId';
ALTER TABLE sc_inspection_object DROP COLUMN standart_id;
2019-02-21 lin
CREATE TABLE sc_inspection_plan_object(
id INT (11) NOT NULL AUTO_INCREMENT COMMENT 'id',
phan_id INT (11) COMMENT 'phanId',
object_id INT (11) COMMENT 'objectId',
seq INT (11) COMMENT 'seq',
status INT (11) COMMENT 'status',
date_create TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'dateCreate',
date_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'dateUpdate',
create_by VARCHAR (128) COMMENT 'createBy',
update_by VARCHAR (128) COMMENT 'updateBy',
PRIMARY KEY (id)
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '巡检计划对象';
ALTER TABLE sc_inspection_plan ADD user_id INT(11) COMMENT 'userId';
ALTER TABLE sc_inspection_plan_instance ADD instance_status INT(11) COMMENT 'instanceStatus';
ALTER TABLE sc_inspection_plan_instance ADD plan_complete_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'planCompleteDate';
ALTER TABLE sc_inspection_plan_instance ADD complete_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'completeDate';
CREATE TABLE sc_inspection_object_result(
id INT (11) NOT NULL AUTO_INCREMENT COMMENT 'id',
site_id INT (11) COMMENT 'siteId',
instance_id INT (11) COMMENT 'instanceId',
plan_id INT (11) COMMENT 'planId',
object_id INT (11) COMMENT 'objectId',
object_status INT (11) COMMENT 'objectStatus',
remark VARCHAR (50) COMMENT 'remark',
status INT (11) COMMENT 'status',
date_create TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'dateCreate',
date_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'dateUpdate',
create_by VARCHAR (128) COMMENT 'createBy',
update_by VARCHAR (128) DEFAULT '' COMMENT 'updateBy',
PRIMARY KEY (id)
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT 'sc_inspection_object_result';
ALTER TABLE sc_inspection_result ADD object_result_id INT(11) COMMENT 'objectResultId';
2019-02-26 lin
CREATE TABLE sc_plan(
id INT (11) NOT NULL AUTO_INCREMENT COMMENT 'id',
site_id INT (11) COMMENT 'siteId',
plan_name VARCHAR (128) COMMENT 'planName',
picture VARCHAR (256) COMMENT 'picture',
length VARCHAR (128) COMMENT 'length',
width VARCHAR (128) COMMENT 'width',
proportion VARCHAR (128) COMMENT 'proportion',
status INT (11) COMMENT 'status',
date_create TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'dateCreate',
date_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'dateUpdate',
create_by VARCHAR (128) COMMENT 'createBy',
update_by VARCHAR (128) COMMENT 'updateBy',
PRIMARY KEY (id)
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '平面图';
ALTER TABLE sc_device ADD plan_id INT(11) COMMENT 'planId';
ALTER TABLE sc_inspection_object ADD plan_id INT(11) COMMENT 'planId';
ALTER TABLE sc_inspection_object ADD x_coordinates decimal(10, 5);
ALTER TABLE sc_inspection_object ADD y_coordinates decimal(10, 5);
ALTER TABLE sc_inspection_result ADD index_name VARCHAR(128) COMMENT 'indexName';
ALTER TABLE sc_inspection_result ADD index_type INT(11) COMMENT 'indexType';
ALTER TABLE sc_inspection_result ADD index_definition_value VARCHAR(256) COMMENT 'indexDefinitionValue';
2019-02-26 lin
ALTER TABLE sc_inspection_standard ADD site_id INT(11) COMMENT 'siteId';
2019-06-14 lin
ALTER TABLE sc_inspection_standard ADD site_id INT(11) COMMENT 'siteId';
ALTER TABLE sc_inspection_standard ADD stage_type INT(11) COMMENT '用水阶段类型 1:年 2:月 3:日';
ALTER TABLE sc_inspection_standard ADD picture_url VARCHAR(128) COMMENT '价格图';
CREATE TABLE `sc_client_suggest` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`phone_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`status` int(11) NULL DEFAULT NULL,
`create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`date_create` timestamp(0) NULL DEFAULT NULL,
`update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`date_update` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE `sc_client_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`mobile_phone` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`username` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`openid` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`status` int(11) NULL DEFAULT NULL,
`create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`date_create` timestamp(0) NULL DEFAULT NULL,
`date_update` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE `sc_client_user_device` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`client_user_id` int(11) NULL DEFAULT NULL COMMENT '用户id',
`device_id` bigint(20) NULL DEFAULT NULL COMMENT '设备id',
`type` int(11) NULL DEFAULT NULL COMMENT '类型 1:居民 2:单位 3:特殊',
`is_default` int(11) NULL DEFAULT NULL COMMENT '是否默认 0:否 1:是',
`status` int(11) NULL DEFAULT NULL,
`create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`date_create` timestamp(0) NULL DEFAULT NULL,
`date_update` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 40 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE `sc_customer_water_stage` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`customer_id` int(11) NULL DEFAULT NULL COMMENT '客户id',
`type` int(11) NULL DEFAULT NULL COMMENT '类型 1:居民 2:单位 3:特殊',
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '阶段名称',
`min_value` decimal(10, 2) NULL DEFAULT NULL COMMENT '最小值',
`max_value` decimal(10, 2) NULL DEFAULT NULL COMMENT '最大值',
`water_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '阶段水价',
`status` int(11) NULL DEFAULT NULL COMMENT '状态',
`create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`create_date` timestamp(0) NULL DEFAULT NULL,
`update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`update_date` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE `sc_user_apply` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户姓名',
`phone_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号码',
`role_type` int(11) NULL DEFAULT NULL COMMENT '用户角色 1:水表厂家用户 2:自来水公司用户 3:城市合伙人',
`unit_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称',
`data_permission` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限',
`apply_type` int(11) NULL DEFAULT NULL COMMENT '申请类型 1:商用 2:演示',
`apply_status` int(11) NULL DEFAULT NULL COMMENT '申请状态 0:未审核 1:已审核',
`audit_time` timestamp(0) NULL DEFAULT NULL COMMENT '审核时间',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`status` int(11) NULL DEFAULT NULL COMMENT '状态',
`create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`create_date` timestamp(0) NULL DEFAULT NULL,
`update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`update_date` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
2019-09-16 lin
DROP TABLE IF EXISTS `sc_install_plan`;
CREATE TABLE `sc_install_plan` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`site_id` int(11) NULL DEFAULT NULL COMMENT '站点id',
`plan_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '计划名称',
`province` int(11) NULL DEFAULT NULL COMMENT '省',
`city` int(11) NULL DEFAULT NULL COMMENT '市',
`region` int(11) NULL DEFAULT NULL COMMENT '区',
`community_id` int(11) NULL DEFAULT NULL COMMENT '小区',
`community_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '小区名称',
`pre_install_number` int(11) NULL DEFAULT NULL COMMENT '报装客户数',
`customer_id` int(11) NULL DEFAULT NULL COMMENT '水司id,参考sc_customer',
`device_type_id` int(11) NULL DEFAULT NULL COMMENT '设备类型',
`install_group_name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '施工单位',
`install_group_header` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '施工负责人',
`phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
`plan_start_date` timestamp(0) NULL DEFAULT NULL COMMENT '计划开始时间',
`plan_end_date` timestamp(0) NULL DEFAULT NULL COMMENT '计划结束时间',
`plan_status` int(11) NULL DEFAULT NULL COMMENT '计划状态,0:未结束,1:已结束',
`date_create` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`date_update` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`status` int(11) NULL DEFAULT NULL,
`remark` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`enable_unit` int(11) NULL DEFAULT NULL COMMENT '是否启用单元 0:否 1:是',
`building_number` int(11) NULL DEFAULT NULL COMMENT '楼栋数',
`unit_number` int(11) NULL DEFAULT NULL COMMENT '单元数',
`file_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '生成压缩包文件路径',
`enable_download` int(11) NULL DEFAULT NULL COMMENT '是否启用下载 0:否 1:是',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '安装计划' ROW_FORMAT = Dynamic;
CREATE TABLE `sc_install_plan_data` (
`id` bigint(20) NOT NULL,
`parent_id` bigint(20) NOT NULL COMMENT '父类id',
`install_plan_id` int(11) NULL DEFAULT NULL COMMENT '安装计划id',
`type` int(11) NULL DEFAULT NULL COMMENT '类型 1:楼栋 2:单元 3:楼层',
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
`status` int(11) NULL DEFAULT NULL COMMENT '状态',
`create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`create_date` timestamp(0) NULL DEFAULT NULL,
`update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`update_date` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
ALTER TABLE `sc_install_list`
ADD COLUMN `install_plan_data_id` bigint(20) NULL DEFAULT NULL COMMENT '安装计划数据id' AFTER `install_plan_id`,
ADD COLUMN `floor` int(11) NULL COMMENT '楼层';
CREATE TABLE `sc_install_abnormal_record` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`site_id` int(11) NULL DEFAULT NULL COMMENT '站点id',
`device_id` bigint(20) NULL DEFAULT NULL COMMENT '设备id',
`cause_type` int(11) NULL DEFAULT NULL COMMENT '原因',
`status` int(11) NULL DEFAULT NULL COMMENT '状态',
`create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`create_date` timestamp(0) NULL DEFAULT NULL,
`update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`update_date` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE `sc_install_abnormal_device` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`site_id` int(11) NULL DEFAULT NULL COMMENT '站点id',
`abnormal_record_id` int(11) NULL DEFAULT NULL COMMENT '记录id sc_install_abnormal_record',
`device_id` bigint(20) NULL DEFAULT NULL COMMENT '设备id',
`handle_status` int(11) NULL DEFAULT NULL COMMENT '处理状态 0:未处理 1:已处理',
`status` int(11) NULL DEFAULT NULL COMMENT '状态',
`create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`create_date` timestamp(0) NULL DEFAULT NULL,
`update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`update_date` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE `sc_install_abnormal_handle` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`abnormal_record_id` int(11) NULL DEFAULT NULL COMMENT '异常记录id',
`abnormal_device_id` int(11) NULL DEFAULT NULL COMMENT '异常设备id',
`device_id` bigint(20) NULL DEFAULT NULL COMMENT '设备id',
`old_device_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '旧设备编号',
`old_water_meter_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '旧水表电子号',
`new_device_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '新设备编号',
`new_water_meter_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '新水表电子号',
`status` int(11) NULL DEFAULT NULL COMMENT '状态',
`create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`create_date` timestamp(0) NULL DEFAULT NULL,
`update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`update_date` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE `sc_assistant_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`phone_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`openid` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`customer_id` int(11) NULL DEFAULT NULL,
`status` int(11) NULL DEFAULT NULL,
`create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`create_date` timestamp(0) NULL DEFAULT NULL,
`update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`update_date` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;