| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.training.vo.TrainingRegistrationVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | @RequestMapping("/apply") |
| | | public class ApplyController { |
| | | |
| | | // @Autowired |
| | | private final ApplyService applyService; |
| | | |
| | | // @Autowired |
| | | private final ExamPaperService examPaperService; |
| | | |
| | | // @Autowired |
| | | private final IUserService userService; |
| | | |
| | | // @Autowired |
| | | private final ExamScoreService examScoreService; |
| | | |
| | | /** |
| | |
| | | examScore.setExamId(apply.getExamId().toString()); |
| | | examScore.setUserId(apply.getUserId().toString()); |
| | | examScore.setApplyId(apply.getId()); |
| | | examScore.setCandidateNo(apply.getCandidateNo()); |
| | | examScore.setExamTime(new Date()); |
| | | //新增考试成绩 |
| | | examScoreService.save(examScore); |
| | | //内网同步 |
| | | Long sid = examScore.getId(); |
| | | String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(examScore.getExamTime()); |
| | | String s = "insert into exam_score(id,exam_time,user_id,exam_id,apply_id) " + |
| | | "values(" + "'" + sid + "'" + "," + "'" + |
| | | format + "'" + "," + "'" + |
| | | examScore.getUserId() +"'" + "," +"'" + |
| | | examScore.getExamId() +"'" + "," +"'" + |
| | | examScore.getApplyId() + "'" + ")"; |
| | | String s = "insert into exam_score(id,candidate_no,exam_time,user_id,exam_id,apply_id) " + |
| | | "values(" + "'" + sid + "'" + |
| | | "," + "'" + examScore.getCandidateNo() + "'" + |
| | | "," + "'" + format + "'" + |
| | | "," + "'" + examScore.getUserId() +"'" + |
| | | "," +"'" + examScore.getExamId() +"'" + |
| | | "," +"'" + examScore.getApplyId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | return examScore; |
| | | } |