view.sql 18 KB

1234567891011121314151617181920
  1. CREATE VIEW `v_dmcgyq` AS select `t1`.`id` AS `id`,`t1`.`dept_station_id` AS `dept_station_id`,`t1`.`pillar_area` AS `pillar_area`,`t1`.`station_track` AS `station_track`,`t1`.`xingbie` AS `xingbie`,`t1`.`marker` AS `marker`,`t1`.`gxms` AS `gxms`,`t1`.`fxcs` AS `fxcs`,`t1`.`fxmc` AS `fxmc`,`t1`.`mdh` AS `mdh`,`t1`.`sbbh` AS `sbbh`,`t1`.`gzlx` AS `gzlx`,`t1`.`czlc` AS `czlc`,`t1`.`fxzxlc` AS `fxzxlc`,`t1`.`sccj` AS `sccj`,`t1`.`xh` AS `xh`,`t1`.`sjbh` AS `sjbh`,`t1`.`del_flag` AS `del_flag`,`t1`.`create_by` AS `create_by`,`t1`.`create_time` AS `create_time`,`t1`.`update_by` AS `update_by`,`t1`.`update_time` AS `update_time`,`t2`.`id` AS `g2id`,`t3`.`id` AS `g3id`,`t4`.`id` AS `g4id` from (((`base_dmcgyq` `t1` left join `base_dmcgyq` `t2` on(((`t1`.`fxmc` = `t2`.`fxmc`) and (`t1`.`dept_station_id` = `t2`.`dept_station_id`) and (`t1`.`xingbie` = `t2`.`xingbie`) and (`t2`.`sbbh` = 'G2')))) left join `base_dmcgyq` `t3` on(((`t1`.`fxmc` = `t3`.`fxmc`) and (`t1`.`dept_station_id` = `t3`.`dept_station_id`) and (`t1`.`xingbie` = `t3`.`xingbie`) and (`t3`.`sbbh` = 'G3')))) left join `base_dmcgyq` `t4` on(((`t1`.`fxmc` = `t4`.`fxmc`) and (`t1`.`dept_station_id` = `t4`.`dept_station_id`) and (`t1`.`xingbie` = `t4`.`xingbie`) and (`t4`.`sbbh` = 'G4')))) where (`t1`.`sbbh` = 'G1');
  2. CREATE VIEW `v_jcb_dmcgyq` AS select `t`.`id` AS `id`,`t`.`gyq_id` AS `gyq_id`,`t`.`dept_station_id` AS `dept_station_id`,`t`.`fenxiang` AS `fenxiang`,`t`.`xingbie` AS `xingbie`,`t`.`pillar_area` AS `pillar_area`,`t`.`tianqi` AS `tianqi`,`t`.`temperature` AS `temperature`,`t`.`check_date` AS `check_date`,`t`.`dgqwg_azlg` AS `dgqwg_azlg`,`t`.`dgqwg_wzws` AS `dgqwg_wzws`,`t`.`dgqwg_bmqj` AS `dgqwg_bmqj`,`t`.`dgqwg_azlg_gzms` AS `dgqwg_azlg_gzms`,`t`.`dgqwg_wzws_gzms` AS `dgqwg_wzws_gzms`,`t`.`dgqwg_bmqj_gzms` AS `dgqwg_bmqj_gzms`,`t`.`bspwg_bsqx` AS `bspwg_bsqx`,`t`.`bspwg_bsqx_gzms` AS `bspwg_bsqx_gzms`,`t`.`bspwg_azlg` AS `bspwg_azlg`,`t`.`bspwg_azlg_gzms` AS `bspwg_azlg_gzms`,`t`.`dgqcl_g1` AS `dgqcl_g1`,`t`.`dgqcl_g2` AS `dgqcl_g2`,`t`.`dgqcl_g3` AS `dgqcl_g3`,`t`.`dgqcl_g4` AS `dgqcl_g4`,`t`.`sbzt` AS `sbzt`,`t`.`check_user` AS `check_user`,`t`.`confirm_user` AS `confirm_user`,`t`.`confirm_date` AS `confirm_date`,`t`.`center_confirm_user` AS `center_confirm_user`,`t`.`center_confirm_date` AS `center_confirm_date`,`t`.`czwt` AS `czwt`,`t`.`submit_state` AS `submit_state`,`t`.`create_by` AS `create_by`,`t`.`create_time` AS `create_time`,`t`.`update_by` AS `update_by`,`t`.`update_time` AS `update_time`,`t`.`jceb_flag` AS `jceb_flag`,`t`.`USER_ID` AS `user_id`,`t`.`del_flag` AS `del_flag`,`t`.`dgqcl_g1` AS `scz`,'G1' AS `gyq_number`,(case when ((`t`.`dgqwg_azlg` = '1') and (`t`.`dgqwg_wzws` = '1') and (`t`.`dgqwg_bmqj` = '1') and (`t`.`bspwg_azlg` = '1') and `t`.`bspwg_bsqx`) then '无' else '有' end) AS `wsjbjsd`,(case when isnull(`b2`.`czlc`) then '' else `b2`.`czlc` end) AS `czlc` from ((`bus_jcb_dmcgyq` `t` left join `base_dmcgyq` `b1` on((`t`.`gyq_id` = `b1`.`id`))) left join `base_dmcgyq` `b2` on(((`b1`.`fxmc` = `b2`.`fxmc`) and (`b1`.`dept_station_id` = `b2`.`dept_station_id`) and (`b1`.`xingbie` = `b2`.`xingbie`) and (`b1`.`sbbh` = 'G1')))) where (`t`.`submit_state` = 9) union select `t`.`id` AS `id`,`t`.`gyq_id` AS `gyq_id`,`t`.`dept_station_id` AS `dept_station_id`,`t`.`fenxiang` AS `fenxiang`,`t`.`xingbie` AS `xingbie`,`t`.`pillar_area` AS `pillar_area`,`t`.`tianqi` AS `tianqi`,`t`.`temperature` AS `temperature`,`t`.`check_date` AS `check_date`,`t`.`dgqwg_azlg` AS `dgqwg_azlg`,`t`.`dgqwg_wzws` AS `dgqwg_wzws`,`t`.`dgqwg_bmqj` AS `dgqwg_bmqj`,`t`.`dgqwg_azlg_gzms` AS `dgqwg_azlg_gzms`,`t`.`dgqwg_wzws_gzms` AS `dgqwg_wzws_gzms`,`t`.`dgqwg_bmqj_gzms` AS `dgqwg_bmqj_gzms`,`t`.`bspwg_bsqx` AS `bspwg_bsqx`,`t`.`bspwg_bsqx_gzms` AS `bspwg_bsqx_gzms`,`t`.`bspwg_azlg` AS `bspwg_azlg`,`t`.`bspwg_azlg_gzms` AS `bspwg_azlg_gzms`,`t`.`dgqcl_g1` AS `dgqcl_g1`,`t`.`dgqcl_g2` AS `dgqcl_g2`,`t`.`dgqcl_g3` AS `dgqcl_g3`,`t`.`dgqcl_g4` AS `dgqcl_g4`,`t`.`sbzt` AS `sbzt`,`t`.`check_user` AS `check_user`,`t`.`confirm_user` AS `confirm_user`,`t`.`confirm_date` AS `confirm_date`,`t`.`center_confirm_user` AS `center_confirm_user`,`t`.`center_confirm_date` AS `center_confirm_date`,`t`.`czwt` AS `czwt`,`t`.`submit_state` AS `submit_state`,`t`.`create_by` AS `create_by`,`t`.`create_time` AS `create_time`,`t`.`update_by` AS `update_by`,`t`.`update_time` AS `update_time`,`t`.`jceb_flag` AS `jceb_flag`,`t`.`USER_ID` AS `user_id`,`t`.`del_flag` AS `del_flag`,`t`.`dgqcl_g2` AS `scz`,'G2' AS `gyq_number`,(case when ((`t`.`dgqwg_azlg` = '1') and (`t`.`dgqwg_wzws` = '1') and (`t`.`dgqwg_bmqj` = '1') and (`t`.`bspwg_azlg` = '1') and `t`.`bspwg_bsqx`) then '无' else '有' end) AS `wsjbjsd`,(case when isnull(`b2`.`czlc`) then '' else `b2`.`czlc` end) AS `czlc` from ((`bus_jcb_dmcgyq` `t` left join `base_dmcgyq` `b1` on((`t`.`gyq_id` = `b1`.`id`))) left join `base_dmcgyq` `b2` on(((`b1`.`fxmc` = `b2`.`fxmc`) and (`b1`.`dept_station_id` = `b2`.`dept_station_id`) and (`b1`.`xingbie` = `b2`.`xingbie`) and (`b1`.`sbbh` = 'G2')))) where (`t`.`submit_state` = 9) union select `t`.`id` AS `id`,`t`.`gyq_id` AS `gyq_id`,`t`.`dept_station_id` AS `dept_station_id`,`t`.`fenxiang` AS `fenxiang`,`t`.`xingbie` AS `xingbie`,`t`.`pillar_area` AS `pillar_area`,`t`.`tianqi` AS `tianqi`,`t`.`temperature` AS `temperature`,`t`.`check_date` AS `check_date`,`t`.`dgqwg_azlg` AS `dgqwg_azlg`,`t`.`dgqwg_wzws` AS `dgqwg_wzws`,`t`.`dgqwg_bmqj` AS `dgqwg_bmqj`,`t`.`dgqwg_azlg_gzms` AS `dgqwg_azlg_gzms`,`t`.`dgqwg_wzws_gzms` AS `dgqwg_wzws_gzms`,`t`.`dgqwg_bmqj_gzms` AS `dgqwg_bmqj_gzms`,`t`.`bspwg_bsqx` AS `bspwg_bsqx`,`t`.`bspwg_bsqx_gzms` AS `bspwg_bsqx_gzms`,`t`.`bspwg_azlg` AS `bspwg_azlg`,`t`.`bspwg_azlg_gzms` AS `bspwg_azlg_gzms`,`t`.`dgqcl_g1` AS `dgqcl_g1`,`t`.`dgqcl_g2` AS `dgqcl_g2`,`t`.`dgqcl_g3` AS `dgqcl_g3`,`t`.`dgqcl_g4` AS `dgqcl_g4`,`t`.`sbzt` AS `sbzt`,`t`.`check_user` AS `check_user`,`t`.`confirm_user` AS `confirm_user`,`t`.`confirm_date` AS `confirm_date`,`t`.`center_confirm_user` AS `center_confirm_user`,`t`.`center_confirm_date` AS `center_confirm_date`,`t`.`czwt` AS `czwt`,`t`.`submit_state` AS `submit_state`,`t`.`create_by` AS `create_by`,`t`.`create_time` AS `create_time`,`t`.`update_by` AS `update_by`,`t`.`update_time` AS `update_time`,`t`.`jceb_flag` AS `jceb_flag`,`t`.`USER_ID` AS `user_id`,`t`.`del_flag` AS `del_flag`,`t`.`dgqcl_g3` AS `scz`,'G3' AS `gyq_number`,(case when ((`t`.`dgqwg_azlg` = '1') and (`t`.`dgqwg_wzws` = '1') and (`t`.`dgqwg_bmqj` = '1') and (`t`.`bspwg_azlg` = '1') and `t`.`bspwg_bsqx`) then '无' else '有' end) AS `wsjbjsd`,(case when isnull(`b2`.`czlc`) then '' else `b2`.`czlc` end) AS `czlc` from ((`bus_jcb_dmcgyq` `t` left join `base_dmcgyq` `b1` on((`t`.`gyq_id` = `b1`.`id`))) left join `base_dmcgyq` `b2` on(((`b1`.`fxmc` = `b2`.`fxmc`) and (`b1`.`dept_station_id` = `b2`.`dept_station_id`) and (`b1`.`xingbie` = `b2`.`xingbie`) and (`b1`.`sbbh` = 'G3')))) where (`t`.`submit_state` = 9) union select `t`.`id` AS `id`,`t`.`gyq_id` AS `gyq_id`,`t`.`dept_station_id` AS `dept_station_id`,`t`.`fenxiang` AS `fenxiang`,`t`.`xingbie` AS `xingbie`,`t`.`pillar_area` AS `pillar_area`,`t`.`tianqi` AS `tianqi`,`t`.`temperature` AS `temperature`,`t`.`check_date` AS `check_date`,`t`.`dgqwg_azlg` AS `dgqwg_azlg`,`t`.`dgqwg_wzws` AS `dgqwg_wzws`,`t`.`dgqwg_bmqj` AS `dgqwg_bmqj`,`t`.`dgqwg_azlg_gzms` AS `dgqwg_azlg_gzms`,`t`.`dgqwg_wzws_gzms` AS `dgqwg_wzws_gzms`,`t`.`dgqwg_bmqj_gzms` AS `dgqwg_bmqj_gzms`,`t`.`bspwg_bsqx` AS `bspwg_bsqx`,`t`.`bspwg_bsqx_gzms` AS `bspwg_bsqx_gzms`,`t`.`bspwg_azlg` AS `bspwg_azlg`,`t`.`bspwg_azlg_gzms` AS `bspwg_azlg_gzms`,`t`.`dgqcl_g1` AS `dgqcl_g1`,`t`.`dgqcl_g2` AS `dgqcl_g2`,`t`.`dgqcl_g3` AS `dgqcl_g3`,`t`.`dgqcl_g4` AS `dgqcl_g4`,`t`.`sbzt` AS `sbzt`,`t`.`check_user` AS `check_user`,`t`.`confirm_user` AS `confirm_user`,`t`.`confirm_date` AS `confirm_date`,`t`.`center_confirm_user` AS `center_confirm_user`,`t`.`center_confirm_date` AS `center_confirm_date`,`t`.`czwt` AS `czwt`,`t`.`submit_state` AS `submit_state`,`t`.`create_by` AS `create_by`,`t`.`create_time` AS `create_time`,`t`.`update_by` AS `update_by`,`t`.`update_time` AS `update_time`,`t`.`jceb_flag` AS `jceb_flag`,`t`.`USER_ID` AS `user_id`,`t`.`del_flag` AS `del_flag`,`t`.`dgqcl_g4` AS `scz`,'G4' AS `gyq_number`,(case when ((`t`.`dgqwg_azlg` = '1') and (`t`.`dgqwg_wzws` = '1') and (`t`.`dgqwg_bmqj` = '1') and (`t`.`bspwg_azlg` = '1') and `t`.`bspwg_bsqx`) then '无' else '有' end) AS `wsjbjsd`,(case when isnull(`b2`.`czlc`) then '' else `b2`.`czlc` end) AS `czlc` from ((`bus_jcb_dmcgyq` `t` left join `base_dmcgyq` `b1` on((`t`.`gyq_id` = `b1`.`id`))) left join `base_dmcgyq` `b2` on(((`b1`.`fxmc` = `b2`.`fxmc`) and (`b1`.`dept_station_id` = `b2`.`dept_station_id`) and (`b1`.`xingbie` = `b2`.`xingbie`) and (`b1`.`sbbh` = 'G4')))) where (`t`.`submit_state` = 9);
  3. CREATE VIEW `v_line` AS select `t`.`id` AS `id`,`t`.`line_id` AS `line_id`,`t`.`dept_id` AS `dept_id`,`l`.`line_name` AS `line_name`,`d`.`dept_name` AS `dept_name` from ((`base_dept_line` `t` left join `base_line` `l` on((`t`.`line_id` = `l`.`line_id`))) left join `sys_dept` `d` on((`t`.`dept_id` = `d`.`dept_id`))) where ((`t`.`del_flag` = 0) and (`l`.`del_flag` = 0) and (`d`.`del_flag` = 0));
  4. CREATE VIEW `v_prevent` AS select `t`.`id` AS `prevent_id`,'防鸟台账' AS `prevent_type`,`v`.`dept_id` AS `dept_id`,`v`.`line_id` AS `line_id`,`t`.`xingbie` AS `xingbie`,`t`.`dept_station_id` AS `dept_station_id`,`t`.`pillar_code` AS `pillar_code`,`t`.`marker` AS `marker`,`t`.`risk_source` AS `risk_source`,`t`.`measures` AS `measures`,`t`.`remark` AS `remark`,'' AS `fill_date`,'' AS `fill_user`,'' AS `pillar_area`,'' AS `pillar_count`,'' AS `line_type`,'' AS `rust_position`,'' AS `pillar_type`,'' AS `terrain`,'' AS `iftransform`,'' AS `specification`,'' AS `display_num`,'' AS `count`,'' AS `distance_horizontal`,'' AS `distance_vertical`,'' AS `kind`,'' AS `severity`,'' AS `property_rights`,'' AS `inquirer`,`t`.`start_marker` AS `start_marker`,`t`.`end_marker` AS `end_marker` from (`base_prevent_bird` `t` left join `v_station` `v` on((`t`.`dept_station_id` = `v`.`dept_station_id`))) where (`t`.`del_flag` = '0') union all select `t`.`id` AS `prevent_id`,'防洪台账' AS `prevent_type`,`v`.`dept_id` AS `dept_id`,`v`.`line_id` AS `line_id`,`t`.`xingbie` AS `xingbie`,`t`.`dept_station_id` AS `dept_station_id`,'' AS `pillar_code`,`t`.`marker` AS `marker`,'' AS `risk_source`,`t`.`measures` AS `measures`,`t`.`remark` AS `remark`,`t`.`fill_date` AS `fill_date`,`t`.`fill_user` AS `fill_user`,`t`.`pillar_area` AS `pillar_area`,`t`.`pillar_count` AS `pillar_count`,`t`.`line_type` AS `line_type`,'' AS `rust_position`,'' AS `pillar_type`,'' AS `terrain`,'' AS `iftransform`,'' AS `specification`,'' AS `display_num`,'' AS `count`,'' AS `distance_horizontal`,'' AS `distance_vertical`,'' AS `kind`,'' AS `severity`,'' AS `property_rights`,'' AS `inquirer`,`t`.`start_marker` AS `start_marker`,`t`.`end_marker` AS `end_marker` from (`base_prevent_flood` `t` left join `v_station` `v` on((`t`.`dept_station_id` = `v`.`dept_station_id`))) where (`t`.`del_flag` = '0') union all select `t`.`id` AS `prevent_id`,'防异物台账' AS `prevent_type`,`v`.`dept_id` AS `dept_id`,`v`.`line_id` AS `line_id`,`t`.`xingbie` AS `xingbie`,`t`.`dept_station_id` AS `dept_station_id`,`t`.`pillar_code` AS `pillar_code`,`t`.`marker` AS `marker`,`t`.`risk_source` AS `risk_source`,`t`.`measures` AS `measures`,`t`.`remark` AS `remark`,'' AS `fill_date`,'' AS `fill_user`,'' AS `pillar_area`,'' AS `pillar_count`,'' AS `line_type`,'' AS `rust_position`,'' AS `pillar_type`,'' AS `terrain`,'' AS `iftransform`,'' AS `specification`,'' AS `display_num`,'' AS `count`,'' AS `distance_horizontal`,'' AS `distance_vertical`,'' AS `kind`,'' AS `severity`,'' AS `property_rights`,'' AS `inquirer`,`t`.`start_marker` AS `start_marker`,`t`.`end_marker` AS `end_marker` from (`base_prevent_foreign` `t` left join `v_station` `v` on((`t`.`dept_station_id` = `v`.`dept_station_id`))) where (`t`.`del_flag` = '0') union all select `t`.`id` AS `prevent_id`,'防冰台账' AS `prevent_type`,`v`.`dept_id` AS `dept_id`,`v`.`line_id` AS `line_id`,`t`.`xingbie` AS `xingbie`,`t`.`dept_station_id` AS `dept_station_id`,`t`.`pillar_code` AS `pillar_code`,`t`.`marker` AS `marker`,`t`.`risk_source` AS `risk_source`,`t`.`measures` AS `measures`,`t`.`remark` AS `remark`,'' AS `fill_date`,'' AS `fill_user`,'' AS `pillar_area`,'' AS `pillar_count`,'' AS `line_type`,'' AS `rust_position`,'' AS `pillar_type`,'' AS `terrain`,'' AS `iftransform`,'' AS `specification`,'' AS `display_num`,'' AS `count`,'' AS `distance_horizontal`,'' AS `distance_vertical`,'' AS `kind`,'' AS `severity`,'' AS `property_rights`,'' AS `inquirer`,`t`.`start_marker` AS `start_marker`,`t`.`end_marker` AS `end_marker` from (`base_prevent_ice` `t` left join `v_station` `v` on((`t`.`dept_station_id` = `v`.`dept_station_id`))) where (`t`.`del_flag` = '0') union all select `t`.`id` AS `prevent_id`,'防锈蚀台账' AS `prevent_type`,`v`.`dept_id` AS `dept_id`,`v`.`line_id` AS `line_id`,`t`.`xingbie` AS `xingbie`,`t`.`dept_station_id` AS `dept_station_id`,`t`.`pillar_code` AS `pillar_code`,`t`.`marker` AS `marker`,`t`.`risk_source` AS `risk_source`,`t`.`measures` AS `measures`,`t`.`remark` AS `remark`,'' AS `fill_date`,'' AS `fill_user`,'' AS `pillar_area`,'' AS `pillar_count`,'' AS `line_type`,`t`.`rust_position` AS `rust_position`,'' AS `pillar_type`,'' AS `terrain`,'' AS `iftransform`,'' AS `specification`,'' AS `display_num`,'' AS `count`,'' AS `distance_horizontal`,'' AS `distance_vertical`,'' AS `kind`,'' AS `severity`,'' AS `property_rights`,'' AS `inquirer`,`t`.`start_marker` AS `start_marker`,`t`.`end_marker` AS `end_marker` from (`base_prevent_rust` `t` left join `v_station` `v` on((`t`.`dept_station_id` = `v`.`dept_station_id`))) where (`t`.`del_flag` = '0') union all select `t`.`id` AS `prevent_id`,'防雷台账' AS `prevent_type`,`v`.`dept_id` AS `dept_id`,`v`.`line_id` AS `line_id`,`t`.`xingbie` AS `xingbie`,`t`.`dept_station_id` AS `dept_station_id`,`t`.`pillar_code` AS `pillar_code`,`t`.`marker` AS `marker`,'' AS `risk_source`,'' AS `measures`,'' AS `remark`,'' AS `fill_date`,'' AS `fill_user`,'' AS `pillar_area`,'' AS `pillar_count`,'' AS `line_type`,'' AS `rust_position`,'' AS `pillar_type`,'' AS `terrain`,'' AS `iftransform`,`t`.`specification` AS `specification`,`t`.`display_num` AS `display_num`,'' AS `count`,'' AS `distance_horizontal`,'' AS `distance_vertical`,'' AS `kind`,'' AS `severity`,'' AS `property_rights`,'' AS `inquirer`,`t`.`start_marker` AS `start_marker`,`t`.`end_marker` AS `end_marker` from (`base_prevent_thunder` `t` left join `v_station` `v` on((`t`.`dept_station_id` = `v`.`dept_station_id`))) where (`t`.`del_flag` = '0') union all select `t`.`id` AS `prevent_id`,'防树台账处' AS `prevent_type`,`v`.`dept_id` AS `dept_id`,`v`.`line_id` AS `line_id`,`t`.`xingbie` AS `xingbie`,`t`.`dept_station_id` AS `dept_station_id`,`t`.`pillar_code` AS `pillar_code`,`t`.`marker` AS `marker`,'' AS `risk_source`,'' AS `measures`,`t`.`remark` AS `remark`,'' AS `fill_date`,'' AS `fill_user`,'' AS `pillar_area`,'' AS `pillar_count`,'' AS `line_type`,'' AS `rust_position`,'' AS `pillar_type`,'' AS `terrain`,'' AS `iftransform`,'' AS `specification`,'' AS `display_num`,`t`.`count` AS `count`,`t`.`distance_horizontal` AS `distance_horizontal`,`t`.`distance_vertical` AS `distance_vertical`,`t`.`kind` AS `kind`,`t`.`severity` AS `severity`,`t`.`property_rights` AS `property_rights`,`t`.`inquirer` AS `inquirer`,`t`.`start_marker` AS `start_marker`,`t`.`end_marker` AS `end_marker` from (`base_prevent_tree` `t` left join `v_station` `v` on((`t`.`dept_station_id` = `v`.`dept_station_id`))) where (`t`.`del_flag` = '0') union all select `t`.`id` AS `prevent_id`,'防风台账' AS `prevent_type`,`v`.`dept_id` AS `dept_id`,`v`.`line_id` AS `line_id`,`t`.`xingbie` AS `xingbie`,`t`.`dept_station_id` AS `dept_station_id`,`t`.`pillar_code` AS `pillar_code`,`t`.`marker` AS `marker`,`t`.`risk_source` AS `risk_source`,`t`.`measures` AS `measures`,`t`.`remark` AS `remark`,'' AS `fill_date`,'' AS `fill_user`,'' AS `pillar_area`,'' AS `pillar_count`,'' AS `line_type`,'' AS `rust_position`,'' AS `pillar_type`,'' AS `terrain`,'' AS `iftransform`,'' AS `specification`,'' AS `display_num`,'' AS `count`,'' AS `distance_horizontal`,'' AS `distance_vertical`,'' AS `kind`,'' AS `severity`,'' AS `property_rights`,'' AS `inquirer`,`t`.`start_marker` AS `start_marker`,`t`.`end_marker` AS `end_marker` from (`base_prevent_wind` `t` left join `v_station` `v` on((`t`.`dept_station_id` = `v`.`dept_station_id`))) where (`t`.`del_flag` = '0');
  5. CREATE VIEW `v_station` AS select `t`.`id` AS `dept_station_id`,`t3`.`station_id` AS `station_id`,`t`.`dept_id` AS `dept_id`,`t3`.`line_id` AS `line_id`,`t1`.`line_name` AS `line_name`,`t2`.`dept_name` AS `dept_name`,`t3`.`station_name` AS `station_name`,`t3`.`station_type` AS `station_type`,`t`.`xingbie` AS `xingbie`,`t`.`qjlc` AS `qjlc`,`t`.`up_start_marker` AS `up_start_marker`,`t`.`up_end_marker` AS `up_end_marker`,`t`.`down_start_marker` AS `down_start_marker`,`t`.`down_end_marker` AS `down_end_marker`,`t`.`dhgds` AS `dhgds`,`t3`.`order_num` AS `order_num` from (((`base_dept_station` `t` left join `base_station` `t3` on((`t`.`station_id` = `t3`.`station_id`))) left join `base_line` `t1` on((`t3`.`line_id` = `t1`.`line_id`))) left join `sys_dept` `t2` on((`t`.`dept_id` = `t2`.`dept_id`))) where ((`t`.`del_flag` = 0) and (`t1`.`del_flag` = 0) and (`t2`.`del_flag` = 0));
  6. CREATE VIEW `v_substation` AS select `t`.`substation_id` AS `substation_id`,`t`.`dept_id` AS `dept_id`,`t`.`line_id` AS `line_id`,`t1`.`line_name` AS `line_name`,`t2`.`dept_name` AS `dept_name`,`t0`.`substation_name` AS `substation_name`,`t0`.`order_num` AS `order_num` from (((`base_dept_substation` `t` left join `base_substation` `t0` on((`t`.`substation_id` = `t0`.`substation_id`))) left join `base_line` `t1` on((`t`.`line_id` = `t1`.`line_id`))) left join `sys_dept` `t2` on((`t`.`dept_id` = `t2`.`dept_id`))) where ((`t0`.`del_flag` = 0) and (`t1`.`del_flag` = 0) and (`t2`.`del_flag` = 0));