添加功能
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
|
||||
|
||||
Reference in New Issue
Block a user