|
|
@ -894,14 +894,106 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="departmentData" type="com.ccsens.carbasics.bean.vo.OrganizationVo$Basic"> |
|
|
|
<id property="organizationId" column="organizationId"/> |
|
|
|
<collection property="roles" ofType="String" javaType="List"> |
|
|
|
<result column="role"/> |
|
|
|
<resultMap id="departmentData" type="com.ccsens.carbasics.bean.vo.ManagementVo$Hospital"> |
|
|
|
<id property="id" column="id"/> |
|
|
|
<result property="hName" column="hName"/> |
|
|
|
<collection property="hospitalDataList" javaType="List" ofType="com.ccsens.carbasics.bean.vo.ManagementVo$HospitalData"> |
|
|
|
<id property="did" column="did"/> |
|
|
|
<result property="departmentName" column="departmentName"/> |
|
|
|
|
|
|
|
<collection property="positionInfoList" javaType="List" ofType="com.ccsens.carbasics.bean.vo.ManagementVo$PositionInfo"> |
|
|
|
<id property="pid" column="pid"/> |
|
|
|
<result property="pName" column="pName"/> |
|
|
|
|
|
|
|
<collection property="roleList" javaType="List" ofType="com.ccsens.carbasics.bean.vo.ManagementVo$RoleInfo"> |
|
|
|
<id property="rid" column="rid"/> |
|
|
|
<result property="rName" column="rName"/> |
|
|
|
</collection> |
|
|
|
<collection property="memberInfoList" javaType="List" ofType="com.ccsens.carbasics.bean.vo.ManagementVo$MemberInfo"> |
|
|
|
<id property="mid" column="mid"/> |
|
|
|
<result property="mName" column="mName"/> |
|
|
|
<result property="phone" column="phone"/> |
|
|
|
</collection> |
|
|
|
</collection> |
|
|
|
|
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
<select id="queryDepartmentData" resultMap="departmentData"> |
|
|
|
|
|
|
|
<resultMap id="departmentData1" type="com.ccsens.carbasics.bean.vo.ManagementVo$HospitalData"> |
|
|
|
<id property="did" column="did"/> |
|
|
|
<result property="departmentName" column="departmentName"/> |
|
|
|
<collection property="positionInfoList" javaType="List" ofType="com.ccsens.carbasics.bean.vo.ManagementVo$PositionInfo"> |
|
|
|
<id property="pid" column="pid"/> |
|
|
|
<result property="pName" column="pName"/> |
|
|
|
<collection property="roleList" javaType="List" ofType="com.ccsens.carbasics.bean.vo.ManagementVo$RoleInfo"> |
|
|
|
<id property="rid" column="rid"/> |
|
|
|
<result property="rName" column="rName"/> |
|
|
|
</collection> |
|
|
|
<collection property="memberInfoList" javaType="List" ofType="com.ccsens.carbasics.bean.vo.ManagementVo$MemberInfo"> |
|
|
|
<id property="mid" column="mid"/> |
|
|
|
<result property="mName" column="mName"/> |
|
|
|
<result property="phone" column="phone"/> |
|
|
|
</collection> |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
<select id="queryDepartmentData" resultMap="departmentData1"> |
|
|
|
SELECT |
|
|
|
o.id, |
|
|
|
o.`name` AS hName, |
|
|
|
od.id AS did, |
|
|
|
od.`name` AS departmentName, |
|
|
|
op.id AS pid, |
|
|
|
op.role_name AS pName, |
|
|
|
pt.id AS rid, |
|
|
|
pt.`name` AS rName, |
|
|
|
m.id AS mid, |
|
|
|
m.`name` AS mName, |
|
|
|
m.contact AS phone |
|
|
|
FROM |
|
|
|
t_organization AS o |
|
|
|
LEFT JOIN t_organization_department AS od ON o.id = od.organization_id |
|
|
|
LEFT JOIN t_organization_position AS op ON od.id = op.department_id |
|
|
|
LEFT JOIN t_organization_position_type_relation AS ptr ON ptr.position_id = op.id |
|
|
|
AND ptr.rec_status = 0 |
|
|
|
LEFT JOIN t_organization_position_type AS pt ON ptr.position_type_id = pt.id |
|
|
|
AND pt.rec_status = 0 |
|
|
|
LEFT JOIN t_organization_member_position AS mp ON mp.position_id = op.id |
|
|
|
AND mp.rec_status = 0 |
|
|
|
LEFT JOIN t_organization_member AS m ON mp.member_id = m.id |
|
|
|
AND m.rec_status = 0 |
|
|
|
WHERE |
|
|
|
o.rec_status = 0 |
|
|
|
AND o.id = #{param.id} |
|
|
|
AND od.rec_status = 0 |
|
|
|
AND op.rec_status = 0 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="querySonDepartmentData" resultMap="departmentData1"> |
|
|
|
SELECT |
|
|
|
od.id AS did, |
|
|
|
od.`name` AS departmentName, |
|
|
|
op.id AS pid, |
|
|
|
op.role_name AS pName, |
|
|
|
pt.id AS rid, |
|
|
|
pt.`name` AS rName, |
|
|
|
m.id AS mid, |
|
|
|
m.`name` AS mName, |
|
|
|
m.contact AS phone |
|
|
|
FROM |
|
|
|
t_organization_department AS od |
|
|
|
LEFT JOIN t_organization_position AS op ON od.id = op.department_id |
|
|
|
LEFT JOIN t_organization_position_type_relation AS ptr ON ptr.position_id = op.id |
|
|
|
AND ptr.rec_status = 0 |
|
|
|
LEFT JOIN t_organization_position_type AS pt ON ptr.position_type_id = pt.id |
|
|
|
AND pt.rec_status = 0 |
|
|
|
LEFT JOIN t_organization_member_position AS mp ON mp.position_id = op.id |
|
|
|
AND mp.rec_status = 0 |
|
|
|
LEFT JOIN t_organization_member AS m ON mp.member_id = m.id |
|
|
|
AND m.rec_status = 0 |
|
|
|
WHERE |
|
|
|
od.id = #{did} |
|
|
|
AND od.rec_status = 0 |
|
|
|
AND op.rec_status = 0 |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |
|
|
|