view_risk_collect_back.txt 3.6 KB

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