@ -3,7 +3,17 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace= "com.ruoyi.tcZz.mapper.ScreenMapper" >
<resultMap type= "TcCy" id= "TcCyResult" >
<result property= "id" column= "id" />
<result property= "cyName" column= "cy_name" />
<result property= "cyCount" column= "cy_count" />
<result property= "createBy" column= "create_by" />
<result property= "createTime" column= "create_time" />
<result property= "updateBy" column= "update_by" />
<result property= "updateTime" column= "update_time" />
<result property= "remark" column= "remark" />
<result property= "areaId" column= "area_id" />
</resultMap>
<select id= "getScreenSupervision" resultType= "com.ruoyi.tcZz.domain.reponse.ScreenSupervisionResponse" >
SELECT *
FROM (SELECT COUNT(*) AS count FROM tc_dbxt WHERE isStatus=1) count,
@ -34,13 +44,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(SELECT COUNT(*) AS count2 FROM tc_wpwzlyqk where type=3 and isStatus=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="getScreenQinglang" resultType="com.ruoyi.tcZz.domain.reponse.ScreenQinglangWeifanResponse"> -->
<!-- select count1,date_time as dateTime from tc_qlzxxdsjtj -->
<!-- where date_time >= DATE_SUB(CURDATE(), INTERVAL 6 MONTH) -->
<!-- AND date_time < DATE_FORMAT(CURDATE(), '%Y - %m - 01') 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,
@ -63,4 +75,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<select id= "screenQinglang" resultType= "com.ruoyi.tcZz.domain.reponse.ScreenQinglangResponse" >
SELECT
SUM( count1 ) AS count1,
SUM( count2 ) AS count2,
DATE_FORMAT( date_time, '%Y-%m' ) AS dateTime
FROM
tc_qlzxxdsjtj
WHERE
date_time >= DATE_SUB( CURDATE(), INTERVAL 6 MONTH )
AND date_time < DATE_FORMAT( CURDATE(), '%Y-%m-01' )
GROUP BY
dateTime
ORDER BY
dateTime desc
</select>
<select id= "getAllCy" resultMap= "TcCyResult" >
select * from tc_cy
</select>
</mapper>