You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
944 B
13 lines
944 B
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ccsens.wisdomcar.persist.dao.StepTaskDao">
|
|
|
|
<select id="getBindCarTaskId" resultType="com.ccsens.wisdomcar.bean.vo.ProjectVo$BindCar" parameterType="java.lang.Long">
|
|
select c.id, c.task_sub_id as taskSubId, c.patient_id as patientId, c.car_id as carId, c.start_time as startTime, c.end_time as endTime FROM
|
|
(select patient_id, batch from t_step_task where task_sub_id = #{taskSubId} and rec_status = 0) batch,
|
|
(select id from t_step where code = 1 and step_type = 0 and rec_status = 0) step,
|
|
t_step_task st,
|
|
t_patient_wisdom_car c
|
|
where batch.batch = st.batch and step.id = st.step_id and st.task_sub_id = c.task_sub_id and st.rec_status = 0 and c.rec_status = 0 order by c.start_time desc limit 1
|
|
</select>
|
|
</mapper>
|