forked from integrated_whb/integrated_whb
Merge remote-tracking branch 'origin/dev' into dev
commit
83ef15519c
|
@ -15,20 +15,20 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="listAllForDiagnosis" parameterType="pd" resultType="pd">
|
<select id="listAllForDiagnosis" parameterType="pd" resultType="pd">
|
||||||
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_BLINDBOARD f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID}
|
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_BLINDBOARD f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID} and ISDELETE = 0
|
||||||
union all
|
union all
|
||||||
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_BREAKGROUND f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID}
|
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_BREAKGROUND f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID} and ISDELETE = 0
|
||||||
union all
|
union all
|
||||||
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_CONFINEDSPACE f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID}
|
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_CONFINEDSPACE f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID} and ISDELETE = 0
|
||||||
union all
|
union all
|
||||||
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_ELECTRICITY f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID}
|
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_ELECTRICITY f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID} and ISDELETE = 0
|
||||||
union all
|
union all
|
||||||
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_CUTROAD f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID}
|
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_CUTROAD f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID} and ISDELETE = 0
|
||||||
union all
|
union all
|
||||||
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_HIGHWORK f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID}
|
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_HIGHWORK f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID} and ISDELETE = 0
|
||||||
union all
|
union all
|
||||||
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_HOISTING f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID}
|
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_HOISTING f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID} and ISDELETE = 0
|
||||||
union all
|
union all
|
||||||
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_HOTWORK f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID}
|
select count(1) as count,sum(case when f.STEP_ID=15 then 1 else 0 end) as pass_count from BUS_HOTWORK f where DATE_FORMAT(f.CREATTIME,'%Y-%m')=#{MONTH} and f.CORPINFO_ID = #{CORPINFO_ID} and ISDELETE = 0
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue