|
@@ -38,6 +38,7 @@
|
|
|
<resultMap id="resultMap2" type="org.springblade.manager.vo.WbsTreePrivateVO2">
|
|
|
<result column="pKeyId" property="pKeyId"/>
|
|
|
<result column="wbs_id" property="wbsId"/>
|
|
|
+ <result column="wbs_type" property="wbsType"/>
|
|
|
<result column="project_id" property="projectId"/>
|
|
|
<result column="project_name" property="projectName"/>
|
|
|
</resultMap>
|
|
@@ -55,11 +56,11 @@
|
|
|
</resultMap>
|
|
|
<insert id="insertCombination1">
|
|
|
INSERT INTO m_wbs_tree_private(
|
|
|
- p_key_id,id,wbs_id,project_id,tenant_id,parent_id,ancestors,dept_category,dept_name,full_name,sort,remark,`type`,
|
|
|
+ p_key_id,id,wbs_id,wbs_type,project_id,tenant_id,parent_id,ancestors,dept_category,dept_name,full_name,sort,remark,`type`,
|
|
|
table_type,create_time,create_user,create_dept,update_user,update_time,`STATUS`,is_deleted,
|
|
|
unique_code,partition_code,is_expernode,is_concrete,table_owner,major_data_type,init_table_name,is_link_table)
|
|
|
VALUES(
|
|
|
- #{snowId},#{wbsTree.id},#{wbsTree.wbsId},#{projectId},#{wbsTree.tenantId},#{wbsTree.parentId},#{wbsTree.ancestors},
|
|
|
+ #{snowId},#{wbsTree.id},#{wbsTree.wbsId},#{wbsType},#{projectId},#{wbsTree.tenantId},#{wbsTree.parentId},#{wbsTree.ancestors},
|
|
|
#{wbsTree.deptCategory},#{wbsTree.deptName},#{wbsTree.fullName},#{wbsTree.sort},#{wbsTree.remark},#{wbsTree.type},
|
|
|
#{wbsTree.tableType},#{wbsTree.createTime},#{wbsTree.createUser},#{wbsTree.createDept},#{wbsTree.updateUser},#{wbsTree.updateTime},
|
|
|
#{wbsTree.status},#{wbsTree.isDeleted},#{wbsTree.uniqueCode},#{wbsTree.partitionCode},#{wbsTree.isExpernode},#{wbsTree.isConcrete},
|
|
@@ -68,11 +69,11 @@
|
|
|
|
|
|
<insert id="insertCombination2">
|
|
|
INSERT INTO m_wbs_tree_private(
|
|
|
- p_key_id,id,wbs_id,project_id,tenant_id,parent_id,ancestors,dept_category,dept_name,full_name,sort,remark,`type`,
|
|
|
+ p_key_id,id,wbs_id,wbs_type,project_id,tenant_id,parent_id,ancestors,dept_category,dept_name,full_name,sort,remark,`type`,
|
|
|
table_type,create_time,create_user,create_dept,update_user,update_time,`STATUS`,is_deleted,
|
|
|
unique_code,partition_code,is_expernode,is_concrete,table_owner,major_data_type,init_table_name,is_link_table)
|
|
|
VALUES(
|
|
|
- #{snowId},#{wbsTree.id},#{wbsTree.wbsId},#{projectId},#{wbsTree.tenantId},#{wbsTree.parentId},#{wbsTree.ancestors},
|
|
|
+ #{snowId},#{wbsTree.id},#{wbsTree.wbsId},#{wbsTree.wbsType},#{projectId},#{wbsTree.tenantId},#{wbsTree.parentId},#{wbsTree.ancestors},
|
|
|
#{wbsTree.deptCategory},#{wbsTree.deptName},#{wbsTree.fullName},#{wbsTree.sort},#{wbsTree.remark},#{wbsTree.type},
|
|
|
#{wbsTree.tableType},#{wbsTree.createTime},#{wbsTree.createUser},#{wbsTree.createDept},#{wbsTree.updateUser},#{wbsTree.updateTime},
|
|
|
#{wbsTree.status},#{wbsTree.isDeleted},#{wbsTree.uniqueCode},#{wbsTree.partitionCode},#{wbsTree.isExpernode},#{wbsTree.isConcrete},
|
|
@@ -177,6 +178,7 @@
|
|
|
SELECT
|
|
|
wtp.p_key_id AS "pKeyId",
|
|
|
wtp.wbs_id,
|
|
|
+ wtp.wbs_type,
|
|
|
wtp.project_id,
|
|
|
( SELECT project_name FROM m_project_info pi WHERE wtp.project_id = pi.id ) AS project_name
|
|
|
FROM
|
|
@@ -206,6 +208,7 @@
|
|
|
</if>
|
|
|
ORDER BY sort
|
|
|
</select>
|
|
|
+
|
|
|
<select id="selectByCondition" resultType="org.springblade.manager.entity.WbsTreePrivate">
|
|
|
SELECT
|
|
|
*
|
|
@@ -213,12 +216,13 @@
|
|
|
m_wbs_tree_private
|
|
|
WHERE
|
|
|
id = #{id}
|
|
|
- AND project_id = #{getReferencePrivateWbsProjectId}
|
|
|
+ AND project_id = #{projectId}
|
|
|
AND wbs_id = #{wbsId}
|
|
|
AND STATUS = 1
|
|
|
AND is_deleted = 0
|
|
|
AND type = 1
|
|
|
</select>
|
|
|
+
|
|
|
<select id="selectByCondition2" resultType="org.springblade.manager.entity.WbsTreePrivate">
|
|
|
SELECT
|
|
|
*
|
|
@@ -245,6 +249,7 @@
|
|
|
AND is_deleted = 0
|
|
|
AND `status` = 1
|
|
|
AND parent_id = #{tableId}
|
|
|
+ AND project_id = #{projectId}
|
|
|
</select>
|
|
|
<select id="selectByNodeTable" resultType="org.springblade.manager.vo.WbsNodeTableVO">
|
|
|
SELECT
|
|
@@ -291,5 +296,8 @@
|
|
|
AND type = 1
|
|
|
AND parent_id = 0
|
|
|
</select>
|
|
|
+ <select id="selectByPKeyId" resultType="org.springblade.manager.entity.WbsTreePrivate">
|
|
|
+ SELECT * FROM m_wbs_tree_private WHERE p_key_id = #{referenceWbsTemplateId}
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|