-- 2017.10.19   围栏绑定表添加字段，存储围栏下发是围栏id(hashcode)
ALTER TABLE `clbs`.`zw_m_fence_config`   
  ADD COLUMN `send_down_id` INT(11) NULL   COMMENT '围栏下发设备的hashcode' AFTER `alarm_source`;
  
-- 2017.10.30  车辆信息表  添加remark(备注)字段
ALTER TABLE `clbs`.`zw_m_vehicle_info`   
  ADD COLUMN `remark` VARCHAR(50) NULL   COMMENT '备注' AFTER `vehicle_icon`;  

-- 2017.10.30  新增报警类型初始化数据
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce05','胎压报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','69');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce06','载重报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','70');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce08','反转报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','124');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce111','温度传感器1高温报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6511');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce112','温度传感器1低温报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6512');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce121','温度传感器2高温报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6521');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce122','温度传感器2低温报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6522');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce131','温度传感器3高温报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6531');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce132','温度传感器3低温报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6532');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce141','温度传感器4高温报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6541');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce142','温度传感器4低温报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6542');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce151','温度传感器5高温报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6551');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce152','温度传感器5低温报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6552');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce211','湿度传感器1高湿度报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6611');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce212','湿度传感器1低湿度报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6612');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce221','湿度传感器2高湿度报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6621');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce222','湿度传感器2低湿度报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6622');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce231','湿度传感器3高湿度报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6631');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce232','湿度传感器3低湿度报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6632');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce241','湿度传感器4高湿度报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6641');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce242','湿度传感器4低湿度报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6642');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce411','主油箱加油报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6811');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce412','主油箱漏油报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6812');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce421','副油箱加油报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6821');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce422','副油箱漏油报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','6822');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce711','门磁行驶门开报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','7111');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce712','门磁未到门开报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','7112');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce713','门磁超时门开报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','7113');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013527pa-bb84-11e6-a4a6-cec0c932ce03','围栏内超速报警',NULL,'1',NULL,NULL,NULL,NULL,'platAlarm',NULL,'0','74');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013527pa-bb84-11e6-a4a6-cec0c932ce04','路线偏离报警',NULL,'1',NULL,NULL,NULL,NULL,'platAlarm',NULL,'0','75');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013527pa-bb84-11e6-a4a6-cec0c932ce05','超速报警',NULL,'1',NULL,NULL,NULL,NULL,'platAlarm',NULL,'0','76');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013527pa-bb84-11e6-a4a6-cec0c932ce11','进区域',NULL,'1',NULL,NULL,NULL,NULL,'platAlarm',NULL,'0','7211');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013527pa-bb84-11e6-a4a6-cec0c932ce12','出区域',NULL,'1',NULL,NULL,NULL,NULL,'platAlarm',NULL,'0','7212');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013527pa-bb84-11e6-a4a6-cec0c932ce21','进线路',NULL,'1',NULL,NULL,NULL,NULL,'platAlarm',NULL,'0','7311');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013527pa-bb84-11e6-a4a6-cec0c932ce22','出线路',NULL,'1',NULL,NULL,NULL,NULL,'platAlarm',NULL,'0','7312');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013527pa-bb84-11e6-a4a6-cec0c932ce61','到达关键点报警',NULL,'1',NULL,NULL,NULL,NULL,'platAlarm',NULL,'0','11911');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013527pa-bb84-11e6-a4a6-cec0c932ce62','未达到关键点报警',NULL,'1',NULL,NULL,NULL,NULL,'platAlarm',NULL,'0','11912');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013528aa-bb84-11e6-a4a6-cec0c932ce11','拆机报警(MiNi)',NULL,'1',NULL,NULL,NULL,NULL,'asolongAlarm',NULL,'0','1111');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013528aa-bb84-11e6-a4a6-cec0c932ce12','拆机报警(V8)',NULL,'1',NULL,NULL,NULL,NULL,'asolongAlarm',NULL,'0','1112');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013528aa-bb84-11e6-a4a6-cec0c932ce13','电量不足报警',NULL,'1',NULL,NULL,NULL,NULL,'asolongPlatAlarm',NULL,'0','113');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013528aa-bb84-11e6-a4a6-cec0c932ce14','风控点报警',NULL,'1',NULL,NULL,NULL,NULL,'asolongPlatAlarm',NULL,'0','114');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013529pa-bb84-11e6-a4a6-cec0c932ce03','围栏内超速报警',NULL,'1',NULL,NULL,NULL,NULL,'peoplePlatAlarm',NULL,'0','117');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013529pa-bb84-11e6-a4a6-cec0c932ce04','路线偏离报警',NULL,'1',NULL,NULL,NULL,NULL,'peoplePlatAlarm',NULL,'0','118');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013529pa-bb84-11e6-a4a6-cec0c932ce11','进区域',NULL,'1',NULL,NULL,NULL,NULL,'peoplePlatAlarm',NULL,'0','11511');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013529pa-bb84-11e6-a4a6-cec0c932ce12','出区域',NULL,'1',NULL,NULL,NULL,NULL,'peoplePlatAlarm',NULL,'0','11512');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013529pa-bb84-11e6-a4a6-cec0c932ce21','进线路',NULL,'1',NULL,NULL,NULL,NULL,'peoplePlatAlarm',NULL,'0','11611');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013529pa-bb84-11e6-a4a6-cec0c932ce22','出线路',NULL,'1',NULL,NULL,NULL,NULL,'peoplePlatAlarm',NULL,'0','11612');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013514ba-bb84-11e6-a4a6-cec0c932ce02','出区域',NULL,'1',NULL,NULL,NULL,NULL,'driverAlarm',NULL,'0','2012');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013514ba-bb84-11e6-a4a6-cec0c932ce03','进出区域',NULL,'1',NULL,NULL,NULL,NULL,'driverAlarm',NULL,'0','20');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013517f8-bb84-11e6-a4a6-cec0c932ce02','出线路',NULL,'1',NULL,NULL,NULL,NULL,'driverAlarm',NULL,'0','2112');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013517f8-bb84-11e6-a4a6-cec0c932ce03','进出线路',NULL,'1',NULL,NULL,NULL,NULL,'driverAlarm',NULL,'0','21');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013519b0-bb84-11e6-a4a6-cec0c932ce02','路段行驶时间过长',NULL,'1',NULL,NULL,NULL,NULL,'driverAlarm',NULL,'0','2212');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013519b0-bb84-11e6-a4a6-cec0c932ce03','路段行驶时间不足/过长',NULL,'1',NULL,NULL,NULL,NULL,'driverAlarm',NULL,'0','22');
insert into `zw_m_alarm_type` (`id`, `name`, `parent_id`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `type`, `description`, `sendFlag`, `pos`) values('013526sa-bb84-11e6-a4a6-cec0c932ce03','超速报警',NULL,'1',NULL,NULL,NULL,NULL,'sensorAlarm',NULL,'0','67');
-- 修改数据
update `zw_m_alarm_type` set `sendFlag` = '0' where `id` = '0134f89a-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `name` = '安装按钮未闭合',`type` = 'f3longAlarm' where `id` = '0134f89a-bb84-11e6-a4a6-cec0c932ce03';
update `zw_m_alarm_type` set `type` = 'platAlarm',`sendFlag` = '0', `pos` = '77' where `id` = '01351320-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `pos` = '2011' where `id` = '013514ba-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `pos` = '2111' where `id` = '013517f8-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `pos` = '2211' where `id` = '013519b0-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `name` = 'RTC异常', `type` = 'f3longAlarm' where `id` = '013520cc-bb84-11e6-a4a6-cec0c932c201';
update `zw_m_alarm_type` set `type` = 'platAlarm',`sendFlag` = '0', `pos` = '78' where `id` = '013520cc-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `name` = '车机被拆除', `type` = 'f3longAlarm' where `id` = '013521cd-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `type` = 'asolongAlarm', `pos` = '123' where `id` = '013522aa-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `name` = '电量不足报警', `type` = 'f3longPlatAlarm' where `id` = '013523sd-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `type` = 'f3longPlatAlarm' where `id` = '013524jd-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `type` = 'f3longAlarm' where `id` = '013524jd-bb84-11e6-a4a6-cec0c932ce02';
update `zw_m_alarm_type` set `name` = '进区域' where `id` = '013514ba-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `name` = '进线路' where `id` = '013517f8-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `name` = '路段行驶时间不足' where `id` = '013519b0-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `name` = '风控点报警' where `id` = '013524jd-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_type` set `name` = '设备暴露' where `id` = '013524jd-bb84-11e6-a4a6-cec0c932ce02';

-- 2017.10.30  新增报警参数表初始化数据
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9ala10-bc26-11e6-a4a6-cec0c932ce01','param1','013522aa-bb84-11e6-a4a6-cec0c932ce01',NULL,NULL,'1','2017-09-29 10:54:07',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9ala11-bc26-11e6-a4a6-cec0c932ce10','param1','013528aa-bb84-11e6-a4a6-cec0c932ce11',NULL,NULL,'1','2017-09-29 11:02:31',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9ala12-bc26-11e6-a4a6-cec0c932ce10','param1','013528aa-bb84-11e6-a4a6-cec0c932ce12',NULL,NULL,'1','2017-09-29 11:03:10',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9ala13-bc26-11e6-a4a6-cec0c932ce10','param1','013528aa-bb84-11e6-a4a6-cec0c932ce13','30','%','1','2017-09-29 11:04:56',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9ala14-bc26-11e6-a4a6-cec0c932ce10','param1','013528aa-bb84-11e6-a4a6-cec0c932ce14',NULL,NULL,'1','2017-09-29 11:07:29',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b4e36-bc26-11e6-a4a6-cec0c932ce02','param1','013514ba-bb84-11e6-a4a6-cec0c932ce02',NULL,NULL,'1','2017-01-13 16:19:10',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b4e36-bc26-11e6-a4a6-cec0c932ce03','param1','013514ba-bb84-11e6-a4a6-cec0c932ce03',NULL,NULL,'1','2017-01-13 16:19:11',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b4fbc-bc26-11e6-a4a6-cec0c932ce02','param1','013517f8-bb84-11e6-a4a6-cec0c932ce02',NULL,NULL,'1','2017-01-13 16:19:13',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b4fbc-bc26-11e6-a4a6-cec0c932ce03','param1','013517f8-bb84-11e6-a4a6-cec0c932ce03',NULL,NULL,'1','2017-01-13 16:19:13',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b507a-bc26-11e6-a4a6-cec0c932ce02','param1','013519b0-bb84-11e6-a4a6-cec0c932ce02',NULL,NULL,'1','2017-01-13 16:19:15',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b507a-bc26-11e6-a4a6-cec0c932ce03','param1','013519b0-bb84-11e6-a4a6-cec0c932ce03',NULL,NULL,'1','2017-01-13 16:19:16',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6511-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce111',NULL,NULL,'1','2017-09-22 11:10:00',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6512-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce112',NULL,NULL,'1','2017-09-22 11:10:01',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6521-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce121',NULL,NULL,'1','2017-09-22 11:10:02',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6522-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce122',NULL,NULL,'1','2017-09-22 11:10:03',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6531-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce131',NULL,NULL,'1','2017-09-22 11:10:04',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6532-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce132',NULL,NULL,'1','2017-09-22 11:10:05',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6541-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce141',NULL,NULL,'1','2017-09-22 11:10:06',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6542-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce142',NULL,NULL,'1','2017-09-22 11:10:07',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6551-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce151',NULL,NULL,'1','2017-09-22 11:10:08',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6552-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce152',NULL,NULL,'1','2017-09-22 11:10:09',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6611-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce211',NULL,NULL,'1','2017-09-22 11:10:50',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6612-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce212',NULL,NULL,'1','2017-09-22 11:10:51',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6621-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce221',NULL,NULL,'1','2017-09-22 11:10:52',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6622-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce222',NULL,NULL,'1','2017-09-22 11:10:53',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6631-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce231',NULL,NULL,'1','2017-09-22 11:10:54',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6632-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce232',NULL,NULL,'1','2017-09-22 11:10:55',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6641-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce241',NULL,NULL,'1','2017-09-22 11:10:56',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6642-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce242',NULL,NULL,'1','2017-09-22 11:10:57',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6811-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce411',NULL,NULL,'1','2017-09-22 11:12:17',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6812-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce412',NULL,NULL,'1','2017-09-22 11:12:18',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6821-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce421',NULL,NULL,'1','2017-09-22 11:12:19',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b6822-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce422',NULL,NULL,'1','2017-09-22 11:12:20',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b7111-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce711',NULL,NULL,'1','2017-09-22 11:14:46',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b7112-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce712',NULL,NULL,'1','2017-09-22 11:14:47',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9b7113-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce713',NULL,NULL,'1','2017-09-22 11:14:48',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bla04-bc26-11e6-a4a6-cec0c932ce01','param1','013521cd-bb84-11e6-a4a6-cec0c932ce01',NULL,NULL,'1','2017-09-22 11:31:55',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bla05-bc26-11e6-a4a6-cec0c932ce01','param1','013524jd-bb84-11e6-a4a6-cec0c932ce02',NULL,NULL,'1','2017-09-22 11:36:18',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bla06-bc26-11e6-a4a6-cec0c932ce01','param1','013520cc-bb84-11e6-a4a6-cec0c932c201',NULL,NULL,'1','2017-09-22 11:34:15',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bla07-bc26-11e6-a4a6-cec0c932ce01','param1','0134f89a-bb84-11e6-a4a6-cec0c932ce03',NULL,NULL,'1','2017-09-22 11:35:52',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bla09-bc26-11e6-a4a6-cec0c932ce01','param1','013524jd-bb84-11e6-a4a6-cec0c932ce01',NULL,NULL,'1','2017-09-22 11:37:12',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bp032-bc26-11e6-a4a6-cec0c932ce01','param1','02801f72-355a-11e7-a919-92ebcb67fe33',NULL,NULL,'1','2017-09-29 16:41:19',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bp115-bc26-11e6-a4a6-cec0c932ce01','param1','013529pa-bb84-11e6-a4a6-cec0c932ce11',NULL,NULL,'1','2017-09-29 17:38:47',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bp115-bc26-11e6-a4a6-cec0c932ce02','param1','013529pa-bb84-11e6-a4a6-cec0c932ce12',NULL,NULL,'1','2017-09-29 17:39:24',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bp116-bc26-11e6-a4a6-cec0c932ce01','param1','013529pa-bb84-11e6-a4a6-cec0c932ce21',NULL,NULL,'1','2017-09-29 17:40:29',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bp116-bc26-11e6-a4a6-cec0c932ce02','param1','013529pa-bb84-11e6-a4a6-cec0c932ce22',NULL,NULL,'1','2017-09-29 17:41:31',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bp117-bc26-11e6-a4a6-cec0c932ce01','param1','013529pa-bb84-11e6-a4a6-cec0c932ce03',NULL,NULL,'1','2017-09-29 17:43:17',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bp118-bc26-11e6-a4a6-cec0c932ce01','param1','013529pa-bb84-11e6-a4a6-cec0c932ce04',NULL,NULL,'1','2017-09-29 17:44:11',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bp119-bc26-11e6-a4a6-cec0c932ce01','param1','013527pa-bb84-11e6-a4a6-cec0c932ce61',NULL,NULL,'1','2017-09-22 11:24:57',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bp119-bc26-11e6-a4a6-cec0c932ce02','param1','013527pa-bb84-11e6-a4a6-cec0c932ce62',NULL,NULL,'1','2017-09-22 11:24:58',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bpa72-bc26-11e6-a4a6-cec0c932ce01','param1','013527pa-bb84-11e6-a4a6-cec0c932ce11',NULL,NULL,'1','2017-09-22 11:21:13',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bpa72-bc26-11e6-a4a6-cec0c932ce02','param1','013527pa-bb84-11e6-a4a6-cec0c932ce12',NULL,NULL,'1','2017-09-22 11:21:14',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bpa73-bc26-11e6-a4a6-cec0c932ce01','param1','013527pa-bb84-11e6-a4a6-cec0c932ce21',NULL,NULL,'1','2017-09-22 11:22:08',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bpa73-bc26-11e6-a4a6-cec0c932ce02','param1','013527pa-bb84-11e6-a4a6-cec0c932ce22',NULL,NULL,'1','2017-09-22 11:22:09',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bpa74-bc26-11e6-a4a6-cec0c932ce01','param1','013527pa-bb84-11e6-a4a6-cec0c932ce03',NULL,NULL,'1','2017-09-22 11:23:02',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bpa75-bc26-11e6-a4a6-cec0c932ce01','param1','013527pa-bb84-11e6-a4a6-cec0c932ce04',NULL,NULL,'1','2017-09-22 11:23:36',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bpa76-bc26-11e6-a4a6-cec0c932ce01','param1','013527pa-bb84-11e6-a4a6-cec0c932ce05','120','最高速度，单位：km/h','1','2017-09-22 11:24:56',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bs124-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce08',NULL,NULL,'1','2017-09-22 11:12:59',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bsa67-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce03','120','最高速度，单位：km/h','1','2017-09-22 11:11:38',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bsa69-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce05',NULL,NULL,'1','2017-09-22 11:13:00',NULL,NULL,NULL);
insert into `zw_m_alarm_parameter` (`id`, `param_code`, `alarm_type_id`, `default_value`, `description`, `flag`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`) values('5b9bsa70-bc26-11e6-a4a6-cec0c932ce01','param1','013526sa-bb84-11e6-a4a6-cec0c932ce06',NULL,NULL,'1','2017-09-22 11:13:58',NULL,NULL,NULL);
-- 修改数据
update `zw_m_alarm_parameter` set `default_value` = '40' where `id` = '5b9b15ce-bc26-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_parameter` set `default_value` = '20' where `id` = '5b9b3e14-bc26-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_parameter` set `create_data_time` = '2017-09-25 11:19:12' where `id` = '5b9b4d5a-bc26-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_parameter` set `create_data_time` = '2017-09-25 12:09:02' where `id` = '5b9b55ca-bc26-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_parameter` set `create_data_time` = '2017-09-25 12:19:23' where `id` = '5b9b56ec-bc26-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_parameter` set `create_data_time` = '2017-09-25 13:19:25' where `id` = '013520cc-bb84-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_parameter` set `default_value` = '30',`description`='%' where `id` = '5b9b6he9-bc26-11e6-a4a6-cec0c932ce01';
update `zw_m_alarm_parameter` SET `create_data_time` = '2017-09-25 13:19:25' WHERE `id` = '5b9b5872-bc26-11e6-a4a6-cec0c932ce01';

