|
|
|
@ -19,33 +19,6 @@ |
|
|
|
(select GROUP_CONCAT(s.name) from t_study s where find_in_set(s.id, t.`md_ids`)) as mdMcs |
|
|
|
FROM `t_gsp_ffjl` t WHERE id = #{id} |
|
|
|
</select> |
|
|
|
<select id="getStatisticsUnit" resultType="java.util.Map"> |
|
|
|
SELECT * FROM |
|
|
|
(SELECT ckldw, COUNT(*) AS ckldw_cnt FROM t_gsp_ffjl as t |
|
|
|
<if test="ew.sqlSegment != '' and ew.sqlSegment != null"> |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|
</if> |
|
|
|
GROUP BY ckldw ORDER BY ckldw_cnt DESC LIMIT 1) AS ckldw |
|
|
|
CROSS JOIN |
|
|
|
(SELECT syldw, COUNT(*) AS syldw_cnt FROM t_gsp_ffjl as t |
|
|
|
<if test="ew2.sqlSegment != '' and ew2.sqlSegment != null"> |
|
|
|
<where> |
|
|
|
${ew2.sqlSegment} |
|
|
|
</where> |
|
|
|
</if> |
|
|
|
GROUP BY syldw ORDER BY syldw_cnt DESC LIMIT 1) AS syldw |
|
|
|
CROSS JOIN |
|
|
|
(SELECT rkldw, COUNT(*) AS rkldw_cnt FROM t_gsp_ffjl as t |
|
|
|
<if test="ew3.sqlSegment != '' and ew3.sqlSegment != null"> |
|
|
|
<where> |
|
|
|
${ew3.sqlSegment} |
|
|
|
</where> |
|
|
|
</if> |
|
|
|
GROUP BY rkldw ORDER BY rkldw_cnt DESC LIMIT 1) AS rkldw; |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="sumRkl" resultType="java.math.BigDecimal"> |
|
|
|
SELECT SUM(basic_rkl + 0) AS total |
|
|
|
FROM t_gsp_ffjl as t |
|
|
|
@ -85,5 +58,32 @@ |
|
|
|
</where> |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
<select id="getCklUnit" resultType="java.lang.String"> |
|
|
|
SELECT ckldw FROM ( SELECT ckldw, COUNT(*) AS ckldw_cnt FROM t_gsp_ffjl as t |
|
|
|
<if test="ew.sqlSegment != '' and ew.sqlSegment != null"> |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|
</if> |
|
|
|
GROUP BY ckldw ORDER BY ckldw_cnt DESC LIMIT 1 ) as t |
|
|
|
</select> |
|
|
|
<select id="getSylUnit" resultType="java.lang.String"> |
|
|
|
SELECT syldw FROM (SELECT syldw, COUNT(*) AS syldw_cnt FROM t_gsp_ffjl as t |
|
|
|
<if test="ew.sqlSegment != '' and ew.sqlSegment != null"> |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|
</if> |
|
|
|
GROUP BY syldw ORDER BY syldw_cnt DESC LIMIT 1) as t |
|
|
|
</select> |
|
|
|
<select id="getRklUnit" resultType="java.lang.String"> |
|
|
|
SELECT rkldw FROM (SELECT rkldw, COUNT(*) AS rkldw_cnt FROM t_gsp_ffjl as t |
|
|
|
<if test="ew.sqlSegment != '' and ew.sqlSegment != null"> |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|
</if> |
|
|
|
GROUP BY rkldw ORDER BY rkldw_cnt DESC LIMIT 1) as t |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |