| | |
| | | } else { |
| | | examScore.setQualified(1); |
| | | } |
| | | // 这个值已经有了,不要重复赋值,前端赋值可能是错的 |
| | | if (null!=examScore.getExamTime()){ |
| | | examScore.setExamTime(null); |
| | | } |
| | | //修改成绩数据 |
| | | int i = baseMapper.updateById(examScore); |
| | | |
| | |
| | | examScore.setLearnGrade(1); |
| | | } |
| | | if (null != examScore.getTheoryGrade()) { |
| | | //理论成绩大于60,实操成绩为合格 |
| | | if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() == 0) { |
| | | //合格 |
| | | examScore.setQualified(0); |
| | |
| | | |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | }else{ |
| | | //其他情况全为不合格 |
| | | examScore.setQualified(1); |
| | | } |
| | | } else { |
| | | //不合格 |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean refreshTrainExamInfo(UpdateParamVo updateParamVo) { |
| | | public Object refreshTrainExamInfo(UpdateParamVo updateParamVo) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (null != updateParamVo.getScoreId()) { |
| | | ExamScore examScore = this.getById(updateParamVo.getScoreId()); |
| | | //获取成绩数据,准考证号,用户id,报名培训id,考试id |
| | |
| | | } |
| | | //培训考试 |
| | | if (paper.getExamType() == 2) { |
| | | // 判断是否在考试时间内,如果不是则无法重置 |
| | | long l = System.currentTimeMillis(); |
| | | long endTime = paper.getEndTime().getTime(); |
| | | if (l>endTime){ |
| | | map.put("msg","已过考试时间,无法重置考试"); |
| | | map.put("code",400); |
| | | // 已过考试时间 |
| | | return map; |
| | | } |
| | | //1.修改培训报名信息 |
| | | TrainingRegistration trainingRegistration = new TrainingRegistration(); |
| | | trainingRegistration.setId(examScore.getApplyId()); |
| | |
| | | this.removeById(updateParamVo.getScoreId()); |
| | | |
| | | //4.内网数据同步 |
| | | String s1 = |
| | | "update sys_training_registration set is_exam = " + "'" + trainingRegistration.getIsExam() + "'" + |
| | | " " + "where id = " + "'" + trainingRegistration.getId() + "';" + |
| | | "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "';" + |
| | | "delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | return true; |
| | | // String s1 = |
| | | // "update sys_training_registration set is_exam = " + "'" + trainingRegistration.getIsExam() + "'" + |
| | | // " " + "where id = " + "'" + trainingRegistration.getId() + "';" + |
| | | // "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" + |
| | | // " " + "where id = " + "'" + user.getId() + "';" + |
| | | // "delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'"; |
| | | // //FtpUtil.sqlFileUpload(s1); |
| | | // myAsyncService.dataSync(s1); |
| | | map.put("msg","重置成功"); |
| | | map.put("code",200); |
| | | // 已过考试时间 |
| | | return map; |
| | | } |
| | | } |
| | | } |
| | |
| | | //返回数据 |
| | | return objectList; |
| | | } |
| | | |
| | | @Override |
| | | public List<ExamScoreVO> getList(ExamScoreVO examScoreVO) { |
| | | return baseMapper.getList(examScoreVO); |
| | | } |
| | | } |