智慧保安后台管理-外网项目备份
Administrator
2022-01-04 2649be9534e68592660ecd4d03f14edcdc9b5c45
src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
@@ -290,7 +290,7 @@
        exam.*,
        user.jurisdiction,
        user.real_name securityName,
        ke.exam_name examName,sis.enterpriseName trainingUnitName
        ke.exam_name examName,sis.enterpriseName trainingUnitName,ke.start_time examStartTime
        FROM
        exam_score exam
        left join blade_user user on exam.user_id = user.id
@@ -302,20 +302,23 @@
        WHERE
        1 = 1
        and ke.exam_type = 2
        <if test="information.jurisdiction!=null and information.jurisdiction!='' and information.jurisdiction!='1372091709474910209'">
            and (sj.id = #{information.jurisdiction} or sj.parent_id = #{information.jurisdiction})
        <if test="examScore.jurisdiction!=null and examScore.jurisdiction!='' and examScore.jurisdiction!='1372091709474910209'">
            and (sj.id = #{examScore.jurisdiction} or sj.parent_id = #{examScore.jurisdiction})
        </if>
        <if test="information.securityName!=null and information.securityName!=''">
            AND user.real_name like concat('%',#{information.securityName},'%')
        <if test="examScore.securityName!=null and examScore.securityName!=''">
            AND user.real_name like concat('%',#{examScore.securityName},'%')
        </if>
        <if test="information.trainingUnitName!=null and information.trainingUnitName!=''">
            AND sis.enterpriseName like concat('%',#{information.trainingUnitName},'%')
        <if test="examScore.trainingUnitName!=null and examScore.trainingUnitName!=''">
            AND sis.enterpriseName like concat('%',#{examScore.trainingUnitName},'%')
        </if>
        <if test="information.deptid!=null and information.deptid!=''">
            AND user.dept_id = #{information.deptid}
        <if test="examScore.deptId!=null and examScore.deptId!=''">
            AND user.dept_id = #{examScore.deptId}
        </if>
        <if test="information.qualified!=null">
            AND exam.qualified = #{information.qualified}
        <if test="examScore.month!=null and examScore.month!=''">
            AND date_format(ke.start_time,'%Y-%m') = #{examScore.month}
        </if>
        <if test="examScore.qualified!=null">
            AND exam.qualified = #{examScore.qualified}
        </if>
    </select>
@@ -460,6 +463,7 @@
            WHERE
                qualified = 0
                and training_unit_id = #{information.departmentid}
                and YEAR ( ke.start_time ) = YEAR ( now() )
                <if test="information.deptid!=null and information.deptid!=''">
                    and bu.dept_id = #{information.deptid}
                </if>
@@ -485,6 +489,7 @@
            WHERE
                qualified = 1
                and training_unit_id = #{information.departmentid}
                and YEAR ( ke.start_time ) = YEAR ( now() )
                <if test="information.deptid!=null and information.deptid!=''">
                    and bu.dept_id = #{information.deptid}
                </if>