|
|
@ -129,7 +129,7 @@ |
|
|
|
AND r2.answer + 0 >= #{param.startTime} |
|
|
|
</if> |
|
|
|
<if test="param.endTime!=null and param.endTime!=0"> |
|
|
|
AND r2.answer + 0 < #{param.endTime} |
|
|
|
AND r2.answer + 0 <= #{param.endTime} |
|
|
|
</if> |
|
|
|
GROUP BY |
|
|
|
r1.answer |
|
|
@ -161,4 +161,33 @@ |
|
|
|
GROUP BY |
|
|
|
FROM_UNIXTIME(r2.answer / 1000, #{type}) |
|
|
|
</select> |
|
|
|
<select id="subentrySpecifyAnswer" resultType="com.ccsens.carbasics.bean.vo.StatisticalVo$Item"> |
|
|
|
SELECT |
|
|
|
FROM_UNIXTIME( r2.answer / 1000, #{type} ), |
|
|
|
count( a.id ) |
|
|
|
FROM |
|
|
|
t_qcp_first_aid a, |
|
|
|
t_qcp_first_aid_record r1, |
|
|
|
t_qcp_first_aid_record r2 |
|
|
|
WHERE |
|
|
|
a.id = r1.first_aid_id |
|
|
|
AND a.id = r2.first_aid_id |
|
|
|
AND r1.question_code = #{param.questionCode} |
|
|
|
AND r1.answer = #{param.answer} |
|
|
|
AND r2.question_code = #{param.accordCode} |
|
|
|
<if test="param.startTime!=null and param.startTime!=0"> |
|
|
|
AND r2.answer + 0 >= #{param.startTime} |
|
|
|
</if> |
|
|
|
<if test="param.endTime!=null and param.endTime!=0"> |
|
|
|
AND r2.answer + 0 <= #{param.endTime} |
|
|
|
</if> |
|
|
|
AND a.hospital_id IN |
|
|
|
<foreach collection="hospitalIds" open="(" close=")" separator="," item="hospitalId"> |
|
|
|
#{hospitalId} |
|
|
|
</foreach> |
|
|
|
AND a.rec_status = 0 |
|
|
|
AND r1.rec_status = 0 |
|
|
|
GROUP BY |
|
|
|
FROM_UNIXTIME( r2.answer / 1000, #{type}) |
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|