|
|
@@ -146,17 +146,17 @@
|
|
|
</choose>
|
|
|
</sql>
|
|
|
<sql id="pageIncludeP">
|
|
|
+ <if test="request.planName!=null">
|
|
|
+ and p.plan_name like concat('%',#{request.planName},'%')
|
|
|
+ </if>
|
|
|
<if test="request.execOrgType!=null">
|
|
|
and p.exec_org_type = #{request.execOrgType}
|
|
|
</if>
|
|
|
- <if test="request.planCycle!=null">
|
|
|
- and p.plan_cycle = #{request.planCycle}
|
|
|
- </if>
|
|
|
<if test="request.planStatus!=null">
|
|
|
and p.plan_status = #{request.planStatus}
|
|
|
</if>
|
|
|
- <if test="request.planName!=null">
|
|
|
- and p.plan_name like concat('%',#{request.planName},'%')
|
|
|
+ <if test="request.planCycle!=null">
|
|
|
+ and p.plan_cycle = #{request.planCycle}
|
|
|
</if>
|
|
|
<choose>
|
|
|
<when test="request.checkSub==true">
|
|
|
@@ -427,12 +427,7 @@
|
|
|
where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
- <delete id="deleteCoreEduTrainingPlanByIds" parameterType="String">
|
|
|
- delete from core_edu_training_plan where id in
|
|
|
- <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
+
|
|
|
<select id="selectPageData" resultType="com.xunmei.common.core.domain.edu.vo.CoreEduTrainingPlanPageVo">
|
|
|
select
|
|
|
p.id as id,
|
|
|
@@ -450,6 +445,35 @@
|
|
|
p.belong_org_id,
|
|
|
p.belong_org_name
|
|
|
from core_edu_training_plan p left join sys_user u on p.update_by=u.id
|
|
|
+ where p.deleted = 0
|
|
|
+ <if test="request.planRoleId!=null">
|
|
|
+ and p.id in ( select distinct p1.id
|
|
|
+ from core_edu_training_plan p1
|
|
|
+ inner join core_edu_training_plan_to_role r1 on p1.id = r1.plan_id
|
|
|
+ where p1.deleted = 0
|
|
|
+ and p1.plan_status = 0
|
|
|
+ and r1.role_id = #{request.planRoleId})
|
|
|
+ </if>
|
|
|
+ <include refid="pageIncludeP"/>
|
|
|
+ order by p.create_time desc
|
|
|
+ </select>
|
|
|
+ <!--<select id="selectPageData" resultType="com.xunmei.common.core.domain.edu.vo.CoreEduTrainingPlanPageVo">
|
|
|
+ select
|
|
|
+ p.id as id,
|
|
|
+ p.plan_name,
|
|
|
+ p.create_org_id,
|
|
|
+ p.create_org_name,
|
|
|
+ p.exec_org_type,
|
|
|
+ p.plan_cycle,
|
|
|
+ p.exec_times,
|
|
|
+ p.remark,
|
|
|
+ u.name as updateBy,
|
|
|
+ p.plan_status,
|
|
|
+ p.issue,
|
|
|
+ p.standard,
|
|
|
+ p.belong_org_id,
|
|
|
+ p.belong_org_name
|
|
|
+ from core_edu_training_plan p left join sys_user u on p.update_by=u.id
|
|
|
where p.deleted = 0 and p.parent_id is null
|
|
|
and p.standard=1 and p.issue=1
|
|
|
<if test="request.planRoleId!=null">
|
|
|
@@ -457,13 +481,13 @@
|
|
|
</if>
|
|
|
and p.id in ( select sp.parent_id from core_edu_training_plan sp where sp.deleted = 0 and sp.parent_id is not
|
|
|
null<include refid="pageIncludeSP"/>)
|
|
|
- <!-- 不是标准计划但是也没下发: 行社自建的计划 -->
|
|
|
+ <!– 不是标准计划但是也没下发: 行社自建的计划 –>
|
|
|
or ( p.standard=0 and p.issue=0 and p.deleted=0 and p.parent_id is null
|
|
|
<if test="request.planRoleId!=null">
|
|
|
and p.id in ( <include refid="pageRoleIncludeReuqest"/>)
|
|
|
</if>
|
|
|
<include refid="pageIncludeP"/>)
|
|
|
- <!-- 是标准计划但是未下发 -->
|
|
|
+ <!– 是标准计划但是未下发 –>
|
|
|
or ( p.standard=1 and p.issue=0 and p.deleted=0 and p.parent_id is null
|
|
|
<if test="request.planRoleId!=null">
|
|
|
and p.id in ( <include refid="pageRoleIncludeReuqest"/>)
|
|
|
@@ -475,51 +499,7 @@
|
|
|
</if>
|
|
|
<include refid="pageIncludeP"/>)
|
|
|
order by p.create_time desc
|
|
|
- </select>
|
|
|
- <select id="selectPageData1" resultType="com.xunmei.common.core.domain.edu.vo.CoreEduTrainingPlanPageVo">
|
|
|
- select p.id as id,
|
|
|
- p.plan_name,
|
|
|
- p.create_org_id,
|
|
|
- p.create_org_name,
|
|
|
- p.exec_org_type,
|
|
|
- p.plan_cycle,
|
|
|
- p.exec_times,
|
|
|
- p.remark,
|
|
|
- u.name as updateBy,
|
|
|
- p.plan_status,
|
|
|
- p.issue,
|
|
|
- p.standard,
|
|
|
- p.belong_org_id as belongOrgId,
|
|
|
- p.belong_org_name as belongOrgName
|
|
|
- from core_edu_training_plan p
|
|
|
- left join sys_user u on p.update_by = u.id
|
|
|
- <if test="request.planRoleId!=null">
|
|
|
- left join (select id from core_edu_training_plan p1 inner join core_edu_training_plan_to_role r1 on p1.id =
|
|
|
- r1.plan_id where r1.role_id = #{request.planRoleId} and p1.deleted=0) t on p.id = t.id and p.deleted=0
|
|
|
- </if>
|
|
|
- where p.deleted = 0 and p.create_org_id=p.belong_org_id and p.plan_status = 0 and p.parent_id is null
|
|
|
-
|
|
|
- <if test="request.execOrgType!=null">
|
|
|
- and p.exec_org_type = #{request.execOrgType}
|
|
|
- </if>
|
|
|
- <if test="request.planCycle!=null">
|
|
|
- and p.plan_cycle = #{request.planCycle}
|
|
|
- </if>
|
|
|
- <if test="request.planStatus!=null">
|
|
|
- and p.plan_status = #{request.planStatus}
|
|
|
- </if>
|
|
|
- <if test="request.planName!=null">
|
|
|
- and p.plan_name = #{request.planName}
|
|
|
- </if>
|
|
|
- <choose>
|
|
|
- <when test="request.checkSub==true">
|
|
|
- and p.belong_org_path like concat(#{request.belongOrgPath},'%')
|
|
|
- </when>
|
|
|
- <otherwise>
|
|
|
- and p.belong_org_id = #{request.belongOrgId}
|
|
|
- </otherwise>
|
|
|
- </choose>
|
|
|
- </select>
|
|
|
+ </select>-->
|
|
|
|
|
|
<select id="selectPlanRole" resultType="com.xunmei.common.core.domain.edu.vo.CoreEduTrainingPlanRoleVo">
|
|
|
SELECT distinct r.role_id as roleId,
|