|
|
@@ -171,7 +171,7 @@
|
|
|
<result property="name" column="name"/>
|
|
|
<result property="parentId" column="parent_id"/>
|
|
|
<result property="type" column="type"/>
|
|
|
- <collection property="privateJoins" ofType="org.springblade.business.entity.StandardInfoPrivateJoin" select="findByPrivateJoinLeftId" column="{leftId=id}">
|
|
|
+ <collection property="group" ofType="org.springblade.business.vo.StandardInfoPrivateJoinGroupVO" select="findByPrivateJoinLeftId" column="{leftId=id}">
|
|
|
</collection>
|
|
|
</resultMap>
|
|
|
|
|
|
@@ -194,22 +194,62 @@
|
|
|
u_standard_info a
|
|
|
INNER JOIN u_standard_info_private_join b on a.id = b.standard_info_id and a.is_deleted = b.is_deleted
|
|
|
where
|
|
|
- a.standard_id = #{id} and a.is_deleted = 0
|
|
|
+ a.is_deleted = 0
|
|
|
+ <if test="id != null">
|
|
|
+ and a.standard_id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="leftId != null">
|
|
|
+ and b.standard_info_id = #{leftId}
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
b.standard_info_id
|
|
|
</select>
|
|
|
|
|
|
- <select id="findByPrivateJoinLeftId" resultType="org.springblade.business.entity.StandardInfoPrivateJoin">
|
|
|
+
|
|
|
+ <resultMap id="BaseResultElementGroupPrivate" type="org.springblade.business.vo.StandardInfoPrivateJoinGroupVO">
|
|
|
+ <result property="standardInfoId" column="standard_info_id"/>
|
|
|
+ <result property="privateId" column="private_id"/>
|
|
|
+ <result property="privateName" column="privateName"/>
|
|
|
+ <result property="elementNames" column="elementNames"/>
|
|
|
+ <collection property="keys" ofType="org.springblade.business.vo.StandardElementVo" select="findByPrivateGroupJoinLeftId" column="{standardInfoId=standard_info_id,privateId=private_id}">
|
|
|
+ </collection>
|
|
|
+ </resultMap>
|
|
|
+ <select id="findByPrivateJoinLeftId" resultMap="BaseResultElementGroupPrivate">
|
|
|
SELECT
|
|
|
- <include refid="Base_Private_Column_List"/>,
|
|
|
- b.node_name privateName
|
|
|
+ a.standard_info_id,
|
|
|
+ a.private_id,
|
|
|
+ b.node_name privateName,
|
|
|
+ GROUP_CONCAT(col_name SEPARATOR ',') elementNames
|
|
|
FROM
|
|
|
u_standard_info_private_join a
|
|
|
INNER JOIN m_wbs_tree_private b ON a.private_id = b.p_key_id AND a.is_deleted = b.is_deleted
|
|
|
WHERE
|
|
|
a.standard_info_id = #{leftId}
|
|
|
AND a.is_deleted = 0
|
|
|
+ GROUP BY
|
|
|
+ a.private_id
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="findByPrivateGroupJoinLeftId" resultType="org.springblade.business.vo.StandardElementVo">
|
|
|
+ SELECT
|
|
|
+ col_key,col_name
|
|
|
+ FROM
|
|
|
+ u_standard_info_private_join a
|
|
|
+ INNER JOIN m_wbs_tree_private b ON a.private_id = b.p_key_id AND a.is_deleted = b.is_deleted
|
|
|
+ WHERE
|
|
|
+ a.standard_info_id = #{standardInfoId} and a.private_id = #{privateId}
|
|
|
+ AND a.is_deleted = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!-- ``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` -->
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<select id="effectPreview" resultMap="BaseResultElementJoin">
|
|
|
SELECT
|
|
|
a.*
|