智慧保安后台管理-外网项目备份
Administrator
2021-11-26 21a54886661bfa3459e4f768d2be991c03574b90
1.保安公司查询修改
2.报名列表修改
3.考试列表查询修改
4.保安员导入修改
3 files modified
40 ■■■■■ changed files
src/main/java/org/springblade/modules/system/entity/User.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/training/service/impl/TrainingRegistrationServiceImpl.java 31 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/entity/User.java
@@ -260,4 +260,10 @@
     * 持枪编码
     */
    private String guncode;
    /**
     * 押运人员设备编号
     */
    @TableField("equipment_code")
    private String equipmentCode;
}
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -275,6 +275,9 @@
        <if test="user.status!=null and user.status != ''">
            and bu.status = #{user.status}
        </if>
        <if test="user.equipmentCode!=null">
            and bu.equipment_code !="" and bu.equipment_code is not null and bu.equipment_code !=null
        </if>
        <if test="user.jurisdiction!=null and user.jurisdiction != ''">
            and bu.jurisdiction = #{user.jurisdiction}
        </if>
src/main/java/org/springblade/modules/training/service/impl/TrainingRegistrationServiceImpl.java
@@ -14,7 +14,9 @@
import org.springblade.modules.apply.entity.Apply;
import org.springblade.modules.apply.excel.ApplyInfoExcel;
import org.springblade.modules.exam.entity.ExamPaper;
import org.springblade.modules.exam.entity.ExamScore;
import org.springblade.modules.exam.service.ExamPaperService;
import org.springblade.modules.exam.service.ExamScoreService;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.service.IUserDeptService;
import org.springblade.modules.system.service.IUserService;
@@ -49,6 +51,8 @@
    private final ExamPaperService examPaperService;
    private final AbsentRecordsService absentRecordsService;
    private final ExamScoreService examScoreService;
    @Override
@@ -360,19 +364,40 @@
                        //新增
                        absentRecordsService.save(absentRecords);
                        //新增成绩,成绩为0
                        ExamScore examScore = new ExamScore();
                        examScore.setCandidateNo(trainingRegistration1.getCandidateNo());
                        examScore.setTheoryGrade(0);
                        examScore.setAllGrade(0);
                        examScore.setQualified(3);
                        examScore.setUserId(user.getId().toString());
                        examScore.setApplyId(trainingRegistration1.getId());
                        examScore.setExamId(trainingRegistration1.getTrainExamId());
                        //新增
                        examScoreService.save(examScore);
                        //内网同步
                        String s =
                            "update sys_training_registration set cancel = " + trainingRegistration1.getCancel() +
                                ",is_exam = " + "'" + trainingRegistration1.getIsExam() + "'" +
                                " " + "where id = " + "'" + trainingRegistration1.getId() + "';" +
                                "update blade_user set is_train = " + user.getIsTrain() + " " + "where id = " + "'" + user.getId() + "';" +
                                "insert into sys_absent_records(id,user_id,create_time,exam_id,apply_id,candidate_no) " +
                            "update blade_user set is_train = " + user.getIsTrain() + " " + "where id = " + "'" + user.getId() + "';" +
                            "insert into sys_absent_records(id,user_id,create_time,exam_id,apply_id,candidate_no) " +
                                "values(" + "'" + absentRecords.getId() + "'" + ","
                                + "'" + absentRecords.getUserId() + "'" + ","
                                + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(absentRecords.getCreateTime()) + "'" + ","
                                + "'" + absentRecords.getExamId() + "'" + ","
                                + "'" + absentRecords.getApplyId() + "'" + ","
                                + "'" + absentRecords.getCandidateNo() + "'" + ")";
                                + "'" + absentRecords.getCandidateNo() + "'" + ");" +
                            "insert into exam_score(id,candidate_no,theory_grade,all_grade,qualified,user_id,apply_id,exam_id) " +
                                "values(" + "'" + examScore.getId() + "'" + ","
                                + "'" + examScore.getCandidateNo() + "'" + ","
                                + "'" + examScore.getTheoryGrade() + "'" + ","
                                + "'" + examScore.getAllGrade() + "'" + ","
                                + "'" + examScore.getQualified() + "'" + ","
                                + "'" + examScore.getUserId() + "'" + ","
                                + "'" + examScore.getApplyId() + "'" + ","
                                + "'" + examScore.getExamId() + "'" + ")";
                        FtpUtil.sqlFileUpload(s);
                    }
                }