增加场站.sql 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. -- ============================================================
  2. -- 任务编号: 2026091501
  3. -- 任务名称: 增加场站
  4. -- 数据库: PostgreSQL
  5. -- 日期: 2026-09-15
  6. -- ============================================================
  7. -- 1.3.1 江门 (JMJD01)
  8. INSERT INTO config_station (
  9. station_name, station_code, superior_area_id, period_total,
  10. longitude, latitude,
  11. province_number, city_number, position,
  12. installed_capacity, grid_connected_capacity, fans_pv_panelquantity,
  13. elevation, operation_time, boosterstation_voltage_level,
  14. booster_station_longitude, boosterstation_latitude,
  15. responsible_person_name, responsible_person_phone,
  16. is_enable, push_status, subject_total, is_full_power, is_del,
  17. create_by, create_time, update_by, update_time,
  18. station_type, system_power_uuid, area_id
  19. ) select
  20. '江门', 'JMJD01', 'EAST01', 0,
  21. '113.135232', '22.555907',
  22. '440700', '440700', '广东省江门市江海区东宁路91号',
  23. 4050, 4050, 8723,
  24. '6', '2025-05-30', '10.5KV',
  25. '113.135232', '22.555907',
  26. '张工', '13800000000',
  27. 'true', 1, 1, '0', 'false',
  28. 'admin', NOW(), 'admin', NOW(),
  29. 1, '', 'EAST01'
  30. WHERE NOT EXISTS (SELECT 1 FROM config_station t WHERE t.station_code = 'JMJD01');
  31. -- 1.3.2 北流煜炜 (YUWEI)
  32. INSERT INTO config_station (
  33. station_name, station_code, superior_area_id, period_total,
  34. longitude, latitude,
  35. province_number, city_number, position,
  36. installed_capacity, grid_connected_capacity, fans_pv_panelquantity,
  37. elevation, operation_time, boosterstation_voltage_level,
  38. booster_station_longitude, boosterstation_latitude,
  39. responsible_person_name, responsible_person_phone,
  40. is_enable, push_status, subject_total, is_full_power, is_del,
  41. create_by, create_time, update_by, update_time,
  42. station_type, system_power_uuid, area_id
  43. ) select
  44. '北流煜炜', 'YUWEI', 'EAST01', 0,
  45. '110.305066', '22.615142',
  46. '450981', '450981', '广西壮族自治区玉林市北流市塘岸镇六和村241国道与和谐路交叉口东北 480 米处',
  47. 3000, 3000, 5567,
  48. '108', '2025-04-30', '10.5KV',
  49. '110.305066', '22.615142',
  50. '', '',
  51. 'true', 1, 1, '0', 'false',
  52. 'admin', NOW(), 'admin', NOW(),
  53. 1, '', 'EAST01'
  54. WHERE NOT EXISTS (SELECT 1 FROM config_station t WHERE t.station_code = 'YUWEI');
  55. -- 1.3.3 清远忠信 (ZHONGXIN)
  56. INSERT INTO config_station (
  57. station_name, station_code, superior_area_id, period_total,
  58. longitude, latitude,
  59. province_number, city_number, position,
  60. installed_capacity, grid_connected_capacity, fans_pv_panelquantity,
  61. elevation, operation_time, boosterstation_voltage_level,
  62. booster_station_longitude, boosterstation_latitude,
  63. responsible_person_name, responsible_person_phone,
  64. is_enable, push_status, subject_total, is_full_power, is_del,
  65. create_by, create_time, update_by, update_time,
  66. station_type, system_power_uuid, area_id
  67. ) select
  68. '清远忠信', 'ZHONGXIN', 'EAST01', 0,
  69. '112.996233', '23.542156',
  70. '441802', '441802', '广东省清远市清城区石龙大道建滔循环经济工业园',
  71. 2250, 2250, 3980,
  72. '13', '', '10.5KV',
  73. '112.996233', '23.542156',
  74. '', '',
  75. 'true', 1, 1, '0', 'false',
  76. 'admin', NOW(), 'admin', NOW(),
  77. 1, '', 'EAST01'
  78. WHERE NOT EXISTS (SELECT 1 FROM config_station t WHERE t.station_code = 'ZHONGXIN');
  79. -- ============================================================
  80. -- UPDATE 脚本 (站码已存在时执行)
  81. -- ============================================================
  82. -- 1.3.1 江门
  83. UPDATE config_station SET
  84. station_name = '江门',
  85. superior_area_id = 'EAST01',
  86. period_total = 0,
  87. longitude = '113.135232',
  88. latitude = '22.555907',
  89. province_number = '440700',
  90. city_number = '440700',
  91. position = '广东省江门市江海区东宁路91号',
  92. installed_capacity = 4050,
  93. grid_connected_capacity = 4050,
  94. fans_pv_panelquantity = 8723,
  95. elevation = '6',
  96. operation_time = '2025-05-30',
  97. boosterstation_voltage_level = '10.5KV',
  98. booster_station_longitude = '113.135232',
  99. boosterstation_latitude = '22.555907',
  100. responsible_person_name = '张工',
  101. responsible_person_phone = '13800000000',
  102. is_enable = 'true',
  103. push_status = 1,
  104. subject_total = 1,
  105. is_full_power = '0',
  106. update_by = 'admin',
  107. update_time = NOW(),
  108. station_type = 1,
  109. system_power_uuid = '',
  110. area_id = 'EAST01'
  111. WHERE station_code = 'JMJD01';
  112. -- 1.3.2 北流煜炜
  113. UPDATE config_station SET
  114. station_name = '北流煜炜',
  115. superior_area_id = 'EAST01',
  116. period_total = 0,
  117. longitude = '110.305066',
  118. latitude = '22.615142',
  119. province_number = '450981',
  120. city_number = '450981',
  121. position = '广西壮族自治区玉林市北流市塘岸镇六和村241国道与和谐路交叉口东北 480 米处',
  122. installed_capacity = 3000,
  123. grid_connected_capacity = 3000,
  124. fans_pv_panelquantity = 5567,
  125. elevation = '108',
  126. operation_time = '2025-04-30',
  127. boosterstation_voltage_level = '10.5KV',
  128. booster_station_longitude = '110.305066',
  129. boosterstation_latitude = '22.615142',
  130. responsible_person_name = '',
  131. responsible_person_phone = '',
  132. is_enable = 'true',
  133. push_status = 1,
  134. subject_total = 1,
  135. is_full_power = '0',
  136. update_by = 'admin',
  137. update_time = NOW(),
  138. station_type = 1,
  139. system_power_uuid = '',
  140. area_id = 'EAST01'
  141. WHERE station_code = 'YUWEI';
  142. -- 1.3.3 清远忠信
  143. UPDATE config_station SET
  144. station_name = '清远忠信',
  145. superior_area_id = 'EAST01',
  146. period_total = 0,
  147. longitude = '112.996233',
  148. latitude = '23.542156',
  149. province_number = '441802',
  150. city_number = '441802',
  151. position = '广东省清远市清城区石龙大道建滔循环经济工业园',
  152. installed_capacity = 2250,
  153. grid_connected_capacity = 2250,
  154. fans_pv_panelquantity = 3980,
  155. elevation = '13',
  156. operation_time = '',
  157. boosterstation_voltage_level = '10.5KV',
  158. booster_station_longitude = '112.996233',
  159. boosterstation_latitude = '23.542156',
  160. responsible_person_name = '',
  161. responsible_person_phone = '',
  162. is_enable = 'true',
  163. push_status = 1,
  164. subject_total = 1,
  165. is_full_power = '0',
  166. update_by = 'admin',
  167. update_time = NOW(),
  168. station_type = 1,
  169. system_power_uuid = '',
  170. area_id = 'EAST01'
  171. WHERE station_code = 'ZHONGXIN';