Browse Source

Merge branch 'master' into taosj_dev

taosj 1 hour from now
parent
commit
1c6c5cc8ea
1 changed files with 100 additions and 23 deletions
  1. 100 23
      doc/数据库脚本/gateway-data.sql

+ 100 - 23
doc/数据库脚本/gateway-data.sql

@@ -1,34 +1,111 @@
 ---- 通信的协议
 ---- 通信的协议
-INSERT INTO config_transmit VALUES (1, 'TCP异步客户端', 'cn.oleauto.transmit.tcp.TcpClient', E'host=设备ip\r\nport=设备端口');
+INSERT INTO public.config_transmit VALUES (1, 'TCP异步客户端', 'cn.oleauto.transmit.tcp.TcpClient', 'host=设备ip\r\nport=设备端口');
+INSERT INTO public.config_transmit VALUES (2, 'ModbusTcp客户端', 'cn.oleauto.modbus.tcp.MyTcpMaster', 'host=设备ip\r\nport=设备端口');
+INSERT INTO public.config_transmit VALUES (3, 'Modbus RTU客户端', 'cn.oleauto.modbus.rtu.MyRtuMaster', 'port=COM11
+baud=9600
+dataBis=8
+stopBit=1');
 
 
 ---- 设备的协议
 ---- 设备的协议
-INSERT INTO config_protocol VALUES (1, 'IEC60870-104平衡', 'cn.oleauto.iec104.IEC104ProtocolImpl', E'cotFieldLength=cot信息字节数\r\ncommonAddressFieldLength=公共地址字节数\r\nioaFieldLength=测点编号字节数\r\ncommonAddress=公共地址\r\norginAddress=源地址');
+INSERT INTO public.config_protocol VALUES (1, 'IEC60870-104', 'cn.oleauto.iec104.IEC104ProtocolImpl', 'cotFieldLength=cot信息字节数\r\ncommonAddressFieldLength=公共地址字节数\r\nioaFieldLength=测点编号字节数\r\ncommonAddress=公共地址\r\norginAddress=源地址');
+INSERT INTO public.config_protocol VALUES (2, 'ModbusTCP', 'cn.oleauto.modbus.tcp.ModbusTcpProtocolImpl', ' ');
+INSERT INTO public.config_protocol VALUES (3, 'Modbus RTU', 'cn.oleauto.modbus.rtu.ModbusRtuProtocolImpl', ' ');
 
 
 ---- 通信信道
 ---- 通信信道
-INSERT INTO config_channel VALUES (0, '000', 'mute 通道', '1', 1, '', 1, '', '', '2026-07-03 14:13:27', '2026-07-03 14:13:27', '', '');
-INSERT INTO config_channel VALUES (1, '001', '电气设备通道', '0', 1, E'host=192.168.1.137\nport=2405', 1, ' ', '', '2026-07-03 15:43:11', '2026-07-03 15:38:53', 'admin', 'admin');
+INSERT INTO public.config_channel VALUES (0, '000', 'mute 通道', '1', 1, '', 1, '', '', '2026-07-03 14:13:27', '2026-07-03 14:13:27', '', '');
+INSERT INTO public.config_channel VALUES (1, '001', '电气设备通道', '1', 1, 'host=192.168.1.137\nport=2405', 1, ' ', '', '2026-07-03 15:43:11', '2026-07-03 15:38:53', 'admin', 'admin');
+INSERT INTO public.config_channel VALUES (3, '003', '气象设备通道', '0', 3, 'port=COM11
+baud=9600', 3, ' ', '', '2026-07-03 15:43:11', '2026-07-03 15:38:53', 'admin', 'admin');
 
 
 ---- 场站数据
 ---- 场站数据
-INSERT INTO public.config_station (id, station_name,station_code,superior_area_id,period_total,longitude,latitude,province_number,city_number,"position",installed_capacity,grid_connected_capacity,fans_pv_panelquantity,elevation,operation_time,boosterstation_voltage_level,booster_station_longitude,boosterstation_latitude,responsible_person_name,responsible_person_phone,is_enable,push_status,subject_total,is_full_power,is_del,create_by,create_time,update_by,update_time,station_type,system_power_uuid,area_id) VALUES
-    (1, '江门','JMJD01','EAST01',0,'124','37','370000','370000','广东省',120000,120000,75,12.500000,'2026-7-6','110KV','121.2223','38.9087','张工','13800000000',true,1,1,true,false,'admin','2026-07-01 13:23:25.447','admin','2026-07-01 13:23:25.447',0,'','EAST01');
+INSERT INTO public.config_station VALUES (2, '渤海一号风电场', 'BHWP01', 'EAST01', 0, '121.4737', '38.9087', '370000', '370200', '山东省青岛市', 150000, 148000, 75, 12.500000, '2021-06-01', '110kV', '121.4737', '38.9087', '张工', '13800000001', true, 1, 2, true, false, 'admin', '2026-07-01 13:23:25.447023', 'admin', '2026-07-01 13:23:25.447023', 0, NULL, 'EAST01');
+INSERT INTO public.config_station VALUES (3, '黄海二号风电场', 'HHWP02', 'EAST01', 0, '122.1108', '37.5128', '370000', '371000', '山东省威海市', 120000, 118500, 60, 18.000000, '2022-03-15', '110kV', '122.1108', '37.5128', '李工', '13800000002', true, 1, 1, true, false, 'admin', '2026-07-01 13:23:25.447023', 'admin', '2026-07-01 13:23:25.447023', 0, NULL, 'EAST01');
+INSERT INTO public.config_station VALUES (4, '沂蒙光伏电站', 'YMPV03', 'EAST01', 0, '118.3262', '35.0654', '370000', '371300', '山东省临沂市', 80000, 79200, 160000, 250.000000, '2020-09-20', '35kV', '118.3262', '35.0654', '王工', '13800000003', true, 1, 1, true, false, 'admin', '2026-07-01 13:23:25.447023', 'admin', '2026-07-01 13:23:25.447023', 1, NULL, 'EAST01');
+INSERT INTO public.config_station VALUES (5, '戈壁光伏电站', 'GBPV04', 'EAST01', 0, '93.5145', '42.8194', '650000', '650500', '新疆哈密', 200000, 196000, 400000, 1100.000000, '2019-12-01', '220kV', '93.5145', '42.8194', '陈工', '13800000004', true, 1, 1, true, false, 'admin', '2026-07-01 13:23:25.447023', 'admin', '2026-07-01 13:23:25.447023', 1, NULL, 'EAST01');
+INSERT INTO public.config_station VALUES (1, '江门', 'JMJD01', 'EAST01', 0, '124', '37', '370000', '370000', '广东省', 120000, 120000, 75, 12.500000, '2026-7-6', '110KV', '121.2223', '38.9087', '张工', '13800000000', true, 1, 1, true, false, 'admin', '2026-07-01 13:23:25.447', 'admin', '2026-07-01 13:23:25.447', 0, '', 'EAST01');
 
 
 ---- 设备数据
 ---- 设备数据
-INSERT INTO public.config_device VALUES (1, '电气设备', 1, '1', 'ELEC', 'brand1', 'model1', 'serial1', 'GOOD', '2026-09-01', NULL, '', '2026-09-01 14:41:10.415056', '2026-09-01 14:41:10.415056', '', '');
-INSERT INTO public.config_device VALUES (2, '气象设备', 3, '1', 'WEAT', 'brand1', 'model1', 'serial1', 'GOOD', '2026-09-01', NULL, '', '2026-09-01 14:41:10.415056', '2026-09-01 14:41:10.415056', '', '');
+INSERT INTO public.config_device (id, name, config_channel_id, config_station_id, tp, brand, model, serial_number, status, install_date, config_device_id, remark, create_time, update_time, create_by, update_by) VALUES (1, '电气设备', 1, '1', 'ELEC', 'brand1', 'model1', 'serial1', 'GOOD', '2026-09-01', NULL, '', '2026-09-01 14:41:10.415056', '2026-09-01 14:41:10.415056', '', '');
+INSERT INTO public.config_device (id, name, config_channel_id, config_station_id, tp, brand, model, serial_number, status, install_date, config_device_id, remark, create_time, update_time, create_by, update_by) VALUES (2, '气象设备', 3, '1', 'WEAT', 'brand1', 'model1', 'serial1', 'GOOD', '2026-09-01', NULL, '', '2026-09-01 14:41:10.415056', '2026-09-01 14:41:10.415056', '', '');
 
 
 ---- 测点数据
 ---- 测点数据
-INSERT INTO public.config_point (name,code,addr,category,config_device_id,init_value,will_inverse,kb_composite,k,b,zero_filter,will_check_ud,up1,up2,down1,down2,hop_filter,lazy_tm,config_alarm_template_id,create_time,update_time,create_by,update_by) VALUES
-          ('斜面辐照度','yc16392',16392,'YC',2,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','',''),
-          ('温度','yc16393',16393,'YC',2,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','',''),
-          ('气压','yc16394',16394,'YC',2,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','',''),
-          ('湿度','yc16395',16395,'YC',2,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','',''),
-          ('风速','yc16396',16396,'YC',2,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','',''),
-          ('风向','yc16397',16397,'YC',2,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','',''),
-          ('并网状态','yx4',4,'YX',1,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','',''),
-          ('限电功率','yc16389',16389,'YC',1,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','',''),
-          ('可用率','yc16390',16390,'YC',1,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','',''),
-          ('水平面总辐照度','yc16391',16391,'YC',2,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','','');
-INSERT INTO public.config_point (name,code,addr,category,config_device_id,init_value,will_inverse,kb_composite,k,b,zero_filter,will_check_ud,up1,up2,down1,down2,hop_filter,lazy_tm,config_alarm_template_id,create_time,update_time,create_by,update_by) VALUES
-          ('实际发电功率','yc16385',16385,'YC',1,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','',''),
-          ('理论发电功率','yc16405',16405,'YC',1,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','',''),
-          ('设备状态','yx2',2,'YX',1,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2026-07-03 11:05:09','2026-07-03 11:05:09','','');                                                                                                                                                                                                                                               ('开关分合1','001',1,'YX',1,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2025-09-11 11:26:55','2025-09-11 15:40:11','','');
+INSERT INTO public.config_point VALUES (34, '湿度', 'yc30005', 30005, 'YC', 2, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (35, '风速', 'yc30006', 30006, 'YC', 2, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (36, '风向', 'yc30007', 30007, 'YC', 2, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (31, '斜面辐照度', 'yc30002', 30002, 'YC', 2, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (32, '温度', 'yc30003', 30003, 'YC', 2, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (33, '气压', 'yc30004', 30004, 'YC', 2, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (37, '日累计辐照度', 'yc30008', 30008, 'YC', 2, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (38, '组件温度', 'yc30009', 30009, 'YC', 2, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (11, '并网状态', 'yx4', 4, 'YX', 1, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (24, '限电功率', 'yc16389', 16389, 'YC', 1, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (25, '可用率', 'yc16390', 16390, 'YC', 1, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (22, '实际发电功率', 'yc16385', 16385, 'YC', 1, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (23, '理论发电功率', 'yc16405', 16405, 'YC', 1, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (4, '设备状态', 'yx2', 2, 'YX', 1, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');
+INSERT INTO public.config_point VALUES (30, '水平面总辐照度', 'yc30001', 30001, 'YC', 2, '0', 'N', '0', 1, 0, 0, 'N', 0, 0, 0, 0, 0, 0, NULL, '2026-07-03 11:05:09', '2026-07-03 11:05:09', '', '');                                                                                                                                                                                                                                               ('开关分合1','001',1,'YX',1,'0','N','0',1.0,0.0,0.0,'N',0.0,0.0,0.0,0.0,0,0,NULL,'2025-09-11 11:26:55','2025-09-11 15:40:11','','');
+
+---- 本地气象测点关联配置
+INSERT INTO public.config_weather_local (id, config_station_id, irradiance, inclined_irradiance, temperature, pressure, humidity, wind_speed, wind_direction, create_time, update_time, create_by, update_by, daily_irradiance, board_temperature) VALUES (1, 1, '{
+"deviceId":2,
+"pointType":"YC",
+"pointCode":"yc30001"
+}', '{
+"deviceId":2,
+"pointType":"YC",
+"pointCode":"yc30002"
+}', '{
+"deviceId":2,
+"pointType":"YC",
+"pointCode":"yc30003"
+}', '{
+"deviceId":2,
+"pointType":"YC",
+"pointCode":"yc30004"
+}', '{
+"deviceId":2,
+"pointType":"YC",
+"pointCode":"yc30005"
+}', '{
+"deviceId":2,
+"pointType":"YC",
+"pointCode":"yc30006"
+}', '{
+"deviceId":2,
+"pointType":"YC",
+"pointCode":"yc30007"
+}', '2026-07-24 09:04:12.995791', '2026-07-24 09:04:12.995791', 'admin', 'admin', '{
+"deviceId":2,
+"pointType":"YC",
+"pointCode":"yc30008"
+}', '{
+"deviceId":2,
+"pointType":"YC",
+"pointCode":"yc30009"
+}');
+---- 本地电气测点关联配置
+INSERT INTO public.config_electricity_local (id, config_station_id, actual_power, theoretical_power, curtailment_power, device_status, grid_status, availability, create_time, update_time, create_by, update_by) VALUES (1, 1, '{
+"deviceId":1,
+"pointType":"YC",
+"pointCode":"yc16385"
+}', '{
+"device_id":1,
+"pointType":"YC",
+"point_code":"yc16405"
+}', '{
+"device_id":1,
+"pointType":"YC",
+"point_code":"yc16389"
+}', '{
+"device_id":1,
+"pointType":"YX",
+"point_code":"yx2"
+}', '{
+"device_id":1,
+"pointType":"YX",
+"point_code":"yx4"
+}', '{
+"device_id":1,
+"pointType":"YC",
+"point_code":"yc16390"
+}', '2026-07-06 17:45:03.847393', '2026-07-06 17:45:03.847393', '', '');