-- 2017.11.1
-- 菜单表新增数据
insert into `zw_c_resource` (`id`, `icon_cls`, `resource_name`, `type`, `code`, `permission`, `perm_value`, `description`, `parent_id`, `sort_order`, `editable`, `enabled`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `domain`, `code_num`, `flag`) values('a1775bd8-13db-45e8-8514-d48664bec8f6',NULL,'温度报表','0',NULL,'','/v/temperatureDetection/temperatureStatistics/list',NULL,'f9c65d06-f40e-11e6-bc64-92361f006689','132','1','1',NULL,NULL,NULL,NULL,NULL,NULL,'1');
insert into `zw_c_resource` (`id`, `icon_cls`, `resource_name`, `type`, `code`, `permission`, `perm_value`, `description`, `parent_id`, `sort_order`, `editable`, `enabled`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `domain`, `code_num`, `flag`) values('a8141c4a-6549-45d5-9a82-5fc9ffa5996a',NULL,'湿度报表','0',NULL,'','/v/humidity/statistical/list',NULL,'f9c65d06-f40e-11e6-bc64-92361f006689','133','1','1',NULL,NULL,NULL,NULL,NULL,NULL,'1');
insert into `zw_c_resource` (`id`, `icon_cls`, `resource_name`, `type`, `code`, `permission`, `perm_value`, `description`, `parent_id`, `sort_order`, `editable`, `enabled`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `domain`, `code_num`, `flag`) values('56bf8dee-34c0-4064-acad-a8688ffd2430',NULL,'正反转报表','0',NULL,'','/v/veerManagement/veerStatistics/list',NULL,'f9c65d06-f40e-11e6-bc64-92361f006689','134','1','1',NULL,NULL,NULL,NULL,NULL,NULL,'1');
insert into `zw_c_resource` (`id`, `icon_cls`, `resource_name`, `type`, `code`, `permission`, `perm_value`, `description`, `parent_id`, `sort_order`, `editable`, `enabled`, `create_data_time`, `create_data_username`, `update_data_time`, `update_data_username`, `domain`, `code_num`, `flag`) values('f8bbe8a8-281f-49e1-ad34-7a111f9115e0',NULL,'里程报表','0',NULL,'mileStatistics','/v/meleMonitor/mileStatistics/list',NULL,'f9c65d06-f40e-11e6-bc64-92361f006689','131','1','1',NULL,NULL,NULL,NULL,NULL,NULL,'1');

-- 菜单表修改数据
update `zw_c_resource` set `sort_order` = '135' where id = '0d8162bb-4722-48bc-b321-456dbbd5540b';
update `zw_c_resource` set `resource_name` = '油量报表' where id = '304b30c4-a00c-11e6-80f5-76304dec7eb7';
update `zw_c_resource` set `resource_name` = '工时报表' where id = '81649b30-838d-11e6-ae22-56b6b6499611';
update `zw_c_resource` set `resource_name` = '报警信息报表' where id = '9aa9aba2-1510-11e7-93ae-92361f002671';
update `zw_c_resource` set `resource_name` = '行驶里程报表' where id = '9aa9af12-1510-11e7-93ae-92361f002671';
update `zw_c_resource` set `resource_name` = '上线率报表' where id = '9aa9b110-1510-11e7-93ae-92361f002671';
update `zw_c_resource` set `resource_name` = '超速报警报表' where id = '9e503e62-2963-11e7-93ae-92361f002671';
update `zw_c_resource` set `sort_order` = '136' where id = 'f89767c1-6396-4819-8434-07f0229c8a83';
update `zw_c_resource` set `resource_name` = '油耗报表' where id = 'fc87aa90-7d62-11e6-ae22-56b6b6499611';

-- 菜单表删除数据
delete from `zw_c_resource` where id = '3d128ee6-622c-11e7-907b-a6006ad3dba0';
delete from `zw_c_resource` where id = '85ab26ee-4699-11e7-a919-92ebcb67fe33';
delete from `zw_c_resource` where id = '85ab295a-4699-11e7-a919-92ebcb67fe33';
delete from `zw_c_resource` where id = '85ab2d56-4699-11e7-a919-92ebcb67fe33';
delete from `zw_c_resource` where id = '9722bd88-622d-11e7-907b-a6006ad3dba0';
delete from `zw_c_resource` where id = 'd842ff0e-622c-11e7-907b-a6006ad3dba0';
delete from `zw_c_resource` where id = 'f619df1c-391d-11e7-a919-92ebcb67fe33';

