From de1edfafcb3e4287ea28d1cd3096281e0f526a21 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Mon, 04 Dec 2023 19:40:44 +0800
Subject: [PATCH] 设置登录有效期

---
 src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java |   24 +++++++++++++-----------
 1 files changed, 13 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 bab329d..6ae2101 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) {
 				//返回结果
@@ -329,6 +330,7 @@
 											securityPaper.setPeopleName(user.getRealName());
 											securityPaper.setExamId(Long.parseLong(examScore.getExamId()));
 											securityPaper.setApplyId(examScore.getApplyId());
+											securityPaper.setSource(1);
 											//新增保安员证信息
 											securityPaperService.save(securityPaper);
 
@@ -355,7 +357,7 @@
 //													",user_type = " + "'" + user.getUserType() + "'" +
 //													" " + "where id = " + "'" + user.getId() + "'";
 											//FtpUtil.sqlFileUpload(s1);
-											myAsyncService.FTP(s1);
+											myAsyncService.dataSync(s1);
 										}
 									}
 								} else {
@@ -386,7 +388,7 @@
 										",qualified = " + "'" + examScore.getQualified() + "'" +
 										" " + "where id = " + "'" + examScore.getId() + "'";
 								//FtpUtil.sqlFileUpload(s1);
-								myAsyncService.FTP(s1);
+								myAsyncService.dataSync(s1);
 								//更新成绩数据
 								baseMapper.updateById(examScore);
 							} else {
@@ -655,7 +657,7 @@
 							" " + "where id = " + "'" + user.getId() + "';" +
 							"delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'";
 					//FtpUtil.sqlFileUpload(s1);
-					myAsyncService.FTP(s1);
+					myAsyncService.dataSync(s1);
 
 					return true;
 				}
@@ -686,7 +688,7 @@
 							" " + "where id = " + "'" + user.getId() + "';" +
 							"delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'";
 					//FtpUtil.sqlFileUpload(s1);
-					myAsyncService.FTP(s1);
+					myAsyncService.dataSync(s1);
 
 					return true;
 				}
@@ -818,7 +820,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);
@@ -846,7 +848,7 @@
 				",qualified = " + "'" + score.getQualified() + "'" +
 				" " + "where id = " + "'" + score.getId() + "'";
 		//FtpUtil.sqlFileUpload(s1);
-		myAsyncService.FTP(s1);
+		myAsyncService.dataSync(s1);
 
 		if (i > 0) {
 			//返回结果

--
Gitblit v1.9.3