| | |
| | | import org.springblade.modules.exam.service.ExamScoreService; |
| | | 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.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.service.TrainingRegistrationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | * @author zhongrj |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements ApplyService { |
| | | |
| | | @Autowired |
| | | private ExamPaperService examPaperService; |
| | | |
| | | private final ExamPaperService examPaperService; |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | private final IUserService userService; |
| | | |
| | | private final TrainingRegistrationService trainingRegistrationService; |
| | | @Autowired |
| | | private TrainingRegistrationService trainingRegistrationService; |
| | | @Autowired |
| | | private MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页数据 |
| | |
| | | + "'" + examId + "'" + "," |
| | | +"'" + apply1.getIsExam() + "'" + ");" + |
| | | "update blade_user set is_apply = " + "'" + user1.getIsApply() + "'" +"where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.dataSync(s); |
| | | }else { |
| | | if (user1.getIsApply()!=1) { |
| | | Apply apply1 = new Apply(); |
| | |
| | | + "'" + examId + "'" + "," |
| | | +"'" + apply1.getIsExam() + "'" + ");" + |
| | | "update blade_user set is_apply = " + "'" + user1.getIsApply() + "'" +"where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | String s1 = |
| | | "update sys_apply set is_exam = " + apply1.getIsExam() + " " +"where id = " + "'" + apply1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | //模拟考 |
| | | if (apply.getExamType()==2){ |
| | |
| | | trainingRegistration.setId(apply.getId()); |
| | | //考试中 |
| | | trainingRegistration.setIsExam(3); |
| | | // trainingRegistration.setIsExam(1); |
| | | trainingRegistrationService.updateById(trainingRegistration); |
| | | |
| | | String s1 = |
| | | "update sys_training_registration set is_exam = " + trainingRegistration.getIsExam() + " " +"where id = " + "'" + trainingRegistration.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | |