| | |
| | | <result property="queRoadName" column="que_road_name"/> |
| | | <result property="caseTypeFirst" column="case_type_first"/> |
| | | <result property="caseTypeFirstName" column="case_type_first_name"/> |
| | | <result property="caseTaskId" column="caseTaskId"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_case_info</sql> |
| | |
| | | b.close_time, |
| | | b.agree_type, |
| | | b.agree_type_name, |
| | | b.agree_content |
| | | b.agree_content, |
| | | c.id as caseTaskId |
| | | </sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | |
| | | dyh_case_info t1 |
| | | left join dyh_case_info_unfold t2 on t1.id = t2.id |
| | | left join (select count(*) as number ,case_id from dyh_case_supervise group by case_id) t3 on t3.case_id=t1.id |
| | | left join (select id ,case_id from dyh_case_task limit 1) t4 on t1.id = t4.case_id |
| | | left join (select id ,case_id from dyh_case_task group by case_id) t4 on t1.id = t4.case_id |
| | | <include refid="where-register-part"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | |
| | | <include refid="column-part-all"/> |
| | | FROM |
| | | dyh_case_info a LEFT JOIN dyh_case_info_unfold b on a.id = b.id |
| | | left join (select id ,case_id from dyh_case_task group by case_id) c on a.id = c.case_id |
| | | <include refid="where-part-all"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |