You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tcZz-java/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/ScreenMapper.xml

66 lines
3.7 KiB

<?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.ruoyi.tcZz.mapper.ScreenMapper">
<select id="getScreenSupervision" resultType="com.ruoyi.tcZz.domain.reponse.ScreenSupervisionResponse">
SELECT *
FROM (SELECT COUNT(*) AS count FROM tc_dbxt WHERE isStatus=1 and area_id=1) count,
(SELECT COUNT(*) AS count1 FROM tc_dbdw WHERE isStatus = 1 and area_id=1) count1,
(SELECT COUNT(*) AS count2 FROM tc_zfwz WHERE isStatus = 1 and area_id=1) count2,
(SELECT COUNT(*) AS count3 FROM tc_jgdw WHERE isStatus = 1 and area_id=1 and type =1) count3,
(SELECT COUNT(*) AS count5 FROM tc_jgdw WHERE isStatus = 1 and area_id=1 and type =2) count5,
(SELECT COUNT(*) AS count4 FROM tc_idcdw WHERE isStatus = 1 and area_id=1) count4;
</select>
<select id="getScreenSource" resultType="com.ruoyi.tcZz.domain.reponse.ScreenSourceResponse">
SELECT *
FROM (SELECT COUNT(*) AS count FROM tc_sjly where type =1 and area_id=1) count,
(SELECT COUNT(*) AS count1 FROM tc_sjly where type=2 and area_id=1) count1,
(SELECT COUNT(*) AS count2 FROM tc_xtjc where area_id=1) count2;
</select>
<select id="getScreenOpinionReport" resultType="com.ruoyi.tcZz.domain.reponse.ScreenOpinionReportResponse">
SELECT *
FROM (SELECT COUNT(*) AS count FROM tc_yqbg where type =1 and isStatus=1 and area_id=1) count,
(SELECT COUNT(*) AS count1 FROM tc_yqbg where type=2 and isStatus=1 and area_id=1) count1,
(SELECT COUNT(*) AS count2 FROM tc_yqbg where type=3 and isStatus=1 and area_id=1) count2,
(SELECT COUNT(*) AS count3 FROM tc_yqbg where type=4 and isStatus=1 and area_id=1) count3,
(SELECT COUNT(*) AS count4 FROM tc_yqbg where type=5 and isStatus=1 and area_id=1) count4;
</select>
<select id="getScreenArticles" resultType="com.ruoyi.tcZz.domain.reponse.ScreenArticlesResponse">
SELECT *
FROM (SELECT COUNT(*) AS count FROM tc_wpwzlyqk where type =1 and isStatus=1 and area_id =1) count,
(SELECT COUNT(*) AS count1 FROM tc_wpwzlyqk where type=2 and isStatus=1 and area_id =1) count1,
(SELECT COUNT(*) AS count2 FROM tc_wpwzlyqk where type=3 and isStatus=1 and area_id =1) count2;
</select>
<select id="getScreenQinglang" resultType="com.ruoyi.tcZz.domain.reponse.ScreenQinglangWeifanResponse">
select count1,date_time as dateTime from tc_qlzxxdsjtj order by date_time desc
</select>
<select id="getScreenQinglangWeigui"
resultType="com.ruoyi.tcZz.domain.reponse.ScreenQinglangWeiguiResponse">
select count2,date_time as dateTime from tc_qlzxxdsjtj order by date_time desc limit 12
</select>
<select id="getScreenTerritorial" resultType="com.ruoyi.tcZz.domain.reponse.ScreenTerritorialResponse">
SELECT
COUNT(*) AS count,
area,
COUNT(*) * 100.0 / SUM(COUNT(*)) OVER() AS percentage
FROM
tc_sdtb where isStatus =1
GROUP BY
area;
</select>
<select id="getScreenDept" resultType="com.ruoyi.tcZz.domain.reponse.ScreenDeptResponse">
select COUNT(*) AS count,dep_name as depName from tc_bmtb where isStatus =1 GROUP BY dep_name
</select>
<select id="getScreenReportMap" resultType="com.ruoyi.tcZz.domain.reponse.ScreenReportMapResponse">
SELECT COUNT(*) AS count,
SUM(CASE WHEN state = 2 THEN 1 ELSE 0 END) * 100.0 / COUNT(*) AS rate
FROM
tc_jbmap;
</select>
<select id="getScreenDepartment" resultType="com.ruoyi.tcZz.domain.reponse.ScreenDepartmentResponse">
select count(*)as count ,dep_name as depName from tc_zbxq group by dep_name
</select>
</mapper>