智慧保安后台管理-外网
Administrator
2021-09-30 b74f8511ee18cb0556aec293a8431752d610fec5
src/main/java/org/springblade/modules/apply/controller/ApplyController.java
@@ -32,6 +32,7 @@
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;
@@ -55,12 +56,16 @@
@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;
   /**
@@ -697,18 +702,20 @@
      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;
   }