添加功能
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<if test="industry != null and industry != ''">
|
||||
AND AAB022 LIKE #{industry} || '%'
|
||||
</if>
|
||||
-- 未注销就业登记
|
||||
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
</sql>
|
||||
|
||||
@@ -87,10 +87,8 @@
|
||||
SELECT
|
||||
m.month_num,
|
||||
y.year_offset,
|
||||
(make_timestamp(p.current_year - y.year_offset, 1, 1, 0, 0, 0)
|
||||
- (m.month_num - 1) * INTERVAL '1 year') AS start_time,
|
||||
(make_timestamp(p.current_year - y.year_offset , 12, 31, 23, 59, 59)
|
||||
- (m.month_num - 1) * INTERVAL '1 year') AS end_time
|
||||
(make_timestamp(p.current_year - y.year_offset - month_num + 1, 1, 1, 0, 0, 0) ) AS start_time,
|
||||
(make_timestamp(p.current_year - y.year_offset - month_num + 1 , 12, 31, 23, 59, 59) ) AS end_time
|
||||
FROM params p
|
||||
CROSS JOIN (SELECT 0 AS year_offset UNION ALL SELECT 1) y
|
||||
CROSS JOIN (SELECT generate_series(1, 5) AS month_num) m
|
||||
@@ -111,14 +109,14 @@
|
||||
<if test="industry != null and industry != ''">
|
||||
AND AAB022 LIKE #{industry} || '%'
|
||||
</if>
|
||||
-- 未注销就业登记
|
||||
|
||||
AND (ABE585 IS NULL OR ABE585 > r.end_time)
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) AS code,
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) AS sort,
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) || '年' AS desc,
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) || '年' AS "desc",
|
||||
COALESCE(current_count, 0) AS currentCount,
|
||||
COALESCE(last_count, 0) AS lastYearCount
|
||||
FROM aggregated_data
|
||||
@@ -160,14 +158,14 @@
|
||||
<if test="industry != null and industry != ''">
|
||||
AND AAB022 LIKE #{industry} || '%'
|
||||
</if>
|
||||
-- 未注销就业登记
|
||||
|
||||
AND (ABE585 IS NULL OR ABE585 > r.end_time)
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
month_num AS code,
|
||||
month_num AS sort,
|
||||
'第' || month_num || '季度' AS desc,
|
||||
'第' || month_num || '季度' AS "desc",
|
||||
COALESCE(current_count, 0) AS currentCount,
|
||||
COALESCE(last_count, 0) AS lastYearCount
|
||||
FROM aggregated_data
|
||||
@@ -209,14 +207,14 @@
|
||||
<if test="industry != null and industry != ''">
|
||||
AND AAB022 LIKE #{industry} || '%'
|
||||
</if>
|
||||
-- 未注销就业登记
|
||||
|
||||
AND (ABE585 IS NULL OR ABE585 > r.end_time)
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
month_num AS code,
|
||||
month_num AS sort,
|
||||
month_num || '月' AS desc,
|
||||
month_num || '月' AS "desc",
|
||||
COALESCE(current_count, 0) AS currentCount,
|
||||
COALESCE(last_count, 0) AS lastYearCount
|
||||
FROM aggregated_data
|
||||
|
||||
@@ -0,0 +1,454 @@
|
||||
<?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.cms.mapper.ThemeGraduateInfoMapper">
|
||||
|
||||
<!--公共条件 -->
|
||||
<sql id="commonConditions">
|
||||
|
||||
AAC181 BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="area != null and area != ''">
|
||||
AND AAB299 = #{area}
|
||||
</if>
|
||||
<if test="universityType != null and universityType != ''">
|
||||
AND AAC046 = #{universityType}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="queryGraduateCount"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.lang.Long">
|
||||
|
||||
SELECT COUNT(DISTINCT AAC044)
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryEmploymentCount"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.lang.Long">
|
||||
|
||||
SELECT COUNT(DISTINCT AAC044)
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
</select>
|
||||
|
||||
<select id="queryAverageSalary"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.math.BigDecimal">
|
||||
|
||||
SELECT COALESCE(ROUND(AVG(ACC328), 2), 0)
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
</select>
|
||||
|
||||
<select id="queryFurtherEducationCount"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.lang.Long">
|
||||
|
||||
SELECT COUNT(DISTINCT AAC044)
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ACC028 = '070'
|
||||
</select>
|
||||
|
||||
|
||||
<select id="scaleAndTrendYear"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.GraduateEmploymentInfoTreadVo">
|
||||
WITH params AS (
|
||||
SELECT CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) AS current_year
|
||||
),
|
||||
-- 一次性生成两年(当前年、去年)的所有月度时间范围
|
||||
month_ranges AS (
|
||||
SELECT
|
||||
m.month_num,
|
||||
(make_timestamp(p.current_year - month_num + 1, 1, 1, 0, 0, 0) ) AS start_time,
|
||||
(make_timestamp(p.current_year - month_num + 1 , 12, 31, 23, 59, 59) ) AS end_time
|
||||
FROM params p
|
||||
CROSS JOIN (SELECT generate_series(1, 5) AS month_num) m
|
||||
),
|
||||
-- 一次扫描表,按条件区分当前年和去年数据
|
||||
aggregated_data AS (
|
||||
SELECT
|
||||
r.month_num,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 = '1' AND (ABE585 IS NULL OR ABE585 > r.end_time) THEN AAC044 END) AS employmentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' THEN AAC044 END) AS notEmploymentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' AND ACC028 = '070' THEN AAC044 END) AS furtherEducationCount
|
||||
FROM month_ranges r
|
||||
LEFT JOIN theme_graduate_info
|
||||
ON
|
||||
AAC181 BETWEEN r.start_time AND r.end_time
|
||||
<if test="area != null and area != ''">
|
||||
AND AAB299 = #{area}
|
||||
</if>
|
||||
<if test="universityType != null and universityType != ''">
|
||||
AND AAC046 = #{universityType}
|
||||
</if>
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) AS code,
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) AS sort,
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) || '年' AS "desc",
|
||||
COALESCE(employmentCount, 0) AS employmentCount,
|
||||
COALESCE(notEmploymentCount, 0) AS notEmploymentCount,
|
||||
COALESCE(furtherEducationCount, 0) AS furtherEducationCount
|
||||
FROM aggregated_data
|
||||
ORDER BY sort ;
|
||||
</select>
|
||||
|
||||
<select id="scaleAndTrendQuarter"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.GraduateEmploymentInfoTreadVo">
|
||||
WITH params AS (
|
||||
SELECT CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) AS current_year
|
||||
),
|
||||
-- 一次性生成两年(当前年、去年)的所有月度时间范围
|
||||
month_ranges AS (
|
||||
SELECT
|
||||
m.month_num,
|
||||
(make_timestamp(p.current_year , 1, 1, 0, 0, 0)
|
||||
+ (m.month_num - 1) * 3 * INTERVAL '1 month') AS start_time,
|
||||
(make_timestamp(p.current_year , 1, 1, 0, 0, 0)
|
||||
+ m.month_num * 3 * INTERVAL '1 month' - INTERVAL '1 second') AS end_time
|
||||
FROM params p
|
||||
CROSS JOIN (SELECT generate_series(1, 4) AS month_num) m
|
||||
),
|
||||
-- 一次扫描表,按条件区分当前年和去年数据
|
||||
aggregated_data AS (
|
||||
SELECT
|
||||
r.month_num,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 = '1' AND (ABE585 IS NULL OR ABE585 > r.end_time) THEN AAC044 END) AS employmentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' THEN AAC044 END) AS notEmploymentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' AND ACC028 = '070' THEN AAC044 END) AS furtherEducationCount
|
||||
FROM month_ranges r
|
||||
LEFT JOIN theme_graduate_info
|
||||
ON
|
||||
AAC181 BETWEEN r.start_time AND r.end_time
|
||||
<if test="area != null and area != ''">
|
||||
AND AAB299 = #{area}
|
||||
</if>
|
||||
<if test="universityType != null and universityType != ''">
|
||||
AND AAC046 = #{universityType}
|
||||
</if>
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
month_num AS code,
|
||||
month_num AS sort,
|
||||
'第' || month_num || '季度' AS "desc",
|
||||
COALESCE(employmentCount, 0) AS employmentCount,
|
||||
COALESCE(notEmploymentCount, 0) AS notEmploymentCount,
|
||||
COALESCE(furtherEducationCount, 0) AS furtherEducationCount
|
||||
FROM aggregated_data
|
||||
ORDER BY month_num;
|
||||
</select>
|
||||
|
||||
<select id="scaleAndTrendMonth"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.GraduateEmploymentInfoTreadVo">
|
||||
WITH params AS (
|
||||
SELECT CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) AS current_year
|
||||
),
|
||||
-- 一次性生成两年(当前年、去年)的所有月度时间范围
|
||||
month_ranges AS (
|
||||
SELECT
|
||||
m.month_num,
|
||||
(make_timestamp(p.current_year , 1, 1, 0, 0, 0)
|
||||
+ (m.month_num - 1) * INTERVAL '1 month') AS start_time,
|
||||
(make_timestamp(p.current_year , 1, 1, 0, 0, 0)
|
||||
+ m.month_num * INTERVAL '1 month' - INTERVAL '1 second') AS end_time
|
||||
FROM params p
|
||||
CROSS JOIN (SELECT generate_series(1, 12) AS month_num) m
|
||||
),
|
||||
-- 一次扫描表,按条件区分当前年和去年数据
|
||||
aggregated_data AS (
|
||||
SELECT
|
||||
r.month_num,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 = '1' AND (ABE585 IS NULL OR ABE585 > r.end_time) THEN AAC044 END) AS employmentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' THEN AAC044 END) AS notEmploymentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' AND ACC028 = '070' THEN AAC044 END) AS furtherEducationCount
|
||||
FROM month_ranges r
|
||||
LEFT JOIN theme_graduate_info
|
||||
ON
|
||||
AAC181 BETWEEN r.start_time AND r.end_time
|
||||
<if test="area != null and area != ''">
|
||||
AND AAB299 = #{area}
|
||||
</if>
|
||||
<if test="universityType != null and universityType != ''">
|
||||
AND AAC046 = #{universityType}
|
||||
</if>
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
month_num AS code,
|
||||
month_num AS sort,
|
||||
month_num || '月' AS "desc",
|
||||
COALESCE(employmentCount, 0) AS employmentCount,
|
||||
COALESCE(notEmploymentCount, 0) AS notEmploymentCount,
|
||||
COALESCE(furtherEducationCount, 0) AS furtherEducationCount
|
||||
FROM aggregated_data
|
||||
ORDER BY month_num;
|
||||
</select>
|
||||
|
||||
|
||||
<select id="educationLevel"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.GraduateEmploymentInfoTreadVo">
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 = '1' AND (ABE585 IS NULL OR ABE585 > #{endTime}) THEN AAC044 END) AS employmentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' THEN AAC044 END) AS notEmploymentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' AND ACC028 = '070' THEN AAC044 END) AS furtherEducationCount
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
ADC009,
|
||||
ABE585,
|
||||
ACC028,
|
||||
AAC011 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="universityType"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
AAC046 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="majorProfessional"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
"desc",
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
AAC183 AS code,
|
||||
ACC01G AS "desc"
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
) subquery
|
||||
GROUP BY code, "desc"
|
||||
ORDER BY code, "desc"
|
||||
</select>
|
||||
|
||||
<select id="gender"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
AAC004 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="areaFlow"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
ADC115 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="industryDistribution"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
AAB022 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="salaryLevel"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
SELECT
|
||||
"desc" AS code,
|
||||
"desc",
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
CASE
|
||||
WHEN ACC328 < 5000 THEN '5K以下'
|
||||
WHEN ACC328 BETWEEN 5000 AND 8000 THEN '5-8K'
|
||||
WHEN ACC328 BETWEEN 8001 AND 12000 THEN '8-12K'
|
||||
WHEN ACC328 BETWEEN 12001 AND 15000 THEN '12-15K'
|
||||
WHEN ACC328 > 15000 THEN '15K以上'
|
||||
ELSE '未知'
|
||||
END AS "desc"
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
) subquery
|
||||
GROUP BY "desc"
|
||||
ORDER BY
|
||||
CASE "desc"
|
||||
WHEN '5K以下' THEN 1
|
||||
WHEN '5-8K' THEN 2
|
||||
WHEN '8-12K' THEN 3
|
||||
WHEN '12-15K' THEN 4
|
||||
WHEN '15K以上' THEN 5
|
||||
ELSE 6
|
||||
END
|
||||
</select>
|
||||
|
||||
<select id="satisfactionAssessment"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.dto.GraduateEmploymentInfoSqlDto">
|
||||
|
||||
SELECT
|
||||
COUNT(DISTINCT AAC044) AS totalCount,
|
||||
COUNT(DISTINCT CASE WHEN ACC22E = '1' THEN AAC044 END) AS workEnvironmentSatisfiedCount,
|
||||
COUNT(DISTINCT CASE WHEN ACC22F = '1' THEN AAC044 END) AS salaryWelfareSatisfiedCount,
|
||||
COUNT(DISTINCT CASE WHEN ACC22G = '1' THEN AAC044 END) AS developmentForegroundSatisfiedCount,
|
||||
COUNT(DISTINCT CASE WHEN ACC22C = '1' THEN AAC044 END) AS workComprehensiveSatisfiedCount
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
|
||||
</select>
|
||||
|
||||
<select id="startupSituation"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.GraduateEmploymentInfoStartupVo">
|
||||
|
||||
SELECT
|
||||
COUNT(DISTINCT AAC044) AS totalCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC113 = '1' THEN AAC044 END) AS startupCount,
|
||||
COALESCE(SUM(CASE WHEN ADC113 = '1' THEN ACC321 END), 0) AS startupEmploymentJobCount,
|
||||
COUNT(DISTINCT CASE WHEN ACC22G = '1' AND ADC114 = '1' THEN AAC044 END) AS startupSuccessCount
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="notEmploymentCrowd"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
ACC028 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 != '1'
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="heatmap"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.HeatmapVo">
|
||||
|
||||
SELECT
|
||||
areaCode,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
AAB299 AS areaCode
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
) subquery
|
||||
GROUP BY areaCode
|
||||
ORDER BY areaCode
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user