|
@@ -23,37 +23,46 @@
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="queryYwltjList" parameterType="com.zjrs.zwnw.sxgl.dto.YwltjQueryDTO" resultType="com.zjrs.zwnw.sxgl.dto.YwltjResultDTO">
|
|
<select id="queryYwltjList" parameterType="com.zjrs.zwnw.sxgl.dto.YwltjQueryDTO" resultType="com.zjrs.zwnw.sxgl.dto.YwltjResultDTO">
|
|
|
- SELECT * FROM (SELECT '柜台经办' "sqqdname", '1' "sqqd",sxlb "sxlb",
|
|
|
|
|
- (select sxmc from rs_sx_config a where a.sxbm = q.sbsx) "sxmc",sbsx "sbsx", count(1) "ywl",
|
|
|
|
|
|
|
+ SELECT * FROM (
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ '柜台经办' "sqqdname",
|
|
|
|
|
+ '1' "sqqd",
|
|
|
|
|
+ sxlb "sxlb",
|
|
|
|
|
+ (SELECT sxmc FROM rs_sx_config a WHERE a.sxbm = q.sbsx) "sxmc",
|
|
|
|
|
+ sbsx "sbsx",
|
|
|
|
|
+ count(1) "ywl",
|
|
|
(SELECT aaa103 FROM V_GGFW_DICT WHERE AAA100 = 'SX_SXLB' and aaa102 = sxlb) "zbks",
|
|
(SELECT aaa103 FROM V_GGFW_DICT WHERE AAA100 = 'SX_SXLB' and aaa102 = sxlb) "zbks",
|
|
|
- to_char(sum(fcbmy)) "fcbmy",to_char(sum(bmy)) "bmy",to_char(sum(jbmy)) "jbmy",
|
|
|
|
|
- to_char(sum(my)) "my",to_char(sum(fcmy)) "fcmy",
|
|
|
|
|
- decode(instr(to_char(ROUND(((sum(fcbmy)+sum(bmy))/count(1))*100,1),'fm9999990.0'),'.'),'0',
|
|
|
|
|
- to_char(ROUND(((sum(fcbmy)+sum(bmy))/count(1))*100,1),'fm9999990.0'),
|
|
|
|
|
- to_char(ROUND(((sum(fcbmy)+sum(bmy))/count(1))*100,1),'fm9999990.0'))||'%' "cpl",
|
|
|
|
|
- decode(instr(to_char(ROUND(((sum(jbmy)+sum(my)+sum(fcmy))/count(1))*100,1),'fm9999990.0'),'.'),'0',
|
|
|
|
|
- to_char(ROUND(((sum(jbmy)+sum(my)+sum(fcmy))/count(1))*100,1),'fm9999990.0'),
|
|
|
|
|
- to_char(ROUND(((sum(jbmy)+sum(my)+sum(fcmy))/count(1))*100,1),'fm9999990.0'))||'%' "hpl"
|
|
|
|
|
- FROM (select
|
|
|
|
|
|
|
+ to_char(sum(fcbmy)) "fcbmy",
|
|
|
|
|
+ to_char(sum(bmy)) "bmy",
|
|
|
|
|
+ to_char(sum(jbmy)) "jbmy",
|
|
|
|
|
+ to_char(sum(my)) "my",
|
|
|
|
|
+ to_char(sum(fcmy)) "fcmy",
|
|
|
|
|
+ to_char(round(((sum(fcbmy) + sum(bmy)) / NULLIF(count(1), 0)) * 100, 1), 'fm9999990.0') || '%' "cpl",
|
|
|
|
|
+ to_char(round(((sum(jbmy) + sum(my) + sum(fcmy)) / NULLIF(count(1), 0)) * 100, 1), 'fm9999990.0') || '%' "hpl"
|
|
|
|
|
+ FROM (
|
|
|
|
|
+ SELECT
|
|
|
sbsx,
|
|
sbsx,
|
|
|
(SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '1') fcbmy,
|
|
(SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '1') fcbmy,
|
|
|
(SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '2') bmy,
|
|
(SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '2') bmy,
|
|
|
(SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '3') jbmy,
|
|
(SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '3') jbmy,
|
|
|
(SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '4') my,
|
|
(SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '4') my,
|
|
|
(SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '5') fcmy,
|
|
(SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '5') fcmy,
|
|
|
- (select sxlb from rs_sx_config a where a.sxbm = b.sbsx) sxlb
|
|
|
|
|
- from rs_slxx b
|
|
|
|
|
- where
|
|
|
|
|
- <if test="dto.sqrqc != null and dto.sqrqc != ''">
|
|
|
|
|
- to_date(substr(slbh,0,8),'yyyyMMdd') >= to_date(REPLACE(#{dto.sqrqc},'-',''),'yyyyMMdd')
|
|
|
|
|
- </if>
|
|
|
|
|
- ) q group by sbsx,sxlb
|
|
|
|
|
- ) where "sxmc" IS NOT NULL
|
|
|
|
|
|
|
+ (SELECT sxlb FROM rs_sx_config a WHERE a.sxbm = b.sbsx) sxlb
|
|
|
|
|
+ FROM rs_slxx b
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="dto.sqrqc != null and dto.sqrqc != ''">
|
|
|
|
|
+ AND substr(slbh, 1, 8) <![CDATA[ >= ]]> REPLACE(#{dto.sqrqc}, '-', '')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ ) q
|
|
|
|
|
+ GROUP BY sbsx, sxlb
|
|
|
|
|
+ )
|
|
|
|
|
+ WHERE "sxmc" IS NOT NULL
|
|
|
<if test="dto.sqqd != null and dto.sqqd != ''">
|
|
<if test="dto.sqqd != null and dto.sqqd != ''">
|
|
|
- and "sqqd" = #{dto.sqqd}
|
|
|
|
|
|
|
+ AND "sqqd" = #{dto.sqqd}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="dto.sxmc != null and dto.sxmc != ''">
|
|
<if test="dto.sxmc != null and dto.sxmc != ''">
|
|
|
- and "sxmc" like '%'||#{dto.sxmc}||'%'
|
|
|
|
|
|
|
+ AND "sxmc" LIKE '%'||#{dto.sxmc}||'%'
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|