-- 报警参数设置表添加字段
ALTER TABLE `clbs`.`zw_m_alarm_parameter_setting`   
  ADD COLUMN `alarm_push` smallint(6) NOT NULL COMMENT '报警推送（0、无 1、局部 2、全局）' AFTER `parameter_value`;

-- 里程传感器配置表 添加字段
ALTER TABLE `clbs`.`zw_m_mileage_sensor_config`   
  ADD COLUMN `ig_ratio` double DEFAULT NULL COMMENT 'ig后桥速比' AFTER `enter_nominal_time`;
ALTER TABLE `clbs`.`zw_m_mileage_sensor_config`   
  ADD COLUMN `pulse_ratio` int(11) DEFAULT NULL COMMENT '脉冲数比例' AFTER `ig_ratio`;
ALTER TABLE `clbs`.`zw_m_mileage_sensor_config`   
  ADD COLUMN `correction_factor` double DEFAULT NULL COMMENT '修正系数(范围0.97-1.01)' AFTER `pulse_ratio`;

-- 修改字段
ALTER TABLE `clbs`.`zw_m_mileage_sensor_config`   
  MODIFY `speed_ratio` double DEFAULT NULL COMMENT '速比';

-- 添加索引
alter table zw_m_oil_box_vehicle add index `zw_m_oil_box_vehicle_index` (`vehicle_id`);

