|
|
@@ -100,9 +100,6 @@
|
|
|
</foreach>
|
|
|
)
|
|
|
</if>
|
|
|
- and a.id in (
|
|
|
- select id from core_resumption_plan
|
|
|
- where 1=1
|
|
|
<if test="info.checkSub==false">
|
|
|
and plan_of_org_id=#{info.orgId}
|
|
|
</if>
|
|
|
@@ -110,89 +107,79 @@
|
|
|
and plan_of_org_id in (select id from sys_org
|
|
|
where path like concat((select path from sys_org where id=#{info.orgId}),'%'))
|
|
|
</if>
|
|
|
- and parent_id not in (select id from core_resumption_plan
|
|
|
- where 1=1
|
|
|
- <if test="info.checkSub==false">
|
|
|
- and plan_of_org_id=#{info.orgId}
|
|
|
- </if>
|
|
|
- <if test="info.checkSub==true">
|
|
|
- and plan_of_org_id in (select id from sys_org
|
|
|
- where path like concat((select path from sys_org where id=#{info.orgId}),'%'))
|
|
|
- </if>)
|
|
|
- )
|
|
|
</where>
|
|
|
</select>
|
|
|
- <select id="selectChildren" parameterType="com.xunmei.core.resumption.dto.plan.CoreResumptionPlanPageDto"
|
|
|
- resultMap="appPlans">
|
|
|
- SELECT
|
|
|
- a.*,
|
|
|
- u2.name as update_name,
|
|
|
- d.roleNames,
|
|
|
- b.orgId,
|
|
|
- b.orgNames,
|
|
|
- o.short_name as plan_of_org_name,
|
|
|
- g.short_name as plan_create_org_name
|
|
|
- FROM
|
|
|
- core_resumption_plan a
|
|
|
- left join sys_user u2 on u2.id=a.modified_by
|
|
|
- LEFT JOIN (
|
|
|
- SELECT
|
|
|
- m.plan_id,
|
|
|
- GROUP_CONCAT( n.`short_name` ) orgNames,
|
|
|
- GROUP_CONCAT( n.id ) orgId
|
|
|
- FROM
|
|
|
- core_resumption_plan_to_exec_org m
|
|
|
- LEFT JOIN sys_org n ON m.org_id = n.id
|
|
|
+<!-- <select id="selectChildren" parameterType="com.xunmei.core.resumption.dto.plan.CoreResumptionPlanPageDto"-->
|
|
|
+<!-- resultMap="appPlans">-->
|
|
|
+<!-- SELECT-->
|
|
|
+<!-- a.*,-->
|
|
|
+<!-- u2.name as update_name,-->
|
|
|
+<!-- d.roleNames,-->
|
|
|
+<!-- b.orgId,-->
|
|
|
+<!-- b.orgNames,-->
|
|
|
+<!-- o.short_name as plan_of_org_name,-->
|
|
|
+<!-- g.short_name as plan_create_org_name-->
|
|
|
+<!-- FROM-->
|
|
|
+<!-- core_resumption_plan a-->
|
|
|
+<!-- left join sys_user u2 on u2.id=a.modified_by-->
|
|
|
+<!-- LEFT JOIN (-->
|
|
|
+<!-- SELECT-->
|
|
|
+<!-- m.plan_id,-->
|
|
|
+<!-- GROUP_CONCAT( n.`short_name` ) orgNames,-->
|
|
|
+<!-- GROUP_CONCAT( n.id ) orgId-->
|
|
|
+<!-- FROM-->
|
|
|
+<!-- core_resumption_plan_to_exec_org m-->
|
|
|
+<!-- LEFT JOIN sys_org n ON m.org_id = n.id-->
|
|
|
|
|
|
- GROUP BY
|
|
|
- m.plan_id
|
|
|
- ) b ON a.id = b.plan_id
|
|
|
- LEFT JOIN (
|
|
|
- SELECT
|
|
|
- r.plan_id,
|
|
|
- group_concat( t.`role_name` ) roleNames
|
|
|
- FROM
|
|
|
- core_resumption_plan_to_role r
|
|
|
- LEFT JOIN sys_role t ON r.role_id = t.id
|
|
|
- GROUP BY
|
|
|
- r.plan_id
|
|
|
- ) d ON a.id = d.plan_id
|
|
|
- LEFT JOIN sys_org o ON a.plan_of_org_id = o.id
|
|
|
- LEFT JOIN sys_org g ON a.plan_create_org_id = g.id
|
|
|
- <where>
|
|
|
- a.deleted=0
|
|
|
- <if test="info.planName != '' and info.planName != null">
|
|
|
- and a.plan_name LIKE CONCAT('%', #{info.planName}, '%' )
|
|
|
- </if>
|
|
|
- <if test="info.planStatus != null">
|
|
|
- and a.plan_status = #{info.planStatus}
|
|
|
- </if>
|
|
|
- <if test="info.planCycle != null">
|
|
|
- and a.plan_cycle = #{info.planCycle}
|
|
|
- </if>
|
|
|
- <if test="info.planExec != null">
|
|
|
- and a.plan_exec = #{info.planExec}
|
|
|
- </if>
|
|
|
- <if test="info.orgType != null">
|
|
|
- and a.exec_org_type = #{info.orgType}
|
|
|
- </if>
|
|
|
- <!-- <if test="info.checkSub==true">-->
|
|
|
- <!-- and a.plan_of_org_id in (select id from sys_org where path like concat( (select path from sys_org where-->
|
|
|
- <!-- id =#{info.orgId}),'%'))-->
|
|
|
- <!-- </if>-->
|
|
|
- <if test="info.roleList != null and info.roleList.size > 0">
|
|
|
- and a.id in (select plan_id from core_resumption_plan_to_role where role_id in
|
|
|
- <foreach collection="info.roleList" item="roleId" index="index" open="(" separator="," close=")">
|
|
|
- #{roleId}
|
|
|
- </foreach>
|
|
|
- )
|
|
|
- </if>
|
|
|
- and a.parent_id in
|
|
|
- <foreach collection="info.parentId" item="id" open="(" close=")" separator=",">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
+<!-- GROUP BY-->
|
|
|
+<!-- m.plan_id-->
|
|
|
+<!-- ) b ON a.id = b.plan_id-->
|
|
|
+<!-- LEFT JOIN (-->
|
|
|
+<!-- SELECT-->
|
|
|
+<!-- r.plan_id,-->
|
|
|
+<!-- group_concat( t.`role_name` ) roleNames-->
|
|
|
+<!-- FROM-->
|
|
|
+<!-- core_resumption_plan_to_role r-->
|
|
|
+<!-- LEFT JOIN sys_role t ON r.role_id = t.id-->
|
|
|
+<!-- GROUP BY-->
|
|
|
+<!-- r.plan_id-->
|
|
|
+<!-- ) d ON a.id = d.plan_id-->
|
|
|
+<!-- LEFT JOIN sys_org o ON a.plan_of_org_id = o.id-->
|
|
|
+<!-- LEFT JOIN sys_org g ON a.plan_create_org_id = g.id-->
|
|
|
+<!-- <where>-->
|
|
|
+<!-- a.deleted=0-->
|
|
|
+<!-- <if test="info.planName != '' and info.planName != null">-->
|
|
|
+<!-- and a.plan_name LIKE CONCAT('%', #{info.planName}, '%' )-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="info.planStatus != null">-->
|
|
|
+<!-- and a.plan_status = #{info.planStatus}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="info.planCycle != null">-->
|
|
|
+<!-- and a.plan_cycle = #{info.planCycle}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="info.planExec != null">-->
|
|
|
+<!-- and a.plan_exec = #{info.planExec}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="info.orgType != null">-->
|
|
|
+<!-- and a.exec_org_type = #{info.orgType}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <!– <if test="info.checkSub==true">–>-->
|
|
|
+<!-- <!– and a.plan_of_org_id in (select id from sys_org where path like concat( (select path from sys_org where–>-->
|
|
|
+<!-- <!– id =#{info.orgId}),'%'))–>-->
|
|
|
+<!-- <!– </if>–>-->
|
|
|
+<!-- <if test="info.roleList != null and info.roleList.size > 0">-->
|
|
|
+<!-- and a.id in (select plan_id from core_resumption_plan_to_role where role_id in-->
|
|
|
+<!-- <foreach collection="info.roleList" item="roleId" index="index" open="(" separator="," close=")">-->
|
|
|
+<!-- #{roleId}-->
|
|
|
+<!-- </foreach>-->
|
|
|
+<!-- )-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- and a.parent_id in-->
|
|
|
+<!-- <foreach collection="info.parentId" item="id" open="(" close=")" separator=",">-->
|
|
|
+<!-- #{id}-->
|
|
|
+<!-- </foreach>-->
|
|
|
+<!-- </where>-->
|
|
|
+<!-- </select>-->
|
|
|
<select id="selectItemPage" parameterType="com.xunmei.core.resumption.vo.appPlan.RuleItemVo"
|
|
|
resultType="com.xunmei.core.resumption.vo.appPlan.RuleItemVo">
|
|
|
select
|