智慧保安后台管理-外网
钟日健
2022-06-27 59b41b126c4a8642fcb489f0dea954b16465318d
src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java
@@ -204,7 +204,7 @@
            user = userService.getUserAgeById(Long.parseLong(trainingRegistration1.getUserId()));
            //修改用户的培训状态,理论考试结束
            user.setIsTrain(3);
            age = user.getAge();
//            age = user.getAge();
            userService.updateById(user);
            //修改为已考试
            trainingRegistration1.setIsExam(2);
@@ -224,12 +224,12 @@
         //设置理论得分
         examScore.setTheoryGrade(theoryGrade);
         //计算总成绩,此时没有实操成绩,总成绩为实操成绩和理论成绩和的一半
         if (age <= 50) {
            examScore.setAllGrade(Math.round(theoryGrade / 2));
         }
         if (age > 50) {
            examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(theoryGrade * 0.5))));
         }
         examScore.setAllGrade(Math.round(theoryGrade / 2));
//         if (age <= 50) {
//         }
//         if (age > 50) {
//            examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(theoryGrade * 0.5))));
//         }
         //设置状态
         if (theoryGrade >= 60) {
            examScore.setQualified(2);
@@ -237,7 +237,7 @@
            examScore.setQualified(1);
         }
         //修改成绩数据
//         int i = baseMapper.updateById(examScore);
         int i = baseMapper.updateById(examScore);
         String s1 =
            "update exam_score set exam_id = " + examScore.getExamId() +
@@ -249,10 +249,10 @@
         //FtpUtil.sqlFileUpload(s1);
         myAsyncService.FTP(s1);
//         if (i > 0) {
         if (i > 0) {
            //返回结果
            return true;
//         }
         }
      }
      //返回结果
      return false;
@@ -444,7 +444,7 @@
//                                 //去生成保安证编号
//                                 String pre = SecurityPaperUtil.getSecurityPaper();
//                                 //查询当前年份已有的保安证编号
////                                 int count = userService.getSecurityPaperCount(pre);
//                                 int count = userService.getSecurityPaperCount(pre);
//                                 //需调用内网查询
//                                 //生成随机数
//                                 String uuid = UUID.randomUUID().toString();