|
@@ -461,4 +461,33 @@
|
|
WHERE project_id = #{projectId}) and is_deleted = 0 and from_id is null and like concat('%',#{id},'%')
|
|
WHERE project_id = #{projectId}) and is_deleted = 0 and from_id is null and like concat('%',#{id},'%')
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <update id="updateAllSonNodeIdsForArchiveAutoRule">
|
|
|
|
+
|
|
|
|
+ <if test="archiveAutoType ==1 ">
|
|
|
|
+ update m_archive_tree_contract
|
|
|
|
+ set
|
|
|
|
+ archive_auto_node_id = #{archiveAutoNodeId}
|
|
|
|
+ where
|
|
|
|
+ is_deleted = 0 and ancestors like concat('', #{ancestors}, '%');
|
|
|
|
+ </if>
|
|
|
|
+
|
|
|
|
+ update m_archive_tree_contract
|
|
|
|
+ set
|
|
|
|
+ archive_auto_type= #{archiveAutoType}
|
|
|
|
+ <if test="archiveAutoType ==2 ">
|
|
|
|
+ ,archive_auto_group_id=#{archiveAutoGroupId},
|
|
|
|
+ archive_auto_group_select=0
|
|
|
|
+ </if>
|
|
|
|
+ where
|
|
|
|
+ is_deleted = 0 and ancestors like concat('', #{ancestors}, '%')
|
|
|
|
+ /*最高并卷规则不能覆盖 分类并卷规则,单独组卷规则*/
|
|
|
|
+ <if test="archiveAutoType ==1 ">
|
|
|
|
+ and (archive_auto_type != 2 and archive_auto_type != 3 or archive_auto_type is null)
|
|
|
|
+ </if>
|
|
|
|
+ /*分类并卷规则不能覆盖单独组卷规则*/
|
|
|
|
+ <if test="archiveAutoType ==2 ">
|
|
|
|
+ and (archive_auto_type != 3 or archive_auto_type is null)
|
|
|
|
+ </if>
|
|
|
|
+ </update>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|