-- 风险表添加字段
ALTER TABLE `clbs`.`zw_m_risk_vehicle_config`   
  ADD COLUMN  `video_resolution` varchar(30) DEFAULT NULL COMMENT '视频分辨率' AFTER `photograph_time`;
ALTER TABLE `clbs`.`zw_m_risk_vehicle_config`   
  ADD COLUMN  `camera_resolution` varchar(30) DEFAULT NULL COMMENT '拍照分辨率' AFTER `video_resolution`;

-- 未知设备添加字段
ALTER TABLE `clbs`.`zw_m_unknow_device`   
  ADD COLUMN `unique_number` varchar(64) NOT NULL COMMENT '唯一编号' AFTER `id`;
ALTER TABLE `clbs`.`zw_m_unknow_device`   
  ADD COLUMN `fake_ip` varchar(64) DEFAULT NULL COMMENT '伪IP' AFTER `sim_number`;

-- 修改字段
ALTER TABLE `clbs`.`zw_m_unknow_device`   
  MODIFY `device_id` varchar(20) DEFAULT NULL COMMENT '设备ID';

ALTER TABLE `clbs`.`zw_m_unknow_device`   
  MODIFY `sim_number` varchar(20) DEFAULT NULL COMMENT 'sim卡号';

ALTER TABLE `clbs`.`zw_m_unknow_device`   
  MODIFY `brand` varchar(20) DEFAULT NULL COMMENT '车牌号';

