From 59b41b126c4a8642fcb489f0dea954b16465318d Mon Sep 17 00:00:00 2001
From: 钟日健 <5689795+arsn@user.noreply.gitee.com>
Date: Mon, 27 Jun 2022 14:44:25 +0800
Subject: [PATCH] 去除年龄判断

---
 src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java b/src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java
index e53148a..70d3814 100644
--- a/src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java
+++ b/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();

--
Gitblit v1.9.3