初始代码
This commit is contained in:
20
yunzhupaas-train/pom.xml
Normal file
20
yunzhupaas-train/pom.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>yunzhupaas-java-boot</artifactId>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<version>5.2.0-RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>yunzhupaas-train</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>yunzhupaas-train-entity</module>
|
||||
<module>yunzhupaas-train-biz</module>
|
||||
<module>yunzhupaas-train-controller</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
27
yunzhupaas-train/yunzhupaas-train-biz/pom.xml
Normal file
27
yunzhupaas-train/yunzhupaas-train-biz/pom.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>yunzhupaas-train</artifactId>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<version>5.2.0-RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>yunzhupaas-train-biz</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<artifactId>yunzhupaas-train-entity</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<artifactId>yunzhupaas-generater-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yunzhupaas.mapper;
|
||||
|
||||
|
||||
import com.yunzhupaas.entity.TrainExamRecordsEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
|
||||
/**
|
||||
* 考试记录
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-06
|
||||
*/
|
||||
public interface TrainExamRecordsMapper extends SuperMapper<TrainExamRecordsEntity> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.yunzhupaas.mapper;
|
||||
|
||||
|
||||
import com.yunzhupaas.dto.EssayQuestionDTO;
|
||||
import com.yunzhupaas.entity.TrainLibraryEssayQuestionEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
public interface TrainLibraryEssayQuestionMapper extends SuperMapper<TrainLibraryEssayQuestionEntity> {
|
||||
|
||||
List<TrainLibraryEssayQuestionEntity> getListByParentId(@Param("parentId") String id);
|
||||
|
||||
void updateResult(@Param("items") List<EssayQuestionDTO> essayQuestions);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yunzhupaas.mapper;
|
||||
|
||||
|
||||
import com.yunzhupaas.entity.TrainLibraryJudgmentEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
public interface TrainLibraryJudgmentMapper extends SuperMapper<TrainLibraryJudgmentEntity> {
|
||||
|
||||
List<TrainLibraryJudgmentEntity> getListByParentId(@Param("parentId") String id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yunzhupaas.mapper;
|
||||
|
||||
|
||||
import com.yunzhupaas.entity.TrainLibraryMoreEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
public interface TrainLibraryMoreMapper extends SuperMapper<TrainLibraryMoreEntity> {
|
||||
|
||||
List<TrainLibraryMoreEntity> getListByParentId(@Param("parentId") String id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yunzhupaas.mapper;
|
||||
|
||||
|
||||
import com.yunzhupaas.entity.TrainLibrarySingleEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
public interface TrainLibrarySingleMapper extends SuperMapper<TrainLibrarySingleEntity> {
|
||||
|
||||
List<TrainLibrarySingleEntity> getListByParentId(@Param("parentId") String id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yunzhupaas.mapper;
|
||||
|
||||
|
||||
import com.yunzhupaas.entity.TrainExamRecordsEntity;
|
||||
import com.yunzhupaas.entity.TrainTestPaperLibraryEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yunzhupaas.base.mapper.SuperMapper;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
public interface TrainTestPaperLibraryMapper extends SuperMapper<TrainTestPaperLibraryEntity> {
|
||||
|
||||
void saveRecords(TrainExamRecordsEntity recordsEntity);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.yunzhupaas.service;
|
||||
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.dto.InReadPaperDTO;
|
||||
import com.yunzhupaas.dto.OutExamRecordsDetailDTO;
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
import com.yunzhupaas.model.trainexamrecords.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 考试记录
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-06
|
||||
*/
|
||||
public interface TrainExamRecordsService extends SuperService<TrainExamRecordsEntity> {
|
||||
List<TrainExamRecordsEntity> getList(TrainExamRecordsPagination trainExamRecordsPagination);
|
||||
|
||||
List<TrainExamRecordsEntity> getTypeList(TrainExamRecordsPagination trainExamRecordsPagination,String dataType);
|
||||
|
||||
TrainExamRecordsEntity getInfo(String id);
|
||||
|
||||
void delete(TrainExamRecordsEntity entity);
|
||||
|
||||
void create(TrainExamRecordsEntity entity);
|
||||
|
||||
boolean update(String id, TrainExamRecordsEntity entity);
|
||||
|
||||
String checkForm(TrainExamRecordsForm form,int i);
|
||||
|
||||
void saveOrUpdate(TrainExamRecordsForm trainExamRecordsForm,String id, boolean isSave) throws Exception;
|
||||
|
||||
ActionResult<OutExamRecordsDetailDTO> examRecordsDetail(String id);
|
||||
|
||||
ActionResult readPaper(InReadPaperDTO in);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.yunzhupaas.service;
|
||||
|
||||
import com.yunzhupaas.dto.EssayQuestionDTO;
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
public interface TrainLibraryEssayQuestionService extends SuperService<TrainLibraryEssayQuestionEntity> {
|
||||
List<TrainLibraryEssayQuestionEntity> getListByParentId(String id);
|
||||
|
||||
void updateResult(List<EssayQuestionDTO> essayQuestions);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yunzhupaas.service;
|
||||
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
public interface TrainLibraryJudgmentService extends SuperService<TrainLibraryJudgmentEntity> {
|
||||
List<TrainLibraryJudgmentEntity> getListByParentId(String id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yunzhupaas.service;
|
||||
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
public interface TrainLibraryMoreService extends SuperService<TrainLibraryMoreEntity> {
|
||||
List<TrainLibraryMoreEntity> getListByParentId(String id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yunzhupaas.service;
|
||||
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
public interface TrainLibrarySingleService extends SuperService<TrainLibrarySingleEntity> {
|
||||
List<TrainLibrarySingleEntity> getListByParentId(String id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.yunzhupaas.service;
|
||||
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.dto.OnlineExamSubmitDTO;
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.base.service.SuperService;
|
||||
import com.yunzhupaas.model.traintestpaperlibrary.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
public interface TrainTestPaperLibraryService extends SuperService<TrainTestPaperLibraryEntity> {
|
||||
List<TrainTestPaperLibraryEntity> getList(TrainTestPaperLibraryPagination trainTestPaperLibraryPagination);
|
||||
|
||||
List<TrainTestPaperLibraryEntity> getTypeList(TrainTestPaperLibraryPagination trainTestPaperLibraryPagination,String dataType);
|
||||
|
||||
TrainTestPaperLibraryEntity getInfo(String id);
|
||||
|
||||
void delete(TrainTestPaperLibraryEntity entity);
|
||||
|
||||
void create(TrainTestPaperLibraryEntity entity);
|
||||
|
||||
boolean update(String id, TrainTestPaperLibraryEntity entity);
|
||||
|
||||
String checkForm(TrainTestPaperLibraryForm form,int i);
|
||||
|
||||
void saveOrUpdate(TrainTestPaperLibraryForm trainTestPaperLibraryForm,String id, boolean isSave) throws Exception;
|
||||
|
||||
ActionResult onlineExamSubmit(OnlineExamSubmitDTO onlineExamSubmitDTO);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,956 @@
|
||||
package com.yunzhupaas.service.impl;
|
||||
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.dto.*;
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.mapper.TrainExamRecordsMapper;
|
||||
import com.yunzhupaas.service.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yunzhupaas.model.trainexamrecords.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.yunzhupaas.util.GeneraterSwapUtil;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import lombok.Cleanup;
|
||||
import com.yunzhupaas.database.plugins.DynamicSourceGeneratorInterface;
|
||||
import com.yunzhupaas.database.util.DynamicDataSourceUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import com.yunzhupaas.i18n.util.I18nUtil;
|
||||
import com.yunzhupaas.exception.DataException;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.yunzhupaas.base.model.ColumnDataModel;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.yulichang.toolkit.JoinWrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.yunzhupaas.model.QueryAllModel;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import com.yunzhupaas.util.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.yunzhupaas.base.UserInfo;
|
||||
import com.yunzhupaas.permission.entity.UserEntity;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
|
||||
/**
|
||||
* 考试记录
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-06
|
||||
*/
|
||||
@Service
|
||||
public class TrainExamRecordsServiceImpl extends SuperServiceImpl<TrainExamRecordsMapper, TrainExamRecordsEntity>
|
||||
implements TrainExamRecordsService {
|
||||
@Autowired
|
||||
private GeneraterSwapUtil generaterSwapUtil;
|
||||
@Autowired
|
||||
private TrainExamRecordsService trainExamRecordsService;
|
||||
@Autowired
|
||||
private UserProvider userProvider;
|
||||
@Autowired
|
||||
private TrainTestPaperLibraryService trainTestPaperLibraryService;
|
||||
@Autowired
|
||||
private TrainLibrarySingleService trainLibrarySingleService;
|
||||
@Autowired
|
||||
private TrainLibraryMoreService trainLibraryMoreService;
|
||||
@Autowired
|
||||
private TrainLibraryJudgmentService trainLibraryJudgmentService;
|
||||
@Autowired
|
||||
private TrainLibraryEssayQuestionService trainLibraryEssayQuestionService;
|
||||
|
||||
@Override
|
||||
public List<TrainExamRecordsEntity> getList(TrainExamRecordsPagination trainExamRecordsPagination) {
|
||||
return getTypeList(trainExamRecordsPagination, trainExamRecordsPagination.getDataType());
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@Override
|
||||
public List<TrainExamRecordsEntity> getTypeList(TrainExamRecordsPagination trainExamRecordsPagination,
|
||||
String dataType) {
|
||||
String userId = userProvider.get().getUserId();
|
||||
Map<String, Class> tableClassMap = new HashMap<>();
|
||||
tableClassMap.put("make_train_exam_records", TrainExamRecordsEntity.class);
|
||||
tableClassMap.put("make_train_library_essay_question", TrainLibraryEssayQuestionEntity.class);
|
||||
tableClassMap.put("make_train_library_judgment", TrainLibraryJudgmentEntity.class);
|
||||
tableClassMap.put("make_train_library_more", TrainLibraryMoreEntity.class);
|
||||
tableClassMap.put("make_train_library_single", TrainLibrarySingleEntity.class);
|
||||
|
||||
MPJLambdaWrapper<TrainExamRecordsEntity> wrapper = JoinWrappers
|
||||
.lambda("make_train_exam_records", TrainExamRecordsEntity.class)
|
||||
.selectCollection(TrainLibraryEssayQuestionEntity.class,
|
||||
TrainExamRecordsEntity::getTrainLibraryEssayQuestion)
|
||||
.leftJoin(TrainLibraryEssayQuestionEntity.class, "make_train_library_essay_question",
|
||||
TrainLibraryEssayQuestionEntity::getFbankId, TrainExamRecordsEntity::getId)
|
||||
.selectCollection(TrainLibraryJudgmentEntity.class, TrainExamRecordsEntity::getTrainLibraryJudgment)
|
||||
.leftJoin(TrainLibraryJudgmentEntity.class, "make_train_library_judgment",
|
||||
TrainLibraryJudgmentEntity::getFbankId, TrainExamRecordsEntity::getId)
|
||||
.selectCollection(TrainLibraryMoreEntity.class, TrainExamRecordsEntity::getTrainLibraryMore)
|
||||
.leftJoin(TrainLibraryMoreEntity.class, "make_train_library_more", TrainLibraryMoreEntity::getFbankId,
|
||||
TrainExamRecordsEntity::getId)
|
||||
.selectCollection(TrainLibrarySingleEntity.class, TrainExamRecordsEntity::getTrainLibrarySingle)
|
||||
.leftJoin(TrainLibrarySingleEntity.class, "make_train_library_single",
|
||||
TrainLibrarySingleEntity::getFbankId, TrainExamRecordsEntity::getId)
|
||||
.selectAll(TrainExamRecordsEntity.class);
|
||||
MPJLambdaWrapper<TrainExamRecordsEntity> wrapper2 = JoinWrappers
|
||||
.lambda("make_train_exam_records", TrainExamRecordsEntity.class)
|
||||
.leftJoin(TrainLibraryEssayQuestionEntity.class, "make_train_library_essay_question",
|
||||
TrainLibraryEssayQuestionEntity::getFbankId, TrainExamRecordsEntity::getId)
|
||||
.leftJoin(TrainLibraryJudgmentEntity.class, "make_train_library_judgment",
|
||||
TrainLibraryJudgmentEntity::getFbankId, TrainExamRecordsEntity::getId)
|
||||
.leftJoin(TrainLibraryMoreEntity.class, "make_train_library_more", TrainLibraryMoreEntity::getFbankId,
|
||||
TrainExamRecordsEntity::getId)
|
||||
.leftJoin(TrainLibrarySingleEntity.class, "make_train_library_single",
|
||||
TrainLibrarySingleEntity::getFbankId, TrainExamRecordsEntity::getId)
|
||||
.distinct().select(TrainExamRecordsEntity::getId);
|
||||
|
||||
QueryAllModel queryAllModel = new QueryAllModel();
|
||||
queryAllModel.setWrapper(wrapper);
|
||||
queryAllModel.setClassMap(tableClassMap);
|
||||
queryAllModel.setDbLink(TrainExamRecordsConstant.DBLINKID);
|
||||
// 数据过滤
|
||||
boolean isPc = ServletUtil.getHeader("yunzhupaas-origin").equals("pc");
|
||||
String columnData = !isPc ? TrainExamRecordsConstant.getAppColumnData()
|
||||
: TrainExamRecordsConstant.getColumnData();
|
||||
ColumnDataModel columnDataModel = JsonUtil.getJsonToBean(columnData, ColumnDataModel.class);
|
||||
String ruleJson = !isPc ? JsonUtil.getObjectToString(columnDataModel.getRuleListApp())
|
||||
: JsonUtil.getObjectToString(columnDataModel.getRuleList());
|
||||
queryAllModel.setRuleJson(ruleJson);
|
||||
// 高级查询
|
||||
boolean hasSuperQuery = true;
|
||||
if (hasSuperQuery) {
|
||||
queryAllModel.setSuperJson(trainExamRecordsPagination.getSuperQueryJson());
|
||||
}
|
||||
// 数据权限
|
||||
boolean pcPermission = true;
|
||||
boolean appPermission = false;
|
||||
if (isPc && pcPermission && !userProvider.get().getIsAdministrator()) {
|
||||
queryAllModel.setModuleId(trainExamRecordsPagination.getMenuId());
|
||||
queryAllModel.setModuleId(trainExamRecordsPagination.getMenuId());
|
||||
}
|
||||
if (!isPc && appPermission && !userProvider.get().getIsAdministrator()) {
|
||||
queryAllModel.setModuleId(trainExamRecordsPagination.getMenuId());
|
||||
}
|
||||
// 拼接复杂条件
|
||||
wrapper = generaterSwapUtil.getConditionAllTable(queryAllModel);
|
||||
queryAllModel.setWrapper(wrapper2);
|
||||
wrapper2 = generaterSwapUtil.getConditionAllTable(queryAllModel);
|
||||
// 其他条件拼接
|
||||
otherConditions(trainExamRecordsPagination, wrapper, isPc);
|
||||
otherConditions(trainExamRecordsPagination, wrapper2, isPc);
|
||||
|
||||
if ("0".equals(dataType)) {
|
||||
com.github.pagehelper.Page<Object> objects = PageHelper.startPage(
|
||||
(int) trainExamRecordsPagination.getCurrentPage(), (int) trainExamRecordsPagination.getPageSize(),
|
||||
true);
|
||||
List<TrainExamRecordsEntity> userIPage = this.selectJoinList(TrainExamRecordsEntity.class, wrapper2);
|
||||
List<Object> collect = userIPage.stream().map(t -> t.getId()).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(collect)) {
|
||||
wrapper.in(TrainExamRecordsEntity::getId, collect);
|
||||
}
|
||||
List<TrainExamRecordsEntity> result = this.selectJoinList(TrainExamRecordsEntity.class, wrapper);
|
||||
return trainExamRecordsPagination.setData(result, objects.getTotal());
|
||||
} else {
|
||||
List<TrainExamRecordsEntity> list = this.selectJoinList(TrainExamRecordsEntity.class, wrapper);
|
||||
if ("2".equals(dataType)) {
|
||||
List<String> selectIds = Arrays.asList(trainExamRecordsPagination.getSelectIds());
|
||||
return list.stream().filter(t -> selectIds.contains(t.getId().toString())).collect(Collectors.toList());
|
||||
} else {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 其他条件拼接
|
||||
*/
|
||||
private void otherConditions(TrainExamRecordsPagination trainExamRecordsPagination,
|
||||
MPJLambdaWrapper<TrainExamRecordsEntity> wrapper, boolean isPc) {
|
||||
String databaseName;
|
||||
try {
|
||||
@Cleanup
|
||||
Connection cnn = DynamicDataSourceUtil.getCurrentConnection();
|
||||
databaseName = cnn.getMetaData().getDatabaseProductName().trim();
|
||||
} catch (SQLException e) {
|
||||
throw new DataException(e.getMessage());
|
||||
}
|
||||
wrapper.isNull(TrainExamRecordsEntity::getFlowId);
|
||||
// 关键词
|
||||
if (ObjectUtil.isNotEmpty(trainExamRecordsPagination.getYunzhupaasKeyword())) {
|
||||
}
|
||||
// 普通查询
|
||||
if (isPc) {
|
||||
if (ObjectUtil.isNotEmpty(trainExamRecordsPagination.getFexaminers())) {
|
||||
List<String> idList = new ArrayList<>();
|
||||
try {
|
||||
String[][] fexaminers = JsonUtil.getJsonToBean(trainExamRecordsPagination.getFexaminers(),
|
||||
String[][].class);
|
||||
for (int i = 0; i < fexaminers.length; i++) {
|
||||
if (fexaminers[i].length > 0) {
|
||||
idList.add(JsonUtil.getObjectToString(Arrays.asList(fexaminers[i])));
|
||||
}
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
try {
|
||||
List<String> fexaminers = JsonUtil.getJsonToList(trainExamRecordsPagination.getFexaminers(),
|
||||
String.class);
|
||||
if (fexaminers.size() > 0) {
|
||||
idList.addAll(fexaminers);
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
idList.add(String.valueOf(trainExamRecordsPagination.getFexaminers()));
|
||||
}
|
||||
}
|
||||
wrapper.and(t -> {
|
||||
idList.forEach(tt -> {
|
||||
if (StringUtil.isNotEmpty(tt) && "Microsoft SQL Server".equalsIgnoreCase(databaseName)) {
|
||||
tt = tt.replaceFirst("\\[", "[[]");
|
||||
}
|
||||
t.like(TrainExamRecordsEntity::getFexaminers, tt).or();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(trainExamRecordsPagination.getFresultScore())) {
|
||||
List FresultScoreList = JsonUtil.getJsonToList(trainExamRecordsPagination.getFresultScore(),
|
||||
String.class);
|
||||
for (int i = 0; i < FresultScoreList.size(); i++) {
|
||||
String id = String.valueOf(FresultScoreList.get(i));
|
||||
boolean idAll = StringUtil.isNotEmpty(id) && !id.equals("null");
|
||||
if (idAll) {
|
||||
Object b = new BigDecimal(id);
|
||||
if (i == 0) {
|
||||
wrapper.ge(TrainExamRecordsEntity::getFresultScore, b);
|
||||
} else {
|
||||
wrapper.le(TrainExamRecordsEntity::getFresultScore, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(trainExamRecordsPagination.getFfullName())) {
|
||||
String value = trainExamRecordsPagination.getFfullName() instanceof List
|
||||
? JsonUtil.getObjectToString(trainExamRecordsPagination.getFfullName())
|
||||
: String.valueOf(trainExamRecordsPagination.getFfullName());
|
||||
wrapper.like(TrainExamRecordsEntity::getFfullName, value);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(trainExamRecordsPagination.getFsort())) {
|
||||
List<String> idList = new ArrayList<>();
|
||||
try {
|
||||
String[][] fsort = JsonUtil.getJsonToBean(trainExamRecordsPagination.getFsort(), String[][].class);
|
||||
for (int i = 0; i < fsort.length; i++) {
|
||||
if (fsort[i].length > 0) {
|
||||
idList.add(JsonUtil.getObjectToString(Arrays.asList(fsort[i])));
|
||||
}
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
try {
|
||||
List<String> fsort = JsonUtil.getJsonToList(trainExamRecordsPagination.getFsort(),
|
||||
String.class);
|
||||
if (fsort.size() > 0) {
|
||||
idList.addAll(fsort);
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
idList.add(String.valueOf(trainExamRecordsPagination.getFsort()));
|
||||
}
|
||||
}
|
||||
wrapper.and(t -> {
|
||||
idList.forEach(tt -> {
|
||||
if (StringUtil.isNotEmpty(tt) && "Microsoft SQL Server".equalsIgnoreCase(databaseName)) {
|
||||
tt = tt.replaceFirst("\\[", "[[]");
|
||||
}
|
||||
t.like(TrainExamRecordsEntity::getFsort, tt).or();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(trainExamRecordsPagination.getFcreatorTime())) {
|
||||
List FcreatorTimeList = JsonUtil.getJsonToList(trainExamRecordsPagination.getFcreatorTime(),
|
||||
String.class);
|
||||
for (int i = 0; i < FcreatorTimeList.size(); i++) {
|
||||
String id = String.valueOf(FcreatorTimeList.get(i));
|
||||
boolean idAll = StringUtil.isNotEmpty(id) && !id.equals("null");
|
||||
if (idAll) {
|
||||
Object b = new Date(Long.valueOf(id));
|
||||
if (i == 0) {
|
||||
wrapper.ge(TrainExamRecordsEntity::getFcreatorTime, b);
|
||||
} else {
|
||||
wrapper.le(TrainExamRecordsEntity::getFcreatorTime, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(trainExamRecordsPagination.getFquestionStatus())) {
|
||||
List<String> idList = new ArrayList<>();
|
||||
try {
|
||||
String[][] fquestionStatus = JsonUtil.getJsonToBean(trainExamRecordsPagination.getFquestionStatus(),
|
||||
String[][].class);
|
||||
for (int i = 0; i < fquestionStatus.length; i++) {
|
||||
if (fquestionStatus[i].length > 0) {
|
||||
idList.add(JsonUtil.getObjectToString(Arrays.asList(fquestionStatus[i])));
|
||||
}
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
try {
|
||||
List<String> fquestionStatus = JsonUtil
|
||||
.getJsonToList(trainExamRecordsPagination.getFquestionStatus(), String.class);
|
||||
if (fquestionStatus.size() > 0) {
|
||||
idList.addAll(fquestionStatus);
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
idList.add(String.valueOf(trainExamRecordsPagination.getFquestionStatus()));
|
||||
}
|
||||
}
|
||||
wrapper.and(t -> {
|
||||
idList.forEach(tt -> {
|
||||
if (StringUtil.isNotEmpty(tt) && "Microsoft SQL Server".equalsIgnoreCase(databaseName)) {
|
||||
tt = tt.replaceFirst("\\[", "[[]");
|
||||
}
|
||||
t.like(TrainExamRecordsEntity::getFquestionStatus, tt).or();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
// 排序
|
||||
if (StringUtil.isEmpty(trainExamRecordsPagination.getSidx())) {
|
||||
wrapper.orderByDesc(TrainExamRecordsEntity::getId);
|
||||
} else {
|
||||
try {
|
||||
String[] split = trainExamRecordsPagination.getSidx().split(",");
|
||||
for (String sidx : split) {
|
||||
TrainExamRecordsEntity trainExamRecordsEntity = new TrainExamRecordsEntity();
|
||||
String oderTableField = trainExamRecordsEntity.getClass().getAnnotation(TableName.class).value();
|
||||
if (sidx.startsWith("-")) {
|
||||
Field declaredField = trainExamRecordsEntity.getClass().getDeclaredField(sidx.substring(1));
|
||||
declaredField.setAccessible(true);
|
||||
oderTableField = oderTableField + "." + declaredField.getAnnotation(TableField.class).value();
|
||||
wrapper.select(oderTableField);
|
||||
wrapper.orderByDesc(oderTableField);
|
||||
} else {
|
||||
Field declaredField = trainExamRecordsEntity.getClass().getDeclaredField(sidx);
|
||||
declaredField.setAccessible(true);
|
||||
oderTableField = oderTableField + "." + declaredField.getAnnotation(TableField.class).value();
|
||||
wrapper.select(oderTableField);
|
||||
wrapper.orderByAsc(oderTableField);
|
||||
}
|
||||
}
|
||||
} catch (NoSuchFieldException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrainExamRecordsEntity getInfo(String id) {
|
||||
MPJLambdaWrapper<TrainExamRecordsEntity> wrapper = JoinWrappers
|
||||
.lambda("make_train_exam_records", TrainExamRecordsEntity.class)
|
||||
.selectCollection(TrainLibraryEssayQuestionEntity.class,
|
||||
TrainExamRecordsEntity::getTrainLibraryEssayQuestion)
|
||||
.leftJoin(TrainLibraryEssayQuestionEntity.class, "make_train_library_essay_question",
|
||||
TrainLibraryEssayQuestionEntity::getFbankId, TrainExamRecordsEntity::getId)
|
||||
.selectCollection(TrainLibraryJudgmentEntity.class, TrainExamRecordsEntity::getTrainLibraryJudgment)
|
||||
.leftJoin(TrainLibraryJudgmentEntity.class, "make_train_library_judgment",
|
||||
TrainLibraryJudgmentEntity::getFbankId, TrainExamRecordsEntity::getId)
|
||||
.selectCollection(TrainLibraryMoreEntity.class, TrainExamRecordsEntity::getTrainLibraryMore)
|
||||
.leftJoin(TrainLibraryMoreEntity.class, "make_train_library_more", TrainLibraryMoreEntity::getFbankId,
|
||||
TrainExamRecordsEntity::getId)
|
||||
.selectCollection(TrainLibrarySingleEntity.class, TrainExamRecordsEntity::getTrainLibrarySingle)
|
||||
.leftJoin(TrainLibrarySingleEntity.class, "make_train_library_single",
|
||||
TrainLibrarySingleEntity::getFbankId, TrainExamRecordsEntity::getId)
|
||||
.selectAll(TrainExamRecordsEntity.class);
|
||||
wrapper.and(
|
||||
t -> t.eq(TrainExamRecordsEntity::getId, id)
|
||||
.or().eq(TrainExamRecordsEntity::getFlowTaskId, id));
|
||||
return this.selectJoinOne(TrainExamRecordsEntity.class, wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(TrainExamRecordsEntity entity) {
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(String id, TrainExamRecordsEntity entity) {
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(TrainExamRecordsEntity entity) {
|
||||
if (entity != null) {
|
||||
this.removeById(entity.getId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证表单唯一字段,正则,非空 i-0新增-1修改
|
||||
*/
|
||||
@Override
|
||||
public String checkForm(TrainExamRecordsForm form, int i) {
|
||||
boolean isUp = StringUtil.isNotEmpty(form.getId()) && !form.getId().equals("0");
|
||||
Object id = null;
|
||||
String countRecover = "";
|
||||
String fieldTipName = "";
|
||||
String canNotNull = I18nUtil.getMessageStr("sys.validate.textRequiredSuffix", "不能为空");
|
||||
String canNotRepeated = I18nUtil.getMessageStr("EXIST103", "不能重复");
|
||||
if (isUp) {
|
||||
id = form.getId();
|
||||
}
|
||||
// 主表字段验证
|
||||
fieldTipName = "试卷名称";
|
||||
if (StringUtil.isEmpty(form.getFfullName())) {
|
||||
return fieldTipName + canNotNull;
|
||||
}
|
||||
fieldTipName = "试题分类";
|
||||
fieldTipName = "考试人员";
|
||||
fieldTipName = "考试成绩";
|
||||
fieldTipName = "总分数";
|
||||
fieldTipName = "总题数";
|
||||
fieldTipName = "每题分数";
|
||||
fieldTipName = "是否存在问答题";
|
||||
fieldTipName = "阅卷状态";
|
||||
fieldTipName = "创建用户";
|
||||
fieldTipName = "完成时间";
|
||||
fieldTipName = "修改用户";
|
||||
fieldTipName = "修改时间";
|
||||
fieldTipName = "所属组织";
|
||||
// 子表字段验证
|
||||
if (form.getTrainLibrarySingleList() != null) {
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "题目难度";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "分类";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "题目名称";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "解析";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "答案";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "题目类型";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "选项A";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "选项B";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "选项C";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "选项D";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "所属组织";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "修改时间";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "修改用户";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "创建时间";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "创建用户";
|
||||
|
||||
}
|
||||
if (form.getTrainLibraryMoreList() != null) {
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "题目难度";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "分类";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "题目名称";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "解析";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "答案";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "题目类型";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "选项A";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "选项B";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "选项C";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "选项D";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "所属组织";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "修改时间";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "修改用户";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "创建时间";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "创建用户";
|
||||
|
||||
}
|
||||
if (form.getTrainLibraryJudgmentList() != null) {
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "题目难度";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "分类";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "题目名称";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "解析";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "答案";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "题目类型";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "所属组织";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "修改时间";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "修改用户";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "创建时间";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "创建用户";
|
||||
|
||||
}
|
||||
if (form.getTrainLibraryEssayQuestionList() != null) {
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "题目难度";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "分类";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "题目名称";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "解析";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "答案";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "题目类型";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "所属组织";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "修改时间";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "修改用户";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "创建时间";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "创建用户";
|
||||
|
||||
}
|
||||
return countRecover;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增修改数据(事务回滚)
|
||||
*
|
||||
* @param id
|
||||
* @param trainExamRecordsForm
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void saveOrUpdate(TrainExamRecordsForm trainExamRecordsForm, String id, boolean isSave) throws Exception {
|
||||
UserInfo userInfo = userProvider.get();
|
||||
UserEntity userEntity = generaterSwapUtil.getUser(userInfo.getUserId());
|
||||
trainExamRecordsForm = JsonUtil.getJsonToBean(
|
||||
generaterSwapUtil.swapDatetime(TrainExamRecordsConstant.getFormData(), trainExamRecordsForm,
|
||||
TrainExamRecordsConstant.TABLERENAMES),
|
||||
TrainExamRecordsForm.class);
|
||||
TrainExamRecordsEntity entity = JsonUtil.getJsonToBean(trainExamRecordsForm, TrainExamRecordsEntity.class);
|
||||
String mainUuid = StringUtil.isEmpty(id) ? RandomUtil.uuId() : id;
|
||||
if (isSave) {
|
||||
entity.setFlowTaskId(mainUuid);
|
||||
entity.setFcreatorUserId(userInfo.getUserId());
|
||||
entity.setFcreatorTime(DateUtil.getNowDate());
|
||||
entity.setFlastModifyUserId(null);
|
||||
entity.setFlastModifyTime(null);
|
||||
entity.setForganizeId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "last"));
|
||||
entity.setId(mainUuid);
|
||||
} else {
|
||||
entity.setFcreatorUserId(null);
|
||||
entity.setFcreatorTime(null);
|
||||
entity.setFlastModifyUserId(userInfo.getUserId());
|
||||
entity.setFlastModifyTime(DateUtil.getNowDate());
|
||||
entity.setForganizeId(null);
|
||||
}
|
||||
this.saveOrUpdate(entity);
|
||||
|
||||
// TrainLibrarySingle子表数据新增修改
|
||||
QueryWrapper<TrainLibrarySingleEntity> TrainLibrarySinglequeryWrapper = new QueryWrapper<>();
|
||||
TrainLibrarySinglequeryWrapper.lambda().eq(TrainLibrarySingleEntity::getFbankId, entity.getId());
|
||||
if (!isSave && !CollectionUtils.isNotEmpty(trainExamRecordsForm.getTrainLibrarySingleList())) {
|
||||
trainLibrarySingleService.remove(TrainLibrarySinglequeryWrapper);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(trainExamRecordsForm.getTrainLibrarySingleList())) {
|
||||
List<TrainLibrarySingleEntity> tableField103 = JsonUtil
|
||||
.getJsonToList(trainExamRecordsForm.getTrainLibrarySingleList(), TrainLibrarySingleEntity.class);
|
||||
// 移除的数据
|
||||
List<Object> childIds = tableField103.stream().filter(t -> t.getId() != null)
|
||||
.map(TrainLibrarySingleEntity::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(childIds)) {
|
||||
TrainLibrarySinglequeryWrapper.lambda().notIn(TrainLibrarySingleEntity::getId, childIds);
|
||||
}
|
||||
trainLibrarySingleService.remove(TrainLibrarySinglequeryWrapper);
|
||||
for (TrainLibrarySingleEntity entitys : tableField103) {
|
||||
entitys.setFbankId(entity.getId());
|
||||
if (isSave || entitys.getId() == null) {
|
||||
entitys.setForganizeId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "last"));
|
||||
entitys.setFlastModifyTime(null);
|
||||
entitys.setFlastModifyUserId(null);
|
||||
entitys.setFcreatorTime(DateUtil.getNowDate());
|
||||
entitys.setFcreatorUserId(userInfo.getUserId());
|
||||
} else {
|
||||
entitys.setForganizeId(null);
|
||||
entitys.setFlastModifyTime(DateUtil.getNowDate());
|
||||
entitys.setFlastModifyUserId(userInfo.getUserId());
|
||||
entitys.setFcreatorTime(null);
|
||||
entitys.setFcreatorUserId(null);
|
||||
}
|
||||
if (entitys.getId() == null) {
|
||||
entitys.setId(RandomUtil.uuId());
|
||||
}
|
||||
trainLibrarySingleService.saveOrUpdate(entitys);
|
||||
}
|
||||
}
|
||||
// TrainLibraryMore子表数据新增修改
|
||||
QueryWrapper<TrainLibraryMoreEntity> TrainLibraryMorequeryWrapper = new QueryWrapper<>();
|
||||
TrainLibraryMorequeryWrapper.lambda().eq(TrainLibraryMoreEntity::getFbankId, entity.getId());
|
||||
if (!isSave && !CollectionUtils.isNotEmpty(trainExamRecordsForm.getTrainLibraryMoreList())) {
|
||||
trainLibraryMoreService.remove(TrainLibraryMorequeryWrapper);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(trainExamRecordsForm.getTrainLibraryMoreList())) {
|
||||
List<TrainLibraryMoreEntity> tableField131 = JsonUtil
|
||||
.getJsonToList(trainExamRecordsForm.getTrainLibraryMoreList(), TrainLibraryMoreEntity.class);
|
||||
// 移除的数据
|
||||
List<Object> childIds = tableField131.stream().filter(t -> t.getId() != null)
|
||||
.map(TrainLibraryMoreEntity::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(childIds)) {
|
||||
TrainLibraryMorequeryWrapper.lambda().notIn(TrainLibraryMoreEntity::getId, childIds);
|
||||
}
|
||||
trainLibraryMoreService.remove(TrainLibraryMorequeryWrapper);
|
||||
for (TrainLibraryMoreEntity entitys : tableField131) {
|
||||
entitys.setFbankId(entity.getId());
|
||||
if (isSave || entitys.getId() == null) {
|
||||
entitys.setForganizeId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "last"));
|
||||
entitys.setFlastModifyTime(null);
|
||||
entitys.setFlastModifyUserId(null);
|
||||
entitys.setFcreatorTime(DateUtil.getNowDate());
|
||||
entitys.setFcreatorUserId(userInfo.getUserId());
|
||||
} else {
|
||||
entitys.setForganizeId(null);
|
||||
entitys.setFlastModifyTime(DateUtil.getNowDate());
|
||||
entitys.setFlastModifyUserId(userInfo.getUserId());
|
||||
entitys.setFcreatorTime(null);
|
||||
entitys.setFcreatorUserId(null);
|
||||
}
|
||||
if (entitys.getId() == null) {
|
||||
entitys.setId(RandomUtil.uuId());
|
||||
}
|
||||
trainLibraryMoreService.saveOrUpdate(entitys);
|
||||
}
|
||||
}
|
||||
// TrainLibraryJudgment子表数据新增修改
|
||||
QueryWrapper<TrainLibraryJudgmentEntity> TrainLibraryJudgmentqueryWrapper = new QueryWrapper<>();
|
||||
TrainLibraryJudgmentqueryWrapper.lambda().eq(TrainLibraryJudgmentEntity::getFbankId, entity.getId());
|
||||
if (!isSave && !CollectionUtils.isNotEmpty(trainExamRecordsForm.getTrainLibraryJudgmentList())) {
|
||||
trainLibraryJudgmentService.remove(TrainLibraryJudgmentqueryWrapper);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(trainExamRecordsForm.getTrainLibraryJudgmentList())) {
|
||||
List<TrainLibraryJudgmentEntity> tableField147 = JsonUtil.getJsonToList(
|
||||
trainExamRecordsForm.getTrainLibraryJudgmentList(), TrainLibraryJudgmentEntity.class);
|
||||
// 移除的数据
|
||||
List<Object> childIds = tableField147.stream().filter(t -> t.getId() != null)
|
||||
.map(TrainLibraryJudgmentEntity::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(childIds)) {
|
||||
TrainLibraryJudgmentqueryWrapper.lambda().notIn(TrainLibraryJudgmentEntity::getId, childIds);
|
||||
}
|
||||
trainLibraryJudgmentService.remove(TrainLibraryJudgmentqueryWrapper);
|
||||
for (TrainLibraryJudgmentEntity entitys : tableField147) {
|
||||
entitys.setFbankId(entity.getId());
|
||||
if (isSave || entitys.getId() == null) {
|
||||
entitys.setForganizeId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "last"));
|
||||
entitys.setFlastModifyTime(null);
|
||||
entitys.setFlastModifyUserId(null);
|
||||
entitys.setFcreatorTime(DateUtil.getNowDate());
|
||||
entitys.setFcreatorUserId(userInfo.getUserId());
|
||||
} else {
|
||||
entitys.setForganizeId(null);
|
||||
entitys.setFlastModifyTime(DateUtil.getNowDate());
|
||||
entitys.setFlastModifyUserId(userInfo.getUserId());
|
||||
entitys.setFcreatorTime(null);
|
||||
entitys.setFcreatorUserId(null);
|
||||
}
|
||||
if (entitys.getId() == null) {
|
||||
entitys.setId(RandomUtil.uuId());
|
||||
}
|
||||
trainLibraryJudgmentService.saveOrUpdate(entitys);
|
||||
}
|
||||
}
|
||||
// TrainLibraryEssayQuestion子表数据新增修改
|
||||
QueryWrapper<TrainLibraryEssayQuestionEntity> TrainLibraryEssayQuestionqueryWrapper = new QueryWrapper<>();
|
||||
TrainLibraryEssayQuestionqueryWrapper.lambda().eq(TrainLibraryEssayQuestionEntity::getFbankId, entity.getId());
|
||||
if (!isSave && !CollectionUtils.isNotEmpty(trainExamRecordsForm.getTrainLibraryEssayQuestionList())) {
|
||||
trainLibraryEssayQuestionService.remove(TrainLibraryEssayQuestionqueryWrapper);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(trainExamRecordsForm.getTrainLibraryEssayQuestionList())) {
|
||||
List<TrainLibraryEssayQuestionEntity> tableField180 = JsonUtil.getJsonToList(
|
||||
trainExamRecordsForm.getTrainLibraryEssayQuestionList(), TrainLibraryEssayQuestionEntity.class);
|
||||
// 移除的数据
|
||||
List<Object> childIds = tableField180.stream().filter(t -> t.getId() != null)
|
||||
.map(TrainLibraryEssayQuestionEntity::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(childIds)) {
|
||||
TrainLibraryEssayQuestionqueryWrapper.lambda().notIn(TrainLibraryEssayQuestionEntity::getId, childIds);
|
||||
}
|
||||
trainLibraryEssayQuestionService.remove(TrainLibraryEssayQuestionqueryWrapper);
|
||||
for (TrainLibraryEssayQuestionEntity entitys : tableField180) {
|
||||
entitys.setFbankId(entity.getId());
|
||||
if (isSave || entitys.getId() == null) {
|
||||
entitys.setForganizeId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "last"));
|
||||
entitys.setFlastModifyTime(null);
|
||||
entitys.setFlastModifyUserId(null);
|
||||
entitys.setFcreatorTime(DateUtil.getNowDate());
|
||||
entitys.setFcreatorUserId(userInfo.getUserId());
|
||||
} else {
|
||||
entitys.setForganizeId(null);
|
||||
entitys.setFlastModifyTime(DateUtil.getNowDate());
|
||||
entitys.setFlastModifyUserId(userInfo.getUserId());
|
||||
entitys.setFcreatorTime(null);
|
||||
entitys.setFcreatorUserId(null);
|
||||
}
|
||||
if (entitys.getId() == null) {
|
||||
entitys.setId(RandomUtil.uuId());
|
||||
}
|
||||
trainLibraryEssayQuestionService.saveOrUpdate(entitys);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<OutExamRecordsDetailDTO> examRecordsDetail(String id) {
|
||||
OutExamRecordsDetailDTO outDTO = new OutExamRecordsDetailDTO();
|
||||
outDTO.setId(id);
|
||||
TrainExamRecordsEntity recordsEntity = trainExamRecordsService.getInfo(id);
|
||||
TrainTestPaperLibraryEntity libraryEntity = trainTestPaperLibraryService.getInfo(recordsEntity.getFlibraryId());
|
||||
int perQuestion = recordsEntity.getFperQuestion();
|
||||
String scoreStr = "(" + perQuestion + ")分";
|
||||
// 获取用户答案
|
||||
List<TrainLibrarySingleEntity> singleEntities = trainLibrarySingleService.getListByParentId(id);
|
||||
List<TrainLibraryMoreEntity> moreEntities = trainLibraryMoreService.getListByParentId(id);
|
||||
List<TrainLibraryJudgmentEntity> judgmentEntities = trainLibraryJudgmentService.getListByParentId(id);
|
||||
List<TrainLibraryEssayQuestionEntity> essayQuestionEntities = trainLibraryEssayQuestionService
|
||||
.getListByParentId(id);
|
||||
|
||||
// 单选题
|
||||
if (!singleEntities.isEmpty()) {
|
||||
List<TrainLibrarySingleEntity> realSingleEntities = trainLibrarySingleService
|
||||
.getListByParentId(recordsEntity.getFlibraryId());
|
||||
List<OutSingleDTO> singleList = new ArrayList<>();
|
||||
for (TrainLibrarySingleEntity singleEntity : singleEntities) {
|
||||
OutSingleDTO outSingleDTO = new OutSingleDTO();
|
||||
// 获取正确答案
|
||||
TrainLibrarySingleEntity correctEntity = realSingleEntities.stream()
|
||||
.filter(entity -> entity.getFfullName().equals(singleEntity.getFfullName()))
|
||||
.findFirst().orElse(null);
|
||||
if (correctEntity != null) {
|
||||
outSingleDTO.setId(singleEntity.getId())
|
||||
.setUserAnswer(singleEntity.getFanswer())
|
||||
.setCorrectAnswer(correctEntity.getFanswer())
|
||||
.setFullName(singleEntity.getFfullName() + scoreStr);
|
||||
outSingleDTO.setResult(singleEntity.getFanswer().equals(correctEntity.getFanswer()) ? "正确" : "错误");
|
||||
}
|
||||
singleList.add(outSingleDTO);
|
||||
}
|
||||
outDTO.setSingleList(singleList);
|
||||
}
|
||||
// 多选题
|
||||
if (!moreEntities.isEmpty()) {
|
||||
List<TrainLibraryMoreEntity> realMoreEntities = trainLibraryMoreService
|
||||
.getListByParentId(recordsEntity.getFlibraryId());
|
||||
List<OutMultipleDTO> multipleList = new ArrayList<>();
|
||||
for (TrainLibraryMoreEntity moreEntity : moreEntities) {
|
||||
OutMultipleDTO outMultipleDTO = new OutMultipleDTO();
|
||||
TrainLibraryMoreEntity correctEntity = realMoreEntities.stream()
|
||||
.filter(entity -> entity.getFfullName().equals(moreEntity.getFfullName()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (correctEntity != null) {
|
||||
outMultipleDTO.setId(moreEntity.getId())
|
||||
.setUserAnswer(moreEntity.getFanswer())
|
||||
.setCorrectAnswer(correctEntity.getFanswer())
|
||||
.setFullName(moreEntity.getFfullName() + scoreStr);
|
||||
// 判断结果
|
||||
List<String> userAnswerList = Arrays
|
||||
.asList(moreEntity.getFanswer().replace("[", "").replace("]", "").split(","));
|
||||
List<String> correctAnswerList = Arrays
|
||||
.asList(correctEntity.getFanswer().replace("[", "").replace("]", "").split(","));
|
||||
// 将 List 转换为 Set 以去除重复项并忽略顺序
|
||||
Set<String> userAnswerSet = new HashSet<>(userAnswerList);
|
||||
Set<String> correctAnswerSet = new HashSet<>(correctAnswerList);
|
||||
// 比较集合是否相等
|
||||
boolean isCorrect = userAnswerSet.equals(correctAnswerSet);
|
||||
outMultipleDTO.setResult(isCorrect ? "正确" : "错误");
|
||||
}
|
||||
multipleList.add(outMultipleDTO);
|
||||
}
|
||||
outDTO.setMultipleList(multipleList);
|
||||
}
|
||||
// 判断题
|
||||
if (!judgmentEntities.isEmpty()) {
|
||||
List<TrainLibraryJudgmentEntity> realJudgmentEntities = trainLibraryJudgmentService
|
||||
.getListByParentId(recordsEntity.getFlibraryId());
|
||||
List<OutJudgeDTO> judgeList = new ArrayList<>();
|
||||
for (TrainLibraryJudgmentEntity judgmentEntity : judgmentEntities) {
|
||||
OutJudgeDTO outJudgeDTO = new OutJudgeDTO();
|
||||
TrainLibraryJudgmentEntity correctEntity = realJudgmentEntities.stream()
|
||||
.filter(entity -> entity.getFfullName().equals(judgmentEntity.getFfullName()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (correctEntity != null) {
|
||||
outJudgeDTO.setId(judgmentEntity.getId())
|
||||
.setUserAnswer(judgmentEntity.getFanswer())
|
||||
.setCorrectAnswer(correctEntity.getFanswer())
|
||||
.setFullName(judgmentEntity.getFfullName() + scoreStr);
|
||||
outJudgeDTO.setResult(judgmentEntity.getFanswer().equals(correctEntity.getFanswer()) ? "正确" : "错误");
|
||||
}
|
||||
judgeList.add(outJudgeDTO);
|
||||
}
|
||||
outDTO.setJudgeList(judgeList);
|
||||
}
|
||||
// 简答题
|
||||
if (!essayQuestionEntities.isEmpty()) {
|
||||
List<TrainLibraryEssayQuestionEntity> realEssayQuestionEntities = trainLibraryEssayQuestionService
|
||||
.getListByParentId(recordsEntity.getFlibraryId());
|
||||
List<OutShortAnswerDTO> shortAnswerList = new ArrayList<>();
|
||||
for (TrainLibraryEssayQuestionEntity essayQuestionEntity : essayQuestionEntities) {
|
||||
System.out.println("问答题用户答案: " + essayQuestionEntity.getFanswer());
|
||||
OutShortAnswerDTO outShortAnswerDTO = new OutShortAnswerDTO();
|
||||
TrainLibraryEssayQuestionEntity correctEntity = realEssayQuestionEntities.stream()
|
||||
.filter(entity -> entity.getFfullName().equals(essayQuestionEntity.getFfullName()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (correctEntity != null) {
|
||||
outShortAnswerDTO.setId(essayQuestionEntity.getId())
|
||||
.setUserAnswer(essayQuestionEntity.getFanswer())
|
||||
.setCorrectAnswer(correctEntity.getFanswer())
|
||||
.setFullName(essayQuestionEntity.getFfullName() + scoreStr);
|
||||
if (StringUtil.isNotEmpty(essayQuestionEntity.getFresult())) {
|
||||
outShortAnswerDTO.setResult(essayQuestionEntity.getFresult());
|
||||
} else {
|
||||
outShortAnswerDTO.setResult(
|
||||
essayQuestionEntity.getFanswer().equals(correctEntity.getFanswer()) ? "正确" : "错误");
|
||||
}
|
||||
System.out.println("正确答案: " + correctEntity.getFanswer());
|
||||
}
|
||||
shortAnswerList.add(outShortAnswerDTO);
|
||||
}
|
||||
outDTO.setShortAnswerList(shortAnswerList);
|
||||
}
|
||||
|
||||
return ActionResult.success("查询成功", outDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ActionResult readPaper(InReadPaperDTO in) {
|
||||
TrainExamRecordsEntity entity = trainExamRecordsService.getInfo(in.getId());
|
||||
if (entity == null) {
|
||||
return ActionResult.fail("记录不存在");
|
||||
}
|
||||
if (entity.getFquestionStatus().equals("已完成")) {
|
||||
return ActionResult.fail("阅卷已完成,请勿重复阅卷!");
|
||||
}
|
||||
int correctCnt = 0;
|
||||
int perQuestion = entity.getFperQuestion();// 每题分数
|
||||
|
||||
List<EssayQuestionDTO> essayQuestions = in.getEssayQuestions();
|
||||
for (EssayQuestionDTO dto : essayQuestions) {
|
||||
if (dto.getResult().equals("正确")) {
|
||||
correctCnt++;
|
||||
}
|
||||
}
|
||||
int questionScore = correctCnt * perQuestion;
|
||||
int resultScore = Integer.parseInt(entity.getFresultScore()) + questionScore;
|
||||
if (resultScore > Integer.parseInt(entity.getFmark())) {
|
||||
return ActionResult.fail("阅卷失败,最终得分不能超过总分!");
|
||||
}
|
||||
|
||||
entity.setFresultScore(String.valueOf(resultScore)).setFquestionStatus("已完成").setFquestionScore(questionScore);
|
||||
// 修改数据库
|
||||
trainLibraryEssayQuestionService.updateResult(in.getEssayQuestions());
|
||||
trainExamRecordsService.update(in.getId(), entity);
|
||||
return ActionResult.success("阅卷成功");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.yunzhupaas.service.impl;
|
||||
|
||||
import com.yunzhupaas.dto.EssayQuestionDTO;
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.mapper.TrainLibraryEssayQuestionMapper;
|
||||
import com.yunzhupaas.service.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yunzhupaas.model.traintestpaperlibrary.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.yunzhupaas.util.GeneraterSwapUtil;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Cleanup;
|
||||
import com.yunzhupaas.database.plugins.DynamicSourceGeneratorInterface;
|
||||
import com.yunzhupaas.database.util.DynamicDataSourceUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import com.yunzhupaas.i18n.util.I18nUtil;
|
||||
import com.yunzhupaas.exception.DataException;
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
@Service
|
||||
public class TrainLibraryEssayQuestionServiceImpl extends SuperServiceImpl<TrainLibraryEssayQuestionMapper, TrainLibraryEssayQuestionEntity> implements TrainLibraryEssayQuestionService{
|
||||
@Autowired
|
||||
private GeneraterSwapUtil generaterSwapUtil;
|
||||
@Autowired
|
||||
private TrainLibraryEssayQuestionMapper mapper;
|
||||
@Override
|
||||
public List<TrainLibraryEssayQuestionEntity> getListByParentId(String id) {
|
||||
return mapper.getListByParentId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateResult(List<EssayQuestionDTO> essayQuestions) {
|
||||
mapper.updateResult(essayQuestions);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.yunzhupaas.service.impl;
|
||||
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.mapper.TrainLibraryJudgmentMapper;
|
||||
import com.yunzhupaas.service.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yunzhupaas.model.traintestpaperlibrary.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.yunzhupaas.util.GeneraterSwapUtil;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Cleanup;
|
||||
import com.yunzhupaas.database.plugins.DynamicSourceGeneratorInterface;
|
||||
import com.yunzhupaas.database.util.DynamicDataSourceUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import com.yunzhupaas.i18n.util.I18nUtil;
|
||||
import com.yunzhupaas.exception.DataException;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
@Service
|
||||
public class TrainLibraryJudgmentServiceImpl extends SuperServiceImpl<TrainLibraryJudgmentMapper, TrainLibraryJudgmentEntity> implements TrainLibraryJudgmentService {
|
||||
@Autowired
|
||||
private GeneraterSwapUtil generaterSwapUtil;
|
||||
@Autowired
|
||||
private TrainLibraryJudgmentMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<TrainLibraryJudgmentEntity> getListByParentId(String id) {
|
||||
return mapper.getListByParentId(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.yunzhupaas.service.impl;
|
||||
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.mapper.TrainLibraryMoreMapper;
|
||||
import com.yunzhupaas.service.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yunzhupaas.model.traintestpaperlibrary.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.yunzhupaas.util.GeneraterSwapUtil;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Cleanup;
|
||||
import com.yunzhupaas.database.plugins.DynamicSourceGeneratorInterface;
|
||||
import com.yunzhupaas.database.util.DynamicDataSourceUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import com.yunzhupaas.i18n.util.I18nUtil;
|
||||
import com.yunzhupaas.exception.DataException;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
@Service
|
||||
public class TrainLibraryMoreServiceImpl extends SuperServiceImpl<TrainLibraryMoreMapper, TrainLibraryMoreEntity> implements TrainLibraryMoreService {
|
||||
@Autowired
|
||||
private GeneraterSwapUtil generaterSwapUtil;
|
||||
@Autowired
|
||||
private TrainLibraryMoreMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<TrainLibraryMoreEntity> getListByParentId(String id) {
|
||||
return mapper.getListByParentId(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.yunzhupaas.service.impl;
|
||||
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.mapper.TrainLibrarySingleMapper;
|
||||
import com.yunzhupaas.service.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yunzhupaas.model.traintestpaperlibrary.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.yunzhupaas.util.GeneraterSwapUtil;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Cleanup;
|
||||
import com.yunzhupaas.database.plugins.DynamicSourceGeneratorInterface;
|
||||
import com.yunzhupaas.database.util.DynamicDataSourceUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import com.yunzhupaas.i18n.util.I18nUtil;
|
||||
import com.yunzhupaas.exception.DataException;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
@Service
|
||||
public class TrainLibrarySingleServiceImpl extends SuperServiceImpl<TrainLibrarySingleMapper, TrainLibrarySingleEntity> implements TrainLibrarySingleService {
|
||||
@Autowired
|
||||
private GeneraterSwapUtil generaterSwapUtil;
|
||||
@Autowired
|
||||
private TrainLibrarySingleMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<TrainLibrarySingleEntity> getListByParentId(String id) {
|
||||
return mapper.getListByParentId(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,835 @@
|
||||
package com.yunzhupaas.service.impl;
|
||||
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.dto.OnlineExamSubmitDTO;
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.mapper.TrainTestPaperLibraryMapper;
|
||||
import com.yunzhupaas.service.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yunzhupaas.model.traintestpaperlibrary.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yunzhupaas.base.service.SuperServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.yunzhupaas.util.GeneraterSwapUtil;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import lombok.Cleanup;
|
||||
import com.yunzhupaas.database.plugins.DynamicSourceGeneratorInterface;
|
||||
import com.yunzhupaas.database.util.DynamicDataSourceUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import com.yunzhupaas.i18n.util.I18nUtil;
|
||||
import com.yunzhupaas.exception.DataException;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.yunzhupaas.base.model.ColumnDataModel;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.yulichang.toolkit.JoinWrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.yunzhupaas.model.QueryAllModel;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import com.yunzhupaas.util.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.yunzhupaas.base.UserInfo;
|
||||
import com.yunzhupaas.permission.entity.UserEntity;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
@Service
|
||||
public class TrainTestPaperLibraryServiceImpl
|
||||
extends SuperServiceImpl<TrainTestPaperLibraryMapper, TrainTestPaperLibraryEntity>
|
||||
implements TrainTestPaperLibraryService {
|
||||
@Autowired
|
||||
private GeneraterSwapUtil generaterSwapUtil;
|
||||
@Autowired
|
||||
private UserProvider userProvider;
|
||||
@Autowired
|
||||
private TrainTestPaperLibraryMapper trainTestPaperLibraryMapper;
|
||||
@Autowired
|
||||
private TrainLibrarySingleService trainLibrarySingleService;
|
||||
@Autowired
|
||||
private TrainLibraryMoreService trainLibraryMoreService;
|
||||
@Autowired
|
||||
private TrainLibraryJudgmentService trainLibraryJudgmentService;
|
||||
@Autowired
|
||||
private TrainLibraryEssayQuestionService trainLibraryEssayQuestionService;
|
||||
|
||||
@Override
|
||||
public List<TrainTestPaperLibraryEntity> getList(TrainTestPaperLibraryPagination trainTestPaperLibraryPagination) {
|
||||
return getTypeList(trainTestPaperLibraryPagination, trainTestPaperLibraryPagination.getDataType());
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@Override
|
||||
public List<TrainTestPaperLibraryEntity> getTypeList(
|
||||
TrainTestPaperLibraryPagination trainTestPaperLibraryPagination, String dataType) {
|
||||
String userId = userProvider.get().getUserId();
|
||||
Map<String, Class> tableClassMap = new HashMap<>();
|
||||
tableClassMap.put("make_train_test_paper_library", TrainTestPaperLibraryEntity.class);
|
||||
tableClassMap.put("make_train_library_essay_question", TrainLibraryEssayQuestionEntity.class);
|
||||
tableClassMap.put("make_train_library_judgment", TrainLibraryJudgmentEntity.class);
|
||||
tableClassMap.put("make_train_library_more", TrainLibraryMoreEntity.class);
|
||||
tableClassMap.put("make_train_library_single", TrainLibrarySingleEntity.class);
|
||||
|
||||
MPJLambdaWrapper<TrainTestPaperLibraryEntity> wrapper = JoinWrappers
|
||||
.lambda("make_train_test_paper_library", TrainTestPaperLibraryEntity.class)
|
||||
.selectCollection(TrainLibraryEssayQuestionEntity.class,
|
||||
TrainTestPaperLibraryEntity::getTrainLibraryEssayQuestion)
|
||||
.leftJoin(TrainLibraryEssayQuestionEntity.class, "make_train_library_essay_question",
|
||||
TrainLibraryEssayQuestionEntity::getFbankId, TrainTestPaperLibraryEntity::getId)
|
||||
.selectCollection(TrainLibraryJudgmentEntity.class,
|
||||
TrainTestPaperLibraryEntity::getTrainLibraryJudgment)
|
||||
.leftJoin(TrainLibraryJudgmentEntity.class, "make_train_library_judgment",
|
||||
TrainLibraryJudgmentEntity::getFbankId, TrainTestPaperLibraryEntity::getId)
|
||||
.selectCollection(TrainLibraryMoreEntity.class, TrainTestPaperLibraryEntity::getTrainLibraryMore)
|
||||
.leftJoin(TrainLibraryMoreEntity.class, "make_train_library_more", TrainLibraryMoreEntity::getFbankId,
|
||||
TrainTestPaperLibraryEntity::getId)
|
||||
.selectCollection(TrainLibrarySingleEntity.class, TrainTestPaperLibraryEntity::getTrainLibrarySingle)
|
||||
.leftJoin(TrainLibrarySingleEntity.class, "make_train_library_single",
|
||||
TrainLibrarySingleEntity::getFbankId, TrainTestPaperLibraryEntity::getId)
|
||||
.selectAll(TrainTestPaperLibraryEntity.class);
|
||||
MPJLambdaWrapper<TrainTestPaperLibraryEntity> wrapper2 = JoinWrappers
|
||||
.lambda("make_train_test_paper_library", TrainTestPaperLibraryEntity.class)
|
||||
.leftJoin(TrainLibraryEssayQuestionEntity.class, "make_train_library_essay_question",
|
||||
TrainLibraryEssayQuestionEntity::getFbankId, TrainTestPaperLibraryEntity::getId)
|
||||
.leftJoin(TrainLibraryJudgmentEntity.class, "make_train_library_judgment",
|
||||
TrainLibraryJudgmentEntity::getFbankId, TrainTestPaperLibraryEntity::getId)
|
||||
.leftJoin(TrainLibraryMoreEntity.class, "make_train_library_more", TrainLibraryMoreEntity::getFbankId,
|
||||
TrainTestPaperLibraryEntity::getId)
|
||||
.leftJoin(TrainLibrarySingleEntity.class, "make_train_library_single",
|
||||
TrainLibrarySingleEntity::getFbankId, TrainTestPaperLibraryEntity::getId)
|
||||
.distinct().select(TrainTestPaperLibraryEntity::getId);
|
||||
|
||||
QueryAllModel queryAllModel = new QueryAllModel();
|
||||
queryAllModel.setWrapper(wrapper);
|
||||
queryAllModel.setClassMap(tableClassMap);
|
||||
queryAllModel.setDbLink(TrainTestPaperLibraryConstant.DBLINKID);
|
||||
// 数据过滤
|
||||
boolean isPc = ServletUtil.getHeader("yunzhupaas-origin").equals("pc");
|
||||
String columnData = !isPc ? TrainTestPaperLibraryConstant.getAppColumnData()
|
||||
: TrainTestPaperLibraryConstant.getColumnData();
|
||||
ColumnDataModel columnDataModel = JsonUtil.getJsonToBean(columnData, ColumnDataModel.class);
|
||||
String ruleJson = !isPc ? JsonUtil.getObjectToString(columnDataModel.getRuleListApp())
|
||||
: JsonUtil.getObjectToString(columnDataModel.getRuleList());
|
||||
queryAllModel.setRuleJson(ruleJson);
|
||||
// 高级查询
|
||||
boolean hasSuperQuery = true;
|
||||
if (hasSuperQuery) {
|
||||
queryAllModel.setSuperJson(trainTestPaperLibraryPagination.getSuperQueryJson());
|
||||
}
|
||||
// 数据权限
|
||||
boolean pcPermission = true;
|
||||
boolean appPermission = false;
|
||||
if (isPc && pcPermission && !userProvider.get().getIsAdministrator()) {
|
||||
queryAllModel.setModuleId(trainTestPaperLibraryPagination.getMenuId());
|
||||
queryAllModel.setModuleId(trainTestPaperLibraryPagination.getMenuId());
|
||||
}
|
||||
if (!isPc && appPermission && !userProvider.get().getIsAdministrator()) {
|
||||
queryAllModel.setModuleId(trainTestPaperLibraryPagination.getMenuId());
|
||||
}
|
||||
// 拼接复杂条件
|
||||
wrapper = generaterSwapUtil.getConditionAllTable(queryAllModel);
|
||||
queryAllModel.setWrapper(wrapper2);
|
||||
wrapper2 = generaterSwapUtil.getConditionAllTable(queryAllModel);
|
||||
// 其他条件拼接
|
||||
otherConditions(trainTestPaperLibraryPagination, wrapper, isPc);
|
||||
otherConditions(trainTestPaperLibraryPagination, wrapper2, isPc);
|
||||
|
||||
if ("0".equals(dataType)) {
|
||||
com.github.pagehelper.Page<Object> objects = PageHelper.startPage(
|
||||
(int) trainTestPaperLibraryPagination.getCurrentPage(),
|
||||
(int) trainTestPaperLibraryPagination.getPageSize(), true);
|
||||
List<TrainTestPaperLibraryEntity> userIPage = this.selectJoinList(TrainTestPaperLibraryEntity.class,
|
||||
wrapper2);
|
||||
List<Object> collect = userIPage.stream().map(t -> t.getId()).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(collect)) {
|
||||
wrapper.in(TrainTestPaperLibraryEntity::getId, collect);
|
||||
}
|
||||
List<TrainTestPaperLibraryEntity> result = this.selectJoinList(TrainTestPaperLibraryEntity.class, wrapper);
|
||||
return trainTestPaperLibraryPagination.setData(result, objects.getTotal());
|
||||
} else {
|
||||
List<TrainTestPaperLibraryEntity> list = this.selectJoinList(TrainTestPaperLibraryEntity.class, wrapper);
|
||||
if ("2".equals(dataType)) {
|
||||
List<String> selectIds = Arrays.asList(trainTestPaperLibraryPagination.getSelectIds());
|
||||
return list.stream().filter(t -> selectIds.contains(t.getId().toString())).collect(Collectors.toList());
|
||||
} else {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 其他条件拼接
|
||||
*/
|
||||
private void otherConditions(TrainTestPaperLibraryPagination trainTestPaperLibraryPagination,
|
||||
MPJLambdaWrapper<TrainTestPaperLibraryEntity> wrapper, boolean isPc) {
|
||||
String databaseName;
|
||||
try {
|
||||
@Cleanup
|
||||
Connection cnn = DynamicDataSourceUtil.getCurrentConnection();
|
||||
databaseName = cnn.getMetaData().getDatabaseProductName().trim();
|
||||
} catch (SQLException e) {
|
||||
throw new DataException(e.getMessage());
|
||||
}
|
||||
wrapper.isNull(TrainTestPaperLibraryEntity::getFlowId);
|
||||
// 关键词
|
||||
if (ObjectUtil.isNotEmpty(trainTestPaperLibraryPagination.getYunzhupaasKeyword())) {
|
||||
}
|
||||
// 普通查询
|
||||
if (isPc) {
|
||||
if (ObjectUtil.isNotEmpty(trainTestPaperLibraryPagination.getFfullName())) {
|
||||
String value = trainTestPaperLibraryPagination.getFfullName() instanceof List
|
||||
? JsonUtil.getObjectToString(trainTestPaperLibraryPagination.getFfullName())
|
||||
: String.valueOf(trainTestPaperLibraryPagination.getFfullName());
|
||||
wrapper.like(TrainTestPaperLibraryEntity::getFfullName, value);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(trainTestPaperLibraryPagination.getFsort())) {
|
||||
List<String> idList = new ArrayList<>();
|
||||
try {
|
||||
String[][] fsort = JsonUtil.getJsonToBean(trainTestPaperLibraryPagination.getFsort(),
|
||||
String[][].class);
|
||||
for (int i = 0; i < fsort.length; i++) {
|
||||
if (fsort[i].length > 0) {
|
||||
idList.add(JsonUtil.getObjectToString(Arrays.asList(fsort[i])));
|
||||
}
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
try {
|
||||
List<String> fsort = JsonUtil.getJsonToList(trainTestPaperLibraryPagination.getFsort(),
|
||||
String.class);
|
||||
if (fsort.size() > 0) {
|
||||
idList.addAll(fsort);
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
idList.add(String.valueOf(trainTestPaperLibraryPagination.getFsort()));
|
||||
}
|
||||
}
|
||||
wrapper.and(t -> {
|
||||
idList.forEach(tt -> {
|
||||
if (StringUtil.isNotEmpty(tt) && "Microsoft SQL Server".equalsIgnoreCase(databaseName)) {
|
||||
tt = tt.replaceFirst("\\[", "[[]");
|
||||
}
|
||||
t.like(TrainTestPaperLibraryEntity::getFsort, tt).or();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
// 排序
|
||||
if (StringUtil.isEmpty(trainTestPaperLibraryPagination.getSidx())) {
|
||||
wrapper.orderByDesc(TrainTestPaperLibraryEntity::getId);
|
||||
} else {
|
||||
try {
|
||||
String[] split = trainTestPaperLibraryPagination.getSidx().split(",");
|
||||
for (String sidx : split) {
|
||||
TrainTestPaperLibraryEntity trainTestPaperLibraryEntity = new TrainTestPaperLibraryEntity();
|
||||
String oderTableField = trainTestPaperLibraryEntity.getClass().getAnnotation(TableName.class)
|
||||
.value();
|
||||
if (sidx.startsWith("-")) {
|
||||
Field declaredField = trainTestPaperLibraryEntity.getClass()
|
||||
.getDeclaredField(sidx.substring(1));
|
||||
declaredField.setAccessible(true);
|
||||
oderTableField = oderTableField + "." + declaredField.getAnnotation(TableField.class).value();
|
||||
wrapper.select(oderTableField);
|
||||
wrapper.orderByDesc(oderTableField);
|
||||
} else {
|
||||
Field declaredField = trainTestPaperLibraryEntity.getClass().getDeclaredField(sidx);
|
||||
declaredField.setAccessible(true);
|
||||
oderTableField = oderTableField + "." + declaredField.getAnnotation(TableField.class).value();
|
||||
wrapper.select(oderTableField);
|
||||
wrapper.orderByAsc(oderTableField);
|
||||
}
|
||||
}
|
||||
} catch (NoSuchFieldException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrainTestPaperLibraryEntity getInfo(String id) {
|
||||
MPJLambdaWrapper<TrainTestPaperLibraryEntity> wrapper = JoinWrappers
|
||||
.lambda("make_train_test_paper_library", TrainTestPaperLibraryEntity.class)
|
||||
.selectCollection(TrainLibraryEssayQuestionEntity.class,
|
||||
TrainTestPaperLibraryEntity::getTrainLibraryEssayQuestion)
|
||||
.leftJoin(TrainLibraryEssayQuestionEntity.class, "make_train_library_essay_question",
|
||||
TrainLibraryEssayQuestionEntity::getFbankId, TrainTestPaperLibraryEntity::getId)
|
||||
.selectCollection(TrainLibraryJudgmentEntity.class,
|
||||
TrainTestPaperLibraryEntity::getTrainLibraryJudgment)
|
||||
.leftJoin(TrainLibraryJudgmentEntity.class, "make_train_library_judgment",
|
||||
TrainLibraryJudgmentEntity::getFbankId, TrainTestPaperLibraryEntity::getId)
|
||||
.selectCollection(TrainLibraryMoreEntity.class, TrainTestPaperLibraryEntity::getTrainLibraryMore)
|
||||
.leftJoin(TrainLibraryMoreEntity.class, "make_train_library_more", TrainLibraryMoreEntity::getFbankId,
|
||||
TrainTestPaperLibraryEntity::getId)
|
||||
.selectCollection(TrainLibrarySingleEntity.class, TrainTestPaperLibraryEntity::getTrainLibrarySingle)
|
||||
.leftJoin(TrainLibrarySingleEntity.class, "make_train_library_single",
|
||||
TrainLibrarySingleEntity::getFbankId, TrainTestPaperLibraryEntity::getId)
|
||||
.selectAll(TrainTestPaperLibraryEntity.class);
|
||||
wrapper.and(
|
||||
t -> t.eq(TrainTestPaperLibraryEntity::getId, id)
|
||||
.or().eq(TrainTestPaperLibraryEntity::getFlowTaskId, id));
|
||||
return this.selectJoinOne(TrainTestPaperLibraryEntity.class, wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(TrainTestPaperLibraryEntity entity) {
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(String id, TrainTestPaperLibraryEntity entity) {
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(TrainTestPaperLibraryEntity entity) {
|
||||
if (entity != null) {
|
||||
this.removeById(entity.getId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证表单唯一字段,正则,非空 i-0新增-1修改
|
||||
*/
|
||||
@Override
|
||||
public String checkForm(TrainTestPaperLibraryForm form, int i) {
|
||||
boolean isUp = StringUtil.isNotEmpty(form.getId()) && !form.getId().equals("0");
|
||||
Object id = null;
|
||||
String countRecover = "";
|
||||
String fieldTipName = "";
|
||||
String canNotNull = I18nUtil.getMessageStr("sys.validate.textRequiredSuffix", "不能为空");
|
||||
String canNotRepeated = I18nUtil.getMessageStr("EXIST103", "不能重复");
|
||||
if (isUp) {
|
||||
id = form.getId();
|
||||
}
|
||||
// 主表字段验证
|
||||
fieldTipName = "试卷名称";
|
||||
if (StringUtil.isEmpty(form.getFfullName())) {
|
||||
return fieldTipName + canNotNull;
|
||||
}
|
||||
fieldTipName = "试题分类";
|
||||
fieldTipName = "创建用户";
|
||||
fieldTipName = "创建时间";
|
||||
fieldTipName = "修改用户";
|
||||
fieldTipName = "修改时间";
|
||||
fieldTipName = "所属组织";
|
||||
// 子表字段验证
|
||||
if (form.getTrainLibrarySingleList() != null) {
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "题目难度";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "分类";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "题目名称";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "解析";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "答案";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "题目类型";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "选项A";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "选项B";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "选项C";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "选项D";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "所属组织";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "修改时间";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "修改用户";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "创建时间";
|
||||
|
||||
fieldTipName = "单选题"
|
||||
+ "-" + "创建用户";
|
||||
|
||||
}
|
||||
if (form.getTrainLibraryMoreList() != null) {
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "题目难度";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "分类";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "题目名称";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "解析";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "答案";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "题目类型";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "选项A";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "选项B";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "选项C";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "选项D";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "所属组织";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "修改时间";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "修改用户";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "创建时间";
|
||||
|
||||
fieldTipName = "多选题"
|
||||
+ "-" + "创建用户";
|
||||
|
||||
}
|
||||
if (form.getTrainLibraryJudgmentList() != null) {
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "题目难度";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "分类";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "题目名称";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "解析";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "答案";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "题目类型";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "所属组织";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "修改时间";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "修改用户";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "创建时间";
|
||||
|
||||
fieldTipName = "判断题"
|
||||
+ "-" + "创建用户";
|
||||
|
||||
}
|
||||
if (form.getTrainLibraryEssayQuestionList() != null) {
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "题目难度";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "分类";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "题目名称";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "解析";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "答案";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "题目类型";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "所属组织";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "修改时间";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "修改用户";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "创建时间";
|
||||
|
||||
fieldTipName = "问答题"
|
||||
+ "-" + "创建用户";
|
||||
|
||||
}
|
||||
return countRecover;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增修改数据(事务回滚)
|
||||
*
|
||||
* @param id
|
||||
* @param trainTestPaperLibraryForm
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void saveOrUpdate(TrainTestPaperLibraryForm trainTestPaperLibraryForm, String id, boolean isSave)
|
||||
throws Exception {
|
||||
UserInfo userInfo = userProvider.get();
|
||||
UserEntity userEntity = generaterSwapUtil.getUser(userInfo.getUserId());
|
||||
trainTestPaperLibraryForm = JsonUtil.getJsonToBean(
|
||||
generaterSwapUtil.swapDatetime(TrainTestPaperLibraryConstant.getFormData(), trainTestPaperLibraryForm,
|
||||
TrainTestPaperLibraryConstant.TABLERENAMES),
|
||||
TrainTestPaperLibraryForm.class);
|
||||
TrainTestPaperLibraryEntity entity = JsonUtil.getJsonToBean(trainTestPaperLibraryForm,
|
||||
TrainTestPaperLibraryEntity.class);
|
||||
String mainUuid = StringUtil.isEmpty(id) ? RandomUtil.uuId() : id;
|
||||
if (isSave) {
|
||||
entity.setFlowTaskId(mainUuid);
|
||||
entity.setFcreatorUserId(userInfo.getUserId());
|
||||
entity.setFcreatorTime(DateUtil.getNowDate());
|
||||
entity.setFlastModifyUserId(null);
|
||||
entity.setFlastModifyTime(null);
|
||||
entity.setForganizeId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "last"));
|
||||
entity.setId(mainUuid);
|
||||
} else {
|
||||
entity.setFcreatorUserId(null);
|
||||
entity.setFcreatorTime(null);
|
||||
entity.setFlastModifyUserId(userInfo.getUserId());
|
||||
entity.setFlastModifyTime(DateUtil.getNowDate());
|
||||
entity.setForganizeId(null);
|
||||
}
|
||||
this.saveOrUpdate(entity);
|
||||
|
||||
// TrainLibrarySingle子表数据新增修改
|
||||
QueryWrapper<TrainLibrarySingleEntity> TrainLibrarySinglequeryWrapper = new QueryWrapper<>();
|
||||
TrainLibrarySinglequeryWrapper.lambda().eq(TrainLibrarySingleEntity::getFbankId, entity.getId());
|
||||
if (!isSave && !CollectionUtils.isNotEmpty(trainTestPaperLibraryForm.getTrainLibrarySingleList())) {
|
||||
trainLibrarySingleService.remove(TrainLibrarySinglequeryWrapper);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(trainTestPaperLibraryForm.getTrainLibrarySingleList())) {
|
||||
List<TrainLibrarySingleEntity> tableField103 = JsonUtil.getJsonToList(
|
||||
trainTestPaperLibraryForm.getTrainLibrarySingleList(), TrainLibrarySingleEntity.class);
|
||||
// 移除的数据
|
||||
List<Object> childIds = tableField103.stream().filter(t -> t.getId() != null)
|
||||
.map(TrainLibrarySingleEntity::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(childIds)) {
|
||||
TrainLibrarySinglequeryWrapper.lambda().notIn(TrainLibrarySingleEntity::getId, childIds);
|
||||
}
|
||||
trainLibrarySingleService.remove(TrainLibrarySinglequeryWrapper);
|
||||
for (TrainLibrarySingleEntity entitys : tableField103) {
|
||||
entitys.setFbankId(entity.getId());
|
||||
if (isSave || entitys.getId() == null) {
|
||||
entitys.setForganizeId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "last"));
|
||||
entitys.setFlastModifyTime(null);
|
||||
entitys.setFlastModifyUserId(null);
|
||||
entitys.setFcreatorTime(DateUtil.getNowDate());
|
||||
entitys.setFcreatorUserId(userInfo.getUserId());
|
||||
} else {
|
||||
entitys.setForganizeId(null);
|
||||
entitys.setFlastModifyTime(DateUtil.getNowDate());
|
||||
entitys.setFlastModifyUserId(userInfo.getUserId());
|
||||
entitys.setFcreatorTime(null);
|
||||
entitys.setFcreatorUserId(null);
|
||||
}
|
||||
if (entitys.getId() == null) {
|
||||
entitys.setId(RandomUtil.uuId());
|
||||
}
|
||||
trainLibrarySingleService.saveOrUpdate(entitys);
|
||||
}
|
||||
}
|
||||
// TrainLibraryMore子表数据新增修改
|
||||
QueryWrapper<TrainLibraryMoreEntity> TrainLibraryMorequeryWrapper = new QueryWrapper<>();
|
||||
TrainLibraryMorequeryWrapper.lambda().eq(TrainLibraryMoreEntity::getFbankId, entity.getId());
|
||||
if (!isSave && !CollectionUtils.isNotEmpty(trainTestPaperLibraryForm.getTrainLibraryMoreList())) {
|
||||
trainLibraryMoreService.remove(TrainLibraryMorequeryWrapper);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(trainTestPaperLibraryForm.getTrainLibraryMoreList())) {
|
||||
List<TrainLibraryMoreEntity> tableField131 = JsonUtil
|
||||
.getJsonToList(trainTestPaperLibraryForm.getTrainLibraryMoreList(), TrainLibraryMoreEntity.class);
|
||||
// 移除的数据
|
||||
List<Object> childIds = tableField131.stream().filter(t -> t.getId() != null)
|
||||
.map(TrainLibraryMoreEntity::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(childIds)) {
|
||||
TrainLibraryMorequeryWrapper.lambda().notIn(TrainLibraryMoreEntity::getId, childIds);
|
||||
}
|
||||
trainLibraryMoreService.remove(TrainLibraryMorequeryWrapper);
|
||||
for (TrainLibraryMoreEntity entitys : tableField131) {
|
||||
entitys.setFbankId(entity.getId());
|
||||
if (isSave || entitys.getId() == null) {
|
||||
entitys.setForganizeId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "last"));
|
||||
entitys.setFlastModifyTime(null);
|
||||
entitys.setFlastModifyUserId(null);
|
||||
entitys.setFcreatorTime(DateUtil.getNowDate());
|
||||
entitys.setFcreatorUserId(userInfo.getUserId());
|
||||
} else {
|
||||
entitys.setForganizeId(null);
|
||||
entitys.setFlastModifyTime(DateUtil.getNowDate());
|
||||
entitys.setFlastModifyUserId(userInfo.getUserId());
|
||||
entitys.setFcreatorTime(null);
|
||||
entitys.setFcreatorUserId(null);
|
||||
}
|
||||
if (entitys.getId() == null) {
|
||||
entitys.setId(RandomUtil.uuId());
|
||||
}
|
||||
trainLibraryMoreService.saveOrUpdate(entitys);
|
||||
}
|
||||
}
|
||||
// TrainLibraryJudgment子表数据新增修改
|
||||
QueryWrapper<TrainLibraryJudgmentEntity> TrainLibraryJudgmentqueryWrapper = new QueryWrapper<>();
|
||||
TrainLibraryJudgmentqueryWrapper.lambda().eq(TrainLibraryJudgmentEntity::getFbankId, entity.getId());
|
||||
if (!isSave && !CollectionUtils.isNotEmpty(trainTestPaperLibraryForm.getTrainLibraryJudgmentList())) {
|
||||
trainLibraryJudgmentService.remove(TrainLibraryJudgmentqueryWrapper);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(trainTestPaperLibraryForm.getTrainLibraryJudgmentList())) {
|
||||
List<TrainLibraryJudgmentEntity> tableField147 = JsonUtil.getJsonToList(
|
||||
trainTestPaperLibraryForm.getTrainLibraryJudgmentList(), TrainLibraryJudgmentEntity.class);
|
||||
// 移除的数据
|
||||
List<Object> childIds = tableField147.stream().filter(t -> t.getId() != null)
|
||||
.map(TrainLibraryJudgmentEntity::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(childIds)) {
|
||||
TrainLibraryJudgmentqueryWrapper.lambda().notIn(TrainLibraryJudgmentEntity::getId, childIds);
|
||||
}
|
||||
trainLibraryJudgmentService.remove(TrainLibraryJudgmentqueryWrapper);
|
||||
for (TrainLibraryJudgmentEntity entitys : tableField147) {
|
||||
entitys.setFbankId(entity.getId());
|
||||
if (isSave || entitys.getId() == null) {
|
||||
entitys.setForganizeId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "last"));
|
||||
entitys.setFlastModifyTime(null);
|
||||
entitys.setFlastModifyUserId(null);
|
||||
entitys.setFcreatorTime(DateUtil.getNowDate());
|
||||
entitys.setFcreatorUserId(userInfo.getUserId());
|
||||
} else {
|
||||
entitys.setForganizeId(null);
|
||||
entitys.setFlastModifyTime(DateUtil.getNowDate());
|
||||
entitys.setFlastModifyUserId(userInfo.getUserId());
|
||||
entitys.setFcreatorTime(null);
|
||||
entitys.setFcreatorUserId(null);
|
||||
}
|
||||
if (entitys.getId() == null) {
|
||||
entitys.setId(RandomUtil.uuId());
|
||||
}
|
||||
trainLibraryJudgmentService.saveOrUpdate(entitys);
|
||||
}
|
||||
}
|
||||
// TrainLibraryEssayQuestion子表数据新增修改
|
||||
QueryWrapper<TrainLibraryEssayQuestionEntity> TrainLibraryEssayQuestionqueryWrapper = new QueryWrapper<>();
|
||||
TrainLibraryEssayQuestionqueryWrapper.lambda().eq(TrainLibraryEssayQuestionEntity::getFbankId, entity.getId());
|
||||
if (!isSave && !CollectionUtils.isNotEmpty(trainTestPaperLibraryForm.getTrainLibraryEssayQuestionList())) {
|
||||
trainLibraryEssayQuestionService.remove(TrainLibraryEssayQuestionqueryWrapper);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(trainTestPaperLibraryForm.getTrainLibraryEssayQuestionList())) {
|
||||
List<TrainLibraryEssayQuestionEntity> tableField180 = JsonUtil.getJsonToList(
|
||||
trainTestPaperLibraryForm.getTrainLibraryEssayQuestionList(),
|
||||
TrainLibraryEssayQuestionEntity.class);
|
||||
// 移除的数据
|
||||
List<Object> childIds = tableField180.stream().filter(t -> t.getId() != null)
|
||||
.map(TrainLibraryEssayQuestionEntity::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(childIds)) {
|
||||
TrainLibraryEssayQuestionqueryWrapper.lambda().notIn(TrainLibraryEssayQuestionEntity::getId, childIds);
|
||||
}
|
||||
trainLibraryEssayQuestionService.remove(TrainLibraryEssayQuestionqueryWrapper);
|
||||
for (TrainLibraryEssayQuestionEntity entitys : tableField180) {
|
||||
entitys.setFbankId(entity.getId());
|
||||
if (isSave || entitys.getId() == null) {
|
||||
entitys.setForganizeId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "last"));
|
||||
entitys.setFlastModifyTime(null);
|
||||
entitys.setFlastModifyUserId(null);
|
||||
entitys.setFcreatorTime(DateUtil.getNowDate());
|
||||
entitys.setFcreatorUserId(userInfo.getUserId());
|
||||
} else {
|
||||
entitys.setForganizeId(null);
|
||||
entitys.setFlastModifyTime(DateUtil.getNowDate());
|
||||
entitys.setFlastModifyUserId(userInfo.getUserId());
|
||||
entitys.setFcreatorTime(null);
|
||||
entitys.setFcreatorUserId(null);
|
||||
}
|
||||
if (entitys.getId() == null) {
|
||||
entitys.setId(RandomUtil.uuId());
|
||||
}
|
||||
trainLibraryEssayQuestionService.saveOrUpdate(entitys);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ActionResult onlineExamSubmit(OnlineExamSubmitDTO onlineExamSubmitDTO) {
|
||||
TrainTestPaperLibraryEntity libraryEntity = trainTestPaperLibraryMapper.selectById(onlineExamSubmitDTO.getId());
|
||||
TrainExamRecordsEntity recordsEntity = new TrainExamRecordsEntity();
|
||||
recordsEntity.setId(RandomUtil.uuId()).setFlibraryId(onlineExamSubmitDTO.getId())
|
||||
.setFnumber(libraryEntity.getFnumber())
|
||||
.setFexaminers(userProvider.get().getUserId()).setFfullName(libraryEntity.getFfullName())
|
||||
.setFsort(libraryEntity.getFsort()).setFmark("100")
|
||||
.setFquestionFlag("不存在").setFquestionStatus("已完成").setFquestionScore(0)
|
||||
.setFcreatorTime(DateUtil.getNowDate()).setFcreatorUserId(userProvider.get().getUserId())
|
||||
.setForganizeId(userProvider.get().getOrganizeId());
|
||||
List<TrainLibrarySingleEntity> singleEntities = onlineExamSubmitDTO.getSingleEntities();
|
||||
List<TrainLibraryMoreEntity> moreEntities = onlineExamSubmitDTO.getMoreEntities();
|
||||
List<TrainLibraryJudgmentEntity> judgmentEntities = onlineExamSubmitDTO.getJudgmentEntities();
|
||||
List<TrainLibraryEssayQuestionEntity> essayQuestionEntities = onlineExamSubmitDTO.getEssayQuestionEntities();
|
||||
int totalCount = 0;
|
||||
int correctCount = 0;
|
||||
List<TrainLibrarySingleEntity> resultSingleEntities = new ArrayList<>();
|
||||
List<TrainLibraryMoreEntity> resultMoreEntities = new ArrayList<>();
|
||||
List<TrainLibraryJudgmentEntity> resultJudgmentEntities = new ArrayList<>();
|
||||
List<TrainLibraryEssayQuestionEntity> resultEssayQuestionEntities = new ArrayList<>();
|
||||
|
||||
if (!singleEntities.isEmpty()) {
|
||||
totalCount += singleEntities.size();
|
||||
List<TrainLibrarySingleEntity> realSingleEntities = trainLibrarySingleService
|
||||
.getListByParentId(onlineExamSubmitDTO.getId());
|
||||
for (TrainLibrarySingleEntity singleEntity : singleEntities) {
|
||||
for (TrainLibrarySingleEntity entity : realSingleEntities) {
|
||||
if (singleEntity.getId().equals(entity.getId())) {
|
||||
System.out.println("正确答案: " + entity.getFanswer() + " 用户答案: " + singleEntity.getFanswer());
|
||||
if (singleEntity.getFanswer().equals(entity.getFanswer())) {
|
||||
correctCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
singleEntity.setId(RandomUtil.uuId()).setFbankId(recordsEntity.getId())
|
||||
.setFfullName(singleEntity.getFfullName());
|
||||
resultSingleEntities.add(singleEntity);
|
||||
}
|
||||
}
|
||||
if (!moreEntities.isEmpty()) {
|
||||
totalCount += moreEntities.size();
|
||||
List<TrainLibraryMoreEntity> realMoreEntities = trainLibraryMoreService
|
||||
.getListByParentId(onlineExamSubmitDTO.getId());
|
||||
for (TrainLibraryMoreEntity moreEntity : moreEntities) {
|
||||
for (TrainLibraryMoreEntity entity : realMoreEntities) {
|
||||
if (moreEntity.getId().equals(entity.getId())) {
|
||||
System.out.println("正确答案: " + entity.getFanswer() + " 用户答案: " + moreEntity.getFanswer());
|
||||
// 判断结果
|
||||
List<String> userAnswerList = Arrays
|
||||
.asList(moreEntity.getFanswer().replace("[", "").replace("]", "").split(","));
|
||||
List<String> correctAnswerList = Arrays
|
||||
.asList(entity.getFanswer().replace("[", "").replace("]", "").split(","));
|
||||
// 将 List 转换为 Set 以去除重复项并忽略顺序
|
||||
Set<String> userAnswerSet = new HashSet<>(userAnswerList);
|
||||
Set<String> correctAnswerSet = new HashSet<>(correctAnswerList);
|
||||
// 比较集合是否相等
|
||||
boolean isCorrect = userAnswerSet.equals(correctAnswerSet);
|
||||
if (isCorrect) {
|
||||
correctCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
moreEntity.setId(RandomUtil.uuId()).setFbankId(recordsEntity.getId())
|
||||
.setFfullName(moreEntity.getFfullName());
|
||||
resultMoreEntities.add(moreEntity);
|
||||
}
|
||||
}
|
||||
if (!judgmentEntities.isEmpty()) {
|
||||
totalCount += judgmentEntities.size();
|
||||
List<TrainLibraryJudgmentEntity> realJudgmentEntities = trainLibraryJudgmentService
|
||||
.getListByParentId(onlineExamSubmitDTO.getId());
|
||||
for (TrainLibraryJudgmentEntity judgmentEntity : judgmentEntities) {
|
||||
for (TrainLibraryJudgmentEntity entity : realJudgmentEntities) {
|
||||
if (judgmentEntity.getId().equals(entity.getId())) {
|
||||
System.out.println("正确答案: " + entity.getFanswer() + " 用户答案: " + judgmentEntity.getFanswer());
|
||||
if (judgmentEntity.getFanswer().equals(entity.getFanswer())) {
|
||||
correctCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
judgmentEntity.setId(RandomUtil.uuId()).setFbankId(recordsEntity.getId())
|
||||
.setFfullName(judgmentEntity.getFfullName());
|
||||
resultJudgmentEntities.add(judgmentEntity);
|
||||
}
|
||||
}
|
||||
if (!essayQuestionEntities.isEmpty()) {
|
||||
recordsEntity.setFquestionFlag("存在");
|
||||
recordsEntity.setFquestionStatus("未完成");
|
||||
totalCount += essayQuestionEntities.size();
|
||||
// List<TrainLibraryEssayQuestionEntity> realEssayQuestionEntities =
|
||||
// trainLibraryEssayQuestionService.getListByParentId(onlineExamSubmitDTO.getId());
|
||||
for (TrainLibraryEssayQuestionEntity essayQuestionEntity : essayQuestionEntities) {
|
||||
essayQuestionEntity.setId(RandomUtil.uuId()).setFbankId(recordsEntity.getId())
|
||||
.setFfullName(essayQuestionEntity.getFfullName());
|
||||
resultEssayQuestionEntities.add(essayQuestionEntity);
|
||||
}
|
||||
}
|
||||
if (totalCount > 0) {
|
||||
// 计算每题的平均得分并四舍五入
|
||||
double averageScorePerQuestion = 100.0 / totalCount;
|
||||
int roundedAverageScorePerQuestion = Math.toIntExact(Math.round(averageScorePerQuestion));// 每题得分
|
||||
|
||||
int totalScore = roundedAverageScorePerQuestion * totalCount;// 总分
|
||||
|
||||
recordsEntity.setFmark(String.valueOf(totalScore));
|
||||
recordsEntity.setFresultScore(String.valueOf(roundedAverageScorePerQuestion * correctCount));
|
||||
recordsEntity.setFperQuestion(roundedAverageScorePerQuestion);
|
||||
recordsEntity.setFquestionNum(totalCount);
|
||||
System.out.println("总题数: " + totalCount);
|
||||
System.out.println("每题得分: " + roundedAverageScorePerQuestion);
|
||||
System.out.println("总分: " + totalScore);
|
||||
System.out.println("正确答案数量: " + correctCount);
|
||||
System.out.println("最终得分: " + roundedAverageScorePerQuestion * correctCount);
|
||||
|
||||
} else {
|
||||
return ActionResult.fail("提交失败,该试卷中不含题目,请联系相关人员!");
|
||||
}
|
||||
|
||||
// TODO 插入考试记录,单选+多选+判断+问答
|
||||
trainLibrarySingleService.saveBatch(resultSingleEntities);
|
||||
trainLibraryMoreService.saveBatch(resultMoreEntities);
|
||||
trainLibraryJudgmentService.saveBatch(resultJudgmentEntities);
|
||||
trainLibraryEssayQuestionService.saveBatch(resultEssayQuestionEntities);
|
||||
trainTestPaperLibraryMapper.saveRecords(recordsEntity);
|
||||
|
||||
return ActionResult.success("提交成功");
|
||||
}
|
||||
}
|
||||
22
yunzhupaas-train/yunzhupaas-train-controller/pom.xml
Normal file
22
yunzhupaas-train/yunzhupaas-train-controller/pom.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>yunzhupaas-train</artifactId>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<version>5.2.0-RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>yunzhupaas-train-controller</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<artifactId>yunzhupaas-train-biz</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,352 @@
|
||||
package com.yunzhupaas.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.base.UserInfo;
|
||||
import com.yunzhupaas.dto.InReadPaperDTO;
|
||||
import com.yunzhupaas.dto.OutExamRecordsDetailDTO;
|
||||
import com.yunzhupaas.exception.DataException;
|
||||
import com.yunzhupaas.permission.entity.UserEntity;
|
||||
import com.yunzhupaas.service.*;
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.util.*;
|
||||
import com.yunzhupaas.model.trainexamrecords.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.yunzhupaas.flowable.entity.TaskEntity;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.yunzhupaas.model.ExcelModel;
|
||||
import com.yunzhupaas.excel.ExcelExportStyler;
|
||||
import com.yunzhupaas.excel.ExcelHelper;
|
||||
import com.yunzhupaas.annotation.YunzhupaasField;
|
||||
import com.yunzhupaas.base.vo.PageListVO;
|
||||
import com.yunzhupaas.base.vo.PaginationVO;
|
||||
import com.yunzhupaas.base.vo.DownloadVO;
|
||||
import com.yunzhupaas.config.ConfigValueUtil;
|
||||
import com.yunzhupaas.base.entity.ProvinceEntity;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.yunzhupaas.flowable.entity.TaskEntity;
|
||||
import com.yunzhupaas.exception.WorkFlowException;
|
||||
import com.yunzhupaas.model.visualJson.UploaderTemplateModel;
|
||||
import com.yunzhupaas.base.util.FormExecelUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 考试记录
|
||||
*
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-06
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Tag(name = "考试记录", description = "train")
|
||||
@RequestMapping("/api/train/TrainExamRecords")
|
||||
public class TrainExamRecordsController {
|
||||
|
||||
@Autowired
|
||||
private GeneraterSwapUtil generaterSwapUtil;
|
||||
|
||||
@Autowired
|
||||
private UserProvider userProvider;
|
||||
|
||||
@Autowired
|
||||
private TrainExamRecordsService trainExamRecordsService;
|
||||
|
||||
@Autowired
|
||||
private TrainLibrarySingleService trainLibrarySingleService;
|
||||
@Autowired
|
||||
private TrainLibraryMoreService trainLibraryMoreService;
|
||||
@Autowired
|
||||
private TrainLibraryJudgmentService trainLibraryJudgmentService;
|
||||
@Autowired
|
||||
private TrainLibraryEssayQuestionService trainLibraryEssayQuestionService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param trainExamRecordsPagination
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取列表")
|
||||
@PostMapping("/getList")
|
||||
public ActionResult list(@RequestBody TrainExamRecordsPagination trainExamRecordsPagination) throws Exception {
|
||||
List<TrainExamRecordsEntity> list = trainExamRecordsService.getList(trainExamRecordsPagination);
|
||||
List<Map<String, Object>> realList = new ArrayList<>();
|
||||
for (TrainExamRecordsEntity entity : list) {
|
||||
Map<String, Object> trainExamRecordsMap = JsonUtil.entityToMap(entity);
|
||||
trainExamRecordsMap.put("id", trainExamRecordsMap.get("f_id"));
|
||||
// 副表数据
|
||||
// 子表数据
|
||||
List<TrainLibrarySingleEntity> trainLibrarySingleList = entity.getTrainLibrarySingle();
|
||||
trainExamRecordsMap.put("tableField103",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
trainExamRecordsMap.put("trainLibrarySingleList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
List<TrainLibraryMoreEntity> trainLibraryMoreList = entity.getTrainLibraryMore();
|
||||
trainExamRecordsMap.put("tableField131",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
trainExamRecordsMap.put("trainLibraryMoreList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
List<TrainLibraryJudgmentEntity> trainLibraryJudgmentList = entity.getTrainLibraryJudgment();
|
||||
trainExamRecordsMap.put("tableField147",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
trainExamRecordsMap.put("trainLibraryJudgmentList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
List<TrainLibraryEssayQuestionEntity> trainLibraryEssayQuestionList = entity.getTrainLibraryEssayQuestion();
|
||||
trainExamRecordsMap.put("tableField180",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
trainExamRecordsMap.put("trainLibraryEssayQuestionList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
realList.add(trainExamRecordsMap);
|
||||
}
|
||||
// 数据转换
|
||||
boolean isPc = "pc".equals(ServletUtil.getHeader("yunzhupaas-origin"));
|
||||
realList = generaterSwapUtil.swapDataList(realList, TrainExamRecordsConstant.getFormData(),
|
||||
TrainExamRecordsConstant.getColumnData(), trainExamRecordsPagination.getModuleId(),
|
||||
isPc ? false : false);
|
||||
|
||||
// 返回对象
|
||||
PageListVO vo = new PageListVO();
|
||||
vo.setList(realList);
|
||||
PaginationVO page = JsonUtil.getJsonToBean(trainExamRecordsPagination, PaginationVO.class);
|
||||
vo.setPagination(page);
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param trainExamRecordsForm
|
||||
* @return
|
||||
*/
|
||||
@PostMapping()
|
||||
@Operation(summary = "创建")
|
||||
public ActionResult create(@RequestBody @Valid TrainExamRecordsForm trainExamRecordsForm) {
|
||||
String b = trainExamRecordsService.checkForm(trainExamRecordsForm, 0);
|
||||
if (StringUtil.isNotEmpty(b)) {
|
||||
return ActionResult.fail(b);
|
||||
}
|
||||
try {
|
||||
trainExamRecordsService.saveOrUpdate(trainExamRecordsForm, null, true);
|
||||
} catch (Exception e) {
|
||||
return ActionResult.fail("新增数据失败");
|
||||
}
|
||||
return ActionResult.success("创建成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "删除")
|
||||
@DeleteMapping("/{id}")
|
||||
@Transactional
|
||||
public ActionResult delete(@PathVariable("id") String id,
|
||||
@RequestParam(name = "forceDel", defaultValue = "false") boolean forceDel) throws Exception {
|
||||
TrainExamRecordsEntity entity = trainExamRecordsService.getInfo(id);
|
||||
if (entity != null) {
|
||||
// 主表数据删除
|
||||
trainExamRecordsService.delete(entity);
|
||||
QueryWrapper<TrainLibrarySingleEntity> queryWrapperTrainLibrarySingle = new QueryWrapper<>();
|
||||
queryWrapperTrainLibrarySingle.lambda().eq(TrainLibrarySingleEntity::getFbankId, entity.getId());
|
||||
// 子表数据删除
|
||||
trainLibrarySingleService.remove(queryWrapperTrainLibrarySingle);
|
||||
QueryWrapper<TrainLibraryMoreEntity> queryWrapperTrainLibraryMore = new QueryWrapper<>();
|
||||
queryWrapperTrainLibraryMore.lambda().eq(TrainLibraryMoreEntity::getFbankId, entity.getId());
|
||||
// 子表数据删除
|
||||
trainLibraryMoreService.remove(queryWrapperTrainLibraryMore);
|
||||
QueryWrapper<TrainLibraryJudgmentEntity> queryWrapperTrainLibraryJudgment = new QueryWrapper<>();
|
||||
queryWrapperTrainLibraryJudgment.lambda().eq(TrainLibraryJudgmentEntity::getFbankId, entity.getId());
|
||||
// 子表数据删除
|
||||
trainLibraryJudgmentService.remove(queryWrapperTrainLibraryJudgment);
|
||||
QueryWrapper<TrainLibraryEssayQuestionEntity> queryWrapperTrainLibraryEssayQuestion = new QueryWrapper<>();
|
||||
queryWrapperTrainLibraryEssayQuestion.lambda().eq(TrainLibraryEssayQuestionEntity::getFbankId,
|
||||
entity.getId());
|
||||
// 子表数据删除
|
||||
trainLibraryEssayQuestionService.remove(queryWrapperTrainLibraryEssayQuestion);
|
||||
}
|
||||
return ActionResult.success("删除成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/batchRemove")
|
||||
@Transactional
|
||||
@Operation(summary = "批量删除")
|
||||
public ActionResult batchRemove(@RequestBody Object obj) {
|
||||
Map<String, Object> objectMap = JsonUtil.entityToMap(obj);
|
||||
List<String> idList = JsonUtil.getJsonToList(objectMap.get("ids"), String.class);
|
||||
String errInfo = "";
|
||||
List<String> successList = new ArrayList<>();
|
||||
for (String allId : idList) {
|
||||
try {
|
||||
this.delete(allId, false);
|
||||
successList.add(allId);
|
||||
} catch (Exception e) {
|
||||
errInfo = e.getMessage();
|
||||
}
|
||||
}
|
||||
if (successList.size() == 0 && StringUtil.isNotEmpty(errInfo)) {
|
||||
return ActionResult.fail(errInfo);
|
||||
}
|
||||
return ActionResult.success("删除成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param id
|
||||
* @param trainExamRecordsForm
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/{id}")
|
||||
@Operation(summary = "更新")
|
||||
public ActionResult update(@PathVariable("id") String id,
|
||||
@RequestBody @Valid TrainExamRecordsForm trainExamRecordsForm,
|
||||
@RequestParam(value = "isImport", required = false) boolean isImport) {
|
||||
TrainExamRecordsEntity entity = trainExamRecordsService.getInfo(id);
|
||||
if (entity != null) {
|
||||
trainExamRecordsForm.setId(String.valueOf(entity.getId()));
|
||||
|
||||
if (!isImport) {
|
||||
String b = trainExamRecordsService.checkForm(trainExamRecordsForm, 1);
|
||||
if (StringUtil.isNotEmpty(b)) {
|
||||
return ActionResult.fail(b);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
trainExamRecordsService.saveOrUpdate(trainExamRecordsForm, id, false);
|
||||
} catch (Exception e) {
|
||||
return ActionResult.fail("修改数据失败");
|
||||
}
|
||||
return ActionResult.success("更新成功");
|
||||
} else {
|
||||
return ActionResult.fail("更新失败,数据不存在");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单信息(详情页)
|
||||
* 详情页面使用-转换数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "表单信息(详情页)")
|
||||
@GetMapping("/detail/{id}")
|
||||
public ActionResult detailInfo(@PathVariable("id") String id) {
|
||||
TrainExamRecordsEntity entity = trainExamRecordsService.getInfo(id);
|
||||
if (entity == null) {
|
||||
return ActionResult.fail("表单数据不存在!");
|
||||
}
|
||||
Map<String, Object> trainExamRecordsMap = JsonUtil.entityToMap(entity);
|
||||
trainExamRecordsMap.put("id", trainExamRecordsMap.get("f_id"));
|
||||
// 副表数据
|
||||
// 子表数据
|
||||
List<TrainLibrarySingleEntity> trainLibrarySingleList = entity.getTrainLibrarySingle();
|
||||
trainExamRecordsMap.put("tableField103",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
trainExamRecordsMap.put("trainLibrarySingleList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
List<TrainLibraryMoreEntity> trainLibraryMoreList = entity.getTrainLibraryMore();
|
||||
trainExamRecordsMap.put("tableField131",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
trainExamRecordsMap.put("trainLibraryMoreList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
List<TrainLibraryJudgmentEntity> trainLibraryJudgmentList = entity.getTrainLibraryJudgment();
|
||||
trainExamRecordsMap.put("tableField147",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
trainExamRecordsMap.put("trainLibraryJudgmentList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
List<TrainLibraryEssayQuestionEntity> trainLibraryEssayQuestionList = entity.getTrainLibraryEssayQuestion();
|
||||
trainExamRecordsMap.put("tableField180",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
trainExamRecordsMap.put("trainLibraryEssayQuestionList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
boolean isPc = "pc".equals(ServletUtil.getHeader("yunzhupaas-origin"));
|
||||
trainExamRecordsMap = generaterSwapUtil.swapDataDetail(trainExamRecordsMap,
|
||||
TrainExamRecordsConstant.getFormData(), "623544962406941445", isPc ? false : false);
|
||||
// 子表数据
|
||||
trainExamRecordsMap.put("trainLibrarySingleList", trainExamRecordsMap.get("tableField103"));
|
||||
trainExamRecordsMap.put("trainLibraryMoreList", trainExamRecordsMap.get("tableField131"));
|
||||
trainExamRecordsMap.put("trainLibraryJudgmentList", trainExamRecordsMap.get("tableField147"));
|
||||
trainExamRecordsMap.put("trainLibraryEssayQuestionList", trainExamRecordsMap.get("tableField180"));
|
||||
return ActionResult.success(trainExamRecordsMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情(编辑页)
|
||||
* 编辑页面使用-不转换数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "信息")
|
||||
@GetMapping("/{id}")
|
||||
public ActionResult info(@PathVariable("id") String id) {
|
||||
TrainExamRecordsEntity entity = trainExamRecordsService.getInfo(id);
|
||||
if (entity == null) {
|
||||
return ActionResult.fail("表单数据不存在!");
|
||||
}
|
||||
Map<String, Object> trainExamRecordsMap = JsonUtil.entityToMap(entity);
|
||||
trainExamRecordsMap.put("id", trainExamRecordsMap.get("f_id"));
|
||||
// 副表数据
|
||||
// 子表数据
|
||||
List<TrainLibrarySingleEntity> trainLibrarySingleList = entity.getTrainLibrarySingle();
|
||||
trainExamRecordsMap.put("tableField103",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
trainExamRecordsMap.put("trainLibrarySingleList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
List<TrainLibraryMoreEntity> trainLibraryMoreList = entity.getTrainLibraryMore();
|
||||
trainExamRecordsMap.put("tableField131",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
trainExamRecordsMap.put("trainLibraryMoreList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
List<TrainLibraryJudgmentEntity> trainLibraryJudgmentList = entity.getTrainLibraryJudgment();
|
||||
trainExamRecordsMap.put("tableField147",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
trainExamRecordsMap.put("trainLibraryJudgmentList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
List<TrainLibraryEssayQuestionEntity> trainLibraryEssayQuestionList = entity.getTrainLibraryEssayQuestion();
|
||||
trainExamRecordsMap.put("tableField180",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
trainExamRecordsMap.put("trainLibraryEssayQuestionList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
trainExamRecordsMap = generaterSwapUtil.swapDataForm(trainExamRecordsMap,
|
||||
TrainExamRecordsConstant.getFormData(), TrainExamRecordsConstant.TABLEFIELDKEY,
|
||||
TrainExamRecordsConstant.TABLERENAMES);
|
||||
return ActionResult.success(trainExamRecordsMap);
|
||||
}
|
||||
|
||||
@Operation(summary = "考试记录详情")
|
||||
@GetMapping("/examRecordsDetail/{id}")
|
||||
public ActionResult<OutExamRecordsDetailDTO> examRecordsDetail(@PathVariable("id") String id) {
|
||||
return trainExamRecordsService.examRecordsDetail(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "阅卷")
|
||||
@PostMapping("/readPaper")
|
||||
public ActionResult readPaper(@RequestBody InReadPaperDTO in) {
|
||||
return trainExamRecordsService.readPaper(in);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,370 @@
|
||||
package com.yunzhupaas.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.yunzhupaas.base.ActionResult;
|
||||
import com.yunzhupaas.base.UserInfo;
|
||||
import com.yunzhupaas.dto.OnlineExamSubmitDTO;
|
||||
import com.yunzhupaas.dto.OutOnlineExamDTO;
|
||||
import com.yunzhupaas.exception.DataException;
|
||||
import com.yunzhupaas.permission.entity.UserEntity;
|
||||
import com.yunzhupaas.service.*;
|
||||
import com.yunzhupaas.entity.*;
|
||||
import com.yunzhupaas.util.*;
|
||||
import com.yunzhupaas.model.traintestpaperlibrary.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.yunzhupaas.flowable.entity.TaskEntity;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.yunzhupaas.model.ExcelModel;
|
||||
import com.yunzhupaas.excel.ExcelExportStyler;
|
||||
import com.yunzhupaas.excel.ExcelHelper;
|
||||
import com.yunzhupaas.annotation.YunzhupaasField;
|
||||
import com.yunzhupaas.base.vo.PageListVO;
|
||||
import com.yunzhupaas.base.vo.PaginationVO;
|
||||
import com.yunzhupaas.base.vo.DownloadVO;
|
||||
import com.yunzhupaas.config.ConfigValueUtil;
|
||||
import com.yunzhupaas.base.entity.ProvinceEntity;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.yunzhupaas.flowable.entity.TaskEntity;
|
||||
import com.yunzhupaas.exception.WorkFlowException;
|
||||
import com.yunzhupaas.model.visualJson.UploaderTemplateModel;
|
||||
import com.yunzhupaas.base.util.FormExecelUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
*
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Tag(name = "在线考试", description = "train")
|
||||
@RequestMapping("/api/train/TrainTestPaperLibrary")
|
||||
public class TrainTestPaperLibraryController {
|
||||
|
||||
@Autowired
|
||||
private GeneraterSwapUtil generaterSwapUtil;
|
||||
|
||||
@Autowired
|
||||
private UserProvider userProvider;
|
||||
|
||||
@Autowired
|
||||
private TrainTestPaperLibraryService trainTestPaperLibraryService;
|
||||
|
||||
@Autowired
|
||||
private TrainLibrarySingleService trainLibrarySingleService;
|
||||
@Autowired
|
||||
private TrainLibraryMoreService trainLibraryMoreService;
|
||||
@Autowired
|
||||
private TrainLibraryJudgmentService trainLibraryJudgmentService;
|
||||
@Autowired
|
||||
private TrainLibraryEssayQuestionService trainLibraryEssayQuestionService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param trainTestPaperLibraryPagination
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取列表")
|
||||
@PostMapping("/getList")
|
||||
public ActionResult list(@RequestBody TrainTestPaperLibraryPagination trainTestPaperLibraryPagination)
|
||||
throws Exception {
|
||||
List<TrainTestPaperLibraryEntity> list = trainTestPaperLibraryService.getList(trainTestPaperLibraryPagination);
|
||||
List<Map<String, Object>> realList = new ArrayList<>();
|
||||
for (TrainTestPaperLibraryEntity entity : list) {
|
||||
Map<String, Object> trainTestPaperLibraryMap = JsonUtil.entityToMap(entity);
|
||||
trainTestPaperLibraryMap.put("id", trainTestPaperLibraryMap.get("f_id"));
|
||||
// 副表数据
|
||||
// 子表数据
|
||||
List<TrainLibrarySingleEntity> trainLibrarySingleList = entity.getTrainLibrarySingle();
|
||||
trainTestPaperLibraryMap.put("tableField103",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
trainTestPaperLibraryMap.put("trainLibrarySingleList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
List<TrainLibraryMoreEntity> trainLibraryMoreList = entity.getTrainLibraryMore();
|
||||
trainTestPaperLibraryMap.put("tableField131",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
trainTestPaperLibraryMap.put("trainLibraryMoreList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
List<TrainLibraryJudgmentEntity> trainLibraryJudgmentList = entity.getTrainLibraryJudgment();
|
||||
trainTestPaperLibraryMap.put("tableField147",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
trainTestPaperLibraryMap.put("trainLibraryJudgmentList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
List<TrainLibraryEssayQuestionEntity> trainLibraryEssayQuestionList = entity.getTrainLibraryEssayQuestion();
|
||||
trainTestPaperLibraryMap.put("tableField180",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
trainTestPaperLibraryMap.put("trainLibraryEssayQuestionList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
realList.add(trainTestPaperLibraryMap);
|
||||
}
|
||||
// 数据转换
|
||||
boolean isPc = "pc".equals(ServletUtil.getHeader("yunzhupaas-origin"));
|
||||
realList = generaterSwapUtil.swapDataList(realList, TrainTestPaperLibraryConstant.getFormData(),
|
||||
TrainTestPaperLibraryConstant.getColumnData(), trainTestPaperLibraryPagination.getModuleId(),
|
||||
isPc ? false : false);
|
||||
|
||||
// 返回对象
|
||||
PageListVO vo = new PageListVO();
|
||||
vo.setList(realList);
|
||||
PaginationVO page = JsonUtil.getJsonToBean(trainTestPaperLibraryPagination, PaginationVO.class);
|
||||
vo.setPagination(page);
|
||||
return ActionResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param trainTestPaperLibraryForm
|
||||
* @return
|
||||
*/
|
||||
@PostMapping()
|
||||
@Operation(summary = "创建")
|
||||
public ActionResult create(@RequestBody @Valid TrainTestPaperLibraryForm trainTestPaperLibraryForm) {
|
||||
String b = trainTestPaperLibraryService.checkForm(trainTestPaperLibraryForm, 0);
|
||||
if (StringUtil.isNotEmpty(b)) {
|
||||
return ActionResult.fail(b);
|
||||
}
|
||||
try {
|
||||
trainTestPaperLibraryService.saveOrUpdate(trainTestPaperLibraryForm, null, true);
|
||||
} catch (Exception e) {
|
||||
return ActionResult.fail("新增数据失败");
|
||||
}
|
||||
return ActionResult.success("创建成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "删除")
|
||||
@DeleteMapping("/{id}")
|
||||
@Transactional
|
||||
public ActionResult delete(@PathVariable("id") String id,
|
||||
@RequestParam(name = "forceDel", defaultValue = "false") boolean forceDel) throws Exception {
|
||||
TrainTestPaperLibraryEntity entity = trainTestPaperLibraryService.getInfo(id);
|
||||
if (entity != null) {
|
||||
// 主表数据删除
|
||||
trainTestPaperLibraryService.delete(entity);
|
||||
QueryWrapper<TrainLibrarySingleEntity> queryWrapperTrainLibrarySingle = new QueryWrapper<>();
|
||||
queryWrapperTrainLibrarySingle.lambda().eq(TrainLibrarySingleEntity::getFbankId, entity.getId());
|
||||
// 子表数据删除
|
||||
trainLibrarySingleService.remove(queryWrapperTrainLibrarySingle);
|
||||
QueryWrapper<TrainLibraryMoreEntity> queryWrapperTrainLibraryMore = new QueryWrapper<>();
|
||||
queryWrapperTrainLibraryMore.lambda().eq(TrainLibraryMoreEntity::getFbankId, entity.getId());
|
||||
// 子表数据删除
|
||||
trainLibraryMoreService.remove(queryWrapperTrainLibraryMore);
|
||||
QueryWrapper<TrainLibraryJudgmentEntity> queryWrapperTrainLibraryJudgment = new QueryWrapper<>();
|
||||
queryWrapperTrainLibraryJudgment.lambda().eq(TrainLibraryJudgmentEntity::getFbankId, entity.getId());
|
||||
// 子表数据删除
|
||||
trainLibraryJudgmentService.remove(queryWrapperTrainLibraryJudgment);
|
||||
QueryWrapper<TrainLibraryEssayQuestionEntity> queryWrapperTrainLibraryEssayQuestion = new QueryWrapper<>();
|
||||
queryWrapperTrainLibraryEssayQuestion.lambda().eq(TrainLibraryEssayQuestionEntity::getFbankId,
|
||||
entity.getId());
|
||||
// 子表数据删除
|
||||
trainLibraryEssayQuestionService.remove(queryWrapperTrainLibraryEssayQuestion);
|
||||
}
|
||||
return ActionResult.success("删除成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/batchRemove")
|
||||
@Transactional
|
||||
@Operation(summary = "批量删除")
|
||||
public ActionResult batchRemove(@RequestBody Object obj) {
|
||||
Map<String, Object> objectMap = JsonUtil.entityToMap(obj);
|
||||
List<String> idList = JsonUtil.getJsonToList(objectMap.get("ids"), String.class);
|
||||
String errInfo = "";
|
||||
List<String> successList = new ArrayList<>();
|
||||
for (String allId : idList) {
|
||||
try {
|
||||
this.delete(allId, false);
|
||||
successList.add(allId);
|
||||
} catch (Exception e) {
|
||||
errInfo = e.getMessage();
|
||||
}
|
||||
}
|
||||
if (successList.size() == 0 && StringUtil.isNotEmpty(errInfo)) {
|
||||
return ActionResult.fail(errInfo);
|
||||
}
|
||||
return ActionResult.success("删除成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param id
|
||||
* @param trainTestPaperLibraryForm
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/{id}")
|
||||
@Operation(summary = "更新")
|
||||
public ActionResult update(@PathVariable("id") String id,
|
||||
@RequestBody @Valid TrainTestPaperLibraryForm trainTestPaperLibraryForm,
|
||||
@RequestParam(value = "isImport", required = false) boolean isImport) {
|
||||
TrainTestPaperLibraryEntity entity = trainTestPaperLibraryService.getInfo(id);
|
||||
if (entity != null) {
|
||||
trainTestPaperLibraryForm.setId(String.valueOf(entity.getId()));
|
||||
|
||||
if (!isImport) {
|
||||
String b = trainTestPaperLibraryService.checkForm(trainTestPaperLibraryForm, 1);
|
||||
if (StringUtil.isNotEmpty(b)) {
|
||||
return ActionResult.fail(b);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
trainTestPaperLibraryService.saveOrUpdate(trainTestPaperLibraryForm, id, false);
|
||||
} catch (Exception e) {
|
||||
return ActionResult.fail("修改数据失败");
|
||||
}
|
||||
return ActionResult.success("更新成功");
|
||||
} else {
|
||||
return ActionResult.fail("更新失败,数据不存在");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单信息(详情页)
|
||||
* 详情页面使用-转换数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "表单信息(详情页)")
|
||||
@GetMapping("/detail/{id}")
|
||||
public ActionResult detailInfo(@PathVariable("id") String id) {
|
||||
TrainTestPaperLibraryEntity entity = trainTestPaperLibraryService.getInfo(id);
|
||||
if (entity == null) {
|
||||
return ActionResult.fail("表单数据不存在!");
|
||||
}
|
||||
Map<String, Object> trainTestPaperLibraryMap = JsonUtil.entityToMap(entity);
|
||||
trainTestPaperLibraryMap.put("id", trainTestPaperLibraryMap.get("f_id"));
|
||||
// 副表数据
|
||||
// 子表数据
|
||||
List<TrainLibrarySingleEntity> trainLibrarySingleList = entity.getTrainLibrarySingle();
|
||||
trainTestPaperLibraryMap.put("tableField103",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
trainTestPaperLibraryMap.put("trainLibrarySingleList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
List<TrainLibraryMoreEntity> trainLibraryMoreList = entity.getTrainLibraryMore();
|
||||
trainTestPaperLibraryMap.put("tableField131",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
trainTestPaperLibraryMap.put("trainLibraryMoreList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
List<TrainLibraryJudgmentEntity> trainLibraryJudgmentList = entity.getTrainLibraryJudgment();
|
||||
trainTestPaperLibraryMap.put("tableField147",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
trainTestPaperLibraryMap.put("trainLibraryJudgmentList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
List<TrainLibraryEssayQuestionEntity> trainLibraryEssayQuestionList = entity.getTrainLibraryEssayQuestion();
|
||||
trainTestPaperLibraryMap.put("tableField180",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
trainTestPaperLibraryMap.put("trainLibraryEssayQuestionList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
boolean isPc = "pc".equals(ServletUtil.getHeader("yunzhupaas-origin"));
|
||||
trainTestPaperLibraryMap = generaterSwapUtil.swapDataDetail(trainTestPaperLibraryMap,
|
||||
TrainTestPaperLibraryConstant.getFormData(), "623132689079205957", isPc ? false : false);
|
||||
// 子表数据
|
||||
trainTestPaperLibraryMap.put("trainLibrarySingleList", trainTestPaperLibraryMap.get("tableField103"));
|
||||
trainTestPaperLibraryMap.put("trainLibraryMoreList", trainTestPaperLibraryMap.get("tableField131"));
|
||||
trainTestPaperLibraryMap.put("trainLibraryJudgmentList", trainTestPaperLibraryMap.get("tableField147"));
|
||||
trainTestPaperLibraryMap.put("trainLibraryEssayQuestionList", trainTestPaperLibraryMap.get("tableField180"));
|
||||
return ActionResult.success(trainTestPaperLibraryMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情(编辑页)
|
||||
* 编辑页面使用-不转换数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "信息")
|
||||
@GetMapping("/{id}")
|
||||
public ActionResult info(@PathVariable("id") String id) {
|
||||
TrainTestPaperLibraryEntity entity = trainTestPaperLibraryService.getInfo(id);
|
||||
if (entity == null) {
|
||||
return ActionResult.fail("表单数据不存在!");
|
||||
}
|
||||
Map<String, Object> trainTestPaperLibraryMap = JsonUtil.entityToMap(entity);
|
||||
trainTestPaperLibraryMap.put("id", trainTestPaperLibraryMap.get("f_id"));
|
||||
// 副表数据
|
||||
// 子表数据
|
||||
List<TrainLibrarySingleEntity> trainLibrarySingleList = entity.getTrainLibrarySingle();
|
||||
trainTestPaperLibraryMap.put("tableField103",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
trainTestPaperLibraryMap.put("trainLibrarySingleList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibrarySingleList)));
|
||||
List<TrainLibraryMoreEntity> trainLibraryMoreList = entity.getTrainLibraryMore();
|
||||
trainTestPaperLibraryMap.put("tableField131",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
trainTestPaperLibraryMap.put("trainLibraryMoreList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryMoreList)));
|
||||
List<TrainLibraryJudgmentEntity> trainLibraryJudgmentList = entity.getTrainLibraryJudgment();
|
||||
trainTestPaperLibraryMap.put("tableField147",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
trainTestPaperLibraryMap.put("trainLibraryJudgmentList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryJudgmentList)));
|
||||
List<TrainLibraryEssayQuestionEntity> trainLibraryEssayQuestionList = entity.getTrainLibraryEssayQuestion();
|
||||
trainTestPaperLibraryMap.put("tableField180",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
trainTestPaperLibraryMap.put("trainLibraryEssayQuestionList",
|
||||
JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(trainLibraryEssayQuestionList)));
|
||||
trainTestPaperLibraryMap = generaterSwapUtil.swapDataForm(trainTestPaperLibraryMap,
|
||||
TrainTestPaperLibraryConstant.getFormData(), TrainTestPaperLibraryConstant.TABLEFIELDKEY,
|
||||
TrainTestPaperLibraryConstant.TABLERENAMES);
|
||||
return ActionResult.success(trainTestPaperLibraryMap);
|
||||
}
|
||||
|
||||
@Operation(summary = "在线考试详情")
|
||||
@GetMapping("/onlineExam/{id}")
|
||||
public ActionResult<OutOnlineExamDTO> getOnlineExam(@PathVariable("id") String id) {
|
||||
TrainTestPaperLibraryEntity entity = trainTestPaperLibraryService.getInfo(id);
|
||||
|
||||
OutOnlineExamDTO outOnlineExamDTO = new OutOnlineExamDTO();
|
||||
outOnlineExamDTO.setId(id).setEndTime(entity.getFendTime()).setStartTime(entity.getFstartTime())
|
||||
.setExaminationDuration(entity.getFexaminationDuration());
|
||||
List<TrainLibrarySingleEntity> singleEntities = trainLibrarySingleService.getListByParentId(id);
|
||||
singleEntities.forEach(item -> item.setFanswer(null));
|
||||
List<TrainLibraryMoreEntity> moreEntities = trainLibraryMoreService.getListByParentId(id);
|
||||
moreEntities.forEach(item -> item.setFanswer(null));
|
||||
List<TrainLibraryJudgmentEntity> judgmentEntities = trainLibraryJudgmentService.getListByParentId(id);
|
||||
judgmentEntities.forEach(item -> item.setFanswer(null));
|
||||
List<TrainLibraryEssayQuestionEntity> essayQuestionEntities = trainLibraryEssayQuestionService
|
||||
.getListByParentId(id);
|
||||
essayQuestionEntities.forEach(item -> item.setFanswer(null));
|
||||
outOnlineExamDTO.setSingleEntities(singleEntities)
|
||||
.setMoreEntities(moreEntities)
|
||||
.setJudgmentEntities(judgmentEntities)
|
||||
.setEssayQuestionEntities(essayQuestionEntities);
|
||||
return ActionResult.success(outOnlineExamDTO);
|
||||
}
|
||||
|
||||
@Operation(summary = "在线考试提交")
|
||||
@PostMapping("/onlineExam/submit")
|
||||
public ActionResult onlineExamSubmit(@RequestBody OnlineExamSubmitDTO onlineExamSubmitDTO) {
|
||||
return trainTestPaperLibraryService.onlineExamSubmit(onlineExamSubmitDTO);
|
||||
}
|
||||
}
|
||||
22
yunzhupaas-train/yunzhupaas-train-entity/pom.xml
Normal file
22
yunzhupaas-train/yunzhupaas-train-entity/pom.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>yunzhupaas-train</artifactId>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<version>5.2.0-RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>yunzhupaas-train-entity</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yunzhupaas</groupId>
|
||||
<artifactId>yunzhupaas-common-all</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.yunzhupaas.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EssayQuestionDTO {
|
||||
private String id;
|
||||
private String result;//正确 错误
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.yunzhupaas.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class InReadPaperDTO {
|
||||
private String id;//考试记录id
|
||||
private List<EssayQuestionDTO> essayQuestions;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.yunzhupaas.dto;
|
||||
|
||||
import com.yunzhupaas.entity.TrainLibraryEssayQuestionEntity;
|
||||
import com.yunzhupaas.entity.TrainLibraryJudgmentEntity;
|
||||
import com.yunzhupaas.entity.TrainLibraryMoreEntity;
|
||||
import com.yunzhupaas.entity.TrainLibrarySingleEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OnlineExamSubmitDTO {
|
||||
private String id; //在线考试当前行主键id
|
||||
private List<TrainLibrarySingleEntity> singleEntities;
|
||||
private List<TrainLibraryMoreEntity> moreEntities;
|
||||
private List<TrainLibraryJudgmentEntity> judgmentEntities;
|
||||
private List<TrainLibraryEssayQuestionEntity> essayQuestionEntities;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.yunzhupaas.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OutExamRecordsDetailDTO {
|
||||
private String id;
|
||||
private List<OutSingleDTO> singleList;
|
||||
private List<OutMultipleDTO> multipleList;
|
||||
private List<OutJudgeDTO> judgeList;
|
||||
private List<OutShortAnswerDTO> shortAnswerList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.yunzhupaas.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OutJudgeDTO {
|
||||
private String id;//题目主键
|
||||
private String fullName;//题目名称
|
||||
private String userAnswer;//用户答案
|
||||
private String correctAnswer;//正确答案
|
||||
private String result;//结果 -- 正确/错误
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.yunzhupaas.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OutMultipleDTO {
|
||||
private String id;//题目主键
|
||||
private String fullName;//题目名称
|
||||
private String userAnswer;//用户答案
|
||||
private String correctAnswer;//正确答案
|
||||
private String result;//结果 -- 正确/错误
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.yunzhupaas.dto;
|
||||
|
||||
import com.yunzhupaas.entity.TrainLibraryEssayQuestionEntity;
|
||||
import com.yunzhupaas.entity.TrainLibraryJudgmentEntity;
|
||||
import com.yunzhupaas.entity.TrainLibraryMoreEntity;
|
||||
import com.yunzhupaas.entity.TrainLibrarySingleEntity;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OutOnlineExamDTO {
|
||||
private String id; //在线考试当前行主键id
|
||||
private String examinationDuration; //考试时长(分钟)
|
||||
private Date startTime;//开始时间
|
||||
private Date endTime;//结束时间
|
||||
private List<TrainLibrarySingleEntity> singleEntities;
|
||||
private List<TrainLibraryMoreEntity> moreEntities;
|
||||
private List<TrainLibraryJudgmentEntity> judgmentEntities;
|
||||
private List<TrainLibraryEssayQuestionEntity> essayQuestionEntities;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.yunzhupaas.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OutShortAnswerDTO {
|
||||
private String id;//题目主键
|
||||
private String fullName;//题目名称
|
||||
private String userAnswer;//用户答案
|
||||
private String correctAnswer;//正确答案
|
||||
private String result;//结果 -- 正确/错误
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.yunzhupaas.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OutSingleDTO {
|
||||
private String id;//题目主键
|
||||
private String fullName;//题目名称
|
||||
private String userAnswer;//用户答案
|
||||
private String correctAnswer;//正确答案
|
||||
private String result;//结果 -- 正确/错误
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.yunzhupaas.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 教育培训-考试记录
|
||||
*
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
@TableName("make_train_exam_records")
|
||||
@Accessors(chain = true)
|
||||
public class TrainExamRecordsEntity {
|
||||
@TableId(value ="f_id" )
|
||||
@JSONField(name = "f_id")
|
||||
private String id;
|
||||
@TableField("f_library_id")
|
||||
@JSONField(name = "f_library_id")
|
||||
private String flibraryId;
|
||||
@TableField("f_number")
|
||||
@JSONField(name = "f_number")
|
||||
private String fnumber;
|
||||
@TableField(value = "f_examiners" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_examiners")
|
||||
private String fexaminers;
|
||||
@TableField(value = "f_full_name" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
@TableField(value = "f_sort" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_sort")
|
||||
private String fsort;
|
||||
@TableField(value = "f_mark" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_mark")
|
||||
private String fmark;
|
||||
@TableField(value = "f_question_num" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_question_num")
|
||||
private Integer fquestionNum;
|
||||
@TableField(value = "f_per_question" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_per_question")
|
||||
private Integer fperQuestion;
|
||||
@TableField(value = "f_result_score" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_result_score")
|
||||
private String fresultScore;
|
||||
@TableField("f_basic_score")
|
||||
@JSONField(name = "f_basic_score")
|
||||
private Integer fbasicScore;
|
||||
@TableField(value = "f_question_flag" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_question_flag")
|
||||
private String fquestionFlag;
|
||||
@TableField(value = "f_question_status" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_question_status")
|
||||
private String fquestionStatus;
|
||||
@TableField("f_question_score")
|
||||
@JSONField(name = "f_question_score")
|
||||
private Integer fquestionScore;
|
||||
@TableField("f_enabled_mark")
|
||||
@JSONField(name = "f_enabled_mark")
|
||||
private Integer fenabledMark;
|
||||
@TableField("f_sort_code")
|
||||
@JSONField(name = "f_sort_code")
|
||||
private Long fsortCode;
|
||||
@TableField("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private String forganizeId;
|
||||
@TableField("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private Date fcreatorTime;
|
||||
@TableField("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
@TableField("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private Date flastModifyTime;
|
||||
@TableField("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
@TableField("f_delete_time")
|
||||
@JSONField(name = "f_delete_time")
|
||||
private Date deleteTime;
|
||||
@TableField("f_delete_user_id")
|
||||
@JSONField(name = "f_delete_user_id")
|
||||
private String deleteUserId;
|
||||
@TableField("f_delete_mark")
|
||||
@JSONField(name = "f_delete_mark")
|
||||
private Integer deleteMark;
|
||||
@TableField(value = "f_tenant_id",fill = FieldFill.INSERT_UPDATE)
|
||||
@JSONField(name = "f_tenant_id")
|
||||
private String tenantId;
|
||||
@TableField("f_flow_id")
|
||||
@JSONField(name = "f_flow_id")
|
||||
private String flowId;
|
||||
@TableField("f_flow_task_id")
|
||||
@JSONField(name = "f_flow_task_id")
|
||||
private String flowTaskId;
|
||||
@TableField("f_start_time")
|
||||
@JSONField(name = "f_start_time")
|
||||
private Date fstartTime;
|
||||
@TableField("f_end_time")
|
||||
@JSONField(name = "f_end_time")
|
||||
private Date fendTime;
|
||||
@TableField(value = "f_examer" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_examer")
|
||||
private String fexamer;
|
||||
|
||||
@JSONField(name = "trainLibraryEssayQuestion")
|
||||
@TableField(exist = false)
|
||||
private List<TrainLibraryEssayQuestionEntity> trainLibraryEssayQuestion;
|
||||
@JSONField(name = "trainLibraryJudgment")
|
||||
@TableField(exist = false)
|
||||
private List<TrainLibraryJudgmentEntity> trainLibraryJudgment;
|
||||
@JSONField(name = "trainLibraryMore")
|
||||
@TableField(exist = false)
|
||||
private List<TrainLibraryMoreEntity> trainLibraryMore;
|
||||
@JSONField(name = "trainLibrarySingle")
|
||||
@TableField(exist = false)
|
||||
private List<TrainLibrarySingleEntity> trainLibrarySingle;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.yunzhupaas.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 教育培训-试卷库-问答题
|
||||
*
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
@TableName("make_train_library_essay_question")
|
||||
@Accessors(chain = true)
|
||||
public class TrainLibraryEssayQuestionEntity {
|
||||
@TableId(value ="f_id" )
|
||||
@JSONField(name = "f_id")
|
||||
private String id;
|
||||
@TableField("f_bank_id")
|
||||
@JSONField(name = "f_bank_id")
|
||||
private String fbankId;
|
||||
@TableField(value = "f_difficulty" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_difficulty")
|
||||
private String fdifficulty;
|
||||
@TableField(value = "f_sort" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_sort")
|
||||
private String fsort;
|
||||
@TableField(value = "f_full_name" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
@TableField(value = "f_analyze" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
@TableField(value = "f_result" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_result")
|
||||
private String fresult;
|
||||
@TableField(value = "f_answer" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
@TableField("f_description")
|
||||
@JSONField(name = "f_description")
|
||||
private String fdescription;
|
||||
@TableField("f_enabled_mark")
|
||||
@JSONField(name = "f_enabled_mark")
|
||||
private Integer fenabledMark;
|
||||
@TableField("f_sort_code")
|
||||
@JSONField(name = "f_sort_code")
|
||||
private Long fsortCode;
|
||||
@TableField("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private String forganizeId;
|
||||
@TableField("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private Date fcreatorTime;
|
||||
@TableField("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
@TableField("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private Date flastModifyTime;
|
||||
@TableField("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
@TableField("f_delete_time")
|
||||
@JSONField(name = "f_delete_time")
|
||||
private Date deleteTime;
|
||||
@TableField("f_delete_user_id")
|
||||
@JSONField(name = "f_delete_user_id")
|
||||
private String deleteUserId;
|
||||
@TableField("f_delete_mark")
|
||||
@JSONField(name = "f_delete_mark")
|
||||
private Integer deleteMark;
|
||||
@TableField(value = "f_tenant_id",fill = FieldFill.INSERT_UPDATE)
|
||||
@JSONField(name = "f_tenant_id")
|
||||
private String tenantId;
|
||||
@TableField("f_flow_id")
|
||||
@JSONField(name = "f_flow_id")
|
||||
private String flowId;
|
||||
@TableField("f_flow_task_id")
|
||||
@JSONField(name = "f_flow_task_id")
|
||||
private String flowTaskId;
|
||||
@TableField(value = "f_topic_type" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.yunzhupaas.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 教育培训-试卷库-判断题
|
||||
*
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
@TableName("make_train_library_judgment")
|
||||
@Accessors(chain = true)
|
||||
public class TrainLibraryJudgmentEntity {
|
||||
@TableId(value ="f_id" )
|
||||
@JSONField(name = "f_id")
|
||||
private String id;
|
||||
@TableField("f_bank_id")
|
||||
@JSONField(name = "f_bank_id")
|
||||
private String fbankId;
|
||||
@TableField(value = "f_difficulty" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_difficulty")
|
||||
private String fdifficulty;
|
||||
@TableField(value = "f_sort" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_sort")
|
||||
private String fsort;
|
||||
@TableField(value = "f_full_name" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
@TableField(value = "f_analyze" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
@TableField(value = "f_answer" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
@TableField("f_description")
|
||||
@JSONField(name = "f_description")
|
||||
private String fdescription;
|
||||
@TableField("f_enabled_mark")
|
||||
@JSONField(name = "f_enabled_mark")
|
||||
private Integer fenabledMark;
|
||||
@TableField("f_sort_code")
|
||||
@JSONField(name = "f_sort_code")
|
||||
private Long fsortCode;
|
||||
@TableField("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private String forganizeId;
|
||||
@TableField("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private Date fcreatorTime;
|
||||
@TableField("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
@TableField("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private Date flastModifyTime;
|
||||
@TableField("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
@TableField("f_delete_time")
|
||||
@JSONField(name = "f_delete_time")
|
||||
private Date deleteTime;
|
||||
@TableField("f_delete_user_id")
|
||||
@JSONField(name = "f_delete_user_id")
|
||||
private String deleteUserId;
|
||||
@TableField("f_delete_mark")
|
||||
@JSONField(name = "f_delete_mark")
|
||||
private Integer deleteMark;
|
||||
@TableField(value = "f_tenant_id",fill = FieldFill.INSERT_UPDATE)
|
||||
@JSONField(name = "f_tenant_id")
|
||||
private String tenantId;
|
||||
@TableField("f_flow_id")
|
||||
@JSONField(name = "f_flow_id")
|
||||
private String flowId;
|
||||
@TableField("f_flow_task_id")
|
||||
@JSONField(name = "f_flow_task_id")
|
||||
private String flowTaskId;
|
||||
@TableField(value = "f_topic_type" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.yunzhupaas.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 教育培训-试卷库-多选题
|
||||
*
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
@TableName("make_train_library_more")
|
||||
@Accessors(chain = true)
|
||||
public class TrainLibraryMoreEntity {
|
||||
@TableId(value ="f_id" )
|
||||
@JSONField(name = "f_id")
|
||||
private String id;
|
||||
@TableField("f_bank_id")
|
||||
@JSONField(name = "f_bank_id")
|
||||
private String fbankId;
|
||||
@TableField(value = "f_difficulty" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_difficulty")
|
||||
private String fdifficulty;
|
||||
@TableField(value = "f_sort" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_sort")
|
||||
private String fsort;
|
||||
@TableField(value = "f_full_name" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
@TableField(value = "f_options_a" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_options_a")
|
||||
private String foptionsA;
|
||||
@TableField(value = "f_options_b" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_options_b")
|
||||
private String foptionsB;
|
||||
@TableField(value = "f_options_c" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_options_c")
|
||||
private String foptionsC;
|
||||
@TableField(value = "f_options_d" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_options_d")
|
||||
private String foptionsD;
|
||||
@TableField(value = "f_analyze" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
@TableField(value = "f_answer" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
@TableField("f_description")
|
||||
@JSONField(name = "f_description")
|
||||
private String fdescription;
|
||||
@TableField("f_enabled_mark")
|
||||
@JSONField(name = "f_enabled_mark")
|
||||
private Integer fenabledMark;
|
||||
@TableField("f_sort_code")
|
||||
@JSONField(name = "f_sort_code")
|
||||
private Long fsortCode;
|
||||
@TableField("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private String forganizeId;
|
||||
@TableField("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private Date fcreatorTime;
|
||||
@TableField("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
@TableField("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private Date flastModifyTime;
|
||||
@TableField("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
@TableField("f_delete_time")
|
||||
@JSONField(name = "f_delete_time")
|
||||
private Date deleteTime;
|
||||
@TableField("f_delete_user_id")
|
||||
@JSONField(name = "f_delete_user_id")
|
||||
private String deleteUserId;
|
||||
@TableField("f_delete_mark")
|
||||
@JSONField(name = "f_delete_mark")
|
||||
private Integer deleteMark;
|
||||
@TableField(value = "f_tenant_id",fill = FieldFill.INSERT_UPDATE)
|
||||
@JSONField(name = "f_tenant_id")
|
||||
private String tenantId;
|
||||
@TableField("f_flow_id")
|
||||
@JSONField(name = "f_flow_id")
|
||||
private String flowId;
|
||||
@TableField("f_flow_task_id")
|
||||
@JSONField(name = "f_flow_task_id")
|
||||
private String flowTaskId;
|
||||
@TableField(value = "f_topic_type" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.yunzhupaas.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 教育培训-试卷库-单选题
|
||||
*
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
@TableName("make_train_library_single")
|
||||
@Accessors(chain = true)
|
||||
public class TrainLibrarySingleEntity {
|
||||
@TableId(value ="f_id" )
|
||||
@JSONField(name = "f_id")
|
||||
private String id;
|
||||
@TableField("f_bank_id")
|
||||
@JSONField(name = "f_bank_id")
|
||||
private String fbankId;
|
||||
@TableField(value = "f_difficulty" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_difficulty")
|
||||
private String fdifficulty;
|
||||
@TableField(value = "f_sort" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_sort")
|
||||
private String fsort;
|
||||
@TableField(value = "f_full_name" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
@TableField(value = "f_options_a" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_options_a")
|
||||
private String foptionsA;
|
||||
@TableField(value = "f_options_b" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_options_b")
|
||||
private String foptionsB;
|
||||
@TableField(value = "f_options_c" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_options_c")
|
||||
private String foptionsC;
|
||||
@TableField(value = "f_options_d" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_options_d")
|
||||
private String foptionsD;
|
||||
@TableField(value = "f_analyze" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
@TableField(value = "f_answer" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
@TableField(value = "f_topic_type" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
@TableField("f_description")
|
||||
@JSONField(name = "f_description")
|
||||
private String fdescription;
|
||||
@TableField("f_enabled_mark")
|
||||
@JSONField(name = "f_enabled_mark")
|
||||
private Integer fenabledMark;
|
||||
@TableField("f_sort_code")
|
||||
@JSONField(name = "f_sort_code")
|
||||
private Long fsortCode;
|
||||
@TableField("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private String forganizeId;
|
||||
@TableField("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private Date fcreatorTime;
|
||||
@TableField("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
@TableField("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private Date flastModifyTime;
|
||||
@TableField("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
@TableField("f_delete_time")
|
||||
@JSONField(name = "f_delete_time")
|
||||
private Date deleteTime;
|
||||
@TableField("f_delete_user_id")
|
||||
@JSONField(name = "f_delete_user_id")
|
||||
private String deleteUserId;
|
||||
@TableField("f_delete_mark")
|
||||
@JSONField(name = "f_delete_mark")
|
||||
private Integer deleteMark;
|
||||
@TableField(value = "f_tenant_id",fill = FieldFill.INSERT_UPDATE)
|
||||
@JSONField(name = "f_tenant_id")
|
||||
private String tenantId;
|
||||
@TableField("f_flow_id")
|
||||
@JSONField(name = "f_flow_id")
|
||||
private String flowId;
|
||||
@TableField("f_flow_task_id")
|
||||
@JSONField(name = "f_flow_task_id")
|
||||
private String flowTaskId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.yunzhupaas.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
/**
|
||||
* 教育培训-试卷库
|
||||
*
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
@TableName("make_train_test_paper_library")
|
||||
public class TrainTestPaperLibraryEntity {
|
||||
@TableId(value ="f_id" )
|
||||
@JSONField(name = "f_id")
|
||||
private String id;
|
||||
@TableField("f_number")
|
||||
@JSONField(name = "f_number")
|
||||
private String fnumber;
|
||||
@TableField(value = "f_full_name" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
@TableField(value = "f_sort" , updateStrategy = FieldStrategy.IGNORED)
|
||||
@JSONField(name = "f_sort")
|
||||
private String fsort;
|
||||
@TableField("f_number_of_problems")
|
||||
@JSONField(name = "f_number_of_problems")
|
||||
private String fnumberOfProblems;
|
||||
@TableField("f_mark")
|
||||
@JSONField(name = "f_mark")
|
||||
private String fmark;
|
||||
@TableField("f_examination_title")
|
||||
@JSONField(name = "f_examination_title")
|
||||
private String fexaminationTitle;
|
||||
@TableField("f_examination_time")
|
||||
@JSONField(name = "f_examination_time")
|
||||
private Date fexaminationTime;
|
||||
@TableField("f_examination_duration")
|
||||
@JSONField(name = "f_examination_duration")
|
||||
private String fexaminationDuration;
|
||||
@TableField("f_passing_score")
|
||||
@JSONField(name = "f_passing_score")
|
||||
private String fpassingScore;
|
||||
@TableField("f_training_record")
|
||||
@JSONField(name = "f_training_record")
|
||||
private String ftrainingRecord;
|
||||
@TableField("f_examiners")
|
||||
@JSONField(name = "f_examiners")
|
||||
private String fexaminers;
|
||||
@TableField("f_examer")
|
||||
@JSONField(name = "f_examer")
|
||||
private String fexamer;
|
||||
@TableField("f_description")
|
||||
@JSONField(name = "f_description")
|
||||
private String fdescription;
|
||||
@TableField("f_enabled_mark")
|
||||
@JSONField(name = "f_enabled_mark")
|
||||
private Integer fenabledMark;
|
||||
@TableField("f_sort_code")
|
||||
@JSONField(name = "f_sort_code")
|
||||
private Long fsortCode;
|
||||
@TableField("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private String forganizeId;
|
||||
@TableField("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private Date fcreatorTime;
|
||||
@TableField("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
@TableField("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private Date flastModifyTime;
|
||||
@TableField("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
@TableField("f_delete_time")
|
||||
@JSONField(name = "f_delete_time")
|
||||
private Date deleteTime;
|
||||
@TableField("f_delete_user_id")
|
||||
@JSONField(name = "f_delete_user_id")
|
||||
private String deleteUserId;
|
||||
@TableField("f_delete_mark")
|
||||
@JSONField(name = "f_delete_mark")
|
||||
private Integer deleteMark;
|
||||
@TableField(value = "f_tenant_id",fill = FieldFill.INSERT_UPDATE)
|
||||
@JSONField(name = "f_tenant_id")
|
||||
private String tenantId;
|
||||
@TableField("f_flow_id")
|
||||
@JSONField(name = "f_flow_id")
|
||||
private String flowId;
|
||||
@TableField("f_flow_task_id")
|
||||
@JSONField(name = "f_flow_task_id")
|
||||
private String flowTaskId;
|
||||
@TableField("f_start_time")
|
||||
@JSONField(name = "f_start_time")
|
||||
private Date fstartTime;
|
||||
@TableField("f_end_time")
|
||||
@JSONField(name = "f_end_time")
|
||||
private Date fendTime;
|
||||
|
||||
@JSONField(name = "trainLibraryEssayQuestion")
|
||||
@TableField(exist = false)
|
||||
private List<TrainLibraryEssayQuestionEntity> trainLibraryEssayQuestion;
|
||||
@JSONField(name = "trainLibraryJudgment")
|
||||
@TableField(exist = false)
|
||||
private List<TrainLibraryJudgmentEntity> trainLibraryJudgment;
|
||||
@JSONField(name = "trainLibraryMore")
|
||||
@TableField(exist = false)
|
||||
private List<TrainLibraryMoreEntity> trainLibraryMore;
|
||||
@JSONField(name = "trainLibrarySingle")
|
||||
@TableField(exist = false)
|
||||
private List<TrainLibrarySingleEntity> trainLibrarySingle;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
/**
|
||||
*
|
||||
* 考试记录
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
public class TrainExamRecordsExcelErrorVO extends TrainExamRecordsExcelVO{
|
||||
|
||||
@Excel(name = "异常原因",orderNum = "-999")
|
||||
@JSONField(name = "errorsInfo")
|
||||
private String errorsInfo;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Time;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
/**
|
||||
*
|
||||
* 考试记录
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
public class TrainExamRecordsExcelVO{
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* 考试记录
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "表单参数")
|
||||
public class TrainExamRecordsForm {
|
||||
/** 主键 */
|
||||
@Schema(description = "主键")
|
||||
@JSONField(name = "f_id")
|
||||
private String id;
|
||||
|
||||
|
||||
/** 试卷名称 **/
|
||||
@Schema(description = "试卷名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
/** 试题分类 **/
|
||||
@Schema(description = "试题分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "f_sort")
|
||||
private Object fsort;
|
||||
/** 考试人员 **/
|
||||
@Schema(description = "考试人员")
|
||||
@JsonProperty("f_examiners")
|
||||
@JSONField(name = "f_examiners")
|
||||
private Object fexaminers;
|
||||
/** 考试成绩 **/
|
||||
@Schema(description = "考试成绩")
|
||||
@JsonProperty("f_result_score")
|
||||
@JSONField(name = "f_result_score")
|
||||
private BigDecimal fresultScore;
|
||||
/** 总分数 **/
|
||||
@Schema(description = "总分数")
|
||||
@JsonProperty("f_mark")
|
||||
@JSONField(name = "f_mark")
|
||||
private BigDecimal fmark;
|
||||
/** 总题数 **/
|
||||
@Schema(description = "总题数")
|
||||
@JsonProperty("f_question_num")
|
||||
@JSONField(name = "f_question_num")
|
||||
private BigDecimal fquestionNum;
|
||||
/** 每题分数 **/
|
||||
@Schema(description = "每题分数")
|
||||
@JsonProperty("f_per_question")
|
||||
@JSONField(name = "f_per_question")
|
||||
private BigDecimal fperQuestion;
|
||||
/** 是否存在问答题 **/
|
||||
@Schema(description = "是否存在问答题")
|
||||
@JsonProperty("f_question_flag")
|
||||
@JSONField(name = "f_question_flag")
|
||||
private Object fquestionFlag;
|
||||
/** 阅卷状态 **/
|
||||
@Schema(description = "阅卷状态")
|
||||
@JsonProperty("f_question_status")
|
||||
@JSONField(name = "f_question_status")
|
||||
private Object fquestionStatus;
|
||||
/** 创建用户 **/
|
||||
@Schema(description = "创建用户")
|
||||
@JsonProperty("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
/** 完成时间 **/
|
||||
@Schema(description = "完成时间")
|
||||
@JsonProperty("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private String fcreatorTime;
|
||||
/** 修改用户 **/
|
||||
@Schema(description = "修改用户")
|
||||
@JsonProperty("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
/** 修改时间 **/
|
||||
@Schema(description = "修改时间")
|
||||
@JsonProperty("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private String flastModifyTime;
|
||||
/** 所属组织 **/
|
||||
@Schema(description = "所属组织")
|
||||
@JsonProperty("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private Object forganizeId;
|
||||
/** 阅卷人 **/
|
||||
@Schema(description = "阅卷人")
|
||||
@JsonProperty("f_examer")
|
||||
@JSONField(name = "f_examer")
|
||||
private Object fexamer;
|
||||
|
||||
/** 子表数据 **/
|
||||
@Schema(description = "trainLibrarySingle子表数据")
|
||||
@JsonProperty("trainLibrarySingleList")
|
||||
private List<TrainLibrarySingleModel> trainLibrarySingleList;
|
||||
/** 子表数据 **/
|
||||
@Schema(description = "trainLibraryMore子表数据")
|
||||
@JsonProperty("trainLibraryMoreList")
|
||||
private List<TrainLibraryMoreModel> trainLibraryMoreList;
|
||||
/** 子表数据 **/
|
||||
@Schema(description = "trainLibraryJudgment子表数据")
|
||||
@JsonProperty("trainLibraryJudgmentList")
|
||||
private List<TrainLibraryJudgmentModel> trainLibraryJudgmentList;
|
||||
/** 子表数据 **/
|
||||
@Schema(description = "trainLibraryEssayQuestion子表数据")
|
||||
@JsonProperty("trainLibraryEssayQuestionList")
|
||||
private List<TrainLibraryEssayQuestionModel> trainLibraryEssayQuestionList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import com.yunzhupaas.base.Pagination;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 考试记录
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "列表查询参数")
|
||||
public class TrainExamRecordsPagination extends Pagination {
|
||||
/** 关键词搜索 */
|
||||
@Schema(description = "关键词搜索")
|
||||
private String yunzhupaasKeyword;
|
||||
/** 查询key */
|
||||
@Schema(description = "查询key")
|
||||
private String[] selectKey;
|
||||
/** 选中数据数组id */
|
||||
@Schema(description = "选中数据数组id")
|
||||
private String[] selectIds;
|
||||
/** json */
|
||||
@Schema(description = "json")
|
||||
private String json;
|
||||
/** 数据类型 0-当前页,1-全部数据 */
|
||||
@Schema(description = "数据类型 0-当前页,1-全部数据")
|
||||
private String dataType;
|
||||
/** 高级查询 */
|
||||
@Schema(description = "高级查询")
|
||||
private String superQueryJson;
|
||||
/** 功能id */
|
||||
@Schema(description = "功能id")
|
||||
private String moduleId;
|
||||
/** 菜单id */
|
||||
@Schema(description = "菜单id")
|
||||
private String menuId;
|
||||
/** 考试人员 */
|
||||
@Schema(description = "考试人员")
|
||||
@JsonProperty("f_examiners")
|
||||
@JSONField(name = "fexaminers")
|
||||
private Object fexaminers;
|
||||
/** 考试成绩 */
|
||||
@Schema(description = "考试成绩")
|
||||
@JsonProperty("f_result_score")
|
||||
@JSONField(name = "fresultScore")
|
||||
private Object fresultScore;
|
||||
/** 试卷名称 */
|
||||
@Schema(description = "试卷名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "ffullName")
|
||||
private Object ffullName;
|
||||
/** 试题分类 */
|
||||
@Schema(description = "试题分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "fsort")
|
||||
private Object fsort;
|
||||
/** 完成时间 */
|
||||
@Schema(description = "完成时间")
|
||||
@JsonProperty("f_creator_time")
|
||||
@JSONField(name = "fcreatorTime")
|
||||
private Object fcreatorTime;
|
||||
/** 阅卷状态 */
|
||||
@Schema(description = "阅卷状态")
|
||||
@JsonProperty("f_question_status")
|
||||
@JSONField(name = "fquestionStatus")
|
||||
private Object fquestionStatus;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Time;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
/**
|
||||
*
|
||||
* 考试记录
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
public class TrainLibraryEssayQuestionExcelVO{
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
*
|
||||
* 考试记录
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "TrainLibraryEssayQuestion子表参数")
|
||||
public class TrainLibraryEssayQuestionModel {
|
||||
|
||||
/** 子表:TrainLibraryEssayQuestion 主键:f_id **/
|
||||
@Schema(description = "主键")
|
||||
@JsonProperty("f_id")
|
||||
private String f_id;
|
||||
/** 题目难度 **/
|
||||
@Schema(description = "题目难度")
|
||||
@JsonProperty("f_difficulty")
|
||||
@JSONField(name = "f_difficulty")
|
||||
private Object fdifficulty;
|
||||
/** 分类 **/
|
||||
@Schema(description = "分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "f_sort")
|
||||
private Object fsort;
|
||||
/** 题目名称 **/
|
||||
@Schema(description = "题目名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
/** 解析 **/
|
||||
@Schema(description = "解析")
|
||||
@JsonProperty("f_analyze")
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
/** 答案 **/
|
||||
@Schema(description = "答案")
|
||||
@JsonProperty("f_answer")
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
/** 题目类型 **/
|
||||
@Schema(description = "题目类型")
|
||||
@JsonProperty("f_topic_type")
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
/** 所属组织 **/
|
||||
@Schema(description = "所属组织")
|
||||
@JsonProperty("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private Object forganizeId;
|
||||
/** 修改时间 **/
|
||||
@Schema(description = "修改时间")
|
||||
@JsonProperty("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private String flastModifyTime;
|
||||
/** 修改用户 **/
|
||||
@Schema(description = "修改用户")
|
||||
@JsonProperty("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
/** 创建时间 **/
|
||||
@Schema(description = "创建时间")
|
||||
@JsonProperty("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private String fcreatorTime;
|
||||
/** 创建用户 **/
|
||||
@Schema(description = "创建用户")
|
||||
@JsonProperty("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Time;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
/**
|
||||
*
|
||||
* 考试记录
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
public class TrainLibraryJudgmentExcelVO{
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
*
|
||||
* 考试记录
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "TrainLibraryJudgment子表参数")
|
||||
public class TrainLibraryJudgmentModel {
|
||||
|
||||
/** 子表:TrainLibraryJudgment 主键:f_id **/
|
||||
@Schema(description = "主键")
|
||||
@JsonProperty("f_id")
|
||||
private String f_id;
|
||||
/** 题目难度 **/
|
||||
@Schema(description = "题目难度")
|
||||
@JsonProperty("f_difficulty")
|
||||
@JSONField(name = "f_difficulty")
|
||||
private Object fdifficulty;
|
||||
/** 分类 **/
|
||||
@Schema(description = "分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "f_sort")
|
||||
private Object fsort;
|
||||
/** 题目名称 **/
|
||||
@Schema(description = "题目名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
/** 解析 **/
|
||||
@Schema(description = "解析")
|
||||
@JsonProperty("f_analyze")
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
/** 答案 **/
|
||||
@Schema(description = "答案")
|
||||
@JsonProperty("f_answer")
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
/** 题目类型 **/
|
||||
@Schema(description = "题目类型")
|
||||
@JsonProperty("f_topic_type")
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
/** 所属组织 **/
|
||||
@Schema(description = "所属组织")
|
||||
@JsonProperty("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private Object forganizeId;
|
||||
/** 修改时间 **/
|
||||
@Schema(description = "修改时间")
|
||||
@JsonProperty("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private String flastModifyTime;
|
||||
/** 修改用户 **/
|
||||
@Schema(description = "修改用户")
|
||||
@JsonProperty("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
/** 创建时间 **/
|
||||
@Schema(description = "创建时间")
|
||||
@JsonProperty("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private String fcreatorTime;
|
||||
/** 创建用户 **/
|
||||
@Schema(description = "创建用户")
|
||||
@JsonProperty("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Time;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
/**
|
||||
*
|
||||
* 考试记录
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
public class TrainLibraryMoreExcelVO{
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
*
|
||||
* 考试记录
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "TrainLibraryMore子表参数")
|
||||
public class TrainLibraryMoreModel {
|
||||
|
||||
/** 子表:TrainLibraryMore 主键:f_id **/
|
||||
@Schema(description = "主键")
|
||||
@JsonProperty("f_id")
|
||||
private String f_id;
|
||||
/** 题目难度 **/
|
||||
@Schema(description = "题目难度")
|
||||
@JsonProperty("f_difficulty")
|
||||
@JSONField(name = "f_difficulty")
|
||||
private Object fdifficulty;
|
||||
/** 分类 **/
|
||||
@Schema(description = "分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "f_sort")
|
||||
private Object fsort;
|
||||
/** 题目名称 **/
|
||||
@Schema(description = "题目名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
/** 解析 **/
|
||||
@Schema(description = "解析")
|
||||
@JsonProperty("f_analyze")
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
/** 答案 **/
|
||||
@Schema(description = "答案")
|
||||
@JsonProperty("f_answer")
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
/** 题目类型 **/
|
||||
@Schema(description = "题目类型")
|
||||
@JsonProperty("f_topic_type")
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
/** 选项A **/
|
||||
@Schema(description = "选项A")
|
||||
@JsonProperty("f_options_a")
|
||||
@JSONField(name = "f_options_a")
|
||||
private String foptionsA;
|
||||
/** 选项B **/
|
||||
@Schema(description = "选项B")
|
||||
@JsonProperty("f_options_b")
|
||||
@JSONField(name = "f_options_b")
|
||||
private String foptionsB;
|
||||
/** 选项C **/
|
||||
@Schema(description = "选项C")
|
||||
@JsonProperty("f_options_c")
|
||||
@JSONField(name = "f_options_c")
|
||||
private String foptionsC;
|
||||
/** 选项D **/
|
||||
@Schema(description = "选项D")
|
||||
@JsonProperty("f_options_d")
|
||||
@JSONField(name = "f_options_d")
|
||||
private String foptionsD;
|
||||
/** 所属组织 **/
|
||||
@Schema(description = "所属组织")
|
||||
@JsonProperty("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private Object forganizeId;
|
||||
/** 修改时间 **/
|
||||
@Schema(description = "修改时间")
|
||||
@JsonProperty("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private String flastModifyTime;
|
||||
/** 修改用户 **/
|
||||
@Schema(description = "修改用户")
|
||||
@JsonProperty("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
/** 创建时间 **/
|
||||
@Schema(description = "创建时间")
|
||||
@JsonProperty("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private String fcreatorTime;
|
||||
/** 创建用户 **/
|
||||
@Schema(description = "创建用户")
|
||||
@JsonProperty("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Time;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
/**
|
||||
*
|
||||
* 考试记录
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
public class TrainLibrarySingleExcelVO{
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.yunzhupaas.model.trainexamrecords;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
*
|
||||
* 考试记录
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-06
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "TrainLibrarySingle子表参数")
|
||||
public class TrainLibrarySingleModel {
|
||||
|
||||
/** 子表:TrainLibrarySingle 主键:f_id **/
|
||||
@Schema(description = "主键")
|
||||
@JsonProperty("f_id")
|
||||
private String f_id;
|
||||
/** 题目难度 **/
|
||||
@Schema(description = "题目难度")
|
||||
@JsonProperty("f_difficulty")
|
||||
@JSONField(name = "f_difficulty")
|
||||
private Object fdifficulty;
|
||||
/** 分类 **/
|
||||
@Schema(description = "分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "f_sort")
|
||||
private Object fsort;
|
||||
/** 题目名称 **/
|
||||
@Schema(description = "题目名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
/** 解析 **/
|
||||
@Schema(description = "解析")
|
||||
@JsonProperty("f_analyze")
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
/** 答案 **/
|
||||
@Schema(description = "答案")
|
||||
@JsonProperty("f_answer")
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
/** 题目类型 **/
|
||||
@Schema(description = "题目类型")
|
||||
@JsonProperty("f_topic_type")
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
/** 选项A **/
|
||||
@Schema(description = "选项A")
|
||||
@JsonProperty("f_options_a")
|
||||
@JSONField(name = "f_options_a")
|
||||
private String foptionsA;
|
||||
/** 选项B **/
|
||||
@Schema(description = "选项B")
|
||||
@JsonProperty("f_options_b")
|
||||
@JSONField(name = "f_options_b")
|
||||
private String foptionsB;
|
||||
/** 选项C **/
|
||||
@Schema(description = "选项C")
|
||||
@JsonProperty("f_options_c")
|
||||
@JSONField(name = "f_options_c")
|
||||
private String foptionsC;
|
||||
/** 选项D **/
|
||||
@Schema(description = "选项D")
|
||||
@JsonProperty("f_options_d")
|
||||
@JSONField(name = "f_options_d")
|
||||
private String foptionsD;
|
||||
/** 所属组织 **/
|
||||
@Schema(description = "所属组织")
|
||||
@JsonProperty("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private Object forganizeId;
|
||||
/** 修改时间 **/
|
||||
@Schema(description = "修改时间")
|
||||
@JsonProperty("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private String flastModifyTime;
|
||||
/** 修改用户 **/
|
||||
@Schema(description = "修改用户")
|
||||
@JsonProperty("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
/** 创建时间 **/
|
||||
@Schema(description = "创建时间")
|
||||
@JsonProperty("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private String fcreatorTime;
|
||||
/** 创建用户 **/
|
||||
@Schema(description = "创建用户")
|
||||
@JsonProperty("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Time;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
public class TrainLibraryEssayQuestionExcelVO{
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "TrainLibraryEssayQuestion子表参数")
|
||||
public class TrainLibraryEssayQuestionModel {
|
||||
|
||||
/** 子表:TrainLibraryEssayQuestion 主键:f_id **/
|
||||
@Schema(description = "主键")
|
||||
@JsonProperty("f_id")
|
||||
private String f_id;
|
||||
/** 题目难度 **/
|
||||
@Schema(description = "题目难度")
|
||||
@JsonProperty("f_difficulty")
|
||||
@JSONField(name = "f_difficulty")
|
||||
private Object fdifficulty;
|
||||
/** 分类 **/
|
||||
@Schema(description = "分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "f_sort")
|
||||
private Object fsort;
|
||||
/** 题目名称 **/
|
||||
@Schema(description = "题目名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
/** 解析 **/
|
||||
@Schema(description = "解析")
|
||||
@JsonProperty("f_analyze")
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
/** 答案 **/
|
||||
@Schema(description = "答案")
|
||||
@JsonProperty("f_answer")
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
/** 题目类型 **/
|
||||
@Schema(description = "题目类型")
|
||||
@JsonProperty("f_topic_type")
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
/** 所属组织 **/
|
||||
@Schema(description = "所属组织")
|
||||
@JsonProperty("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private Object forganizeId;
|
||||
/** 修改时间 **/
|
||||
@Schema(description = "修改时间")
|
||||
@JsonProperty("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private String flastModifyTime;
|
||||
/** 修改用户 **/
|
||||
@Schema(description = "修改用户")
|
||||
@JsonProperty("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
/** 创建时间 **/
|
||||
@Schema(description = "创建时间")
|
||||
@JsonProperty("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private String fcreatorTime;
|
||||
/** 创建用户 **/
|
||||
@Schema(description = "创建用户")
|
||||
@JsonProperty("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Time;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
public class TrainLibraryJudgmentExcelVO{
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "TrainLibraryJudgment子表参数")
|
||||
public class TrainLibraryJudgmentModel {
|
||||
|
||||
/** 子表:TrainLibraryJudgment 主键:f_id **/
|
||||
@Schema(description = "主键")
|
||||
@JsonProperty("f_id")
|
||||
private String f_id;
|
||||
/** 题目难度 **/
|
||||
@Schema(description = "题目难度")
|
||||
@JsonProperty("f_difficulty")
|
||||
@JSONField(name = "f_difficulty")
|
||||
private Object fdifficulty;
|
||||
/** 分类 **/
|
||||
@Schema(description = "分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "f_sort")
|
||||
private Object fsort;
|
||||
/** 题目名称 **/
|
||||
@Schema(description = "题目名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
/** 解析 **/
|
||||
@Schema(description = "解析")
|
||||
@JsonProperty("f_analyze")
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
/** 答案 **/
|
||||
@Schema(description = "答案")
|
||||
@JsonProperty("f_answer")
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
/** 题目类型 **/
|
||||
@Schema(description = "题目类型")
|
||||
@JsonProperty("f_topic_type")
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
/** 所属组织 **/
|
||||
@Schema(description = "所属组织")
|
||||
@JsonProperty("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private Object forganizeId;
|
||||
/** 修改时间 **/
|
||||
@Schema(description = "修改时间")
|
||||
@JsonProperty("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private String flastModifyTime;
|
||||
/** 修改用户 **/
|
||||
@Schema(description = "修改用户")
|
||||
@JsonProperty("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
/** 创建时间 **/
|
||||
@Schema(description = "创建时间")
|
||||
@JsonProperty("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private String fcreatorTime;
|
||||
/** 创建用户 **/
|
||||
@Schema(description = "创建用户")
|
||||
@JsonProperty("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Time;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
public class TrainLibraryMoreExcelVO{
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "TrainLibraryMore子表参数")
|
||||
public class TrainLibraryMoreModel {
|
||||
|
||||
/** 子表:TrainLibraryMore 主键:f_id **/
|
||||
@Schema(description = "主键")
|
||||
@JsonProperty("f_id")
|
||||
private String f_id;
|
||||
/** 题目难度 **/
|
||||
@Schema(description = "题目难度")
|
||||
@JsonProperty("f_difficulty")
|
||||
@JSONField(name = "f_difficulty")
|
||||
private Object fdifficulty;
|
||||
/** 分类 **/
|
||||
@Schema(description = "分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "f_sort")
|
||||
private Object fsort;
|
||||
/** 题目名称 **/
|
||||
@Schema(description = "题目名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
/** 解析 **/
|
||||
@Schema(description = "解析")
|
||||
@JsonProperty("f_analyze")
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
/** 答案 **/
|
||||
@Schema(description = "答案")
|
||||
@JsonProperty("f_answer")
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
/** 题目类型 **/
|
||||
@Schema(description = "题目类型")
|
||||
@JsonProperty("f_topic_type")
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
/** 选项A **/
|
||||
@Schema(description = "选项A")
|
||||
@JsonProperty("f_options_a")
|
||||
@JSONField(name = "f_options_a")
|
||||
private String foptionsA;
|
||||
/** 选项B **/
|
||||
@Schema(description = "选项B")
|
||||
@JsonProperty("f_options_b")
|
||||
@JSONField(name = "f_options_b")
|
||||
private String foptionsB;
|
||||
/** 选项C **/
|
||||
@Schema(description = "选项C")
|
||||
@JsonProperty("f_options_c")
|
||||
@JSONField(name = "f_options_c")
|
||||
private String foptionsC;
|
||||
/** 选项D **/
|
||||
@Schema(description = "选项D")
|
||||
@JsonProperty("f_options_d")
|
||||
@JSONField(name = "f_options_d")
|
||||
private String foptionsD;
|
||||
/** 所属组织 **/
|
||||
@Schema(description = "所属组织")
|
||||
@JsonProperty("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private Object forganizeId;
|
||||
/** 修改时间 **/
|
||||
@Schema(description = "修改时间")
|
||||
@JsonProperty("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private String flastModifyTime;
|
||||
/** 修改用户 **/
|
||||
@Schema(description = "修改用户")
|
||||
@JsonProperty("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
/** 创建时间 **/
|
||||
@Schema(description = "创建时间")
|
||||
@JsonProperty("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private String fcreatorTime;
|
||||
/** 创建用户 **/
|
||||
@Schema(description = "创建用户")
|
||||
@JsonProperty("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Time;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
public class TrainLibrarySingleExcelVO{
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* 版本: V5.2.0
|
||||
* 版权: Copyright @ 2025
|
||||
* 作者: 浙江尖峰集团股份有限公司
|
||||
* 日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "TrainLibrarySingle子表参数")
|
||||
public class TrainLibrarySingleModel {
|
||||
|
||||
/** 子表:TrainLibrarySingle 主键:f_id **/
|
||||
@Schema(description = "主键")
|
||||
@JsonProperty("f_id")
|
||||
private String f_id;
|
||||
/** 题目难度 **/
|
||||
@Schema(description = "题目难度")
|
||||
@JsonProperty("f_difficulty")
|
||||
@JSONField(name = "f_difficulty")
|
||||
private Object fdifficulty;
|
||||
/** 分类 **/
|
||||
@Schema(description = "分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "f_sort")
|
||||
private Object fsort;
|
||||
/** 题目名称 **/
|
||||
@Schema(description = "题目名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
/** 解析 **/
|
||||
@Schema(description = "解析")
|
||||
@JsonProperty("f_analyze")
|
||||
@JSONField(name = "f_analyze")
|
||||
private String fanalyze;
|
||||
/** 答案 **/
|
||||
@Schema(description = "答案")
|
||||
@JsonProperty("f_answer")
|
||||
@JSONField(name = "f_answer")
|
||||
private String fanswer;
|
||||
/** 题目类型 **/
|
||||
@Schema(description = "题目类型")
|
||||
@JsonProperty("f_topic_type")
|
||||
@JSONField(name = "f_topic_type")
|
||||
private String ftopicType;
|
||||
/** 选项A **/
|
||||
@Schema(description = "选项A")
|
||||
@JsonProperty("f_options_a")
|
||||
@JSONField(name = "f_options_a")
|
||||
private String foptionsA;
|
||||
/** 选项B **/
|
||||
@Schema(description = "选项B")
|
||||
@JsonProperty("f_options_b")
|
||||
@JSONField(name = "f_options_b")
|
||||
private String foptionsB;
|
||||
/** 选项C **/
|
||||
@Schema(description = "选项C")
|
||||
@JsonProperty("f_options_c")
|
||||
@JSONField(name = "f_options_c")
|
||||
private String foptionsC;
|
||||
/** 选项D **/
|
||||
@Schema(description = "选项D")
|
||||
@JsonProperty("f_options_d")
|
||||
@JSONField(name = "f_options_d")
|
||||
private String foptionsD;
|
||||
/** 所属组织 **/
|
||||
@Schema(description = "所属组织")
|
||||
@JsonProperty("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private Object forganizeId;
|
||||
/** 修改时间 **/
|
||||
@Schema(description = "修改时间")
|
||||
@JsonProperty("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private String flastModifyTime;
|
||||
/** 修改用户 **/
|
||||
@Schema(description = "修改用户")
|
||||
@JsonProperty("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
/** 创建时间 **/
|
||||
@Schema(description = "创建时间")
|
||||
@JsonProperty("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private String fcreatorTime;
|
||||
/** 创建用户 **/
|
||||
@Schema(description = "创建用户")
|
||||
@JsonProperty("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
public class TrainTestPaperLibraryExcelErrorVO extends TrainTestPaperLibraryExcelVO{
|
||||
|
||||
@Excel(name = "异常原因",orderNum = "-999")
|
||||
@JSONField(name = "errorsInfo")
|
||||
private String errorsInfo;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Time;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
|
||||
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
public class TrainTestPaperLibraryExcelVO{
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* 在线考试
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "表单参数")
|
||||
public class TrainTestPaperLibraryForm {
|
||||
/** 主键 */
|
||||
@Schema(description = "主键")
|
||||
@JSONField(name = "f_id")
|
||||
private String id;
|
||||
|
||||
|
||||
/** 试卷名称 **/
|
||||
@Schema(description = "试卷名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "f_full_name")
|
||||
private String ffullName;
|
||||
/** 试题分类 **/
|
||||
@Schema(description = "试题分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "f_sort")
|
||||
private Object fsort;
|
||||
/** 创建用户 **/
|
||||
@Schema(description = "创建用户")
|
||||
@JsonProperty("f_creator_user_id")
|
||||
@JSONField(name = "f_creator_user_id")
|
||||
private String fcreatorUserId;
|
||||
/** 创建时间 **/
|
||||
@Schema(description = "创建时间")
|
||||
@JsonProperty("f_creator_time")
|
||||
@JSONField(name = "f_creator_time")
|
||||
private String fcreatorTime;
|
||||
/** 修改用户 **/
|
||||
@Schema(description = "修改用户")
|
||||
@JsonProperty("f_last_modify_user_id")
|
||||
@JSONField(name = "f_last_modify_user_id")
|
||||
private String flastModifyUserId;
|
||||
/** 修改时间 **/
|
||||
@Schema(description = "修改时间")
|
||||
@JsonProperty("f_last_modify_time")
|
||||
@JSONField(name = "f_last_modify_time")
|
||||
private String flastModifyTime;
|
||||
/** 所属组织 **/
|
||||
@Schema(description = "所属组织")
|
||||
@JsonProperty("f_organize_id")
|
||||
@JSONField(name = "f_organize_id")
|
||||
private Object forganizeId;
|
||||
|
||||
/** 子表数据 **/
|
||||
@Schema(description = "trainLibrarySingle子表数据")
|
||||
@JsonProperty("trainLibrarySingleList")
|
||||
private List<TrainLibrarySingleModel> trainLibrarySingleList;
|
||||
/** 子表数据 **/
|
||||
@Schema(description = "trainLibraryMore子表数据")
|
||||
@JsonProperty("trainLibraryMoreList")
|
||||
private List<TrainLibraryMoreModel> trainLibraryMoreList;
|
||||
/** 子表数据 **/
|
||||
@Schema(description = "trainLibraryJudgment子表数据")
|
||||
@JsonProperty("trainLibraryJudgmentList")
|
||||
private List<TrainLibraryJudgmentModel> trainLibraryJudgmentList;
|
||||
/** 子表数据 **/
|
||||
@Schema(description = "trainLibraryEssayQuestion子表数据")
|
||||
@JsonProperty("trainLibraryEssayQuestionList")
|
||||
private List<TrainLibraryEssayQuestionModel> trainLibraryEssayQuestionList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.yunzhupaas.model.traintestpaperlibrary;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import com.yunzhupaas.base.Pagination;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 在线考试
|
||||
* @版本: V5.2.0
|
||||
* @版权: Copyright @ 2025
|
||||
* @作者: 浙江尖峰集团股份有限公司
|
||||
* @日期: 2024-11-05
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "列表查询参数")
|
||||
public class TrainTestPaperLibraryPagination extends Pagination {
|
||||
/** 关键词搜索 */
|
||||
@Schema(description = "关键词搜索")
|
||||
private String yunzhupaasKeyword;
|
||||
/** 查询key */
|
||||
@Schema(description = "查询key")
|
||||
private String[] selectKey;
|
||||
/** 选中数据数组id */
|
||||
@Schema(description = "选中数据数组id")
|
||||
private String[] selectIds;
|
||||
/** json */
|
||||
@Schema(description = "json")
|
||||
private String json;
|
||||
/** 数据类型 0-当前页,1-全部数据 */
|
||||
@Schema(description = "数据类型 0-当前页,1-全部数据")
|
||||
private String dataType;
|
||||
/** 高级查询 */
|
||||
@Schema(description = "高级查询")
|
||||
private String superQueryJson;
|
||||
/** 功能id */
|
||||
@Schema(description = "功能id")
|
||||
private String moduleId;
|
||||
/** 菜单id */
|
||||
@Schema(description = "菜单id")
|
||||
private String menuId;
|
||||
/** 试卷名称 */
|
||||
@Schema(description = "试卷名称")
|
||||
@JsonProperty("f_full_name")
|
||||
@JSONField(name = "ffullName")
|
||||
private Object ffullName;
|
||||
/** 试题分类 */
|
||||
@Schema(description = "试题分类")
|
||||
@JsonProperty("f_sort")
|
||||
@JSONField(name = "fsort")
|
||||
private Object fsort;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user