ALTER TABLE `clbs`.`zw_m_unknow_device`   
  MODIFY `device_type` varchar(20) DEFAULT NULL COMMENT '设备类型';

ALTER TABLE `clbs`.`zw_m_unknow_device`   
  MODIFY `flag` smallint(6) NOT NULL DEFAULT '1';

-- 删除多余表

-- 添加索引
alter table zw_o_oil_wear_vehicle add index `zw_o_oil_wear_vehicle_index` (`vehicle_id`);



-- 2017.11.10公网部署版本分界线
------------------------------------------------------------------------------------------------------------------------------------------------
-- 2017.11.9  ADAS 报警表加字段
ALTER TABLE `clbs`.`zw_m_risk_alarm`   
  ADD COLUMN `warn_id` INT(11) NULL   COMMENT '报警id' AFTER `media_id`,
  ADD COLUMN `sensor_id` INT(11) NULL   COMMENT '预警类型：64,65' AFTER `warn_id`,
  ADD COLUMN `status` INT(11) NULL   COMMENT '报警状态：1：开始报警；2：结束报警；16：事件标识' AFTER `sensor_id`,
  ADD COLUMN `type` INT(11) NULL   COMMENT '报警类型' AFTER `status`,
  ADD COLUMN `level` INT(11) NULL   COMMENT '报警级别：1：一级报警；2：二级报警' AFTER `type`,
  ADD COLUMN `road_markings` INT(11) NULL   COMMENT '道路标识类型:1:限速标志；2：限高标志；3：限重标志：4—31：用户自定义' AFTER `level`,
  ADD COLUMN `road_markings_data` INT(11) NULL   COMMENT '道路标识识别数据' AFTER `road_markings`,
  ADD COLUMN `fatigue_level` INT(11) NULL   COMMENT '疲劳等级' AFTER `road_markings_data`,
  ADD COLUMN `reserve_value` INT(11) NULL   COMMENT '驾驶限速值' AFTER `fatigue_level`,
  ADD COLUMN `front_vehicle_speed` DOUBLE NULL   COMMENT '前车车速' AFTER `reserve_value`,
  ADD COLUMN `front_vehicle_distance` DOUBLE NULL   COMMENT '前车/行人距离' AFTER `front_vehicle_speed`,
  ADD COLUMN `deviation_type` INT(11) NULL   COMMENT '偏离类型：1：左侧偏离；2：右侧偏离' AFTER `front_vehicle_distance`,
  ADD COLUMN `speed` DOUBLE NULL   COMMENT '车速' AFTER `deviation_type`,
  ADD COLUMN `altitude` INT(11) NULL   COMMENT '高程 海拔高度，单位为米（m）' AFTER `speed`,
  ADD COLUMN `latitude` DOUBLE NULL   COMMENT '纬度，已纠偏' AFTER `altitude`,
  ADD COLUMN `longitude` DOUBLE NULL   COMMENT '经度，已纠偏' AFTER `latitude`,
  ADD COLUMN `warm_time` VARCHAR(45) NULL   COMMENT '报警时间' AFTER `longitude`,
  ADD COLUMN `vehicle_status` INT(11) NULL   COMMENT '车辆状态' AFTER `warm_time`,
  ADD COLUMN `keep` INT(11) NULL   COMMENT '预留值' AFTER `vehicle_status`,
  ADD COLUMN `media_total` INT(11) NULL   COMMENT '报警附加多媒体信息列表总数' AFTER `keep`;

