|
@@ -843,6 +843,11 @@
|
|
|
WHERE p_key_id = #{wbsTreeContract.pKeyId}
|
|
|
</if>
|
|
|
</update>
|
|
|
+ <update id="updateAncestorsPid">
|
|
|
+ UPDATE m_wbs_tree_contract
|
|
|
+ SET ancestors_p_id = #{ancestorsPid},ancestors = #{ancestors}
|
|
|
+ WHERE p_key_id = #{pKeyId}
|
|
|
+ </update>
|
|
|
|
|
|
<select id="selectQueryValueLikeNodeName" resultMap="ResultMap">
|
|
|
select *
|
|
@@ -980,6 +985,15 @@
|
|
|
AND wtc.wbs_id = #{wbsId}
|
|
|
AND wtc.is_deleted = 0;
|
|
|
</select>
|
|
|
+ <select id="findIsExistTreeNode" resultType="java.lang.Integer">
|
|
|
+ SELECT count(0) FROM `m_wbs_tree_contract` a
|
|
|
+ left join m_wbs_tree_private b on a.is_type_private_pid = b.p_key_id
|
|
|
+ where a.p_key_id in
|
|
|
+ <foreach collection="list" item="item" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ and (b.p_key_id is null or b.is_deleted = 1)
|
|
|
+ </select>
|
|
|
<select id="selectListForcheckAllNodeDate" resultType="org.springblade.manager.entity.WbsTreeContract">
|
|
|
select * from m_wbs_tree_contract where
|
|
|
<if test="projectId!=null and projectId!=''">
|
|
@@ -1039,14 +1053,18 @@
|
|
|
</foreach>
|
|
|
|
|
|
</select>
|
|
|
- <select id="findIsExistTreeNode" resultType="java.lang.Integer">
|
|
|
- SELECT count(0) FROM `m_wbs_tree_contract` a
|
|
|
- left join m_wbs_tree_private b on a.is_type_private_pid = b.p_key_id
|
|
|
- where a.p_key_id in
|
|
|
- <foreach collection="list" item="item" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
+ <select id="getSiblingWbsContract" resultType="org.springblade.manager.entity.WbsTreeContract">
|
|
|
+ select * from m_wbs_tree_contract where p_id= (select p_id from m_wbs_tree_contract where p_key_id=#{pKeyId}) and is_deleted=0;
|
|
|
+ </select>
|
|
|
+ <select id="getWbsTreeContractsByPKeyIds" resultType="org.springblade.manager.entity.WbsTreeContract">
|
|
|
+ select * from m_wbs_tree_contract where p_key_id in (
|
|
|
+ <foreach collection="list" item="pkeyId" separator=",">
|
|
|
+ #{pkeyId}
|
|
|
</foreach>
|
|
|
- and (b.p_key_id is null or b.is_deleted = 1)
|
|
|
+ ) and is_deleted=0
|
|
|
+ </select>
|
|
|
+ <select id="getChildWbsTreeContracts" resultType="org.springblade.manager.entity.WbsTreeContract">
|
|
|
+ select * from m_wbs_tree_contract where ancestors_p_id like #{pId} and is_deleted=0
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|