【修改】试卷任务出试卷 知识点由名称改为id

This commit is contained in:
YOHO\20373
2025-06-09 11:24:59 +08:00
parent a100427181
commit 2716a51950
3 changed files with 16 additions and 16 deletions

View File

@@ -175,14 +175,14 @@ public class EducationPaperServiceImpl implements IEducationPaperService
//获取试卷方案对象 //获取试卷方案对象
String pointNames = educationPaperScheme.getPointNames(); String pointNames = educationPaperScheme.getPointNames();
//知识点id //知识点id
List<String> pointList ; List<String> pointList = null;
//知识点名称 //知识点名称
List<String> pointName =new ArrayList<>(); List<String> pointName =new ArrayList<>();
if (pointNames!=null){ if (pointNames!=null){
pointList = Arrays.asList(pointNames.split(",")); pointList = Arrays.asList(pointNames.split(","));
if (pointList!=null){ // if (pointList!=null){
pointName= educationPaperTaskMapper.selectPointByid(pointList); // pointName= educationPaperTaskMapper.selectPointByid(pointList);
} // }
} }
String keywords = educationPaperScheme.getKeywords(); String keywords = educationPaperScheme.getKeywords();
List<String> keywordList =new ArrayList<>(); List<String> keywordList =new ArrayList<>();
@@ -195,7 +195,7 @@ public class EducationPaperServiceImpl implements IEducationPaperService
//根据方案,去查找 试题表,返回试题id //根据方案,去查找 试题表,返回试题id
Long requiredTenantId = TenantContextHolder.getRequiredTenantId(); Long requiredTenantId = TenantContextHolder.getRequiredTenantId();
List<String> quId = educationPaperMapper.selectQuByPaperScheme(pointName,keywordList,educationPaperScheme,taskSpecialty,requiredTenantId); List<String> quId = educationPaperMapper.selectQuByPaperScheme(pointList,keywordList,educationPaperScheme,taskSpecialty,requiredTenantId);
//把第i张卷子方案的试题全加一起 //把第i张卷子方案的试题全加一起
examQuestionIds.addAll(quId); examQuestionIds.addAll(quId);
@@ -378,14 +378,14 @@ public class EducationPaperServiceImpl implements IEducationPaperService
//获取试卷方案对象 //获取试卷方案对象
String pointNames = educationPaperScheme.getPointNames(); String pointNames = educationPaperScheme.getPointNames();
//知识点id //知识点id
List<String> pointList ; List<String> pointList =null;
//知识点名称 //知识点名称
List<String> pointName =new ArrayList<>(); List<String> pointName =new ArrayList<>();
if (pointNames!=null){ if (pointNames!=null){
pointList = Arrays.asList(pointNames.split(",")); pointList = Arrays.asList(pointNames.split(","));
if (pointList!=null){ // if (pointList!=null){
pointName= educationPaperTaskMapper.selectPointByid(pointList); // pointName= educationPaperTaskMapper.selectPointByid(pointList);
} // }
} }
String keywords = educationPaperScheme.getKeywords(); String keywords = educationPaperScheme.getKeywords();
List<String> keywordList =new ArrayList<>(); List<String> keywordList =new ArrayList<>();
@@ -398,7 +398,7 @@ public class EducationPaperServiceImpl implements IEducationPaperService
//根据方案,去查找 试题表,返回试题id //根据方案,去查找 试题表,返回试题id
Long requiredTenantId = TenantContextHolder.getRequiredTenantId(); Long requiredTenantId = TenantContextHolder.getRequiredTenantId();
List<String> quId = educationPaperMapper.selectQuByPaperScheme(pointName,keywordList,educationPaperScheme,taskSpecialty,requiredTenantId); List<String> quId = educationPaperMapper.selectQuByPaperScheme(pointList,keywordList,educationPaperScheme,taskSpecialty,requiredTenantId);
//把第i张卷子方案的试题全加一起 //把第i张卷子方案的试题全加一起
examQuestionIds.addAll(quId); examQuestionIds.addAll(quId);

View File

@@ -252,10 +252,10 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
List<String> pointId = param.getPointIds(); List<String> pointId = param.getPointIds();
System.out.println(pointId + "pointd"); System.out.println(pointId + "pointd");
//根据知识点的id查找对应的sp_name //根据知识点的id查找对应的sp_name
List<String> pointNames = new ArrayList<>(); // List<String> pointNames = new ArrayList<>();
if (pointId != null&&pointId.size()>0) { // if (pointId != null&&pointId.size()>0) {
pointNames = educationPaperTaskMapper.selectPointByid(pointId); // pointNames = educationPaperTaskMapper.selectPointByid(pointId);
} // }
//难度 //难度
String quLevel = param.getQuLevel(); String quLevel = param.getQuLevel();
if ("3".equals(quLevel)) { if ("3".equals(quLevel)) {
@@ -272,7 +272,7 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
// System.out.println(keywords+"keywords"); // System.out.println(keywords+"keywords");
// System.out.println(quLevel+"quLevel"); // System.out.println(quLevel+"quLevel");
// System.out.println(spName+"spName"); // System.out.println(spName+"spName");
return educationPaperTaskMapper.getQuCount(taskSpecialty, spName, quLevel, pointNames, keywords,requiredTenantId); return educationPaperTaskMapper.getQuCount(taskSpecialty, spName, quLevel, pointId, keywords,requiredTenantId);
} }
@Override @Override

View File

@@ -70,7 +70,7 @@ public interface ErrorCodeConstants {
// ========== 试卷人员 1-001-301-000 ========== // ========== 试卷人员 1-001-301-000 ==========
ErrorCode DEMO03_PAPER_STUDENT_EXISTS = new ErrorCode(1_001_301_001, "请选择学生"); ErrorCode DEMO03_PAPER_STUDENT_EXISTS = new ErrorCode(1_001_301_001, "请选择学生");
// ========== 试卷参数 1-001-401-000 ========== // ========== 试卷参数 1-001-401-000 ==========
ErrorCode DEMO03_PAPER_SESSION_EXISTS = new ErrorCode(1_001_401_001, "请开启考场设置!"); ErrorCode DEMO03_PAPER_SESSION_EXISTS = new ErrorCode(1_001_401_001, "请开启考场设置!");