-- 2017.11.13  能源新增表
CREATE TABLE `clbs`.`zw_m_energy`(  
  `id` VARCHAR(64) NOT NULL COMMENT '主键',
  `vehicle_id` VARCHAR(64) COMMENT '车辆id',
  `travel_mile` DOUBLE COMMENT '总行驶里程',
  `travel_total` DOUBLE COMMENT '总行驶油耗量',
  `travel_base` DOUBLE COMMENT '行驶油耗基准(可输入）',
  `travel_base_list` DOUBLE COMMENT '行驶能耗基准(基准计算的)',
  `avg_speed` DOUBLE COMMENT '平均速度',
  `travel_total_cap` DOUBLE COMMENT '行驶CO2总排放量',
  `travel_base_cap` DOUBLE COMMENT '行驶CO2排放基准',
  `idle_time` INT(11) COMMENT '总怠速时长(s)',
  `idle_total` DOUBLE COMMENT '总怠速油耗量',
  `idle_base` DOUBLE COMMENT '怠速油耗基准(可输入）',
  `idle_base_list` DOUBLE COMMENT '怠速油耗基准(基准计算的)',
  `idle_mile` DOUBLE COMMENT '慢速里程',
  `idle_total_cap` DOUBLE COMMENT '怠速CO2总排放量',
  `idle_base_cap` DOUBLE COMMENT '怠速CO2排放基准',
  `install_time` DATETIME COMMENT '节油产品安装日期',
  `idle_threshold` DOUBLE COMMENT '怠速阈值',
  `flag` SMALLINT(6) DEFAULT 1,
  `create_data_time` DATETIME,
  `create_data_username` VARCHAR(64),
  `update_data_time` DATETIME,
  `update_data_username` VARCHAR(64),
  PRIMARY KEY (`id`)
);

