| | |
| | | "update sys_apply set is_exam = " + apply1.getIsExam() + " " + "where id = " + "'" + apply1.getId() + "';" + |
| | | "update blade_user set is_apply = " + user.getIsApply() + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | } |
| | | //培训考试 |
| | |
| | | "update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + " " + "where id = " + "'" + trainingRegistration1.getId() + "';" + |
| | | "update blade_user set is_train = " + user.getIsTrain() + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | //设置提交时间 |
| | | examScore.setExamEndTime(new Date()); |
| | |
| | | ",qualified = " + "'" + examScore.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | if (i > 0) { |
| | | //返回结果 |
| | |
| | | //查询当前保安信息 |
| | | UserVO user = userService.getUserAgeById(Long.parseLong(examScore.getUserId())); |
| | | //设置实操成绩 |
| | | examScore.setLearnGrade(examScoreExcel.getLearnGrade()); |
| | | if (examScoreExcel.getLearnGrade().equals("合格")) { |
| | | examScore.setLearnGrade(0); |
| | | } |
| | | if (examScoreExcel.getLearnGrade().equals("不合格")) { |
| | | examScore.setLearnGrade(1); |
| | | } |
| | | if (null != examScore.getTheoryGrade()) { |
| | | if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) { |
| | | if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() == 0) { |
| | | //合格 |
| | | examScore.setQualified(0); |
| | | //修改制证状态为未制证 |
| | |
| | | int count = userService.getSecurityPaperCount(pre); |
| | | String result = null; |
| | | if (count == 0) { |
| | | result = pre + "00001"; |
| | | result = pre + "000001"; |
| | | } else { |
| | | //格式化 |
| | | DecimalFormat decimalFormat = new DecimalFormat("00000"); |
| | | DecimalFormat decimalFormat = new DecimalFormat("000000"); |
| | | count++; |
| | | result = pre + (decimalFormat.format(count)); |
| | | } |
| | |
| | | ",user_type = " + "'" + user.getUserType() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | |
| | | // String s1 = |
| | | // "insert into sys_security_paper(id,number,create_time,people_name,id_card_no,user_id,apply_id,exam_id) " + |
| | | // "values(" + "'" + securityPaper.getId() + "'" |
| | | // + "," + "'" + securityPaper.getNumber() +"'" |
| | | // + "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(securityPaper.getCreateTime()) +"'" |
| | | // + "," + "'" + securityPaper.getPeopleName() + "'" |
| | | // + "," + "'" + securityPaper.getIdCardNo() + "'" |
| | | // + "," + "'" + securityPaper.getUserId() + "'" |
| | | // + "," + "'" + securityPaper.getApplyId() + "'" |
| | | // + "," +"'" + securityPaper.getExamId() + "'" + ");" + |
| | | // "update blade_user set hold = " + "'" + user.getHold() + "'" + |
| | | // ",securitynumber = " + "'" + user.getSecuritynumber() + "'" + |
| | | // ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" + |
| | | // ",user_type = " + "'" + user.getUserType() + "'" + |
| | | // " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | } else { |
| | | //不合格 |
| | | examScore.setQualified(1); |
| | | } |
| | | //总成绩 |
| | | if (user.getAge() <= 50) { |
| | | if (null != examScore.getTheoryGrade()) { |
| | | examScore.setAllGrade(Math.round((examScore.getTheoryGrade() + examScoreExcel.getLearnGrade()) / 2)); |
| | | } else { |
| | | examScore.setAllGrade(Math.round(examScoreExcel.getLearnGrade() / 2)); |
| | | } |
| | | } |
| | | if (user.getAge() > 50) { |
| | | if (null != examScore.getTheoryGrade()) { |
| | | examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(examScore.getTheoryGrade() * 0.5))) |
| | | + Integer.parseInt(String.valueOf(Math.round(examScoreExcel.getLearnGrade() * 0.5)))); |
| | | } else { |
| | | examScore.setAllGrade(Math.round(examScoreExcel.getLearnGrade() / 2)); |
| | | } |
| | | } |
| | | |
| | | //内网同步 |
| | |
| | | ",qualified = " + "'" + examScore.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | //更新成绩数据 |
| | | baseMapper.updateById(examScore); |
| | | } else { |
| | |
| | | " " + "where id = " + "'" + user.getId() + "';" + |
| | | "delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | return true; |
| | | } |
| | |
| | | " " + "where id = " + "'" + user.getId() + "';" + |
| | | "delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | return true; |
| | | } |
| | |
| | | "update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + " " + "where id = " + "'" + trainingRegistration1.getId() + "';" + |
| | | "update blade_user set is_train = " + user.getIsTrain() + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | //设置理论得分 |
| | | score.setTheoryGrade(count); |
| | |
| | | ",qualified = " + "'" + score.getQualified() + "'" + |
| | | " " + "where id = " + "'" + score.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | if (i > 0) { |
| | | //返回结果 |