解决归档率负数bug

master
zengwh 4 years ago
parent ce13dc1a73
commit c183879f41

@ -34,7 +34,7 @@
)
END fileRate,
CASE
WHEN t2.fileNum - ISNULL(t4.deathNum, 0) = 0 THEN
WHEN (t5.Num - ISNULL(t4.deathNum, 0)) <= 0 THEN
0
ELSE
ROUND(
@ -49,7 +49,7 @@
)
END day2Rate,
CASE
WHEN t2.fileNum - ISNULL(t4.deathNum, 0) = 0 THEN
WHEN (t6.Num - ISNULL(t4.deathNum, 0)) <= 0 THEN
0
ELSE
ROUND(
@ -175,31 +175,31 @@
left join (SELECT code,Name FROM emr_dictionary where parent_id = 'dept_code') as t8 on c.dept_name=t8.code
) v_count where 1=1
<!--<if test="deptCode != null and deptCode!=''">-->
<!--and deptCode = #{deptCode,jdbcType=NVARCHAR}-->
<!--and deptCode = #{deptCode,jdbcType=NVARCHAR}-->
<!--</if>-->
<choose>
<when test="sql != null and sql != ''">
${sql}
</when>
<otherwise>
<if test="deptCode != null and deptCode!=''">
and deptCode in
<foreach item="item" collection="deptCode.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<when test="sql != null and sql != ''">
${sql}
</when>
<otherwise>
<if test="deptCode != null and deptCode!=''">
and deptCode in
<foreach item="item" collection="deptCode.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="deptName != null and deptName!=''">
and deptName in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
and deptName is not null
</if>
</otherwise>
<if test="deptName != null and deptName!=''">
and deptName in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
and deptName is not null
</if>
</otherwise>
</choose>
<!--<if test="deptName != null and deptName!=''">-->
<!--and deptName = #{deptName,jdbcType=NVARCHAR}-->
<!--and deptName = #{deptName,jdbcType=NVARCHAR}-->
<!--</if>-->
order by deptCode
</select>

Loading…
Cancel
Save