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/ExamScoreServiceImpl.java | 68 ++++++++++-----------------------
1 files changed, 21 insertions(+), 47 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 74173bb..398f695 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
@@ -184,10 +184,10 @@
"update sys_apply set is_exam = " + apply1.getIsExam() + " " + "where id = " + "'" + apply1.getId() + "';" +
"update blade_user set is_apply = " + user.getIsApply() + " " + "where id = " + "'" + user.getId() + "'";
//FtpUtil.sqlFileUpload(s);
- myAsyncService.FTP(s);
+ myAsyncService.dataSync(s);
}
- //模拟考试
+ //培训考试
if (paper.getExamType() == 2) {
TrainingRegistration trainingRegistration = new TrainingRegistration();
trainingRegistration.setCandidateNo(examScore.getCandidateNo());
@@ -208,9 +208,10 @@
"update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + " " + "where id = " + "'" + trainingRegistration1.getId() + "';" +
"update blade_user set is_train = " + user.getIsTrain() + " " + "where id = " + "'" + user.getId() + "'";
//FtpUtil.sqlFileUpload(s);
- myAsyncService.FTP(s);
+ myAsyncService.dataSync(s);
}
-
+ //设置提交时间
+ examScore.setExamEndTime(new Date());
//设置考试ID
examScore.setExamId(examScore.getPapersId().toString());
//设置理论得分
@@ -239,7 +240,7 @@
",qualified = " + "'" + examScore.getQualified() + "'" +
" " + "where id = " + "'" + examScore.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
if (i > 0) {
//返回结果
@@ -291,9 +292,14 @@
//查询当前保安信息
UserVO user = userService.getUserAgeById(Long.parseLong(examScore.getUserId()));
//设置实操成绩
- examScore.setLearnGrade(examScoreExcel.getLearnGrade());
+ if (examScoreExcel.getLearnGrade().equals("合格")) {
+ examScore.setLearnGrade(0);
+ }
+ if (examScoreExcel.getLearnGrade().equals("不合格")) {
+ examScore.setLearnGrade(1);
+ }
if (null != examScore.getTheoryGrade()) {
- if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) {
+ if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() == 0) {
//合格
examScore.setQualified(0);
//修改制证状态为未制证
@@ -306,10 +312,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));
}
@@ -340,44 +346,12 @@
",user_type = " + "'" + user.getUserType() + "'" +
" " + "where id = " + "'" + user.getId() + "'";
-// String s1 =
-// "insert into sys_security_paper(id,number,create_time,people_name,id_card_no,user_id,apply_id,exam_id) " +
-// "values(" + "'" + securityPaper.getId() + "'"
-// + "," + "'" + securityPaper.getNumber() +"'"
-// + "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(securityPaper.getCreateTime()) +"'"
-// + "," + "'" + securityPaper.getPeopleName() + "'"
-// + "," + "'" + securityPaper.getIdCardNo() + "'"
-// + "," + "'" + securityPaper.getUserId() + "'"
-// + "," + "'" + securityPaper.getApplyId() + "'"
-// + "," +"'" + securityPaper.getExamId() + "'" + ");" +
-// "update blade_user set hold = " + "'" + user.getHold() + "'" +
-// ",securitynumber = " + "'" + user.getSecuritynumber() + "'" +
-// ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" +
-// ",user_type = " + "'" + user.getUserType() + "'" +
-// " " + "where id = " + "'" + user.getId() + "'";
- //FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
}
} else {
//不合格
examScore.setQualified(1);
- }
- //总成绩
- if (user.getAge() <= 50) {
- if (null != examScore.getTheoryGrade()) {
- examScore.setAllGrade(Math.round((examScore.getTheoryGrade() + examScoreExcel.getLearnGrade()) / 2));
- } else {
- examScore.setAllGrade(Math.round(examScoreExcel.getLearnGrade() / 2));
- }
- }
- if (user.getAge() > 50) {
- if (null != examScore.getTheoryGrade()) {
- examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(examScore.getTheoryGrade() * 0.5)))
- + Integer.parseInt(String.valueOf(Math.round(examScoreExcel.getLearnGrade() * 0.5))));
- } else {
- examScore.setAllGrade(Math.round(examScoreExcel.getLearnGrade() / 2));
- }
}
//内网同步
@@ -387,7 +361,7 @@
",qualified = " + "'" + examScore.getQualified() + "'" +
" " + "where id = " + "'" + examScore.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
//更新成绩数据
baseMapper.updateById(examScore);
} else {
@@ -656,7 +630,7 @@
" " + "where id = " + "'" + user.getId() + "';" +
"delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
return true;
}
@@ -687,7 +661,7 @@
" " + "where id = " + "'" + user.getId() + "';" +
"delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
return true;
}
@@ -819,7 +793,7 @@
"update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + " " + "where id = " + "'" + trainingRegistration1.getId() + "';" +
"update blade_user set is_train = " + user.getIsTrain() + " " + "where id = " + "'" + user.getId() + "'";
//FtpUtil.sqlFileUpload(s);
- myAsyncService.FTP(s);
+ myAsyncService.dataSync(s);
//设置理论得分
score.setTheoryGrade(count);
@@ -847,7 +821,7 @@
",qualified = " + "'" + score.getQualified() + "'" +
" " + "where id = " + "'" + score.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
if (i > 0) {
//返回结果
--
Gitblit v1.9.3