select t.id,t.bdbh,t.bdmc,t.create_time,t.user_mc,t.user_id,t.bdzt,t.bdzt,t.tjsj,tm.name as templateMc,tm.sn as templateSn,tm.dept_id as templateDeptId
,ss.leader as subjectLeader,s.id as studyLeader
FROM `t_study_form_fill` t
left join t_template tm on tm.id=t.template_id
join t_template tm on tm.id=t.template_id
join t_study_subject ss on t.study_subject_id=ss.id
join t_study s on t.study_id=s.id
<iftest="ew.sqlSegment != '' and ew.sqlSegment != null">
<where>
${ew.sqlSegment}
@ -18,8 +21,8 @@
select t.*,tm.name as templateMc,tm.sn as templateSn,tm.dept_id as templateDeptId