|
@@ -4,185 +4,30 @@
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.sooka.sponest.data.index.mapper.IndexViewMapper">
|
|
|
|
|
|
- <resultMap id="IndexViewInfoResultMap" type="com.sooka.sponest.data.index.domain.IndexViewInfo">
|
|
|
- <result property="category" column="category"/>
|
|
|
- <result property="subclass" column="subclass"/>
|
|
|
- <result property="count" column="count"/>
|
|
|
+ <resultMap id="MenuInfoResultMap" type="com.sooka.sponest.data.index.domain.MenuInfo">
|
|
|
+ <result property="subclassS" column="subclassS"/>
|
|
|
+ <result property="tableNameAndType" column="tableNameAndType"/>
|
|
|
</resultMap>
|
|
|
-
|
|
|
- <select id="getBasicDataList" parameterType="String" resultType="Long">
|
|
|
- SELECT count(u2.menu_id) AS subclass
|
|
|
- FROM(
|
|
|
- SELECT
|
|
|
- @ids AS parent_id,
|
|
|
- (SELECT @ids := GROUP_CONCAT(menu_id) FROM ${database_system}.sys_menu WHERE FIND_IN_SET(parent_id, @ids)) AS c_ids,
|
|
|
- @l := @l+1 AS LEVEL
|
|
|
- FROM ${database_system}.sys_menu, (SELECT @ids := #{menuId}, @l := 0 ) b
|
|
|
- WHERE @ids IS NOT NULL
|
|
|
- ) u1
|
|
|
- JOIN ${database_system}.sys_menu u2
|
|
|
- ON FIND_IN_SET(u2.menu_id, u1.parent_id) where u2.menu_id != #{menuId} AND u2.menu_type = 'C' AND STATUS = 0 AND front_type = 'front_type_data' AND u2.menu_name NOT LIKE '%统计%' AND u2.menu_name NOT LIKE '%台账%'
|
|
|
- <!-- 排除林业林业巡查计划、任务、轨迹,植树造林区域、计划、任务管理、任务反馈、工作统计,野生动物统计、监测台账、林业网格层级、林长管理、林班数据图层层级、林班数据图层 -->
|
|
|
- <if test="menuId == 1089">AND u2.menu_id NOT IN (2745,2751,2903,1121,1127,2608,2602,2629,2676,2675,2776,1199,2891,2897)</if>
|
|
|
- <!-- 排除农业秸秆还田统计、台账 -->
|
|
|
- <if test="menuId == 2357">AND u2.menu_id NOT IN (1903,1904)</if>
|
|
|
- <!-- 排除水利巡查计划、任务、轨迹、督导检查、保洁员、网格、河长名录 -->
|
|
|
- <if test="menuId == 2456">AND u2.menu_id NOT IN (2560,2566,3157,2677,2542,3095,2554)</if>
|
|
|
- <!-- 排除环保巡查计划、任务、轨迹、环保人员,秸秆离田台账、统计 -->
|
|
|
- <if test="menuId == 2073">AND u2.menu_id NOT IN (2702,2708,3193,2770,1906,1907)</if>
|
|
|
- <!-- 排除交通巡查计划、任务、轨迹、交通人员、网格、路长 -->
|
|
|
- <if test="menuId == 2360">AND u2.menu_id NOT IN (2688,2694,3163,2758,3101,2873)</if>
|
|
|
- <!-- 排除资源巡查计划、任务、轨迹、资源人员、田长制-网格、田长 -->
|
|
|
- <if test="menuId == 2386">AND u2.menu_id NOT IN (2730,2736,3169,2596,2432,2444)</if>
|
|
|
- <!-- 排除消防巡查计划、任务、轨迹、消防人员 -->
|
|
|
- <if test="menuId == 2074">AND u2.menu_id NOT IN (2716,2722,3187,2762)</if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <!-- 林业数据条数 -->
|
|
|
- <select id="getForestCount" resultType="Long">
|
|
|
- SELECT
|
|
|
- sum( a ) count
|
|
|
- FROM
|
|
|
- ( SELECT count(*) a FROM centerdata_t_forest_animal
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_forest_resources
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_forest_landing
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_forest_channel
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_forest_fireteam
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_forest_trees
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_forest_changbrand
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_supermap_level WHERE type = '1'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_forest_keyfireproofplots
|
|
|
- ) AS temporary_tables;
|
|
|
- </select>
|
|
|
-
|
|
|
- <!-- 应急数据条数 -->
|
|
|
- <select id="getEmergencyCount" resultType="Long">
|
|
|
- SELECT
|
|
|
- sum( a ) count
|
|
|
- FROM
|
|
|
- ( SELECT count(*) a FROM centerdata_t_emergency_material
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_emergency_team
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_emergency_warehouse
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_emergency_idlh_enterprises
|
|
|
- ) AS temporary_tables;
|
|
|
- </select>
|
|
|
-
|
|
|
- <!-- 环保数据条数 -->
|
|
|
- <select id="getEnvironmentCount" resultType="Long">
|
|
|
- SELECT
|
|
|
- sum( a ) count
|
|
|
- FROM
|
|
|
- ( SELECT count(*) a FROM centerdata_t_environment_source_pollution
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_environment_key_enterprise
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_environment_source_pollution
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_environment_sewage_outlet
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_environment_water_monitor
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_straw_leave_field WHERE del_flag = '0'
|
|
|
- ) AS temporary_tables;
|
|
|
- </select>
|
|
|
-
|
|
|
- <!-- 消防数据条数 -->
|
|
|
- <select id="getFirecontrolCount" resultType="Long">
|
|
|
+ <select id="getBasicDataList" parameterType="String" resultMap="MenuInfoResultMap">
|
|
|
SELECT
|
|
|
- sum( a ) count
|
|
|
+ SUBSTRING_INDEX(center_type, ':', 1) AS subclassS,
|
|
|
+ SUBSTRING_INDEX(center_type, ':', -1) AS tableNameAndType
|
|
|
FROM
|
|
|
- ( SELECT count(*) a FROM centerdata_t_firecontrol_fire_force
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_fire_key_places
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_fire_pressure_sensor
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_other_linkage_force
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_basic_linkage_force
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_foam_liquid
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_firecontrol_fulltime_station
|
|
|
- <!-- 消防在原有的基础上将基础数据-取水口、水鹤、消火栓纳入消防 -->
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_forest_waterintake
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_forest_watercrane
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_forest_firehydrant
|
|
|
- ) AS temporary_tables;
|
|
|
+ ${database_system}.sys_menu
|
|
|
+ WHERE
|
|
|
+ menu_type = 'C'
|
|
|
+ AND status = 0
|
|
|
+ AND visible = 0
|
|
|
+ AND front_type = 'front_type_data'
|
|
|
+ AND center_type IS NOT NULL;
|
|
|
</select>
|
|
|
|
|
|
- <!-- 农业数据条数 -->
|
|
|
- <select id="getFarmCount" resultType="Long">
|
|
|
- SELECT
|
|
|
- sum( a ) count
|
|
|
- FROM
|
|
|
- ( SELECT count(*) a FROM centerdata_t_straw_still_field
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_agricultural_cooperatives WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_botany_protect_info WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_seed_info WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_chemical_fertilizer_info WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_plant_info WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_subsidy_info WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_contract_management WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_foodstuff_along
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_enterprise
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_filings_livestock
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_pesticide_information
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_livestock
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_village_animal_prevention
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_autumn_harvest_schedule
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_seeding_progress
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_seedling_progress
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_sowing_schedule
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_agricultural_supervise
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_technology_train
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_excrement_dispose WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_complex_modification WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_greenhouse_film WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_trashcan
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_garbage_transfer
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_cesspit_collect
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_breeding_farm
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_agricultural_machinery_info WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_machinery_info WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_implements_info WHERE del_flag = '0'
|
|
|
- ) AS temporary_tables;
|
|
|
- </select>
|
|
|
-
|
|
|
- <!-- 交通数据条数 -->
|
|
|
- <select id="getTrafficCount" resultType="Long">
|
|
|
- SELECT
|
|
|
- sum( a ) count
|
|
|
- FROM
|
|
|
- ( SELECT count(*) a FROM centerdata_t_traffic_warning_sign
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_traffic_transportation_hub
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_traffic_bridge
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_traffic_culvert
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_supermap_level WHERE type = '3'
|
|
|
- ) AS temporary_tables;
|
|
|
- </select>
|
|
|
-
|
|
|
- <!-- 资源数据条数 -->
|
|
|
- <select id="getResourcesCount" resultType="Long">
|
|
|
- SELECT
|
|
|
- sum( a ) count
|
|
|
- FROM
|
|
|
- ( SELECT count(*) a FROM centerdata_t_resources_illegal_construction
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_resources_geologic_hazard
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_resources_deposit
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_farm_basic_farmland WHERE del_flag = '0'
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_resources_land_info
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_supermap_level WHERE type = '6'
|
|
|
- ) AS temporary_tables;
|
|
|
- </select>
|
|
|
-
|
|
|
- <!-- 水利数据条数 -->
|
|
|
- <select id="getHydraulicCount" resultType="Long">
|
|
|
- SELECT
|
|
|
- sum( a ) count
|
|
|
- FROM
|
|
|
- ( SELECT count(*) a FROM centerdata_t_hydraulic_channel_blueline
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_battlefield
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_garbage_station
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_reach
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_reservoir
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_river
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_outlet_sewage
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_wade_bridge_culvert
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_water_gate
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_water_project
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_hydraulic_river_hechang
|
|
|
- UNION ALL SELECT count(*) a FROM centerdata_t_supermap_level WHERE type = '2'
|
|
|
- ) AS temporary_tables;
|
|
|
+ <select id="getBasicDataCount" parameterType="MenuInfo" resultType="Long">
|
|
|
+ SELECT count(*) FROM
|
|
|
+ ${tableName}
|
|
|
+ <where>
|
|
|
+ <if test="type != null and type != ''">and type = #{type}</if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
<!--一网通办统计数据-->
|