|
@@ -56,6 +56,7 @@
|
|
|
<result column="primaryKeyId" property="primaryKeyId"/>
|
|
|
<result column="nodeType" property="nodeType"/>
|
|
|
<result column="isExistForm" property="isExistForm"/>
|
|
|
+ <result column="majorDataType" property="majorDataType"/>
|
|
|
</resultMap>
|
|
|
<insert id="insertCombination1">
|
|
|
INSERT INTO m_wbs_tree_private(p_key_id, id, wbs_id, wbs_type, project_id, tenant_id, parent_id, ancestors,
|
|
@@ -268,36 +269,37 @@
|
|
|
|
|
|
<select id="lazyTree" resultMap="treeNodeResultMap">
|
|
|
SELECT
|
|
|
- dept.p_key_id as "primaryKeyId",
|
|
|
- dept.type AS "type",
|
|
|
- dept.table_type,
|
|
|
- dept.id,
|
|
|
- dept.parent_id,
|
|
|
- dept.node_name AS title,
|
|
|
- dept.node_type AS "nodeType",
|
|
|
- dept.id AS "value",
|
|
|
- dept.id AS "key",
|
|
|
- dept.is_exist_form AS "isExistForm",
|
|
|
+ d.p_key_id as "primaryKeyId",
|
|
|
+ d.type AS "type",
|
|
|
+ d.table_type,
|
|
|
+ d.id,
|
|
|
+ d.parent_id,
|
|
|
+ d.node_name AS title,
|
|
|
+ d.node_type AS "nodeType",
|
|
|
+ d.id AS "value",
|
|
|
+ d.id AS "key",
|
|
|
+ d.major_data_type AS "majorDataType",
|
|
|
+ d.is_exist_form AS "isExistForm",
|
|
|
(
|
|
|
SELECT
|
|
|
CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
|
|
|
FROM
|
|
|
m_wbs_tree_private
|
|
|
WHERE
|
|
|
- parent_id = dept.id and is_deleted = 0
|
|
|
+ parent_id = d.id and is_deleted = 0
|
|
|
) AS "has_children"
|
|
|
FROM
|
|
|
- m_wbs_tree_private dept
|
|
|
+ m_wbs_tree_private d
|
|
|
WHERE
|
|
|
- dept.parent_id = #{parentId} AND dept.is_deleted = 0
|
|
|
+ d.parent_id = #{parentId} AND d.is_deleted = 0
|
|
|
<if test="tenantId!=null and tenantId!=''">
|
|
|
- and dept.tenant_id = #{tenantId}
|
|
|
+ and d.tenant_id = #{tenantId}
|
|
|
</if>
|
|
|
- AND dept.project_id = #{projectId}
|
|
|
- AND dept.wbs_id = #{wbsId}
|
|
|
- AND dept.type = 1
|
|
|
+ AND d.project_id = #{projectId}
|
|
|
+ AND d.wbs_id = #{wbsId}
|
|
|
+ AND d.type = 1
|
|
|
AND status = 1
|
|
|
- ORDER BY dept.sort
|
|
|
+ ORDER BY d.sort
|
|
|
</select>
|
|
|
|
|
|
|