123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.sooka.sponest.data.index.mapper.IndexViewMapper">
- <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" resultMap="MenuInfoResultMap">
- SELECT
- SUBSTRING_INDEX(center_type, ':', 1) AS subclassS,
- SUBSTRING_INDEX(center_type, ':', -1) AS tableNameAndType
- FROM
- ${database_system}.sys_menu
- WHERE
- menu_type = 'C'
- AND status = 0
- AND front_type = 'front_type_data'
- AND center_type IS NOT NULL;
- </select>
- <select id="getBasicDataCount" parameterType="MenuInfo" resultType="Long">
- SELECT count(*) FROM
- ${tableName}
- <where>
- <if test="type != null and type != ''">and type = #{type}</if>
- </where>
- </select>
- <!--一网通办统计数据-->
- <select id="getOneTongData" resultType="Map">
- SELECT SUM(t2.hall_processing_total_number) AS totalProcessing,
- SUM(t1.legal_person_completion_number) AS completionNumber,
- SUM(t1.legal_person_processing_number) AS processingNumber,
- SUM(t1.natural_person_completion_number) AS naturalCompletionNumber,
- SUM(t1.natural_person_processing_number) AS naturalProcessingNumber
- FROM centerdata_t_forest_networkprocessing t1
- INNER JOIN (SELECT dept_id,
- MAX(time) AS max_time,
- SUM(hall_processing_total_number) AS hall_processing_total_number
- FROM centerdata_t_forest_networkprocessing
- WHERE dept_id IN ( 365, 369,370,371,372,373 )
- GROUP BY dept_id ) t2
- ON t1.dept_id = t2.dept_id AND t1.time = t2.max_time;
- </select>
- <select id="getForestry" resultType="java.util.Map">
- select '水源渠道' name ,count(*) value from centerdata_t_forest_channel a
- union all
- select '森林防火队' name ,count(*) value from centerdata_t_forest_fireteam a
- union all
- select '珍稀古树' name ,count(*) value from centerdata_t_forest_trees a
- </select>
- <select id="getAgriculture" resultType="java.util.Map">
- select '农民合作社' name ,count(*) value from centerdata_t_farm_agricultural_cooperatives a
- union all
- select '农业推广总站' name ,count(*) value from centerdata_t_farm_botany_protect_info a
- union all
- select '备案畜禽规模养殖场' name ,count(*) value from centerdata_t_farm_filings_livestock a
- union all
- select '种畜禽养殖场' name ,count(*) value from centerdata_t_farm_livestock a
- union all
- select '区域性粪污处置中心' name ,count(*) value from centerdata_t_farm_excrement_dispose a
- union all
- select '肉牛基层繁改站' name ,count(*) value from centerdata_t_farm_complex_modification a
- union all
- select '棚膜信息' name ,count(*) value from centerdata_t_farm_greenhouse_film a
- </select>
- <select id="getEnvironmental" resultType="java.util.Map">
- select '重点企业' name ,count(*) value from centerdata_t_environment_key_enterprise a
- union all
- select '排污口' name ,count(*) value from centerdata_t_environment_sewage_outlet a
- </select>
- <select id="getEmergency" resultType="java.util.Map">
- select '应急仓库' name ,count(*) value from centerdata_t_emergency_warehouse a
- union all
- select '应急队伍' name ,count(*) value from centerdata_t_emergency_team a
- union all
- select '危化企业' name ,count(*) value from centerdata_t_emergency_idlh_enterprises a
- </select>
- <select id="getTraffic" resultType="java.util.Map">
- select '桥梁' name ,count(*) value from centerdata_t_traffic_bridge a
- union all
- select '涵洞' name ,count(*) value from centerdata_t_traffic_culvert a
- union all
- select '警示牌' name ,count(*) value from centerdata_t_traffic_warning_sign a
- </select>
- <select id="getResources" resultType="java.util.Map">
- select '矿产' name ,count(*) value from centerdata_t_resources_deposit a
- union all
- select '地质灾害点' name ,count(*) value from centerdata_t_resources_geologic_hazard a
- </select>
- <select id="getFire" resultType="java.util.Map">
- select '取水口' name ,count(*) value from centerdata_t_forest_waterintake a
- union all
- select '水鹤' name ,count(*) value from centerdata_t_forest_watercrane a
- union all
- select '消防力量' name ,count(*) value from centerdata_t_firecontrol_fire_force a
- union all
- select '重点场所' name ,count(*) value from centerdata_t_firecontrol_fire_key_places a
- union all
- select '基本联动力量' name ,count(*) value from centerdata_t_firecontrol_basic_linkage_force a
- union all
- select '其他联动力量' name ,count(*) value from centerdata_t_firecontrol_other_linkage_force a
- union all
- select '泡沫液' name ,count(*) value from centerdata_t_firecontrol_foam_liquid a
- union all
- select '专职站' name ,count(*) value from centerdata_t_firecontrol_fulltime_station a
- union all
- select '地上消火栓' name ,count(*) value from centerdata_t_forest_firehydrant a where firehydrant_type = 'firehydrant_1'
- </select>
- <select id="getNum" resultType="java.lang.Integer">
- select sum(a.value)
- from(
- select count(id) value from centerdata_t_forest_channel a
- union all
- select count(id) value from centerdata_t_forest_fireteam a
- union all
- select count(id) value from centerdata_t_forest_trees a
- union all
- select count(id) value from centerdata_t_farm_agricultural_cooperatives a
- union all
- select count(id) value from centerdata_t_farm_botany_protect_info a
- union all
- select count(id) value from centerdata_t_farm_filings_livestock a
- union all
- select count(id) value from centerdata_t_farm_livestock a
- union all
- select count(id) value from centerdata_t_farm_excrement_dispose a
- union all
- select count(id) value from centerdata_t_farm_complex_modification a
- union all
- select count(id) value from centerdata_t_farm_greenhouse_film a
- union all
- select count(id) value from centerdata_t_environment_key_enterprise a
- union all
- select count(id) value from centerdata_t_environment_sewage_outlet a
- union all
- select count(id) value from centerdata_t_emergency_warehouse a
- union all
- select count(id) value from centerdata_t_emergency_team a
- union all
- select count(id) value from centerdata_t_emergency_idlh_enterprises a
- union all
- select count(id) value from centerdata_t_traffic_bridge a
- union all
- select count(id) value from centerdata_t_traffic_culvert a
- union all
- select count(id) value from centerdata_t_traffic_warning_sign a
- union all
- select count(id) value from centerdata_t_resources_deposit a
- union all
- select count(id) value from centerdata_t_resources_geologic_hazard a
- union all
- select count(id) value from centerdata_t_forest_waterintake a
- union all
- select count(id) value from centerdata_t_forest_watercrane a
- union all
- select count(id) value from centerdata_t_firecontrol_fire_force a
- union all
- select count(id) value from centerdata_t_firecontrol_fire_key_places a
- union all
- select count(id) value from centerdata_t_firecontrol_basic_linkage_force a
- union all
- select count(id) value from centerdata_t_firecontrol_other_linkage_force a
- union all
- select count(id) value from centerdata_t_firecontrol_foam_liquid a
- union all
- select count(id) value from centerdata_t_firecontrol_fulltime_station a
- union all
- select count(id) value from centerdata_t_forest_firehydrant a where firehydrant_type = 'firehydrant_1'
- ) a
- </select>
- <select id="getSiZhangData" resultType="Map">
- select '河长' name, 'hezhang' nickname,count(distinct (user_id))
- value from centerdata_t_hydraulic_river_length
- where type ='2'
- union all
- select '路长' name,'luzhang',count(distinct (user_id))
- from centerdata_t_hydraulic_river_length
- where type ='3'
- union all
- select '田长' name,'tianzhang',count(distinct (user_id))
- from centerdata_t_hydraulic_river_length
- where type ='6'
- union all
- select '林长' name,'linzhang',count(distinct user_id)
- from centerdata_t_forest_linleader
- where lin_job != 'forest_lin_jy'
- </select>
- <select id="getAllData" resultType="map">
- select '林业林块' name,count(*) value from centerdata_t_supermap_level
- where type ='1'
- union all
- select '水利河段' name,count(*) value from centerdata_t_supermap_level
- where type ='2'
- union all
- select '交通路段' name,count(*) value from centerdata_t_supermap_level
- where type ='3'
- union all
- select '农业田块' name,count(*) value from centerdata_t_supermap_level
- where type ='6'
- </select>
- <select id="keyMonitoringAreas" resultType="java.util.Map">
- select '重点工程' name,count(*) value from centerdata_t_key_projects
- union all
- select b.dict_label name,count(a.project_type) num from onest_data.centerdata_t_forest_importarea a
- left join onest_system.sys_dict_data b on a.project_type = b.dict_value where b.dict_type = 'area_type'
- and (b.dict_value = 'area_type0' or b.dict_value = 'area_type3' or b.dict_value = 'area_type2' or b.dict_value = 'area_type4' )
- GROUP BY a.project_type
- </select>
- <select id="getMessage" resultType="java.util.Map">
- select 'forestChannel' name ,count(*) num from centerdata_t_forest_channel a
- union all
- select 'forestFireteam' name ,count(*) num from centerdata_t_forest_fireteam a
- union all
- select 'forestTrees' name ,count(*) num from centerdata_t_forest_trees a
- union all
- select 'farmAgriculturalCooperatives' name ,count(*) num from centerdata_t_farm_agricultural_cooperatives a
- union all
- select 'farmBotanyProtectInfo' name ,count(*) num from centerdata_t_farm_botany_protect_info a
- union all
- select 'farmFilingsLivestock' name ,count(*) num from centerdata_t_farm_filings_livestock a
- union all
- select 'farmLivestock' name ,count(*) num from centerdata_t_farm_livestock a
- union all
- select 'farmExcrementDispose' name ,count(*) num from centerdata_t_farm_excrement_dispose a
- union all
- select 'farmComplexModification' name ,count(*) num from centerdata_t_farm_complex_modification a
- union all
- select 'farmGreenhouseFilm' name ,count(*) num from centerdata_t_farm_greenhouse_film a
- union all
- select 'environmentKeyEnterprise' name ,count(*) num from centerdata_t_environment_key_enterprise a
- union all
- select 'environmentSewageOutlet' name ,count(*) num from centerdata_t_environment_sewage_outlet a
- union all
- select 'emergencyWarehouse' name ,count(*) num from centerdata_t_emergency_warehouse a
- union all
- select 'emergencyTeam' name ,count(*) num from centerdata_t_emergency_team a
- union all
- select 'emergencyIdlhEnterprises' name ,count(*) num from centerdata_t_emergency_idlh_enterprises a
- union all
- select 'trafficBridge' name ,count(*) num from centerdata_t_traffic_bridge a
- union all
- select 'trafficCulvert' name ,count(*) num from centerdata_t_traffic_culvert a
- union all
- select 'trafficWarningSign' name ,count(*) num from centerdata_t_traffic_warning_sign a
- union all
- select 'resourcesDeposit' name ,count(*) num from centerdata_t_resources_deposit a
- union all
- select 'resourcesGeologicHazard' name ,count(*) num from centerdata_t_resources_geologic_hazard a
- union all
- select 'forestWaterintake' name ,count(*) num from centerdata_t_forest_waterintake a
- union all
- select 'forestWatercrane' name ,count(*) num from centerdata_t_forest_watercrane a
- union all
- select 'firecontrolFireForce' name ,count(*) num from centerdata_t_firecontrol_fire_force a
- union all
- select 'firecontrolFireKeyPlaces' name ,count(*) num from centerdata_t_firecontrol_fire_key_places a
- union all
- select 'firecontrolBasicLinkageForce' name ,count(*) num from centerdata_t_firecontrol_basic_linkage_force a
- union all
- select 'firecontrolOtherLinkageForce' name ,count(*) num from centerdata_t_firecontrol_other_linkage_force a
- union all
- select 'firecontrolFoamLiquid' name ,count(*) num from centerdata_t_firecontrol_foam_liquid a
- union all
- select 'firecontrolFulltimeStation' name ,count(*) num from centerdata_t_firecontrol_fulltime_station a
- union all
- select 'forestFirehydrant' name ,count(*) num from centerdata_t_forest_firehydrant a where firehydrant_type = 'firehydrant_1'
- union all
- select 'keyProjects' name,count(*) num from centerdata_t_key_projects
- union all
- select REPLACE(b.dict_value, '_', '') name,count(a.id) num from onest_system.sys_dict_data b
- left join onest_data.centerdata_t_forest_importarea a on a.project_type = b.dict_value
- where b.dict_type = 'area_type' and (b.dict_value = 'area_type0' or b.dict_value = 'area_type3' or b.dict_value = 'area_type2' or b.dict_value = 'area_type4' )
- group by b.dict_value
- union all
- select 'KeyMonitoringAreas' name ,sum(a.num) num from
- (select 'keyProjects' name,count(*) num from centerdata_t_key_projects
- union all
- select REPLACE(b.dict_value, '_', '') name,count(a.project_type) num from onest_data.centerdata_t_forest_importarea a
- left join onest_system.sys_dict_data b on a.project_type = b.dict_value where b.dict_type = 'area_type'
- and (b.dict_value = 'area_type0' or b.dict_value = 'area_type3' or b.dict_value = 'area_type2' or b.dict_value = 'area_type4' )
- GROUP BY a.project_type) a
- union all
- select 'VariousResourceData' name , sum(a.num) from (
- select 'forestChannel' name ,count(*) num from centerdata_t_forest_channel a
- union all
- select 'forestFireteam' name ,count(*) num from centerdata_t_forest_fireteam a
- union all
- select 'forestTrees' name ,count(*) num from centerdata_t_forest_trees a
- union all
- select 'farmAgriculturalCooperatives' name ,count(*) num from centerdata_t_farm_agricultural_cooperatives a
- union all
- select 'farmBotanyProtectInfo' name ,count(*) num from centerdata_t_farm_botany_protect_info a
- union all
- select 'farmFilingsLivestock' name ,count(*) num from centerdata_t_farm_filings_livestock a
- union all
- select 'farmLivestock' name ,count(*) num from centerdata_t_farm_livestock a
- union all
- select 'farmExcrementDispose' name ,count(*) num from centerdata_t_farm_excrement_dispose a
- union all
- select 'farmComplexModification' name ,count(*) num from centerdata_t_farm_complex_modification a
- union all
- select 'farmGreenhouseFilm' name ,count(*) num from centerdata_t_farm_greenhouse_film a
- union all
- select 'environmentKeyEnterprise' name ,count(*) num from centerdata_t_environment_key_enterprise a
- union all
- select 'environmentSewageOutlet' name ,count(*) num from centerdata_t_environment_sewage_outlet a
- union all
- select 'emergencyWarehouse' name ,count(*) num from centerdata_t_emergency_warehouse a
- union all
- select 'emergencyTeam' name ,count(*) num from centerdata_t_emergency_team a
- union all
- select 'emergencyIdlhEnterprises' name ,count(*) num from centerdata_t_emergency_idlh_enterprises a
- union all
- select 'trafficBridge' name ,count(*) num from centerdata_t_traffic_bridge a
- union all
- select 'trafficCulvert' name ,count(*) num from centerdata_t_traffic_culvert a
- union all
- select 'trafficWarningSign' name ,count(*) num from centerdata_t_traffic_warning_sign a
- union all
- select 'resourcesDeposit' name ,count(*) num from centerdata_t_resources_deposit a
- union all
- select 'resourcesGeologicHazard' name ,count(*) num from centerdata_t_resources_geologic_hazard a
- union all
- select 'forestWaterintake' name ,count(*) num from centerdata_t_forest_waterintake a
- union all
- select 'forestWatercrane' name ,count(*) num from centerdata_t_forest_watercrane a
- union all
- select 'firecontrolFireForce' name ,count(*) num from centerdata_t_firecontrol_fire_force a
- union all
- select 'firecontrolFireKeyPlaces' name ,count(*) num from centerdata_t_firecontrol_fire_key_places a
- union all
- select 'firecontrolBasicLinkageForce' name ,count(*) num from centerdata_t_firecontrol_basic_linkage_force a
- union all
- select 'firecontrolOtherLinkageForce' name ,count(*) num from centerdata_t_firecontrol_other_linkage_force a
- union all
- select 'firecontrolFoamLiquid' name ,count(*) num from centerdata_t_firecontrol_foam_liquid a
- union all
- select 'firecontrolFulltimeStation' name ,count(*) num from centerdata_t_firecontrol_fulltime_station a
- union all
- select 'forestFirehydrant' name ,count(*) num from centerdata_t_forest_firehydrant a where firehydrant_type = 'firehydrant_1')a
- </select>
- </mapper>
|