|
|
|
@ -44,13 +44,13 @@ |
|
|
|
<result property="isMappingUnit" column="isMappingUnit"/> |
|
|
|
<result property="srzUnitId" column="srzUnitId"/> |
|
|
|
<result property="taskId" column="taskId"/> |
|
|
|
|
|
|
|
<result property="zone" column="zone"/> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectDeptVo"> |
|
|
|
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time,dept_type,d.kingdee_org_id,d.kingdee_org_parent_id, |
|
|
|
tenant_code, organizationId, organizationParentId, zzLevel, code, mappingUnitParentId,updateAt, createAt, description, effectOn, sequence, isDeleted, zzDisplayPath, `name`, guid, zzIsLeaf, isDisabled, |
|
|
|
fullname, isMappingUnit, srzUnitId, taskId,creditcode from sys_dept d |
|
|
|
fullname, isMappingUnit, srzUnitId, taskId,creditcode,zone from sys_dept d |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectDeptAll" resultMap="DeptResult"> |
|
|
|
@ -102,6 +102,7 @@ |
|
|
|
<if test="deptType != null">dept_type,</if> |
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if> |
|
|
|
<if test="kingdeeOrgId != null and kingdeeOrgId != ''">kingdee_org_id,</if> |
|
|
|
<if test="zone != null">zone,</if> |
|
|
|
<if test="kingdeeOrgParentId != null and kingdeeOrgParentId != ''">kingdee_org_parent_id,</if> |
|
|
|
create_time |
|
|
|
)values( |
|
|
|
@ -118,6 +119,7 @@ |
|
|
|
<if test="deptType != null">#{deptType},</if> |
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
|
|
<if test="kingdeeOrgId != null and kingdeeOrgId != ''">#{kingdeeOrgId},</if> |
|
|
|
<if test="zone != null">#{zone},</if> |
|
|
|
<if test="kingdeeOrgParentId != null and kingdeeOrgParentId != ''">#{kingdeeOrgParentId},</if> |
|
|
|
sysdate() |
|
|
|
) |
|
|
|
@ -156,6 +158,13 @@ |
|
|
|
<if test="deptType != null and deptType != ''"> |
|
|
|
AND dept_type = #{deptType} |
|
|
|
</if> |
|
|
|
<if test="zoneList != null "> |
|
|
|
AND zone in |
|
|
|
<foreach collection="zoneList" item="item" index="index" |
|
|
|
separator="," open="(" close=")"> |
|
|
|
#{item} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<!-- 租户数据过滤 --> |
|
|
|
<if test="tenantCode != @com.zdxt.auth.common.constant.Constants@DEFAULT_TENANT_CODE and tenantCode != null and tenantCode != ''"> |
|
|
|
AND d.tenant_code = #{tenantCode} |
|
|
|
@ -200,7 +209,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectDeptById" parameterType="string" resultMap="DeptResult"> |
|
|
|
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.dept_type,d.creditcode, |
|
|
|
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.dept_type,d.creditcode,d.zone, |
|
|
|
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name |
|
|
|
from sys_dept d |
|
|
|
where d.dept_id = #{deptId} |
|
|
|
@ -278,6 +287,7 @@ |
|
|
|
<if test="taskId != null and taskId != ''">taskId,</if> |
|
|
|
<if test="systemId != null and systemId != ''">systemId,</if> |
|
|
|
<if test="creditcode != null and creditcode != ''">creditcode,</if> |
|
|
|
<if test="zone != null">zone,</if> |
|
|
|
create_time |
|
|
|
)values( |
|
|
|
<if test="deptId != null and deptId != ''">#{deptId},</if> |
|
|
|
@ -315,6 +325,7 @@ |
|
|
|
<if test="taskId != null and taskId != ''">#{taskId},</if> |
|
|
|
<if test="systemId != null and systemId != ''">#{systemId},</if> |
|
|
|
<if test="creditcode != null and creditcode != ''">#{creditcode},</if> |
|
|
|
<if test="zone != null">#{zone},</if> |
|
|
|
sysdate() |
|
|
|
) |
|
|
|
</insert> |
|
|
|
@ -334,6 +345,7 @@ |
|
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if> |
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
|
|
<if test="kingdeeOrgId != null and kingdeeOrgId != ''">kingdee_org_id = #{kingdeeOrgId},</if> |
|
|
|
<if test="zone != null">zone = #{zone},</if> |
|
|
|
<if test="kingdeeOrgParentId != null and kingdeeOrgParentId != ''">kingdee_org_parent_id = #{kingdeeOrgParentId},</if> |
|
|
|
update_time = sysdate() |
|
|
|
</set> |
|
|
|
@ -378,6 +390,7 @@ |
|
|
|
<if test="taskId != null and taskId != ''">taskId = #{taskId},</if> |
|
|
|
<if test="systemId != null and systemId != ''">systemId = #{systemId},</if> |
|
|
|
<if test="creditcode != null and creditcode != ''">creditcode = #{creditcode},</if> |
|
|
|
<if test="zone != null">zone = #{zone},</if> |
|
|
|
update_time = sysdate() |
|
|
|
</set> |
|
|
|
where organizationId = #{organizationId} |
|
|
|
|