| | |
| | | this.updateById(trainingRegistration1); |
| | | //修改保安报名状态 |
| | | User user = userService.getById(trainingRegistration1.getUserId()); |
| | | //考试结束 |
| | | user.setIsTrain(3); |
| | | userService.updateById(user); |
| | | //生成缺考记录 |
| | | AbsentRecords absentRecords = new AbsentRecords(); |
| | | absentRecords.setUserId(user.getId()); |
| | | absentRecords.setApplyId(trainingRegistration1.getId()); |
| | | absentRecords.setExamId(Long.parseLong(trainingRegistration1.getTrainExamId())); |
| | | absentRecords.setCandidateNo(trainingRegistration1.getCandidateNo()); |
| | | absentRecords.setCreateTime(new Date()); |
| | | //新增 |
| | | absentRecordsService.save(absentRecords); |
| | | if (null != user) { |
| | | //考试结束 |
| | | user.setIsTrain(3); |
| | | userService.updateById(user); |
| | | //生成缺考记录 |
| | | AbsentRecords absentRecords = new AbsentRecords(); |
| | | absentRecords.setUserId(user.getId()); |
| | | absentRecords.setApplyId(trainingRegistration1.getId()); |
| | | absentRecords.setExamId(Long.parseLong(trainingRegistration1.getTrainExamId())); |
| | | absentRecords.setCandidateNo(trainingRegistration1.getCandidateNo()); |
| | | absentRecords.setCreateTime(new Date()); |
| | | //新增 |
| | | 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); |
| | | //新增成绩,成绩为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) " + |
| | | "values(" + "'" + absentRecords.getId() + "'" + "," |
| | | + "'" + absentRecords.getUserId() + "'" + "," |
| | | + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(absentRecords.getCreateTime()) + "'" + "," |
| | | + "'" + absentRecords.getExamId() + "'" + "," |
| | | + "'" + absentRecords.getApplyId() + "'" + "," |
| | | + "'" + 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); |
| | | //内网同步 |
| | | 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) " + |
| | | "values(" + "'" + absentRecords.getId() + "'" + "," |
| | | + "'" + absentRecords.getUserId() + "'" + "," |
| | | + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(absentRecords.getCreateTime()) + "'" + "," |
| | | + "'" + absentRecords.getExamId() + "'" + "," |
| | | + "'" + absentRecords.getApplyId() + "'" + "," |
| | | + "'" + 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); |
| | | } |
| | | } |
| | | } |
| | | }); |