智慧保安后台管理-外网项目备份
考试成绩修改查询修改,派遣查询接口修改,定时任务打印时间,修改为23点执行
5 files modified
20 ■■■■■ changed files
src/main/java/org/springblade/modules/crontab/Crontab.java 6 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml 2 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/mapper/ScoreAuditRecordsMapper.xml 6 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/vo/ScoreAuditRecordsVO.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/training/mapper/TrainingRegistrationMapper.xml 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/crontab/Crontab.java
@@ -7,6 +7,9 @@
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
 * 定时任务
 * @author zhongrj
@@ -22,10 +25,11 @@
     * 定时任务,每天凌晨1点执行一次,
     * 自动处理之前报了名,申请了考试又没有去考试的,做缺考标记,并将报名状态修改为已取消报名
     */
    @Scheduled(cron = "* * 1 * * ?")
    @Scheduled(cron = "* * 23 * * ?")
//    @Scheduled(cron = "*/30 * * * * ?")
    @GetMapping("/examApplyStatus")
    public void examApplyStatus(){
        System.out.println("执行时间:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
        //自动处理之前报了名,申请了考试又没有去考试的,做缺考标记,并将报名状态修改为已取消报名
        trainingRegistrationService.examApplyStatus();
    }
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
@@ -31,6 +31,8 @@
        on
            sj.id = sdu.jurisdiction
        where 1=1
        and bu.status =1
        and bu.is_deleted = 0
        <if test="dispatcher.jurisdiction!=null  and dispatcher.jurisdiction!='' and dispatcher.jurisdiction!='1372091709474910209'">
            and (sj.id = #{dispatcher.jurisdiction} or sj.parent_id = #{dispatcher.jurisdiction})
        </if>
src/main/java/org/springblade/modules/exam/mapper/ScoreAuditRecordsMapper.xml
@@ -11,7 +11,8 @@
            bu.sex,bu.cardid idCardNo,
            ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( bu.cardid,7,4),0) age,
            bu1.real_name applyRealName,
            ke.exam_name examName
            ke.exam_name examName,
            bt1.dept_name applyUnitName
        FROM
            sys_score_audit_records ssar
        left join
@@ -71,6 +72,9 @@
        <if test="scoreAuditRecords.trainUnitId!=null and  scoreAuditRecords.trainUnitId!=''">
            and bt1.id = #{scoreAuditRecords.trainUnitId}
        </if>
        <if test="scoreAuditRecords.applyUnitName!=null and  scoreAuditRecords.applyUnitName!=''">
            and bt1.dept_name like concat('%',#{scoreAuditRecords.applyUnitName},'%')
        </if>
        <if test="scoreAuditRecords.status!=null">
            and ssar.status = #{scoreAuditRecords.status}
        </if>
src/main/java/org/springblade/modules/exam/vo/ScoreAuditRecordsVO.java
@@ -71,4 +71,9 @@
     */
    private String trainUnitId;
    /**
     * 申请人所在单位名称
     */
    private String applyUnitName;
}
src/main/java/org/springblade/modules/training/mapper/TrainingRegistrationMapper.xml
@@ -67,6 +67,7 @@
        <if test="trainingRegistration.isTrain!=null">
            and bu.is_train = #{trainingRegistration.isTrain}
        </if>
    </select>
    <!--报名培训详情信息-->