view_risk_collect备份.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. view_risk_collect
  2. 7大危险数据总统计表
  3. SELECT 'rq_jg_fxpg'::text AS "table",
  4. '0'::text AS type,
  5. '燃气'::text AS code,
  6. NULL::text AS childtype,
  7. rq_jg_fxpg.bsm,
  8. rq_jg_fxpg.xzqhdm,
  9. rq_jg_fxpg.fxdj,
  10. rq_jg_fxpg.fxms AS fxmc,
  11. rq_jg_fxpg.fxms,
  12. rq_jg_fxpg.gkzt::character varying AS dispose_progress,
  13. rq_jg_fxpg.gkzt,
  14. rq_jg_fxpg.fxlx,
  15. NULL::text AS is_often,
  16. rq_jg_fxpg.pgsj,
  17. rq_jg_fxpg.kjxx,
  18. rq_jg_fxpg.tbsj,
  19. rq_jg_fxpg.zrdw,
  20. rq_jg_fxpg.pgdw,
  21. 60 AS pgfz
  22. FROM rq_jg_fxpg
  23. UNION ALL
  24. SELECT 'gs_jg_gwfxhczxx'::text AS "table",
  25. '2'::text AS type,
  26. '供水'::text AS code,
  27. NULL::text AS childtype,
  28. gs_jg_gwfxhczxx.bsm,
  29. gs_jg_gwfxhczxx.xzqhdm,
  30. gs_jg_gwfxhczxx.fxdj,
  31. gs_jg_gwfxhczxx.fxms AS fxmc,
  32. gs_jg_gwfxhczxx.fxms,
  33. gs_jg_gwfxhczxx.gkzt::character varying AS dispose_progress,
  34. gs_jg_gwfxhczxx.gkzt,
  35. NULL::integer AS fxlx,
  36. NULL::text AS is_often,
  37. gs_jg_gwfxhczxx.pgsj,
  38. gs_jg_gwfxhczxx.kjxx,
  39. gs_jg_gwfxhczxx.tbsj,
  40. NULL::text AS zrdw,
  41. gs_jg_gwfxhczxx.pgdw,
  42. 60 AS pgfz
  43. FROM gs_jg_gwfxhczxx
  44. UNION ALL
  45. SELECT 'ps_jg_ysfxgk'::text AS "table",
  46. '1'::text AS type,
  47. '内涝'::text AS code,
  48. '雨水'::text AS childtype,
  49. ps_jg_ysfxgk.bsm,
  50. ps_jg_ysfxgk.xzqhdm,
  51. ps_jg_ysfxgk.fxdj::integer AS fxdj,
  52. ps_jg_ysfxgk.fxmc,
  53. ps_jg_ysfxgk.fxmc AS fxms,
  54. CASE
  55. WHEN ps_jg_ysfxgk.sfgk THEN '1'::text
  56. ELSE '0'::text
  57. END AS dispose_progress,
  58. 1 AS gkzt,
  59. NULL::integer AS fxlx,
  60. NULL::text AS is_often,
  61. NULL::timestamp without time zone AS pgsj,
  62. ps_jg_ysfxgk.kjxx,
  63. ps_jg_ysfxgk.tbsj,
  64. NULL::text AS zrdw,
  65. NULL::text AS pgdw,
  66. 60 AS pgfz
  67. FROM ps_jg_ysfxgk
  68. UNION ALL
  69. SELECT 'ps_js_yld'::text AS "table",
  70. '1'::text AS type,
  71. '内涝'::text AS code,
  72. '易涝点'::text AS childtype,
  73. ps_js_yld.bsm,
  74. ps_js_yld.xzqhdm,
  75. ps_js_yld.fxdj::integer AS fxdj,
  76. ps_js_yld.mc AS fxmc,
  77. ps_js_yld.mc AS fxms,
  78. '1'::character varying AS dispose_progress,
  79. 1 AS gkzt,
  80. NULL::integer AS fxlx,
  81. NULL::text AS is_often,
  82. NULL::timestamp without time zone AS pgsj,
  83. ps_js_yld.kjxx,
  84. ps_js_yld.tbsj,
  85. NULL::text AS zrdw,
  86. NULL::text AS pgdw,
  87. 60 AS pgfz
  88. FROM ps_js_yld
  89. UNION ALL
  90. SELECT 'dl_jc_dltxfx'::text AS "table",
  91. '6'::text AS type,
  92. '道路'::text AS code,
  93. NULL::text AS childtype,
  94. dl_jc_dltxfx.bsm,
  95. dl_jc_dltxfx.xzqhdm,
  96. dl_jc_dltxfx.fxdj,
  97. dl_jc_dltxfx.gcmc AS fxmc,
  98. dl_jc_dltxfx.gcmc AS fxms,
  99. '1'::character varying AS dispose_progress,
  100. 1 AS gkzt,
  101. NULL::integer AS fxlx,
  102. NULL::text AS is_often,
  103. dl_jc_dltxfx.pgsj,
  104. dl_jc_dltxfx.kjxx,
  105. dl_jc_dltxfx.tbsj,
  106. NULL::text AS zrdw,
  107. NULL::text AS pgdw,
  108. dl_jc_dltxfx.pgfz
  109. FROM dl_jc_dltxfx
  110. UNION ALL
  111. SELECT 'ql_jg_fxpg'::text AS "table",
  112. '5'::text AS type,
  113. '桥梁'::text AS code,
  114. NULL::text AS childtype,
  115. ql_jg_fxpg.bsm,
  116. ql_jg_fxpg.xzqhdm,
  117. ql_jg_fxpg.fxdj,
  118. ql_jg_fxpg.fxmc,
  119. ql_jg_fxpg.fxms,
  120. '1'::character varying AS dispose_progress,
  121. 1 AS gkzt,
  122. NULL::integer AS fxlx,
  123. NULL::text AS is_often,
  124. ql_jg_fxpg.pgsj,
  125. ql_jg_fxpg.kjxx,
  126. ql_jg_fxpg.tbsj,
  127. NULL::text AS zrdw,
  128. NULL::text AS pgdw,
  129. 60 AS pgfz
  130. FROM ql_jg_fxpg