|
|
|
@ -17,6 +17,23 @@
|
|
|
|
|
<result column="STATUS" property="status"/> |
|
|
|
|
<result column="CREATE_DEPT" property="createDept"/> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<resultMap id="deptClassTypeTree" type="com.hnac.hzims.operational.duty.vo.DutyClassTypeTree"> |
|
|
|
|
<id column="create_dept" property="id"/> |
|
|
|
|
<collection property="children" column="{create_dept = create_dept}" select="getDutyClassTypeByDept"></collection> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<resultMap id="dutyClassTypeTree" type="com.hnac.hzims.operational.duty.vo.DutyClassTypeTree"> |
|
|
|
|
<id column="id" property="id"/> |
|
|
|
|
<result column="class_type_name" property="name"/> |
|
|
|
|
<collection property="children" column="{class_type_id = id}" select="getDutyClassByType"></collection> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<resultMap id="dutyClassTree" type="com.hnac.hzims.operational.duty.vo.DutyClassTypeTree"> |
|
|
|
|
<id column="id" property="id"/> |
|
|
|
|
<result column="class_name" property="name"/> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<sql id="Base_Column_List"> |
|
|
|
|
ID, TENANT_ID,CLASS_TYPE_ID,CLASS_NAME, START_TIME, END_TIME, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, |
|
|
|
|
IS_DELETED,STATUS,CREATE_DEPT |
|
|
|
@ -75,4 +92,29 @@
|
|
|
|
|
and CLASS_TYPE_ID <> #{classTypeId} |
|
|
|
|
</if> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getDutyClassByType" resultMap="dutyClassTree"> |
|
|
|
|
select `id`,`class_name` |
|
|
|
|
from `hz_ims_duty_class` |
|
|
|
|
where `is_deleted` = 0 |
|
|
|
|
and `class_type_id` = #{class_type_id} |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getDutyClassTypeByDept" resultMap="dutyClassTypeTree"> |
|
|
|
|
select distinct ct.id,ct.class_type_name |
|
|
|
|
from `hz_ims_duty_class_type` ct,`hz_ims_duty_class` dc |
|
|
|
|
where ct.`id` = dc.`class_type_id` |
|
|
|
|
and ct.`is_deleted` = 0 |
|
|
|
|
and dc.`is_deleted` = 0 |
|
|
|
|
and ct.create_dept = #{create_dept} |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getDutyClassTree" resultMap="deptClassTypeTree"> |
|
|
|
|
select distinct `create_dept` |
|
|
|
|
from `hz_ims_duty_class_type` |
|
|
|
|
where `is_deleted` = 0 |
|
|
|
|
<if test="deptId != null and deptId != ''"> |
|
|
|
|
and `create_dept` = #{deptId} |
|
|
|
|
</if> |
|
|
|
|
</select> |
|
|
|
|
</mapper> |
|
|
|
|