@ -104,7 +104,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
</if>
GROUP BY device_type, TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS'), EXTRACT(YEAR FROM cur_time)
<include refid= "commonGroupSql" />
@ -140,7 +140,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
</if>
GROUP BY device_type, TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS'), EXTRACT(YEAR FROM cur_time)
<include refid= "commonGroupSql" />
@ -175,7 +175,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
</if>
GROUP BY device_type, TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS'), EXTRACT(YEAR FROM cur_time)
<include refid= "commonGroupSql" />
@ -210,7 +210,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
</if>
GROUP BY device_type, TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS'), EXTRACT(YEAR FROM cur_time)
<include refid= "commonGroupSql" />
@ -252,7 +252,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
GROUP BY
device_type,
SUBSTRING(TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS') FROM 1 FOR ${len}),
@ -281,7 +281,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
GROUP BY
device_type,
SUBSTRING(TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS') FROM 1 FOR ${len}),
@ -311,7 +311,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
GROUP BY
device_type,
SUBSTRING(TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS') FROM 1 FOR ${len}),
@ -340,7 +340,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
GROUP BY
device_type,
SUBSTRING(TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS') FROM 1 FOR ${len}),
@ -391,7 +391,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
</if>
GROUP BY TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS'), EXTRACT(YEAR FROM cur_time)
<if test= "timeType!= null and timeType!= '' and timeType == 'month'" >
@ -429,7 +429,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
</if>
GROUP BY EXTRACT(YEAR FROM cur_time)
<if test= "timeType!= null and timeType!= '' and timeType == 'month'" >
@ -490,7 +490,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
</if>
group by
substring(to_char(cur_time, 'YYYY-MM-DD HH24:MI:SS') from 1 for ${len}),
@ -530,7 +530,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
</if>
group by
extract(year from cur_time)
@ -581,7 +581,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
group by
substring(to_char(cur_time, 'YYYY-MM-DD HH24:MI:SS') from 1 for ${len}),
extract(year from cur_time)
@ -610,7 +610,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
group by
substring(to_char(cur_time, 'YYYY-MM-DD HH24:MI:SS') from 1 for ${len}),
extract(year from cur_time)
@ -640,7 +640,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
group by
extract(year from cur_time)
<include refid= "commonLastGroupSql" />
@ -667,7 +667,7 @@
<if test= "systemType != null and systemType != '' " >
and cpm.system_type = #{systemType}
</if>
and cpm.grade = 40 )
and cpm.grade = 40 and cpm.terminal_device_type = '15' )
group by
extract(year from cur_time)
<include refid= "commonLastGroupSql" />
@ -854,6 +854,7 @@
cpm.device_ledger_id = dl.id
and dl.device_type = '5'
and cpm.grade = 140
and cpm.terminal_device_type = '15'
)
group by
device_type,
@ -880,6 +881,7 @@
cpm.device_ledger_id = dl.id
and dl.device_type = '6'
and cpm.grade = 140
and cpm.terminal_device_type = '15'
)
group by
device_type,