|
@ -36,12 +36,11 @@ FROM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getPointTimeCurrent" parameterType="java.util.Map" resultType="Long"> |
|
|
<select id="getPointTimeCurrent" parameterType="java.util.Map" resultType="Long"> |
|
|
select tfar.begin_time/1000 as time |
|
|
select t1.begin_time |
|
|
from |
|
|
from t_step ts LEFT JOIN |
|
|
t_step ts LEFT JOIN t_first_aid_record tfar on ts.id = tfar.step_id , |
|
|
(select IF(tfar.begin_time is null,null,tfar.begin_time - t2.begin_time) as begin_time,step_id from t_first_aid_record tfar, |
|
|
(select id from t_first_aid tfa where tfa.hospital_id =#{id} and tfa.rec_status=0 ORDER BY tfa.begin_time) t |
|
|
(select id, begin_time from t_first_aid tfa where hospital_id =#{id} and rec_status=0 ORDER BY begin_time desc LIMIT 1) t2 |
|
|
where tfar.rec_status=0 and t.id = tfar.first_aid_id and ts.rec_status = 0 and ts.step_type = 1 |
|
|
where rec_status =0 and tfar.first_aid_id = t2.id) t1 on t1.step_id = ts.id where ts.step_type = 0 and ts.rec_status = 0 ORDER BY sequence |
|
|
ORDER BY ts.sequence asc |
|
|
|
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="getPointTimeHospital" parameterType="java.util.Map" resultType="Long"> |
|
|
<select id="getPointTimeHospital" parameterType="java.util.Map" resultType="Long"> |
|
|