From 8853292babb2ad94de4a3207966f1e83b767cd2d Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Sun, 17 Sep 2023 16:38:34 +0800
Subject: [PATCH] 新增流程节点进程查询接口
---
src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java | 62 +++----------------------------
1 files changed, 6 insertions(+), 56 deletions(-)
diff --git a/src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java b/src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java
index 5c551f1..49831ac 100644
--- a/src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java
+++ b/src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java
@@ -119,13 +119,6 @@
//判断实操成绩是否为空
if (null == examScore.getLearnGrade()) {
//如果为空,之间修改理论成绩和总成绩
- //总成绩
- if (userVO.getAge() <= 50) {
- examScore.setAllGrade(Math.round(examScore.getTheoryGrade()/2));
- }
- if (userVO.getAge() > 50) {
- examScore.setAllGrade(Math.round(examScore.getTheoryGrade()/2));
- }
if (examScore.getTheoryGrade() >= 60) {
//实操成绩暂未录入
examScore.setQualified(2);
@@ -141,7 +134,6 @@
//内网培训报名,人员,成绩数据同步
String s1 =
"update exam_score set theory_grade = " + "'" + examScore.getTheoryGrade() + "'" +
- ",all_grade = " + "'" + examScore.getAllGrade() + "'" +
",qualified = " + "'" + examScore.getQualified() + "'" +
" " + "where id = " + "'" + examScore.getId() + "';"+
"update sys_training_registration set is_exam = " + "'" + trainingRegistration.getIsExam() + "'" +
@@ -153,7 +145,7 @@
myAsyncService.dataSync(s1);
} else {
//实操成绩不为空
- if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) {
+ if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() ==0) {
//合格
examScore.setQualified(0);
//设置为未制证的状态
@@ -166,10 +158,10 @@
int count = userService.getSecurityPaperCount(pre);
String result = null;
if (count == 0) {
- result = pre + "00001";
+ result = pre + "000001";
} else {
//格式化
- DecimalFormat decimalFormat = new DecimalFormat("00000");
+ DecimalFormat decimalFormat = new DecimalFormat("000000");
count++;
result = pre + (decimalFormat.format(count));
}
@@ -210,22 +202,6 @@
//不合格
examScore.setQualified(1);
}
- //总成绩
- if (userVO.getAge() <= 50) {
- if (null != examScore.getTheoryGrade()) {
- examScore.setAllGrade(Math.round((examScore.getTheoryGrade() + examScore.getLearnGrade()) / 2));
- } else {
- examScore.setAllGrade(Math.round(examScore.getLearnGrade() / 2));
- }
- }
- if (userVO.getAge() > 50) {
- if (null != examScore.getTheoryGrade()) {
- examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(examScore.getTheoryGrade() * 0.5)))
- + Integer.parseInt(String.valueOf(Math.round(examScore.getLearnGrade() * 0.5))));
- } else {
- examScore.setAllGrade(Math.round(examScore.getLearnGrade() / 2));
- }
- }
//更新成绩数据
examScoreService.updateById(examScore);
@@ -233,7 +209,6 @@
//内网培训报名,人员,成绩数据同步
String s1 =
"update exam_score set theory_grade = " + "'" + examScore.getTheoryGrade() + "'" +
- ",all_grade = " + "'" + examScore.getAllGrade() + "'" +
",qualified = " + "'" + examScore.getQualified() + "'" +
" " + "where id = " + "'" + examScore.getId() + "';"+
"update sys_training_registration set is_exam = " + "'" + trainingRegistration.getIsExam() + "'" +
@@ -290,13 +265,6 @@
//判断实操成绩是否为空
if (null == examScore.getLearnGrade()) {
//如果为空,之间修改理论成绩和总成绩
- //总成绩
- if (userVO.getAge() <= 50) {
- examScore.setAllGrade(Math.round(examScore.getTheoryGrade()/2));
- }
- if (userVO.getAge() > 50) {
- examScore.setAllGrade(Math.round(examScore.getTheoryGrade()/2));
- }
if (examScore.getTheoryGrade() >= 60) {
//实操成绩暂未录入
examScore.setQualified(2);
@@ -312,7 +280,6 @@
//内网培训报名,人员,成绩数据同步
String s1 =
"update exam_score set theory_grade = " + "'" + examScore.getTheoryGrade() + "'" +
- ",all_grade = " + "'" + examScore.getAllGrade() + "'" +
",qualified = " + "'" + examScore.getQualified() + "'" +
" " + "where id = " + "'" + examScore.getId() + "';"+
"update sys_training_registration set is_exam = " + "'" + trainingRegistration.getIsExam() + "'" +
@@ -323,7 +290,7 @@
myAsyncService.dataSync(s1);
} else {
//实操成绩不为空
- if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) {
+ if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() == 0) {
//合格
examScore.setQualified(0);
//设置为未制证的状态
@@ -336,10 +303,10 @@
int count = userService.getSecurityPaperCount(pre);
String result = null;
if (count == 0) {
- result = pre + "00001";
+ result = pre + "000001";
} else {
//格式化
- DecimalFormat decimalFormat = new DecimalFormat("00000");
+ DecimalFormat decimalFormat = new DecimalFormat("000000");
count++;
result = pre + (decimalFormat.format(count));
}
@@ -375,22 +342,6 @@
//不合格
examScore.setQualified(1);
}
- //总成绩
- if (userVO.getAge() <= 50) {
- if (null != examScore.getTheoryGrade()) {
- examScore.setAllGrade(Math.round((examScore.getTheoryGrade() + examScore.getLearnGrade()) / 2));
- } else {
- examScore.setAllGrade(Math.round(examScore.getLearnGrade() / 2));
- }
- }
- if (userVO.getAge() > 50) {
- if (null != examScore.getTheoryGrade()) {
- examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(examScore.getTheoryGrade() * 0.5)))
- + Integer.parseInt(String.valueOf(Math.round(examScore.getLearnGrade() * 0.5))));
- } else {
- examScore.setAllGrade(Math.round(examScore.getLearnGrade() / 2));
- }
- }
//更新成绩数据
examScoreService.updateById(examScore);
@@ -398,7 +349,6 @@
//内网培训报名,人员,成绩数据同步
String s1 =
"update exam_score set theory_grade = " + "'" + examScore.getTheoryGrade() + "'" +
- ",all_grade = " + "'" + examScore.getAllGrade() + "'" +
",qualified = " + "'" + examScore.getQualified() + "'" +
" " + "where id = " + "'" + examScore.getId() + "';"+
"update sys_training_registration set is_exam = " + "'" + trainingRegistration.getIsExam() + "'" +
--
Gitblit v1.9.3