|
|
|
@ -230,8 +230,12 @@ |
|
|
|
<if test="param.hospitalId!=null and param.hospitalId!=0 "> |
|
|
|
and tpi.hospital_id=#{param.hospitalId} |
|
|
|
</if> |
|
|
|
<if test="inputStatus!=null"> |
|
|
|
and tpi.input_status=#{inputStatus} |
|
|
|
<if test="inputStatus!=null and inputStatus.length>0"> |
|
|
|
and tpi.input_status in |
|
|
|
<foreach collection="inputStatus" item="item" open="(" close=")" separator=","> |
|
|
|
#{item} |
|
|
|
</foreach> |
|
|
|
|
|
|
|
</if> |
|
|
|
GROUP BY shijian |
|
|
|
</select> |
|
|
|
@ -364,11 +368,17 @@ |
|
|
|
<select id="statisticsComplete" resultType="com.ccsens.tcm.bean.vo.StatisticVo$StatisticsComplete"> |
|
|
|
|
|
|
|
SELECT |
|
|
|
input_status as id, |
|
|
|
(case input_status |
|
|
|
when 5 THEN 2 |
|
|
|
when 6 then 2 |
|
|
|
else input_status end |
|
|
|
) as id, |
|
|
|
(case input_status |
|
|
|
when 0 THEN '新建' |
|
|
|
when 1 then '数据搜集中' |
|
|
|
when 2 then '数据搜集完成' |
|
|
|
when 5 then '数据搜集完成' |
|
|
|
when 6 then '数据搜集完成' |
|
|
|
when 3 then '数据搜集超时' |
|
|
|
when 4 then '废弃' |
|
|
|
END) as name, |
|
|
|
@ -381,7 +391,10 @@ |
|
|
|
and hospital_id = #{hospitalId} |
|
|
|
</if> |
|
|
|
GROUP BY |
|
|
|
input_status |
|
|
|
(case input_status |
|
|
|
when 5 THEN 2 |
|
|
|
when 6 then 2 |
|
|
|
else input_status end) |
|
|
|
|
|
|
|
</select> |
|
|
|
<select id="completeHospital" resultType="com.ccsens.tcm.bean.vo.StatisticVo$CompleteHospital"> |
|
|
|
@ -390,7 +403,7 @@ |
|
|
|
t.`name` as hospitalName, |
|
|
|
MAX(CASE t.input_status WHEN 0 THEN nums ELSE 0 END ) unfinished, |
|
|
|
MAX(CASE t.input_status WHEN 1 THEN nums ELSE 0 END ) underway, |
|
|
|
MAX(CASE t.input_status WHEN 2 THEN nums ELSE 0 END ) completed, |
|
|
|
MAX(CASE t.input_status WHEN 2 THEN nums when 5 THEN nums WHEN 6 THEN nums ELSE 0 END ) completed, |
|
|
|
MAX(CASE t.input_status WHEN 3 THEN nums ELSE 0 END ) overtime, |
|
|
|
MAX(CASE t.input_status WHEN 4 THEN nums ELSE 0 END ) discarded |
|
|
|
FROM( |
|
|
|
@ -418,7 +431,7 @@ |
|
|
|
t.`name` as doctorName, |
|
|
|
MAX(CASE t.input_status WHEN 0 THEN nums ELSE 0 END ) unfinished, |
|
|
|
MAX(CASE t.input_status WHEN 1 THEN nums ELSE 0 END ) underway, |
|
|
|
MAX(CASE t.input_status WHEN 2 THEN nums ELSE 0 END ) completed, |
|
|
|
MAX(CASE t.input_status WHEN 2 THEN nums when 5 THEN nums WHEN 6 THEN nums ELSE 0 END ) completed, |
|
|
|
MAX(CASE t.input_status WHEN 3 THEN nums ELSE 0 END ) overtime, |
|
|
|
MAX(CASE t.input_status WHEN 4 THEN nums ELSE 0 END ) discarded |
|
|
|
FROM( |
|
|
|
|