CREATE TABLE `clbs`.`zw_m_energy_travel`(  
  `id` VARCHAR(64) NOT NULL COMMENT 'id',
  `vehicle_id` VARCHAR(64) COMMENT '车id',
  `start_time` DATETIME COMMENT '基准开始时间',
  `end_time` DATETIME COMMENT '基准结束时间',
  `travel_time` INT(11) COMMENT '行驶时长(s)',
  `travel_mile` DOUBLE COMMENT '行驶里程',
  `travel_fuel` DOUBLE COMMENT '行驶油耗量',
  `air_time` INT(11) COMMENT '空调开启时长(s)',
  `travel_base` DOUBLE COMMENT '行驶油耗基准',
  `travel_base_cap` DOUBLE COMMENT '行驶CO2基准',
  `flag` SMALLINT(6) DEFAULT 1,
  `create_data_time` DATETIME,
  `create_data_username` VARCHAR(45),
  `update_data_time` DATETIME,
  `update_data_username` VARCHAR(45),
  PRIMARY KEY (`id`)
) ENGINE=INNODB CHARSET=utf8 COLLATE=utf8_general_ci;


CREATE TABLE `clbs`.`zw_m_energy_idle`(  
  `id` VARCHAR(64) NOT NULL COMMENT 'id',
  `vehicle_id` VARCHAR(64) COMMENT '车辆id',
  `start_time` DATETIME COMMENT '基准开始时间',
  `end_time` DATETIME COMMENT '基准结束时间',
  `idle_time` INT(11) COMMENT '怠速时长(s)',
  `idle_mile` DOUBLE COMMENT '慢速里程',
  `idle_fuel` DOUBLE COMMENT '怠速油耗量',
  `air_ time` INT(11) COMMENT '空调开启时长',
  `idle_base` DOUBLE COMMENT '怠速油耗基准',
  `idle_base_cap` DOUBLE COMMENT '怠速CO2基准',
  `flag` SMALLINT(6),
  `create_data_time` DATETIME,
  `create_data_username` VARCHAR(45),
  `update_data_time` DATETIME,
  `update_data_username` VARCHAR(45),
  PRIMARY KEY (`id`)
) ENGINE=INNODB CHARSET=utf8 COLLATE=utf8_general_ci;

-- 2017.11.17 能耗表修改
ALTER TABLE `clbs`.`zw_m_energy`   
  CHANGE `travel_base` `travel_base` DOUBLE DEFAULT 0  NULL   COMMENT '行驶油耗基准(可输入）',
  CHANGE `travel_base_list` `travel_base_list` DOUBLE DEFAULT 0  NULL   COMMENT '行驶能耗基准(基准计算的)',
  CHANGE `idle_base` `idle_base` DOUBLE DEFAULT 0  NULL   COMMENT '怠速油耗基准(可输入）',
  CHANGE `idle_base_list` `idle_base_list` DOUBLE DEFAULT 0  NULL   COMMENT '怠速油耗基准(基准计算的)';

-- 2017.11.21 修改能耗报表
ALTER TABLE `clbs`.`zw_m_energy`   
  CHANGE `idle_threshold` `idle_threshold` INT(11) NULL   COMMENT '怠速阈值';




  
  