| | |
| | | import org.springblade.modules.securitypaper.service.SecurityPaperService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.service.TrainingRegistrationService; |
| | |
| | | |
| | | @Autowired |
| | | private SecurityPaperService securityPaperService; |
| | | @Autowired |
| | | private MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | |
| | | " " + "where id = " + "'" + trainingRegistration.getId() + "';"+ |
| | | "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | //实操成绩不为空 |
| | | if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) { |
| | |
| | | securityPaper.setPeopleName(user.getRealName()); |
| | | securityPaper.setExamId(Long.parseLong(examScore.getExamId())); |
| | | securityPaper.setApplyId(examScore.getApplyId()); |
| | | securityPaper.setSource(1); |
| | | //新增保安员证信息 |
| | | securityPaperService.save(securityPaper); |
| | | |
| | |
| | | + "," + "'" + securityPaper.getUserId() + "'" |
| | | + "," + "'" + securityPaper.getApplyId() + "'" |
| | | + "," +"'" + securityPaper.getExamId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //不合格 |
| | |
| | | ",user_type = " + "'" + user.getUserType() + "'" + |
| | | ",is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | //审核时间 |
| | |
| | | " " + "where id = " + "'" + trainingRegistration.getId() + "';"+ |
| | | "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | //实操成绩不为空 |
| | | if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) { |
| | |
| | | user.setHold("1"); |
| | | //更新保安数据 |
| | | userService.updateById(user); |
| | | |
| | | //生成保安证的同时向保安证管理表中插入一条数据 |
| | | SecurityPaper securityPaper = new SecurityPaper(); |
| | | securityPaper.setUserId(user.getId()); |
| | | securityPaper.setNumber(result); |
| | | securityPaper.setCreateTime(new Date()); |
| | | securityPaper.setIdCardNo(user.getCardid()); |
| | | securityPaper.setPeopleName(user.getRealName()); |
| | | securityPaper.setExamId(Long.parseLong(examScore.getExamId())); |
| | | securityPaper.setApplyId(examScore.getApplyId()); |
| | | securityPaper.setSource(1); |
| | | //新增保安员证信息 |
| | | securityPaperService.save(securityPaper); |
| | | |
| | | // String s1 = |
| | | // "update blade_user set hold = " + "'" + user.getHold() + "'" + |
| | |
| | | ",user_type = " + "'" + user.getUserType() + "'" + |
| | | ",is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | //审核时间 |