Lihong@123456 5 years ago
parent
commit
391ea3f09b
  1. 4
      wisdomcar/src/main/resources/application.yml
  2. 11
      wisdomcar/src/main/resources/mapper_dao/StatisticsDao.xml

4
wisdomcar/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring:
profiles:
active: test
include: common, util-test
active: dev
include: common, util-dev

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

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

Loading…
Cancel
Save