Lihong@123456 5 years ago
parent
commit
c26431b3b4
  1. 5
      wisdomcar/src/main/resources/mapper_dao/StatisticsDao.xml

5
wisdomcar/src/main/resources/mapper_dao/StatisticsDao.xml

@ -32,13 +32,10 @@ FROM
</select> </select>
<select id="getPointTimeCurrent" parameterType="java.util.Map" resultType="Long"> <select id="getPointTimeCurrent" parameterType="java.util.Map" resultType="Long">
select t1.begin_time select t1.begin_time
from t_step ts LEFT JOIN from t_step ts LEFT JOIN
(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 IF(tfar.begin_time is null,null,(tfar.begin_time - t2.begin_time)/1000) as begin_time,step_id from t_first_aid_record tfar,
(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 (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 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 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
</select> </select>

Loading…
Cancel
Save