This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.CultivateCourseMsgMapper">
|
||||
<!--查询用户未读的培养课程消息-->
|
||||
<select id="queryUserUnreadMsg"
|
||||
resultType="jnpf.model.cultivate.vo.course.app.FtbCultivateCourseMsgForAppVO">
|
||||
SELECT
|
||||
F_Id as msgId,
|
||||
F_Desc as messageInfo,
|
||||
F_CourseId as courseId
|
||||
FROM
|
||||
ftb_cultivate_course_msg
|
||||
WHERE
|
||||
F_Id NOT IN (
|
||||
SELECT
|
||||
F_MsgId
|
||||
FROM
|
||||
ftb_cultivate_course_msg_user
|
||||
WHERE
|
||||
F_UserId = #{dto.userId}
|
||||
AND F_Status = 1
|
||||
)
|
||||
and F_State = #{dto.states}
|
||||
<if test="dto.courseId != null">
|
||||
and F_CourseId = #{dto.courseId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryUserUnreadMsgV2" resultType="jnpf.model.cultivate.vo.course.app.FtbCultivateCourseMsgForAppVO">
|
||||
SELECT
|
||||
F_Id as msgId,
|
||||
F_Desc as messageInfo,
|
||||
F_CourseId as courseId
|
||||
FROM
|
||||
ftb_cultivate_course_msg
|
||||
WHERE F_DeleteMark=0
|
||||
and F_Status = 0
|
||||
and F_UserId = #{dto.userId}
|
||||
and F_CourseId in
|
||||
<foreach item="item" collection="dto.courseIds" separator="," open="(" close=")" index="">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<update id="deleteInfoByMsgIdV2">
|
||||
delete from ftb_cultivate_course_msg
|
||||
WHERE F_UserId = #{userId}
|
||||
AND F_CourseId = #{courseId}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.CultivateCourseMsgUserMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.CultivateCoverInfoMapper">
|
||||
|
||||
|
||||
<select id="getPageList" resultType="jnpf.model.cultivate.v2.exam.vo.V2CoverVo">
|
||||
SELECT
|
||||
c.F_Id AS id,
|
||||
c.F_CategoryId AS categoryId,
|
||||
c.F_IsSystem AS isSystem,
|
||||
c.F_Path AS path,
|
||||
c.F_LastModifyTime AS lastModifyTime,
|
||||
c.F_LastModifyUserId AS userId,
|
||||
a.F_Name AS categoryName
|
||||
FROM
|
||||
ftb_cultivate_cover_info AS c
|
||||
LEFT JOIN ftb_cultivate_cover_category AS a on c.F_CategoryId= a.F_Id
|
||||
WHERE
|
||||
c.F_EnabledMark = 0
|
||||
<if test="params.categoryIds != null and params.categoryIds.size()>0">
|
||||
and c.F_CategoryId in
|
||||
<foreach collection="params.categoryIds" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.CultivateExamDrawRuleMapper">
|
||||
|
||||
<!-- 查询关联题目的规则 -->
|
||||
<select id="getConnectQuestionRule" resultType="jnpf.model.cultivate.v2.exam.vo.ConnectDrawRuleVo">
|
||||
select dr.F_ExamId examId, dr.F_Id ruleId, dr.F_QuestionType questionType
|
||||
from ftb_cultivate_exam_draw_rule dr
|
||||
inner join ftb_cultivate_exam ce on dr.F_ExamId = ce.F_Id
|
||||
where ce.F_EnabledMark = 1 and ce.F_Status in (0, 1)
|
||||
and dr.F_QuestionId is not null and dr.F_QuestionId in
|
||||
<foreach collection="questionIds" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.CultivateExamMapper">
|
||||
|
||||
<!-- 批量更新老版本考试信息 -->
|
||||
<update id="updateOldExamBatch">
|
||||
UPDATE ftb_cultivate_exam e
|
||||
JOIN (
|
||||
SELECT * FROM (
|
||||
VALUES
|
||||
<foreach collection="examList" item="item" separator=",">
|
||||
ROW(#{item.examId}, #{item.examTime}, #{item.drawMode}, #{item.drawDataBase}, #{item.needUpdate})
|
||||
</foreach>
|
||||
) AS tmp(F_Id, F_ExamTime, F_DrawMode, F_DrawDataBase, F_NeedUpdate)
|
||||
) v ON e.F_Id = v.F_Id
|
||||
SET
|
||||
e.F_DrawMode = v.F_DrawMode,
|
||||
e.F_ExamTime = v.F_ExamTime,
|
||||
e.F_DrawDataBase = v.F_DrawDataBase,
|
||||
e.F_NeedUpdate = v.F_NeedUpdate
|
||||
</update>
|
||||
<!-- 查询考试列表 -->
|
||||
<select id="selectListV2" resultType="jnpf.model.cultivate.v2.exam.vo.V2ExamListVo">
|
||||
select ce.F_Id id,
|
||||
ce.F_ExamId examId,
|
||||
ce.F_ExamName examName,
|
||||
ce.F_ExamLimitation examLimitation,
|
||||
ce.F_EndTime endTime,
|
||||
ce.F_ExamType `examType`,
|
||||
ce.F_Status `status`,
|
||||
ce.F_NeedUpdate needUpdate,
|
||||
ifnull(sum(dr.F_PickCount), 0) questionNum, ifnull(sum(dr.F_Score * dr.F_PickCount), 0) totalScore
|
||||
from ftb_cultivate_exam ce
|
||||
left join ftb_cultivate_exam_draw_rule dr on ce.F_Id = dr.F_ExamId
|
||||
where ce.F_EnabledMark = 1
|
||||
<if test="null != examType">
|
||||
and ce.F_ExamType = #{examType}
|
||||
</if>
|
||||
<if test="null != examName and '' != examName">
|
||||
and instr(ce.F_ExamName, #{examName}) > 0
|
||||
</if>
|
||||
<if test="null != needUpdate">
|
||||
and ce.F_NeedUpdate = #{needUpdate}
|
||||
</if>
|
||||
<if test="null != limitedDate and limitedDate == 0">
|
||||
and ce.F_StartTime is null and ce.F_EndTime is null
|
||||
</if>
|
||||
group by ce.F_Id, ce.F_ExamId, ce.F_ExamName, ce.F_ExamLimitation
|
||||
order by ce.F_CreatorTime desc
|
||||
</select>
|
||||
<!-- 查询受影响的抽题规则(删题后) -->
|
||||
<select id="getAffectedExamRule" resultType="jnpf.model.cultivate.v2.exam.vo.ExamDrawRuleVo">
|
||||
SELECT
|
||||
ce.F_Id AS examId,
|
||||
ce.F_DrawDataBase drawDataBase,
|
||||
dr.F_Id AS ruleId,
|
||||
dr.F_QuestionType,
|
||||
dr.F_PickCount
|
||||
FROM ftb_cultivate_exam ce
|
||||
INNER JOIN ftb_cultivate_exam_draw_rule dr ON ce.F_Id = dr.F_ExamId
|
||||
WHERE ce.F_EnabledMark = 1
|
||||
AND ce.F_Status IN (0,1)
|
||||
AND ce.F_ExamType = 0
|
||||
AND FIND_IN_SET(#{bankId}, ce.F_DrawDataBase)
|
||||
AND dr.F_QuestionType IN
|
||||
<foreach collection="typeList" item="type" open="(" separator="," close=")">
|
||||
#{type}
|
||||
</foreach>
|
||||
</select>
|
||||
<!-- 查询老版本考试列表 -->
|
||||
<select id="getOldExamList" resultType="jnpf.model.cultivate.resp.ExamPaperVo">
|
||||
select ce.F_Id examId, ce.F_PaperId paperId, cast(ce.F_ExamTime / 60 as UNSIGNED) examTime,
|
||||
tp.F_QuestionNumber questionNumber, tp.F_TotalScore totalScore, tp.F_Type drawMode, tp.F_RelationQuestionBankId drawDataBase,
|
||||
case tp.F_Type when 2 then 1 else tp.F_NeedUpdate end needUpdate,
|
||||
case ce.F_PassType when 1 then ce.F_PassMark else ROUND(tp.F_TotalScore * ce.F_PassMark / 100, 2) end passScore,
|
||||
case ce.F_ExcellentType when 1 then ce.F_ExcellentMark else ROUND(tp.F_TotalScore * ce.F_ExcellentMark / 100, 2) end excellentScore
|
||||
from ftb_cultivate_exam ce
|
||||
left join ftb_cultivate_test_paper tp on tp.F_Id = ce.F_PaperId
|
||||
where ce.F_EnabledMark = 1 and ce.F_PaperId is not null
|
||||
order by ce.F_CreatorTime desc
|
||||
</select>
|
||||
<!-- 查询我的考试列表[web] -->
|
||||
<select id="getMyExamWebList" resultType="jnpf.model.cultivate.v2.exam.vo.MyExamWebVo">
|
||||
select
|
||||
eu.F_Id userExamId,
|
||||
eu.F_ExamId examId,
|
||||
e.F_ExamName examName,
|
||||
eu.F_ExamTime examTime,
|
||||
eu.F_UserId userId,
|
||||
eu.F_Duration duration,
|
||||
eu.F_QuestionNumber questionNum,
|
||||
eu.F_TotalScore totalScore,
|
||||
eu.F_PassScore passScore,
|
||||
eu.F_Score score,
|
||||
DATE_FORMAT(eu.F_FinishTime, '%Y-%m-%d %H:%i:%s') submitTime,
|
||||
eu.F_Status myExamStatus,
|
||||
case when eu.F_VersionBatch = e.F_VersionBatch then 1 else 0 end currentVersion
|
||||
from ftb_cultivate_exam_user eu
|
||||
left join ftb_cultivate_exam e on e.F_Id = eu.F_ExamId
|
||||
where eu.F_EnabledMark = 1 and F_UserId = #{userId}
|
||||
order by eu.F_CreatorTime desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.CultivateFileMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.CultivateIdentifyApplyDetailsMapper">
|
||||
|
||||
<!--查询鉴定项得分集合-->
|
||||
<select id="getIdentifyItemList" resultType="jnpf.model.cultivate.vo.identify.IdentifyApplyDetailsInfoVo">
|
||||
select
|
||||
fciad.F_Id `id`,
|
||||
fcii.F_Name `name`,
|
||||
fcii.F_TotalScore totalScore,
|
||||
fcii.F_Type type,
|
||||
fcii.F_MinScore minScore,
|
||||
fcii.F_MaxScore maxScore,
|
||||
fcii.F_SortCode sortCode,
|
||||
fciad.F_Score score,
|
||||
fciad.F_Remark remark
|
||||
from ftb_cultivate_identify_apply_details fciad
|
||||
left join ftb_cultivate_identify_apply_details_backups fcii on fcii.F_Id = fciad.F_ItemsId
|
||||
<where>
|
||||
fciad.F_DeleteMark = 0
|
||||
<if test="id != null and id != ''">
|
||||
AND fciad.F_ApplyId = #{id}
|
||||
</if>
|
||||
</where>
|
||||
order by fcii.F_SortCode asc
|
||||
</select>
|
||||
<!--查询总分数-->
|
||||
<select id="countSumScore" resultType="java.math.BigDecimal">
|
||||
select sum(F_Score) from ftb_cultivate_identify_apply_details where F_ApplyId=#{identificationId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,658 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.CultivateIdentifyApplyMapper">
|
||||
<!--实操鉴定申请/列表-->
|
||||
<select id="getPageList" resultType="jnpf.model.cultivate.vo.identify.IdentifyApplyListDbVo">
|
||||
SELECT
|
||||
fcia.F_Id id,
|
||||
fcia.F_Name `name`,
|
||||
fcia.F_BeIdentifyUserId beIdentifyUserId,
|
||||
fcia.F_BeOfficialRankInfoJson beOfficialRankInfoJson,
|
||||
fcit.F_RuleId tableRuleId,
|
||||
fcit.F_Name tableName,
|
||||
fcit.F_DeleteMark tableStatus,
|
||||
fcia.F_Source source,
|
||||
fcia.F_IdentifyUserId identifyUserId,
|
||||
fcia.F_OfficialRankInfoJson officialRankInfoJson,
|
||||
fcia.F_UseTime useTime,
|
||||
fcia.F_IdentifyTime identifyTime,
|
||||
fcia.F_Status status,
|
||||
fcia.F_Result result,
|
||||
fcia.F_IsInitiate isInitiate
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups fcit on fcia.F_TableId = fcit.F_Id
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
<if test="req.innerPowerUserIds!= null and req.innerPowerUserIds.size()>0">
|
||||
and fcia.F_BeIdentifyUserId in
|
||||
<foreach collection="req.innerPowerUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="req.leaverUserIds != null and req.leaverUserIds.size() >0 ">
|
||||
and fcia.F_BeIdentifyUserId not in
|
||||
<foreach collection="req.leaverUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="req.keyword != null and req.keyword != ''">
|
||||
AND (fcia.F_Name like concat('%', #{req.keyword}, '%') or fcit.F_Name like concat('%',
|
||||
#{req.keyword},'%'))
|
||||
</if>
|
||||
<if test="req.status != null">
|
||||
AND fcia.F_Status = #{req.status}
|
||||
</if>
|
||||
<if test="req.result != null">
|
||||
AND fcia.F_Result = #{req.result}
|
||||
</if>
|
||||
<if test="req.orgCode != null and req.orgCode != ''">
|
||||
AND fcia.F_BeIdentifyOrgList like concat('%', #{req.orgCode}, '%')
|
||||
</if>
|
||||
<if test="req.source != null">
|
||||
AND fcia.F_Source = #{req.source}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fcia.F_Status ASC,fcia.F_CreatorTime desc,fcia.F_PlanIdentifyTime ASC
|
||||
</select>
|
||||
<!--实操鉴定申请/列表-->
|
||||
<select id="getList" resultType="jnpf.model.cultivate.vo.identify.IdentifyApplyListDbVo">
|
||||
SELECT
|
||||
fcia.F_Id id,
|
||||
fcia.F_Name `name`,
|
||||
fcia.F_BeIdentifyUserId beIdentifyUserId,
|
||||
fcia.F_BeOfficialRankInfoJson beOfficialRankInfoJson,
|
||||
fcit.F_RuleId tableRuleId,
|
||||
fcit.F_Name tableName,
|
||||
fcit.F_DeleteMark tableStatus,
|
||||
fcia.F_Source source,
|
||||
fcia.F_IdentifyUserId identifyUserId,
|
||||
fcia.F_OfficialRankInfoJson officialRankInfoJson,
|
||||
fcia.F_UseTime useTime,
|
||||
fcia.F_IdentifyTime identifyTime,
|
||||
fcia.F_Status status,
|
||||
fcia.F_Result result,
|
||||
fcia.F_IsInitiate isInitiate
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups fcit on fcia.F_TableId = fcit.F_Id
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
<if test="ids!= null and ids.size()>0">
|
||||
and fcia.F_Id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fcia.F_Status ASC,fcia.F_PlanIdentifyTime ASC
|
||||
</select>
|
||||
<!--成员培训进展/分页列表-->
|
||||
<select id="getUserIdentifyPage" resultType="jnpf.model.cultivate.vo.identify.UserIdentifyPageVo">
|
||||
SELECT
|
||||
fcia.F_Id id,
|
||||
fcia.F_Source source,
|
||||
fcia.F_Name `name`,
|
||||
fcit.F_Name tableName,
|
||||
fcia.F_UseTime useTime,
|
||||
fcia.F_IdentifyTime identifyTime,
|
||||
fcia.F_PlanIdentifyTime planIdentifyTime,
|
||||
fcia.F_Status status,
|
||||
fcia.F_Result result,
|
||||
fcia.F_BeIdentifyUserId userId,
|
||||
fcia.F_IdentifyUserId identifyUserId
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups fcit on fcia.F_TableId = fcit.F_Id
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
<if test="userId != null and userId != ''">
|
||||
AND fcia.F_BeIdentifyUserId = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fcia.F_Status ASC,fcia.F_PlanIdentifyTime ASC
|
||||
</select>
|
||||
<select id="getPageAppListCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(*) as num
|
||||
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups fcit on fcia.F_TableId = fcit.F_Id
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
<if test="req.keyword != null and req.keyword != ''">
|
||||
AND (fcia.F_Name like concat('%', #{req.keyword}, '%') or fcit.F_Name like concat('%',
|
||||
#{req.keyword},'%'))
|
||||
</if>
|
||||
<if test="req.source != null and req.source == 0">
|
||||
AND (fcia.F_Source = 0 or fcia.F_Source = 3)
|
||||
</if>
|
||||
<if test="req.source != null and req.source != 0">
|
||||
AND fcia.F_Source = #{req.source}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="req.status == -1">
|
||||
AND fcia.F_BeIdentifyUserId = #{userId}
|
||||
AND fcia.F_AppraisalResults = 0
|
||||
<!-- AND fcia.F_Status = 1-->
|
||||
</when>
|
||||
<otherwise>
|
||||
AND fcia.F_Status = #{req.status}
|
||||
<if test="userId != null and userId != ''">
|
||||
AND FIND_IN_SET(#{userId},fcia.F_IdentifyUserId) > 0
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="req.status == -1">
|
||||
ORDER BY fcia.F_IdentifyTime desc
|
||||
</when>
|
||||
<when test="req.status == 0">
|
||||
ORDER BY fcia.F_Status ASC,fcia.F_CreatorTime desc,fcia.F_PlanIdentifyTime ASC
|
||||
</when>
|
||||
<when test="req.status == 1">
|
||||
ORDER BY fcia.F_IdentifyTime desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY fcia.F_PlanIdentifyTime ASC
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<!--实操鉴定申请/app列表-->
|
||||
<select id="getPageAppList" resultType="jnpf.model.cultivate.vo.identify.IdentifyApplyListAppDbVo">
|
||||
SELECT
|
||||
fcia.F_Id id,
|
||||
fcia.F_Name `name`,
|
||||
fcit.F_Name tableName,
|
||||
fcia.F_BeIdentifyUserId beIdentifyUserId,
|
||||
fcia.F_BeOfficialRankInfoJson beOfficialRankInfoJson,
|
||||
fcia.F_IdentifyUserId identifyUserId,
|
||||
fcia.F_OfficialRankInfoJson officialRankInfoJson,
|
||||
fcia.F_Status status,
|
||||
fcia.F_Result result,
|
||||
fcia.F_Source source,
|
||||
fcia.F_SourceId sourceId,
|
||||
fcia.F_StudyFinishTime studyFinishTime,
|
||||
fcia.F_IdentifyTime identifyTime,
|
||||
fcia.F_PlanIdentifyTime planIdentifyTime,
|
||||
fcia.F_PostId postId
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups fcit on fcia.F_TableId = fcit.F_Id
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
<if test="req.keyword != null and req.keyword != ''">
|
||||
AND (fcia.F_Name like concat('%', #{req.keyword}, '%') or fcit.F_Name like concat('%',
|
||||
#{req.keyword},'%'))
|
||||
</if>
|
||||
<if test="req.source != null and req.source == 0">
|
||||
AND (fcia.F_Source = 0 or fcia.F_Source = 3)
|
||||
</if>
|
||||
<if test="req.source != null and req.source != 0">
|
||||
AND fcia.F_Source = #{req.source}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="req.status == -1">
|
||||
AND fcia.F_BeIdentifyUserId = #{userId}
|
||||
AND fcia.F_AppraisalResults = 0
|
||||
<!-- AND fcia.F_Status = 1-->
|
||||
</when>
|
||||
<when test="req.status == 0">
|
||||
AND fcia.F_Status = #{req.status}
|
||||
<if test="powerUserIds!= null and powerUserIds.size()>0">
|
||||
and fcia.F_BeIdentifyUserId in
|
||||
<foreach collection="powerUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</when>
|
||||
<when test="req.status == 1">
|
||||
AND fcia.F_Status = #{req.status}
|
||||
<if test="userId != null and userId != ''">
|
||||
AND FIND_IN_SET(#{userId},fcia.F_IdentifyUserId) > 0
|
||||
</if>
|
||||
</when>
|
||||
<when test="req.status == 2">
|
||||
AND fcia.F_Status = #{req.status}
|
||||
<if test="powerUserIds!= null and powerUserIds.size()>0">
|
||||
and fcia.F_BeIdentifyUserId in
|
||||
<foreach collection="powerUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</when>
|
||||
</choose>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="req.status == -1">
|
||||
ORDER BY fcia.F_IdentifyTime desc
|
||||
</when>
|
||||
<when test="req.status == 0">
|
||||
ORDER BY fcia.F_Status ASC,fcia.F_CreatorTime desc,fcia.F_PlanIdentifyTime ASC
|
||||
</when>
|
||||
<when test="req.status == 1">
|
||||
ORDER BY fcia.F_IdentifyTime desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY fcia.F_PlanIdentifyTime ASC
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<!--查询鉴定表有多少人使用-->
|
||||
<select id="getTableUseNumber" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*)
|
||||
FROM (SELECT count(*)
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
where fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
and fcia.F_TableId = #{tableId}
|
||||
group by fcia.F_BeIdentifyUserId) t
|
||||
</select>
|
||||
<!--成员培训进展/用户鉴定数据统计-->
|
||||
<select id="getUserIdentifyStatistics"
|
||||
resultType="jnpf.model.cultivate.vo.identify.IdentifyApplyStatisticsApiVo">
|
||||
SELECT
|
||||
fcia.F_BeIdentifyUserId userId,
|
||||
sum(IF(fcia.F_Status =1,1,0)) alreadyNumber,
|
||||
count(*) totalNumber
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
<if test="userIds!= null and userIds.size()>0">
|
||||
and fcia.F_BeIdentifyUserId in
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
group by fcia.F_BeIdentifyUserId
|
||||
</select>
|
||||
<!--根据岗位id查询岗位学习绑定的实操鉴定主键-->
|
||||
<select id="querAppplyUserIds" resultType="java.lang.String">
|
||||
SELECT DISTINCT a.F_IdentifyRecordId as Id
|
||||
FROM ftb_cultivate_position_identify_result a
|
||||
JOIN ftb_cultivate_position b ON a.F_PostLearnId = b.F_Id
|
||||
WHERE a.F_EnabledMark = 0
|
||||
AND b.F_EnabledMark = 0
|
||||
AND a.F_PostRankId = #{id}
|
||||
AND a.F_UserId = #{userId}
|
||||
AND a.F_Type = 0
|
||||
ORDER BY a.F_CreatorTime DESC
|
||||
limit 1
|
||||
</select>
|
||||
<!--查询实操鉴定任务列表-->
|
||||
<select id="queryIdentifyApplyInfo"
|
||||
resultType="jnpf.model.cultivate.vo.learn.FtbCultivateLearnTaskIdentificationInfoVO">
|
||||
SELECT
|
||||
apy.F_Id as identificationId,
|
||||
apy.F_Status as identificationStatus,
|
||||
apy.F_Result as identificationResult,
|
||||
ba.F_Name as identificationName
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS apy
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups AS ba ON ba.F_Id = apy.F_TableId
|
||||
<where>
|
||||
apy.F_DeleteMark = 0
|
||||
AND apy.F_Source = 4
|
||||
AND apy.F_SourceId = #{taskId}
|
||||
AND apy.F_BeIdentifyUserId = #{userId}
|
||||
</where>
|
||||
</select>
|
||||
<!--统计每个鉴定的鉴定人数-->
|
||||
<select id="groupIdentifyCountNum"
|
||||
resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT
|
||||
tas.F_TaskId as selectKey,
|
||||
count( * ) num
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS us
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups AS ba ON us.F_TableId = ba.F_Id
|
||||
INNER JOIN ftb_cultivate_learn_task_identification AS tas ON tas.F_IdentificationId = ba.F_TableId
|
||||
AND tas.F_TaskId = us.F_SourceId
|
||||
WHERE
|
||||
us.F_IsVisible = 0 and us.F_DeleteMark = 0 and
|
||||
tas.F_TaskId IN
|
||||
<foreach collection="taskIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="type==1">
|
||||
and us.F_Status = 1 AND us.F_Result IN ( 0, 1 )
|
||||
</if>
|
||||
GROUP BY
|
||||
tas.F_TaskId
|
||||
</select>
|
||||
|
||||
<select id="getPageListV2" resultType="jnpf.model.cultivate.v2.apply.vo.V2IdentifyApplyListVo">
|
||||
SELECT
|
||||
fcia.F_Id id,
|
||||
fcia.F_BeIdentifyUserId beIdentifyUserId,
|
||||
fcit.F_RuleId tableRuleId,
|
||||
fcit.F_Name tableName,
|
||||
fcit.F_DeleteMark tableStatus,
|
||||
fcia.F_Source source,
|
||||
fcia.F_IdentifyUserId identifyUserId,
|
||||
fcia.F_UseTime useTime,
|
||||
fcia.F_IdentifyTime identifyTime,
|
||||
fcia.F_Status status,
|
||||
fcia.F_Result result,
|
||||
fcia.F_IsInitiate isInitiate,
|
||||
fcia.F_GradeName gradeName
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups fcit on fcia.F_TableId = fcit.F_Id
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
<if test="req.innerPowerUserIds!= null and req.innerPowerUserIds.size()>0">
|
||||
and fcia.F_BeIdentifyUserId in
|
||||
<foreach collection="req.innerPowerUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="req.keyword != null and req.keyword != ''">
|
||||
AND (
|
||||
fcia.F_Name like concat('%', #{req.keyword}, '%')
|
||||
or fcit.F_Name like concat('%',#{req.keyword},'%')
|
||||
OR fcit.F_RuleId LIKE CONCAT('%',#{req.keyword},'%')
|
||||
<if test="req.userIdsKeyWord != null and req.userIdsKeyWord.size()>0">
|
||||
OR(
|
||||
(fcia.F_IdentifyUserId IN
|
||||
<foreach collection="req.userIdsKeyWord" open="(" close=")" separator="," item="x">
|
||||
#{x}
|
||||
</foreach>
|
||||
) OR
|
||||
(fcia.F_BeIdentifyUserId IN
|
||||
<foreach collection="req.userIdsKeyWord" open="(" close=")" separator="," item="x">
|
||||
#{x}
|
||||
</foreach>
|
||||
)
|
||||
)
|
||||
</if>
|
||||
)
|
||||
</if>
|
||||
<if test="req.status != null">
|
||||
AND fcia.F_Status = #{req.status}
|
||||
</if>
|
||||
<if test="req.result != null">
|
||||
AND fcia.F_Result = #{req.result}
|
||||
</if>
|
||||
|
||||
<if test="req.source != null">
|
||||
AND fcia.F_Source = #{req.source}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fcia.F_Status ASC,fcia.F_CreatorTime desc,fcia.F_PlanIdentifyTime ASC
|
||||
</select>
|
||||
|
||||
<select id="queryMyIdentifyApplyList" resultType="jnpf.model.cultivate.v2.apply.vo.V2IdentifyApplyListAppVo">
|
||||
SELECT
|
||||
DISTINCT
|
||||
fcia.F_Id id,
|
||||
fcit.F_Name tableName,
|
||||
fcit.F_CoverUrl as coverUrl,
|
||||
fcia.F_BeIdentifyUserId beIdentifyUserId,
|
||||
fcia.F_IdentifyUserId identifyUserId,
|
||||
fcia.F_Status status,
|
||||
fcia.F_Result result,
|
||||
fcia.F_Source source,
|
||||
fcia.F_SourceId sourceId,
|
||||
fcia.F_StudyFinishTime studyFinishTime,
|
||||
fcia.F_IdentifyTime identifyTime
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups fcit on fcia.F_TableId = fcit.F_Id
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
AND fcia.F_BeIdentifyUserId = #{userId}
|
||||
<if test="req.keyWord != null and req.keyWord != ''">
|
||||
AND fcit.F_Name like concat('%',#{req.keyWord},'%')
|
||||
</if>
|
||||
<if test="req.status !=-1">
|
||||
AND fcit.F_Status = #{req.status}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="req.status == 0">
|
||||
order by fcia.F_CreatorTime DESC
|
||||
</when>
|
||||
<when test="req.status == 1">
|
||||
order by FIELD(fcia.F_Result, 1, 0, 2), fcia.F_CreatorTime DESC
|
||||
</when>
|
||||
<otherwise>
|
||||
order by fcia.F_Status ASC, FIELD(fcia.F_Result, 1, 0, 2), fcia.F_CreatorTime DESC
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="queryAppIdentifyApplyList" resultType="jnpf.model.cultivate.v2.apply.vo.V2IdentifyApplyListAppVo">
|
||||
SELECT
|
||||
DISTINCT
|
||||
fcia.F_Id id,
|
||||
fcit.F_Name tableName,
|
||||
fcit.F_CoverUrl as coverUrl,
|
||||
fcia.F_BeIdentifyUserId beIdentifyUserId,
|
||||
fcia.F_IdentifyUserId identifyUserId,
|
||||
fcia.F_Status status,
|
||||
fcia.F_Result result,
|
||||
fcia.F_Source source,
|
||||
fcia.F_SourceId sourceId,
|
||||
fcia.F_StudyFinishTime studyFinishTime,
|
||||
fcia.F_IdentifyTime identifyTime
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups fcit on fcia.F_TableId = fcit.F_Id
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
<if test="req.keyWord != null and req.keyWord != ''">
|
||||
AND fcit.F_Name like concat('%',#{req.keyWord},'%')
|
||||
</if>
|
||||
|
||||
and (
|
||||
(
|
||||
fcia.F_Status = 1
|
||||
<if test="orgUserIds!= null and orgUserIds.size()>0">
|
||||
and fcia.F_BeIdentifyUserId in
|
||||
<foreach collection="orgUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
and fcia.F_IdentifyUserId = #{loginUserId}
|
||||
)
|
||||
|
||||
or (
|
||||
fcia.F_Status = 0
|
||||
and fcia.F_BeIdentifyUserId != #{loginUserId}
|
||||
and fcia.F_IdentifyUserId = ''
|
||||
<if test="powerUserIds!= null and powerUserIds.size()>0">
|
||||
and fcia.F_BeIdentifyUserId in
|
||||
<foreach collection="powerUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
|
||||
<if test="myUserIds!= null and myUserIds.size()>0">
|
||||
or (
|
||||
fcia.F_Status = 0
|
||||
and fcia.F_BeIdentifyUserId != #{loginUserId}
|
||||
and fcia.F_IdentifyUserId != ''
|
||||
and fcia.F_Id in
|
||||
<foreach collection="myUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
)
|
||||
</where>
|
||||
order by fcia.F_Status ASC, FIELD(fcia.F_Result, 1, 0, 2), fcia.F_CreatorTime DESC
|
||||
</select>
|
||||
|
||||
<select id="queryAppIdentifyApplyListWaiting"
|
||||
resultType="jnpf.model.cultivate.v2.apply.vo.V2IdentifyApplyListAppVo">
|
||||
SELECT
|
||||
DISTINCT
|
||||
fcia.F_Id id,
|
||||
fcit.F_Name tableName,
|
||||
fcit.F_CoverUrl as coverUrl,
|
||||
fcia.F_BeIdentifyUserId beIdentifyUserId,
|
||||
fcia.F_IdentifyUserId identifyUserId,
|
||||
fcia.F_Status status,
|
||||
fcia.F_Result result,
|
||||
fcia.F_Source source,
|
||||
fcia.F_SourceId sourceId,
|
||||
fcia.F_StudyFinishTime studyFinishTime,
|
||||
fcia.F_IdentifyTime identifyTime,
|
||||
fcia.F_CreatorTime creatorTime
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups fcit on fcia.F_TableId = fcit.F_Id
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
AND fcia.F_Status = 0
|
||||
and fcia.F_BeIdentifyUserId != #{loginUserId}
|
||||
<if test="req.keyWord != null and req.keyWord != ''">
|
||||
AND fcit.F_Name like concat('%',#{req.keyWord},'%')
|
||||
</if>
|
||||
and (
|
||||
(
|
||||
|
||||
fcia.F_IdentifyUserId = ''
|
||||
<if test="userIds!= null and userIds.size()>0">
|
||||
and fcia.F_BeIdentifyUserId in
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
<if test="myUserIds!= null and myUserIds.size()>0">
|
||||
or (
|
||||
fcia.F_IdentifyUserId != ''
|
||||
and fcia.F_Id in
|
||||
<foreach collection="myUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
)
|
||||
</if>
|
||||
)
|
||||
</where>
|
||||
order by fcia.F_CreatorTime DESC
|
||||
</select>
|
||||
|
||||
<select id="queryAppIdentifyApplyListComplete"
|
||||
resultType="jnpf.model.cultivate.v2.apply.vo.V2IdentifyApplyListAppVo">
|
||||
SELECT
|
||||
DISTINCT
|
||||
fcia.F_Id id,
|
||||
fcit.F_Name tableName,
|
||||
fcit.F_CoverUrl as coverUrl,
|
||||
fcia.F_BeIdentifyUserId beIdentifyUserId,
|
||||
fcia.F_IdentifyUserId identifyUserId,
|
||||
fcia.F_Status status,
|
||||
fcia.F_Result result,
|
||||
fcia.F_Source source,
|
||||
fcia.F_SourceId sourceId,
|
||||
fcia.F_StudyFinishTime studyFinishTime,
|
||||
fcia.F_IdentifyTime identifyTime
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups fcit on fcia.F_TableId = fcit.F_Id
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
and fcia.F_IsVisible = 0
|
||||
AND fcia.F_Status = 1
|
||||
<if test="req.keyWord != null and req.keyWord != ''">
|
||||
AND fcit.F_Name like concat('%',#{req.keyWord},'%')
|
||||
</if>
|
||||
and fcia.F_IdentifyUserId = #{loginUserId}
|
||||
<if test="userIds!= null and userIds.size()>0">
|
||||
and fcia.F_BeIdentifyUserId in
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="req.startTime != null and req.startTime != ''">
|
||||
AND fcia.F_IdentifyTime >= #{req.startTime}
|
||||
</if>
|
||||
<if test="req.endTime != null and req.endTime != ''">
|
||||
AND fcia.F_IdentifyTime <= #{req.endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by FIELD(fcia.F_Result, 1, 0, 2), fcia.F_CreatorTime DESC
|
||||
</select>
|
||||
|
||||
<select id="queryIdentifyApply" resultType="jnpf.entity.cultivate.CultivateIdentifyApply">
|
||||
SELECT DISTINCT fcia.F_Id id,
|
||||
fcit.F_Name name,
|
||||
fcit.F_TableId tableId,
|
||||
fcia.F_BeIdentifyUserId beIdentifyUserId,
|
||||
fcia.F_IdentifyUserId identifyUserId,
|
||||
fcia.F_Status status,
|
||||
fcia.F_Result result,
|
||||
fcia.F_Source source,
|
||||
fcia.F_SourceId sourceId,
|
||||
fcia.F_StudyFinishTime studyFinishTime,
|
||||
fcia.F_IdentifyTime identifyTime
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups fcit on fcia.F_TableId = fcit.F_Id
|
||||
|
||||
<where>
|
||||
fcia.F_DeleteMark = 0
|
||||
<if test="userId!= null and userId != ''">
|
||||
AND fcia.F_BeIdentifyUserId = #{userId}
|
||||
</if>
|
||||
<if test="identifyIds!= null and identifyIds.size()>0">
|
||||
and fcit.F_TableId in
|
||||
<foreach collection="identifyIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
and fcia.F_Source = #{source}
|
||||
and fcia.F_SourceId = #{sourceId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryMyIdentifyUserList" resultType="java.lang.String">
|
||||
SELECT DISTINCT fcia.F_Id beIdentifyUserId
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
where fcia.F_DeleteMark = 0
|
||||
AND FIND_IN_SET(#{loginUserId}, fcia.F_IdentifyUserId) > 0
|
||||
</select>
|
||||
|
||||
<!--查询用户已完成的鉴定列表(关联查询鉴定表信息)-->
|
||||
<select id="queryCompletedIdentitiesWithInfo" resultType="jnpf.model.cultivate.v2.course.vo.UserLearningStatusVo$IdentityInfo">
|
||||
SELECT
|
||||
fcia.F_TableId AS tableId,
|
||||
fcit.F_Name AS identityName
|
||||
FROM
|
||||
ftb_cultivate_identify_apply fcia
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups fcit ON fcia.F_TableId = fcit.F_Id
|
||||
WHERE
|
||||
fcia.F_DeleteMark = 0
|
||||
AND fcit.F_DeleteMark = 0
|
||||
AND fcia.F_Status = 1
|
||||
AND fcia.F_BeIdentifyUserId = #{userId}
|
||||
ORDER BY fcia.F_IdentifyTime DESC
|
||||
</select>
|
||||
|
||||
<!--统计岗位学习中已完成的鉴定数量(关联查询鉴定表和备份表)-->
|
||||
<select id="countCompletedIdentifyByPost" resultType="java.lang.Long">
|
||||
SELECT COUNT(*)
|
||||
FROM ftb_cultivate_identify_apply fcia
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups fcit ON fcia.F_TableId = fcit.F_Id
|
||||
WHERE
|
||||
fcia.F_DeleteMark = 0
|
||||
AND fcit.F_DeleteMark = 0
|
||||
AND fcia.F_BeIdentifyUserId = #{userId}
|
||||
AND fcia.F_Source = #{source}
|
||||
AND fcia.F_SourceId = #{sourceId}
|
||||
AND fcia.F_Status = 1
|
||||
AND fcit.F_TableId IN
|
||||
<foreach collection="courseIdentityIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.CultivateIdentifyItemsMapper">
|
||||
|
||||
<select id="countForTableId" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
|
||||
SELECT
|
||||
F_TableId AS selectKey,
|
||||
COUNT(1) AS num
|
||||
FROM
|
||||
ftb_cultivate_identify_items
|
||||
WHERE
|
||||
F_DeleteMark = 0
|
||||
|
||||
<if test="ids != null and ids.size() > 0 ">
|
||||
and F_TableId in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY
|
||||
F_TableId
|
||||
</select>
|
||||
|
||||
<select id="listWithCategory" resultType="jnpf.model.cultivate.vo.identify.IdentifyItemsWithCategoryVo">
|
||||
SELECT
|
||||
items.F_Id AS id,
|
||||
items.F_TableId AS tableId,
|
||||
items.F_Name AS name,
|
||||
items.F_TotalScore AS score,
|
||||
items.F_Type AS type,
|
||||
items.F_MinScore AS minScore,
|
||||
items.F_MaxScore AS maxScore,
|
||||
items.F_SortCode AS sortCode,
|
||||
items.F_PoolId AS poolId,
|
||||
items.F_IsAbnormal AS isAbnormal,
|
||||
items.F_CateId AS cateId,
|
||||
categories.F_Name AS cateName,
|
||||
items.F_BusinessId AS businessId
|
||||
FROM
|
||||
ftb_cultivate_identify_items items
|
||||
LEFT JOIN
|
||||
ftb_cultivate_identify_categories categories ON items.F_CateId = categories.F_Id
|
||||
WHERE items.F_TableId = #{tableId} AND items.F_DeleteMark = 0 order by items.F_SortCode asc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,504 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.CultivateIdentifyTableMapper">
|
||||
<!--web列表筛选条件查询-->
|
||||
<sql id="PAGE_LIST_WHERE">
|
||||
<where>
|
||||
<if test="groupIds!= null and groupIds.size()>0">
|
||||
fag.F_Id in
|
||||
<foreach collection="groupIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userIds!= null and userIds.size()>0">
|
||||
and fagu.F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
<!-- 鉴定表/列表-->
|
||||
<select id="getPageList" resultType="jnpf.model.cultivate.vo.identify.IdentifyTableListVo">
|
||||
SELECT fcit.F_Id id,
|
||||
fcit.F_Name `name`,
|
||||
fcit.F_RuleId ruleId,
|
||||
fcit.F_RuleDesc ruleDesc,
|
||||
count(fcii.F_Id) identifyCount,
|
||||
fcit.F_LastModifyTime lastModifyTime
|
||||
FROM ftb_cultivate_identify_table fcit
|
||||
LEFT JOIN ftb_cultivate_identify_items fcii on fcii.F_TableId = fcit.F_Id
|
||||
<where>
|
||||
fcit.F_DeleteMark = 0
|
||||
<if test="req.keyword != null and req.keyword != ''">
|
||||
AND (fcit.F_Name like concat('%', #{req.keyword}, '%') or fcit.F_RuleId like concat('%', #{req.keyword},
|
||||
'%') )
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY fcit.F_Id
|
||||
ORDER BY fcit.F_CreatorTime DESC,fcit.F_RuleId ASC
|
||||
</select>
|
||||
<!-- 组织列表统计-->
|
||||
<select id="organizationListStatistics"
|
||||
resultType="jnpf.model.cultivate.vo.identify.FtbCultivateIdentityOrgWisdomStatisticVO">
|
||||
SELECT
|
||||
a.F_BeIdentifyOrgList organizationID ,
|
||||
a.numberOfPeopleBeingIdentified,
|
||||
a.F_TableId as tableId,
|
||||
a.F_Name as appraisalTableName,
|
||||
IFNULL( b.excellentNumber, 0 ) AS excellentNumber,
|
||||
ROUND( IFNULL(( b.excellentNumber / a.numberOfPeopleBeingIdentified ) * 100, 0 ), 2 ) excellentRate,
|
||||
IFNULL( c.qualifiedNumberOfPeople, 0 ) AS qualifiedNumberOfPeople,
|
||||
ROUND( IFNULL(( c.qualifiedNumberOfPeople / a.numberOfPeopleBeingIdentified ) * 100, 0 ), 2 ) passRate,
|
||||
IFNULL( d.numberOfUnqualifiedPeople, 0 ) AS numberOfUnqualifiedPeople,
|
||||
ROUND( IFNULL(( d.numberOfUnqualifiedPeople / a.numberOfPeopleBeingIdentified ) * 100, 0 ), 2 ) failureRate
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
app.F_BeIdentifyOrgList,
|
||||
COUNT( ba.F_Id ) AS numberOfPeopleBeingIdentified,
|
||||
ba.F_TableId,
|
||||
ta.F_Name
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS app
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups AS ba ON app.F_TableId = ba.F_Id
|
||||
INNER JOIN ftb_cultivate_identify_table AS ta ON ba.F_TableId = ta.F_Id
|
||||
<where>
|
||||
app.F_DeleteMark=0
|
||||
<if test="dto.orgId != null and dto.orgId.size()>0">
|
||||
and app.F_BeIdentifyOrgList in
|
||||
<foreach collection="dto.orgId" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.endTime != null">
|
||||
and app.F_IdentifyTime BETWEEN #{dto.startTime} AND #{dto.endTime}
|
||||
</if>
|
||||
<if test="dto.chooseATypes!= null and dto.chooseATypes.size()>0">
|
||||
and ta.F_Id in
|
||||
<foreach collection="dto.chooseATypes" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
app.F_BeIdentifyOrgList,
|
||||
ba.F_TableId
|
||||
) a
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
app.F_BeIdentifyOrgList,
|
||||
COUNT( app.F_Result ) AS excellentNumber,
|
||||
ba.F_TableId
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS app
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups AS ba ON app.F_TableId = ba.F_Id
|
||||
WHERE
|
||||
app.F_DeleteMark=0 and
|
||||
app.F_Result = "1"
|
||||
GROUP BY
|
||||
app.F_BeIdentifyOrgList,
|
||||
ba.F_TableId
|
||||
) b ON a.F_TableId = b.F_TableId
|
||||
AND a.F_BeIdentifyOrgList = b.F_BeIdentifyOrgList
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
app.F_BeIdentifyOrgList,
|
||||
COUNT( app.F_Result ) AS qualifiedNumberOfPeople,
|
||||
ba.F_TableId
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS app
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups AS ba ON app.F_TableId = ba.F_Id
|
||||
WHERE
|
||||
app.F_Result = "0" and app.F_DeleteMark=0
|
||||
GROUP BY
|
||||
app.F_BeIdentifyOrgList,
|
||||
ba.F_TableId
|
||||
) c ON a.F_TableId = c.F_TableId
|
||||
AND a.F_BeIdentifyOrgList = c.F_BeIdentifyOrgList
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
app.F_BeIdentifyOrgList,
|
||||
COUNT( app.F_Result ) AS numberOfUnqualifiedPeople,
|
||||
ba.F_TableId
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS app
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups AS ba ON app.F_TableId = ba.F_Id
|
||||
WHERE
|
||||
app.F_Result = "2" and app.F_DeleteMark=0
|
||||
GROUP BY
|
||||
app.F_BeIdentifyOrgList,
|
||||
ba.F_TableId
|
||||
) d ON a.F_TableId = d.F_TableId
|
||||
AND a.F_BeIdentifyOrgList = d.F_BeIdentifyOrgList
|
||||
ORDER BY
|
||||
a.F_BeIdentifyOrgList DESC
|
||||
|
||||
</select>
|
||||
<!-- 个人列表统计-->
|
||||
<select id="personListStatistics"
|
||||
resultType="jnpf.model.cultivate.vo.identify.FtbCultivateIdentityPersonWisdomStatisticVO">
|
||||
SELECT
|
||||
apy.F_Id as id,
|
||||
apy.F_TableId as tableId,
|
||||
ta.F_Name as appraisalTableName,
|
||||
apy.F_BeIdentifyUserId as employeeID,
|
||||
apy.F_BeIdentifyOrgList as organizationID,
|
||||
apy.F_BeOfficialRankInfoJson as beIdentifyOrgList,
|
||||
apy.F_IdentifyUserId as examinerId,
|
||||
apy.F_IdentifyTime as identificationTime,
|
||||
apy.F_Status as authenticationStatus,
|
||||
apy.F_Result as identificationResults,
|
||||
apy.F_Source as authenticationType
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS apy
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups AS ba ON apy.F_TableId = ba.F_Id
|
||||
INNER JOIN ftb_cultivate_identify_table AS ta ON ba.F_TableId = ta.F_Id
|
||||
<where>
|
||||
apy.F_DeleteMark = 0 and apy.F_IsVisible = 0
|
||||
<if test="dto.chooseATypes!= null and dto.chooseATypes.size()>0">
|
||||
AND ta.F_Id in
|
||||
<foreach collection="dto.chooseATypes" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.selectPeoples != null and dto.selectPeoples.size()>0 and (dto.appraiserOrAppraisee == '' or dto.appraiserOrAppraisee == null) ">
|
||||
AND apy.F_BeIdentifyUserId in
|
||||
<foreach collection="dto.selectPeoples" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.selectPeoples != null and dto.selectPeoples.size()>0 and dto.appraiserOrAppraisee == 1">
|
||||
AND apy.F_BeIdentifyUserId in
|
||||
<foreach collection="dto.selectPeoples" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.selectPeoples != null and dto.selectPeoples.size()>0 and dto.appraiserOrAppraisee == 0">
|
||||
AND apy.F_IdentifyUserId in
|
||||
<foreach collection="dto.selectPeoples" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.leaverUserIds != null and dto.leaverUserIds.size()>0">
|
||||
AND apy.F_IdentifyUserId not in
|
||||
<foreach collection="dto.leaverUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="dto.tableId != null and dto.tableId != ''">
|
||||
and apy.F_TableId =#{dto.tableId}
|
||||
</if>
|
||||
<if test="dto.tableId != null and dto.tableId != ''">
|
||||
AND apy.F_Id = #{dto.tableId}
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.endTime != null">
|
||||
AND apy.F_IdentifyTime BETWEEN #{dto.startTime} AND #{dto.endTime}
|
||||
</if>
|
||||
<if test="dto.authenticationType != null and dto.authenticationType != ''">
|
||||
AND apy.F_Source = #{dto.authenticationType}
|
||||
</if>
|
||||
<if test="dto.identificationResults != null and dto.identificationResults != ''">
|
||||
AND apy.F_Result = #{dto.identificationResults}
|
||||
</if>
|
||||
<if test="dto.authenticationStatus != null and dto.authenticationStatus != ''">
|
||||
AND apy.F_Status = #{dto.authenticationStatus}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
|
||||
</select>
|
||||
<!-- 获取评估人数量-->
|
||||
<select id="numberOfAppraisers" resultType="java.lang.String">
|
||||
SELECT F_PostRankId FROM ftb_cultivate_position_exam_identify
|
||||
WHERE F_EnabledMark = 0 and F_IdentifyId = #{tableId} AND F_PostRankId IN
|
||||
<foreach collection="postionIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<!-- 查询当前人员的评估信息-->
|
||||
<select id="organizationListStatisticsForUser"
|
||||
resultType="jnpf.model.cultivate.vo.identify.FtbCultivateIdentityOrgWisdomStatisticVO">
|
||||
SELECT
|
||||
a.numberOfPeopleBeingIdentified,
|
||||
a.F_TableId as tableId,
|
||||
a.F_Name as appraisalTableName,
|
||||
IFNULL( b.excellentNumber, 0 ) AS excellentNumber,
|
||||
ROUND( IFNULL(( b.excellentNumber / a.numberOfPeopleBeingIdentified ) * 100, 0 ), 2 ) excellentRate,
|
||||
IFNULL( c.qualifiedNumberOfPeople, 0 ) AS qualifiedNumberOfPeople,
|
||||
ROUND( IFNULL(( c.qualifiedNumberOfPeople / a.numberOfPeopleBeingIdentified ) * 100, 0 ), 2 ) passRate,
|
||||
IFNULL( d.numberOfUnqualifiedPeople, 0 ) AS numberOfUnqualifiedPeople,
|
||||
ROUND( IFNULL(( d.numberOfUnqualifiedPeople / a.numberOfPeopleBeingIdentified ) * 100, 0 ), 2 ) failureRate
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
COUNT( ba.F_Id ) AS numberOfPeopleBeingIdentified,
|
||||
ba.F_TableId,
|
||||
ta.F_Name
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS app
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups AS ba ON app.F_TableId = ba.F_Id
|
||||
INNER JOIN ftb_cultivate_identify_table AS ta ON ba.F_TableId = ta.F_Id
|
||||
<where>
|
||||
app.F_DeleteMark = 0
|
||||
and app.F_IsVisible = 0
|
||||
<if test="dto.userIds != null and dto.userIds.size()>0">
|
||||
and app.F_BeIdentifyUserId in
|
||||
<foreach collection="dto.userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.endTime != null">
|
||||
and app.F_IdentifyTime BETWEEN #{dto.startTime} AND #{dto.endTime}
|
||||
</if>
|
||||
<if test="dto.chooseATypes!= null and dto.chooseATypes.size()>0">
|
||||
and ta.F_Id in
|
||||
<foreach collection="dto.chooseATypes" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
ba.F_TableId
|
||||
) a
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
COUNT( app.F_Result ) AS excellentNumber,
|
||||
ba.F_TableId
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS app
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups AS ba ON app.F_TableId = ba.F_Id
|
||||
WHERE
|
||||
app.F_Result = "1"
|
||||
and app.F_DeleteMark = 0
|
||||
and app.F_IsVisible = 0
|
||||
<if test="dto.userIds != null and dto.userIds.size()>0">
|
||||
and app.F_BeIdentifyUserId in
|
||||
<foreach collection="dto.userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.endTime != null">
|
||||
and app.F_IdentifyTime BETWEEN #{dto.startTime} AND #{dto.endTime}
|
||||
</if>
|
||||
GROUP BY
|
||||
ba.F_TableId
|
||||
) b ON a.F_TableId = b.F_TableId
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
COUNT( app.F_Result ) AS qualifiedNumberOfPeople,
|
||||
ba.F_TableId
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS app
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups AS ba ON app.F_TableId = ba.F_Id
|
||||
WHERE
|
||||
app.F_Result = "0"
|
||||
and app.F_DeleteMark = 0
|
||||
and app.F_IsVisible = 0
|
||||
<if test="dto.userIds != null and dto.userIds.size()>0">
|
||||
and app.F_BeIdentifyUserId in
|
||||
<foreach collection="dto.userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.endTime != null">
|
||||
and app.F_IdentifyTime BETWEEN #{dto.startTime} AND #{dto.endTime}
|
||||
</if>
|
||||
GROUP BY
|
||||
ba.F_TableId
|
||||
) c ON a.F_TableId = c.F_TableId
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
COUNT( app.F_Result ) AS numberOfUnqualifiedPeople,
|
||||
ba.F_TableId
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS app
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups AS ba ON app.F_TableId = ba.F_Id
|
||||
WHERE
|
||||
app.F_Result = "2"
|
||||
and app.F_DeleteMark = 0
|
||||
and app.F_IsVisible = 0
|
||||
<if test="dto.userIds != null and dto.userIds.size()>0">
|
||||
and app.F_BeIdentifyUserId in
|
||||
<foreach collection="dto.userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.endTime != null">
|
||||
and app.F_IdentifyTime BETWEEN #{dto.startTime} AND #{dto.endTime}
|
||||
</if>
|
||||
GROUP BY
|
||||
ba.F_TableId
|
||||
) d ON a.F_TableId = d.F_TableId
|
||||
</select>
|
||||
<!-- 查询资格信息-->
|
||||
<select id="queryQualificationInformation"
|
||||
resultType="jnpf.model.cultivate.vo.position.web.FtbCultivatePositionIdentifyVO">
|
||||
SELECT
|
||||
a.numberOfPeopleBeingIdentified,
|
||||
IFNULL( c.numberAppraisal, 0 ) AS numberAppraisal,
|
||||
ROUND( IFNULL(( c.numberAppraisal / a.numberOfPeopleBeingIdentified ) * 100, 0 ), 2 ) appraisalPassRate
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
COUNT( app.F_Id ) AS numberOfPeopleBeingIdentified
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS app
|
||||
WHERE
|
||||
app.F_Source = 2
|
||||
AND app.F_DeleteMark = 0
|
||||
AND app.F_IsVisible = 0
|
||||
<if test="userIdsByGradesId != null and userIdsByGradesId.size()>0">
|
||||
and app.F_BeIdentifyUserId in
|
||||
<foreach collection="userIdsByGradesId" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
AND app.F_Id = (
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
DISTINCT a.F_IdentifyRecordId
|
||||
FROM
|
||||
ftb_cultivate_position_identify_result a
|
||||
JOIN ftb_cultivate_position b ON a.F_PostLearnId = b.F_Id
|
||||
WHERE
|
||||
a.F_EnabledMark = 0
|
||||
AND b.F_EnabledMark = 0
|
||||
AND a.F_PostRankId = #{postId}
|
||||
AND a.F_UserId in
|
||||
<foreach collection="userIdsByGradesId" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
ORDER BY a.F_CreatorTime DESC
|
||||
limit 1
|
||||
) as abFIRI
|
||||
)
|
||||
) a,(
|
||||
SELECT
|
||||
COUNT( app.F_Result ) AS numberAppraisal
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS app
|
||||
WHERE
|
||||
app.F_Result IN ( 0, 1 )
|
||||
AND app.F_Source = 2
|
||||
AND app.F_DeleteMark = 0
|
||||
AND app.F_IsVisible = 0
|
||||
<if test="userIdsByGradesId != null and userIdsByGradesId.size()>0">
|
||||
and app.F_BeIdentifyUserId in
|
||||
<foreach collection="userIdsByGradesId" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
AND app.F_Id = (
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
DISTINCT a.F_IdentifyRecordId
|
||||
FROM
|
||||
ftb_cultivate_position_identify_result a
|
||||
JOIN ftb_cultivate_position b ON a.F_PostLearnId = b.F_Id
|
||||
WHERE
|
||||
a.F_EnabledMark = 0
|
||||
AND b.F_EnabledMark = 0
|
||||
AND a.F_PostRankId = #{postId}
|
||||
AND a.F_UserId in
|
||||
<foreach collection="userIdsByGradesId" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
ORDER BY a.F_CreatorTime DESC
|
||||
limit 1
|
||||
) as abFIRI
|
||||
)
|
||||
) c
|
||||
</select>
|
||||
<!-- 查询合格人员列表-->
|
||||
<select id="queryTheListOfQualifiedPersons"
|
||||
resultType="jnpf.model.cultivate.vo.position.web.FtbCultivatePositionIdentifyPersonVO">
|
||||
SELECT
|
||||
re.F_UserId userId,
|
||||
apy.F_Result isPassTheIdentification,
|
||||
SUM( de.F_Score ) identificationScore
|
||||
FROM
|
||||
ftb_cultivate_position_identify_result AS re
|
||||
INNER JOIN ftb_cultivate_identify_apply AS apy ON re.F_IdentifyRecordId = apy.F_Id
|
||||
INNER JOIN ftb_cultivate_identify_apply_details AS de ON de.F_ApplyId = apy.F_Id
|
||||
WHERE
|
||||
apy.F_BeIdentifyUserId IN
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND re.F_PostRankId = #{positionId}
|
||||
AND apy.F_Status = 1
|
||||
AND apy.F_Source = 2
|
||||
AND apy.F_DeleteMark = 0
|
||||
AND apy.F_IsVisible = 0
|
||||
AND re.F_IdentifyId = (
|
||||
SELECT
|
||||
a.F_IdentifyId
|
||||
FROM
|
||||
ftb_cultivate_position_exam_identify a
|
||||
JOIN ftb_cultivate_position b ON a.F_PostLearnId = b.F_Id
|
||||
WHERE
|
||||
a.F_EnabledMark = 0
|
||||
AND b.F_EnabledMark = 0
|
||||
AND a.F_PostRankId = #{positionId}
|
||||
)
|
||||
GROUP BY
|
||||
re.F_UserId
|
||||
</select>
|
||||
<!-- 查询当前人员的评估信息-->
|
||||
<select id="currentPersonSAssessmentInformation"
|
||||
resultType="jnpf.model.cultivate.vo.position.web.FtbCultivatePositionIdentifyPersonVO">
|
||||
SELECT
|
||||
apy.F_BeIdentifyUserId userId,
|
||||
apy.F_Result isPassTheIdentification,
|
||||
SUM( de.F_Score ) identificationScore
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS apy
|
||||
INNER JOIN ftb_cultivate_identify_apply_details AS de ON de.F_ApplyId = apy.F_Id
|
||||
WHERE
|
||||
apy.F_BeIdentifyUserId = #{userId}
|
||||
AND apy.F_Status = 1
|
||||
AND apy.F_Source = 2
|
||||
AND apy.F_DeleteMark = 0
|
||||
AND apy.F_IsVisible = 0
|
||||
AND apy.F_Id in
|
||||
<foreach collection="applyIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getPageListV2" resultType="jnpf.model.cultivate.v2.identify.vo.V2IdentifyTableListVo">
|
||||
SELECT fcit.F_Id id,
|
||||
fcit.F_Name `name`,
|
||||
fcit.F_RuleId ruleId,
|
||||
fcit.F_RuleDesc ruleDesc,
|
||||
fcit.F_LastModifyTime lastModifyTime,
|
||||
fcit.F_LabelId labelId,
|
||||
fl.F_Name labelName,
|
||||
fcit.F_CoverId coverId,
|
||||
fcit.F_CoverUrl coverUrl,
|
||||
fcit.F_IsAbnormal as isAbnormal
|
||||
FROM ftb_cultivate_identify_table fcit left join ftb_cultivate_label fl on fcit.F_LabelId = fl.F_Id
|
||||
<where>
|
||||
fcit.F_DeleteMark = 0
|
||||
<if test="params.keyWord != null and params.keyWord != ''">
|
||||
AND (fcit.F_Name like concat('%', #{params.keyWord}, '%') or fcit.F_RuleId like concat('%', #{params.keyWord},
|
||||
'%') )
|
||||
</if>
|
||||
<if test="params.isAbnormal != null">
|
||||
and fcit.F_IsAbnormal = #{params.isAbnormal}
|
||||
</if>
|
||||
<if test="params.labelId != null and params.labelId != '' and '1'.toString() != params.labelId">
|
||||
and fcit.F_LabelId = #{params.labelId}
|
||||
</if>
|
||||
<if test="params.labelId != null and params.labelId != '' and '1'.toString() == params.labelId">
|
||||
and (fcit.F_LabelId = '' or fcit.F_LabelId is null)
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fcit.F_CreatorTime DESC,fcit.F_RuleId ASC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="jnpf.cultivate.mapper.CultivatePositionCourseLogMapper">
|
||||
|
||||
<!-- 通用结果映射 -->
|
||||
<resultMap id="baseResultMap" type="jnpf.entity.cultivate.CultivatePositionCourseLogEntity">
|
||||
<result column="F_Id" property="id"/>
|
||||
<result column="F_EnabledMark" property="enabledMark"/>
|
||||
<result column="F_CreatorUserId" property="creatorUserId"/>
|
||||
<result column="F_CreatorTime" property="creatorTime"/>
|
||||
<result column="F_LastModifyUserId" property="lastModifyUserId"/>
|
||||
<result column="F_LastModifyTime" property="lastModifyTime"/>
|
||||
<result column="F_TenantId" property="tenantId"/>
|
||||
<result column="F_PostLearnId" property="postLearnId"/>
|
||||
<result column="F_PostId" property="postId"/>
|
||||
<result column="F_GradeId" property="gradeId"/>
|
||||
<result column="F_CourseId" property="courseId"/>
|
||||
<result column="F_UserId" property="userId"/>
|
||||
<result column="F_State" property="state"/>
|
||||
<result column="F_ExamId" property="examId"/>
|
||||
<result column="F_UserExamId" property="userExamId"/>
|
||||
<result column="F_UserExamStatus" property="userExamStatus"/>
|
||||
<result column="F_IdentifyId" property="identifyId"/>
|
||||
<result column="F_UserIdentifyId" property="userIdentifyId"/>
|
||||
<result column="F_UserUserIdentifyStatus" property="userIdentifyStatus"/>
|
||||
<result column="F_HasExam" property="hasExam"/>
|
||||
<result column="F_HasIdentity" property="hasIdentity"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 根据用户ID和学习地图ID查询岗位学习课程记录 -->
|
||||
<select id="queryByUserIdAndPostLearnId" resultMap="baseResultMap">
|
||||
SELECT *
|
||||
FROM ftb_cultivate_position_course_log
|
||||
WHERE F_UserId = #{userId}
|
||||
AND F_PostLearnId = #{postLearnId}
|
||||
AND F_EnabledMark = 0
|
||||
ORDER BY F_CreatorTime DESC
|
||||
</select>
|
||||
|
||||
<select id="queryMyAllCompletePositionCourse" resultMap="baseResultMap">
|
||||
SELECT *
|
||||
FROM ftb_cultivate_position_course_log
|
||||
WHERE F_UserId = #{userId}
|
||||
AND F_EnabledMark = 0
|
||||
AND F_State = 2
|
||||
ORDER BY F_CreatorTime DESC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCourseGainedCommentMapper">
|
||||
|
||||
<!-- 通用结果映射 -->
|
||||
<resultMap id="baseResultMap" type="jnpf.model.cultivate.po.gained.FtbCourseGainedCommentEntity">
|
||||
<id column="F_Id" property="id"/>
|
||||
<result column="F_CourseId" property="courseId"/>
|
||||
<result column="F_ChapterId" property="chapterId"/>
|
||||
<result column="F_GainedId" property="gainedId"/>
|
||||
<result column="F_Content" property="content"/>
|
||||
<result column="F_ParentId" property="parentId"/>
|
||||
<result column="F_OrganizeId" property="organizeId"/>
|
||||
<result column="F_PositionId" property="positionId"/>
|
||||
<result column="F_Account" property="account"/>
|
||||
<result column="F_RealName" property="realName"/>
|
||||
<result column="F_CreatorTime" property="creatorTime"/>
|
||||
<result column="F_CreatorUserId" property="creatorUserId"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<!-- app 端评论分页列表查询 -->
|
||||
<select id="appCommentPage" resultType="jnpf.model.cultivate.v2.gained.vo.V2AppCourseGainedCommentVO">
|
||||
SELECT
|
||||
c.F_Id id,
|
||||
c.F_CourseId courseId,
|
||||
c.F_ChapterId chapterId,
|
||||
c.F_GainedId gainedId,
|
||||
c.F_Content content,
|
||||
c.F_ParentId parentId,
|
||||
c.F_OrganizeId organizeId,
|
||||
c.F_PositionId positionId,
|
||||
c.F_Account account,
|
||||
c.F_RealName realName,
|
||||
c.F_CreatorTime creatorTime,
|
||||
c.F_CreatorUserId creatorUserId
|
||||
FROM ftb_cultivate_course_gained_comment c
|
||||
WHERE c.F_GainedId = #{req.gainedId} and (c.F_ParentId ="" or c.F_ParentId IS NULL)
|
||||
ORDER BY c.F_CreatorTime desc
|
||||
</select>
|
||||
|
||||
<select id="appSimpleComment" resultType="jnpf.model.cultivate.v2.gained.vo.V2SimpleCourseGainedCommentVO">
|
||||
SELECT c.F_Id id,
|
||||
c.F_ParentId parentId
|
||||
FROM ftb_cultivate_course_gained_comment c
|
||||
WHERE c.F_GainedId = #{gainedId}
|
||||
</select>
|
||||
|
||||
<select id="queryAllByIds" resultType="jnpf.model.cultivate.po.gained.FtbCourseGainedCommentEntity">
|
||||
SELECT
|
||||
c.F_Id id,
|
||||
c.F_CourseId courseId,
|
||||
c.F_ChapterId chapterId,
|
||||
c.F_GainedId gainedId,
|
||||
c.F_Content content,
|
||||
c.F_ParentId parentId,
|
||||
c.F_OrganizeId organizeId,
|
||||
c.F_PositionId positionId,
|
||||
c.F_Account account,
|
||||
c.F_RealName realName,
|
||||
c.F_CreatorTime creatorTime,
|
||||
c.F_CreatorUserId creatorUserId
|
||||
FROM ftb_cultivate_course_gained_comment c
|
||||
WHERE c.F_Id IN
|
||||
<foreach item="item" collection="childIds" separator="," open="(" close=")" index="">
|
||||
#{item}
|
||||
</foreach>
|
||||
ORDER BY c.F_CreatorTime asc
|
||||
</select>
|
||||
|
||||
<select id="queryNextAllComment" resultType="jnpf.model.cultivate.po.gained.FtbCourseGainedCommentEntity">
|
||||
|
||||
SELECT
|
||||
c.F_Id id,
|
||||
c.F_CourseId courseId,
|
||||
c.F_ChapterId chapterId,
|
||||
c.F_GainedId gainedId,
|
||||
c.F_Content content,
|
||||
c.F_ParentId parentId,
|
||||
c.F_OrganizeId organizeId,
|
||||
c.F_PositionId positionId,
|
||||
c.F_Account account,
|
||||
c.F_RealName realName,
|
||||
c.F_CreatorTime creatorTime,
|
||||
c.F_CreatorUserId creatorUserId
|
||||
FROM ftb_cultivate_course_gained_comment c
|
||||
WHERE c.F_Path LIKE CONCAT(#{firstCommentId}, '%')
|
||||
ORDER BY c.F_CreatorTime asc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCourseGainedLikeMapper" >
|
||||
<!-- 删除指定用户在指定心得下的点赞-->
|
||||
<delete id="deleteLikeByGainedId">
|
||||
delete from ftb_cultivate_course_gained_like
|
||||
where F_GainedId = #{gainedId} and F_LikeUserId = #{likeUserId}
|
||||
</delete>
|
||||
|
||||
<!-- 获取用户有无对该心得点赞-->
|
||||
<select id="getMyLike" resultType="java.lang.Integer">
|
||||
select count(0) from ftb_cultivate_course_gained_like where F_GainedId = #{GainedId} and F_LikeUserId = #{likeUserId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCourseGainedMapper">
|
||||
|
||||
|
||||
<!-- 获取用户有无对该心得点赞-->
|
||||
<select id="getGainedListOfChapterEnd" resultType="jnpf.model.cultivate.po.gained.FtbCourseGainedEntity">
|
||||
select g.*,c.commentNum from (select F_CourseId courseId,F_ChapterId chapterId,F_Content content,F_Status `status`,F_ReadType readType,F_OrganizeId organizeId,F_PositionId positionId,F_CreatorUserId creatorUserId,F_Id id,F_CreatorTime creatorTime
|
||||
from ftb_cultivate_course_gained where F_ChapterId = #{chapterId} and F_EnabledMark = 1) g left join (select F_GainedId,count(1) commentNum from ftb_training_course_gained_comment GROUP BY F_GainedId ) c on g.id = c.F_GainedId ORDER BY c.commentNum desc,g.creatorTime desc limit 2
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateAssessmentPointsMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.FtbCultivateAssessmentPoints">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_assessment_points-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_Name" jdbcType="VARCHAR" property="fName" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_LastModifyUserId" jdbcType="VARCHAR" property="fLastmodifyuserid" />
|
||||
<result column="F_LastModifyTime" jdbcType="TIMESTAMP" property="fLastmodifytime" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_Name, F_EnabledMark, F_CreatorUserId, F_CreatorTime, F_LastModifyUserId,
|
||||
F_LastModifyTime, F_DeleteUserId, F_DeleteTime, F_TenantId
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCaseBaseLikeMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCaseBaseMapper">
|
||||
|
||||
<!-- 用于Web端展示的案例列表查询 -->
|
||||
<select id="listDisplay" resultType="jnpf.model.cultivate.vo.casebase.FtbCultivateCaseBaseVO">
|
||||
SELECT
|
||||
ca.F_Id AS id,
|
||||
ca.F_CreatorUserId AS creatorUserId,
|
||||
ca.F_CaseDescription as caseDescription,
|
||||
ca.F_CreatorTime AS creatorTime,
|
||||
ca.F_LastModifyTime AS lastModifyTime,
|
||||
ca.F_CaseName caseName,
|
||||
ca.F_Status `status`,
|
||||
ca.F_SystemCaseId AS systemCaseId,
|
||||
sa.F_Name AS creatorUserName,
|
||||
ca.F_AuditUserId AS auditUserId,
|
||||
ca.F_AuditTime AS auditTime,
|
||||
IFNULL( ( SELECT COUNT( F_Id ) FROM ftb_cultivate_case_base_like WHERE F_GainedId = ca.F_Id ), 0) AS numberOfLikes,
|
||||
IFNULL( ( SELECT COUNT( F_Id ) FROM ftb_cultivate_case_base_like WHERE F_GainedId = ca.F_Id and F_LikeUserId = #{dto.userId} ), 0) AS haveYouLikedIt
|
||||
FROM
|
||||
ftb_cultivate_case_base AS ca
|
||||
LEFT JOIN ftb_personnels_staff_roster AS sa ON ca.F_CreatorUserId = sa.F_UserId
|
||||
<where>
|
||||
<if test="dto.flag != null and dto.flag != '' and dto.flag == 0">
|
||||
AND ca.F_Status != 0
|
||||
</if>
|
||||
<if test="dto.flag != null and dto.flag != '' and dto.flag == 1">
|
||||
AND ca.F_Status = 2
|
||||
</if>
|
||||
<if test="dto.keyWords != null and dto.keyWords != ''">
|
||||
AND
|
||||
(
|
||||
ca.F_CaseName LIKE CONCAT('%',#{dto.keyWords},'%')
|
||||
or ca.F_SystemCaseId LIKE CONCAT('%',#{dto.keyWords},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="dto.approvalStatus != null and dto.approvalStatus != ''">
|
||||
AND ca.F_Status = #{dto.approvalStatus}
|
||||
</if>
|
||||
<if test="dto.flag != null and dto.flag != '' and dto.flag == 2">
|
||||
AND ca.F_CreatorUserId = #{dto.userId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
ca.F_CreatorTime DESC
|
||||
</select>
|
||||
|
||||
<!-- 用于移动端展示的案例列表查询 -->
|
||||
<select id="listDisplayForApp" resultType="jnpf.model.cultivate.vo.casebase.FtbCultivateCaseBaseVO">
|
||||
SELECT
|
||||
ca.F_Id AS id,
|
||||
ca.F_CreatorUserId AS creatorUserId,
|
||||
ca.F_CaseDescription as caseDescription,
|
||||
ca.F_CreatorTime AS creatorTime,
|
||||
ca.F_LastModifyTime AS lastModifyTime,
|
||||
ca.F_CaseName caseName,
|
||||
ca.F_Status `status`,
|
||||
ca.F_SystemCaseId AS systemCaseId,
|
||||
sa.F_Name AS creatorUserName,
|
||||
ca.F_AuditUserId AS auditUserId,
|
||||
ca.F_AuditTime AS auditTime,
|
||||
IFNULL( ( SELECT COUNT( F_Id ) FROM ftb_cultivate_case_base_like WHERE F_GainedId = ca.F_Id ), 0) AS numberOfLikes,
|
||||
IFNULL( ( SELECT COUNT( F_Id ) FROM ftb_cultivate_case_base_like WHERE F_GainedId = ca.F_Id and F_LikeUserId = #{dto.userId} ), 0) AS haveYouLikedIt
|
||||
FROM
|
||||
ftb_cultivate_case_base AS ca
|
||||
LEFT JOIN ftb_personnels_staff_roster AS sa ON ca.F_CreatorUserId = sa.F_UserId
|
||||
<where>
|
||||
<if test="dto.flag != null and dto.flag != '' and dto.flag == 0">
|
||||
AND ca.F_Status != 0
|
||||
</if>
|
||||
<if test="dto.flag != null and dto.flag != '' and dto.flag == 1">
|
||||
AND ca.F_Status = 2
|
||||
</if>
|
||||
<if test="dto.keyWords != null and dto.keyWords != ''">
|
||||
AND ca.F_CaseName LIKE CONCAT('%',#{dto.keyWords},'%')
|
||||
</if>
|
||||
<if test="dto.approvalStatus != null and dto.approvalStatus != ''">
|
||||
AND ca.F_Status = #{dto.approvalStatus}
|
||||
</if>
|
||||
<if test="dto.flag != null and dto.flag != '' and dto.flag == 2">
|
||||
AND ca.F_CreatorUserId = #{dto.userId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
ca.F_LastModifyTime desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCertificateImagesMapper">
|
||||
|
||||
<select id="listAll" resultType="jnpf.model.cultivate.po.certificate.FtbCertificateImagesEntity">
|
||||
select F_Id as id,
|
||||
F_Path as path,
|
||||
F_Type as type,
|
||||
F_IsSystem as isSystem,
|
||||
F_Sorts as sorts
|
||||
from ftb_cultivate_certificate_image
|
||||
order by F_IsSystem desc, F_Sorts desc
|
||||
</select>
|
||||
|
||||
<select id="queryMaxSort" resultType="java.lang.Integer">
|
||||
select max(F_Sorts) from ftb_cultivate_certificate_image
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCertificateMapper">
|
||||
<!--统计组织列表信息-->
|
||||
<select id="organizationListStatistics"
|
||||
resultType="jnpf.model.cultivate.vo.certificate.FtbCertificateOrgWisdomStatisticVO">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ca.F_Id certificateId,
|
||||
ca.F_Name certificateName,
|
||||
us.F_OrganizeId AS orgID,
|
||||
ca.F_Status AS onShelfStatus,
|
||||
COUNT( DISTINCT us.F_UserId ) AS numberOfPeopleIssued,
|
||||
ca.F_CreatorTime,
|
||||
ca.F_LastModifyTime
|
||||
FROM
|
||||
ftb_cultivate_certificate_user AS us
|
||||
RIGHT JOIN ftb_cultivate_certificate ca ON us.F_CertificateId = ca.F_Id
|
||||
<where>
|
||||
ca.F_EnabledMark = 1 and us.F_EnabledMark=1
|
||||
<if test="statisticDTO.onShelfStatus != null and statisticDTO.onShelfStatus != ''">
|
||||
AND ca.F_Status = #{statisticDTO.onShelfStatus}
|
||||
</if>
|
||||
<if test="statisticDTO.startTime != null and statisticDTO.endTime != null">
|
||||
and us.F_CreatorTime BETWEEN #{statisticDTO.startTime} AND #{statisticDTO.endTime}
|
||||
</if>
|
||||
<if test="statisticDTO.innerPowerUserIds != null and statisticDTO.innerPowerUserIds.size() > 0">
|
||||
and us.F_UserId in
|
||||
<foreach collection="statisticDTO.innerPowerUserIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="statisticDTO.chooseATypes != null and statisticDTO.chooseATypes.size() > 0">
|
||||
and ca.F_Id in
|
||||
<foreach collection="statisticDTO.chooseATypes" item="chooseAType" open="(" separator="," close=")">
|
||||
#{chooseAType}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
us.F_OrganizeId,ca.F_Id
|
||||
) a
|
||||
<where>
|
||||
a.numberOfPeopleIssued != 0
|
||||
</where>
|
||||
ORDER BY
|
||||
a.F_LastModifyTime DESC,
|
||||
a.F_CreatorTime DESC,
|
||||
a.certificateName DESC
|
||||
</select>
|
||||
<!--统计个人维度信息-->
|
||||
<select id="personalDimensionStatistics"
|
||||
resultType="jnpf.model.cultivate.vo.certificate.FtbCertificatePersonWisdomStatisticVO">
|
||||
SELECT
|
||||
user.F_Id,
|
||||
user.F_CertificateId,
|
||||
user.F_CertificateName certificateName,
|
||||
user.F_ExpireTime expirationTime,
|
||||
user.F_UserId employeeID,
|
||||
user.F_UserName employeeSName,
|
||||
user.F_OrganizeId orgID,
|
||||
user.F_PositionId sysPostId,
|
||||
user.F_EffectTime issueTime,
|
||||
user.F_Status effectiveStatus
|
||||
FROM
|
||||
ftb_cultivate_certificate_user as user inner join ftb_cultivate_certificate as ce
|
||||
on user.F_CertificateId = ce.F_Id
|
||||
<where>
|
||||
ce.F_EnabledMark = 1 and user.F_EnabledMark=1
|
||||
<if test="dto.certificateId != null and dto.certificateId !=''">
|
||||
and user.F_CertificateId =#{dto.certificateId}
|
||||
</if>
|
||||
|
||||
<if test="dto.chooseATypes != null and dto.chooseATypes.size() > 0">
|
||||
and user.F_CertificateId in
|
||||
<foreach collection="dto.chooseATypes" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.effectiveStatus != null and dto.effectiveStatus != 3 and dto.effectiveStatus != '' ">
|
||||
and user.F_Status =#{dto.effectiveStatus}
|
||||
</if>
|
||||
<if test="dto.effectiveStatus != null and dto.effectiveStatus == 3 and dto.effectiveStatus != '' ">
|
||||
and ce.F_ExpireType = 0
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.endTime != null">
|
||||
and user.F_CreatorTime BETWEEN #{dto.startTime} AND #{dto.endTime}
|
||||
</if>
|
||||
<if test="dto.realUserIds != null and dto.realUserIds.size() > 0">
|
||||
and user.F_UserId in
|
||||
<foreach collection="dto.realUserIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
user.F_UserId,user.F_CertificateId
|
||||
order by user.F_CreatorTime desc
|
||||
</select>
|
||||
<select id="organizationListStatisticsAll"
|
||||
resultType="jnpf.model.cultivate.vo.certificate.FtbCertificateQueryStatisticAllVO">
|
||||
|
||||
SELECT
|
||||
us.F_Id certificateId,
|
||||
us.F_UserId userId,
|
||||
ca.F_Status AS onShelfStatus,
|
||||
ca.F_Name certificateName,
|
||||
ca.F_Id id
|
||||
FROM
|
||||
ftb_cultivate_certificate_user AS us
|
||||
RIGHT JOIN ftb_cultivate_certificate ca ON us.F_CertificateId = ca.F_Id
|
||||
<where>
|
||||
ca.F_EnabledMark = 1 and us.F_EnabledMark=1
|
||||
<if test="statisticDTO.onShelfStatus != null and statisticDTO.onShelfStatus != ''">
|
||||
AND ca.F_Status = #{statisticDTO.onShelfStatus}
|
||||
</if>
|
||||
<if test="statisticDTO.startTime != null and statisticDTO.endTime != null">
|
||||
and us.F_CreatorTime BETWEEN #{statisticDTO.startTime} AND #{statisticDTO.endTime}
|
||||
</if>
|
||||
|
||||
<if test="statisticDTO.chooseATypes != null and statisticDTO.chooseATypes.size() > 0">
|
||||
and ca.F_Id in
|
||||
<foreach collection="statisticDTO.chooseATypes" item="chooseAType" open="(" separator="," close=")">
|
||||
#{chooseAType}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCertificateUserMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateChapterTestMapper">
|
||||
<resultMap id="chapterTestInfo" type="jnpf.model.cultivate.vo.chapter.FtbCultivateChapterTestResultVO">
|
||||
<id column="chapterTestId" property="chapterTestId" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result column="topicName" property="topicName" jdbcType="VARCHAR" javaType="java.lang.String" />
|
||||
<result column="answerAnalysis" property="answerAnalysis" jdbcType="VARCHAR" javaType="java.lang.String" />
|
||||
<result column="courseId" property="courseId" jdbcType="VARCHAR" javaType="java.lang.String" />
|
||||
<collection select="getChapterTestResult" property="chapterTestInfos" column="chapterTestId" ofType="java.util.ArrayList"/>
|
||||
</resultMap>
|
||||
<!--根据关键词获取章节测试统计信息-->
|
||||
<select id="getChapterTestStatistic"
|
||||
resultType="jnpf.model.cultivate.vo.chapter.FtbCultivateChapterTestStatisticVO">
|
||||
SELECT
|
||||
te.F_UserId as userId,
|
||||
res.F_RealName as userName,
|
||||
co.F_Name as courseName,
|
||||
co.F_Id as courseId,
|
||||
res.F_SystemWorkerId as systemWorkId,
|
||||
te.F_ChapterTestOptions as chapterTestOptions
|
||||
FROM
|
||||
ftb_cultivate_chapter_test_result AS te
|
||||
INNER JOIN ftb_cultivate_course as co ON te.F_CourseId = co.F_Id
|
||||
LEFT JOIN base_user as res ON te.F_UserId = res.F_Id
|
||||
<where>
|
||||
co.F_EnabledMark = 0 and te.F_EnabledMark = 0
|
||||
<if test="keyWords != null and keyWords != ''">
|
||||
AND (
|
||||
res.F_RealName LIKE concat( '%', #{keyWords}, '%' )
|
||||
OR res.F_SystemWorkerId LIKE concat( '%', #{keyWords}, '%' )
|
||||
OR co.F_Name LIKE concat( '%', #{keyWords}, '%' )
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="innerPowerUserIds != null and innerPowerUserIds.size() > 0">
|
||||
AND te.F_UserId IN
|
||||
<foreach collection="innerPowerUserIds" item="userId" open="(" separator="," close=")" >
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
te.F_UserId,
|
||||
te.F_CourseId
|
||||
</select>
|
||||
<!--根据课程ID列表获取章节测试信息-->
|
||||
<select id="getChapterTestInfos" resultMap="chapterTestInfo">
|
||||
SELECT DISTINCT
|
||||
te.F_Id as chapterTestId ,
|
||||
te.F_CourseId as courseId,
|
||||
te.F_TopicName as topicName,
|
||||
te.F_AnswerAnalysis as answerAnalysis
|
||||
FROM
|
||||
ftb_cultivate_chapter_test AS te
|
||||
JOIN ftb_cultivate_chapter_test_option AS op ON te.F_Id = op.F_ChapterTestId
|
||||
WHERE
|
||||
te.F_EnabledMark = 0
|
||||
and te.F_CourseId IN
|
||||
<foreach collection="courseIds" item="courseId" open="(" separator="," close=")" >
|
||||
#{courseId}
|
||||
</foreach>
|
||||
</select>
|
||||
<!--根据课程ID列表获取章节返回-->
|
||||
<select id="getChapterTestResult"
|
||||
resultType="jnpf.model.cultivate.vo.chapter.FtbCultivateChapterTestInfo">
|
||||
select
|
||||
F_IsRightOption isRightOption ,
|
||||
F_Content as content,
|
||||
F_SortCode sortCode
|
||||
from
|
||||
ftb_cultivate_chapter_test_option where F_ChapterTestId=#{chapterTestId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateChapterTestOptionMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.course.FtbCultivateChapterTestOption">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_chapter_test_option-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_LastModifyTime" jdbcType="TIMESTAMP" property="fLastmodifytime" />
|
||||
<result column="F_LastModifyUserId" jdbcType="VARCHAR" property="fLastmodifyuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_ChapterTestId" jdbcType="VARCHAR" property="fChaptertestid" />
|
||||
<result column="F_IsRightOption" jdbcType="TINYINT" property="fIsrightoption" />
|
||||
<result column="F_Content" jdbcType="VARCHAR" property="fContent" />
|
||||
<result column="F_SortCode" jdbcType="TINYINT" property="fSortcode" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_CreatorTime, F_CreatorUserId, F_LastModifyTime, F_LastModifyUserId, F_DeleteTime,
|
||||
F_DeleteUserId, F_TenantId, F_EnabledMark, F_ChapterTestId, F_IsRightOption, F_Content,
|
||||
F_SortCode
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateChapterTestResultMapper">
|
||||
<!--根据课程ID和用户ID查询章节测试结果列表-->
|
||||
<select id="selectChatperList" resultType="jnpf.model.cultivate.po.course.FtbCultivateChapterTestResult">
|
||||
SELECT
|
||||
t.F_CourseId courseId,
|
||||
t.F_CourseChapterId courseChapterId,
|
||||
t.F_UserId userId,
|
||||
t.F_ChapterTestOptions chapterTestOptions
|
||||
FROM
|
||||
( SELECT *, ROW_NUMBER() OVER ( PARTITION BY F_UserId, F_CourseId,F_CourseChapterId ORDER BY F_CreatorTime DESC ) AS rn FROM ftb_cultivate_chapter_test_result
|
||||
<where>
|
||||
<if test="courseId != null and courseId != ''">
|
||||
and F_CourseId = #{courseId}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and F_UserId = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
) t
|
||||
where
|
||||
t.F_EnabledMark = 0 and t.rn = 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCommonSettingGlobalMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.FtbCultivateCommonSettingGlobal">
|
||||
<id column="F_Id" property="id"/>
|
||||
<result column="F_CreatorTime" property="creatorTime"/>
|
||||
<result column="F_CreatorUserId" property="creatorUserId"/>
|
||||
<result column="F_LastModifyTime" property="lastModifyTime"/>
|
||||
<result column="F_LastModifyUserId" property="lastModifyUserId"/>
|
||||
<result column="F_TenantId" property="tenantId"/>
|
||||
<result column="F_Watermark" property="watermark"/>
|
||||
<result column="F_Screenshot" property="screenshot"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
F_Id, F_CreatorTime, F_CreatorUserId, F_LastModifyTime, F_LastModifyUserId, F_TenantId, F_Watermark, F_Screenshot
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCourseChapterMapper">
|
||||
<!--课程章节分页查询-->
|
||||
<select id="queryList" resultType="jnpf.model.cultivate.vo.course.web.FtbCultivateCourseChapterVO">
|
||||
SELECT F_Id as id,
|
||||
F_Name as name,
|
||||
F_Duration as duration,
|
||||
F_SortCode as sortCode
|
||||
FROM ftb_cultivate_course_chapter
|
||||
where F_EnabledMark = 0 and F_CourseId = #{courseId}
|
||||
order by F_SortCode
|
||||
</select>
|
||||
<!--查询课程总时长-->
|
||||
<select id="querySumDuration" resultType="java.lang.Long">
|
||||
SELECT SUM(F_Duration) FROM ftb_cultivate_course_chapter WHERE F_CourseId = #{id} and F_EnabledMark=0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCourseLearningLogMapper">
|
||||
|
||||
<!-- 通用结果映射 -->
|
||||
<resultMap id="baseResultMap" type="jnpf.entity.cultivate.FtbCultivateCourseLearningLogEntity">
|
||||
<result column="F_id" property="id"/>
|
||||
<result column="F_CourseId" property="courseId"/>
|
||||
<result column="F_LearnTime" property="learnTime"/>
|
||||
<result column="F_CreatorUserId" property="creatorUserId"/>
|
||||
<result column="F_CreatorTime" property="creatorTime"/>
|
||||
<result column="F_EnabledMark" property="enabledMark"/>
|
||||
<result column="F_TenantId" property="tenantId"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,296 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCourseMapper">
|
||||
<!--课程格式统计-->
|
||||
<select id="getCount" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM ftb_cultivate_course
|
||||
<where>
|
||||
F_EnabledMark = 0
|
||||
<if test="flag == 1">
|
||||
and F_Format = 1
|
||||
</if>
|
||||
<if test="flag == 2">
|
||||
and F_Format = 2
|
||||
</if>
|
||||
<if test="flag == 3">
|
||||
and F_Format = 3
|
||||
</if>
|
||||
<if test="flag == 4">
|
||||
and F_Label = 1
|
||||
</if>
|
||||
<if test="flag == 5">
|
||||
and F_Label = 2
|
||||
</if>
|
||||
<if test="flag == 7">
|
||||
and F_Format = 4
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!--课程列表分页查询-->
|
||||
<select id="pagingQuery" resultType="jnpf.model.cultivate.vo.course.web.FtbCultivateCoursePageVO">
|
||||
select a.F_Id as id,
|
||||
a.F_Name as `name`,
|
||||
a.F_Format as format,
|
||||
a.F_ChapterNumber as chapterNumber,
|
||||
a.F_IsGrounding as isGroundIng,
|
||||
a.F_Label as label,
|
||||
a.F_CourseId as courseId,
|
||||
a.F_LastModifyTime as updateTime,
|
||||
b.F_Name as typeName
|
||||
from ftb_cultivate_course a LEFT JOIN ftb_cultivate_course_type b ON a.F_TypeId=b.F_Id
|
||||
<where>
|
||||
a.F_EnabledMark = 0
|
||||
<if test="params.format!= null">
|
||||
and a.F_Format = #{params.format}
|
||||
</if>
|
||||
<if test="params.label!= null">
|
||||
and a.F_Label = #{params.label}
|
||||
</if>
|
||||
<if test="params.isGroundIng!= null">
|
||||
and a.F_IsGrounding = #{params.isGroundIng}
|
||||
</if>
|
||||
<if test="params.name!= null and params.name!= '' and ( params.onlySearchCourseName==null or params.onlySearchCourseName==0)">
|
||||
and (a.F_Name like CONCAT('%',#{params.name},'%') or b.F_Name like CONCAT('%',#{params.name},'%'))
|
||||
</if>
|
||||
<if test="params.name!= null and params.name!= '' and params.onlySearchCourseName!=null and params.onlySearchCourseName==1">
|
||||
and a.F_Name like CONCAT('%',#{params.name},'%')
|
||||
</if>
|
||||
<if test="params.typeId!= null and params.typeId!= ''">
|
||||
and a.F_TypeId = #{params.typeId}
|
||||
</if>
|
||||
<if test="params.startTime != null and params.startTime != '' and params.endTime != null and params.endTime != '' ">
|
||||
and a.F_LastModifyTime >= #{params.startTime} and a.F_LastModifyTime <= #{params.endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by a.F_LastModifyTime desc
|
||||
</select>
|
||||
<!--校验岗位学习-->
|
||||
<select id="getCountLearnByCourseId" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*)
|
||||
FROM ftb_cultivate_position_course
|
||||
WHERE F_CourseId = #{courseId}
|
||||
and F_EnabledMark = 0
|
||||
</select>
|
||||
<!--校验关联题库-->
|
||||
<select id="getCountQuestionBankByCourseId" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from ftb_cultivate_question_bank_course
|
||||
where F_CourseId = #{courseId}
|
||||
and F_EnabledMark = 1
|
||||
</select>
|
||||
<!--岗位学习分页列表-->
|
||||
<select id="listJobLearningByCourseId" resultType="jnpf.model.cultivate.vo.course.web.FtbCourseDeleteJobLearnVO">
|
||||
SELECT F_PostLearnId as id, F_PostRankId as positionId
|
||||
FROM ftb_cultivate_position_course
|
||||
WHERE F_EnabledMark = 0
|
||||
AND F_CourseId = #{courseId}
|
||||
</select>
|
||||
<!--关联题库分页列表-->
|
||||
<select id="listRelatedQuestionBankList"
|
||||
resultType="jnpf.model.cultivate.vo.course.web.FtbCourseDeleteQuestionBankVO">
|
||||
SELECT a.F_ClassifyId as id, b.F_BankContent as questionBankName
|
||||
FROM ftb_cultivate_question_bank_course a
|
||||
JOIN ftb_cultivate_question_bank b ON a.F_ClassifyId = b.F_Id
|
||||
WHERE a.F_EnabledMark = 1
|
||||
and a.F_CourseId = #{courseId}
|
||||
</select>
|
||||
|
||||
<select id="getCountTestPaperByQuestionBankId" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*)
|
||||
FROM ftb_cultivate_test_paper
|
||||
WHERE F_EnabledMark = 1
|
||||
AND FIND_IN_SET(#{questionBankId}, F_RelationQuestionBankId) > 0
|
||||
</select>
|
||||
<!--已学习课程列表-->
|
||||
<select id="promotionPathwayCourses" resultType="jnpf.model.cultivate.vo.course.web.PromotionChannelLearnCourseVO">
|
||||
SELECT a.F_Name as courseName, a.F_Format as courseType, b.F_LastModifyTime as learnTime
|
||||
FROM ftb_cultivate_course a
|
||||
JOIN ftb_cultivate_position_cource_learning b ON a.F_Id = b.F_CourceId
|
||||
WHERE b.F_state = 1
|
||||
AND F_UserId = #{userId}
|
||||
and b.F_EnabledMark = 0
|
||||
</select>
|
||||
<!--通用课程列表-->
|
||||
<select id="generalCourseList" resultType="jnpf.model.cultivate.vo.course.app.FtbGlobalCurriculumAppVO">
|
||||
SELECT a.F_Id as courseId,a.F_Name as courseName,a.F_Highlights as courseHighlights,b.F_state as learnState
|
||||
FROM ftb_cultivate_course a JOIN ftb_cultivate_position_cource_learning b ON a.F_Id=b.F_CourceId
|
||||
WHERE b.F_UserId=#{userId} AND a.F_EnabledMark=0 AND a.F_Label = 1 AND b.F_EnabledMark = 0 and a.F_IsGrounding =
|
||||
1
|
||||
<if test="params.courseTypeId != null">
|
||||
and a.F_TypeId = #{params.courseTypeId}
|
||||
</if>
|
||||
<if test="params.courseName != null and params.courseName != ''">
|
||||
and a.F_Name like CONCAT('%',#{params.courseName},'%')
|
||||
</if>
|
||||
order by a.F_CreatorTime desc
|
||||
</select>
|
||||
<!--已学习课程数-->
|
||||
<select id="learnTotalNumber" resultType="java.lang.Integer">
|
||||
SELECT count(*)
|
||||
FROM ftb_cultivate_course a
|
||||
JOIN ftb_cultivate_position_cource_learning b ON a.F_Id = b.F_CourceId
|
||||
WHERE b.F_UserId = #{userId}
|
||||
AND a.F_EnabledMark = 0
|
||||
AND a.F_Label = 1
|
||||
and a.F_IsGrounding = 1
|
||||
AND b.F_EnabledMark = 0
|
||||
and b.F_state = 1
|
||||
and a.F_TypeId = #{typeId}
|
||||
</select>
|
||||
<!--根据考试id查询考试名称-->
|
||||
<select id="queryExamNameByExamId" resultType="java.lang.String">
|
||||
SELECT F_ExamName
|
||||
FROM ftb_cultivate_exam
|
||||
WHERE F_Id = #{examId}
|
||||
</select>
|
||||
<!--校验岗位是否建立岗位学习-->
|
||||
<select id="queryJobBindingCourses"
|
||||
resultType="jnpf.model.cultivate.dto.course.FtbCultivateCourseDTO$PositionLearnCourseInternal">
|
||||
SELECT F_PostId as postId,F_Id as postLearnId FROM ftb_cultivate_position where F_EnabledMark = 0
|
||||
and F_PostId in
|
||||
<foreach collection="postIds" item="postId" open="(" separator="," close=")">
|
||||
#{postId}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getCountMediaList" resultType="jnpf.model.cultivate.dto.course.FtbCommonKeyAndValDto">
|
||||
SELECT F_Format AS k, COUNT(*) as v
|
||||
FROM ftb_cultivate_course
|
||||
where F_EnabledMark = 0
|
||||
group by F_Format
|
||||
</select>
|
||||
<select id="getCountLabelList" resultType="jnpf.model.cultivate.dto.course.FtbCommonKeyAndValDto">
|
||||
SELECT F_Label AS k, COUNT(*) as v
|
||||
FROM ftb_cultivate_course
|
||||
where F_EnabledMark = 0
|
||||
group by F_Label
|
||||
</select>
|
||||
|
||||
<select id="queryNoStudyCommonCourseNum" resultType="java.lang.Long">
|
||||
SELECT count(a.F_Id) as totalNum
|
||||
FROM ftb_cultivate_course a
|
||||
JOIN ftb_cultivate_position_cource_learning b ON a.F_Id = b.F_CourceId
|
||||
WHERE b.F_UserId = #{userId}
|
||||
AND a.F_EnabledMark = 0
|
||||
AND a.F_Label = 1
|
||||
AND b.F_EnabledMark = 0
|
||||
and a.F_IsGrounding = 1
|
||||
and b.F_state in (0, 2)
|
||||
</select>
|
||||
|
||||
<select id="queryBindingCourses"
|
||||
resultType="jnpf.model.cultivate.v2.position.vo.V2CultivateJobLearnCourseVo">
|
||||
SELECT a.F_ID as id,
|
||||
a.F_Name as `name`,
|
||||
a.F_ChapterNumber as chapterNumber,
|
||||
a.F_Label as label,
|
||||
a.F_IsGrounding as isGroundIng,
|
||||
a.F_CourseId as courseId,
|
||||
a.F_TypeId as typeId,
|
||||
a.F_LastModifyTime as updateTime,
|
||||
b.F_Name as typeName
|
||||
from ftb_cultivate_course as a LEFT JOIN ftb_cultivate_label b ON a.F_TypeId=b.F_Id
|
||||
WHERE a.F_EnabledMark = 0
|
||||
<if test="params.keyWord != null and params.keyWord != ''">
|
||||
AND a.F_Name LIKE CONCAT('%', #{params.keyWord}, '%')
|
||||
</if>
|
||||
<if test="params.label != null">
|
||||
<choose>
|
||||
<when test="params.label == 1">
|
||||
AND a.F_Label = 1
|
||||
</when>
|
||||
<when test="params.label == 2">
|
||||
AND a.F_Label = 2
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="jobLearningCourseList" resultType="jnpf.model.cultivate.v2.course.web.vo.V2CultivateCourseSelectVo">
|
||||
SELECT F_Id as id,
|
||||
F_Name as `name`,
|
||||
F_ChapterNumber as chapterNumber,
|
||||
F_Format as format,
|
||||
F_Label as label,
|
||||
F_IsGrounding as isGroundIng,
|
||||
F_CourseId as courseId,
|
||||
F_LastModifyTime as updateTime
|
||||
from ftb_cultivate_course
|
||||
WHERE F_EnabledMark = 0
|
||||
<if test="params.searchValue != null">
|
||||
and F_Name like concat('%',#{params.searchValue},'%')
|
||||
</if>
|
||||
<if test="params.label!= null">
|
||||
and F_Label = #{params.label}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="webList" resultType="jnpf.model.cultivate.v2.course.web.vo.V2CultivateCoursePageVo">
|
||||
select a.F_Id as id,
|
||||
a.F_Name as `name`,
|
||||
a.F_CourseId as courseId,
|
||||
a.F_ChapterNumber as chapterNumber,
|
||||
a.F_IsGrounding as isGroundIng,
|
||||
a.F_TypeId as typeId,
|
||||
b.F_Name as typeName,
|
||||
a.F_Label as label,
|
||||
a.F_LastModifyTime as updateTime
|
||||
from ftb_cultivate_course a LEFT JOIN ftb_cultivate_label b ON a.F_TypeId=b.F_Id
|
||||
<where>
|
||||
a.F_EnabledMark = 0
|
||||
<if test="params.label != null and params.label > 0">
|
||||
and a.F_Label = #{params.label}
|
||||
</if>
|
||||
<if test="params.isGroundIng!= null">
|
||||
and a.F_IsGrounding = #{params.isGroundIng}
|
||||
</if>
|
||||
<if test="params.name!= null and params.name!= ''">
|
||||
and a.F_Name LIKE CONCAT('%', #{params.name}, '%')
|
||||
</if>
|
||||
<if test="params.typeId!= null and params.typeId!= ''">
|
||||
and a.F_TypeId = #{params.typeId}
|
||||
</if>
|
||||
</where>
|
||||
order by a.F_CreatorTime desc
|
||||
</select>
|
||||
|
||||
<select id="queryCommonCourseApp" resultType="jnpf.model.cultivate.v2.course.vo.app.AppCommonCourseSimpleVo">
|
||||
SELECT
|
||||
p1.F_Id as courseId,
|
||||
p1.F_Name as courseName,
|
||||
p1.F_CoverUrl as coverUrl,
|
||||
p1.F_Label as label,
|
||||
p1.F_TypeId as typeId,
|
||||
p2.F_Name as typeName
|
||||
from ftb_cultivate_course as p1 LEFT JOIN ftb_cultivate_label as p2 ON p1.F_TypeId=p2.F_Id
|
||||
WHERE p1.F_EnabledMark = 0 and p1.F_Label = 1 and p1.F_IsGrounding = 1 and p1.F_EnabledMark=0
|
||||
<if test="params.keyWord != null">
|
||||
and p1.F_Name like concat('%',#{params.keyWord},'%')
|
||||
</if>
|
||||
<if test="params.typeId!= null">
|
||||
and p1.F_TypeId = #{params.typeId}
|
||||
</if>
|
||||
order by p1.F_CreatorTime desc
|
||||
</select>
|
||||
|
||||
<select id="commonCourseCount" resultType="java.lang.String">
|
||||
SELECT p1.F_Id as courseId
|
||||
from ftb_cultivate_course p1 LEFT JOIN ftb_cultivate_label as p2 ON p1.F_TypeId=p2.F_Id
|
||||
WHERE p1.F_EnabledMark = 0 and p1.F_Label = 1 and p1.F_IsGrounding = 1 and p1.F_EnabledMark=0
|
||||
<if test="params.keyWord != null and params.keyWord!=''">
|
||||
and p1.F_Name like concat('%',#{params.keyWord},'%')
|
||||
</if>
|
||||
<if test="params.typeId!= null and params.typeId!= ''">
|
||||
and p1.F_TypeId = #{params.typeId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 根据课程ID统计课程学习数据 -->
|
||||
<select id="getCourseStatistics" resultType="jnpf.model.cultivate.v2.course.vo.AiHelperCourseStatisticsVo">
|
||||
SELECT
|
||||
COUNT(CASE WHEN F_state = 1 THEN 1 END) AS completedCount,
|
||||
COUNT(CASE WHEN F_state = 0 THEN 1 END) AS learningCount
|
||||
FROM ftb_cultivate_position_cource_learning
|
||||
WHERE F_CourceId = #{courseId}
|
||||
AND F_EnabledMark = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCoursePackageMapper">
|
||||
<!--查询课程包课程-->
|
||||
<select id="getPackageDetails"
|
||||
resultType="jnpf.model.cultivate.vo.coursepackage.FtbCultivateCoursePackageDetailsVO">
|
||||
SELECT
|
||||
a.F_Name as courseName,
|
||||
a.F_Id as courseId,
|
||||
a.F_Format as format,
|
||||
c.F_Name as courseType
|
||||
FROM ftb_cultivate_course a JOIN ftb_cultivate_package_course b ON a.F_Id=b.F_CourseId
|
||||
JOIN ftb_cultivate_label c ON a.F_TypeId=c.F_Id
|
||||
WHERE a.F_EnabledMark = 0 and b.F_CoursePackageId = #{id}
|
||||
</select>
|
||||
<!--课程包分页查询-->
|
||||
<select id="pagingQuery" resultType="jnpf.model.cultivate.vo.coursepackage.FtbCultivateCoursePackagePageVO">
|
||||
SELECT
|
||||
a.F_Name as name,
|
||||
a.F_Id as id,
|
||||
a.F_CreatorTime as createTime,
|
||||
a.F_CreatorUserId as createUserId,
|
||||
a.F_LastModifyTime as updateTime,
|
||||
a.F_LastModifyUserId as updateUserId,
|
||||
a.F_Highlights as highlights,
|
||||
a.F_CoursePackageId as coursePackageId,
|
||||
(SELECT COUNT(*)
|
||||
FROM ftb_cultivate_package_course b JOIN ftb_cultivate_course c ON c.F_Id=b.F_CourseId
|
||||
WHERE F_CoursePackageId = a.F_Id and c.F_EnabledMark = 0)
|
||||
as courseNumber
|
||||
FROM ftb_cultivate_course_package a
|
||||
WHERE a.F_EnabledMark = 0
|
||||
<if test="params.keyword != null">
|
||||
and (a.F_Name like concat('%',#{params.keyword},'%') or a.F_CoursePackageId = #{params.keyword})
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<!--根据课程包id查询课程数据-->
|
||||
<select id="queryCoursePackageCourses"
|
||||
resultType="jnpf.model.cultivate.vo.coursepackage.FtbCultivateCoursePackageDetailsVO">
|
||||
SELECT
|
||||
a.F_Name as courseName,a.F_Id as courseId, a.F_Format as format
|
||||
FROM ftb_cultivate_course a JOIN ftb_cultivate_package_course b ON a.F_Id = b.F_CourseId
|
||||
WHERE a.F_EnabledMark = 0 and b.F_CoursePackageId in
|
||||
<foreach collection="coursePackageIds" item="coursePackageId" separator="," open="(" close=")">
|
||||
#{coursePackageId}
|
||||
</foreach>
|
||||
group by a.F_Id,a.F_Name
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCourseSettingGlobalMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCourseSettingMapper">
|
||||
<!--是否存在课程学习设置-->
|
||||
<select id="isThereACourseLearningSetting" resultType="java.lang.Integer">
|
||||
select count(*) from ftb_cultivate_course_setting where F_EnabledMark = 0
|
||||
and F_CourseId = #{courseId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCourseStatisticesMapper">
|
||||
<!--组织列表统计方法-->
|
||||
<select id="organizationListStatistics"
|
||||
resultType="jnpf.model.cultivate.vo.course.web.FtbCultivateCourseOrgStatisticesVO">
|
||||
SELECT
|
||||
a.*,
|
||||
IFNULL( b.numberHaveCourse, 0 ) as numberHaveCourse,
|
||||
IFNULL( ROUND( a.totalDurationOfStudy / a.numberInLearning, 2 ), 0 ) as averageLearningPerson
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ler.F_CourceId as courseId,
|
||||
co.F_Name courseTitle,
|
||||
co.F_Format courseFormat,
|
||||
type.F_Name as courseType,
|
||||
co.F_Id,
|
||||
co.F_CreatorTime as courseCreationTime,
|
||||
COUNT( ler.F_UserId ) AS numberInLearning ,
|
||||
group_concat( ler.F_UserId ) AS temp ,
|
||||
ROUND(SUM( F_LearnTime ) / 60 / 60 , 2) AS totalDurationOfStudy
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning AS ler
|
||||
JOIN ftb_cultivate_course AS co ON ler.F_CourceId = co.F_Id
|
||||
JOIN ftb_cultivate_label as type ON co.F_TypeId = type.F_Id
|
||||
<where>
|
||||
ler.F_state in (1,2) and ler.F_EnabledMark = 0 and
|
||||
co.F_EnabledMark = 0
|
||||
<if test="params.userIds != null and params.userIds.size() > 0">
|
||||
and ler.F_UserId IN
|
||||
<foreach collection="params.userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.courseFormat != null and params.courseFormat != ''">
|
||||
and co.F_Format = #{params.courseFormat}
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and co.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
<if test="params.nameType != null and params.nameType != ''">
|
||||
and type.F_Id = #{params.nameType}
|
||||
</if>
|
||||
<if test="params.chooseATypes != null and params.chooseATypes.size() > 0">
|
||||
and co.F_Id IN
|
||||
<foreach collection="params.chooseATypes" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
co.F_Id
|
||||
) a
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
co.F_Id,
|
||||
COUNT( ler.F_UserId ) AS numberHaveCourse
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning AS ler
|
||||
JOIN ftb_cultivate_course AS co ON ler.F_CourceId = co.F_Id
|
||||
<where>
|
||||
ler.F_state = 1 and co.F_EnabledMark = 0 and ler.F_EnabledMark = 0
|
||||
<if test="params.userIds != null and params.userIds.size() > 0">
|
||||
and ler.F_UserId IN
|
||||
<foreach collection="params.userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.courseFormat != null and params.courseFormat != ''">
|
||||
and co.F_Format = #{params.courseFormat}
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and co.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
<if test="params.chooseATypes != null and params.chooseATypes.size() > 0">
|
||||
and co.F_Id IN
|
||||
<foreach collection="params.chooseATypes" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY co.F_Id
|
||||
) b ON a.F_Id = b.F_Id
|
||||
</select>
|
||||
<!--人员列表统计方法-->
|
||||
<select id="personListStatistics" resultType="jnpf.model.cultivate.vo.course.web.FtbCultivateCoursePersonStatisticesVO">
|
||||
SELECT
|
||||
ler.F_UserId userId,
|
||||
ler.F_CourceId courseId,
|
||||
ler.F_LastModifyTime recentStudyTime,
|
||||
ler.F_LearnTime participationTimeInStudy
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning AS ler
|
||||
JOIN ftb_cultivate_course AS co ON ler.F_CourceId = co.F_Id
|
||||
<where>
|
||||
ler.F_EnabledMark = 0 and co.F_EnabledMark = 0 and ler.F_state in(1,2)
|
||||
<if test="params.selectPeoples != null and params.selectPeoples.size() > 0">
|
||||
and (ler.F_UserId IN
|
||||
<foreach collection="params.selectPeoples" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="params.keyWords != null and params.keyWords != ''">
|
||||
and co.F_Name like concat('%',#{params.keyWords},'%')
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and ler.F_LastModifyTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
<if test="params.courseId != null and params.courseId != ''">
|
||||
and ler.F_CourceId = #{params.courseId}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY ler.F_UserId,ler.F_CourceId,ler.F_LastModifyTime
|
||||
order by ler.F_LastModifyTime desc
|
||||
</select>
|
||||
<!--课程信息查询方法-->
|
||||
<select id="courseInfo" resultType="jnpf.model.cultivate.vo.course.web.FtbCultivateCoursePersonStatisticesVO">
|
||||
SELECT
|
||||
a.F_Name as courseTitle,
|
||||
b.F_Name as courseType,
|
||||
a.F_Format as courseFormat,
|
||||
a.F_CreatorTime as courseCreationTime,
|
||||
a.F_Id as courseId,
|
||||
a.F_ChapterNumber as chapterNumber
|
||||
from ftb_cultivate_course a JOIN ftb_cultivate_label b ON b.F_Id=a.F_TypeId
|
||||
WHERE a.F_Id in
|
||||
<foreach collection="courseIds" item="item" separator="," close=")" open="(">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<!--学习章节数量统计方法-->
|
||||
<select id="numberOfStudyChapters" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM ftb_cultivate_position_cource_chapter_learning WHERE F_UserId = #{userId}
|
||||
AND F_CourceId = #{courseId} AND F_EnabledMark = 0
|
||||
<if test="type !=null and type == 1">
|
||||
and F_state = 1
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="organizationListStatisticsV2"
|
||||
resultType="jnpf.model.cultivate.v2.course.web.vo.V2InnerCultivateCourseOrgStatisticsDto">
|
||||
SELECT
|
||||
ler.F_CourceId as courseId,
|
||||
ler.F_UserId as userId,
|
||||
ler.F_state AS state,
|
||||
ler.F_LearnTime as learnTime,
|
||||
co.F_Name courseName,
|
||||
ty.F_Name as courseTypeName,
|
||||
ty.F_Id as courseTypeId,
|
||||
co.F_CreatorTime as courseCreationTime
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning AS ler
|
||||
JOIN ftb_cultivate_course AS co ON ler.F_CourceId = co.F_Id
|
||||
JOIN ftb_cultivate_label AS ty ON co.F_TypeId = ty.F_Id
|
||||
<where>
|
||||
ler.F_state in (1,2)
|
||||
and ler.F_EnabledMark = 0
|
||||
and co.F_EnabledMark = 0
|
||||
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and co.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
<if test="params.nameType != null and params.nameType != ''">
|
||||
and ty.F_Id = #{params.nameType}
|
||||
</if>
|
||||
<if test="params.courseIds != null and params.courseIds.size() > 0">
|
||||
and co.F_Id IN
|
||||
<foreach collection="params.courseIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="personListStatisticsV2"
|
||||
resultType="jnpf.model.cultivate.v2.course.web.vo.V2InnerCultivateChapterStatisticsDto">
|
||||
SELECT
|
||||
ler.F_CourceId as courseId,
|
||||
ler.F_UserId as userId,
|
||||
ler.F_state AS state,
|
||||
ler.F_ChapterTime as chapterTime,
|
||||
ler.F_chapterId as chapterId
|
||||
FROM
|
||||
ftb_cultivate_position_cource_chapter_learning AS ler
|
||||
JOIN ftb_cultivate_course_chapter AS co ON ler.F_chapterId = co.F_Id
|
||||
<where>
|
||||
ler.F_EnabledMark = 0
|
||||
and co.F_EnabledMark = 0
|
||||
<if test="state != null and state.size() > 0">
|
||||
and ler.F_state IN
|
||||
<foreach collection="state" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userIds != null and userIds.size() > 0">
|
||||
and ler.F_UserId IN
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateCourseTypeMapper">
|
||||
<!--课程类型分页-->
|
||||
<select id="pageList" resultType="jnpf.model.cultivate.vo.course.web.FtbCultivateCourseTypeVO">
|
||||
SELECT F_Id as id,F_Name as `name`,F_Source as source FROM ftb_cultivate_course_type
|
||||
WHERE F_EnabledMark=0 ORDER BY F_Source DESC,F_Id DESC
|
||||
</select>
|
||||
<!--获取所有课程类型-->
|
||||
<select id="getAll" resultType="jnpf.model.cultivate.vo.course.web.FtbCultivateCourseTypeVO">
|
||||
SELECT F_Id as id,F_Name as `name`,F_Source as source FROM ftb_cultivate_course_type
|
||||
WHERE F_EnabledMark=0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateExamFrequncyLogMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.exam.FtbCultivateExamFrequencyLog">
|
||||
<id property="id" column="F_Id" jdbcType="VARCHAR"/>
|
||||
<result property="examId" column="F_ExamId" jdbcType="VARCHAR"/>
|
||||
<result property="userId" column="F_UserId" jdbcType="VARCHAR"/>
|
||||
<result property="creatorUserId" column="F_CreatorUserId" jdbcType="VARCHAR"/>
|
||||
<result property="creatorTime" column="F_CreatorTime" jdbcType="TIMESTAMP"/>
|
||||
<result property="tenantId" column="F_TenantId" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
F_Id,F_ExamId,F_UserId,F_CreatorUserId,F_CreatorTime,F_TenantId
|
||||
</sql>
|
||||
|
||||
<!--查询用户在一定时间范围内的考试次数-->
|
||||
<select id="queryExamNum" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from ftb_cultivate_exam_frequency_log
|
||||
where F_ExamId = #{examId}
|
||||
and F_UserId = #{userId}
|
||||
and F_CreatorTime between #{startTime} AND #{endTime}
|
||||
</select>
|
||||
<select id="queryExamNumByDateStr" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from ftb_cultivate_exam_frequency_log
|
||||
where F_ExamId = #{examId}
|
||||
and F_UserId = #{userId}
|
||||
<if test="null != startDateStr and null != endDateStr">
|
||||
and DATE_FORMAT(F_CreatorTime, '%Y-%m-%d') between #{startDateStr} AND #{endDateStr}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateExamHistoryPaperMapper">
|
||||
</mapper>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateExamMapper">
|
||||
|
||||
<!--查询考试列表-->
|
||||
<select id="pagingQuery" resultType="jnpf.model.cultivate.resp.ExamListVo">
|
||||
SELECT
|
||||
a.F_Id AS id,
|
||||
a.F_ExamId AS examId,
|
||||
a.F_CreatorTime AS creatorTime,
|
||||
a.F_CreatorUserId AS creatorUserId,
|
||||
a.F_LastModifyUserId AS lastModifyUserId,
|
||||
a.F_LastModifyTime AS lastModifyTime,
|
||||
a.F_TenantId AS tenantId,
|
||||
a.F_PaperId AS paperId,
|
||||
a.F_ExamType AS examType,
|
||||
a.F_EnabledMark AS enabledMark,
|
||||
a.F_Description AS description,
|
||||
a.F_ExamMemberId AS examMemberId,
|
||||
a.F_StartTime AS startTime,
|
||||
a.F_EndTime AS endTime,
|
||||
a.F_ExamName AS examName,
|
||||
a.F_ExamTime AS examTime,
|
||||
a.F_ExcellentType AS excellentType,
|
||||
a.F_ExcellentMark AS excellentMark,
|
||||
a.F_PassType AS passType,
|
||||
a.F_PassMark AS passMark,
|
||||
a.F_PostId AS postId,
|
||||
a.F_PostRankId AS postRankId,
|
||||
a.F_Status as status,
|
||||
a.F_ExamLimitation AS examlimitation,
|
||||
a.F_NeedUpdate AS NeedUpdate,
|
||||
a.F_VersionBatch AS versionBatch,
|
||||
a.F_PaperInfo As paperInfo,
|
||||
b.F_Name AS paperName,
|
||||
b.F_QuestionNumber AS questionNum,
|
||||
b.F_TotalScore AS totleScore
|
||||
FROM
|
||||
ftb_cultivate_exam a
|
||||
LEFT JOIN ftb_cultivate_test_paper b ON a.F_PaperId = b.F_Id
|
||||
<where>
|
||||
a.F_EnabledMark = 1
|
||||
<if test="params.keyword!= null and params.keyword!= ''">
|
||||
and (
|
||||
a.F_ExamName like CONCAT('%',#{params.keyword},'%')
|
||||
or b.F_Name like CONCAT('%',#{params.keyword},'%')
|
||||
or a.F_ExamId =#{params.keyword}
|
||||
)
|
||||
</if>
|
||||
<if test="params.postId!= null and params.postId!= ''">
|
||||
and a.F_PostId like CONCAT('%',#{params.postId},'%')
|
||||
</if>
|
||||
<if test="params.postionId!= null and params.postionId!= ''">
|
||||
and a.F_PostRankId like CONCAT('%',#{params.postionId},'%')
|
||||
</if>
|
||||
<if test="params.examType!= null">
|
||||
and a.F_ExamType =#{params.examType}
|
||||
</if>
|
||||
|
||||
<if test="params.needUpdate!= null and params.needUpdate!= '0'">
|
||||
and a.F_NeedUpdate =#{params.needUpdate}
|
||||
</if>
|
||||
|
||||
|
||||
</where>
|
||||
order by a.F_CreatorTime desc
|
||||
</select>
|
||||
<!--岗位考试合格后才能进行鉴定,0否1是-->
|
||||
<select id="queryExamAndIdentifyConfig" resultType="java.lang.Integer">
|
||||
SELECT F_Qualified FROM ftb_cultivate_position WHERE F_EnabledMark = 0 AND F_PostId = #{positionId} limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateExamUserDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.exam.FtbCultivateExamUserDetail">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_exam_user_detail-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_ExamId" jdbcType="VARCHAR" property="fExamid" />
|
||||
<result column="F_PaperId" jdbcType="VARCHAR" property="fPaperid" />
|
||||
<result column="F_ExamUserId" jdbcType="VARCHAR" property="fExamuserid" />
|
||||
<result column="F_QuestionId" jdbcType="VARCHAR" property="fQuestionid" />
|
||||
<result column="F_QuestionContent" jdbcType="VARCHAR" property="fQuestioncontent" />
|
||||
<result column="F_QuestionAnalysis" jdbcType="LONGVARCHAR" property="fQuestionanalysis" />
|
||||
<result column="F_QuestionAnswer" jdbcType="VARCHAR" property="fQuestionanswer" />
|
||||
<result column="F_AnswerSerial" jdbcType="VARCHAR" property="fAnswerserial" />
|
||||
<result column="F_UserAnswer" jdbcType="VARCHAR" property="fUseranswer" />
|
||||
<result column="F_IsRight" jdbcType="TINYINT" property="fIsright" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_ExamId, F_PaperId, F_ExamUserId, F_QuestionId, F_QuestionContent, F_QuestionAnalysis,
|
||||
F_QuestionAnswer, F_AnswerSerial, F_UserAnswer, F_IsRight, F_TenantId, F_CreatorUserId,
|
||||
F_CreatorTime
|
||||
</sql>
|
||||
</mapper>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateFileMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.FtbCultivateFile">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_file-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_LastModifyUserId" jdbcType="VARCHAR" property="fLastmodifyuserid" />
|
||||
<result column="F_LastModifyTime" jdbcType="TIMESTAMP" property="fLastmodifytime" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
<result column="F_BusinessId" jdbcType="VARCHAR" property="fBusinessid" />
|
||||
<result column="F_FileName" jdbcType="VARCHAR" property="fFilename" />
|
||||
<result column="F_Url" jdbcType="VARCHAR" property="fUrl" />
|
||||
<result column="F_Size" jdbcType="INTEGER" property="fSize" />
|
||||
<result column="F_Extension" jdbcType="VARCHAR" property="fExtension" />
|
||||
<result column="F_Type" jdbcType="TINYINT" property="fType" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_EnabledMark, F_CreatorUserId, F_CreatorTime, F_LastModifyUserId, F_LastModifyTime,
|
||||
F_DeleteUserId, F_DeleteTime, F_TenantId, F_BusinessId, F_FileName, F_Url, F_Size,
|
||||
F_Extension, F_Type
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateIdentifyCategoriesMapper">
|
||||
<sql id="Base_Column_List">
|
||||
F_Id, F_Name, F_ParentId, F_Path, F_EnabledMark,
|
||||
F_CreatorUserId, F_CreatorTime, F_LastModifyUserId, F_LastModifyTime, F_TenantId
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateIdentifyItemsPoolMapper">
|
||||
|
||||
|
||||
<select id="webPageList" resultType="jnpf.model.cultivate.v2.item_pool.vo.FtbCultivateIdentifyItemsPoolVo">
|
||||
SELECT
|
||||
p.F_Id AS id,
|
||||
p.F_CateId AS cateId,
|
||||
c.F_Name AS cateName,
|
||||
p.F_Name AS name,
|
||||
F_Type AS type,
|
||||
F_TotalScore AS totalScore,
|
||||
F_MinScore AS minScore,
|
||||
F_MaxScore AS maxScore,
|
||||
p.F_LastModifyUserId AS userId,
|
||||
p.F_LastModifyTime AS time,
|
||||
p.F_BusinessId AS businessId
|
||||
FROM
|
||||
ftb_cultivate_identify_items_pool AS p
|
||||
LEFT JOIN ftb_cultivate_identify_categories AS c ON p.F_CateId = c.F_Id
|
||||
WHERE
|
||||
p.F_EnabledMark = 0
|
||||
<if test="params.keyWord!= null and params.keyWord!= ''">
|
||||
and p.F_Name like CONCAT('%',#{params.keyWord},'%')
|
||||
</if>
|
||||
<if test="params.cateId!= null and params.cateId!= ''">
|
||||
and p.F_CateId = #{params.cateId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countByCateId" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT F_CateId AS selectKey,
|
||||
COUNT(F_Id) AS num
|
||||
FROM ftb_cultivate_identify_items_pool
|
||||
WHERE F_EnabledMark = 0
|
||||
GROUP BY F_CateId
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLabelMapper">
|
||||
|
||||
<select id="commonCourseLabelList" resultType="jnpf.model.cultivate.v2.label.vo.FtbCultivateLabelVo">
|
||||
SELECT
|
||||
distinct p1.F_Id as id,
|
||||
p1.F_Name as name
|
||||
FROM
|
||||
ftb_cultivate_label as p1 join ftb_cultivate_course as p2 on p1.F_Id = p2.F_TypeId
|
||||
WHERE
|
||||
p1.F_EnabledMark = 0
|
||||
and p1.F_type=1
|
||||
and p2.F_Label=1
|
||||
and p2.F_IsGrounding = 1
|
||||
and p2.F_EnabledMark = 0
|
||||
|
||||
<if test="params.keyWord!= null and params.keyWord!= ''">
|
||||
and p2.F_Name like CONCAT('%',#{params.keyWord},'%')
|
||||
</if>
|
||||
|
||||
ORDER BY
|
||||
p1.F_Source DESC,
|
||||
p1.F_CreatorTime asc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnCategoriesMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.learn.FtbCultivateLearnCategories">
|
||||
<id property="id" column="F_Id" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="F_Name" jdbcType="VARCHAR"/>
|
||||
<result property="parentId" column="F_ParentId" jdbcType="VARCHAR"/>
|
||||
<result property="path" column="F_Path" jdbcType="VARCHAR"/>
|
||||
<result property="enabledMark" column="F_EnabledMark" jdbcType="INTEGER"/>
|
||||
<result property="creatorUserId" column="F_CreatorUserId" jdbcType="VARCHAR"/>
|
||||
<result property="creatorTime" column="F_CreatorTime" jdbcType="TIMESTAMP"/>
|
||||
<result property="lastModifyUserId" column="F_LastModifyUserId" jdbcType="VARCHAR"/>
|
||||
<result property="lastModifyTime" column="F_LastModifyTime" jdbcType="TIMESTAMP"/>
|
||||
<result property="tenantId" column="F_TenantId" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
F_Id,F_Name,F_ParentId,
|
||||
F_Path,F_EnabledMark,F_CreatorUserId,
|
||||
F_CreatorTime,F_LastModifyUserId,F_LastModifyTime,
|
||||
F_DeleteUserId,F_DeleteTime,F_TenantId
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnTaskAssignmentMapper">
|
||||
<!--批量查询统计任务的学习人数-->
|
||||
<select id="groupCountNum" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT
|
||||
F_TaskId selectKey,
|
||||
COUNT(*) num
|
||||
FROM
|
||||
ftb_cultivate_learn_task_assignment
|
||||
WHERE
|
||||
F_EnableMark = 0
|
||||
AND F_TaskId IN
|
||||
<foreach collection="taskIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
<if test="status == 1">
|
||||
and F_StudyStats = 2
|
||||
</if>
|
||||
GROUP BY F_TaskId
|
||||
</select>
|
||||
<!--查询任务学习人员列表-->
|
||||
<select id="groupListAssignment"
|
||||
resultType="jnpf.model.cultivate.po.learn.FtbCultivateLearnTaskAssignment">
|
||||
select F_Id as id,F_TaskId as taskId,F_UserId as userId,F_StudyStats as studyStats,F_IssuedCertificate as issuedCertificate from ftb_cultivate_learn_task_assignment where F_EnableMark = 0
|
||||
AND F_TaskId IN
|
||||
<foreach collection="taskIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
<select id="storeMyTaskList" resultType="jnpf.model.cultivate.dto.storestatistics.dto.StoreCultivateTaskDto">
|
||||
select a.F_Id as id,t.F_TaskName as taskName,t.F_TaskType as taskType ,t.F_TimeLimitStartTime as timeLimitStartTime,t.F_TimeLimitEndTime as timeLimitEndTime,t.F_Status as status,
|
||||
t.F_Id as taskId,a.F_StudyStats as studyStats,a.F_LearningStartTime as learningStartTime,a.F_LearningEndTime as learningEndTime,t.F_CreatorTime as createTime,a.F_LastModifyTime as lastModifyTime
|
||||
from ftb_cultivate_learn_task t join ftb_cultivate_learn_task_assignment as a on t.F_Id = a.F_TaskId
|
||||
where a.F_EnableMark=0 and t.F_EnableMark=0 and a.F_UserId=#{userId} and t.F_Status >0
|
||||
|
||||
|
||||
</select>
|
||||
<select id="queryTaskNum" resultType="java.lang.Long">
|
||||
select count(*) from ftb_cultivate_learn_task_assignment a
|
||||
where a.F_EnableMark=0 and a.F_UserId= #{userId}
|
||||
<if test="type == 1">
|
||||
and a.F_StudyStats = 1
|
||||
</if>
|
||||
<if test="type == 2">
|
||||
and a.F_StudyStats = 2
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
INSERT INTO ftb_cultivate_learn_task_assignment (
|
||||
task_id, user_id, study_stats, creator_time, creator_user_id, last_modify_time, last_modify_user_id, enable_mark
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.taskId}, #{item.userId}, #{item.studyStats},
|
||||
#{item.creatorTime}, #{item.creatorUserId}, #{item.lastModifyTime},
|
||||
#{item.lastModifyUserId}, #{item.enableMark}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
<!--查看任务详情列表-->
|
||||
<select id="queryTaskUserListForManagerApp" resultType="jnpf.model.cultivate.v2.task.vo.V2CultivateTaskFinishUserListVo">
|
||||
SELECT
|
||||
F_Id id,
|
||||
F_TaskId taskId,
|
||||
F_UserId userId,
|
||||
F_StudyStats completionStatus,
|
||||
F_LearningStartTime taskStartTime,
|
||||
F_LearningEndTime taskEndTime
|
||||
FROM
|
||||
ftb_cultivate_learn_task_assignment
|
||||
<where>
|
||||
F_TaskId = #{taskId}
|
||||
and F_EnableMark = 0
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnTaskCertificateMapper">
|
||||
|
||||
<!--批量根据任务id查询证书名称-->
|
||||
<select id="queryCertificateName" resultType="jnpf.model.cultivate.resp.TaskRelationCertificateVo">
|
||||
|
||||
SELECT
|
||||
a.F_TaskId taskId,
|
||||
a.F_CertificateId certificateId,
|
||||
b.F_Name certificateName
|
||||
FROM
|
||||
ftb_cultivate_learn_task_certificate a
|
||||
LEFT JOIN ftb_cultivate_certificate b ON a.F_CertificateId = b.F_Id
|
||||
WHERE
|
||||
a.F_EnableMark = 0
|
||||
and a.F_TaskId IN
|
||||
<foreach collection="taskIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
INSERT INTO ftb_cultivate_learn_task_certificate (
|
||||
F_Id,F_TaskId, F_CertificateId, F_PhaseId,
|
||||
F_CreatorTime, F_CreatorUserId, F_LastModifyTime, F_LastModifyUserId
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.id},#{item.taskId}, #{item.certificateId}, #{item.phaseId},
|
||||
#{item.creatorTime}, #{item.creatorUserId}, #{item.lastModifyTime},
|
||||
#{item.lastModifyUserId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 根据任务 ID 查询证书列表(关联证书表,过滤上架且未删除) -->
|
||||
<select id="listByTaskId" resultType="jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskCertificateVo">
|
||||
SELECT a.F_Id id,
|
||||
a.F_TaskId taskId,
|
||||
a.F_CertificateId certificateId,
|
||||
a.F_PhaseId phaseId,
|
||||
a.F_ExamRule examRule,
|
||||
a.F_IdentificationRule identificationRule,
|
||||
a.F_EnableMark enableMark,
|
||||
b.F_Name certName
|
||||
FROM ftb_cultivate_learn_task_certificate a
|
||||
INNER JOIN ftb_cultivate_certificate b ON a.F_CertificateId = b.F_Id
|
||||
WHERE a.F_TaskId = #{taskId}
|
||||
AND a.F_EnableMark = 0
|
||||
AND b.F_Status = 1
|
||||
AND b.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<!-- 根据任务ID和阶段ID查询证书列表(关联证书表,过滤上架且未删除) -->
|
||||
<select id="listByTaskIdAndPhaseId" resultType="jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskCertificateVo">
|
||||
SELECT a.F_Id id,
|
||||
a.F_TaskId taskId,
|
||||
a.F_CertificateId certificateId,
|
||||
a.F_PhaseId phaseId,
|
||||
a.F_ExamRule examRule,
|
||||
a.F_IdentificationRule identificationRule,
|
||||
a.F_EnableMark enableMark,
|
||||
b.F_Name certName
|
||||
FROM ftb_cultivate_learn_task_certificate a
|
||||
INNER JOIN ftb_cultivate_certificate b ON a.F_CertificateId = b.F_Id
|
||||
WHERE a.F_TaskId = #{taskId}
|
||||
AND a.F_PhaseId = #{phaseId}
|
||||
AND a.F_EnableMark = 0
|
||||
AND b.F_Status = 1
|
||||
AND b.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnTaskCourseMapper">
|
||||
<!--批量查询任务的课程数量-->
|
||||
<select id="groupCountNum" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT
|
||||
F_TaskId selectKey,
|
||||
COUNT(*) num
|
||||
FROM
|
||||
ftb_cultivate_learn_task_course
|
||||
WHERE
|
||||
F_EnableMark = 0
|
||||
AND F_TaskId IN
|
||||
<foreach collection="taskIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
GROUP BY F_TaskId
|
||||
</select>
|
||||
<!--批量查询任务的课程列表-->
|
||||
<select id="groupListTaskCourse" resultType="jnpf.model.cultivate.po.learn.FtbCultivateLearnTaskCourse">
|
||||
select F_Id as id,
|
||||
F_TaskId as taskId,
|
||||
F_CourseId as courseId,
|
||||
F_IsRequired as isRequired,
|
||||
F_SortCode as sortCode
|
||||
from ftb_cultivate_learn_task_course
|
||||
where F_EnableMark = 0
|
||||
AND F_TaskId IN
|
||||
<foreach collection="taskIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!--根据任务 ID 查询课程列表 (联表查询课程表,要求课程上架且未删除)-->
|
||||
<select id="listByTaskId" resultType="jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskCourseVo">
|
||||
SELECT
|
||||
a.F_Id as id,
|
||||
a.F_PhaseId as phaseId,
|
||||
a.F_TaskId as taskId,
|
||||
a.F_CourseId as courseId,
|
||||
a.F_IsRequired as isRequired,
|
||||
a.F_EnableMark as enableMark,
|
||||
a.F_SortCode as sortCode,
|
||||
b.F_Name as courseName
|
||||
FROM
|
||||
ftb_cultivate_learn_task_course a
|
||||
INNER JOIN
|
||||
ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
WHERE
|
||||
a.F_EnableMark = 0
|
||||
AND a.F_TaskId = #{taskId}
|
||||
AND b.F_IsGrounding = 1
|
||||
AND b.F_EnabledMark = 0
|
||||
<if test="required != null">
|
||||
AND a.F_IsRequired = #{required}
|
||||
</if>
|
||||
ORDER BY
|
||||
a.F_SortCode ASC
|
||||
</select>
|
||||
|
||||
<select id="listByTaskIdAndPhaseId" resultType="jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskCourseVo">
|
||||
SELECT a.F_Id as id,
|
||||
a.F_PhaseId as phaseId,
|
||||
a.F_TaskId as taskId,
|
||||
a.F_CourseId as courseId,
|
||||
a.F_IsRequired as isRequired,
|
||||
a.F_EnableMark as enableMark,
|
||||
a.F_SortCode as sortCode,
|
||||
b.F_Name as courseName
|
||||
FROM ftb_cultivate_learn_task_course a
|
||||
INNER JOIN
|
||||
ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
WHERE a.F_EnableMark = 0
|
||||
AND a.F_TaskId = #{taskId}
|
||||
AND a.F_PhaseId = #{phaseId}
|
||||
AND b.F_IsGrounding = 1
|
||||
AND b.F_EnabledMark = 0
|
||||
|
||||
ORDER BY a.F_SortCode ASC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnTaskExamMapper">
|
||||
<!--批量查询任务管理的考试信息-->
|
||||
<select id="queryExamBaseInfo" resultType="jnpf.model.cultivate.resp.TaskRelationExamVo">
|
||||
SELECT
|
||||
a.F_TaskId as taskId,
|
||||
a.F_ExamId as examId,
|
||||
exam.F_ExamName AS examName
|
||||
FROM
|
||||
ftb_cultivate_learn_task_exam a join ftb_cultivate_exam exam on a.F_ExamId=exam.F_Id
|
||||
WHERE
|
||||
a.F_EnableMark=0
|
||||
and a.F_TaskId IN
|
||||
<foreach collection="taskIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="queryTaskListForExam" resultType="jnpf.model.cultivate.po.learn.FtbCultivateLearnTask">
|
||||
select t.F_Id as id,
|
||||
t.F_TaskName as taskName
|
||||
from ftb_cultivate_learn_task_exam exam
|
||||
left join ftb_cultivate_learn_task t on exam.F_TaskId = t.F_Id
|
||||
where t.F_EnableMark = 0
|
||||
and exam.F_EnableMark = 0
|
||||
and t.F_Status = 2
|
||||
and exam.F_ExamId = #{examId}
|
||||
</select>
|
||||
|
||||
<select id="queryTaskListForExamNoPublish" resultType="jnpf.model.cultivate.po.learn.FtbCultivateLearnTask">
|
||||
select t.F_Id as id,
|
||||
t.F_TaskName as taskName
|
||||
from ftb_cultivate_learn_task_exam exam
|
||||
left join ftb_cultivate_learn_task t on exam.F_TaskId = t.F_Id
|
||||
where t.F_EnableMark = 0
|
||||
and exam.F_EnableMark = 0
|
||||
and t.F_Status in (0, 1)
|
||||
and exam.F_ExamId = #{examId}
|
||||
</select>
|
||||
|
||||
<select id="queryTaskListForExamAll" resultType="jnpf.model.cultivate.po.learn.FtbCultivateLearnTask">
|
||||
select t.F_Id as id,
|
||||
t.F_TaskName as taskName
|
||||
from ftb_cultivate_learn_task_exam exam
|
||||
left join ftb_cultivate_learn_task t on exam.F_TaskId = t.F_Id
|
||||
where t.F_EnableMark = 0
|
||||
and exam.F_EnableMark = 0
|
||||
and t.F_Status in (0, 1, 2)
|
||||
and exam.F_ExamId = #{examId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
INSERT INTO ftb_cultivate_learn_task_exam (
|
||||
F_Id,F_TaskId, F_ExamId, F_PhaseId,
|
||||
F_CreatorTime, F_CreatorUserId, F_LastModifyTime, F_LastModifyUserId
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.id}, #{item.taskId}, #{item.examId}, #{item.phaseId},
|
||||
#{item.creatorTime}, #{item.creatorUserId}, #{item.lastModifyTime},
|
||||
#{item.lastModifyUserId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--根据任务 ID 查询考试列表 (关联考试表,要求考试未删除且有效)-->
|
||||
<select id="listByTaskIdWithExam" resultType="jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskExamVo">
|
||||
SELECT lte.F_Id as id,
|
||||
lte.F_TaskId as taskId,
|
||||
lte.F_ExamId as examId,
|
||||
lte.F_PhaseId as phaseId,
|
||||
lte.F_IsPassComplete as isPassComplete,
|
||||
lte.F_EnableMark as enableMark,
|
||||
e.F_ExamName as examName
|
||||
FROM ftb_cultivate_learn_task_exam lte
|
||||
INNER JOIN ftb_cultivate_exam e ON lte.F_ExamId = e.F_Id
|
||||
WHERE lte.F_TaskId = #{taskId}
|
||||
AND lte.F_EnableMark = 0
|
||||
AND e.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<select id="listByTaskIdAndPhaseId" resultType="jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskExamVo">
|
||||
SELECT lte.F_Id as id,
|
||||
lte.F_TaskId as taskId,
|
||||
lte.F_ExamId as examId,
|
||||
lte.F_PhaseId as phaseId,
|
||||
lte.F_IsPassComplete as isPassComplete,
|
||||
lte.F_EnableMark as enableMark,
|
||||
e.F_ExamName as examName,
|
||||
e.F_CreatorTime as creatorTime,
|
||||
e.F_LastModifyTime as lastModifyTime
|
||||
FROM ftb_cultivate_learn_task_exam lte
|
||||
INNER JOIN ftb_cultivate_exam e ON lte.F_ExamId = e.F_Id
|
||||
WHERE lte.F_TaskId = #{taskId}
|
||||
AND lte.F_PhaseId = #{phaseId}
|
||||
AND lte.F_EnableMark = 0
|
||||
AND e.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<!--检查考试是否被学习任务绑定(关联任务主表)-->
|
||||
<select id="checkExamBinding" resultType="java.lang.Integer">
|
||||
SELECT COUNT(1)
|
||||
FROM ftb_cultivate_learn_task_exam lte
|
||||
INNER JOIN ftb_cultivate_learn_task t ON lte.F_TaskId = t.F_Id
|
||||
WHERE lte.F_ExamId = #{examId}
|
||||
AND lte.F_EnableMark = 0
|
||||
AND t.F_EnableMark = 0
|
||||
and t.F_Status not in (3, 4)
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnTaskIdentificationMapper">
|
||||
|
||||
<!--根据任务id查询关联的认证信息-->
|
||||
<select id="queryIdentificationName" resultType="jnpf.model.cultivate.resp.TaskRelationIdentificationVo">
|
||||
SELECT
|
||||
t.F_TaskId AS taskId,
|
||||
t.F_IdentificationId AS identificationId,
|
||||
tbl.F_Name AS identificationName,
|
||||
tbl.F_Id as tableId
|
||||
FROM
|
||||
ftb_cultivate_learn_task_identification AS t
|
||||
JOIN ftb_cultivate_identify_table AS tbl ON t.F_IdentificationId = tbl.F_Id
|
||||
WHERE
|
||||
t.F_EnableMark =0
|
||||
AND t.F_TaskId IN
|
||||
<foreach collection="taskIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!--更加任务id查询鉴定信息-->
|
||||
<select id="queryByTaskId" resultType="jnpf.model.cultivate.po.learn.FtbCultivateLearnTaskIdentification">
|
||||
SELECT
|
||||
F_Id as id,
|
||||
F_TaskId AS taskId,
|
||||
F_IsPassComplete as isPassComplete,
|
||||
F_IdentificationId AS identificationId,
|
||||
F_IdentificationRule as identificationRule
|
||||
FROM
|
||||
ftb_cultivate_learn_task_identification
|
||||
WHERE
|
||||
F_TaskId = #{taskId} AND F_EnableMark = 0
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
INSERT INTO ftb_cultivate_learn_task_identification (
|
||||
F_Id,F_TaskId, F_IdentificationId, F_PhaseId,
|
||||
F_CreatorTime, F_CreatorUserId, F_LastModifyTime, F_LastModifyUserId
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.id},#{item.taskId}, #{item.identificationId}, #{item.phaseId},
|
||||
#{item.creatorTime}, #{item.creatorUserId}, #{item.lastModifyTime},
|
||||
#{item.lastModifyUserId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--根据任务 id 查询关联的鉴定表信息(联表查询)-->
|
||||
<select id="listByTaskId" resultType="jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskIdentificationVo">
|
||||
SELECT t.F_Id as id,
|
||||
t.F_TaskId AS taskId,
|
||||
t.F_IdentificationId AS identificationId,
|
||||
t.F_IdentificationRule as identificationRule,
|
||||
t.F_EnableMark as enableMark,
|
||||
t.F_IsPassComplete as isPassComplete,
|
||||
t.F_PhaseId as phaseId,
|
||||
tbl.F_Name AS identificationName
|
||||
FROM ftb_cultivate_learn_task_identification AS t
|
||||
INNER JOIN
|
||||
ftb_cultivate_identify_table AS tbl ON t.F_IdentificationId = tbl.F_Id
|
||||
WHERE t.F_TaskId = #{taskId}
|
||||
AND t.F_EnableMark = 0
|
||||
and tbl.F_IsAbnormal = 0
|
||||
and tbl.F_DeleteMark = 0
|
||||
</select>
|
||||
|
||||
<!--根据任务ID和阶段ID查询关联的鉴定表信息(联表查询)-->
|
||||
<select id="listByTaskIdAndPhaseId" resultType="jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskIdentificationVo">
|
||||
SELECT t.F_Id as id,
|
||||
t.F_TaskId AS taskId,
|
||||
t.F_IdentificationId AS identificationId,
|
||||
t.F_IdentificationRule as identificationRule,
|
||||
t.F_EnableMark as enableMark,
|
||||
t.F_IsPassComplete as isPassComplete,
|
||||
t.F_PhaseId as phaseId,
|
||||
tbl.F_Name AS identificationName,
|
||||
tbl.F_LastModifyTime AS lastModifyTime,
|
||||
tbl.F_CreatorTime AS creatorTime
|
||||
FROM ftb_cultivate_learn_task_identification AS t
|
||||
INNER JOIN
|
||||
ftb_cultivate_identify_table AS tbl ON t.F_IdentificationId = tbl.F_Id
|
||||
WHERE t.F_TaskId = #{taskId}
|
||||
AND t.F_PhaseId = #{phaseId}
|
||||
AND t.F_EnableMark = 0
|
||||
and tbl.F_IsAbnormal = 0
|
||||
and tbl.F_DeleteMark = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnTaskInfoContentMapper">
|
||||
<!--查询考试名称-->
|
||||
<select id="queryNameBasedOnExamId" resultType="java.lang.String">
|
||||
select F_ExamName from ftb_cultivate_exam where F_Id = #{examId}
|
||||
</select>
|
||||
<!--查询鉴定名称-->
|
||||
<select id="queryNameBasedOnIdentificaId" resultType="java.lang.String">
|
||||
select F_Name from ftb_cultivate_identify_table where F_Id = #{identificationId}
|
||||
</select>
|
||||
|
||||
<!--查询任务名称-->
|
||||
<select id="queryNameBasedOnCertificateId" resultType="java.lang.String">
|
||||
select F_Name from ftb_cultivate_certificate where F_Id = #{certificateId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnTaskInfoMapper">
|
||||
|
||||
<!-- 查询我的任务列表 -->
|
||||
<select id="queryTaskList" resultType="jnpf.model.cultivate.vo.learn.FtbCultivateMyLearnTaskListVO">
|
||||
select
|
||||
t.F_Id as id,
|
||||
t.F_TaskName as taskName,
|
||||
t.F_TaskType as taskType,
|
||||
t.F_TimeLimitStartTime as timeLimitStartTime,
|
||||
t.F_TimeLimitEndTime as timeLimitEndTime,
|
||||
t.F_Status as taskStats,
|
||||
m.F_StudyStats as studyStats,
|
||||
m.F_LearningStartTime as learningStartTime,
|
||||
m.F_LearningEndTime as learningEndTime,
|
||||
t.F_StudentTimeCompletion as studentTimeCompletion,
|
||||
t.F_TimeCompletionUnit as timeCompletionUnit,
|
||||
t.F_StudentTimeCompletion as timeCompletionDays
|
||||
from ftb_cultivate_learn_task as t
|
||||
left join ftb_cultivate_learn_task_assignment as m on t.F_Id=m.F_TaskId
|
||||
<where>
|
||||
t.F_EnableMark = 0 and t.F_Status != 0 and m.F_EnableMark = 0
|
||||
<if test="taskListDto.keyWords!= null and taskListDto.keyWords!= ''">
|
||||
and t.F_TaskName like CONCAT('%',#{taskListDto.keyWords},'%')
|
||||
</if>
|
||||
<if test="taskListDto.flag != null and taskListDto.flag == 1 ">
|
||||
and m.F_StudyStats = 2
|
||||
</if>
|
||||
<if test="taskListDto.flag != null and taskListDto.flag == 0 ">
|
||||
and m.F_StudyStats != 2
|
||||
</if>
|
||||
<if test="taskListDto.userId != null and taskListDto.userId != ''">
|
||||
and m.F_UserId = #{taskListDto.userId}
|
||||
</if>
|
||||
|
||||
<if test="taskListDto.flag != null and taskListDto.flag == 0 ">
|
||||
order by t.F_CreatorTime desc
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!--查看任务详情列表-->
|
||||
<select id="getListOfCompletions" resultType="jnpf.model.cultivate.vo.learn.FtbCultivateLearnTaskFinishInfoVO">
|
||||
SELECT
|
||||
F_Id id,
|
||||
F_TaskId taskId,
|
||||
F_UserId userId,
|
||||
F_StudyStats completionStatus,
|
||||
F_LearningStartTime taskStartTime,
|
||||
F_LearningEndTime taskEndTime
|
||||
FROM
|
||||
ftb_cultivate_learn_task_assignment
|
||||
<where>
|
||||
F_TaskId = #{taskId}
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
and F_Id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
and F_EnableMark = 0
|
||||
</where>
|
||||
</select>
|
||||
<!--查询对应课程完成情况-->
|
||||
<select id="queryCourseUserInfo"
|
||||
resultType="jnpf.model.cultivate.vo.learn.info.FtbCultivateLearnTaskCourseUserInfoVO">
|
||||
SELECT
|
||||
po.F_CourceId as courseId,
|
||||
cs.F_Name as courseName,
|
||||
po.F_LearnTime as unavailable
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning AS po
|
||||
INNER JOIN ftb_cultivate_learn_task_course AS task ON task.F_CourseId = po.F_CourceId
|
||||
LEFT JOIN ftb_cultivate_course AS cs ON po.F_CourceId = cs.F_Id
|
||||
<where>
|
||||
po.F_EnabledMark = 0 and
|
||||
task.F_TaskId = #{taskId}
|
||||
and po.F_UserId = #{userId}
|
||||
</where>
|
||||
</select>
|
||||
<!--查询证书信息-->
|
||||
<select id="queryCertificateInfo"
|
||||
resultType="jnpf.model.cultivate.vo.learn.info.FtbCultivateLearnTaskCertificateUserInfoVO">
|
||||
SELECT
|
||||
ag.F_IssuedCertificate as isFinish,
|
||||
ce.F_CertificateId as certificateId,
|
||||
cf.F_Name as certificateName
|
||||
FROM
|
||||
ftb_cultivate_learn_task_assignment AS ag
|
||||
LEFT JOIN ftb_cultivate_learn_task_certificate AS ce ON ag.F_TaskId = ce.F_TaskId
|
||||
LEFT JOIN ftb_cultivate_certificate as cf ON ce.F_CertificateId = cf.F_Id
|
||||
<where>
|
||||
ag.F_TaskId = #{taskId}
|
||||
and ag.F_UserId = #{userId}
|
||||
and ag.F_EnableMark=0
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<!--查询实操鉴定-->
|
||||
<select id="queryIdentificationInfo"
|
||||
resultType="jnpf.model.cultivate.vo.learn.info.FtbCultivateLearnTaskIdentificationUserInfoVO">
|
||||
SELECT
|
||||
ba.F_TableId as identificationId,
|
||||
ba.F_Name as identificationName,
|
||||
us.F_Status as identifyStatus,
|
||||
us.F_Result as identifyResult,
|
||||
CASE us.F_Status
|
||||
WHEN 0 THEN 0
|
||||
WHEN 1 THEN 1
|
||||
WHEN 2 THEN 0 END as isFinish
|
||||
FROM
|
||||
ftb_cultivate_identify_apply AS us
|
||||
LEFT JOIN ftb_cultivate_identify_apply_table_backups AS ba ON us.F_TableId = ba.F_Id
|
||||
inner JOIN ftb_cultivate_learn_task_identification AS tas ON tas.F_IdentificationId = ba.F_TableId and tas.F_TaskId = us.F_SourceId
|
||||
<where>
|
||||
tas.F_TaskId = #{taskId}
|
||||
and us.F_DeleteMark = 0
|
||||
and us.F_BeIdentifyUserId = #{userId}
|
||||
</where>
|
||||
</select>
|
||||
<!--查询考试-->
|
||||
<select id="queryExamInfo" resultType="jnpf.model.cultivate.vo.learn.info.FtbCultivateLearnTaskExamUserInfoVO">
|
||||
SELECT
|
||||
ex.F_ExamId as examId,
|
||||
ex.F_ExamName as examName,
|
||||
CASE
|
||||
us.F_Status
|
||||
WHEN 0 THEN 0
|
||||
WHEN 2 THEN 0
|
||||
WHEN 1 THEN 1
|
||||
WHEN 3 THEN 1
|
||||
WHEN 4 THEN 1
|
||||
WHEN 5 THEN 1
|
||||
END AS isFinish,
|
||||
us.F_Duration as unavailable
|
||||
FROM
|
||||
ftb_cultivate_exam_user AS us
|
||||
INNER JOIN ftb_cultivate_learn_task_exam AS tas ON tas.F_TaskId = us.F_RelationTaskId AND us.F_ExamId AND tas.F_ExamId
|
||||
LEFT JOIN ftb_cultivate_exam AS ex ON us.F_ExamId = tas.F_ExamId
|
||||
<where>
|
||||
us.F_ExamSource = 4
|
||||
and tas.F_TaskId = #{taskId}
|
||||
and us.F_UserId = #{userId}
|
||||
</where>
|
||||
</select>
|
||||
<!--查询任务列表-->
|
||||
<select id="getTaskList" resultType="jnpf.model.cultivate.vo.learn.FtbCultivateLearnTaskListVO">
|
||||
SELECT
|
||||
task.F_Id as id,
|
||||
task.F_TaskName as taskName,
|
||||
task.F_Status as status,
|
||||
task.F_TaskType as taskType,
|
||||
task.F_TimeLimitStartTime as learningStartTime,
|
||||
task.F_TimeLimitEndTime as learningEndTime,
|
||||
COUNT(ag.F_UserId) as taskNumber,
|
||||
task.F_CreatorTime as createTime
|
||||
FROM
|
||||
ftb_cultivate_learn_task as task
|
||||
LEFT JOIN ftb_cultivate_learn_task_assignment as ag ON task.F_Id = ag.F_TaskId
|
||||
<where>
|
||||
task.F_EnableMark = 0 and task.F_Status != 0 and ag.F_EnableMark = 0
|
||||
<if test="taskListDto.keyWords!= null and taskListDto.keyWords!= ''">
|
||||
and task.F_TaskName like CONCAT('%',#{taskListDto.keyWords},'%')
|
||||
</if>
|
||||
<if test="taskListDto.taskFlag != null and taskListDto.taskFlag != ''">
|
||||
and task.F_Status = #{taskListDto.taskFlag}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY task.F_Id order by task.F_CreatorTime desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,321 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnTaskMapper">
|
||||
<!--统计查询分类下任务数量-->
|
||||
<select id="groupCountCateNum" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
select F_TaskClass as selectKey,count(*) as num from ftb_cultivate_learn_task where F_EnableMark=0 group by F_TaskClass
|
||||
</select>
|
||||
<!--web查询任务列表-->
|
||||
<select id="getMyWebPageList" resultType="jnpf.model.cultivate.vo.learn.FtbCultivateLearnTaskInfoListVO">
|
||||
select
|
||||
t.F_Id as id,
|
||||
t.F_TaskClass as taskClass,
|
||||
t.F_LearnTaskShowId as learnTaskShowId,
|
||||
t.F_TaskName as taskName,
|
||||
t.F_TaskType as taskType,
|
||||
t.F_TimeLimitStartTime as timeLimitStartTime,
|
||||
t.F_TimeLimitEndTime as timeLimitEndTime,
|
||||
t.F_StudentTimeCompletion as studentTimeCompletion,
|
||||
t.F_TimeCompletionUnit as timeCompletionUnit,
|
||||
t.F_TimeCompletionDays as timeCompletionDays,
|
||||
t.F_Status as `status`,
|
||||
t.F_AssignmentRule as assignmentRule,
|
||||
t.F_StartEntryPeriod as startEntryPeriod,
|
||||
t.F_EndEntryPeriod as endEntryPeriod,
|
||||
t.F_CoverUrl as coverUrl,
|
||||
t.F_CreatorUserId as creatorUserId,
|
||||
t.F_CreatorTime as creatorTime
|
||||
from ftb_cultivate_learn_task as t
|
||||
where t.F_EnableMark=0
|
||||
<if test="params.startDate!= null and params.endDate!= null">
|
||||
and t.F_CreatorTime between #{params.startDate} and #{params.endDate}
|
||||
</if>
|
||||
|
||||
<if test="params.keyWord!= null and params.keyWord!= ''">
|
||||
and t.F_TaskName like CONCAT('%',#{params.keyWord},'%')
|
||||
</if>
|
||||
|
||||
<if test="params.status!= null">
|
||||
and t.F_Status =#{params.status}
|
||||
</if>
|
||||
|
||||
<if test="params.categoryId!= null and params.categoryId!= '' and params.categoryId!= '0'">
|
||||
and t.F_TaskClass = #{params.categoryId}
|
||||
</if>
|
||||
order by t.F_CreatorTime desc
|
||||
</select>
|
||||
<!--任务统计查询学习任务统计列表-->
|
||||
<select id="queryLearnCountList"
|
||||
resultType="jnpf.model.cultivate.vo.learn.FtbCultivateLearnTaskInfoCountListVO">
|
||||
select
|
||||
t.F_Id as id,
|
||||
t.F_TaskClass as taskClass,
|
||||
t.F_LearnTaskShowId as learnTaskShowId,
|
||||
t.F_TaskName as taskName,
|
||||
t.F_TaskType as taskType,
|
||||
t.F_TimeLimitStartTime as timeLimitStartTime,
|
||||
t.F_TimeLimitEndTime as timeLimitEndTime,
|
||||
t.F_StudentTimeCompletion as studentTimeCompletion,
|
||||
t.F_TimeCompletionDays as timeCompletionDays,
|
||||
t.F_Status as `status`,
|
||||
t.F_AssignmentRule as assignmentRule,
|
||||
t.F_StartEntryPeriod as startEntryPeriod,
|
||||
t.F_EndEntryPeriod as endEntryPeriod,
|
||||
t.F_CoverUrl as coverUrl,
|
||||
t.F_CreatorUserId as creatorUserId,
|
||||
t.F_CreatorTime as creatorTime
|
||||
from ftb_cultivate_learn_task as t
|
||||
where t.F_EnableMark=0
|
||||
<if test="params.startDate!= null and params.endDate!= null">
|
||||
and t.F_CreatorTime between #{params.startDate} and #{params.endDate}
|
||||
</if>
|
||||
|
||||
<if test="params.keyWord!= null and params.keyWord!= ''">
|
||||
and t.F_TaskName like CONCAT('%',#{params.keyWord},'%')
|
||||
</if>
|
||||
|
||||
<if test="params.status!= null">
|
||||
and t.F_Status =#{params.status}
|
||||
</if>
|
||||
<if test="params.status== null">
|
||||
and t.F_Status not in (0,4)
|
||||
</if>
|
||||
order by t.F_CreatorTime desc
|
||||
</select>
|
||||
<!--查询需要提醒的任务列表-->
|
||||
<select id="queryNeedPerDayAlert" resultType="jnpf.model.cultivate.dto.learn.NeedPerDayAlertDto">
|
||||
SELECT
|
||||
t.F_Id as taskId,t.F_TaskName AS taskName,
|
||||
re.F_PerInterval AS perInterval
|
||||
FROM
|
||||
ftb_cultivate_learn_task AS t
|
||||
LEFT JOIN ftb_cultivate_learn_task_reminder_rule AS re ON t.F_Id = re.F_TaskId
|
||||
WHERE
|
||||
t.F_Status = 2
|
||||
AND t.F_EnableMark = 0
|
||||
AND re.F_TaskEndReminder = 1
|
||||
AND re.F_EnableMark = 0
|
||||
</select>
|
||||
|
||||
<!--查询任务列表及其统计信息-->
|
||||
<select id="queryTaskListForApp" resultType="jnpf.model.cultivate.v2.task.vo.V2CultivateTaskListForManagerVo">
|
||||
SELECT
|
||||
t.F_Id as id,
|
||||
t.F_TaskName as taskName,
|
||||
t.F_CoverId as coverId,
|
||||
t.F_CoverUrl as coverUrl,
|
||||
t.F_Status as status,
|
||||
t.F_TaskType as taskType,
|
||||
t.F_TimeLimitStartTime as learningStartTime,
|
||||
t.F_TimeLimitEndTime as learningEndTime,
|
||||
t.F_CreatorTime as createTime,
|
||||
t.F_Description as description
|
||||
FROM
|
||||
ftb_cultivate_learn_task as t
|
||||
WHERE
|
||||
t.F_EnableMark = 0
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND t.F_TaskName LIKE CONCAT('%', #{keyWord}, '%')
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND t.F_Status = #{status}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryTaskCountForApp" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM
|
||||
ftb_cultivate_learn_task as t
|
||||
WHERE
|
||||
t.F_EnableMark = 0
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND t.F_TaskName LIKE CONCAT('%', #{keyWord}, '%')
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND t.F_Status = #{status}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryMyTaskListForApp" resultType="jnpf.model.cultivate.v2.task.vo.V2MyCultivateLearnTaskListVo">
|
||||
select
|
||||
m.F_Id as id,
|
||||
t.F_Id as taskId,
|
||||
t.F_TaskName as taskName,
|
||||
t.F_TaskType as taskType,
|
||||
t.F_TimeLimitStartTime as timeLimitStartTime,
|
||||
t.F_TimeLimitEndTime as timeLimitEndTime,
|
||||
t.F_Status as taskStats,
|
||||
t.F_CoverId as coverId,
|
||||
t.F_CoverUrl as coverUrl,
|
||||
m.F_StudyStats as studyStats,
|
||||
m.F_LearningStartTime as learningStartTime,
|
||||
m.F_LearningEndTime as learningEndTime,
|
||||
t.F_StudentTimeCompletion as studentTimeCompletion,
|
||||
t.F_TimeCompletionUnit as timeCompletionUnit,
|
||||
t.F_StudentTimeCompletion as timeCompletionDays
|
||||
from ftb_cultivate_learn_task as t
|
||||
left join ftb_cultivate_learn_task_assignment as m on t.F_Id=m.F_TaskId
|
||||
<where>
|
||||
|
||||
t.F_EnableMark = 0 and t.F_Status != 0 and m.F_EnableMark = 0
|
||||
<![CDATA[
|
||||
and (t.F_TaskType=0 or (t.F_TaskType=1 and t.F_TimeLimitStartTime <= CURRENT_TIMESTAMP) )
|
||||
]]>
|
||||
<if test="params.keyWord!= null and params.keyWord!= ''">
|
||||
and t.F_TaskName like CONCAT('%',#{params.keyWord},'%')
|
||||
</if>
|
||||
<if test="params.status != null and params.status == 1 ">
|
||||
and m.F_StudyStats in (0,1)
|
||||
</if>
|
||||
<if test="params.status != null and params.status == 2 ">
|
||||
and m.F_StudyStats = 2
|
||||
</if>
|
||||
<if test="params.status != null and params.status == 3 ">
|
||||
and m.F_StudyStats = 3
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and m.F_UserId = #{userId}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryMyTaskCountForApp" resultType="java.lang.Integer">
|
||||
select
|
||||
count(1)
|
||||
from ftb_cultivate_learn_task as t
|
||||
left join ftb_cultivate_learn_task_assignment as m on t.F_Id=m.F_TaskId
|
||||
<where>
|
||||
t.F_EnableMark = 0 and t.F_Status != 0 and m.F_EnableMark = 0
|
||||
<![CDATA[
|
||||
and (t.F_TaskType=0 or (t.F_TaskType=1 and t.F_TimeLimitStartTime <= CURRENT_TIMESTAMP) )
|
||||
]]>
|
||||
<if test="keyWord!= null and keyWord!= ''">
|
||||
and t.F_TaskName like CONCAT('%',#{keyWord},'%')
|
||||
</if>
|
||||
<if test="status != null and status == 1 ">
|
||||
and m.F_StudyStats in (0,1)
|
||||
</if>
|
||||
<if test="status != null and status == 2 ">
|
||||
and m.F_StudyStats = 2
|
||||
</if>
|
||||
<if test="status != null and status == 3 ">
|
||||
and m.F_StudyStats = 3
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and m.F_UserId = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryMyNoCompleteTaskListForUserId"
|
||||
resultType="jnpf.model.cultivate.v2.task.vo.V2MyCultivateLearnTaskListVo">
|
||||
select
|
||||
m.F_Id as id,
|
||||
t.F_Id as taskId,
|
||||
t.F_TaskName as taskName,
|
||||
t.F_TaskType as taskType,
|
||||
t.F_TimeLimitStartTime as timeLimitStartTime,
|
||||
t.F_TimeLimitEndTime as timeLimitEndTime,
|
||||
t.F_Status as taskStats,
|
||||
t.F_CoverId as coverId,
|
||||
t.F_CoverUrl as coverUrl,
|
||||
m.F_StudyStats as studyStats,
|
||||
m.F_LearningStartTime as learningStartTime,
|
||||
m.F_LearningEndTime as learningEndTime,
|
||||
t.F_StudentTimeCompletion as studentTimeCompletion,
|
||||
t.F_TimeCompletionUnit as timeCompletionUnit,
|
||||
t.F_StudentTimeCompletion as timeCompletionDays
|
||||
from ftb_cultivate_learn_task as t
|
||||
left join ftb_cultivate_learn_task_assignment as m on t.F_Id=m.F_TaskId
|
||||
<where>
|
||||
t.F_EnableMark = 0 and t.F_Status != 0 and m.F_EnableMark = 0
|
||||
<![CDATA[
|
||||
and (t.F_TaskType=0 or (t.F_TaskType=1 and t.F_Status = 2) )
|
||||
]]>
|
||||
and m.F_StudyStats in (0,1)
|
||||
<if test="userId != null and userId != ''">
|
||||
and m.F_UserId = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryTaskHasExam" resultType="java.lang.String">
|
||||
select F_TaskId as taskId from ftb_cultivate_learn_task_exam
|
||||
WHERE
|
||||
F_EnableMark = 0 and
|
||||
F_TaskId IN
|
||||
<foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
|
||||
#{taskId}
|
||||
</foreach>
|
||||
and F_ExamId=#{examId}
|
||||
</select>
|
||||
|
||||
<select id="queryTaskHasPracticeId" resultType="java.lang.String">
|
||||
select F_TaskId as taskId from ftb_cultivate_learn_task_practice
|
||||
WHERE
|
||||
F_EnableMark = 0 and
|
||||
F_TaskId IN
|
||||
<foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
|
||||
#{taskId}
|
||||
</foreach>
|
||||
and F_BusinessId=#{practiceId}
|
||||
</select>
|
||||
|
||||
<select id="queryTaskHasIdentityId" resultType="java.lang.String">
|
||||
select F_TaskId as taskId from ftb_cultivate_learn_task_identification
|
||||
WHERE
|
||||
F_EnableMark = 0 and
|
||||
F_TaskId IN
|
||||
<foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
|
||||
#{taskId}
|
||||
</foreach>
|
||||
and F_IdentificationId=#{identityId}
|
||||
</select>
|
||||
|
||||
<select id="queryMyRunningTask" resultType="java.lang.String">
|
||||
select
|
||||
t.F_Id as taskId
|
||||
from ftb_cultivate_learn_task as t
|
||||
inner join ftb_cultivate_learn_task_assignment as m on t.F_Id=m.F_TaskId
|
||||
inner join ftb_cultivate_learn_task_course as c on t.F_Id=c.F_TaskId
|
||||
inner join ftb_cultivate_course as course on c.F_CourseId=course.F_Id
|
||||
<where>
|
||||
t.F_EnableMark = 0 and t.F_Status =2 and m.F_EnableMark = 0
|
||||
and c.F_CourseId=#{courseId}
|
||||
and c.F_EnableMark= 0
|
||||
and m.F_StudyStats =1
|
||||
and course.F_EnabledMark = 0
|
||||
and course.F_IsGrounding=1
|
||||
<if test="userId != null and userId != ''">
|
||||
and m.F_UserId = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--V2查询任务统计列表-->
|
||||
<select id="queryV2TaskCountList" resultType="jnpf.model.cultivate.v2.task.vo.V2CultivateTaskCountVo">
|
||||
select
|
||||
t.F_Id as id,
|
||||
t.F_TaskName as taskName,
|
||||
t.F_TaskType as taskType,
|
||||
t.F_Status as status,
|
||||
t.F_TimeLimitStartTime as timeLimitStartTime,
|
||||
t.F_TimeLimitEndTime as timeLimitEndTime,
|
||||
t.F_CreatorTime as creatorTime
|
||||
from ftb_cultivate_learn_task as t
|
||||
where t.F_EnableMark=0
|
||||
<if test="taskName != null and taskName != ''">
|
||||
and t.F_TaskName like CONCAT('%',#{taskName},'%')
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and t.F_Status = #{status}
|
||||
</if>
|
||||
<if test="creatorTimeStart != null and creatorTimeEnd != null">
|
||||
and t.F_CreatorTime between #{creatorTimeStart} and #{creatorTimeEnd}
|
||||
</if>
|
||||
order by t.F_CreatorTime desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnTaskPhaseMapper">
|
||||
|
||||
<select id="groupCountNum" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT F_TaskId AS selectKey, COUNT(*) AS num
|
||||
FROM ftb_cultivate_learn_task_phase
|
||||
WHERE F_TaskId IN
|
||||
<foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
|
||||
#{taskId}
|
||||
</foreach>
|
||||
AND F_EnableMark = 0
|
||||
GROUP BY F_TaskId
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnTaskPracticeMapper">
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
INSERT INTO ftb_cultivate_learn_task_practice (
|
||||
F_Id,F_TaskId, F_BusinessId, F_Num, F_PhaseId,
|
||||
F_CreatorTime, F_CreatorUserId, F_LastModifyTime, F_LastModifyUserId
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.id}, #{item.taskId}, #{item.businessId}, #{item.num}, #{item.phaseId},
|
||||
#{item.creatorTime}, #{item.creatorUserId}, #{item.lastModifyTime}, #{item.lastModifyUserId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 根据任务 ID 查询练习列表(关联技能表,过滤未删除) -->
|
||||
<select id="listByTaskId" resultType="jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskPracticeVo">
|
||||
SELECT
|
||||
a.F_Id AS id,
|
||||
a.F_TaskId AS taskId,
|
||||
a.F_BusinessId AS businessId,
|
||||
a.F_Num AS num,
|
||||
a.F_PhaseId AS phaseId,
|
||||
s.F_Name AS businessName
|
||||
FROM ftb_cultivate_learn_task_practice a
|
||||
INNER JOIN ftb_cultivate_teaching_skill s ON a.F_BusinessId = s.F_Id
|
||||
WHERE
|
||||
a.F_TaskId = #{taskId}
|
||||
AND a.F_EnableMark = 0
|
||||
AND s.F_DeleteMark = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据任务ID和阶段ID查询练习列表(关联技能表,过滤未删除) -->
|
||||
<select id="listByTaskIdAndPhaseId" resultType="jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskPracticeVo">
|
||||
SELECT
|
||||
a.F_Id AS id,
|
||||
a.F_TaskId AS taskId,
|
||||
a.F_BusinessId AS businessId,
|
||||
a.F_Num AS num,
|
||||
a.F_PhaseId AS phaseId,
|
||||
s.F_Name AS businessName
|
||||
FROM ftb_cultivate_learn_task_practice a
|
||||
INNER JOIN ftb_cultivate_teaching_skill s ON a.F_BusinessId = s.F_Id
|
||||
WHERE
|
||||
a.F_TaskId = #{taskId}
|
||||
AND a.F_PhaseId = #{phaseId}
|
||||
AND a.F_EnableMark = 0
|
||||
AND s.F_DeleteMark = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateLearnTaskReminderRuleMapper">
|
||||
<!--任务课程-->
|
||||
<select id="getLearnTaskCourseList" resultType="jnpf.model.cultivate.dto.learn.FtbCultivateLearnTaskCourseInfoDto">
|
||||
SELECT b.F_CourseId as courseId,a.F_Name as courseName,b.F_IsRequired as isRequired, a.F_Format format,a.F_IsGrounding isGrounding
|
||||
FROM ftb_cultivate_course a JOIN ftb_cultivate_learn_task_course b ON a.F_Id = b.F_CourseId
|
||||
where a.F_EnabledMark = 0 and a.F_IsGrounding = 1 and b.F_TaskId = #{taskId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateMyLearnTaskInfoMapper">
|
||||
<!--任务课程列表-->
|
||||
<select id="queryCourseList" resultType="jnpf.model.cultivate.vo.course.app.FtbGlobalCurriculumAppVO">
|
||||
SELECT
|
||||
a.F_CourseId as courseId,
|
||||
b.F_Name as courseName,
|
||||
b.F_Highlights as courseHighlights,
|
||||
c.F_state as learnState,
|
||||
a.F_IsRequired as isRequired
|
||||
FROM ftb_cultivate_learn_task_course a
|
||||
JOIN ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
JOIN ftb_cultivate_position_cource_learning c ON a.F_CourseId=c.F_CourceId
|
||||
<where>
|
||||
b.F_EnabledMark = 0
|
||||
and c.F_EnabledMark = 0
|
||||
and b.F_IsGrounding = 1
|
||||
and c.F_UserId = #{userId}
|
||||
and a.F_TaskId = #{taskId}
|
||||
<if test="compulsory != null ">
|
||||
and a.F_IsRequired = #{compulsory}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY a.F_CourseId
|
||||
order by c.F_state ASC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateOfflineCourseMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateOfflineTrainMapper">
|
||||
<!--线下培训课程信息-->
|
||||
<select id="listOfflineCourseVO" resultType="jnpf.model.cultivate.vo.offline.OfflineCourseVO">
|
||||
select
|
||||
a.F_CourseId as courseId,
|
||||
b.F_CoverUrl as coverUrl,
|
||||
b.F_Name as courseName
|
||||
|
||||
from
|
||||
ftb_cultivate_offline_course a JOIN ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
where b.F_EnabledMark = 0 and a.F_OffilneId = #{offlineId}
|
||||
</select>
|
||||
<sql id="signInTotalNum">
|
||||
(SELECT COUNT(0) FROM ftb_cultivate_offline_user WHERE F_OffilneId = a.F_Id and F_EnabledMark=0) as signInTotalNum
|
||||
</sql>
|
||||
<sql id="signInNum">
|
||||
(SELECT COUNT(0) FROM ftb_cultivate_offline_user WHERE F_OffilneId = a.F_Id and F_SignWhether = 1 and F_EnabledMark=0) as signInNum
|
||||
</sql>
|
||||
<!--线下培训分页-->
|
||||
<select id="listPage" resultType="jnpf.model.cultivate.vo.offline.FtbCultivateOfflineTrainPageVO">
|
||||
select a.F_Id as id,
|
||||
a.F_Name as `name`,
|
||||
a.F_OfflinePlace as offlinePlace,
|
||||
a.F_UserId as userId,
|
||||
a.F_HeadUserId as headUserId,
|
||||
a.F_TrainStartTime as trainStartTime,
|
||||
a.F_TrainEndTime as trainEndTime,
|
||||
a.F_State as state,
|
||||
a.F_SignWay as signWay,
|
||||
<include refid="signInTotalNum"/>,
|
||||
<include refid="signInNum"/>
|
||||
from ftb_cultivate_offline_train a
|
||||
<where>
|
||||
a.F_EnabledMark = 0
|
||||
<if test="keywords!= null and keywords!= ''">
|
||||
and a.F_Name like CONCAT('%',#{keywords},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!--线下培训app查询-->
|
||||
<select id="listOfflineTrainingApp" resultType="jnpf.model.cultivate.vo.offline.FtbOfflineTrainingAppPageVO">
|
||||
SELECT a.F_Id as id,a.F_Name as name,
|
||||
a.F_HeadUserId as headUserId,a.F_TrainStartTime as trainStartTime,a.F_TrainEndTime as trainEndTime
|
||||
,a.F_TrainContent as trainContent,a.F_SignWay as signWay,a.F_State as state,
|
||||
(select F_SignWhether FROM ftb_cultivate_offline_user WHERE F_OffilneId = a.F_Id and F_UserId = #{userId} and F_EnabledMark=0) as checkInOrNot
|
||||
<if test="type == 3">
|
||||
,<include refid="signInTotalNum"/>,
|
||||
<include refid="signInNum"/>
|
||||
</if>
|
||||
FROM ftb_cultivate_offline_train a
|
||||
<where>
|
||||
a.F_EnabledMark = 0 and a.F_State != 3
|
||||
<if test="type == null ">
|
||||
and (a.F_UserId = #{userId} or FIND_IN_SET(#{userId},a.F_Participants) > 0 or a.F_HeadUserId = #{userId})
|
||||
</if>
|
||||
<if test="type == 1">
|
||||
and a.F_UserId = #{userId}
|
||||
</if>
|
||||
<if test="type == 2">
|
||||
and FIND_IN_SET(#{userId},a.F_Participants) > 0
|
||||
</if>
|
||||
<if test="type == 3">
|
||||
and a.F_HeadUserId = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!--线下培训课程信息根据线下培训id查询-->
|
||||
<select id="listOfflineWebCourseVO" resultType="jnpf.model.cultivate.vo.offline.OfflineCourseVO">
|
||||
select a.F_CourseId as courseId,
|
||||
b.F_Name as courseName
|
||||
from
|
||||
ftb_cultivate_offline_course a JOIN ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
where a.F_OffilneId = #{offlineId}
|
||||
</select>
|
||||
<!--线下培训附件删除-->
|
||||
<delete id="deleteOfflineTrainFileById">
|
||||
delete from ftb_cultivate_file where F_BusinessId = #{id}
|
||||
</delete>
|
||||
<update id="deleteLeaveUser">
|
||||
UPDATE ftb_cultivate_offline_user
|
||||
SET F_EnabledMark = 1
|
||||
WHERE F_UserId IN
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
<!--线下培训已绑定课程-->
|
||||
<select id="queryCourseIdsByOfflineId" resultType="java.lang.String">
|
||||
SELECT F_CourseId from ftb_cultivate_offline_course WHERE F_OffilneId = #{offlineId} and F_EnabledMark = 0
|
||||
</select>
|
||||
<!--线下培训签到人数分页查询-->
|
||||
<select id="numberOfflineTraining"
|
||||
resultType="jnpf.model.cultivate.vo.offline.FtbCultivateOfflineTrainPeopleSigningInVO">
|
||||
SELECT
|
||||
a.F_UserId as userId,
|
||||
a.F_SignPhoto as checkInPhoto,
|
||||
a.F_SignWhether as checkInStatus,
|
||||
a.F_SignTime as checkInTime,
|
||||
b.F_RealName as signInPersonName
|
||||
FROM ftb_cultivate_offline_user a left JOIN base_user b ON a.F_UserId=b.F_Id
|
||||
where a.F_OffilneId = #{params.offlineTrainId} and a.F_EnabledMark=0
|
||||
<if test="params.checkInStatus != null">
|
||||
and a.F_SignWhether = #{params.checkInStatus}
|
||||
</if>
|
||||
<if test="params.signInPersonName != null and params.signInPersonName != ''">
|
||||
and b.F_RealName like CONCAT('%',#{params.signInPersonName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="queryMyOfflineTrainList" resultType="jnpf.model.cultivate.dto.storestatistics.dto.StoreOfflineTrainDto">
|
||||
SELECT
|
||||
t.F_Id AS id,
|
||||
t.F_Name AS name,
|
||||
t.F_State as state,
|
||||
t.F_TrainStartTime as trainStartTime,
|
||||
t.F_TrainEndTime as trainEndTime,
|
||||
u.F_SignTime AS signTime,
|
||||
u.F_SignWhether AS signWhether
|
||||
FROM
|
||||
ftb_cultivate_offline_train AS t
|
||||
JOIN
|
||||
ftb_cultivate_offline_user AS u ON t.F_Id = u.F_OffilneId
|
||||
WHERE
|
||||
t.F_EnabledMark = 0 and u.F_EnabledMark=0
|
||||
AND u.F_UserId = #{userId}
|
||||
</select>
|
||||
<select id="queryMyOfflineTrainingHeader"
|
||||
resultType="jnpf.model.cultivate.dto.storestatistics.dto.StoreOfflineTrainDto">
|
||||
SELECT t.F_Id AS id,
|
||||
t.F_Name AS name,
|
||||
t.F_State as state,
|
||||
t.F_TrainStartTime as trainStartTime,
|
||||
t.F_TrainEndTime as trainEndTime
|
||||
FROM ftb_cultivate_offline_train AS t
|
||||
WHERE t.F_EnabledMark = 0
|
||||
AND t.F_HeadUserId = #{userId}
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateOfflineUserMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.offline.FtbCultivateOfflineUser">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_offline_user-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_LastModifyUserId" jdbcType="VARCHAR" property="fLastmodifyuserid" />
|
||||
<result column="F_LastModifyTime" jdbcType="TIMESTAMP" property="fLastmodifytime" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_UserId" jdbcType="VARCHAR" property="fUserid" />
|
||||
<result column="F_OffilneId" jdbcType="VARCHAR" property="fOffilneid" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_LastModifyUserId, F_LastModifyTime, F_CreatorUserId, F_CreatorTime, F_TenantId,
|
||||
F_EnabledMark, F_DeleteUserId, F_DeleteTime, F_UserId, F_OffilneId
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePackageCourseMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionCertificateMapper">
|
||||
<!--查询岗位学习鉴定-->
|
||||
<select id="queryJobPracticalAppraisalByPostId" resultType="java.lang.String">
|
||||
select F_IdentifyId from ftb_cultivate_position_exam_identify where F_EnabledMark = 0 and F_PostRankId = #{postId}
|
||||
</select>
|
||||
<!--查询岗位学习考试-->
|
||||
<select id="queryJobPracticalExamByPostId" resultType="java.lang.String">
|
||||
select F_ExamId from ftb_cultivate_position_exam where F_EnabledMark = 0 and F_PostRankId = #{postId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionCourceChapterLearningMapper">
|
||||
<!--课程大纲-->
|
||||
<select id="listChapterByCourseId" resultType="jnpf.model.cultivate.vo.course.app.ChapterInformationVO">
|
||||
SELECT a.F_Name as chapterName,b.F_chapterId as chapterId,a.F_SortCode as sortCode,b.F_state as state,b.F_ChapterTime as chapterTime
|
||||
FROM ftb_cultivate_course_chapter a LEFT JOIN ftb_cultivate_position_cource_chapter_learning b ON a.F_Id=b.F_chapterId
|
||||
WHERE b.F_UserId = #{userId} AND b.F_CourceId = #{courseId} AND b.F_EnabledMark = 0 AND a.F_EnabledMark = 0
|
||||
ORDER BY F_SortCode ASC
|
||||
</select>
|
||||
<!--课程列表-->
|
||||
<select id="getCourseInformationList" resultType="jnpf.model.cultivate.vo.position.FtbCultivateCourseListVO">
|
||||
SELECT a.F_CourceId as courseId,b.F_Name as courseName,b.F_Label as label
|
||||
FROM ftb_cultivate_position_cource_learning a JOIN ftb_cultivate_course b ON a.F_CourceId=b.F_Id
|
||||
WHERE a.F_UserId = #{userId} and a.F_EnabledMark=0 AND b.F_EnabledMark=0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,190 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionCourceLearningMapper">
|
||||
<!--岗位学习课程列表-->
|
||||
<select id="globalCurriculumList" resultType="jnpf.model.cultivate.vo.course.app.FtbGlobalCurriculumAppVO">
|
||||
SELECT a.F_CourseId as courseId,b.F_Name as courseName,b.F_Highlights as courseHighlights,c.F_state as learnState
|
||||
FROM ftb_cultivate_position_course a JOIN ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
JOIN ftb_cultivate_position_cource_learning c ON a.F_CourseId=c.F_CourceId
|
||||
WHERE a.F_EnabledMark=0 AND b.F_EnabledMark=0 and b.F_IsGrounding = 1 and a.F_PostRankId = #{gradeId} AND c.F_UserId=#{userId} and c.F_EnabledMark=0
|
||||
<if test="type == 0">
|
||||
AND b.F_Label = 1
|
||||
</if>
|
||||
<if test="type == 1">
|
||||
AND b.F_Label = 2 and FIND_IN_SET(#{postId},b.F_LearnJob) > 0
|
||||
</if>
|
||||
order by c.F_state ASC
|
||||
</select>
|
||||
<!--岗位学习-下属实操鉴定-->
|
||||
<select id="practicalAppraisalList" resultType="java.lang.String">
|
||||
SELECT F_IdentifyRecordId FROM ftb_cultivate_position_identify_result
|
||||
WHERE F_EnabledMark = 0
|
||||
<if test="gradeIds != null and gradeIds.size() != 0">
|
||||
and F_PostRankId in
|
||||
<foreach collection="gradeIds" open="(" close=")" item="gradeId" separator=",">
|
||||
#{gradeId}
|
||||
</foreach>
|
||||
</if>
|
||||
and F_UserId = #{userId}
|
||||
</select>
|
||||
<!--是否为线下培训课程-->
|
||||
<select id="whetherToAddOfflineTrainingCourses" resultType="java.lang.Integer">
|
||||
SELECT count(*)
|
||||
FROM ftb_cultivate_offline_course a JOIN ftb_cultivate_offline_train c ON a.F_OffilneId=c.F_Id
|
||||
where a.F_EnabledMark = 0 and a.F_CourseId = #{courseId} and FIND_IN_SET(#{userId},c.F_Participants) > 0
|
||||
</select>
|
||||
<!--本岗课程内容-->
|
||||
<select id="onTheJobLearningCourse" resultType="jnpf.model.cultivate.vo.course.app.FtbGlobalCurriculumAppVO">
|
||||
SELECT a.F_CourseId as courseId,b.F_Name as courseName,b.F_Highlights as courseHighlights,c.F_state as learnState
|
||||
FROM ftb_cultivate_position_course a JOIN ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
JOIN ftb_cultivate_position_cource_learning c ON a.F_CourseId=c.F_CourceId
|
||||
join ftb_cultivate_position d on d.F_PostId = a.F_PostRankId
|
||||
WHERE a.F_EnabledMark = 0 AND b.F_EnabledMark = 0 and d.F_EnabledMark = 0 and b.F_IsGrounding = 1 and d.F_IsGrounding = 1 and c.F_EnabledMark=0
|
||||
and b.F_Label = 2
|
||||
and a.F_PostRankId = #{params.postId}
|
||||
AND c.F_UserId=#{params.userId}
|
||||
<if test="params.compulsory != null">
|
||||
and a.F_Compulsory = #{params.compulsory}
|
||||
</if>
|
||||
order by c.F_state ASC
|
||||
</select>
|
||||
<!--查看课程培训数据-->
|
||||
<select id="subordinateLearningCourses"
|
||||
resultType="jnpf.model.cultivate.vo.position.app.FtbSubordinateLearningCoursesVO">
|
||||
SELECT a.F_CourceId as courseId,b.F_Name as courseName,b.F_Format as format,a.F_LastModifyTime as completeLearningTime
|
||||
from ftb_cultivate_position_cource_learning a JOIN ftb_cultivate_course b ON a.F_CourceId=b.F_Id
|
||||
WHERE b.F_EnabledMark = 0 and a.F_state = 1 and a.F_UserId = #{params.userId} and a.F_EnabledMark=0
|
||||
</select>
|
||||
<!--下属学习课程-->
|
||||
<select id="subordinateLearningCoursess"
|
||||
resultType="jnpf.model.cultivate.vo.position.app.FtbSubordinateLearningCoursesVO">
|
||||
SELECT a.F_CourceId as courseId,b.F_Name as courseName,b.F_Format as format,a.F_LastModifyTime as completeLearningTime
|
||||
from ftb_cultivate_position_cource_learning a JOIN ftb_cultivate_course b ON a.F_CourceId=b.F_Id
|
||||
join ftb_cultivate_position_course c on c.F_CourseId = b.F_Id join ftb_cultivate_position d on d.F_PostId = c.F_PostRankId
|
||||
WHERE
|
||||
b.F_EnabledMark = 0 and a.F_state = 1 and c.F_EnabledMark = 0 and b.F_Label = 2 and b.F_IsGrounding = 1 and a.F_EnabledMark=0
|
||||
and d.F_IsGrounding = 1 and d.F_EnabledMark = 0
|
||||
and a.F_UserId = #{params.userId} and
|
||||
c.F_PostRankId in (
|
||||
<foreach collection="postIds" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
group by a.F_CourceId
|
||||
</select>
|
||||
|
||||
|
||||
<!--批量查询用户完成的学习课程-->
|
||||
<select id="listCompleteCourseForUserIds"
|
||||
resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourceLearning">
|
||||
SELECT F_id as id,
|
||||
F_UserId as userId,
|
||||
F_CourceId as courceId
|
||||
from ftb_cultivate_position_cource_learning
|
||||
WHERE
|
||||
F_state = 1
|
||||
and F_EnabledMark = 0
|
||||
and F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="queryStudyTime" resultType="java.lang.Long">
|
||||
SELECT sum(F_LearnTime)
|
||||
from ftb_cultivate_position_cource_learning
|
||||
WHERE
|
||||
F_state != 0
|
||||
and F_EnabledMark = 0
|
||||
and F_UserId = #{userId}
|
||||
and F_CourceId in
|
||||
<foreach collection="courseIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="countForCourseIds" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
|
||||
SELECT
|
||||
F_CourceId as selectKey,
|
||||
count( * ) num
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning
|
||||
WHERE
|
||||
F_EnabledMark = 0 and F_CourceId in
|
||||
<foreach collection="courseIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
and F_state != 0
|
||||
GROUP BY
|
||||
F_CourceId
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryUserUnreadMsgV2" resultType="jnpf.model.cultivate.po.course.FtbCultivateCourse">
|
||||
SELECT b.F_Id as id, b.F_Name as name
|
||||
from ftb_cultivate_position_cource_learning a
|
||||
JOIN ftb_cultivate_course b
|
||||
ON a.F_CourceId = b.F_Id
|
||||
WHERE b.F_IsGrounding = 1
|
||||
AND b.F_EnabledMark = 0
|
||||
and a.F_EnabledMark = 0
|
||||
and a.F_state in (0,2)
|
||||
and a.F_UserId = #{userId}
|
||||
<if test="courseId!= null and courseId!= ''">
|
||||
and b.F_Id = #{courseId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--根据课程ID列表和用户ID统计已完成的学习课程数量-->
|
||||
<select id="countCompletedCoursesByUserAndCourseIds" resultType="java.lang.Long">
|
||||
SELECT COUNT(DISTINCT F_CourceId)
|
||||
FROM ftb_cultivate_position_cource_learning
|
||||
WHERE F_EnabledMark = 0
|
||||
AND F_state = 1
|
||||
AND F_UserId = #{userId}
|
||||
AND F_CourceId IN
|
||||
<foreach collection="courseIds" item="courseId" open="(" separator="," close=")">
|
||||
#{courseId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="accessCourseStatistics" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourceLearning">
|
||||
SELECT
|
||||
a.F_UserId AS userId,
|
||||
a.F_CourceId AS courceId,
|
||||
a.F_state AS state,
|
||||
a.F_LearnTime AS learnTime
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a
|
||||
JOIN ftb_cultivate_course b ON a.F_CourceId = b.F_Id
|
||||
WHERE
|
||||
a.F_EnabledMark = 0
|
||||
AND b.F_EnabledMark = 0
|
||||
<if test="userIds != null and userIds.size() > 0">
|
||||
and a.F_UserId IN
|
||||
<foreach collection="userIds" open="(" close=")" separator="," item="x">
|
||||
#{x}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--查询用户已完成的课程列表(关联查询课程信息)-->
|
||||
<select id="queryCompletedCoursesWithInfo" resultType="jnpf.model.cultivate.v2.course.vo.UserLearningStatusVo$CourseInfo">
|
||||
SELECT
|
||||
a.F_CourceId AS courseId,
|
||||
b.F_Name AS courseName,
|
||||
a.F_state AS state,
|
||||
a.F_LearnTime AS learnTime
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a
|
||||
INNER JOIN ftb_cultivate_course b ON a.F_CourceId = b.F_Id
|
||||
WHERE
|
||||
a.F_EnabledMark = 0
|
||||
AND b.F_EnabledMark = 0
|
||||
and b.F_IsGrounding = 1
|
||||
AND a.F_state = 1
|
||||
AND a.F_UserId = #{userId}
|
||||
ORDER BY a.F_LastModifyTime DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionCourseCertificateMapper">
|
||||
|
||||
<!--根据岗位学习 ID 列表统计证书数量-->
|
||||
<select id="countByPositionLearnIds" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT F_PostLearnId as selectKey, COUNT(*) as num
|
||||
FROM ftb_cultivate_position_course_certificate
|
||||
WHERE F_PostLearnId IN
|
||||
<foreach collection="positionLearnIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND F_EnabledMark = 0
|
||||
GROUP BY F_PostLearnId
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 查询证书列表(关联证书表,过滤上架且未删除)-->
|
||||
<select id="listByPostLearnId" resultType="jnpf.model.cultivate.po.FtbCultivatePositionCourseCertificate">
|
||||
SELECT pcc.F_Id as id,
|
||||
pcc.F_PostLearnId as postLearnId,
|
||||
pcc.F_GradeId as gradeId,
|
||||
pcc.F_CourseId as courseId,
|
||||
pcc.F_CertificateId as certificateId,
|
||||
pcc.F_PostRankId as postRankId,
|
||||
pcc.F_EnabledMark as enabledMark
|
||||
FROM ftb_cultivate_position_course_certificate pcc
|
||||
INNER JOIN ftb_cultivate_certificate cc ON pcc.F_CertificateId = cc.F_Id
|
||||
WHERE pcc.F_PostLearnId = #{postLearnId}
|
||||
AND pcc.F_EnabledMark = 0
|
||||
AND cc.F_Status = 1
|
||||
AND cc.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 和课程 IDs 查询证书列表(关联证书表,过滤上架且未删除)-->
|
||||
<select id="listByPostLearnIdAndCourseIds" resultType="jnpf.model.cultivate.po.FtbCultivatePositionCourseCertificate">
|
||||
SELECT pcc.F_Id as id,
|
||||
pcc.F_PostLearnId as postLearnId,
|
||||
pcc.F_GradeId as gradeId,
|
||||
pcc.F_CourseId as courseId,
|
||||
pcc.F_CertificateId as certificateId,
|
||||
pcc.F_PostRankId as postRankId,
|
||||
pcc.F_EnabledMark as enabledMark
|
||||
FROM ftb_cultivate_position_course_certificate pcc
|
||||
INNER JOIN ftb_cultivate_certificate cc ON pcc.F_CertificateId = cc.F_Id
|
||||
WHERE pcc.F_PostLearnId = #{postLearnId}
|
||||
AND pcc.F_CourseId IN
|
||||
<foreach collection="courseIds" item="courseId" separator="," open="(" close=")">
|
||||
#{courseId}
|
||||
</foreach>
|
||||
AND pcc.F_EnabledMark = 0
|
||||
AND cc.F_Status = 1
|
||||
AND cc.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习ID查询证书列表(包含证书名称)-->
|
||||
<select id="listByPostLearnIdWithName" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCourseCertificateWithNameVo">
|
||||
SELECT pcc.F_Id as id,
|
||||
pcc.F_PostLearnId as postLearnId,
|
||||
pcc.F_GradeId as gradeId,
|
||||
pcc.F_CourseId as courseId,
|
||||
pcc.F_CertificateId as certificateId,
|
||||
pcc.F_PostRankId as postRankId,
|
||||
pcc.F_EnabledMark as enabledMark,
|
||||
cc.F_Name as certificateName
|
||||
FROM ftb_cultivate_position_course_certificate pcc
|
||||
INNER JOIN ftb_cultivate_certificate cc ON pcc.F_CertificateId = cc.F_Id
|
||||
WHERE pcc.F_PostLearnId = #{postLearnId}
|
||||
AND pcc.F_EnabledMark = 0
|
||||
AND cc.F_Status = 1
|
||||
AND cc.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 和课程 IDs 查询证书列表(包含证书名称)-->
|
||||
<select id="listByPostLearnIdAndCourseIdsWithName" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCourseCertificateWithNameVo">
|
||||
SELECT pcc.F_Id as id,
|
||||
pcc.F_PostLearnId as postLearnId,
|
||||
pcc.F_GradeId as gradeId,
|
||||
pcc.F_CourseId as courseId,
|
||||
pcc.F_CertificateId as certificateId,
|
||||
pcc.F_PostRankId as postRankId,
|
||||
pcc.F_EnabledMark as enabledMark,
|
||||
cc.F_Name as certificateName
|
||||
FROM ftb_cultivate_position_course_certificate pcc
|
||||
INNER JOIN ftb_cultivate_certificate cc ON pcc.F_CertificateId = cc.F_Id
|
||||
WHERE pcc.F_PostLearnId = #{postLearnId}
|
||||
AND pcc.F_CourseId IN
|
||||
<foreach collection="courseIds" item="courseId" separator="," open="(" close=")">
|
||||
#{courseId}
|
||||
</foreach>
|
||||
AND pcc.F_EnabledMark = 0
|
||||
AND cc.F_Status = 1
|
||||
AND cc.F_EnabledMark = 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionCourseExamMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.position.FtbCultivatePositionCourseExam">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_position_course_exam-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_LastModifyUserId" jdbcType="VARCHAR" property="fLastmodifyuserid" />
|
||||
<result column="F_LastModifyTime" jdbcType="TIMESTAMP" property="fLastmodifytime" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
<result column="F_CourseId" jdbcType="VARCHAR" property="fCourseid" />
|
||||
<result column="F_PostRankId" jdbcType="VARCHAR" property="fPostrankid" />
|
||||
<result column="F_PostLearnId" jdbcType="VARCHAR" property="fPostlearnid" />
|
||||
<result column="F_examId" jdbcType="VARCHAR" property="fExamid" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_EnabledMark, F_CreatorUserId, F_CreatorTime, F_LastModifyUserId, F_LastModifyTime,
|
||||
F_DeleteUserId, F_DeleteTime, F_TenantId, F_CourseId, F_PostRankId, F_PostLearnId,
|
||||
F_examId
|
||||
</sql>
|
||||
|
||||
<!--根据岗位学习 ID 列表统计考试数量-->
|
||||
<select id="countByPositionLearnIds" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT F_PostLearnId as selectKey, COUNT(*) as num
|
||||
FROM ftb_cultivate_position_course_exam
|
||||
WHERE F_PostLearnId IN
|
||||
<foreach collection="positionLearnIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND F_EnabledMark = 0
|
||||
GROUP BY F_PostLearnId
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 查询考试(关联考试表,要求考试未删除且有效)-->
|
||||
<select id="listByPostLearnIdWithExam" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourseExam">
|
||||
SELECT pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_examId as examId,
|
||||
pc.F_EnabledMark as enabledMark
|
||||
FROM ftb_cultivate_position_course_exam pc
|
||||
INNER JOIN ftb_cultivate_exam e ON pc.F_examId = e.F_Id
|
||||
WHERE pc.F_PostLearnId = #{postLearnId}
|
||||
AND pc.F_EnabledMark = 0
|
||||
AND e.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 和课程 ID 列表查询考试(关联考试表,要求考试未删除且有效)-->
|
||||
<select id="listByPostLearnIdAndCourseIdsWithExam" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourseExam">
|
||||
SELECT pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_examId as examId,
|
||||
pc.F_EnabledMark as enabledMark
|
||||
FROM ftb_cultivate_position_course_exam pc
|
||||
INNER JOIN ftb_cultivate_exam e ON pc.F_examId = e.F_Id
|
||||
WHERE pc.F_PostLearnId = #{postLearnId}
|
||||
AND pc.F_CourseId IN
|
||||
<foreach collection="courseIds" item="courseId" separator="," open="(" close=")">
|
||||
#{courseId}
|
||||
</foreach>
|
||||
<if test="gradeId != null and gradeId!=''">
|
||||
and pc.F_GradeId = #{gradeId}
|
||||
</if>
|
||||
|
||||
AND pc.F_EnabledMark = 0
|
||||
AND e.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<!--查询所有岗位学习考试(关联考试表,要求考试未删除且有效)-->
|
||||
<select id="queryAllPositionLearnExamListsWithExam" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourseExam">
|
||||
SELECT pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_examId as examId,
|
||||
pc.F_EnabledMark as enabledMark
|
||||
FROM ftb_cultivate_position_course_exam pc
|
||||
INNER JOIN ftb_cultivate_exam e ON pc.F_examId = e.F_Id
|
||||
WHERE pc.F_EnabledMark = 0
|
||||
AND e.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<select id="queryPositionBindItem" resultType="java.lang.String">
|
||||
SELECT
|
||||
pc.F_examId as examId
|
||||
FROM ftb_cultivate_position_course_exam pc
|
||||
INNER JOIN ftb_cultivate_exam e ON pc.F_examId = e.F_Id
|
||||
WHERE pc.F_EnabledMark = 0
|
||||
AND e.F_EnabledMark = 1
|
||||
|
||||
and pc.F_PostLearnId = #{position.id}
|
||||
<if test="position.isConfiguredToGrade ==1">
|
||||
and pc.F_GradeId = #{gradeId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryAllConfigExamId" resultType="jnpf.model.cultivate.v2.position.vo.V2AllCultivatePositionCourseExam">
|
||||
SELECT
|
||||
distinct pc.F_examId as examId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_GradeId as gradeId
|
||||
FROM ftb_cultivate_position_course_exam pc
|
||||
INNER JOIN ftb_cultivate_exam e ON pc.F_examId = e.F_Id
|
||||
inner join ftb_cultivate_course c on pc.F_CourseId = c.F_Id
|
||||
WHERE pc.F_EnabledMark = 0
|
||||
AND e.F_EnabledMark = 1
|
||||
and c.F_EnabledMark = 0 and c.F_IsGrounding = 1
|
||||
AND pc.F_PostLearnId IN
|
||||
<foreach collection="postLearnIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
<if test="gradeId != null and gradeId!=''">
|
||||
and pc.F_GradeId = #{gradeId}
|
||||
</if>
|
||||
<if test="courseId != null">
|
||||
and pc.F_CourseId = #{courseId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习ID查询所有有效考试(包含考试名称)-->
|
||||
<select id="listByPostLearnIdWithName" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCourseExamWithNameVo">
|
||||
SELECT pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_examId as examId,
|
||||
e.F_ExamName as examName,
|
||||
pc.F_EnabledMark as enabledMark
|
||||
FROM ftb_cultivate_position_course_exam pc
|
||||
INNER JOIN ftb_cultivate_exam e ON pc.F_examId = e.F_Id
|
||||
WHERE pc.F_PostLearnId = #{postLearnId}
|
||||
AND pc.F_EnabledMark = 0
|
||||
AND e.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 和课程 ID 列表查询考试(包含考试名称)-->
|
||||
<select id="listByPostLearnIdAndCourseIdsWithName" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCourseExamWithNameVo">
|
||||
SELECT pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_examId as examId,
|
||||
e.F_ExamName as examName,
|
||||
pc.F_EnabledMark as enabledMark
|
||||
FROM ftb_cultivate_position_course_exam pc
|
||||
INNER JOIN ftb_cultivate_exam e ON pc.F_examId = e.F_Id
|
||||
WHERE pc.F_PostLearnId = #{postLearnId}
|
||||
AND pc.F_CourseId IN
|
||||
<foreach collection="courseIds" item="courseId" separator="," open="(" close=")">
|
||||
#{courseId}
|
||||
</foreach>
|
||||
AND pc.F_EnabledMark = 0
|
||||
AND e.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<!--检查考试是否被岗位学习绑定(关联岗位学习主表和课程表)-->
|
||||
<select id="checkExamBinding" resultType="java.lang.Integer">
|
||||
SELECT COUNT(1)
|
||||
FROM ftb_cultivate_position_course_exam pce
|
||||
INNER JOIN ftb_cultivate_position_course pc ON pce.F_CourseId = pc.F_CourseId
|
||||
AND pce.F_PostLearnId = pc.F_PostLearnId
|
||||
INNER JOIN ftb_cultivate_position p ON pc.F_PostLearnId = p.F_Id
|
||||
WHERE pce.F_examId = #{examId}
|
||||
AND pce.F_EnabledMark = 0
|
||||
AND pc.F_EnabledMark = 0
|
||||
AND p.F_EnabledMark = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionCourseIdentityMapper">
|
||||
|
||||
<!--根据岗位学习 ID 列表统计鉴定数量-->
|
||||
<select id="countByPositionLearnIds" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT F_PostLearnId as selectKey, COUNT(*) as num
|
||||
FROM ftb_cultivate_position_course_identity
|
||||
WHERE F_PostLearnId IN
|
||||
<foreach collection="positionLearnIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND F_EnabledMark = 0
|
||||
GROUP BY F_PostLearnId
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 查询鉴定列表(关联鉴定表)-->
|
||||
<select id="listByPostLearnId" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourseIdentity">
|
||||
SELECT pci.F_Id as id,
|
||||
pci.F_EnabledMark as enabledMark,
|
||||
pci.F_PostLearnId as postLearnId,
|
||||
pci.F_CourseId as courseId,
|
||||
pci.F_PostRankId as postRankId,
|
||||
pci.F_GradeId as gradeId,
|
||||
pci.F_identityId as identityId
|
||||
FROM ftb_cultivate_position_course_identity pci
|
||||
INNER JOIN ftb_cultivate_identify_table fcit ON pci.F_identityId = fcit.F_Id
|
||||
WHERE pci.F_PostLearnId = #{postLearnId}
|
||||
AND pci.F_EnabledMark = 0
|
||||
AND fcit.F_DeleteMark = 0
|
||||
and fcit.F_IsAbnormal = 0
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 和课程 ID 列表查询鉴定列表(关联鉴定表)-->
|
||||
<select id="listByPostLearnIdAndCourseIds" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourseIdentity">
|
||||
SELECT pci.F_Id as id,
|
||||
pci.F_EnabledMark as enabledMark,
|
||||
pci.F_PostLearnId as postLearnId,
|
||||
pci.F_CourseId as courseId,
|
||||
pci.F_PostRankId as postRankId,
|
||||
pci.F_GradeId as gradeId,
|
||||
pci.F_identityId as identityId
|
||||
FROM ftb_cultivate_position_course_identity pci
|
||||
INNER JOIN ftb_cultivate_identify_table fcit ON pci.F_identityId = fcit.F_Id
|
||||
WHERE pci.F_PostLearnId = #{postLearnId}
|
||||
AND pci.F_CourseId IN
|
||||
<foreach collection="courseIds" item="courseId" separator="," open="(" close=")">
|
||||
#{courseId}
|
||||
</foreach>
|
||||
<if test="gradeId !=null and gradeId !=''">
|
||||
and pci.F_GradeId = #{gradeId}
|
||||
</if>
|
||||
AND pci.F_EnabledMark = 0
|
||||
AND fcit.F_DeleteMark = 0
|
||||
and fcit.F_IsAbnormal = 0
|
||||
</select>
|
||||
|
||||
<!--查询所有岗位学习鉴定列表(关联鉴定表)-->
|
||||
<select id="queryAllPositionLearnIdentityLists" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourseIdentity">
|
||||
SELECT pci.F_Id as id,
|
||||
pci.F_EnabledMark as enabledMark,
|
||||
pci.F_PostLearnId as postLearnId,
|
||||
pci.F_CourseId as courseId,
|
||||
pci.F_PostRankId as postRankId,
|
||||
pci.F_GradeId as gradeId,
|
||||
pci.F_identityId as identityId
|
||||
FROM ftb_cultivate_position_course_identity pci
|
||||
INNER JOIN ftb_cultivate_identify_table fcit ON pci.F_identityId = fcit.F_Id
|
||||
WHERE pci.F_EnabledMark = 0
|
||||
AND fcit.F_DeleteMark = 0
|
||||
and fcit.F_IsAbnormal = 0
|
||||
</select>
|
||||
|
||||
<select id="queryPositionBindItem" resultType="java.lang.String">
|
||||
SELECT
|
||||
pci.F_identityId as identityId
|
||||
FROM ftb_cultivate_position_course_identity pci
|
||||
INNER JOIN ftb_cultivate_identify_table fcit ON pci.F_identityId = fcit.F_Id
|
||||
WHERE pci.F_EnabledMark = 0
|
||||
AND fcit.F_DeleteMark = 0
|
||||
and fcit.F_IsAbnormal = 0
|
||||
and pci.F_PostLearnId = #{position.id}
|
||||
<if test="position.isConfiguredToGrade ==1">
|
||||
and pci.F_GradeId = #{gradeId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习ID查询鉴定列表(包含鉴定名称)-->
|
||||
<select id="listByPostLearnIdWithName" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCourseIdentityWithNameVo">
|
||||
SELECT pci.F_Id as id,
|
||||
pci.F_EnabledMark as enabledMark,
|
||||
pci.F_PostLearnId as postLearnId,
|
||||
pci.F_CourseId as courseId,
|
||||
pci.F_PostRankId as postRankId,
|
||||
pci.F_GradeId as gradeId,
|
||||
pci.F_identityId as identityId,
|
||||
fcit.F_Name as identityName
|
||||
FROM ftb_cultivate_position_course_identity pci
|
||||
INNER JOIN ftb_cultivate_identify_table fcit ON pci.F_identityId = fcit.F_Id
|
||||
WHERE pci.F_PostLearnId = #{postLearnId}
|
||||
AND pci.F_EnabledMark = 0
|
||||
AND fcit.F_DeleteMark = 0
|
||||
and fcit.F_IsAbnormal = 0
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 和课程 ID 列表查询鉴定列表(包含鉴定名称)-->
|
||||
<select id="listByPostLearnIdAndCourseIdsWithName" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCourseIdentityWithNameVo">
|
||||
SELECT pci.F_Id as id,
|
||||
pci.F_EnabledMark as enabledMark,
|
||||
pci.F_PostLearnId as postLearnId,
|
||||
pci.F_CourseId as courseId,
|
||||
pci.F_PostRankId as postRankId,
|
||||
pci.F_GradeId as gradeId,
|
||||
pci.F_identityId as identityId,
|
||||
fcit.F_Name as identityName
|
||||
FROM ftb_cultivate_position_course_identity pci
|
||||
INNER JOIN ftb_cultivate_identify_table fcit ON pci.F_identityId = fcit.F_Id
|
||||
WHERE pci.F_PostLearnId = #{postLearnId}
|
||||
AND pci.F_CourseId IN
|
||||
<foreach collection="courseIds" item="courseId" separator="," open="(" close=")">
|
||||
#{courseId}
|
||||
</foreach>
|
||||
AND pci.F_EnabledMark = 0
|
||||
AND fcit.F_DeleteMark = 0
|
||||
and fcit.F_IsAbnormal = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,320 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionCourseMapper">
|
||||
<!--学习课程数-->
|
||||
<select id="numberOfStudyCourses" resultType="java.lang.Long">
|
||||
SELECT COUNT(DISTINCT a.F_CourseId) FROM ftb_cultivate_position_course a join ftb_cultivate_course b on a.F_CourseId=b.F_Id
|
||||
WHERE a.F_PostLearnId=#{postLearnId} and a.F_EnabledMark = 0 and b.F_EnabledMark = 0 and b.F_IsGrounding=1 and b.F_Label = 2
|
||||
</select>
|
||||
|
||||
<!--该岗位是否绑定课程-->
|
||||
<select id="learnMapRelearn" resultType="java.lang.String">
|
||||
SELECT b.F_CourseId FROM ftb_cultivate_position a JOIN ftb_cultivate_position_course b ON a.F_Id = b.F_PostLearnId
|
||||
WHERE a.F_EnabledMark = 0 and b.F_EnabledMark = 0 and a.F_IsGrounding = 1 and b.F_PostRankId = #{positionId}
|
||||
</select>
|
||||
<!--课程是否存在-->
|
||||
<select id="getAnExistingCourse" resultType="java.lang.String">
|
||||
SELECT F_CourceId FROM ftb_cultivate_position_cource_learning
|
||||
WHERE F_UserId = #{userId} and F_EnabledMark = 0 AND F_CourceId in
|
||||
<foreach collection="courseIds" item="courseId" separator="," open="(" close=")">
|
||||
#{courseId}
|
||||
</foreach>
|
||||
</select>
|
||||
<!--课程是否初始化-->
|
||||
<select id="getAnExistingCoursePostId" resultType="java.lang.String">
|
||||
SELECT a.F_CourseId
|
||||
FROM ftb_cultivate_position_course a JOIN ftb_cultivate_course b on a.F_CourseId=b.F_Id
|
||||
WHERE a.F_PostRankId=#{postId} and a.F_EnabledMark = 0 and b.F_EnabledMark = 0 and b.F_IsGrounding=1
|
||||
</select>
|
||||
<!--判断是否为最后一个岗位学习课程-->
|
||||
<select id="determineTheLastPostStudyCourse" resultType="java.lang.Integer">
|
||||
SELECT COUNT(0) FROM ftb_cultivate_position_course a JOIN ftb_cultivate_course b on a.F_CourseId=b.F_Id
|
||||
WHERE a.F_PostLearnId=#{postLearnId} and a.F_EnabledMark = 0 and b.F_EnabledMark = 0 and b.F_IsGrounding=1
|
||||
</select>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
F_Id, F_EnabledMark, F_CreatorUserId, F_CreatorTime, F_LastModifyUserId, F_LastModifyTime,
|
||||
F_DeleteUserId, F_DeleteTime, F_TenantId, F_CourseId, F_PostRankId, F_PostLearnId,
|
||||
F_Compulsory, F_GradeId, F_SortCode, F_Sorts
|
||||
</sql>
|
||||
|
||||
<!--根据岗位学习ID列表统计课程数量-->
|
||||
<select id="countByPositionLearnIds" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT F_PostLearnId as selectKey, COUNT(*) as num
|
||||
FROM ftb_cultivate_position_course
|
||||
WHERE F_PostLearnId IN
|
||||
<foreach collection="positionLearnIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND F_EnabledMark = 0
|
||||
GROUP BY F_PostLearnId
|
||||
</select>
|
||||
|
||||
<select id="queryAllPositionLearn" resultType="jnpf.model.cultivate.v2.position.vo.CultivatePositionSimpleVo">
|
||||
SELECT
|
||||
distinct p1.F_PostId as postId,
|
||||
pc.F_GradeId AS gradeId
|
||||
FROM
|
||||
ftb_cultivate_position AS p1
|
||||
JOIN ftb_cultivate_position_course AS pc ON pc.F_PostLearnId = p1.F_Id
|
||||
JOIN ftb_cultivate_course AS course ON pc.F_CourseId = course.F_Id
|
||||
WHERE
|
||||
p1.F_EnabledMark = 0
|
||||
AND p1.F_IsGrounding = 1
|
||||
AND pc.F_EnabledMark = 0
|
||||
AND course.F_EnabledMark = 0
|
||||
AND course.F_IsGrounding = 1
|
||||
<if test="courseName != null ">
|
||||
AND course.F_Name LIKE CONCAT('%', #{courseName}, '%')
|
||||
</if>
|
||||
order by p1.F_CreatorTime desc
|
||||
</select>
|
||||
|
||||
<select id="queryAllPositionLearnCourseLists" resultType="jnpf.model.cultivate.v2.course.vo.app.AppCourseSimpleVo">
|
||||
SELECT
|
||||
p1.F_Id as businessSourceId,
|
||||
p1.F_PostId as postId,
|
||||
pc.F_GradeId AS gradeId,
|
||||
pc.F_CourseId as courseId,
|
||||
course.F_Name as courseName,
|
||||
course.F_CoverUrl as coverUrl,
|
||||
course.F_CoverId as coverId,
|
||||
course.F_Label as label,
|
||||
course.F_TypeId as typeId,
|
||||
pc.F_Compulsory as isRequired
|
||||
|
||||
FROM
|
||||
ftb_cultivate_position AS p1
|
||||
JOIN ftb_cultivate_position_course AS pc ON pc.F_PostLearnId = p1.F_Id
|
||||
JOIN ftb_cultivate_course AS course ON pc.F_CourseId = course.F_Id
|
||||
WHERE
|
||||
p1.F_EnabledMark = 0
|
||||
AND p1.F_IsGrounding = 1
|
||||
AND pc.F_EnabledMark = 0
|
||||
AND course.F_EnabledMark = 0
|
||||
AND course.F_IsGrounding = 1
|
||||
|
||||
<if test="params.keyWord != null and params.keyWord != ''">
|
||||
AND course.F_Name LIKE CONCAT('%', #{params.keyWord}, '%')
|
||||
</if>
|
||||
<if test="params.postId != null and params.postId != ''">
|
||||
AND p1.F_PostId = #{params.postId}
|
||||
</if>
|
||||
|
||||
<if test="params.gradeId != null">
|
||||
AND pc.F_GradeId = #{params.gradeId}
|
||||
</if>
|
||||
order by p1.F_CreatorTime desc
|
||||
</select>
|
||||
|
||||
<select id="listByPostLearnIdAndExamId" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourse">
|
||||
select pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_Compulsory as compulsory,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_SortCode as sortCode
|
||||
from ftb_cultivate_position_course as pc
|
||||
left join ftb_cultivate_position_course_exam as ce on pc.F_CourseId = ce.F_CourseId
|
||||
where pc.F_PostLearnId = #{positionLearnId}
|
||||
and ce.F_PostLearnId = #{positionLearnId}
|
||||
and pc.F_GradeId = #{gradeId}
|
||||
and ce.F_GradeId = #{gradeId}
|
||||
and pc.F_EnabledMark = 0
|
||||
and ce.F_EnabledMark = 0
|
||||
and ce.F_ExamId = #{examId}
|
||||
</select>
|
||||
|
||||
<select id="listByPostLearnIdAndPracticeId"
|
||||
resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourse">
|
||||
select pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_Compulsory as compulsory,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_SortCode as sortCode
|
||||
from ftb_cultivate_position_course as pc
|
||||
left join ftb_cultivate_position_course_practice as ce on pc.F_CourseId = ce.F_CourseId
|
||||
where pc.F_PostLearnId = #{positionLearnId}
|
||||
and ce.F_PostLearnId = #{positionLearnId}
|
||||
and pc.F_GradeId = #{gradeId}
|
||||
and ce.F_GradeId = #{gradeId}
|
||||
and pc.F_EnabledMark = 0
|
||||
and ce.F_EnabledMark = 0
|
||||
and ce.F_BusinessId = #{practiceId}
|
||||
</select>
|
||||
|
||||
<select id="listByPostLearnIdAndIdentityId"
|
||||
resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourse">
|
||||
select pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_Compulsory as compulsory,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_SortCode as sortCode
|
||||
from ftb_cultivate_position_course as pc
|
||||
left join ftb_cultivate_position_course_identity as ce on pc.F_CourseId = ce.F_CourseId
|
||||
where pc.F_PostLearnId = #{positionLearnId}
|
||||
and ce.F_PostLearnId = #{positionLearnId}
|
||||
and pc.F_GradeId = #{gradeId}
|
||||
and ce.F_GradeId = #{gradeId}
|
||||
and pc.F_EnabledMark = 0
|
||||
and ce.F_EnabledMark = 0
|
||||
and ce.F_identityId = #{practiceId}
|
||||
</select>
|
||||
|
||||
<select id="queryAllPositionCourseAndLearnIdAndGradeId"
|
||||
resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCourse">
|
||||
select pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_Compulsory as compulsory,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_SortCode as sortCode
|
||||
from ftb_cultivate_position_course as pc
|
||||
|
||||
where pc.F_PostLearnId = #{positionLearnId}
|
||||
and pc.F_GradeId = #{gradeId}
|
||||
and pc.F_EnabledMark = 0
|
||||
</select>
|
||||
|
||||
<select id="listPositionCourseList" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCourseWithNameVo">
|
||||
select pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
course.F_Name as courseName,
|
||||
course.F_CourseId as showCourseId,
|
||||
course.F_TypeId as typeId,
|
||||
course.F_Label as label,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_Compulsory as compulsory,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_SortCode as sortCode
|
||||
from ftb_cultivate_position_course as pc
|
||||
join ftb_cultivate_course as course on pc.F_CourseId = course.F_Id
|
||||
|
||||
where pc.F_EnabledMark = 0
|
||||
and course.F_EnabledMark = 0
|
||||
and course.F_IsGrounding = 1
|
||||
and pc.F_PostLearnId = #{position.id}
|
||||
<if test="position.isConfiguredToGrade ==1">
|
||||
and pc.F_GradeId = #{req.gradeId}
|
||||
</if>
|
||||
|
||||
order by pc.F_SortCode asc
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 查询所有有效课程(关联课程表,过滤上架且未删除)-->
|
||||
<select id="listByPostLearnId" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCourseWithNameVo">
|
||||
select pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_Compulsory as compulsory,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_SortCode as sortCode,
|
||||
course.F_Name as courseName,
|
||||
course.F_CourseId as showCourseId,
|
||||
course.F_Name as courseName,
|
||||
course.F_CourseId as showCourseId,
|
||||
course.F_IsGrounding as isGrounding,
|
||||
course.F_CoverUrl as coverUrl
|
||||
from ftb_cultivate_position_course as pc
|
||||
join ftb_cultivate_course as course on pc.F_CourseId = course.F_Id
|
||||
where pc.F_PostLearnId = #{postLearnId}
|
||||
and pc.F_EnabledMark = 0
|
||||
and course.F_EnabledMark = 0
|
||||
and course.F_IsGrounding = 1
|
||||
<if test="courseId != null and courseId != ''">
|
||||
and pc.F_CourseId = #{courseId}
|
||||
</if>
|
||||
order by pc.F_SortCode asc
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 和职级 ID 查询所有有效课程(关联课程表,过滤上架且未删除)-->
|
||||
<select id="listByPostLearnIdAndGradeId" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCourseWithNameVo">
|
||||
select pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_Compulsory as compulsory,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_SortCode as sortCode,
|
||||
course.F_Name as courseName,
|
||||
course.F_CourseId as showCourseId,
|
||||
course.F_IsGrounding as isGrounding,
|
||||
course.F_CoverUrl as coverUrl
|
||||
from ftb_cultivate_position_course as pc
|
||||
join ftb_cultivate_course as course on pc.F_CourseId = course.F_Id
|
||||
where pc.F_PostLearnId = #{postLearnId}
|
||||
and pc.F_GradeId = #{gradeId}
|
||||
and pc.F_EnabledMark = 0
|
||||
and course.F_EnabledMark = 0
|
||||
and course.F_IsGrounding = 1
|
||||
<if test="courseId != null and courseId != ''">
|
||||
and pc.F_CourseId = #{courseId}
|
||||
</if>
|
||||
order by pc.F_SortCode asc
|
||||
</select>
|
||||
|
||||
<select id="queryPositionBindItem" resultType="java.lang.String">
|
||||
SELECT
|
||||
pc.F_CourseId as courseId
|
||||
FROM
|
||||
ftb_cultivate_position_course AS pc
|
||||
JOIN ftb_cultivate_course AS course ON pc.F_CourseId = course.F_Id
|
||||
WHERE
|
||||
pc.F_EnabledMark = 0
|
||||
AND course.F_EnabledMark = 0
|
||||
AND course.F_IsGrounding = 1
|
||||
|
||||
and pc.F_PostLearnId = #{position.id}
|
||||
<if test="position.isConfiguredToGrade ==1">
|
||||
and pc.F_GradeId = #{gradeId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习ID查询所有有效课程(包含课程名称)-->
|
||||
<select id="listByPostLearnIdWithName" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCourseWithNameVo">
|
||||
select pc.F_Id as id,
|
||||
pc.F_CourseId as courseId,
|
||||
course.F_Name as courseName,
|
||||
course.F_CourseId as showCourseId,
|
||||
course.F_TypeId as typeId,
|
||||
course.F_Label as label,
|
||||
pc.F_PostRankId as postRankId,
|
||||
pc.F_PostLearnId as postLearnId,
|
||||
pc.F_Compulsory as compulsory,
|
||||
pc.F_GradeId as gradeId,
|
||||
pc.F_SortCode as sortCode
|
||||
from ftb_cultivate_position_course as pc
|
||||
join ftb_cultivate_course as course on pc.F_CourseId = course.F_Id
|
||||
where pc.F_PostLearnId = #{postLearnId}
|
||||
and pc.F_EnabledMark = 0
|
||||
and course.F_EnabledMark = 0
|
||||
and course.F_IsGrounding = 1
|
||||
<if test="courseId != null and courseId != ''">
|
||||
and pc.F_CourseId = #{courseId}
|
||||
</if>
|
||||
order by pc.F_SortCode asc
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习配置查询所有课程ID列表(关联课程表过滤)-->
|
||||
<select id="queryCourseIdsByPositionAndGrade" resultType="java.lang.String">
|
||||
SELECT DISTINCT pc.F_CourseId
|
||||
FROM ftb_cultivate_position_course AS pc
|
||||
JOIN ftb_cultivate_course AS course ON pc.F_CourseId = course.F_Id
|
||||
WHERE pc.F_PostLearnId = #{postLearnId}
|
||||
AND pc.F_EnabledMark = 0
|
||||
AND course.F_EnabledMark = 0
|
||||
AND course.F_IsGrounding = 1
|
||||
AND course.F_Label = 2
|
||||
<if test="isConfiguredToGrade == 1">
|
||||
AND pc.F_GradeId = #{gradeId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionCoursePracticeMapper">
|
||||
|
||||
<!--根据岗位学习 ID 列表统计练习数量-->
|
||||
<select id="countByPositionLearnIds" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT F_PostLearnId as selectKey, COUNT(*) as num
|
||||
FROM ftb_cultivate_position_course_practice
|
||||
WHERE F_PostLearnId IN
|
||||
<foreach collection="positionLearnIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND F_EnabledMark = 0
|
||||
GROUP BY F_PostLearnId
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 查询练习列表(关联技能表)-->
|
||||
<select id="listByPostLearnId" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCoursePractice">
|
||||
SELECT p.F_Id AS id,
|
||||
p.F_EnabledMark AS enabledMark,
|
||||
p.F_Num AS num,
|
||||
p.F_CourseId AS courseId,
|
||||
p.F_GradeId AS gradeId,
|
||||
p.F_PostRankId AS postRankId,
|
||||
p.F_PostLearnId AS postLearnId,
|
||||
p.F_BusinessId AS businessId
|
||||
FROM ftb_cultivate_position_course_practice p
|
||||
INNER JOIN ftb_cultivate_teaching_skill s ON p.F_BusinessId = s.F_Id
|
||||
WHERE p.F_PostLearnId = #{postLearnId}
|
||||
AND p.F_EnabledMark = 0
|
||||
AND s.F_DeleteMark = 0
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 和课程 ID 列表查询练习列表(关联技能表)-->
|
||||
<select id="listByPostLearnIdAndCourseIds" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCoursePractice">
|
||||
SELECT p.F_Id AS id,
|
||||
p.F_EnabledMark AS enabledMark,
|
||||
p.F_Num AS num,
|
||||
p.F_CourseId AS courseId,
|
||||
p.F_GradeId AS gradeId,
|
||||
p.F_PostRankId AS postRankId,
|
||||
p.F_PostLearnId AS postLearnId,
|
||||
p.F_BusinessId AS businessId
|
||||
FROM ftb_cultivate_position_course_practice p
|
||||
INNER JOIN ftb_cultivate_teaching_skill s ON p.F_BusinessId = s.F_Id
|
||||
WHERE p.F_PostLearnId = #{postLearnId}
|
||||
AND p.F_CourseId IN
|
||||
<foreach collection="courseIds" item="courseId" separator="," open="(" close=")">
|
||||
#{courseId}
|
||||
</foreach>
|
||||
AND p.F_EnabledMark = 0
|
||||
AND s.F_DeleteMark = 0
|
||||
</select>
|
||||
|
||||
<!--查询所有岗位学习课程练习列表(关联技能表)-->
|
||||
<select id="queryAllPositionLearnParacticeLists" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCoursePractice">
|
||||
SELECT p.F_Id AS id,
|
||||
p.F_EnabledMark AS enabledMark,
|
||||
p.F_Num AS num,
|
||||
p.F_CourseId AS courseId,
|
||||
p.F_GradeId AS gradeId,
|
||||
p.F_PostRankId AS postRankId,
|
||||
p.F_PostLearnId AS postLearnId,
|
||||
p.F_BusinessId AS businessId
|
||||
FROM ftb_cultivate_position_course_practice p
|
||||
INNER JOIN ftb_cultivate_teaching_skill s ON p.F_BusinessId = s.F_Id
|
||||
WHERE p.F_EnabledMark = 0
|
||||
AND s.F_DeleteMark = 0
|
||||
</select>
|
||||
|
||||
<select id="queryPositionBindItem" resultType="jnpf.model.cultivate.po.position.FtbCultivatePositionCoursePractice">
|
||||
|
||||
SELECT
|
||||
p.F_BusinessId AS businessId,
|
||||
p.F_Num AS num
|
||||
FROM ftb_cultivate_position_course_practice p
|
||||
INNER JOIN ftb_cultivate_teaching_skill s ON p.F_BusinessId = s.F_Id
|
||||
WHERE p.F_EnabledMark = 0
|
||||
AND s.F_DeleteMark = 0
|
||||
|
||||
and p.F_PostLearnId = #{position.id}
|
||||
<if test="position.isConfiguredToGrade ==1">
|
||||
and p.F_GradeId = #{gradeId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习ID查询练习列表(包含技能点名称)-->
|
||||
<select id="listByPostLearnIdWithName" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCoursePracticeWithNameVo">
|
||||
SELECT p.F_Id AS id,
|
||||
p.F_EnabledMark AS enabledMark,
|
||||
p.F_Num AS num,
|
||||
p.F_CourseId AS courseId,
|
||||
p.F_GradeId AS gradeId,
|
||||
p.F_PostRankId AS postRankId,
|
||||
p.F_PostLearnId AS postLearnId,
|
||||
p.F_BusinessId AS businessId,
|
||||
s.F_Name AS businessName
|
||||
FROM ftb_cultivate_position_course_practice p
|
||||
INNER JOIN ftb_cultivate_teaching_skill s ON p.F_BusinessId = s.F_Id
|
||||
WHERE p.F_PostLearnId = #{postLearnId}
|
||||
AND p.F_EnabledMark = 0
|
||||
AND s.F_DeleteMark = 0
|
||||
</select>
|
||||
|
||||
<!--根据岗位学习 ID 和课程 ID 列表查询练习列表(包含技能点名称)-->
|
||||
<select id="listByPostLearnIdAndCourseIdsWithName" resultType="jnpf.model.cultivate.v2.position.vo.FtbCultivatePositionCoursePracticeWithNameVo">
|
||||
SELECT p.F_Id AS id,
|
||||
p.F_EnabledMark AS enabledMark,
|
||||
p.F_Num AS num,
|
||||
p.F_CourseId AS courseId,
|
||||
p.F_GradeId AS gradeId,
|
||||
p.F_PostRankId AS postRankId,
|
||||
p.F_PostLearnId AS postLearnId,
|
||||
p.F_BusinessId AS businessId,
|
||||
s.F_Name AS businessName
|
||||
FROM ftb_cultivate_position_course_practice p
|
||||
INNER JOIN ftb_cultivate_teaching_skill s ON p.F_BusinessId = s.F_Id
|
||||
WHERE p.F_PostLearnId = #{postLearnId}
|
||||
AND p.F_CourseId IN
|
||||
<foreach collection="courseIds" item="courseId" separator="," open="(" close=")">
|
||||
#{courseId}
|
||||
</foreach>
|
||||
AND p.F_EnabledMark = 0
|
||||
AND s.F_DeleteMark = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionExamIdentifyMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionExamMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.position.FtbCultivatePositionExam">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_position_exam-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_LastModifyUserId" jdbcType="VARCHAR" property="fLastmodifyuserid" />
|
||||
<result column="F_LastModifyTime" jdbcType="TIMESTAMP" property="fLastmodifytime" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
<result column="F_ExamId" jdbcType="VARCHAR" property="fExamid" />
|
||||
<result column="F_PostLearnId" jdbcType="VARCHAR" property="fPostlearnid" />
|
||||
<result column="F_PostRankId" jdbcType="VARCHAR" property="fPostrankid" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_EnabledMark, F_CreatorUserId, F_CreatorTime, F_LastModifyUserId, F_LastModifyTime,
|
||||
F_DeleteUserId, F_DeleteTime, F_TenantId, F_ExamId, F_PostLearnId, F_PostRankId
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionIdentifyResultMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionLogMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionMapper">
|
||||
<!--岗位学习已学习课程列表-->
|
||||
<select id="jobLearningCourseList"
|
||||
resultType="jnpf.model.cultivate.vo.position.FtbCultivatePositionJobLearnCourseVO">
|
||||
SELECT F_ID as id,F_Name as `name`,F_ChapterNumber as chapterNumber,F_Format as format,
|
||||
F_Label as label,F_IsGrounding as isGroundIng,F_CourseId as courseId,F_LastModifyTime as updateTime
|
||||
from ftb_cultivate_course
|
||||
WHERE F_EnabledMark = 0 and (F_Label=1 OR FIND_IN_SET(#{params.postId},F_LearnJob)>0)
|
||||
<if test="params.searchValue != null">
|
||||
and F_Name like concat('%',#{params.searchValue},'%')
|
||||
</if>
|
||||
<if test="params.label!= null">
|
||||
and F_Label = #{params.label}
|
||||
</if>
|
||||
</select>
|
||||
<!--岗位学习中课程列表页-->
|
||||
<select id="jobLevelCourseList" resultType="jnpf.model.cultivate.vo.position.FtbCultivatePositionLearnLevelVO">
|
||||
SELECT a.F_Id as id,
|
||||
b.F_Id as courseId,
|
||||
b.F_Name as `name`,
|
||||
b.F_Format as format,
|
||||
b.F_Label as label,
|
||||
b.F_CourseId as courseCustomId,
|
||||
b.F_LastModifyTime as updateTime,
|
||||
a.F_Compulsory as compulsory
|
||||
FROM ftb_cultivate_position_course a
|
||||
JOIN ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
WHERE a.F_EnabledMark = 0
|
||||
and b.F_EnabledMark = 0
|
||||
and b.F_IsGrounding = 1
|
||||
and b.F_Label = 2
|
||||
and a.F_PostRankId = #{params.postRankId}
|
||||
and a.F_PostLearnId = #{params.jobLearningId}
|
||||
</select>
|
||||
<!--岗位学习分页列表-->
|
||||
<select id="jobLearningPaginatedList" resultType="jnpf.model.cultivate.vo.position.FtbJobLearningPaginatedVO">
|
||||
select F_Id as jobLearningId,F_PostId as postId,F_LastModifyTime as updateTime,F_IsGrounding as isGrounding
|
||||
from ftb_cultivate_position where F_EnabledMark = 0
|
||||
<if test="params.postId != null and params.postId != ''">
|
||||
and F_PostId = #{params.postId}
|
||||
</if>
|
||||
<if test="params.isGrounding!= null">
|
||||
and F_IsGrounding = #{params.isGrounding}
|
||||
</if>
|
||||
</select>
|
||||
<!--实操鉴定,根据岗位id+用户id查询,解决换绑问题-->
|
||||
<select id="queryPracticalAppraisalByPostId" resultType="java.lang.String">
|
||||
SELECT F_IdentifyId FROM ftb_cultivate_position_identify_result
|
||||
WHERE F_PostRankId = #{postId} AND F_UserId = #{userId} AND F_Type = 0 limit 1
|
||||
|
||||
<!-- SELECT a.F_IdentifyId-->
|
||||
<!-- FROM ftb_cultivate_position_exam_identify a join ftb_cultivate_position b on a.F_PostRankId = b.F_PostId-->
|
||||
<!-- WHERE a.F_EnabledMark = 0 and b.F_IsGrounding = 1 and b.F_EnabledMark = 0 AND a.F_PostRankId = #{postId}-->
|
||||
</select>
|
||||
<!--是否已经鉴定-->
|
||||
<select id="queryIdentificationResults" resultType="java.lang.Integer">
|
||||
SELECT COUNT(0)
|
||||
FROM ftb_cultivate_identify_apply AS apy
|
||||
JOIN ftb_cultivate_position_identify_result AS re ON re.F_IdentifyRecordId = apy.F_Id
|
||||
WHERE apy.F_IsVisible = 0
|
||||
and apy.F_Status = 1
|
||||
AND re.F_EnabledMark = 0
|
||||
AND apy.F_DeleteMark = 0
|
||||
AND re.F_PostRankId = #{postId}
|
||||
AND re.F_UserId = #{userId}
|
||||
AND re.F_IdentifyId = #{identifyId}
|
||||
</select>
|
||||
|
||||
<select id="webPageList" resultType="jnpf.model.cultivate.v2.position.vo.WebPositionLearningListVo">
|
||||
select F_Id as id,F_PostId as postId,F_LastModifyTime as lastModifyTime
|
||||
from ftb_cultivate_position where F_EnabledMark = 0 and F_IsGrounding=1
|
||||
<if test="params.postId != null and params.postId != ''">
|
||||
and F_PostId = #{params.postId}
|
||||
</if>
|
||||
order by F_CreatorTime desc
|
||||
</select>
|
||||
|
||||
<select id="allCompleteCourseLists" resultType="jnpf.model.cultivate.v2.course.vo.app.AppCourseSimpleVo">
|
||||
select a.F_Id as courseId,
|
||||
a.F_Name as `courseName`,
|
||||
a.F_CoverUrl as coverUrl,
|
||||
c.F_LastModifyTime as lastModifyTime
|
||||
from ftb_cultivate_course a
|
||||
left join ftb_cultivate_position_cource_learning c on a.F_Id = c.F_CourceId
|
||||
where a.F_EnabledMark = 0
|
||||
and a.F_IsGrounding = 1
|
||||
and c.F_EnabledMark = 0
|
||||
and c.F_state = 1
|
||||
and c.F_UserId = #{req.userId}
|
||||
<if test="courseIds != null and courseIds.size()>0">
|
||||
AND a.F_Id in
|
||||
<foreach collection="courseIds" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="allCompleteExamLists" resultType="jnpf.model.cultivate.v2.course.vo.app.AppCultivateCourseExamVo">
|
||||
select a.F_Id as examId,
|
||||
a.F_ExamName as examName,
|
||||
a.F_ExamType as examType,
|
||||
a.F_Cover as coverUrl,
|
||||
c.F_Status as examStatus,
|
||||
c.F_FinishTime as examCompleteDate,
|
||||
c.F_LastModifyTime as lastModifyTime,
|
||||
c.F_Id as userExamId,
|
||||
c.F_TotalScore AS examTotalScore,
|
||||
c.F_Score AS userExamScore,
|
||||
c.F_Duration AS userExamDuration
|
||||
from ftb_cultivate_exam a
|
||||
join ftb_cultivate_exam_user c on a.F_Id = c.F_ExamId
|
||||
where a.F_EnabledMark = 1
|
||||
and c.F_EnabledMark = 0
|
||||
and c.F_Status in (3,4,5)
|
||||
and c.F_UserId = #{req.userId}
|
||||
<if test="examIds != null and examIds.size()>0">
|
||||
AND a.F_Id in
|
||||
<foreach collection="examIds" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="allCompleteIdentityLists"
|
||||
resultType="jnpf.model.cultivate.v2.course.vo.app.AppCultivateCourseIdentityVo">
|
||||
select a.F_Id as userIdentityId,
|
||||
a.F_Result as identificationResult,
|
||||
a.F_Status as identificationStatus,
|
||||
a.F_IdentifyTime as identityCompleteTime,
|
||||
b.F_TableId as identityId,
|
||||
b.F_Name as identityName,
|
||||
b.F_CoverUrl as coverUrl
|
||||
from ftb_cultivate_identify_apply as a
|
||||
join ftb_cultivate_identify_apply_table_backups as b on a.F_TableId = b.F_Id
|
||||
where a.F_Status = 1
|
||||
and a.F_DeleteMark = 0
|
||||
and a.F_IsVisible = 0
|
||||
and a.F_Source=2
|
||||
and a.F_BeIdentifyUserId = #{req.userId}
|
||||
<if test="identityIds != null and identityIds.size()>0">
|
||||
AND b.F_TableId in
|
||||
<foreach collection="identityIds" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="positionLearnIds != null and positionLearnIds.size()>0">
|
||||
AND a.F_SourceId in
|
||||
<foreach collection="positionLearnIds" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="allCompletePracticeLists"
|
||||
resultType="jnpf.model.cultivate.v2.position.vo.AppPracticeCountVo">
|
||||
select
|
||||
a.F_SkillId as id,
|
||||
b.F_Name as name,
|
||||
count(1) as num
|
||||
from ftb_cultivate_teaching_record as a
|
||||
join ftb_cultivate_teaching_skill as b on a.F_SkillId = b.F_Id
|
||||
where a.F_Type =2
|
||||
and a.F_DeleteMark=0
|
||||
and b.F_DeleteMark=0
|
||||
and a.F_UserId = #{req.userId}
|
||||
<if test="practiceIds != null and practiceIds.size()>0">
|
||||
AND a.F_SkillId in
|
||||
<foreach collection="practiceIds" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
group by a.F_SkillId
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionSettingMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,615 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionStatisticesMapper">
|
||||
|
||||
<!--个人维度统计-->
|
||||
<select id="personListStatistics"
|
||||
resultType="jnpf.model.cultivate.vo.position.FtbCultivatePositionPersonStatisticesVO">
|
||||
SELECT a.F_UserId as userId,IFNULL(SUM(a.F_LearnTime),0) as studyDuration
|
||||
FROM ftb_cultivate_position_cource_learning a
|
||||
<where> a.F_EnabledMark=0
|
||||
<if test="params.innerCourseIds != null and params.innerCourseIds.size() > 0">
|
||||
and a.F_CourceId in
|
||||
<foreach collection="params.innerCourseIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="params.userIds != null and params.userIds.size() > 0">
|
||||
and a.F_UserId IN
|
||||
<foreach collection="params.userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_LastModifyTime BETWEEN #{params.startTime} and #{params.endTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY a.F_UserId
|
||||
</select>
|
||||
<!--查询岗位关联的所有课程id-->
|
||||
<select id="queryCourseIds" resultType="jnpf.model.cultivate.v2.position.vo.CultivatePositionCourseVo">
|
||||
SELECT
|
||||
b.F_CourseId AS courseId,
|
||||
b.F_GradeId as gradeId,
|
||||
b.F_PostRankId AS postId,
|
||||
b.F_Compulsory AS compulsory
|
||||
FROM
|
||||
ftb_cultivate_position_course b
|
||||
JOIN ftb_cultivate_course c ON b.F_CourseId = c.F_Id
|
||||
JOIN ftb_cultivate_position p ON b.F_PostLearnId = p.F_Id
|
||||
WHERE
|
||||
b.F_EnabledMark = 0
|
||||
AND c.F_EnabledMark = 0
|
||||
AND c.F_IsGrounding = 1
|
||||
AND p.F_EnabledMark = 0
|
||||
AND p.F_IsGrounding = 1
|
||||
</select>
|
||||
<!--个人维度统计-->
|
||||
<select id="personListStatistics1"
|
||||
resultType="jnpf.model.cultivate.vo.position.FtbCultivatePositionPersonStatisticesVO">
|
||||
SELECT a.F_UserId as userId,IFNULL(SUM(a.F_LearnTime),0) as studyDuration
|
||||
FROM ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
<where>
|
||||
b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and c.F_Label = 2 and a.F_EnabledMark=0
|
||||
<if test="params.userIds != null and params.userIds.size() > 0">
|
||||
and F_UserId IN
|
||||
<foreach collection="params.userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_LastModifyTime BETWEEN #{params.startTime} and #{params.endTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY F_UserId
|
||||
</select>
|
||||
<!--下属参与学习人数-->
|
||||
<select id="numberOfPeopleParticipatingInTheStudy1" resultType="java.lang.Integer">
|
||||
SELECT COUNT(distinct a.F_UserId) FROM
|
||||
ftb_cultivate_position_cource_learning a
|
||||
WHERE
|
||||
a.F_EnabledMark=0 and
|
||||
a.F_state in (1,2) and a.F_UserId IN
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
<if test="innerCourseIds != null and innerCourseIds.size() > 0">
|
||||
AND a.F_CourceId in
|
||||
<foreach collection="innerCourseIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<!--下属人均学习时长-->
|
||||
<select id="averageStudyHoursPerSubordinate1" resultType="java.lang.Integer">
|
||||
SELECT IFNULL(SUM(a.F_LearnTime),0)
|
||||
FROM ftb_cultivate_position_cource_learning a
|
||||
WHERE
|
||||
a.F_EnabledMark=0 and
|
||||
a.F_UserId IN
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
<if test="innerCourseIds != null and innerCourseIds.size() > 0">
|
||||
AND a.F_CourceId in
|
||||
<foreach collection="innerCourseIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<!--统计课程数-->
|
||||
<select id="numberOfStudyCourses" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(DISTINCT a.F_CourceId)
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
<where>
|
||||
b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and c.F_Label = 2 and
|
||||
a.F_UserId = #{userId} and a.F_EnabledMark=0
|
||||
<if test="type == 0">
|
||||
and a.F_state in (1,2)
|
||||
</if>
|
||||
<if test="type == 1">
|
||||
and a.F_state = 1
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!--统计课程数-->
|
||||
<select id="batchNumberOfStudyCourses2" resultType="jnpf.model.cultivate.vo.position.PersonStatisticesDto">
|
||||
SELECT
|
||||
a.F_UserId as userId ,COUNT( DISTINCT a.F_CourceId ) as num
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a
|
||||
<where>
|
||||
a.F_EnabledMark=0
|
||||
<if test="innerCourseIds != null and innerCourseIds.size() > 0">
|
||||
AND a.F_CourceId in
|
||||
<foreach collection="innerCourseIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userIds != null and userIds.size() > 0">
|
||||
AND a.F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="type == 0">
|
||||
and a.F_state in (1,2)
|
||||
</if>
|
||||
<if test="type == 1">
|
||||
and a.F_state = 1
|
||||
</if>
|
||||
</where>
|
||||
group by a.F_UserId
|
||||
</select>
|
||||
<!--统计课程数-->
|
||||
<select id="batchNumberOfStudyCourses1" resultType="jnpf.model.cultivate.vo.position.PersonStatisticesDto">
|
||||
SELECT
|
||||
a.F_UserId as userId ,COUNT( DISTINCT a.F_CourceId ) as num
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
<where>
|
||||
b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and c.F_Label = 2 and a.F_EnabledMark=0 and
|
||||
a.F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="type == 0">
|
||||
and a.F_state in (1,2)
|
||||
</if>
|
||||
<if test="type == 1">
|
||||
and a.F_state = 1
|
||||
</if>
|
||||
</where>
|
||||
group by a.F_UserId
|
||||
</select>
|
||||
<!--岗位维度统计-->
|
||||
<select id="positionListStatistics" resultType="jnpf.model.cultivate.vo.position.FtbCultivatePersonStatisticesVO">
|
||||
SELECT F_PostId as positionId,F_Id as postLearnId FROM ftb_cultivate_position
|
||||
WHERE F_EnabledMark = 0
|
||||
<if test="params.powerPositionList != null and params.powerPositionList.size() > 0 ">
|
||||
and F_PostId in
|
||||
<foreach collection="params.powerPositionList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<!--岗位学习课程总数-->
|
||||
<select id="totalNumberOfOnTheJobLearningCourses" resultType="jnpf.model.cultivate.vo.position.FtbCultivatePersonStatisticesVO$TotalNumberOfOnTheJobLearningCourses">
|
||||
SELECT
|
||||
COUNT( DISTINCT a.F_CourseId ) as totalNumberOfOnTheJobLearningCourses
|
||||
,F_PostLearnId as positionId
|
||||
FROM
|
||||
ftb_cultivate_position_course a
|
||||
JOIN ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
WHERE
|
||||
a.F_EnabledMark = 0
|
||||
AND b.F_EnabledMark = 0
|
||||
and F_PostLearnId in
|
||||
<foreach collection="postLearnIds" item="postLearnId" open="(" close=")" separator=",">
|
||||
#{postLearnId}
|
||||
</foreach>
|
||||
GROUP BY F_PostLearnId
|
||||
</select>
|
||||
<!--已学习课程数-->
|
||||
<select id="numberOfCoursesTaken" resultType="jnpf.model.cultivate.vo.position.FtbCultivatePersonStatisticesVO$NumberOfCoursesTaken">
|
||||
SELECT COUNT(distinct a.F_CourceId) as numberOfCoursesTaken,b.F_PostRankId as positionId
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
WHERE
|
||||
b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and a.F_EnabledMark=0 AND
|
||||
a.F_state = 1 and
|
||||
b.F_PostRankId in
|
||||
<foreach collection="postLearnIds" item="postLearnId" open="(" close=")" separator=",">
|
||||
#{postLearnId}
|
||||
</foreach>
|
||||
GROUP BY b.F_PostRankId
|
||||
</select>
|
||||
|
||||
<select id="numberOfCoursesTakenStoreIndex" resultType="java.lang.Long">
|
||||
SELECT COUNT(distinct a.F_CourceId) as numberOfCoursesTaken
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
join ftb_cultivate_position posi on posi.F_Id = b.F_PostLearnId
|
||||
WHERE
|
||||
b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and c.F_Label = 2 and a.F_EnabledMark=0 AND
|
||||
a.F_state = 1 and
|
||||
c.F_IsGrounding=1 AND
|
||||
posi.F_IsGrounding=1 and
|
||||
b.F_PostRankId in
|
||||
<foreach collection="postLearnIds" item="postLearnId" open="(" close=")" separator=",">
|
||||
#{postLearnId}
|
||||
</foreach>
|
||||
AND a.F_UserId =#{userId}
|
||||
</select>
|
||||
|
||||
<select id="courseTotleNum" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT( DISTINCT a.F_CourseId )
|
||||
FROM
|
||||
ftb_cultivate_position_course a
|
||||
JOIN ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
join ftb_cultivate_position c on c.F_Id = a.F_PostLearnId
|
||||
WHERE
|
||||
a.F_EnabledMark = 0
|
||||
And c.F_IsGrounding=1
|
||||
AND b.F_EnabledMark = 0
|
||||
and b.F_IsGrounding=1
|
||||
AND b.F_Label = 2
|
||||
and a.F_PostRankId in
|
||||
<foreach collection="positionIds" item="postLearnId" open="(" close=")" separator=",">
|
||||
#{postLearnId}
|
||||
</foreach>
|
||||
</select>
|
||||
<!--岗位学习人数-->
|
||||
<select id="numberOfPeopleStudyingOnTheJob" resultType="java.lang.String">
|
||||
SELECT distinct a.F_UserId FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
WHERE b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and a.F_EnabledMark=0
|
||||
and a.F_state in (1,2)
|
||||
and a.F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<!--学习时长-->
|
||||
<select id="studyDuration" resultType="java.lang.Long">
|
||||
SELECT IFNULL(SUM(F_LearnTime),0)
|
||||
FROM ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
WHERE
|
||||
b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and a.F_EnabledMark=0
|
||||
and a.F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<!--参与学习人数-->
|
||||
<select id="numberOfPeopleParticipatingInTheStudyOrg" resultType="java.lang.String">
|
||||
SELECT distinct a.F_UserId
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
WHERE b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and c.F_Label = 2 and a.F_EnabledMark=0 and a.F_state in (1,2)
|
||||
and a.F_UserId IN
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and FIND_IN_SET(b.F_PostRankId,#{positionIds}) > 0
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_LastModifyTime between #{params.startTime} and #{params.endTime}
|
||||
</if>
|
||||
</select>
|
||||
<!--学习总时长-->
|
||||
<select id="totalStudyTime" resultType="java.lang.Integer">
|
||||
SELECT IFNULL(SUM(a.F_LearnTime),0) FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
WHERE b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and c.F_Label = 2 and a.F_EnabledMark=0 and a.F_state in (1,2)
|
||||
and a.F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and FIND_IN_SET(b.F_PostRankId,#{postionIds}) > 0
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_LastModifyTime between #{params.startTime} and #{params.endTime}
|
||||
</if>
|
||||
</select>
|
||||
<!--已学课程数-->
|
||||
<select id="numberOfCoursesTakens" resultType="java.lang.Integer">
|
||||
SELECT count(distinct a.F_CourceId)
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
WHERE b.F_EnabledMark = 0 and a.F_state = 1 and c.F_EnabledMark = 0 and a.F_EnabledMark=0 and c.F_Label = 2
|
||||
and a.F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_LastModifyTime between #{params.startTime} and #{params.endTime}
|
||||
</if>
|
||||
and FIND_IN_SET(b.F_PostRankId,#{postionIds}) > 0
|
||||
</select>
|
||||
<!--课程总数-->
|
||||
<select id="totalNumberOfCourses" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM ftb_cultivate_course WHERE F_EnabledMark = 0
|
||||
</select>
|
||||
<!--组织课程信息-->
|
||||
<select id="organizeCourseDetails" resultType="jnpf.model.cultivate.vo.position.OrganizeCourseDetails">
|
||||
SELECT a.F_CourceId as courseId,b.F_Name as courseTitle,
|
||||
SUM(a.F_LearnTime) as studyDuration,
|
||||
GROUP_CONCAT(DISTINCT c.F_PostRankId) AS positionIds
|
||||
FROM ftb_cultivate_position_cource_learning a JOIN ftb_cultivate_course b ON a.F_CourceId = b.F_Id
|
||||
join ftb_cultivate_position_course c on a.F_CourceId = c.F_CourseId
|
||||
WHERE c.F_EnabledMark = 0 and b.F_EnabledMark = 0 and b.F_Label = 2 and a.F_EnabledMark=0
|
||||
and a.F_state = 1
|
||||
and FIND_IN_SET(c.F_PostRankId,#{postionIds}) > 0
|
||||
and a.F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startDate != null and endDate != null">
|
||||
and a.F_LastModifyTime between #{startDate} and #{endDate}
|
||||
</if>
|
||||
GROUP BY a.F_CourceId
|
||||
</select>
|
||||
<!--已参与学习人数-->
|
||||
<select id="numberOfPeopleParticipatingInTheFinishStudy" resultType="jnpf.model.cultivate.vo.position.CourseStudyCountVO">
|
||||
SELECT
|
||||
a.F_CourceId AS courseId,
|
||||
COUNT( DISTINCT a.F_UserId ) AS num
|
||||
from ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
WHERE b.F_EnabledMark = 0
|
||||
and F_CourceId in
|
||||
<foreach collection="courseIds" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and find_in_set(b.F_PostRankId,#{postionIds}) > 0
|
||||
and a.F_EnabledMark=0
|
||||
and F_state in
|
||||
<foreach collection="states" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="userIds != null and userIds.size()>0">
|
||||
and a.F_UserId in
|
||||
<foreach collection="userIds" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY a.F_CourceId
|
||||
</select>
|
||||
<!--个人维度-课程详情-->
|
||||
<select id="personalDimensionCourseDetails"
|
||||
resultType="jnpf.model.cultivate.vo.position.PersonalDimensionCourseDetails">
|
||||
SELECT a.F_CourceId as courseId,b.F_Name as courseTitle,
|
||||
SUM(a.F_LearnTime) as studyDuration,
|
||||
a.F_state as state
|
||||
FROM ftb_cultivate_position_cource_learning a JOIN ftb_cultivate_course b ON a.F_CourceId = b.F_Id
|
||||
JOIN ftb_cultivate_position_course c on a.F_CourceId = c.F_CourseId
|
||||
WHERE b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and b.F_Label = 2 and a.F_state in (1,2) and a.F_EnabledMark=0 and a.F_UserId = #{userId}
|
||||
<if test="startDate != null and endDate != null">
|
||||
and a.F_LastModifyTime between #{startDate} and #{endDate}
|
||||
</if>
|
||||
GROUP BY a.F_CourceId
|
||||
</select>
|
||||
<!--课程学习进度-->
|
||||
<select id="courseLearningProgress" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM ftb_cultivate_position_cource_chapter_learning WHERE F_UserId = #{userId}
|
||||
and F_CourceId = #{courseId} and F_EnabledMark = 0
|
||||
<if test="type == 1">
|
||||
and F_state = 1
|
||||
</if>
|
||||
</select>
|
||||
<!--岗位学习总数-->
|
||||
<select id="jobLearningProgress" resultType="java.lang.Integer">
|
||||
SELECT COUNT(distinct a.F_CourceId) FROM
|
||||
ftb_cultivate_position_cource_learning a JOIN ftb_cultivate_position_course b ON a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
WHERE b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and c.F_Label = 2 and a.F_EnabledMark=0 and F_UserId = #{userId} and b.F_PostRankId=#{postId}
|
||||
<if test="type == 1">
|
||||
and a.F_state = 1
|
||||
</if>
|
||||
</select>
|
||||
<!--学习地图课程总数-->
|
||||
<select id="totalNumberOfLearningMapCourses1" resultType="java.lang.Integer">
|
||||
SELECT COUNT(DISTINCT a.F_CourceId) FROM
|
||||
ftb_cultivate_position_cource_learning a JOIN ftb_cultivate_position_course b
|
||||
ON a.F_CourceId = b.F_CourseId
|
||||
WHERE b.F_EnabledMark = 0 and a.F_EnabledMark=0
|
||||
|
||||
<if test="postIds != null and postIds.size() != 0">
|
||||
AND
|
||||
b.F_PostRankId in
|
||||
<foreach collection="postIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="innerCourseIds != null and innerCourseIds.size() > 0">
|
||||
AND a.F_CourceId in
|
||||
<foreach collection="innerCourseIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<!--员工姓名和员工ID-->
|
||||
<select id="fuzzySearchForRosterKeywords" resultType="java.util.Map">
|
||||
SELECT F_UserId as userId,F_Name as userName FROM ftb_personnels_staff_roster WHERE
|
||||
F_SystemWokerId like concat('%',#{keyWords},'%') or F_Name like concat('%',#{keyWords},'%')
|
||||
</select>
|
||||
|
||||
<select id="numberOfPeopleWhoCompletedTheStudy" resultType="java.lang.Integer">
|
||||
SELECT count(distinct a.F_UserId) FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
WHERE b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and c.F_Label = 2 and a.F_EnabledMark=0
|
||||
and a.F_state = 1 and a.F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<!--岗位考试合格率-->
|
||||
<select id="checkJobQualificationRate"
|
||||
resultType="jnpf.model.cultivate.vo.position.FtbCultivatePersonStatisticesVO$PassedTheExam">
|
||||
SELECT
|
||||
t.F_RelationPositionId AS positionId,
|
||||
IFNULL(ROUND(t.hege / t.total, 2) * 100, 0) AS averageStudyHoursPerSubordinate
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
F_RelationPositionId,
|
||||
( SELECT COUNT(*) FROM ftb_cultivate_exam_user WHERE F_Status IN ( 3, 5 ) AND F_RelationPositionId = a.F_RelationPositionId ) AS hege,
|
||||
( SELECT COUNT(*) FROM ftb_cultivate_exam_user WHERE F_RelationPositionId = a.F_RelationPositionId AND F_Status NOT IN ( 0, 2 )) AS total
|
||||
FROM
|
||||
ftb_cultivate_exam_user a
|
||||
WHERE
|
||||
F_EnabledMark = 1
|
||||
AND F_ExamSource IN ( 1, 2 )
|
||||
AND a.F_RelationPositionId IN
|
||||
<foreach collection="postIds" item="postId" open="(" close=")" separator=",">
|
||||
#{postId}
|
||||
</foreach>
|
||||
GROUP BY
|
||||
F_RelationPositionId
|
||||
) as t
|
||||
</select>
|
||||
<!--获取岗位名称-->
|
||||
<select id="getPostIds" resultType="java.lang.String">
|
||||
SELECT F_PostId as positionId FROM ftb_cultivate_position
|
||||
WHERE F_EnabledMark = 0
|
||||
and F_PostId in
|
||||
<foreach collection="postIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<!--查询岗位下课程完成情况-->
|
||||
<select id="queryCourseCompletionStatusOfThePosition"
|
||||
resultType="jnpf.model.cultivate.vo.position.PersonStatisticesDto">
|
||||
SELECT
|
||||
a.F_UserId AS userId,
|
||||
COUNT( DISTINCT a.F_CourceId ) AS num
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a
|
||||
JOIN ftb_cultivate_position_course b ON a.F_CourceId = b.F_CourseId
|
||||
JOIN ftb_cultivate_course c ON b.F_CourseId = c.F_Id
|
||||
JOIN ftb_cultivate_position_course AS d ON a.F_CourceId = d.F_CourseId
|
||||
WHERE
|
||||
b.F_EnabledMark = 0 and a.F_EnabledMark=0
|
||||
AND c.F_EnabledMark = 0
|
||||
AND c.F_Label = 2
|
||||
AND d.F_PostRankId = #{positionId}
|
||||
AND a.F_UserId in
|
||||
<foreach collection="idsByGradesId" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="type == 0">
|
||||
and a.F_state in (1,2)
|
||||
</if>
|
||||
<if test="type == 1">
|
||||
and a.F_state = 1
|
||||
</if>
|
||||
GROUP BY
|
||||
a.F_UserId
|
||||
</select>
|
||||
<select id="queryComplateCourseLists" resultType="java.lang.String">
|
||||
SELECT distinct a.F_CourceId
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
join ftb_cultivate_position posi on posi.F_Id = b.F_PostLearnId
|
||||
WHERE
|
||||
b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and c.F_Label = 2 and a.F_EnabledMark=0 AND
|
||||
a.F_state = 1 and
|
||||
c.F_IsGrounding=1 AND
|
||||
posi.F_IsGrounding=1 and
|
||||
b.F_PostRankId in
|
||||
<foreach collection="postLearnIds" item="postLearnId" open="(" close=")" separator=",">
|
||||
#{postLearnId}
|
||||
</foreach>
|
||||
AND a.F_UserId =#{userId}
|
||||
</select>
|
||||
<select id="queryComplateAndStudyingCourseLists" resultType="java.lang.String">
|
||||
SELECT distinct a.F_CourceId
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
join ftb_cultivate_position posi on posi.F_Id = b.F_PostLearnId
|
||||
WHERE
|
||||
b.F_EnabledMark = 0 and c.F_EnabledMark = 0 and c.F_Label = 2 and a.F_EnabledMark=0 AND
|
||||
a.F_state != 0 and
|
||||
c.F_IsGrounding=1 AND
|
||||
posi.F_IsGrounding=1 and
|
||||
b.F_PostRankId in
|
||||
<foreach collection="postLearnIds" item="postLearnId" open="(" close=")" separator=",">
|
||||
#{postLearnId}
|
||||
</foreach>
|
||||
AND a.F_UserId =#{userId}
|
||||
</select>
|
||||
<select id="queryAllNeedStudyCourseForPost" resultType="java.lang.String">
|
||||
select distinct b.F_CourseId as courseId from ftb_cultivate_position_course b
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
where b.F_EnabledMark = 0 and b.F_Compulsory = 0 and c.F_EnabledMark = 0 and c.F_Label = 2 and c.F_IsGrounding=1 and
|
||||
b.F_PostRankId in
|
||||
<foreach collection="positionIds" item="postLearnId" open="(" close=")" separator=",">
|
||||
#{postLearnId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="batchQueryAllCourseStudyV2" resultType="jnpf.model.cultivate.v2.statistics.V2UserCourseStudyVo">
|
||||
SELECT
|
||||
a.F_CourceId AS courseId,
|
||||
a.F_UserId AS userId,
|
||||
a.F_State AS state
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a
|
||||
join ftb_cultivate_course c on a.F_CourceId = c.F_Id JOIN ftb_cultivate_position_course b ON a.F_CourceId=b.F_CourseId
|
||||
WHERE
|
||||
a.F_EnabledMark=0 and c.F_IsGrounding=1 and c.F_EnabledMark=0 AND c.F_Label = 2
|
||||
<if test="userIds != null and userIds.size() > 0">
|
||||
AND a.F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY a.F_CourceId,a.F_UserId,a.F_State
|
||||
</select>
|
||||
|
||||
<select id="queryAllNextUser" resultType="jnpf.model.cultivate.v2.position.vo.PersonForLeaderVo">
|
||||
select F_UserId AS userId,
|
||||
F_leaderId AS leaderId
|
||||
from base_user_relation where F_leaderId in
|
||||
<foreach collection="leaderUserIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="batchQueryAllCourseStudy" resultType="jnpf.model.cultivate.vo.course.web.UserCourseStudyVo">
|
||||
SELECT
|
||||
a.F_CourceId AS courseId,
|
||||
a.F_UserId AS userId,
|
||||
a.F_State AS state,
|
||||
b.F_PostRankId AS positionId
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a join ftb_cultivate_position_course b on a.F_CourceId = b.F_CourseId
|
||||
join ftb_cultivate_course c on b.F_CourseId = c.F_Id
|
||||
WHERE
|
||||
b.F_EnabledMark = 0 and a.F_EnabledMark=0 and c.F_IsGrounding=1 and c.F_EnabledMark=0
|
||||
<if test="userIds != null and userIds.size() > 0">
|
||||
AND a.F_UserId in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="numberOfPeopleParticipatingInTheStudy" resultType="jnpf.model.cultivate.v2.position.vo.V2StudyCountVo">
|
||||
SELECT COUNT(distinct a.F_UserId) as userNumber,IFNULL(SUM(a.F_LearnTime),0) as totalSeconds FROM
|
||||
ftb_cultivate_position_cource_learning a
|
||||
WHERE
|
||||
a.F_EnabledMark=0 and
|
||||
a.F_state in (1,2) and a.F_UserId IN
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
<if test="innerCourseIds != null and innerCourseIds.size() > 0">
|
||||
AND a.F_CourceId in
|
||||
<foreach collection="innerCourseIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePositionUserMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.position.FtbCultivatePositionUser">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_position_user-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_PostLearnId" jdbcType="VARCHAR" property="fPostlearnid" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_LastModifyUserId" jdbcType="VARCHAR" property="fLastmodifyuserid" />
|
||||
<result column="F_LastModifyTime" jdbcType="TIMESTAMP" property="fLastmodifytime" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
<result column="F_PostId" jdbcType="VARCHAR" property="fPostid" />
|
||||
<result column="F_SourceId" jdbcType="VARCHAR" property="fSourceid" />
|
||||
<result column="F_UserId" jdbcType="VARCHAR" property="fUserid" />
|
||||
<result column="F_SourceState" jdbcType="TINYINT" property="fSourcestate" />
|
||||
<result column="F_CurrentSourceState" jdbcType="TINYINT" property="fCurrentsourcestate" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_PostLearnId, F_EnabledMark, F_CreatorUserId, F_CreatorTime, F_LastModifyUserId,
|
||||
F_LastModifyTime, F_DeleteUserId, F_DeleteTime, F_TenantId, F_PostId, F_SourceId,
|
||||
F_UserId, F_SourceState, F_CurrentSourceState
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePromotionLogMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,348 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePromotionMapper">
|
||||
<resultMap id="promotionMap" type="jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionVO">
|
||||
<id property="id" column="id" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="promotion" column="promotion" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="promotionBusinessId" column="promotionBusinessId" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="channelIniPoId" column="channelIniPoId" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="channelIniName" column="channelIniName" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="lastModifyTime" column="lastModifyTime" jdbcType="DATETIMEOFFSET" javaType="java.util.Date"/>
|
||||
<result property="creatorTime" column="creatorTime" jdbcType="DATETIMEOFFSET" javaType="java.util.Date"/>
|
||||
<collection select="promoPostId" property="postChannelLevel" column="id" javaType="java.util.ArrayList"/>
|
||||
</resultMap>
|
||||
<!--查询通道层级-->
|
||||
<select id="getList" resultMap="promotionMap">
|
||||
SELECT
|
||||
a.*,b.channelIniPoId,b.channelIniName
|
||||
FROM
|
||||
(
|
||||
SELECT DISTINCT
|
||||
pr.F_Id AS id,
|
||||
pr.F_Promotion AS promotion,
|
||||
pr.F_PromotionBusinessId AS promotionBusinessId,
|
||||
pr.F_LastModifyTime AS lastModifyTime,
|
||||
pr.F_CreatorTime AS creatorTime
|
||||
FROM
|
||||
ftb_cultivate_promotion AS pr
|
||||
LEFT JOIN ftb_cultivate_promotion_post AS po ON pr.F_Id = po.F_PromotionId
|
||||
<where>
|
||||
pr.F_EnableMark=0
|
||||
<if test="dto.postId != null and dto.postId !=''">
|
||||
and po.F_PostId =#{dto.postId}
|
||||
</if>
|
||||
<if test="dto.keyWord != null and dto.keyWord !=''">
|
||||
and pr.F_Promotion like CONCAT('%',#{dto.keyWord},'%')
|
||||
</if>
|
||||
<if test="dto.promotionId != null and dto.promotionId !=''">
|
||||
AND pr.F_Id =#{dto.promotionId}
|
||||
</if>
|
||||
</where>
|
||||
) AS a INNER JOIN (
|
||||
SELECT
|
||||
pr.F_Id,
|
||||
po.F_PostId channelIniPoId,
|
||||
po.F_PostName channelIniName
|
||||
FROM
|
||||
ftb_cultivate_promotion AS pr
|
||||
LEFT JOIN ftb_cultivate_promotion_post AS po ON pr.F_Id = po.F_PromotionId
|
||||
where
|
||||
pr.F_EnableMark=0
|
||||
AND po.F_Level = 1
|
||||
) AS b ON a.id = b.F_Id
|
||||
ORDER BY
|
||||
a.creatorTime DESC,
|
||||
a.lastModifyTime DESC
|
||||
</select>
|
||||
<!--根据促销活动ID列表查询对应的促销活动信息-->
|
||||
<select id="promoPostId" resultType="jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionPostVO">
|
||||
SELECT
|
||||
F_Id promotionPostId,
|
||||
F_PromotionId AS promotionId,
|
||||
F_PostId AS postId,
|
||||
F_PostName AS postName,
|
||||
F_Level AS channelLevel
|
||||
FROM
|
||||
ftb_cultivate_promotion_post where F_PromotionId = #{id}
|
||||
order by F_Level asc
|
||||
</select>
|
||||
<!--查询已经开启的成员列表-->
|
||||
<select id="getPromotionMbeList" resultType="jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionMemberVO">
|
||||
SELECT
|
||||
me.F_PromotionId promotionId,
|
||||
pr.F_Promotion promotionName,
|
||||
me.F_UserId userId,
|
||||
me.F_UserName userName,
|
||||
me.F_OrgId orgId,
|
||||
me.F_OrgName orgName,
|
||||
me.F_PositionId positionId,
|
||||
me.F_PositionName positionName,
|
||||
me.F_GradeId positionGradesId,
|
||||
me.F_GradeName positionGradesName,
|
||||
count( pr.F_Id ) as numOfChannelsEnabled
|
||||
FROM
|
||||
ftb_cultivate_promotion AS pr
|
||||
INNER JOIN ftb_cultivate_promotion_member AS me ON pr.F_Id = me.F_PromotionId
|
||||
WHERE pr.F_Id=#{dto.promotionId}
|
||||
AND me.F_EnableStatus=1
|
||||
GROUP BY me.F_UserId
|
||||
</select>
|
||||
<!--查询通道层级-->
|
||||
<select id="getPromotionChannel" resultMap="promotionMap">
|
||||
SELECT
|
||||
pr.F_Id AS id,
|
||||
pr.F_Promotion AS promotion,
|
||||
pr.F_PromotionBusinessId AS promotionBusinessId,
|
||||
pr.F_LastModifyTime AS lastModifyTime
|
||||
FROM
|
||||
ftb_cultivate_promotion AS pr
|
||||
<where>
|
||||
pr.F_EnableMark=0
|
||||
<if test="id != null">
|
||||
AND pr.F_Id =#{id}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
pr.F_Promotion
|
||||
</select>
|
||||
<!--根据促销活动ID列表查询对应的促销活动信息-->
|
||||
<select id="queryListByIds" resultMap="promotionMap">
|
||||
SELECT
|
||||
a.*,b.channelIniPoId,b.channelIniName
|
||||
FROM
|
||||
(
|
||||
SELECT DISTINCT
|
||||
pr.F_Id AS id,
|
||||
pr.F_Promotion AS promotion,
|
||||
pr.F_PromotionBusinessId AS promotionBusinessId,
|
||||
pr.F_LastModifyTime AS lastModifyTime,
|
||||
pr.F_CreatorTime AS creatorTime
|
||||
FROM
|
||||
ftb_cultivate_promotion AS pr
|
||||
LEFT JOIN ftb_cultivate_promotion_post AS po ON pr.F_Id = po.F_PromotionId
|
||||
<where>
|
||||
pr.F_EnableMark=0
|
||||
AND pr.F_Id in
|
||||
<foreach collection="promotionIds" item="promotionId" open="(" separator="," close=")">
|
||||
#{promotionId}
|
||||
</foreach>
|
||||
</where>
|
||||
) AS a INNER JOIN (
|
||||
SELECT
|
||||
pr.F_Id,
|
||||
po.F_PostId channelIniPoId,
|
||||
po.F_PostName channelIniName
|
||||
FROM
|
||||
ftb_cultivate_promotion AS pr
|
||||
LEFT JOIN ftb_cultivate_promotion_post AS po ON pr.F_Id = po.F_PromotionId
|
||||
<where>
|
||||
pr.F_EnableMark=0
|
||||
AND po.F_Level = 1
|
||||
</where>
|
||||
) AS b ON a.id = b.F_Id
|
||||
ORDER BY
|
||||
a.creatorTime DESC,
|
||||
a.lastModifyTime DESC
|
||||
</select>
|
||||
<!--查询组织机构列表的智慧统计信息,并进行分页显示-->
|
||||
<select id="organizationListStatistics"
|
||||
resultType="jnpf.model.cultivate.vo.promotion.FtbCultivateMapsOrgWisdomStatisticVO">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
a.*,
|
||||
b.F_PostId iniPostId,
|
||||
b.F_PostName iniPosition,
|
||||
COUNT( me.F_UserId ) AS numberOfEmplo,
|
||||
me.F_OrgId enableOrgId,
|
||||
me.F_OrgName enableOrgName
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
pr.F_Id AS id,
|
||||
pr.F_Promotion mapName,
|
||||
COUNT( DISTINCT post.F_PostId ) AS mapLevel,
|
||||
pr.F_CreatorTime creationTime,
|
||||
F_PromotionBusinessId AS mapID
|
||||
FROM
|
||||
ftb_cultivate_promotion_new AS pr
|
||||
LEFT JOIN ftb_cultivate_promotion_post_new AS post ON pr.F_Id = post.F_PromotionId
|
||||
WHERE pr.F_EnableMark = 0
|
||||
GROUP BY
|
||||
pr.F_Id
|
||||
) a
|
||||
LEFT JOIN ftb_cultivate_promotion_post_new AS b ON a.id = b.F_PromotionId
|
||||
AND b.F_Level = 1
|
||||
LEFT JOIN (
|
||||
SELECT DISTINCT
|
||||
me.F_UserId,
|
||||
me.F_PromotionId,
|
||||
me.F_OrgId,
|
||||
me.F_OrgName
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a
|
||||
JOIN ftb_cultivate_position_course b ON a.F_CourceId = b.F_CourseId
|
||||
JOIN ftb_cultivate_promotion_member_new AS me ON me.F_UserId = a.F_UserId
|
||||
JOIN ftb_cultivate_course as course ON b.F_CourseId = course.F_Id
|
||||
WHERE
|
||||
b.F_EnabledMark = 0 and (me.F_DeleteMark is null or me.F_DeleteMark = 0 ) and a.F_EnabledMark = 0
|
||||
AND course.F_EnabledMark = 0
|
||||
AND a.F_state IN ( 1, 2 )
|
||||
<if test="dto.selectOrganization != null and dto.selectOrganization.size() > 0">
|
||||
AND me.F_OrgId IN
|
||||
<foreach collection="dto.selectOrganization" item="orgId" open="(" separator="," close=")">
|
||||
#{orgId}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY
|
||||
me.F_UserId,
|
||||
me.F_PromotionId
|
||||
) AS me ON me.F_PromotionId = a.id
|
||||
<where>
|
||||
a.mapLevel != 0
|
||||
<if test="dto.startTime != null and dto.endTime != null">
|
||||
AND a.creationTime BETWEEN #{dto.startTime} AND #{dto.endTime}
|
||||
</if>
|
||||
<if test="dto.keyWords != null and dto.keyWords != ''">
|
||||
AND(
|
||||
b.F_PostName like CONCAT('%',#{dto.keyWords},'%') or
|
||||
a.mapName like CONCAT('%',#{dto.keyWords},'%') or
|
||||
a.mapID like CONCAT('%',#{dto.keyWords},'%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
a.id,me.F_OrgId
|
||||
ORDER BY
|
||||
a.creationTime DESC
|
||||
) b
|
||||
WHERE
|
||||
b.enableOrgName IS NOT NULL
|
||||
</select>
|
||||
<!--查询个人列表的智慧统计信息,并进行分页显示-->
|
||||
<select id="personListStatistics"
|
||||
resultType="jnpf.model.cultivate.vo.promotion.FtbCultivateMapsPersonWisdomStatisticVO">
|
||||
SELECT
|
||||
me.F_Id,
|
||||
me.F_PromotionId promotionId,
|
||||
me.F_TenantId,
|
||||
me.F_CreatorUserId,
|
||||
me.F_CreatorTime creationTime,
|
||||
me.F_LastModifyUserId,
|
||||
me.F_LastModifyTime,
|
||||
me.F_DeleteUserId,
|
||||
me.F_DeleteTime,
|
||||
me.F_OrgId,
|
||||
me.F_OrgName organization,
|
||||
me.F_PositionName initialPosition,
|
||||
CASE
|
||||
WHEN me.F_GradeName IS NOT NULL AND me.F_GradeName != ''
|
||||
THEN concat(me.F_PositionName,"_",me.F_GradeName)
|
||||
ELSE me.F_PositionName
|
||||
END employeeSCurrentPosition,
|
||||
me.F_UserId employeeID,
|
||||
me.F_UserName fullName,
|
||||
pr.F_PromotionBusinessId as mapID,
|
||||
pr.F_Promotion currentlyEnabledMapName
|
||||
FROM
|
||||
ftb_cultivate_promotion_member_new AS me
|
||||
INNER JOIN ftb_cultivate_promotion_new AS pr ON pr.F_Id = me.F_PromotionId
|
||||
INNER JOIN (
|
||||
SELECT DISTINCT
|
||||
me.F_UserId,
|
||||
me.F_PromotionId,
|
||||
me.F_OrgId,
|
||||
me.F_OrgName
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a
|
||||
JOIN ftb_cultivate_position_course b ON a.F_CourceId = b.F_CourseId
|
||||
JOIN ftb_cultivate_promotion_member_new AS me ON me.F_UserId = a.F_UserId
|
||||
JOIN ftb_cultivate_course as course ON b.F_CourseId = course.F_Id
|
||||
WHERE
|
||||
(me.F_DeleteMark is null or me.F_DeleteMark = 0) and
|
||||
b.F_EnabledMark = 0
|
||||
AND a.F_EnabledMark = 0
|
||||
AND course.F_EnabledMark = 0
|
||||
AND a.F_state IN ( 1, 2 )
|
||||
GROUP BY
|
||||
me.F_UserId,
|
||||
me.F_PromotionId
|
||||
) a on a.F_UserId =me.F_UserId
|
||||
<where>
|
||||
pr.F_EnableMark=0
|
||||
<if test="dto.mapId != null">
|
||||
and pr.F_Id =#{dto.mapId}
|
||||
</if>
|
||||
<if test="dto.keyWords != null and dto.keyWords != ''">
|
||||
and
|
||||
(
|
||||
me.F_UserName like CONCAT('%',#{dto.keyWords},'%') or
|
||||
me.F_PositionName like CONCAT('%',#{dto.keyWords},'%') or
|
||||
me.F_GradeName like CONCAT('%',#{dto.keyWords},'%') or
|
||||
me.F_OrgName like CONCAT('%',#{dto.keyWords},'%') or
|
||||
pr.F_Promotion like CONCAT('%',#{dto.keyWords},'%') or
|
||||
pr.F_PromotionBusinessId like CONCAT('%',#{dto.keyWords},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="dto.startTime != null and dto.endTime != null">
|
||||
and me.F_CreatorTime between #{dto.startTime} and #{dto.endTime}
|
||||
</if>
|
||||
|
||||
<if test="dto.selectPeoples != null and dto.selectPeoples.size() > 0">
|
||||
and me.F_UserId in
|
||||
<foreach collection="dto.selectPeoples" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.iniPostId != null and dto.iniPostId !=''">
|
||||
AND me.F_PositionId =#{dto.iniPostId}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
GROUP BY me.F_UserId,pr.F_Id
|
||||
</select>
|
||||
<select id="queryStudyMapList" resultType="jnpf.model.cultivate.vo.promotion.FtbCultivateMapSimpleDto">
|
||||
select cpn.F_id as promotionId,cpn.F_Promotion as promotionName, cpn.F_CreatorTime as creatorTime,cppn.F_PostId as postId,cpn.F_PromotionBusinessId as promotionBusinessId
|
||||
from ftb_cultivate_promotion_new as cpn join ftb_cultivate_promotion_post_new as cppn on cpn.F_id = cppn.F_PromotionId WHERE
|
||||
cpn.F_EnableMark=0 and cppn.F_Level = 1
|
||||
<if test="dto.keyWords != null and dto.keyWords != ''">
|
||||
AND(
|
||||
cpn.F_Promotion like CONCAT('%',#{dto.keyWords},'%') or
|
||||
cpn.F_PromotionBusinessId = #{dto.keyWords}
|
||||
)
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="queryStudyUser" resultType="jnpf.model.cultivate.vo.promotion.FtbCultivateMapStudyUserDto">
|
||||
SELECT DISTINCT
|
||||
me.F_UserId as userId,
|
||||
me.F_PromotionId as promotionId,
|
||||
me.F_PositionId as postId
|
||||
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a
|
||||
JOIN ftb_cultivate_position_course b ON a.F_CourceId = b.F_CourseId
|
||||
JOIN ftb_cultivate_promotion_member_new AS me ON me.F_UserId = a.F_UserId
|
||||
JOIN ftb_cultivate_course as course ON b.F_CourseId = course.F_Id
|
||||
WHERE
|
||||
b.F_EnabledMark = 0 and (me.F_DeleteMark is null or me.F_DeleteMark = 0 ) and a.F_EnabledMark = 0
|
||||
AND course.F_EnabledMark = 0
|
||||
AND a.F_state IN ( 1, 2 )
|
||||
|
||||
<if test="queryPromotionIds != null and queryPromotionIds.size() > 0">
|
||||
and me.F_PromotionId in
|
||||
<foreach collection="queryPromotionIds" item="promotionId" open="(" separator="," close=")">
|
||||
#{promotionId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="queryMapPostNum" resultType="jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionLevelMapVO">
|
||||
select F_PromotionId as promotionId,F_PostId as postId from ftb_cultivate_promotion_post_new where F_PromotionId in
|
||||
<foreach collection="queryPromotionIds" item="promotionId" open="(" separator="," close=")">
|
||||
#{promotionId}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePromotionMemberMapper">
|
||||
|
||||
<!--根据用户ID查询用户的推广信息-->
|
||||
<select id="queryPromotionByUserOrPostId" resultMap="jnpf.cultivate.mapper.FtbCultivatePromotionMapper.promotionMap">
|
||||
SELECT
|
||||
DISTINCT
|
||||
pr.F_Id AS id,
|
||||
pr.F_Promotion AS promotion,
|
||||
pr.F_PromotionBusinessId AS promotionBusinessId,
|
||||
pr.F_LastModifyTime AS lastModifyTime,
|
||||
pr.F_CreatorTime AS creatorTime,
|
||||
po.F_PostId channelIniPoId,
|
||||
po.F_PostName channelIniName
|
||||
FROM
|
||||
ftb_cultivate_promotion AS pr
|
||||
<if test="userId != null ">
|
||||
inner join ftb_cultivate_promotion_member AS me ON pr.F_Id = me.F_PromotionId
|
||||
</if>
|
||||
<if test="postId != null ">
|
||||
inner join ftb_cultivate_promotion_post AS po ON pr.F_Id = po.F_PromotionId
|
||||
</if>
|
||||
<where>
|
||||
pr.F_EnableMark=0
|
||||
<if test="postId != null ">
|
||||
and po.F_PostId =#{postId}
|
||||
</if>
|
||||
<if test="userId != null ">
|
||||
AND me.F_UserId =#{userId}
|
||||
and me.F_EnableStatus=1
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
pr.F_Promotion
|
||||
</select>
|
||||
<!--根据用户ID和帖子ID查询推广信息-->
|
||||
<select id="queryPromotionByUser" resultMap="jnpf.cultivate.mapper.FtbCultivatePromotionMapper.promotionMap">
|
||||
SELECT
|
||||
DISTINCT
|
||||
pr.F_Id AS id,
|
||||
pr.F_Promotion AS promotion,
|
||||
pr.F_PromotionBusinessId AS promotionBusinessId,
|
||||
pr.F_LastModifyTime AS lastModifyTime,
|
||||
pr.F_CreatorTime AS creatorTime,
|
||||
po.F_PostId channelIniPoId,
|
||||
po.F_PostName channelIniName
|
||||
FROM
|
||||
ftb_cultivate_promotion AS pr
|
||||
left JOIN ftb_cultivate_promotion_member AS me ON pr.F_Id = me.F_PromotionId
|
||||
inner join ftb_cultivate_promotion_post AS po ON pr.F_Id = po.F_PromotionId
|
||||
<where>
|
||||
pr.F_EnableMark=0
|
||||
and po.F_PostId =#{postId}
|
||||
AND me.F_UserId =#{userId}
|
||||
and me.F_EnableStatus=1
|
||||
</where>
|
||||
ORDER BY
|
||||
pr.F_Promotion
|
||||
</select>
|
||||
|
||||
<!--此方法用于根据特定的用户ID-->
|
||||
<select id="queryUserInfo" resultType="jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionMemberVO">
|
||||
SELECT
|
||||
DISTINCT
|
||||
me.F_PromotionId promotionId,
|
||||
pr.F_Promotion promotionName,
|
||||
me.F_state state
|
||||
FROM
|
||||
ftb_cultivate_promotion AS pr
|
||||
inner JOIN ftb_cultivate_promotion_member AS me ON pr.F_Id = me.F_PromotionId
|
||||
inner join ftb_cultivate_promotion_post AS po ON pr.F_Id = po.F_PromotionId
|
||||
<where>
|
||||
pr.F_EnableMark=0
|
||||
AND me.F_UserId =#{userId}
|
||||
</where>
|
||||
</select>
|
||||
<!--查询已存在的帖子列表-->
|
||||
<select id="queryPostHasExist" resultType="jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionPostVO">
|
||||
SELECT post.F_PostId as postId,
|
||||
post.F_PostName as postName,
|
||||
post.F_Level as channelLevel,
|
||||
post.F_PromotionId as promotionId
|
||||
FROM ftb_cultivate_promotion AS pro
|
||||
INNER JOIN ftb_cultivate_promotion_post AS post ON pro.F_Id = post.F_PromotionId
|
||||
WHERE pro.F_EnableMark = 0
|
||||
ORDER BY post.F_PromotionId, post.F_Level
|
||||
</select>
|
||||
<!--根据用户ID查询用户的推广信息-->
|
||||
<select id="queryPromotionByUserOrOrgId" resultType="jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionVO">
|
||||
SELECT
|
||||
DISTINCT
|
||||
pr.F_Id AS id,
|
||||
pr.F_Promotion AS promotion,
|
||||
pr.F_PromotionBusinessId AS promotionBusinessId,
|
||||
pr.F_LastModifyTime AS lastModifyTime,
|
||||
pr.F_CreatorTime AS creatorTime,
|
||||
po.F_PostId channelIniPoId,
|
||||
po.F_PostName channelIniName
|
||||
FROM
|
||||
ftb_cultivate_promotion AS pr
|
||||
inner join ftb_cultivate_promotion_member AS me ON pr.F_Id = me.F_PromotionId
|
||||
inner join ftb_cultivate_promotion_post AS po ON pr.F_Id = po.F_PromotionId
|
||||
<where>
|
||||
pr.F_EnableMark=0
|
||||
and me.F_OrgId =#{OrgId}
|
||||
<if test="userId != null ">
|
||||
AND me.F_UserId =#{userId}
|
||||
and me.F_EnableStatus=1
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
pr.F_Promotion
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePromotionMemberNewMapper">
|
||||
<!--查询当前人的学习地图等级-->
|
||||
<select id="queryTheCurrentUserLearningMapLevel" resultType="java.lang.Integer">
|
||||
SELECT DISTINCT
|
||||
me.F_CurrentLearningStage
|
||||
FROM
|
||||
ftb_cultivate_promotion_post_new AS post
|
||||
INNER JOIN ftb_cultivate_promotion_member_new AS me ON post.F_PromotionId = me.F_PromotionId
|
||||
WHERE
|
||||
(me.F_DeleteMark is null or me.F_DeleteMark = 0)
|
||||
and me.F_UserId = #{userId}
|
||||
AND post.F_PostId = #{postId}
|
||||
and me.F_PromotionId = #{promtionId}
|
||||
AND post.F_Level = 1
|
||||
ORDER BY me.F_CurrentLearningStage DESC limit 1
|
||||
</select>
|
||||
<select id="selectStudyStep" resultType="jnpf.model.cultivate.po.promotion.FtbCultivatePromotionMemberNew">
|
||||
select F_Id as id, F_PromotionId as promotionId, F_UserId as userId, F_UserName as userName, F_OrgId as orgId, F_OrgName as orgName, F_PositionId as positionId, F_PositionName as positionName, F_GradeId as gradeId, F_GradeName as gradeName, F_CurrentLearningStage as currentLearningStage
|
||||
from ftb_cultivate_promotion_member_new
|
||||
where (F_DeleteMark is null or F_DeleteMark = 0) and F_UserId = #{userId} and F_PositionId = #{mainPositionId}
|
||||
</select>
|
||||
<select id="queryHasStudyMap" resultType="java.lang.String">
|
||||
select prop.F_Id from ftb_cultivate_promotion_new as prop join ftb_cultivate_promotion_post_new as prop_post on prop.F_Id = prop_post.F_PromotionId
|
||||
WHERE prop.F_EnableMark=0 and prop_post.F_PostId=#{mainPositionId} and prop_post.F_Level=1
|
||||
</select>
|
||||
<select id="queryCurrLevel" resultType="java.lang.Integer">
|
||||
select DISTINCT F_CurrentLearningStage as currentLearningStage
|
||||
from ftb_cultivate_promotion_member_new
|
||||
where (F_DeleteMark is null or F_DeleteMark = 0) and F_UserId = #{userId} and F_PromotionId = #{pomotionId} limit 1
|
||||
</select>
|
||||
<select id="queryRelationMap" resultType="jnpf.model.cultivate.po.promotion.FtbCultivatePromotionPostNew">
|
||||
select F_PromotionId as promotionId,
|
||||
F_PostId as postId,
|
||||
F_PostName as postName,
|
||||
F_GradeId as gradeId,
|
||||
F_GradeName as gradeName
|
||||
from ftb_cultivate_promotion_post_new
|
||||
where F_PostId = #{postId}
|
||||
</select>
|
||||
|
||||
<select id="queryMyCurrentPhase" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT F_PromotionId as selectKey, MAX(CONVERT(F_CurrentLearningStage, SIGNED)) as num
|
||||
FROM ftb_cultivate_promotion_member_new
|
||||
WHERE
|
||||
F_DeleteMark = 0
|
||||
<if test="promotionIds != null">
|
||||
and F_PromotionId IN
|
||||
<foreach collection="promotionIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
and F_UserId = #{userId}
|
||||
|
||||
GROUP BY F_PromotionId
|
||||
</select>
|
||||
|
||||
<select id="queryMyAllSelectPosition" resultType="jnpf.model.cultivate.po.promotion.FtbCultivatePromotionMemberNew">
|
||||
select F_Id as id,
|
||||
F_PromotionId as promotionId,
|
||||
F_PromotionPostId as promotionPostId,
|
||||
F_UserId as userId,
|
||||
F_CurrentLearningStage as currentLearningStage
|
||||
from ftb_cultivate_promotion_member_new
|
||||
where (F_DeleteMark is null or F_DeleteMark = 0) and F_UserId = #{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,619 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePromotionNewMapper">
|
||||
<!--获取培养推广列表-->
|
||||
<select id="getList" resultType="jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionNewVO">
|
||||
SELECT
|
||||
a.*,
|
||||
b.channelIniPoId,
|
||||
b.channelIniName,
|
||||
c.postChannelLevelNumber
|
||||
FROM
|
||||
(
|
||||
SELECT DISTINCT
|
||||
pr.F_Id AS id,
|
||||
pr.F_Promotion AS promotion,
|
||||
pr.F_PromotionBusinessId AS promotionBusinessId,
|
||||
pr.F_LastModifyTime AS lastModifyTime,
|
||||
pr.F_CreatorTime AS creatorTime
|
||||
FROM
|
||||
ftb_cultivate_promotion_new AS pr
|
||||
LEFT JOIN ftb_cultivate_promotion_post_new AS po ON pr.F_Id = po.F_PromotionId
|
||||
<where>
|
||||
pr.F_EnableMark=0
|
||||
<if test="dto.postId != null and dto.postId !=''">
|
||||
and po.F_PostId =#{dto.postId}
|
||||
</if>
|
||||
<if test="dto.keyWord != null and dto.keyWord !=''">
|
||||
and ( pr.F_Promotion like CONCAT('%',#{dto.keyWord},'%')
|
||||
or pr.F_PromotionBusinessId like CONCAT('%',#{dto.keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="dto.promotionId != null and dto.promotionId !=''">
|
||||
AND pr.F_Id =#{dto.promotionId}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
pr.F_Id
|
||||
) AS a
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
pr.F_Id,
|
||||
po.F_PostId channelIniPoId,
|
||||
po.F_PostName channelIniName
|
||||
FROM
|
||||
ftb_cultivate_promotion_new AS pr
|
||||
LEFT JOIN ftb_cultivate_promotion_post_new AS po ON pr.F_Id = po.F_PromotionId
|
||||
WHERE
|
||||
pr.F_EnableMark = 0
|
||||
AND po.F_Level = 1
|
||||
) AS b ON a.id = b.F_Id
|
||||
INNER JOIN (
|
||||
SELECT DISTINCT
|
||||
pr.F_Id AS id,
|
||||
COUNT( DISTINCT po.F_Level ) AS postChannelLevelNumber
|
||||
FROM
|
||||
ftb_cultivate_promotion_new AS pr
|
||||
LEFT JOIN ftb_cultivate_promotion_post_new AS po ON pr.F_Id = po.F_PromotionId
|
||||
WHERE
|
||||
pr.F_EnableMark = 0
|
||||
GROUP BY
|
||||
pr.F_Id
|
||||
) c ON a.id = c.id
|
||||
ORDER BY
|
||||
a.creatorTime DESC,
|
||||
a.lastModifyTime DESC
|
||||
</select>
|
||||
<!--查询学习范围-->
|
||||
<select id="queryStudyScope" resultType="java.lang.Integer">
|
||||
SELECT count(DISTINCT F_PostId) as count FROM ftb_cultivate_promotion_post_new WHERE F_PromotionId =#{id}
|
||||
</select>
|
||||
|
||||
|
||||
<!--获取培养推广列表-->
|
||||
<select id="getThePositionThisPersonHasChosen"
|
||||
resultType="jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionMeberPostInfo">
|
||||
SELECT DISTINCT
|
||||
me.F_UserId userId,
|
||||
me.F_UserName userName,
|
||||
post.F_PostId postId,
|
||||
post.F_PostName postName
|
||||
FROM
|
||||
`ftb_cultivate_promotion_member_new` AS me
|
||||
LEFT JOIN ftb_cultivate_promotion_post_new AS post ON
|
||||
me.F_PromotionPostId = post.F_Id
|
||||
WHERE
|
||||
me.F_PromotionId = #{id} and me.F_DeleteMark=0
|
||||
</select>
|
||||
|
||||
<!--查询用户选择的岗位-->
|
||||
<select id="queryUserChosesPosts" resultType="java.lang.String">
|
||||
SELECT
|
||||
DISTINCT post.F_PostName
|
||||
FROM
|
||||
ftb_cultivate_promotion_member_new AS me
|
||||
INNER JOIN ftb_cultivate_promotion_post_new AS post ON me.F_PromotionId = post.F_PromotionId
|
||||
AND me.F_PromotionPostId = post.F_Id
|
||||
WHERE
|
||||
me.F_PromotionId = #{id} and me.F_DeleteMark=0
|
||||
AND me.F_UserId = #{userId}
|
||||
UNION
|
||||
SELECT
|
||||
po.F_PostName
|
||||
FROM
|
||||
ftb_cultivate_promotion_new AS pr
|
||||
INNER JOIN ftb_cultivate_promotion_post_new AS po ON pr.F_Id = po.F_PromotionId
|
||||
WHERE
|
||||
pr.F_EnableMark = 0
|
||||
AND po.F_Level = 1
|
||||
AND pr.F_Id = #{id}
|
||||
</select>
|
||||
<!--基于岗位查看学习地图-->
|
||||
<select id="viewLearningMapBasedOnPosition"
|
||||
resultType="jnpf.model.cultivate.vo.promotion.FtbCultivateLearnMapInfoVO">
|
||||
SELECT
|
||||
DISTINCT a.*,
|
||||
CASE
|
||||
|
||||
WHEN c.F_Id IS NOT NULL THEN
|
||||
"1"
|
||||
WHEN c.F_Id IS NULL THEN
|
||||
"0"
|
||||
END selectLogo
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
intMe.*
|
||||
FROM
|
||||
( SELECT post.F_PromotionId FROM ftb_cultivate_promotion_post_new AS post
|
||||
WHERE post.F_PostId = #{postId} AND post.F_Level = 1 ) AS intPo
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
post.F_Id as studyMapJobId,
|
||||
post.F_PostId postId,
|
||||
post.F_PostName postName,
|
||||
post.F_PromotionId as promotionId
|
||||
FROM
|
||||
ftb_cultivate_promotion_post_new AS post
|
||||
LEFT JOIN ftb_cultivate_promotion_member_new AS me ON post.F_Id = me.F_PromotionPostId
|
||||
WHERE
|
||||
(me.F_DeleteMark is null or me.F_DeleteMark = 0) and
|
||||
post.F_Level = #{level}
|
||||
) AS intMe ON intPo.F_PromotionId = intMe.promotionId
|
||||
) a
|
||||
LEFT JOIN ( SELECT b.* FROM ftb_cultivate_promotion_member_new AS b WHERE b.F_UserId = #{userId} and b.F_DeleteMark=0) c ON a.studyMapJobId = c.F_PromotionPostId
|
||||
|
||||
</select>
|
||||
<!--查询用户选择的岗位及其ID-->
|
||||
<select id="queryUserChosesPostsWitId" resultType="java.util.Map">
|
||||
SELECT
|
||||
post.F_PostName as postName,
|
||||
post.F_PostId as postId,
|
||||
me.F_CurrentLearningStage as currentLearningStage
|
||||
FROM
|
||||
ftb_cultivate_promotion_member_new AS me
|
||||
INNER JOIN ftb_cultivate_promotion_post_new AS post ON me.F_PromotionId = post.F_PromotionId
|
||||
AND me.F_PromotionPostId = post.F_Id
|
||||
WHERE
|
||||
me.F_PromotionId = #{promotionId} and me.F_DeleteMark=0
|
||||
AND me.F_UserId = #{userId}
|
||||
<if test="level != null">
|
||||
AND post.F_Level = #{level}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--查询用户选择的岗位及其ID-->
|
||||
<select id="queryUserChosesPositionIdWidthId" resultType="jnpf.model.cultivate.dto.course.FtbCultivateSelectPositionDto">
|
||||
SELECT
|
||||
post.F_PostName as postName,
|
||||
post.F_PostId as postId,
|
||||
me.F_CurrentLearningStage as currentLearningStage
|
||||
FROM
|
||||
ftb_cultivate_promotion_member_new AS me
|
||||
INNER JOIN ftb_cultivate_promotion_post_new AS post ON me.F_PromotionId = post.F_PromotionId
|
||||
AND me.F_PromotionPostId = post.F_Id
|
||||
WHERE
|
||||
me.F_PromotionId = #{promotionId} and me.F_DeleteMark=0
|
||||
AND me.F_UserId = #{userId}
|
||||
</select>
|
||||
<!--查询推广活动的阶段数量-->
|
||||
<select id="queryHowManyStages" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT( DISTINCT po.F_Level ) AS postChannelLevelNumber
|
||||
FROM
|
||||
ftb_cultivate_promotion_new AS pr
|
||||
LEFT JOIN ftb_cultivate_promotion_post_new AS po ON pr.F_Id = po.F_PromotionId
|
||||
WHERE
|
||||
pr.F_EnableMark = 0
|
||||
AND pr.F_Id =#{promotionId}
|
||||
|
||||
</select>
|
||||
<!--在职学习课程查询-->
|
||||
<select id="onTheJobLearningCourse" resultType="jnpf.model.cultivate.vo.course.app.FtbGlobalCurriculumAppVO">
|
||||
SELECT a.F_CourseId as courseId,b.F_Name as courseName,b.F_Highlights as courseHighlights,c.F_state as learnState,
|
||||
a.F_PostRankId as postId
|
||||
FROM ftb_cultivate_position_course a JOIN ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
JOIN ftb_cultivate_position_cource_learning c ON a.F_CourseId=c.F_CourceId
|
||||
join ftb_cultivate_position d on d.F_Id=a.F_PostLearnId
|
||||
WHERE a.F_EnabledMark = 0 AND b.F_EnabledMark = 0 and c.F_EnabledMark = 0
|
||||
and b.F_IsGrounding = 1 and d.F_EnabledMark = 0
|
||||
and d.F_IsGrounding = 1
|
||||
and b.F_Label = 2
|
||||
and c.F_UserId = #{userId} and
|
||||
<foreach collection="postIds" item="item" open="(" close=")" separator="OR">
|
||||
a.F_PostRankId = #{item}
|
||||
</foreach>
|
||||
<if test="compulsory != null ">
|
||||
and a.F_Compulsory = #{compulsory}
|
||||
</if>
|
||||
GROUP BY a.F_CourseId
|
||||
order by c.F_state ASC
|
||||
</select>
|
||||
|
||||
<select id="onTheJobLearningCourseNew" resultType="jnpf.model.cultivate.vo.course.app.FtbGlobalCurriculumAppVO">
|
||||
SELECT
|
||||
DISTINCT a.F_CourseId as courseId,
|
||||
b.F_Name as courseName,
|
||||
b.F_Highlights as courseHighlights,
|
||||
IFNULL(
|
||||
(SELECT F_state FROM ftb_cultivate_position_cource_learning AS c
|
||||
WHERE a.F_CourseId = c.F_CourceId AND c.F_UserId = #{userId} AND c.F_EnabledMark = 0),
|
||||
0
|
||||
) AS learnState,
|
||||
a.F_PostRankId as postId
|
||||
FROM ftb_cultivate_position_course a
|
||||
JOIN ftb_cultivate_course b ON a.F_CourseId = b.F_Id
|
||||
JOIN ftb_cultivate_position d ON d.F_Id = a.F_PostLearnId
|
||||
|
||||
WHERE a.F_EnabledMark = 0 AND b.F_EnabledMark = 0
|
||||
and b.F_IsGrounding = 1 and d.F_EnabledMark = 0
|
||||
and d.F_IsGrounding = 1
|
||||
and b.F_Label = 2
|
||||
and
|
||||
<foreach collection="postIds" item="item" open="(" close=")" separator="OR">
|
||||
a.F_PostRankId = #{item}
|
||||
</foreach>
|
||||
<if test="compulsory != null ">
|
||||
and a.F_Compulsory = #{compulsory}
|
||||
</if>
|
||||
GROUP BY a.F_CourseId order by learnState asc
|
||||
</select>
|
||||
<!--基于岗位ID查询已选人员-->
|
||||
<select id="querySelectedPersonnelBasedOnPositionID" resultType="java.lang.String">
|
||||
SELECT DISTINCT
|
||||
me.F_UserId
|
||||
FROM
|
||||
ftb_cultivate_promotion_post_new AS post
|
||||
INNER JOIN ftb_cultivate_promotion_member_new AS me ON post.F_PromotionId = me.F_PromotionId
|
||||
WHERE
|
||||
(me.F_DeleteMark is null or me.F_DeleteMark = 0) and
|
||||
post.F_PostId in
|
||||
<foreach collection="postIds" item="postId" open="(" close=")" separator=",">
|
||||
#{postId}
|
||||
</foreach>
|
||||
</select>
|
||||
<!--查询实践考核学习数量-->
|
||||
<select id="queryTheNumberOfPracticalAppraisalStudies" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(0)
|
||||
FROM
|
||||
ftb_cultivate_position_identify_result AS re
|
||||
INNER JOIN ftb_cultivate_identify_apply AS apy ON re.F_IdentifyRecordId = apy.F_Id
|
||||
INNER JOIN ftb_cultivate_identify_apply_table_backups AS item ON apy.F_TableId = item.F_Id
|
||||
WHERE apy.F_BeIdentifyUserId =#{userId}
|
||||
<if test="studyPostIds != null and studyPostIds.size() > 0">
|
||||
AND re.F_PostRankId in
|
||||
<foreach collection="studyPostIds" item="item" open="(" close=")" separator="OR">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
AND apy.F_Id in
|
||||
<foreach collection="isAPracticalAppraisalIds" item="item" open="(" close=")" separator="OR">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="learningMapSetting == 0">
|
||||
AND apy.F_Status = 1
|
||||
</if>
|
||||
<if test="learningMapSetting == 1">
|
||||
AND apy.F_Status = 1
|
||||
AND apy.F_Result in ( 0,1)
|
||||
</if>
|
||||
|
||||
AND apy.F_DeleteMark=0
|
||||
</select>
|
||||
<!--检查岗位是否有考试-->
|
||||
<select id="checkIfThereAreExamsForThisPosition" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
ftb_cultivate_position_exam a
|
||||
JOIN ftb_cultivate_position b ON a.F_PostLearnId = b.F_Id
|
||||
WHERE
|
||||
a.F_EnabledMark = 0
|
||||
AND b.F_EnabledMark = 0
|
||||
AND a.F_PostRankId = #{postId}
|
||||
</select>
|
||||
<!--检查岗位是否有实践考核-->
|
||||
<select id="checkWhetherThereIsAPracticalAppraisal" resultType="java.lang.String">
|
||||
SELECT
|
||||
a.F_IdentifyId
|
||||
FROM
|
||||
ftb_cultivate_position_exam_identify a
|
||||
JOIN ftb_cultivate_position b ON a.F_PostLearnId = b.F_Id
|
||||
WHERE
|
||||
a.F_EnabledMark = 0
|
||||
AND b.F_EnabledMark = 0
|
||||
AND a.F_PostRankId = #{postId}
|
||||
</select>
|
||||
<!--查询用户选择的岗位ID-->
|
||||
<select id="queryChosePostId" resultType="java.lang.String">
|
||||
SELECT DISTINCT
|
||||
post.F_PostId,
|
||||
post.F_PostName
|
||||
FROM
|
||||
ftb_cultivate_promotion_member_new AS me
|
||||
INNER JOIN ftb_cultivate_promotion_post_new AS post ON me.F_PromotionId = post.F_PromotionId
|
||||
AND me.F_PromotionPostId = post.F_Id
|
||||
WHERE
|
||||
(me.F_DeleteMark is null or me.F_DeleteMark = 0) and
|
||||
me.F_PromotionId = #{id}
|
||||
AND me.F_UserId = #{userId}
|
||||
UNION
|
||||
SELECT
|
||||
po.F_PostId,
|
||||
po.F_PostName
|
||||
FROM
|
||||
ftb_cultivate_promotion_new AS pr
|
||||
INNER JOIN ftb_cultivate_promotion_post_new AS po ON pr.F_Id = po.F_PromotionId
|
||||
WHERE
|
||||
pr.F_EnableMark = 0
|
||||
AND po.F_Level = 1
|
||||
AND pr.F_Id = #{id}
|
||||
</select>
|
||||
<!--查询用户学习过的岗位信息-->
|
||||
<select id="queryTheUserSLearnedPositionInformation"
|
||||
resultType="jnpf.model.cultivate.po.promotion.FtbCultivatePromotionMemberNew">
|
||||
SELECT DISTINCT
|
||||
me.F_UserId userId,
|
||||
CONCAT(me.F_OrgName,'_',me.F_PositionName,'_',me.F_GradeName) as organizationInformation,
|
||||
CONCAT(me.F_PositionName,'(',me.F_GradeName,')') as postInfo,
|
||||
me.F_CurrentLearningStage currentLearningStage,
|
||||
me.F_UserName userName
|
||||
FROM
|
||||
ftb_cultivate_position_cource_learning a
|
||||
JOIN ftb_cultivate_position_course b ON a.F_CourceId = b.F_CourseId
|
||||
JOIN ftb_cultivate_promotion_member_new AS me ON me.F_UserId = a.F_UserId
|
||||
JOIN ftb_cultivate_promotion_post_new AS po ON me.F_PromotionId = po.F_PromotionId
|
||||
JOIN ftb_cultivate_course as course ON b.F_CourseId = course.F_Id
|
||||
WHERE
|
||||
b.F_EnabledMark = 0 and me.F_DeleteMark = 0 and a.F_EnabledMark=0
|
||||
AND course.F_EnabledMark = 0
|
||||
AND a.F_state IN ( 1, 2 )
|
||||
AND me.F_PositionId =#{channelIniId}
|
||||
AND po.F_PostId =#{channelIniId}
|
||||
AND po.F_Level =1
|
||||
AND me.F_PromotionId =#{id}
|
||||
</select>
|
||||
<!--查询学习过的岗位ID-->
|
||||
<select id="doQueryTheLearnedPositionIdFirst" resultType="java.util.Map">
|
||||
SELECT a.F_PostRankId as postId,GROUP_CONCAT(a.F_CourseId) as courseIds
|
||||
FROM ftb_cultivate_position_course a JOIN ftb_cultivate_course b ON a.F_CourseId = b.F_Id WHERE a.F_EnabledMark = 0
|
||||
AND b.F_EnabledMark = 0 and b.F_IsGrounding = 1
|
||||
<if test="postId != null and postId != ''">
|
||||
AND a.F_PostRankId =#{postId}
|
||||
</if>
|
||||
AND b.F_Label = 2
|
||||
and a.F_Compulsory = 0
|
||||
GROUP BY a.F_PostRankId
|
||||
</select>
|
||||
<!--查询用户学习进度-->
|
||||
<select id="doQueryTheLearnedPositionIdSecond" resultType="java.lang.Integer">
|
||||
SELECT COUNT(distinct a.F_CourceId)
|
||||
FROM ftb_cultivate_position_cource_learning a join ftb_cultivate_course b on a.F_CourceId = b.F_Id
|
||||
<where>
|
||||
a.F_UserId = #{userId} and b.F_EnabledMark = 0 and b.F_IsGrounding = 1 and a.F_EnabledMark = 0
|
||||
AND a.F_CourceId IN
|
||||
<foreach collection="studyPostIds" separator="," open="(" close=")" item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="state !=null and state.size() > 0">
|
||||
and a.F_state in
|
||||
<foreach collection="state" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!--查询推广活动的岗位ID列表-->
|
||||
<select id="queryMapPostId" resultType="java.lang.String">
|
||||
SELECT DISTINCT
|
||||
po.F_PostId
|
||||
FROM
|
||||
ftb_cultivate_promotion_post_new AS po
|
||||
LEFT JOIN ftb_cultivate_promotion_new AS pr ON pr.F_Id = po.F_PromotionId
|
||||
WHERE
|
||||
pr.F_Id = #{promotionId}
|
||||
</select>
|
||||
<!--检查岗位是否有课程-->
|
||||
<select id="checkIfThePositionHasCourses" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count( 0 )
|
||||
FROM
|
||||
ftb_cultivate_position_course AS po
|
||||
INNER JOIN ftb_cultivate_course AS co ON po.F_CourseId = co.F_Id
|
||||
WHERE
|
||||
co.F_EnabledMark = 0
|
||||
AND po.F_EnabledMark = 0
|
||||
AND co.F_IsGrounding = 1
|
||||
AND po.F_PostRankId = #{postId}
|
||||
</select>
|
||||
<!--查询用户学习进度-->
|
||||
<select id="doQueryTheLearnedPositionIdSecondNew" resultType="jnpf.model.personnels.vo.apply.FtbPersonnelsCourseVO">
|
||||
SELECT COUNT(distinct a.F_CourceId) as count,
|
||||
a.F_UserId as userId
|
||||
FROM ftb_cultivate_position_cource_learning a join ftb_cultivate_course b on a.F_CourceId = b.F_Id
|
||||
<where>
|
||||
b.F_EnabledMark = 0 and b.F_IsGrounding = 1 and a.F_EnabledMark = 0
|
||||
AND a.F_CourceId IN
|
||||
<foreach collection="studyPostIds" separator="," open="(" close=")" item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="state !=null and state.size() > 0">
|
||||
and a.F_state in
|
||||
<foreach collection="state" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userIds !=null and userIds.size() > 0">
|
||||
and a.F_UserId IN
|
||||
<foreach collection="userIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
group by a.F_UserId
|
||||
</select>
|
||||
<!--检查岗位是否有实践考核-->
|
||||
<select id="checkWhetherThereIsAPracticalAppraisalWithNew" resultType="java.lang.String">
|
||||
|
||||
SELECT
|
||||
DISTINCT a.F_IdentifyRecordId
|
||||
FROM
|
||||
ftb_cultivate_position_identify_result a
|
||||
JOIN ftb_cultivate_position b ON a.F_PostLearnId = b.F_Id
|
||||
WHERE
|
||||
a.F_EnabledMark = 0
|
||||
AND b.F_EnabledMark = 0
|
||||
AND a.F_PostRankId = #{postId}
|
||||
AND a.F_UserId = #{userId}
|
||||
and a.F_Type=0
|
||||
ORDER BY a.F_CreatorTime DESC
|
||||
limit 1
|
||||
|
||||
</select>
|
||||
<!--检查岗位是否有考试-->
|
||||
<select id="checkIfThereAreExamsForThisPositionWithNew" resultType="java.lang.String">
|
||||
SELECT
|
||||
F_Id
|
||||
FROM
|
||||
ftb_cultivate_exam_user
|
||||
WHERE
|
||||
F_RelationPositionId = #{postId}
|
||||
AND F_UserId = #{userId}
|
||||
AND F_ExamSource = 2
|
||||
ORDER BY
|
||||
F_CreatorTime DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
<select id="selectPromoteList" resultType="jnpf.model.cultivate.po.promotion.FtbCultivatePromotionPostNew">
|
||||
select F_Id as id,F_PromotionId as promotionId,F_Level as level,F_PostId as postId,F_SelectCourseNumber as selectCourseNumber from ftb_cultivate_promotion_post_new
|
||||
where F_PromotionId = #{pomotionId}
|
||||
order by F_Level asc
|
||||
</select>
|
||||
<select id="selectAllPromoteList"
|
||||
resultType="jnpf.model.cultivate.po.promotion.FtbCultivatePromotionPostNew">
|
||||
select F_Id as id,F_PromotionId as promotionId,F_Level as level,F_PostId as postId,F_SelectCourseNumber as selectCourseNumber from ftb_cultivate_promotion_post_new
|
||||
where F_PromotionId = #{pomotionId}
|
||||
order by F_Level asc
|
||||
</select>
|
||||
|
||||
<select id="countByPositionIds" resultType="jnpf.model.cultivate.v2.promotion.vo.PromotionAndPostVo">
|
||||
SELECT distinct p1.F_Id as promotionId,p1.F_Promotion as promotion, p2.F_PostId as postId
|
||||
FROM ftb_cultivate_promotion_new AS p1
|
||||
LEFT JOIN ftb_cultivate_promotion_post_new p2 ON p1.F_Id = p2.F_PromotionId
|
||||
WHERE p1.F_EnableMark=0
|
||||
AND p2.F_DeleteMark=0
|
||||
AND p2.F_PostId IN
|
||||
<foreach collection="positionIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="webList" resultType="jnpf.model.cultivate.v2.promotion.vo.WebCultivatePromotionListVo">
|
||||
SELECT
|
||||
prop.F_Id AS id,
|
||||
prop.F_Promotion AS promotion,
|
||||
prop.F_PromotionBusinessId AS promotionBusinessId,
|
||||
prop.F_IsError AS isError,
|
||||
prop.F_LastModifyTime AS lastModifyTime,
|
||||
prop.F_CreatorTime AS creatorTime,
|
||||
MAX(prop_post.F_Level) AS phaseNumber
|
||||
FROM
|
||||
ftb_cultivate_promotion_new AS prop
|
||||
left join ftb_cultivate_promotion_post_new AS prop_post ON prop.F_Id = prop_post.F_PromotionId
|
||||
WHERE
|
||||
prop.F_EnableMark = 0
|
||||
AND prop_post.F_DeleteMark = 0
|
||||
<if test="params.keyWord != null and params.keyWord != ''">
|
||||
AND (prop.F_PromotionBusinessId = #{params.keyWord} OR prop.F_Promotion LIKE CONCAT('%', #{params.keyWord},
|
||||
'%'))
|
||||
</if>
|
||||
<if test="params.postId != null and params.postId != ''">
|
||||
AND prop_post.F_PostId = #{params.postId}
|
||||
</if>
|
||||
GROUP BY
|
||||
prop.F_Id
|
||||
ORDER BY prop.F_CreatorTime DESC
|
||||
</select>
|
||||
|
||||
<select id="queryMaxLevel" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT F_PromotionId as selectKey, max(F_Level) as num
|
||||
FROM ftb_cultivate_promotion_post_new
|
||||
WHERE F_DeleteMark = 0
|
||||
<if test="promotionIds != null and promotionIds.size()>0">
|
||||
and F_PromotionId IN
|
||||
<foreach collection="promotionIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY F_PromotionId
|
||||
</select>
|
||||
|
||||
<select id="personStatisticsV2"
|
||||
resultType="jnpf.model.cultivate.v2.promotion.vo.V2CultivatePromotionPersonStatisticVo">
|
||||
SELECT a.F_Id AS promotionId,
|
||||
a.F_Promotion AS promotionName,
|
||||
a.F_PromotionBusinessId AS promotionBusinessId,
|
||||
a.F_CreatorTime AS creationTime,
|
||||
b.F_UserId AS userId
|
||||
FROM ftb_cultivate_promotion_new AS a
|
||||
join ftb_cultivate_promotion_user as b on a.F_Id = b.F_PromotionId
|
||||
where a.F_EnableMark = 0
|
||||
and b.F_EnabledMark = 0
|
||||
<if test="params.keyWord != null and params.keyWord != ''">
|
||||
and (a.F_PromotionBusinessId = #{params.keyWord} OR a.F_Promotion LIKE CONCAT('%', #{params.keyWord}, '%'))
|
||||
</if>
|
||||
|
||||
<if test="userIds != null and userIds.size()>0">
|
||||
and b.F_UserId IN
|
||||
<foreach collection="userIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_CreatorTime between #{params.startTime} and #{params.endTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryPromotionPosition" resultType="jnpf.model.cultivate.v2.position.vo.CultivateUserPositionVo">
|
||||
SELECT
|
||||
p.F_PostId as postId,
|
||||
u.F_UserId as userId
|
||||
FROM ftb_cultivate_promotion_user u
|
||||
INNER JOIN ftb_cultivate_promotion_post_new p ON u.F_PromotionId = p.F_PromotionId
|
||||
WHERE u.F_EnabledMark = 0
|
||||
AND p.F_DeleteMark = 0
|
||||
|
||||
<if test="userIds != null and userIds.size()>0">
|
||||
and u.F_UserId IN
|
||||
<foreach collection="userIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="mapStatisticPageV2"
|
||||
resultType="jnpf.model.cultivate.v2.promotion.vo.V2CultivatePromotionOrgStatisticVo">
|
||||
SELECT
|
||||
a.F_Id AS promotionId,
|
||||
a.F_Promotion AS promotionName,
|
||||
a.F_PromotionBusinessId AS promotionBusinessId,
|
||||
a.F_CreatorTime AS creationTime
|
||||
FROM ftb_cultivate_promotion_new AS a
|
||||
WHERE a.F_EnableMark = 0
|
||||
<if test="params.keyWord != null and params.keyWord != ''">
|
||||
and a.F_Promotion LIKE CONCAT('%', #{params.keyWord}, '%')
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_CreatorTime between #{params.startTime} and #{params.endTime}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="userCountForPromotion" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT F_PromotionId as selectKey, count(F_UserId) as num, GROUP_CONCAT(F_UserId SEPARATOR ',') as userIds
|
||||
FROM ftb_cultivate_promotion_user
|
||||
WHERE F_EnabledMark = 0
|
||||
<if test="userIds!= null and userIds.size()>0">
|
||||
and F_UserId IN
|
||||
<foreach collection="userIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY F_PromotionId
|
||||
</select>
|
||||
|
||||
<select id="queryPositionNumForMap" resultType="jnpf.model.cultivate.dto.learn.BatchCommonCountDto">
|
||||
SELECT F_PromotionId as selectKey, count(F_PostId) as num
|
||||
FROM ftb_cultivate_promotion_post_new
|
||||
WHERE F_DeleteMark = 0
|
||||
<if test="promotionIds != null and promotionIds.size()>0">
|
||||
and F_PromotionId IN
|
||||
<foreach collection="promotionIds" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY F_PromotionId
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePromotionPostApplyMapper">
|
||||
|
||||
<!--获取培养推广岗位申请的分页信息-->
|
||||
<select id="getListInfo" resultType="jnpf.model.cultivate.vo.apply.FtbCultivatePromotionPostApplyVO">
|
||||
SELECT
|
||||
F_Id as id,
|
||||
F_UserName userName,
|
||||
F_UserId userId,
|
||||
F_PromotionReason promotionReason,
|
||||
F_State state,
|
||||
F_Source source,
|
||||
F_PostId postId,
|
||||
F_PostName postName,
|
||||
F_PostRankId postRankId,
|
||||
F_PostRankName postRankName,
|
||||
F_PostPromotionId postPromotionId,
|
||||
F_PostPromotionName postPromotionName,
|
||||
F_PostRankPromotionId postRankPromotionId,
|
||||
F_PostRankPromotionName postRankPromotionName,
|
||||
F_CreatorTime creatorTime,
|
||||
F_LastModifyTime lastModifyTime,
|
||||
F_OrgCurrentId orgCurrentId,
|
||||
F_OrgCurrentName orgCurrentName,
|
||||
F_OrgId orgId,
|
||||
F_OrgName orgName
|
||||
FROM
|
||||
ftb_cultivate_promotion_post_apply
|
||||
<where>
|
||||
<if test="dto.keyWords!= null">
|
||||
(
|
||||
F_UserName LIKE CONCAT('%',#{dto.keyWords},'%') OR
|
||||
F_PostRankName LIKE CONCAT('%',#{dto.keyWords},'%') OR
|
||||
F_PostName LIKE CONCAT('%',#{dto.keyWords},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="dto.flag == 1 ">
|
||||
AND F_CreatorUserId = #{dto.userId}
|
||||
</if>
|
||||
<if test="dto.flag == 2 ">
|
||||
AND F_ReviewUserId = #{dto.userId}
|
||||
ORDER BY F_State asc,F_CreatorTime DESC
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePromotionPostMapper">
|
||||
<resultMap id="promotionMap" type="jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionVO">
|
||||
<id property="id" column="id" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="promotion" column="promotion" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="promotionBusinessId" column="promotionBusinessId" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="channelIniPoId" column="channelIniPoId" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="channelIniName" column="channelIniName" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="lastModifyTime" column="lastModifyTime" jdbcType="DATETIMEOFFSET" javaType="java.util.Date"/>
|
||||
<result property="creatorTime" column="creatorTime" jdbcType="DATETIMEOFFSET" javaType="java.util.Date"/>
|
||||
<collection select="jnpf.cultivate.mapper.FtbCultivatePromotionMapper.promoPostId" property="postChannelLevel" column="id" javaType="java.util.ArrayList"/>
|
||||
</resultMap>
|
||||
<!--查询同一岗位的其他任职信息-->
|
||||
<select id="queryPromonChanOfTheSamePosition"
|
||||
resultMap="promotionMap">
|
||||
SELECT
|
||||
distinct
|
||||
pr.F_Id AS id,
|
||||
pr.F_Promotion AS promotion,
|
||||
pr.F_PromotionBusinessId AS promotionBusinessId,
|
||||
pr.F_LastModifyTime AS lastModifyTime,
|
||||
pr.F_CreatorTime AS creatorTime,
|
||||
po.F_PostId channelIniPoId,
|
||||
po.F_PostName channelIniName
|
||||
FROM
|
||||
ftb_cultivate_promotion AS pr
|
||||
LEFT JOIN ftb_cultivate_promotion_post AS po ON pr.F_Id = po.F_PromotionId AND po.F_Level =1
|
||||
<where>
|
||||
pr.F_EnableMark=0
|
||||
<if test="postId != null">
|
||||
and po.F_PostId =#{postId}
|
||||
</if>
|
||||
<if test="promotionVOId != null">
|
||||
and pr.F_Id not in ( #{promotionVOId} )
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
pr.F_Promotion
|
||||
</select>
|
||||
<!--查询个人下一次晋职信息-->
|
||||
<select id="findOutAboutTheNextPromotion" resultType="jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionPostVO">
|
||||
SELECT
|
||||
p.F_Id as promotionPostId,
|
||||
p.F_PromotionId AS promotionId,
|
||||
p.F_Level as channelLevel,
|
||||
p.F_PostId as postId,
|
||||
p.F_PostName as postName
|
||||
FROM
|
||||
ftb_cultivate_promotion_post AS p
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
po.F_Id,
|
||||
po.F_PromotionId,
|
||||
po.F_PostId,
|
||||
po.F_Level,
|
||||
po.F_PostName
|
||||
FROM
|
||||
ftb_cultivate_promotion_post AS po
|
||||
INNER JOIN ftb_cultivate_promotion_member AS me ON po.F_PromotionId = me.F_PromotionId
|
||||
WHERE
|
||||
po.F_PostId = #{postId}
|
||||
AND me.F_UserId = #{userId}
|
||||
AND me.F_EnableStatus = 1
|
||||
) AS a ON p.F_PromotionId = a.F_PromotionId
|
||||
WHERE
|
||||
p.F_Level = a.F_Level + 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePromotionPostNewMapper">
|
||||
<!--
|
||||
查询配置状态
|
||||
通过给定的岗位ID(postId)和是否为基础岗位(IsGrounding)来判断配置状态
|
||||
结果类型为java.lang.String
|
||||
-->
|
||||
<select id="isConfigured" resultType="java.lang.String">
|
||||
SELECT a.F_CourseId
|
||||
FROM ftb_cultivate_position_course a JOIN ftb_cultivate_position b ON a.F_PostLearnId = b.F_Id
|
||||
join ftb_cultivate_course c on c.F_Id = a.F_CourseId
|
||||
WHERE a.F_PostRankId=#{postId} AND b.F_IsGrounding = 1 and a.F_EnabledMark=0 and b.F_EnabledMark=0
|
||||
and c.F_EnabledMark = 0
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询学习进度
|
||||
根据用户ID(userId)查询学习课程的数量,可选地根据课程ID列表(couseIds)和学习状态(states)进行过滤
|
||||
结果类型为java.lang.Integer
|
||||
-->
|
||||
<select id="learningProgress" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM ftb_cultivate_position_cource_learning WHERE F_UserId = #{userId} and F_EnabledMark=0
|
||||
<if test="couseIds != null and couseIds.size() > 0">
|
||||
and F_CourceId IN
|
||||
<foreach collection="couseIds" item="courseId" open="(" separator="," close=")">
|
||||
#{courseId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="states != null and states.size() > 0">
|
||||
and F_State IN
|
||||
<foreach collection="states" item="state" open="(" separator="," close=")">
|
||||
#{state}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePromotionSettingMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivatePromotionUserMapper">
|
||||
<select id="queryUserForPage" resultType="jnpf.model.cultivate.v2.promotion.vo.V2CultivatePromotionMemberVo">
|
||||
SELECT
|
||||
F_UserId as userId
|
||||
FROM
|
||||
ftb_cultivate_promotion_user
|
||||
WHERE
|
||||
F_PromotionId = #{promotionId}
|
||||
AND F_EnabledMark = 0
|
||||
<if test="queryUserIds != null and queryUserIds.size() > 0 ">
|
||||
and F_UserId in
|
||||
<foreach collection="queryUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryMyAllPromotionList" resultType="jnpf.model.cultivate.v2.promotion.vo.MyCultivatePromotionListVo">
|
||||
SELECT
|
||||
p.F_Id as id,
|
||||
p.F_Promotion as promotion,
|
||||
p.F_PromotionBusinessId as promotionBusinessId,
|
||||
p.F_LearningMapSetting as learningMapSetting,
|
||||
u.F_UserId as userId,
|
||||
u.F_CreatorTime as creatorTime,
|
||||
u.F_UserSelect as userSelect
|
||||
FROM ftb_cultivate_promotion_user u
|
||||
INNER JOIN ftb_cultivate_promotion_new p ON u.F_PromotionId = p.F_Id
|
||||
WHERE u.F_UserId = #{userId}
|
||||
AND u.F_EnabledMark = 0
|
||||
AND p.F_EnableMark = 0
|
||||
AND p.F_IsError = 0
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryMyPromotionById" resultType="jnpf.model.cultivate.v2.promotion.vo.MyCultivatePromotionListVo">
|
||||
SELECT
|
||||
p.F_Id as id,
|
||||
p.F_Promotion as promotion,
|
||||
p.F_PromotionBusinessId as promotionBusinessId,
|
||||
p.F_LearningMapSetting as learningMapSetting,
|
||||
u.F_UserId as userId,
|
||||
u.F_CreatorTime as creatorTime,
|
||||
u.F_UserSelect as userSelect
|
||||
FROM ftb_cultivate_promotion_user u
|
||||
INNER JOIN ftb_cultivate_promotion_new p ON u.F_PromotionId = p.F_Id
|
||||
WHERE u.F_UserId = #{userId}
|
||||
AND u.F_PromotionId = #{promotionId}
|
||||
AND u.F_EnabledMark = 0
|
||||
AND p.F_EnableMark = 0
|
||||
AND p.F_IsError = 0
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateQuestionBankCourseMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.question.FtbCultivateQuestionBankCourse">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_question_bank_course-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_ClassifyId" jdbcType="VARCHAR" property="fClassifyid" />
|
||||
<result column="F_CourseId" jdbcType="VARCHAR" property="fCourseid" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_ClassifyId, F_CourseId, F_EnabledMark, F_CreatorUserId, F_CreatorTime, F_DeleteUserId,
|
||||
F_DeleteTime, F_TenantId
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateQuestionBankMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.question.FtbCultivateQuestionBank">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_question_bank-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_ClassifyId" jdbcType="VARCHAR" property="fClassifyid" />
|
||||
<result column="F_BankContent" jdbcType="VARCHAR" property="fBankcontent" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_LastModifyUserId" jdbcType="VARCHAR" property="fLastmodifyuserid" />
|
||||
<result column="F_LastModifyTime" jdbcType="TIMESTAMP" property="fLastmodifytime" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_ClassifyId, F_BankContent, F_EnabledMark, F_CreatorUserId, F_CreatorTime,
|
||||
F_LastModifyUserId, F_LastModifyTime, F_DeleteUserId, F_DeleteTime, F_TenantId
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateQuestionMapper">
|
||||
|
||||
<!--根据题库id查询题库中重复题目-->
|
||||
<select id="queryRepeatQuestion" resultType="jnpf.model.cultivate.po.question.FtbCultivateQuestion">
|
||||
SELECT F_Content AS content, COUNT(*) AS num
|
||||
FROM ftb_cultivate_question
|
||||
where F_ClassifyId = #{questionBankId}
|
||||
and F_EnabledMark = 1
|
||||
GROUP BY F_Content
|
||||
HAVING COUNT(*) > 1;
|
||||
</select>
|
||||
|
||||
<!--根据题库id统计各题库的题目数量-->
|
||||
<select id="countForClassifyId" resultType="jnpf.model.cultivate.resp.QuestionCountDto">
|
||||
select F_ClassifyId as questionBankId,count(*) as num from ftb_cultivate_question where F_EnabledMark =1
|
||||
<if test="ids != null and ids.size() > 0 ">
|
||||
and F_ClassifyId in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY F_ClassifyId
|
||||
</select>
|
||||
<!-- 在题库中根据规则随机抽题 -->
|
||||
<select id="getRandQuestionByRule" resultType="jnpf.model.cultivate.v2.exam.vo.V2AppQuestionVo">
|
||||
SELECT t.F_Id questionId, t.F_ClassifyId classifyId, t.F_Type `type`, t.F_Content content,
|
||||
t.F_Answer answer, t.F_Analysis analysis, t.F_LastModifyTime lastModifyTime, r.F_Score questionScore
|
||||
FROM (
|
||||
SELECT q.*,
|
||||
ROW_NUMBER() OVER (PARTITION BY q.F_Type, q.F_Difficulty ORDER BY RAND()) rn
|
||||
FROM ftb_cultivate_question q
|
||||
WHERE q.F_EnabledMark = 1
|
||||
AND FIND_IN_SET(q.F_ClassifyId, #{drawDataBase})
|
||||
AND q.F_Type IN
|
||||
<foreach collection="ruleList" item="rule" open="(" separator="," close=")">
|
||||
#{rule.questionType}
|
||||
</foreach>
|
||||
) t
|
||||
JOIN (
|
||||
SELECT *
|
||||
FROM (
|
||||
VALUES
|
||||
<foreach collection="ruleList" item="rule" separator=",">
|
||||
ROW(#{rule.questionType}, #{rule.easyCount}, #{rule.mediumCount}, #{rule.hardCount}, #{rule.score})
|
||||
</foreach>
|
||||
) AS tmp(F_QuestionType, F_EasyCount, F_MediumCount, F_HardCount, F_Score)
|
||||
) r
|
||||
ON t.F_Type = r.F_QuestionType
|
||||
WHERE (t.F_Difficulty = 1 AND t.rn <![CDATA[ <= ]]> r.F_EasyCount)
|
||||
OR (t.F_Difficulty = 2 AND t.rn <![CDATA[ <= ]]> r.F_MediumCount)
|
||||
OR (t.F_Difficulty = 3 AND t.rn <![CDATA[ <= ]]> r.F_HardCount)
|
||||
</select>
|
||||
<!-- 根据题目ids查询题目 -->
|
||||
<select id="selectListById" resultType="jnpf.model.cultivate.v2.exam.vo.V2AppQuestionVo">
|
||||
select t.F_Id questionId, t.F_ClassifyId classifyId, t.F_Type `type`, t.F_Content content,
|
||||
t.F_Answer answer, t.F_Analysis analysis, t.F_LastModifyTime lastModifyTime
|
||||
from ftb_cultivate_question t
|
||||
where t.F_EnabledMark = 1 and t.F_Id in
|
||||
<foreach collection="questionIds" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<!-- 题型统计 -->
|
||||
<select id="getTypeAnalysis" resultType="jnpf.model.cultivate.v2.exam.vo.QuestionTypeAnalysisVo">
|
||||
select t.F_Type `type`, count(*) questionCount,
|
||||
sum(case when t.F_Difficulty = 1 then 1 else 0 end) easyCount,
|
||||
sum(case when t.F_Difficulty = 2 then 1 else 0 end) mediumCount,
|
||||
sum(case when t.F_Difficulty = 3 then 1 else 0 end) hardCount
|
||||
from ftb_cultivate_question t
|
||||
where t.F_EnabledMark = 1 and t.F_ClassifyId in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
group by F_Type
|
||||
order by F_Type asc
|
||||
</select>
|
||||
<!-- 查询题目列表 -->
|
||||
<select id="getQuestionList" resultType="jnpf.model.cultivate.v2.exam.vo.QuestionVo">
|
||||
select t.F_Id questionId, t.F_Difficulty difficulty, qb.F_BankContent bankName, t.F_Content content, t.F_Type `type`, t.F_LastModifyTime lastModifyTime
|
||||
from ftb_cultivate_question t
|
||||
left join ftb_cultivate_question_bank qb on qb.F_Id = t.F_ClassifyId
|
||||
where t.F_EnabledMark = 1
|
||||
<if test="null != keyword and '' != keyword">
|
||||
and instr(t.F_Content, #{keyword}) > 0
|
||||
</if>
|
||||
and t.F_ClassifyId in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by t.F_LastModifyTime desc, t.F_Id desc
|
||||
</select>
|
||||
<!-- 查询题库题型数量 -->
|
||||
<select id="getBankQuestionTypeCount" resultType="jnpf.model.cultivate.v2.exam.vo.BankPickVo">
|
||||
SELECT
|
||||
F_ClassifyId AS bankId,
|
||||
F_Type AS questionType,
|
||||
COUNT(*) AS questionCount,
|
||||
SUM(CASE WHEN F_Difficulty = 1 THEN 1 ELSE 0 END) AS easyCount,
|
||||
SUM(CASE WHEN F_Difficulty = 2 THEN 1 ELSE 0 END) AS mediumCount,
|
||||
SUM(CASE WHEN F_Difficulty = 3 THEN 1 ELSE 0 END) AS hardCount
|
||||
FROM ftb_cultivate_question
|
||||
WHERE F_EnabledMark = 1
|
||||
AND (F_ClassifyId, F_Type) IN (
|
||||
<foreach collection="bankPickList" item="item" separator=",">
|
||||
(#{item.bankId}, #{item.questionType})
|
||||
</foreach>
|
||||
)
|
||||
GROUP BY F_ClassifyId, F_Type
|
||||
</select>
|
||||
<!-- 查询试卷抽题规则 -->
|
||||
<select id="getPaperDrawRuleList" resultType="jnpf.model.cultivate.resp.PaperDrawRuleVo">
|
||||
select pq.F_PaperId paperId, q.F_Type questionType, q.F_Difficulty difficulty, pq.F_QuestionId questionId, pq.F_Score score, 1 as normal, 1 as pickCount
|
||||
from ftb_cultivate_test_paper_question pq
|
||||
left join ftb_cultivate_question q on pq.F_QuestionId = q.F_Id
|
||||
where pq.F_EnabledMark = 1 and pq.F_PaperId in
|
||||
<foreach collection="paperIds" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateQuestionOptionMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.question.FtbCultivateQuestionOption">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_question_option-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_QuestionId" jdbcType="VARCHAR" property="fQuestionid" />
|
||||
<result column="F_Content" jdbcType="VARCHAR" property="fContent" />
|
||||
<result column="F_Image" jdbcType="VARCHAR" property="fImage" />
|
||||
<result column="F_Description" jdbcType="VARCHAR" property="fDescription" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_SortCode" jdbcType="BIGINT" property="fSortcode" />
|
||||
<result column="F_RightAnswer" jdbcType="BIGINT" property="fRightanswer" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_LastModifyUserId" jdbcType="VARCHAR" property="fLastmodifyuserid" />
|
||||
<result column="F_LastModifyTime" jdbcType="TIMESTAMP" property="fLastmodifytime" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_QuestionId, F_Content, F_Image, F_Description, F_EnabledMark, F_SortCode,
|
||||
F_RightAnswer, F_CreatorUserId, F_CreatorTime, F_LastModifyUserId, F_LastModifyTime,
|
||||
F_DeleteUserId, F_DeleteTime, F_TenantId
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateQuestionPointsMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.question.FtbCultivateQuestionPoints">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_question_points-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_QuestionId" jdbcType="VARCHAR" property="fQuestionid" />
|
||||
<result column="F_PointsId" jdbcType="VARCHAR" property="fPointsid" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_QuestionId, F_PointsId, F_TenantId, F_CreatorUserId, F_CreatorTime
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateRuleMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,259 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateStatisticsMapper">
|
||||
<!--统计培训学员数量-->
|
||||
<select id="numOfTrainees" resultType="java.lang.Integer">
|
||||
SELECT COUNT(DISTINCT F_UserId) FROM ftb_cultivate_position_cource_learning WHERE F_EnabledMark=0 AND F_state in (1,2)
|
||||
<if test="params.userIds!=null and params.userIds.size()>0">
|
||||
and F_UserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
</select>
|
||||
<!--获取热门课程信息-->
|
||||
<select id="getPopularCourses"
|
||||
resultType="jnpf.model.cultivate.vo.statistics.FtbCultivateStatisticsVO$PopularCourses">
|
||||
SELECT
|
||||
COUNT(DISTINCT lea.F_CreatorUserId ) AS number,
|
||||
cou.F_Name as courseName
|
||||
FROM
|
||||
ftb_cultivate_course_learning_log AS lea
|
||||
LEFT JOIN ftb_cultivate_course cou ON lea.F_CourseId = cou.F_Id
|
||||
WHERE
|
||||
lea.F_EnabledMark=0
|
||||
and cou.F_EnabledMark = 0
|
||||
<if test="dto.userIds!=null and dto.userIds.size()>0">
|
||||
and lea.F_CreatorUserId in
|
||||
<foreach collection="dto.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
AND lea.F_CreatorTime BETWEEN #{dto.startTime} AND #{dto.endTime}
|
||||
|
||||
GROUP BY
|
||||
lea.F_CourseId
|
||||
ORDER BY number desc, cou.F_Name asc
|
||||
LIMIT 10
|
||||
</select>
|
||||
<!--统计学习中的课程数量-->
|
||||
<select id="numberOfStudyCourses" resultType="java.lang.Integer">
|
||||
SELECT IFNULL(SUM(a.t),0) from (SELECT COUNT(distinct a.F_CourceId) as t
|
||||
FROM ftb_cultivate_position_cource_learning a join ftb_cultivate_course b on a.F_CourceId = b.F_Id
|
||||
where
|
||||
b.F_EnabledMark = 0 and F_state in (1,2) and a.F_EnabledMark=0
|
||||
and F_UserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
GROUP BY F_CourceId) a
|
||||
</select>
|
||||
<!--计算学员累计学习时长-->
|
||||
<select id="accumulatedTime" resultType="java.lang.Integer">
|
||||
SELECT IFNULL(SUM(F_LearnTime),0)
|
||||
FROM ftb_cultivate_position_cource_learning a join ftb_cultivate_course b on a.F_CourceId = b.F_Id
|
||||
where
|
||||
b.F_EnabledMark=0
|
||||
and a.F_EnabledMark=0
|
||||
and F_UserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
</select>
|
||||
<!--计算课程完成率-->
|
||||
<select id="courseCompletionRate" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) as t
|
||||
FROM ftb_cultivate_position_cource_learning a join ftb_cultivate_course b on a.F_CourceId = b.F_Id
|
||||
where
|
||||
b.F_EnabledMark = 0 and b.F_IsGrounding=1 and a.F_EnabledMark = 0 and
|
||||
F_state in
|
||||
<foreach collection="states" item="state" open="(" close=")" separator=",">
|
||||
#{state}
|
||||
</foreach>
|
||||
<if test="params.userIds != null and params.userIds.size() != 0">
|
||||
and F_UserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
<if test="states.size() == 1">
|
||||
and a.F_LastModifyTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
<if test="states.size() > 1">
|
||||
and (b.F_CreatorTime <= #{params.endTime}
|
||||
or a.F_LastModifyTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
or a.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime})
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<!--获取学习进度排名靠前的成员列表-->
|
||||
<select id="getTopMembers" resultType="jnpf.model.cultivate.vo.statistics.FtbCultivateStatisticsVO$TopMembers">
|
||||
SELECT
|
||||
a.F_CreatorUserId AS ordinate,
|
||||
SUM(a.F_LearnTime) AS abscissa
|
||||
FROM
|
||||
ftb_cultivate_course_learning_log a
|
||||
join
|
||||
ftb_cultivate_course b
|
||||
on a.F_CourseId = b.F_Id
|
||||
<where>
|
||||
a.F_EnabledMark=0
|
||||
and b.F_EnabledMark = 0
|
||||
<if test="params.userIds!=null and params.userIds.size()>0">
|
||||
and a.F_CreatorUserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY a.F_CreatorUserId ORDER BY abscissa DESC LIMIT 10
|
||||
</select>
|
||||
<!--统计新学习的课程数量-->
|
||||
<select id="numberOfStudyCoursesNew" resultType="java.lang.Integer">
|
||||
SELECT IFNULL(SUM(a.t),0) from (SELECT COUNT(*) as t
|
||||
FROM ftb_cultivate_position_cource_learning a join ftb_cultivate_course b on a.F_CourceId = b.F_Id
|
||||
where
|
||||
b.F_EnabledMark = 0 and F_state in (1,2) and a.F_EnabledMark=0
|
||||
<if test="params.userIds != null and params.userIds.size() != 0">
|
||||
and F_UserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
GROUP BY F_CourceId) a
|
||||
</select>
|
||||
|
||||
<select id="queryStudyUserNumAndTime" resultType="jnpf.model.cultivate.v2.statistics.V2CultivateLineNumDto">
|
||||
SELECT COUNT(DISTINCT F_UserId) as numberOfStudents,IFNULL(SUM(F_LearnTime),0) as studyDuration
|
||||
FROM ftb_cultivate_position_cource_learning WHERE F_EnabledMark=0 AND F_state in (1,2)
|
||||
<if test="params.userIds!=null and params.userIds.size()>0">
|
||||
and F_UserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryStudyUserNumAndTimeV2" resultType="jnpf.model.cultivate.v2.statistics.V2CultivateLineNumDto">
|
||||
SELECT COUNT(DISTINCT F_CreatorUserId) as numberOfStudents,IFNULL(SUM(F_LearnTime),0) as studyDuration
|
||||
FROM ftb_cultivate_course_learning_log WHERE F_EnabledMark=0
|
||||
<if test="params.userIds!=null and params.userIds.size()>0">
|
||||
and F_CreatorUserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="numOfTraineesV2" resultType="java.lang.Integer">
|
||||
SELECT count(DISTINCT log.F_CreatorUserId)
|
||||
FROM
|
||||
ftb_cultivate_course_learning_log log
|
||||
LEFT JOIN ftb_cultivate_course course ON course.F_Id = log.F_CourseId
|
||||
WHERE
|
||||
log.F_EnabledMark = 0
|
||||
AND course.F_EnabledMark = 0
|
||||
<if test="params.userIds!=null and params.userIds.size()>0">
|
||||
and log.F_CreatorUserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and log.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="numberOfStudyCoursesV2" resultType="java.lang.Integer">
|
||||
SELECT IFNULL(SUM(a.t),0) from (SELECT COUNT(distinct a.F_CourseId) as t
|
||||
FROM ftb_cultivate_course_learning_log a join ftb_cultivate_course b on a.F_CourseId = b.F_Id
|
||||
where
|
||||
b.F_EnabledMark = 0 and a.F_EnabledMark=0
|
||||
and a.F_CreatorUserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
GROUP BY a.F_CourseId) a
|
||||
</select>
|
||||
|
||||
<select id="accumulatedTimeV2" resultType="java.lang.Integer">
|
||||
SELECT IFNULL(SUM(F_LearnTime),0)
|
||||
FROM ftb_cultivate_course_learning_log a join ftb_cultivate_course b on a.F_CourseId = b.F_Id
|
||||
where
|
||||
b.F_EnabledMark=0
|
||||
and a.F_EnabledMark=0
|
||||
and a.F_CreatorUserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and a.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="courseCompletionRateV2" resultType="java.lang.Integer">
|
||||
|
||||
SELECT COUNT(*) as t
|
||||
FROM ftb_cultivate_course_learning_log a join ftb_cultivate_course b on a.F_CourseId = b.F_Id
|
||||
where
|
||||
b.F_EnabledMark = 0 and b.F_IsGrounding=1 and a.F_EnabledMark = 0 and
|
||||
a.F_Status in
|
||||
<foreach collection="states" item="state" open="(" close=")" separator=",">
|
||||
#{state}
|
||||
</foreach>
|
||||
<if test="params.userIds != null and params.userIds.size() != 0">
|
||||
and a.F_CreatorUserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
|
||||
and a.F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getTopMembersV2" resultType="jnpf.model.cultivate.vo.statistics.FtbCultivateStatisticsVO$TopMembers">
|
||||
SELECT SUM(F_LearnTime) as abscissa,F_CreatorUserId as ordinate
|
||||
FROM ftb_cultivate_course_learning_log
|
||||
WHERE F_EnabledMark=0 and F_Status =1
|
||||
<if test="params.userIds!=null and params.userIds.size()>0">
|
||||
and F_CreatorUserId in
|
||||
<foreach collection="params.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startTime != null and params.endTime != null">
|
||||
and F_CreatorTime BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
</if>
|
||||
GROUP BY F_CreatorUserId ORDER BY abscissa DESC LIMIT 10
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateTestPaperMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.paper.FtbCultivateTestPaper">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_test_paper-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_Name" jdbcType="VARCHAR" property="fName" />
|
||||
<result column="F_QuestionNumber" jdbcType="INTEGER" property="fQuestionnumber" />
|
||||
<result column="F_TotalScore" jdbcType="INTEGER" property="fTotalscore" />
|
||||
<result column="F_Status" jdbcType="TINYINT" property="fStatus" />
|
||||
<result column="F_Type" jdbcType="TINYINT" property="fType" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_LastModifyUserId" jdbcType="VARCHAR" property="fLastmodifyuserid" />
|
||||
<result column="F_LastModifyTime" jdbcType="TIMESTAMP" property="fLastmodifytime" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
<result column="F_PaperType" jdbcType="TINYINT" property="fPapertype" />
|
||||
<result column="F_PostId" jdbcType="VARCHAR" property="fPostid" />
|
||||
<result column="F_PaperId" jdbcType="VARCHAR" property="fPaperid" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_Name, F_QuestionNumber, F_TotalScore, F_Status, F_Type, F_EnabledMark, F_CreatorUserId,
|
||||
F_CreatorTime, F_LastModifyUserId, F_LastModifyTime, F_DeleteUserId, F_DeleteTime,
|
||||
F_TenantId, F_PaperType, F_PostId, F_PaperId
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateTestPaperQuestionMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.paper.FtbCultivateTestPaperQuestion">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_test_paper_question-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="fEnabledmark" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
<result column="F_LastModifyUserId" jdbcType="VARCHAR" property="fLastmodifyuserid" />
|
||||
<result column="F_LastModifyTime" jdbcType="TIMESTAMP" property="fLastmodifytime" />
|
||||
<result column="F_DeleteUserId" jdbcType="VARCHAR" property="fDeleteuserid" />
|
||||
<result column="F_DeleteTime" jdbcType="TIMESTAMP" property="fDeletetime" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
<result column="F_QuestionId" jdbcType="VARCHAR" property="fQuestionid" />
|
||||
<result column="F_PaperId" jdbcType="VARCHAR" property="fPaperid" />
|
||||
<result column="F_BankId" jdbcType="VARCHAR" property="fBankid" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_EnabledMark, F_CreatorUserId, F_CreatorTime, F_LastModifyUserId, F_LastModifyTime,
|
||||
F_DeleteUserId, F_DeleteTime, F_TenantId, F_QuestionId, F_PaperId, F_BankId
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.FtbCultivateTestPaperRuleMapper">
|
||||
<resultMap id="BaseResultMap" type="jnpf.model.cultivate.po.paper.FtbCultivateTestPaperRule">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ftb_cultivate_test_paper_rule-->
|
||||
<id column="F_Id" jdbcType="VARCHAR" property="fId" />
|
||||
<result column="F_TestPaperId" jdbcType="VARCHAR" property="fTestpaperid" />
|
||||
<result column="F_ClassifyId" jdbcType="VARCHAR" property="fClassifyid" />
|
||||
<result column="F_Type" jdbcType="INTEGER" property="fType" />
|
||||
<result column="F_Difficulty" jdbcType="INTEGER" property="fDifficulty" />
|
||||
<result column="F_Number" jdbcType="INTEGER" property="fNumber" />
|
||||
<result column="F_Score" jdbcType="INTEGER" property="fScore" />
|
||||
<result column="F_TenantId" jdbcType="VARCHAR" property="fTenantid" />
|
||||
<result column="F_CreatorUserId" jdbcType="VARCHAR" property="fCreatoruserid" />
|
||||
<result column="F_CreatorTime" jdbcType="TIMESTAMP" property="fCreatortime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
F_Id, F_TestPaperId, F_ClassifyId, F_Type, F_Difficulty, F_Number, F_Score, F_TenantId,
|
||||
F_CreatorUserId, F_CreatorTime
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.TeachingApproveMapper">
|
||||
|
||||
<!-- 旧数据维护: 生成以前带教的审批数据 -->
|
||||
<insert id="generateOldApproveData">
|
||||
INSERT INTO ftb_cultivate_teaching_approve (
|
||||
F_Id,
|
||||
F_TeachId,
|
||||
F_ApproveStatus,
|
||||
F_CreatorUserId,
|
||||
F_CreatorTime,
|
||||
F_LastModifyUserId,
|
||||
F_LastModifyTime
|
||||
)
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (ORDER BY t.F_Id) + 1000000000 AS F_Id,
|
||||
t.F_Id AS F_TeachId,
|
||||
1 AS F_ApproveStatus,
|
||||
t.F_CreatorUserId,
|
||||
t.F_CreatorTime,
|
||||
t.F_CreatorUserId AS F_LastModifyUserId,
|
||||
t.F_CreatorTime AS F_LastModifyTime
|
||||
FROM ftb_cultivate_teaching_record t
|
||||
WHERE t.F_Type = 1 AND t.F_DeleteMark = 0
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,475 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.TeachingRecordMapper">
|
||||
|
||||
<resultMap type="jnpf.model.cultivate.vo.teaching.SummaryPageListVo" id="SummaryPageListMap">
|
||||
<result property="storeName" column="storeName"/>
|
||||
<result property="userName" column="userName"/>
|
||||
<result property="postName" column="postName"/>
|
||||
<result property="totalCount" column="totalCount"/>
|
||||
<result property="skillList" column="skillList" typeHandler="jnpf.cultivate.event.JsonToListTypeHandler"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="jnpf.model.cultivate.vo.teaching.EmployeeViewDataVo" id="EmployeeViewDataVoMap">
|
||||
<result property="userName" column="userName"/>
|
||||
<result property="postName" column="postName"/>
|
||||
<result property="totalCount" column="totalCount"/>
|
||||
<result property="skillList" column="skillList" typeHandler="jnpf.cultivate.event.JsonToListTypeHandler"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="skillCount" resultType="jnpf.model.cultivate.vo.teaching.SkillCountVo">
|
||||
SELECT
|
||||
fcts.F_Name name,
|
||||
count(1) count
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fcts ON fcts.F_Id = fctr.F_SkillId
|
||||
<where>
|
||||
<if test="recordIds != null and recordIds.size > 0">
|
||||
and fctr.F_Id in
|
||||
<foreach collection="recordIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY fctr.F_SkillId
|
||||
ORDER BY fcts.F_DeleteMark asc, fcts.F_Sort asc
|
||||
</select>
|
||||
|
||||
<select id="summaryPageList" resultMap="SummaryPageListMap">
|
||||
SELECT
|
||||
storeName,
|
||||
userId,
|
||||
SUBSTRING_INDEX( MAX( postName ), '~', -1 ) AS postName,
|
||||
SUM( skillCount ) AS totalCount,
|
||||
JSON_ARRAYAGG( JSON_OBJECT( 'name', skillName, 'count', skillCount, 'sort', skillSort, 'deleteMark', skillDeleteMark ) ) AS skillList
|
||||
FROM
|
||||
(SELECT
|
||||
fctr.F_StoreName AS storeName,
|
||||
fctr.F_UserId userId,
|
||||
MAX(CONCAT( fctr.F_CreatorTime, '~', fctr.F_PostName )) AS postName,
|
||||
fcs.F_Name AS skillName,
|
||||
COUNT( fctr.F_Id ) AS skillCount,
|
||||
fcs.F_Sort AS skillSort,
|
||||
fcs.F_DeleteMark AS skillDeleteMark
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fcs ON fcs.F_Id = fctr.F_SkillId AND fcs.F_Name IS NOT NULL
|
||||
<where>
|
||||
fcs.F_Name IS NOT NULL
|
||||
AND fctr.F_DeleteMark = 0 AND fctr.F_Type = 2
|
||||
<if test="pageDto.storeIdList != null and pageDto.storeIdList.size()>0">
|
||||
AND fctr.F_StoreId in
|
||||
<foreach collection="pageDto.storeIdList" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pageDto.keyword != null and pageDto.keyword != ''">
|
||||
AND fctr.F_UserName LIKE CONCAT('%', #{pageDto.keyword}, '%')
|
||||
</if>
|
||||
<if test="(pageDto.startDate != null and pageDto.startDate != '') and (pageDto.endDate != null and pageDto.endDate != '')">
|
||||
AND fctr.F_Date BETWEEN #{pageDto.startDate} AND #{pageDto.endDate}
|
||||
</if>
|
||||
<if test="null != pageDto.categoryId and '' != pageDto.categoryId">
|
||||
<choose>
|
||||
<when test="-1 == pageDto.categoryId">
|
||||
and fcs.F_CategoryId is null
|
||||
</when>
|
||||
<otherwise>
|
||||
and fcs.F_CategoryId = #{pageDto.categoryId}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY fctr.F_StoreId, fctr.F_UserId, fcs.F_Id
|
||||
) AS detail
|
||||
GROUP BY storeName, userId
|
||||
ORDER BY totalCount DESC
|
||||
</select>
|
||||
|
||||
<select id="summarySkillList" resultType="jnpf.model.cultivate.vo.teaching.SkillCountVo">
|
||||
SELECT
|
||||
fcs.F_Name AS name,
|
||||
fcs.F_Sort AS sort,
|
||||
fcs.F_DeleteMark AS deleteMark
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fcs ON fcs.F_Id = fctr.F_SkillId AND fcs.F_Name IS NOT NULL
|
||||
<where>
|
||||
fcs.F_Name IS NOT NULL
|
||||
AND fctr.F_DeleteMark = 0 AND fctr.F_Type = 2
|
||||
<if test="pageDto.storeIdList != null and pageDto.storeIdList.size()>0">
|
||||
AND fctr.F_StoreId in
|
||||
<foreach collection="pageDto.storeIdList" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pageDto.keyword != null and pageDto.keyword != ''">
|
||||
AND fctr.F_UserName LIKE CONCAT('%', #{pageDto.keyword}, '%')
|
||||
</if>
|
||||
<if test="(pageDto.startDate != null and pageDto.startDate != '') and (pageDto.endDate != null and pageDto.endDate != '')">
|
||||
AND fctr.F_Date BETWEEN #{pageDto.startDate} AND #{pageDto.endDate}
|
||||
</if>
|
||||
<if test="null != pageDto.categoryId and '' != pageDto.categoryId">
|
||||
<choose>
|
||||
<when test="-1 == pageDto.categoryId">
|
||||
and fcs.F_CategoryId is null
|
||||
</when>
|
||||
<otherwise>
|
||||
and fcs.F_CategoryId = #{pageDto.categoryId}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY fcs.F_Id
|
||||
ORDER BY fcs.F_Sort
|
||||
</select>
|
||||
|
||||
<select id="recordPageList" resultType="jnpf.model.cultivate.vo.teaching.RecordPageListVo">
|
||||
SELECT
|
||||
fctr.F_Id AS id,
|
||||
fctr.F_StoreName AS storeName,
|
||||
fctr.F_UserName AS userName,
|
||||
fctr.F_PostName AS postName,
|
||||
fcs.F_Name AS skillName,
|
||||
fctr.F_VideoPath AS videoPath,
|
||||
concat(fctr.F_VideoPath, '.0.jpg') AS videoCover,
|
||||
fctr.F_VideoActionType AS videoActionType,
|
||||
fctr.F_VideoDuration AS videoDuration,
|
||||
fctr.F_Date AS date
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fcs ON fcs.F_Id = fctr.F_SkillId AND fcs.F_Name IS NOT NULL
|
||||
<where>
|
||||
fcs.F_Name IS NOT NULL
|
||||
AND fctr.F_DeleteMark = 0 AND fctr.F_Type = 2
|
||||
<if test="pageDto.storeIdList != null and pageDto.storeIdList.size()>0">
|
||||
AND fctr.F_StoreId in
|
||||
<foreach collection="pageDto.storeIdList" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pageDto.keyword != null and pageDto.keyword != ''">
|
||||
AND (fctr.F_UserName LIKE CONCAT('%', #{pageDto.keyword}, '%')
|
||||
OR fctr.F_PostName LIKE CONCAT('%', #{pageDto.keyword}, '%'))
|
||||
</if>
|
||||
<if test="(pageDto.startDate != null and pageDto.startDate != '') and (pageDto.endDate != null and pageDto.endDate != '')">
|
||||
AND fctr.F_Date BETWEEN #{pageDto.startDate} AND #{pageDto.endDate}
|
||||
</if>
|
||||
<if test="null != skillIds and skillIds.size > 0">
|
||||
AND fcs.F_Id IN
|
||||
<foreach collection="skillIds" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fctr.F_Date DESC, fctr.F_CreatorTime DESC
|
||||
</select>
|
||||
|
||||
<select id="myRecordPageList" resultType="jnpf.model.cultivate.vo.teaching.MyRecordPageListVo">
|
||||
SELECT
|
||||
fctr.F_Id AS id,
|
||||
fcs.F_Name AS skillName,
|
||||
fctr.F_VideoPath AS videoPath,
|
||||
concat(fctr.F_VideoPath, '.0.jpg') AS videoCover,
|
||||
fctr.F_VideoActionType AS videoActionType,
|
||||
fctr.F_Date AS date
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fcs ON fcs.F_Id = fctr.F_SkillId AND fcs.F_Name IS NOT NULL
|
||||
<where>
|
||||
fcs.F_Name IS NOT NULL
|
||||
AND fctr.F_DeleteMark = 0 AND fctr.F_Type = 2
|
||||
AND fctr.F_UserId = #{userId}
|
||||
AND fctr.F_StoreId = #{pageDto.storeId}
|
||||
<if test="pageDto.keyword != null and pageDto.keyword != ''">
|
||||
AND fcs.F_Name LIKE CONCAT('%', #{pageDto.keyword}, '%')
|
||||
</if>
|
||||
<if test="(pageDto.startDate != null and pageDto.startDate != '') and (pageDto.endDate != null and pageDto.endDate != '')">
|
||||
AND fctr.F_Date BETWEEN #{pageDto.startDate} AND #{pageDto.endDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fctr.F_Date DESC, fctr.F_CreatorTime DESC
|
||||
</select>
|
||||
|
||||
<select id="getMySkillTable" resultType="jnpf.model.cultivate.vo.teaching.RecordViewDataModel">
|
||||
SELECT
|
||||
fcs.F_Name AS skillName,
|
||||
COUNT( fctr.F_Id ) AS count
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fcs ON fcs.F_Id = fctr.F_SkillId AND fcs.F_Name IS NOT NULL
|
||||
<where>
|
||||
fcs.F_Name IS NOT NULL
|
||||
AND fctr.F_DeleteMark = 0 AND fctr.F_Type = 2
|
||||
AND fctr.F_UserId = #{userId}
|
||||
<if test="pageDto.storeIdList != null and pageDto.storeIdList.size()>0">
|
||||
AND fctr.F_StoreId in
|
||||
<foreach collection="pageDto.storeIdList" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="(pageDto.startDate != null and pageDto.startDate != '') and (pageDto.endDate != null and pageDto.endDate != '')">
|
||||
AND fctr.F_Date BETWEEN #{pageDto.startDate} AND #{pageDto.endDate}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY fctr.F_SkillId
|
||||
ORDER BY fcs.F_Sort
|
||||
</select>
|
||||
|
||||
<select id="employeePageList" resultType="jnpf.model.cultivate.vo.teaching.EmployeePageListVo">
|
||||
SELECT
|
||||
fcs.F_Name AS skillName,
|
||||
fctr.F_UserName AS userName,
|
||||
fctr.F_VideoPath AS videoPath,
|
||||
concat(fctr.F_VideoPath, '.0.jpg') AS videoCover,
|
||||
fctr.F_VideoActionType AS videoActionType,
|
||||
fctr.F_Date AS date
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fcs ON fcs.F_Id = fctr.F_SkillId AND fcs.F_Name IS NOT NULL
|
||||
<where>
|
||||
fcs.F_Name IS NOT NULL
|
||||
AND fctr.F_DeleteMark = 0 AND fctr.F_Type = 2
|
||||
<if test="pageDto.storeIdList != null and pageDto.storeIdList.size()>0">
|
||||
AND fctr.F_StoreId in
|
||||
<foreach collection="pageDto.storeIdList" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pageDto.keyword != null and pageDto.keyword != ''">
|
||||
AND (fctr.F_UserName LIKE CONCAT('%', #{pageDto.keyword}, '%')
|
||||
OR fcs.F_Name LIKE CONCAT('%', #{pageDto.keyword}, '%'))
|
||||
</if>
|
||||
<if test="(pageDto.startDate != null and pageDto.startDate != '') and (pageDto.endDate != null and pageDto.endDate != '')">
|
||||
AND fctr.F_Date BETWEEN #{pageDto.startDate} AND #{pageDto.endDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fctr.F_Date DESC, fctr.F_CreatorTime DESC
|
||||
</select>
|
||||
<select id="employeeViewData" resultMap="EmployeeViewDataVoMap">
|
||||
SELECT
|
||||
userName AS userName,
|
||||
SUBSTRING_INDEX( MAX( postName ), '~', -1 ) AS postName,
|
||||
SUM( skillCount ) AS totalCount,
|
||||
JSON_ARRAYAGG( JSON_OBJECT( 'name', skillName, 'count', skillCount, 'sort', skillSort, 'deleteMark', skillDeleteMark) ) AS skillList
|
||||
FROM
|
||||
(SELECT
|
||||
fctr.F_UserName AS userName,
|
||||
CONCAT( fctr.F_CreatorTime, '~', fctr.F_PostName ) AS postName,
|
||||
fcs.F_Name AS skillName,
|
||||
COUNT( fctr.F_Id ) AS skillCount,
|
||||
fcs.F_Sort AS skillSort,
|
||||
fcs.F_DeleteMark AS skillDeleteMark
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fcs ON fcs.F_Id = fctr.F_SkillId AND fcs.F_Name IS NOT NULL
|
||||
<where>
|
||||
fcs.F_Name IS NOT NULL
|
||||
AND fctr.F_DeleteMark = 0 AND fctr.F_Type = 2
|
||||
<if test="pageDto.storeIdList != null and pageDto.storeIdList.size()>0">
|
||||
AND fctr.F_StoreId in
|
||||
<foreach collection="pageDto.storeIdList" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="(pageDto.startDate != null and pageDto.startDate != '') and (pageDto.endDate != null and pageDto.endDate != '')">
|
||||
AND fctr.F_Date BETWEEN #{pageDto.startDate} AND #{pageDto.endDate}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY fctr.F_UserId, fcs.F_Id ) AS detail
|
||||
GROUP BY userName
|
||||
ORDER BY totalCount
|
||||
</select>
|
||||
<select id="employeeSkillList" resultType="jnpf.model.cultivate.vo.teaching.SkillCountVo">
|
||||
SELECT
|
||||
fcs.F_Name AS name,
|
||||
fcs.F_Sort AS sort,
|
||||
fcs.F_DeleteMark AS deleteMark
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fcs ON fcs.F_Id = fctr.F_SkillId AND fcs.F_Name IS NOT NULL
|
||||
<where>
|
||||
fcs.F_Name IS NOT NULL
|
||||
AND fctr.F_DeleteMark = 0 AND fctr.F_Type = 2
|
||||
<if test="pageDto.storeIdList != null and pageDto.storeIdList.size()>0">
|
||||
AND fctr.F_StoreId in
|
||||
<foreach collection="pageDto.storeIdList" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="(pageDto.startDate != null and pageDto.startDate != '') and (pageDto.endDate != null and pageDto.endDate != '')">
|
||||
AND fctr.F_Date BETWEEN #{pageDto.startDate} AND #{pageDto.endDate}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY fcs.F_Id
|
||||
ORDER BY fcs.F_Sort
|
||||
</select>
|
||||
<select id="teachingSummaryQuery" resultType="jnpf.model.cultivate.vo.teaching.TeachingDataListVo">
|
||||
SELECT
|
||||
fctr.F_Id recordId,
|
||||
fctr.F_UserId teachingUserId,
|
||||
fctr.F_Username username,
|
||||
fctr.F_PostName postName,
|
||||
fctr.F_UserId userId,
|
||||
fctr.F_StoreId storeId,
|
||||
fctr.F_StoreName storeName,
|
||||
fctss.F_Id skillId,
|
||||
SUM( 1 ) teachingCount
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fctss on fctss.F_Id = fctr.F_SkillId
|
||||
<where>
|
||||
fctr.F_Type = 1
|
||||
and fctr.F_DeleteMark = 0
|
||||
<if test="queryTeachingRecordDto.storeIdList != null and queryTeachingRecordDto.storeIdList.size > 0">
|
||||
and fctr.F_StoreId in
|
||||
<foreach collection="queryTeachingRecordDto.storeIdList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="queryTeachingRecordDto.teachingUserIds != null and queryTeachingRecordDto.teachingUserIds.size > 0">
|
||||
and fctr.F_UserId in
|
||||
<foreach collection="queryTeachingRecordDto.teachingUserIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="queryTeachingRecordDto.keyword != null and queryTeachingRecordDto.keyword != ''">
|
||||
and fctr.F_UserName like CONCAT('%',#{queryTeachingRecordDto.keyword},'%')
|
||||
</if>
|
||||
<if test="queryTeachingRecordDto.startDate != null and queryTeachingRecordDto.startDate != ''">
|
||||
<![CDATA[ and DATE_FORMAT(fctr.F_Date, '%Y-%m-%d') >= #{queryTeachingRecordDto.startDate} ]]>
|
||||
</if>
|
||||
<if test="queryTeachingRecordDto.endDate != null and queryTeachingRecordDto.endDate != ''">
|
||||
<![CDATA[ and DATE_FORMAT(fctr.F_Date, '%Y-%m-%d') <= #{queryTeachingRecordDto.endDate} ]]>
|
||||
</if>
|
||||
<if test="null != queryTeachingRecordDto.categoryId and '' != queryTeachingRecordDto.categoryId">
|
||||
<choose>
|
||||
<when test="-1 == queryTeachingRecordDto.categoryId">
|
||||
and fctss.F_CategoryId is null
|
||||
</when>
|
||||
<otherwise>
|
||||
and fctss.F_CategoryId = #{queryTeachingRecordDto.categoryId}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY CONCAT(fctr.F_UserId,fctr.F_StoreId)
|
||||
ORDER BY teachingCount desc, fctr.F_UserName
|
||||
</select>
|
||||
|
||||
<select id="queryCountSkillList" resultType="jnpf.model.cultivate.vo.teaching.SkillKeyVo">
|
||||
SELECT
|
||||
fctss.F_Id skillId,
|
||||
fctss.F_Name skillName,
|
||||
CONCAT(fctr.F_UserId, fctr.F_StoreId) skillKey
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fctss on fctss.F_Id = fctr.F_SkillId
|
||||
<where>
|
||||
fctr.F_Type = 1
|
||||
and fctr.F_DeleteMark = 0
|
||||
<if test="queryTeachingRecordDto.storeIdList != null and queryTeachingRecordDto.storeIdList.size > 0">
|
||||
and fctr.F_StoreId in
|
||||
<foreach collection="queryTeachingRecordDto.storeIdList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="queryTeachingRecordDto.keyword != null and queryTeachingRecordDto.keyword != ''">
|
||||
and fctr.F_UserName like CONCAT('%',#{queryTeachingRecordDto.keyword},'%')
|
||||
</if>
|
||||
<if test="queryTeachingRecordDto.startDate != null and queryTeachingRecordDto.startDate != ''">
|
||||
<![CDATA[ and DATE_FORMAT(fctr.F_Date, '%Y-%m-%d') >= #{queryTeachingRecordDto.startDate} ]]>
|
||||
</if>
|
||||
<if test="queryTeachingRecordDto.endDate != null and queryTeachingRecordDto.endDate != ''">
|
||||
<![CDATA[ and DATE_FORMAT(fctr.F_Date, '%Y-%m-%d') <= #{queryTeachingRecordDto.endDate} ]]>
|
||||
</if>
|
||||
<if test="null != queryTeachingRecordDto.categoryId and '' != queryTeachingRecordDto.categoryId">
|
||||
<choose>
|
||||
<when test="-1 == queryTeachingRecordDto.categoryId">
|
||||
and fctss.F_CategoryId is null
|
||||
</when>
|
||||
<otherwise>
|
||||
and fctss.F_CategoryId = #{queryTeachingRecordDto.categoryId}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fctss.F_DeleteMark asc, fctss.F_Sort asc;
|
||||
</select>
|
||||
<select id="getSuperiorTeachingSummary"
|
||||
resultType="jnpf.model.cultivate.vo.teaching.SuperiorTeachingSummaryVo">
|
||||
SELECT
|
||||
SUM( 1 ) count,
|
||||
FORMAT(SUM( fctr.F_VideoDuration )/60, 2) duration
|
||||
FROM
|
||||
ftb_cultivate_teaching_record fctr
|
||||
LEFT JOIN ftb_cultivate_teaching_stu fcts ON fcts.F_RecordId = fctr.F_Id
|
||||
WHERE
|
||||
fctr.F_Type = 1
|
||||
AND fctr.F_DeleteMark = 0
|
||||
AND fcts.F_DeleteMark = 0
|
||||
<if test="storeId != null and storeId != ''">
|
||||
AND fctr.F_StoreId = #{storeId}
|
||||
</if>
|
||||
<if test="loginUserId != null and loginUserId != ''">
|
||||
AND fcts.F_UserId = #{loginUserId}
|
||||
</if>
|
||||
</select>
|
||||
<!-- 根据storeIds查询每个门店下的带教数量 -->
|
||||
<select id="getStoreRecordCount" resultType="jnpf.model.cultivate.v2.teaching.vo.StoreTeachingVo">
|
||||
select s.storeId, count(tr.F_Id) recordCount
|
||||
from (
|
||||
values
|
||||
<foreach collection="queryDto.storeIdList" item="item" separator=",">
|
||||
row(#{item})
|
||||
</foreach>
|
||||
) as s(storeId)
|
||||
left join ftb_cultivate_teaching_record tr
|
||||
on s.storeId = tr.F_StoreId and tr.F_DeleteMark = 0 and tr.F_Type = #{queryDto.type} and tr.F_Date between #{queryDto.startDate} and #{queryDto.endDate}
|
||||
left join ftb_cultivate_teaching_skill ts
|
||||
on tr.F_SkillId = ts.F_Id
|
||||
<if test="null != queryDto.keyword and '' != queryDto.keyword">
|
||||
and (instr(ts.F_Name, #{queryDto.keyword}) > 0
|
||||
<if test="null != recordIds and recordIds.size > 0">
|
||||
or tr.F_Id in
|
||||
<foreach collection="recordIds" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
</if>
|
||||
group by s.storeId
|
||||
order by recordCount desc, s.storeId desc
|
||||
</select>
|
||||
<!-- 根据storeId查询门店下的带教记录 -->
|
||||
<select id="getStoreRecordList" resultType="jnpf.model.cultivate.v2.teaching.vo.V2TeachingRecordVo">
|
||||
select tr.F_Id id, tr.F_Type `type`, tr.F_StoreId storeId, tr.F_StoreName storeName, tr.F_SkillId skillId, ts.F_Name skillName, tr.F_UserId userId,
|
||||
tr.F_UserName userName, tr.F_PostId postId, tr.F_PostName postName, tr.F_Date `date`, ta.F_Id approveId, ta.F_ApproveStatus approveStatus,
|
||||
case when uv.F_UserId is not null then 1 else 0 end viewed
|
||||
from ftb_cultivate_teaching_record tr
|
||||
left join ftb_cultivate_teaching_skill ts on tr.F_SkillId = ts.F_Id
|
||||
left join ftb_cultivate_teaching_approve ta on tr.F_Id = ta.F_TeachId
|
||||
left join ftb_cultivate_user_view uv on uv.F_BizId = tr.F_Id and uv.F_UserId = #{userId}
|
||||
where tr.F_Type = #{queryDto.type} and tr.F_DeleteMark = 0 and tr.F_StoreId = #{queryDto.storeId}
|
||||
<if test="null != queryDto.keyword and '' != queryDto.keyword">
|
||||
and instr(ts.F_Name, #{queryDto.keyword}) > 0
|
||||
<if test="null != recordIds and recordIds.size > 0">
|
||||
or tr.F_Id in
|
||||
<foreach collection="recordIds" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</if>
|
||||
and tr.F_Date between #{queryDto.startDate} and #{queryDto.endDate}
|
||||
order by tr.F_CreatorTime desc
|
||||
</select>
|
||||
<!-- 查询带教详情 -->
|
||||
<select id="getTeachingDetailById" resultType="jnpf.model.cultivate.v2.teaching.vo.TeachingDetailVo">
|
||||
select tr.F_Id id, tr.F_Type `type`, tr.F_StoreId storeId, tr.F_StoreName storeName, tr.F_SkillId skillId, ts.F_Name skillName, ts.F_Description skillDescription,
|
||||
tr.F_UserId userId, tr.F_UserName userName, tr.F_PostId postId, tr.F_PostName postName, tr.F_Date `date`, tr.F_Remark remark
|
||||
from ftb_cultivate_teaching_record tr
|
||||
left join ftb_cultivate_teaching_skill ts on tr.F_SkillId = ts.F_Id
|
||||
where tr.F_Id = #{bizId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.TeachingSkillMapper">
|
||||
|
||||
<!-- 查询重复的技能点index -->
|
||||
<select id="getDistinctCountBatch" resultType="java.lang.Integer">
|
||||
select t.idx
|
||||
from (
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
row(#{item.index}, #{item.skillName})
|
||||
</foreach>
|
||||
) as t (idx, skillName)
|
||||
join ftb_cultivate_teaching_skill c on t.skillName = c.F_Name and c.F_DeleteMark = 0
|
||||
</select>
|
||||
<!-- 查询技能点列表[下拉] -->
|
||||
<select id="getDownSkillList" resultType="jnpf.model.cultivate.v2.exam.vo.SkillVo">
|
||||
select F_Id skillId, F_Name skillName, F_Description skillDescription
|
||||
from ftb_cultivate_teaching_skill where (
|
||||
F_DeleteMark = 0
|
||||
<if test="null != categoryId and '' != categoryId and -1 != categoryId">
|
||||
and F_CategoryId = #{categoryId}
|
||||
</if>
|
||||
<if test="null != categoryId and '' != categoryId and -1 == categoryId">
|
||||
and COALESCE(F_CategoryId, '') = ''
|
||||
</if>
|
||||
)
|
||||
<if test="null != skillId">
|
||||
or F_Id = #{skillId}
|
||||
</if>
|
||||
order by F_Sort asc, F_CreatorTime desc
|
||||
</select>
|
||||
<!-- 查询所有技能点 -->
|
||||
<select id="getAllSkillList" resultType="jnpf.model.cultivate.vo.teaching.SkillInfoVo">
|
||||
select F_Id id, case when F_CategoryId is null then -1 else F_CategoryId end pId, F_Name `name`, 2 as `type`, F_Sort sort
|
||||
from ftb_cultivate_teaching_skill where F_DeleteMark = 0
|
||||
union all
|
||||
select F_Id id, '0' as pId, F_Name `name`, 1 as `type`, ROW_NUMBER() OVER (ORDER BY F_Id DESC) AS sort
|
||||
from ftb_cultivate_label where F_EnabledMark = 0 and F_Type = 3
|
||||
</select>
|
||||
<!-- 查询有子级的分类 -->
|
||||
<select id="getCategoryHasChild" resultType="java.lang.String">
|
||||
select distinct F_CategoryId
|
||||
from ftb_cultivate_teaching_skill
|
||||
where F_DeleteMark = 0 and F_CategoryId in
|
||||
<foreach collection="categoryIds" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.cultivate.mapper.TeachingStudentMapper">
|
||||
|
||||
|
||||
<select id="queryTeachingDataList" resultType="jnpf.model.cultivate.vo.teaching.TeachingDataListVo">
|
||||
SELECT
|
||||
fcts.F_RecordId recordId,
|
||||
fctr.F_UserId teachingUserId,
|
||||
fctr.F_UserName teachingUsername,
|
||||
fcts.F_UserName username,
|
||||
fcts.F_PostName postName,
|
||||
fcts.F_UserId userId,
|
||||
fctss.F_Id skillId,
|
||||
fctr.F_StoreId storeId,
|
||||
SUM( 1 ) teachingCount
|
||||
FROM
|
||||
ftb_cultivate_teaching_stu fcts
|
||||
LEFT JOIN ftb_cultivate_teaching_record fctr on fctr.F_Id = fcts.F_RecordId
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fctss on fctss.F_Id = fctr.F_SkillId
|
||||
|
||||
<where>
|
||||
<if test="queryTeachingRecordDto.recordIds != null and queryTeachingRecordDto.recordIds.size > 0">
|
||||
and fcts.F_RecordId in
|
||||
<foreach collection="queryTeachingRecordDto.recordIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="queryTeachingRecordDto.keyword != null and queryTeachingRecordDto.keyword != ''">
|
||||
and fcts.F_Username like concat('%', #{queryTeachingRecordDto.keyword}, '%')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY CONCAT(fcts.F_UserId, fctr.F_StoreId)
|
||||
ORDER BY teachingCount desc, username asc
|
||||
</select>
|
||||
|
||||
<select id="querySkillKeyList" resultType="jnpf.model.cultivate.vo.teaching.SkillKeyVo">
|
||||
SELECT
|
||||
fctss.F_Id skillId,
|
||||
fctss.F_Name skillName,
|
||||
CONCAT(fcts.F_UserId, fctr.F_StoreId) skillKey
|
||||
FROM
|
||||
ftb_cultivate_teaching_stu fcts
|
||||
LEFT JOIN ftb_cultivate_teaching_record fctr on fctr.F_Id = fcts.F_RecordId
|
||||
LEFT JOIN ftb_cultivate_teaching_skill fctss on fctss.F_Id = fctr.F_SkillId
|
||||
|
||||
<where>
|
||||
<if test="queryTeachingRecordDto.recordIds != null and queryTeachingRecordDto.recordIds.size > 0">
|
||||
and fcts.F_RecordId in
|
||||
<foreach collection="queryTeachingRecordDto.recordIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="queryTeachingRecordDto.keyword != null and queryTeachingRecordDto.keyword != ''">
|
||||
and fcts.F_Username like concat('%', #{queryTeachingRecordDto.keyword}, '%')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fctss.F_DeleteMark asc, fctss.F_Sort asc
|
||||
</select>
|
||||
<!-- 根据用户名查询带教记录ids -->
|
||||
<select id="getRecordIdByKeyword" resultType="java.lang.String">
|
||||
select distinct F_RecordId
|
||||
from ftb_cultivate_teaching_stu
|
||||
where instr(F_Username, #{keyword}) > 0 and F_DeleteMark = 0
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user