Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
eef4ab0b
Commit
eef4ab0b
authored
Aug 15, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 智能出题
parent
e441f5b1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
2645 additions
and
2 deletions
+2645
-2
LargeModelResponse.java
...ource/demand/ai/entity/largemodel/LargeModelResponse.java
+11
-1
Thinking.java
...dparty/resource/demand/ai/entity/largemodel/Thinking.java
+18
-0
ExaminationService.java
...java/cn/com/poc/writing/aggregate/ExaminationService.java
+49
-0
ExaminationServiceImpl.java
...om/poc/writing/aggregate/impl/ExaminationServiceImpl.java
+284
-0
BizExaminationConvert.java
...ava/cn/com/poc/writing/convert/BizExaminationConvert.java
+97
-0
BizExaminationDto.java
src/main/java/cn/com/poc/writing/dto/BizExaminationDto.java
+211
-0
ExaminationConfigItemDto.java
...java/cn/com/poc/writing/dto/ExaminationConfigItemDto.java
+63
-0
ExaminationDetailDto.java
...ain/java/cn/com/poc/writing/dto/ExaminationDetailDto.java
+66
-0
ExaminationDto.java
src/main/java/cn/com/poc/writing/dto/ExaminationDto.java
+60
-0
GenerateExaminationDto.java
...n/java/cn/com/poc/writing/dto/GenerateExaminationDto.java
+126
-0
BizExaminationEntity.java
.../java/cn/com/poc/writing/entity/BizExaminationEntity.java
+211
-0
ExaminationConfigItemEntity.java
...n/com/poc/writing/entity/ExaminationConfigItemEntity.java
+63
-0
ExaminationDetailEntity.java
...va/cn/com/poc/writing/entity/ExaminationDetailEntity.java
+66
-0
ExaminationEntity.java
...ain/java/cn/com/poc/writing/entity/ExaminationEntity.java
+60
-0
GenerateExaminationEntity.java
.../cn/com/poc/writing/entity/GenerateExaminationEntity.java
+102
-0
BizExaminationModel.java
...in/java/cn/com/poc/writing/model/BizExaminationModel.java
+302
-0
ExaminationQuery.sql
src/main/java/cn/com/poc/writing/query/ExaminationQuery.sql
+24
-0
ExaminationQueryCondition.java
...a/cn/com/poc/writing/query/ExaminationQueryCondition.java
+34
-0
ExaminationQueryItem.java
...n/java/cn/com/poc/writing/query/ExaminationQueryItem.java
+254
-0
BizExaminationRepository.java
.../com/poc/writing/repository/BizExaminationRepository.java
+6
-0
ExaminationRest.java
src/main/java/cn/com/poc/writing/rest/ExaminationRest.java
+57
-0
ExaminationRestImpl.java
...ava/cn/com/poc/writing/rest/impl/ExaminationRestImpl.java
+101
-0
BizExaminationService.java
...ava/cn/com/poc/writing/service/BizExaminationService.java
+25
-0
BizExaminationServiceImpl.java
...m/poc/writing/service/impl/BizExaminationServiceImpl.java
+138
-0
ExaminationTest.java
src/test/java/cn/com/poc/examination/ExaminationTest.java
+217
-0
MemberInfoServiceTest.java
...va/cn/com/poc/user/aggregation/MemberInfoServiceTest.java
+0
-1
No files found.
src/main/java/cn/com/poc/thirdparty/resource/demand/ai/entity/largemodel/LargeModelResponse.java
View file @
eef4ab0b
...
...
@@ -44,12 +44,22 @@ public class LargeModelResponse implements Serializable {
@JSONField
(
name
=
"frequency_penalty"
)
private
Float
frequencyPenalty
;
private
Map
<
Object
,
Object
>
logit_bias
;
private
Map
<
Object
,
Object
>
logit_bias
;
private
String
user
;
private
String
tool_choice
;
private
Thinking
thinking
;
public
Thinking
getThinking
()
{
return
thinking
;
}
public
void
setThinking
(
Thinking
thinking
)
{
this
.
thinking
=
thinking
;
}
public
String
getModel
()
{
return
model
;
}
...
...
src/main/java/cn/com/poc/thirdparty/resource/demand/ai/entity/largemodel/Thinking.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
thirdparty
.
resource
.
demand
.
ai
.
entity
.
largemodel
;
/**
* @author 52747
* @date 2025/8/14
*/
public
class
Thinking
{
private
String
type
;
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
src/main/java/cn/com/poc/writing/aggregate/ExaminationService.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
aggregate
;
import
cn.com.poc.writing.entity.ExaminationConfigItemEntity
;
import
cn.com.poc.writing.entity.ExaminationDetailEntity
;
import
cn.com.poc.writing.entity.ExaminationEntity
;
import
cn.com.poc.writing.entity.GenerateExaminationEntity
;
import
java.util.Collection
;
import
java.util.List
;
/**
* 智能出题服务
*
* @author 52747
* @date 2025/8/14
*/
public
interface
ExaminationService
{
/**
* 获取试卷生成配置项
* 出题类型
* 难度等级
* 出题语言
* 适用岗位
*/
ExaminationConfigItemEntity
getConfigurationItem
();
/**
* 生成试卷
* sse 输出
*/
void
generateExamination
(
GenerateExaminationEntity
generateExaminationEntity
,
Long
userId
);
/**
* 获取生成试卷信息
*
* @param examinationId 查询
* @param userId 用户ID
*/
Collection
<
ExaminationDetailEntity
>
getExaminations
(
String
examinationId
,
Long
userId
);
/**
* 获取历史记录
*
* @param query 查询
* @param userId 用户ID
*/
List
<
ExaminationEntity
>
getList
(
String
query
,
Long
userId
);
}
src/main/java/cn/com/poc/writing/aggregate/impl/ExaminationServiceImpl.java
0 → 100644
View file @
eef4ab0b
This diff is collapsed.
Click to expand it.
src/main/java/cn/com/poc/writing/convert/BizExaminationConvert.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
convert
;
import
cn.com.poc.writing.model.BizExaminationModel
;
import
cn.com.poc.writing.entity.BizExaminationEntity
;
import
cn.com.poc.writing.dto.BizExaminationDto
;
public
class
BizExaminationConvert
{
public
static
BizExaminationEntity
modelToEntity
(
BizExaminationModel
model
){
BizExaminationEntity
entity
=
new
BizExaminationEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setExaminationId
(
model
.
getExaminationId
());
entity
.
setMemberId
(
model
.
getMemberId
());
entity
.
setTitle
(
model
.
getTitle
());
entity
.
setQuestionType
(
model
.
getQuestionType
());
entity
.
setTotalScore
(
model
.
getTotalScore
());
entity
.
setN
(
model
.
getN
());
entity
.
setLevel
(
model
.
getLevel
());
entity
.
setLanguage
(
model
.
getLanguage
());
entity
.
setPositions
(
model
.
getPositions
());
entity
.
setExaminationDetail
(
model
.
getExaminationDetail
());
entity
.
setIsDeleted
(
model
.
getIsDeleted
());
entity
.
setCreator
(
model
.
getCreator
());
entity
.
setCreatedTime
(
model
.
getCreatedTime
());
entity
.
setModifier
(
model
.
getModifier
());
entity
.
setModifiedTime
(
model
.
getModifiedTime
());
entity
.
setSysVersion
(
model
.
getSysVersion
());
return
entity
;
}
public
static
BizExaminationModel
entityToModel
(
BizExaminationEntity
entity
){
BizExaminationModel
model
=
new
BizExaminationModel
();
model
.
setId
(
entity
.
getId
());
model
.
setExaminationId
(
entity
.
getExaminationId
());
model
.
setMemberId
(
entity
.
getMemberId
());
model
.
setTitle
(
entity
.
getTitle
());
model
.
setQuestionType
(
entity
.
getQuestionType
());
model
.
setTotalScore
(
entity
.
getTotalScore
());
model
.
setN
(
entity
.
getN
());
model
.
setLevel
(
entity
.
getLevel
());
model
.
setLanguage
(
entity
.
getLanguage
());
model
.
setPositions
(
entity
.
getPositions
());
model
.
setExaminationDetail
(
entity
.
getExaminationDetail
());
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
model
.
setCreator
(
entity
.
getCreator
());
model
.
setCreatedTime
(
entity
.
getCreatedTime
());
model
.
setModifier
(
entity
.
getModifier
());
model
.
setModifiedTime
(
entity
.
getModifiedTime
());
model
.
setSysVersion
(
entity
.
getSysVersion
());
return
model
;
}
public
static
BizExaminationDto
entityToDto
(
BizExaminationEntity
entity
){
BizExaminationDto
dto
=
new
BizExaminationDto
();
dto
.
setId
(
entity
.
getId
());
dto
.
setExaminationId
(
entity
.
getExaminationId
());
dto
.
setMemberId
(
entity
.
getMemberId
());
dto
.
setTitle
(
entity
.
getTitle
());
dto
.
setQuestionType
(
entity
.
getQuestionType
());
dto
.
setTotalScore
(
entity
.
getTotalScore
());
dto
.
setN
(
entity
.
getN
());
dto
.
setLevel
(
entity
.
getLevel
());
dto
.
setLanguage
(
entity
.
getLanguage
());
dto
.
setPositions
(
entity
.
getPositions
());
dto
.
setExaminationDetail
(
entity
.
getExaminationDetail
());
dto
.
setIsDeleted
(
entity
.
getIsDeleted
());
dto
.
setCreator
(
entity
.
getCreator
());
dto
.
setCreatedTime
(
entity
.
getCreatedTime
());
dto
.
setModifier
(
entity
.
getModifier
());
dto
.
setModifiedTime
(
entity
.
getModifiedTime
());
dto
.
setSysVersion
(
entity
.
getSysVersion
());
return
dto
;
}
public
static
BizExaminationEntity
dtoToEntity
(
BizExaminationDto
dto
){
BizExaminationEntity
entity
=
new
BizExaminationEntity
();
entity
.
setId
(
dto
.
getId
());
entity
.
setExaminationId
(
dto
.
getExaminationId
());
entity
.
setMemberId
(
dto
.
getMemberId
());
entity
.
setTitle
(
dto
.
getTitle
());
entity
.
setQuestionType
(
dto
.
getQuestionType
());
entity
.
setTotalScore
(
dto
.
getTotalScore
());
entity
.
setN
(
dto
.
getN
());
entity
.
setLevel
(
dto
.
getLevel
());
entity
.
setLanguage
(
dto
.
getLanguage
());
entity
.
setPositions
(
dto
.
getPositions
());
entity
.
setExaminationDetail
(
dto
.
getExaminationDetail
());
entity
.
setIsDeleted
(
dto
.
getIsDeleted
());
entity
.
setCreator
(
dto
.
getCreator
());
entity
.
setCreatedTime
(
dto
.
getCreatedTime
());
entity
.
setModifier
(
dto
.
getModifier
());
entity
.
setModifiedTime
(
dto
.
getModifiedTime
());
entity
.
setSysVersion
(
dto
.
getSysVersion
());
return
entity
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/writing/dto/BizExaminationDto.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
dto
;
public
class
BizExaminationDto
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** examination_id
*试卷ID
*/
private
java
.
lang
.
String
examinationId
;
public
java
.
lang
.
String
getExaminationId
(){
return
this
.
examinationId
;
}
public
void
setExaminationId
(
java
.
lang
.
String
examinationId
){
this
.
examinationId
=
examinationId
;
}
/** member_id
*用户ID
*/
private
java
.
lang
.
Long
memberId
;
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
}
/** title
*试卷名称
*/
private
java
.
lang
.
String
title
;
public
java
.
lang
.
String
getTitle
(){
return
this
.
title
;
}
public
void
setTitle
(
java
.
lang
.
String
title
){
this
.
title
=
title
;
}
/** question_type
*出题类型
*/
private
java
.
lang
.
String
questionType
;
public
java
.
lang
.
String
getQuestionType
(){
return
this
.
questionType
;
}
public
void
setQuestionType
(
java
.
lang
.
String
questionType
){
this
.
questionType
=
questionType
;
}
/** total_score
*总分数
*/
private
java
.
lang
.
Integer
totalScore
;
public
java
.
lang
.
Integer
getTotalScore
(){
return
this
.
totalScore
;
}
public
void
setTotalScore
(
java
.
lang
.
Integer
totalScore
){
this
.
totalScore
=
totalScore
;
}
/** n
*总题数
*/
private
java
.
lang
.
Integer
n
;
public
java
.
lang
.
Integer
getN
(){
return
this
.
n
;
}
public
void
setN
(
java
.
lang
.
Integer
n
){
this
.
n
=
n
;
}
/** level
*难度级别
*/
private
java
.
lang
.
String
level
;
public
java
.
lang
.
String
getLevel
(){
return
this
.
level
;
}
public
void
setLevel
(
java
.
lang
.
String
level
){
this
.
level
=
level
;
}
/** language
*出题语言
*/
private
java
.
lang
.
String
language
;
public
java
.
lang
.
String
getLanguage
(){
return
this
.
language
;
}
public
void
setLanguage
(
java
.
lang
.
String
language
){
this
.
language
=
language
;
}
/** positions
*适用岗位
*/
private
java
.
lang
.
String
positions
;
public
java
.
lang
.
String
getPositions
(){
return
this
.
positions
;
}
public
void
setPositions
(
java
.
lang
.
String
positions
){
this
.
positions
=
positions
;
}
/** examination_detail
*试卷内容
*/
private
java
.
lang
.
String
examinationDetail
;
public
java
.
lang
.
String
getExaminationDetail
(){
return
this
.
examinationDetail
;
}
public
void
setExaminationDetail
(
java
.
lang
.
String
examinationDetail
){
this
.
examinationDetail
=
examinationDetail
;
}
/** is_deleted
*是否删除 Y 是 N 否
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/writing/dto/ExaminationConfigItemDto.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
dto
;
import
java.util.List
;
/**
* @author 52747
* @date 2025/8/14
*/
public
class
ExaminationConfigItemDto
{
/**
* 出题类型
*/
List
<
String
>
questionType
;
/**
* 难度级别
*/
List
<
String
>
levels
;
/**
* 出题语言
*/
List
<
String
>
languages
;
/**
* 使用岗位
*/
List
<
String
>
positions
;
public
List
<
String
>
getQuestionType
()
{
return
questionType
;
}
public
void
setQuestionType
(
List
<
String
>
questionType
)
{
this
.
questionType
=
questionType
;
}
public
List
<
String
>
getLevels
()
{
return
levels
;
}
public
void
setLevels
(
List
<
String
>
levels
)
{
this
.
levels
=
levels
;
}
public
List
<
String
>
getLanguages
()
{
return
languages
;
}
public
void
setLanguages
(
List
<
String
>
languages
)
{
this
.
languages
=
languages
;
}
public
List
<
String
>
getPositions
()
{
return
positions
;
}
public
void
setPositions
(
List
<
String
>
positions
)
{
this
.
positions
=
positions
;
}
}
src/main/java/cn/com/poc/writing/dto/ExaminationDetailDto.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
dto
;
import
java.util.List
;
/**
* @author 52747
* @date 2025/8/14
*/
public
class
ExaminationDetailDto
{
private
String
questionType
;
private
Integer
score
;
private
String
question
;
private
List
<
String
>
choice
;
private
String
rightAnswers
;
private
String
rightAnswersAnalysis
;
public
String
getQuestionType
()
{
return
questionType
;
}
public
void
setQuestionType
(
String
questionType
)
{
this
.
questionType
=
questionType
;
}
public
Integer
getScore
()
{
return
score
;
}
public
void
setScore
(
Integer
score
)
{
this
.
score
=
score
;
}
public
String
getQuestion
()
{
return
question
;
}
public
void
setQuestion
(
String
question
)
{
this
.
question
=
question
;
}
public
List
<
String
>
getChoice
()
{
return
choice
;
}
public
void
setChoice
(
List
<
String
>
choice
)
{
this
.
choice
=
choice
;
}
public
String
getRightAnswers
()
{
return
rightAnswers
;
}
public
void
setRightAnswers
(
String
rightAnswers
)
{
this
.
rightAnswers
=
rightAnswers
;
}
public
String
getRightAnswersAnalysis
()
{
return
rightAnswersAnalysis
;
}
public
void
setRightAnswersAnalysis
(
String
rightAnswersAnalysis
)
{
this
.
rightAnswersAnalysis
=
rightAnswersAnalysis
;
}
}
src/main/java/cn/com/poc/writing/dto/ExaminationDto.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
dto
;
import
java.util.Date
;
/**
* @author 52747
* @date 2025/8/14
*/
public
class
ExaminationDto
{
private
String
examinationId
;
private
String
title
;
private
Integer
n
;
private
String
level
;
private
Date
date
;
public
String
getExaminationId
()
{
return
examinationId
;
}
public
void
setExaminationId
(
String
examinationId
)
{
this
.
examinationId
=
examinationId
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
Integer
getN
()
{
return
n
;
}
public
void
setN
(
Integer
n
)
{
this
.
n
=
n
;
}
public
String
getLevel
()
{
return
level
;
}
public
void
setLevel
(
String
level
)
{
this
.
level
=
level
;
}
public
Date
getDate
()
{
return
date
;
}
public
void
setDate
(
Date
date
)
{
this
.
date
=
date
;
}
}
src/main/java/cn/com/poc/writing/dto/GenerateExaminationDto.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
dto
;
import
java.util.List
;
/**
* @author 52747
* @date 2025/8/14
*/
public
class
GenerateExaminationDto
{
/**
* ID
*/
private
String
examinationId
;
/**
* 试卷名称
*/
private
String
title
;
/**
* 出题类型
*/
private
List
<
String
>
questionType
;
/**
* 总题数
*/
private
Integer
n
;
/**
* 总分数
*/
private
Integer
totalScore
;
/**
* 难度级别
*/
private
String
level
;
/**
* 出题语言
*/
private
String
language
;
/**
* 适用岗位
*/
private
String
positions
;
/**
* 文件地址
*/
private
String
fileUrl
;
public
String
getFileUrl
()
{
return
fileUrl
;
}
public
void
setFileUrl
(
String
fileUrl
)
{
this
.
fileUrl
=
fileUrl
;
}
public
List
<
String
>
getQuestionType
()
{
return
questionType
;
}
public
void
setQuestionType
(
List
<
String
>
questionType
)
{
this
.
questionType
=
questionType
;
}
public
String
getExaminationId
()
{
return
examinationId
;
}
public
void
setExaminationId
(
String
examinationId
)
{
this
.
examinationId
=
examinationId
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
Integer
getN
()
{
return
n
;
}
public
void
setN
(
Integer
n
)
{
this
.
n
=
n
;
}
public
Integer
getTotalScore
()
{
return
totalScore
;
}
public
void
setTotalScore
(
Integer
totalScore
)
{
this
.
totalScore
=
totalScore
;
}
public
String
getLevel
()
{
return
level
;
}
public
void
setLevel
(
String
level
)
{
this
.
level
=
level
;
}
public
String
getLanguage
()
{
return
language
;
}
public
void
setLanguage
(
String
language
)
{
this
.
language
=
language
;
}
public
String
getPositions
()
{
return
positions
;
}
public
void
setPositions
(
String
positions
)
{
this
.
positions
=
positions
;
}
}
src/main/java/cn/com/poc/writing/entity/BizExaminationEntity.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
entity
;
public
class
BizExaminationEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** examination_id
*试卷ID
*/
private
java
.
lang
.
String
examinationId
;
public
java
.
lang
.
String
getExaminationId
(){
return
this
.
examinationId
;
}
public
void
setExaminationId
(
java
.
lang
.
String
examinationId
){
this
.
examinationId
=
examinationId
;
}
/** member_id
*用户ID
*/
private
java
.
lang
.
Long
memberId
;
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
}
/** title
*试卷名称
*/
private
java
.
lang
.
String
title
;
public
java
.
lang
.
String
getTitle
(){
return
this
.
title
;
}
public
void
setTitle
(
java
.
lang
.
String
title
){
this
.
title
=
title
;
}
/** question_type
*出题类型
*/
private
java
.
lang
.
String
questionType
;
public
java
.
lang
.
String
getQuestionType
(){
return
this
.
questionType
;
}
public
void
setQuestionType
(
java
.
lang
.
String
questionType
){
this
.
questionType
=
questionType
;
}
/** total_score
*总分数
*/
private
java
.
lang
.
Integer
totalScore
;
public
java
.
lang
.
Integer
getTotalScore
(){
return
this
.
totalScore
;
}
public
void
setTotalScore
(
java
.
lang
.
Integer
totalScore
){
this
.
totalScore
=
totalScore
;
}
/** n
*总题数
*/
private
java
.
lang
.
Integer
n
;
public
java
.
lang
.
Integer
getN
(){
return
this
.
n
;
}
public
void
setN
(
java
.
lang
.
Integer
n
){
this
.
n
=
n
;
}
/** level
*难度级别
*/
private
java
.
lang
.
String
level
;
public
java
.
lang
.
String
getLevel
(){
return
this
.
level
;
}
public
void
setLevel
(
java
.
lang
.
String
level
){
this
.
level
=
level
;
}
/** language
*出题语言
*/
private
java
.
lang
.
String
language
;
public
java
.
lang
.
String
getLanguage
(){
return
this
.
language
;
}
public
void
setLanguage
(
java
.
lang
.
String
language
){
this
.
language
=
language
;
}
/** positions
*适用岗位
*/
private
java
.
lang
.
String
positions
;
public
java
.
lang
.
String
getPositions
(){
return
this
.
positions
;
}
public
void
setPositions
(
java
.
lang
.
String
positions
){
this
.
positions
=
positions
;
}
/** examination_detail
*试卷内容
*/
private
java
.
lang
.
String
examinationDetail
;
public
java
.
lang
.
String
getExaminationDetail
(){
return
this
.
examinationDetail
;
}
public
void
setExaminationDetail
(
java
.
lang
.
String
examinationDetail
){
this
.
examinationDetail
=
examinationDetail
;
}
/** is_deleted
*是否删除 Y 是 N 否
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/writing/entity/ExaminationConfigItemEntity.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
entity
;
import
java.util.List
;
/**
* @author 52747
* @date 2025/8/14
*/
public
class
ExaminationConfigItemEntity
{
/**
* 出题类型
*/
List
<
String
>
questionType
;
/**
* 难度级别
*/
List
<
String
>
levels
;
/**
* 出题语言
*/
List
<
String
>
languages
;
/**
* 使用岗位
*/
List
<
String
>
positions
;
public
List
<
String
>
getQuestionType
()
{
return
questionType
;
}
public
void
setQuestionType
(
List
<
String
>
questionType
)
{
this
.
questionType
=
questionType
;
}
public
List
<
String
>
getLevels
()
{
return
levels
;
}
public
void
setLevels
(
List
<
String
>
levels
)
{
this
.
levels
=
levels
;
}
public
List
<
String
>
getLanguages
()
{
return
languages
;
}
public
void
setLanguages
(
List
<
String
>
languages
)
{
this
.
languages
=
languages
;
}
public
List
<
String
>
getPositions
()
{
return
positions
;
}
public
void
setPositions
(
List
<
String
>
positions
)
{
this
.
positions
=
positions
;
}
}
src/main/java/cn/com/poc/writing/entity/ExaminationDetailEntity.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
entity
;
import
java.util.List
;
/**
* @author 52747
* @date 2025/8/14
*/
public
class
ExaminationDetailEntity
{
private
String
questionType
;
private
Integer
score
;
private
String
question
;
private
List
<
String
>
choice
;
private
String
rightAnswers
;
private
String
rightAnswersAnalysis
;
public
String
getQuestionType
()
{
return
questionType
;
}
public
void
setQuestionType
(
String
questionType
)
{
this
.
questionType
=
questionType
;
}
public
Integer
getScore
()
{
return
score
;
}
public
void
setScore
(
Integer
score
)
{
this
.
score
=
score
;
}
public
String
getQuestion
()
{
return
question
;
}
public
void
setQuestion
(
String
question
)
{
this
.
question
=
question
;
}
public
List
<
String
>
getChoice
()
{
return
choice
;
}
public
void
setChoice
(
List
<
String
>
choice
)
{
this
.
choice
=
choice
;
}
public
String
getRightAnswers
()
{
return
rightAnswers
;
}
public
void
setRightAnswers
(
String
rightAnswers
)
{
this
.
rightAnswers
=
rightAnswers
;
}
public
String
getRightAnswersAnalysis
()
{
return
rightAnswersAnalysis
;
}
public
void
setRightAnswersAnalysis
(
String
rightAnswersAnalysis
)
{
this
.
rightAnswersAnalysis
=
rightAnswersAnalysis
;
}
}
src/main/java/cn/com/poc/writing/entity/ExaminationEntity.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
entity
;
import
java.util.Date
;
/**
* @author 52747
* @date 2025/8/14
*/
public
class
ExaminationEntity
{
private
String
examinationId
;
private
String
title
;
private
Integer
n
;
private
String
level
;
private
Date
date
;
public
String
getExaminationId
()
{
return
examinationId
;
}
public
void
setExaminationId
(
String
examinationId
)
{
this
.
examinationId
=
examinationId
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
Integer
getN
()
{
return
n
;
}
public
void
setN
(
Integer
n
)
{
this
.
n
=
n
;
}
public
String
getLevel
()
{
return
level
;
}
public
void
setLevel
(
String
level
)
{
this
.
level
=
level
;
}
public
Date
getDate
()
{
return
date
;
}
public
void
setDate
(
Date
date
)
{
this
.
date
=
date
;
}
}
src/main/java/cn/com/poc/writing/entity/GenerateExaminationEntity.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
entity
;
import
java.util.List
;
/**
* @author 52747
* @date 2025/8/14
*/
public
class
GenerateExaminationEntity
{
private
String
examinationId
;
private
String
title
;
private
List
<
String
>
questionType
;
private
Integer
n
;
private
Integer
totalScore
;
private
String
level
;
private
String
language
;
private
String
positions
;
private
String
fileUrl
;
public
List
<
String
>
getQuestionType
()
{
return
questionType
;
}
public
void
setQuestionType
(
List
<
String
>
questionType
)
{
this
.
questionType
=
questionType
;
}
public
String
getFileUrl
()
{
return
fileUrl
;
}
public
void
setFileUrl
(
String
fileUrl
)
{
this
.
fileUrl
=
fileUrl
;
}
public
String
getExaminationId
()
{
return
examinationId
;
}
public
void
setExaminationId
(
String
examinationId
)
{
this
.
examinationId
=
examinationId
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
Integer
getN
()
{
return
n
;
}
public
void
setN
(
Integer
n
)
{
this
.
n
=
n
;
}
public
Integer
getTotalScore
()
{
return
totalScore
;
}
public
void
setTotalScore
(
Integer
totalScore
)
{
this
.
totalScore
=
totalScore
;
}
public
String
getLevel
()
{
return
level
;
}
public
void
setLevel
(
String
level
)
{
this
.
level
=
level
;
}
public
String
getLanguage
()
{
return
language
;
}
public
void
setLanguage
(
String
language
)
{
this
.
language
=
language
;
}
public
String
getPositions
()
{
return
positions
;
}
public
void
setPositions
(
String
positions
)
{
this
.
positions
=
positions
;
}
}
src/main/java/cn/com/poc/writing/model/BizExaminationModel.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
model
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.Version
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
* Model class for biz_examination
* 智能出题
*/
@Entity
@Table
(
name
=
"biz_examination"
)
@DynamicInsert
@DynamicUpdate
public
class
BizExaminationModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
@Column
(
name
=
"id"
,
length
=
19
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
}
/** examination_id
*试卷ID
*/
private
java
.
lang
.
String
examinationId
;
@Column
(
name
=
"examination_id"
,
length
=
150
)
public
java
.
lang
.
String
getExaminationId
(){
return
this
.
examinationId
;
}
public
void
setExaminationId
(
java
.
lang
.
String
examinationId
){
this
.
examinationId
=
examinationId
;
super
.
addValidField
(
"examinationId"
);
}
/** member_id
*用户ID
*/
private
java
.
lang
.
Long
memberId
;
@Column
(
name
=
"member_id"
,
length
=
19
)
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
super
.
addValidField
(
"memberId"
);
}
/** title
*试卷名称
*/
private
java
.
lang
.
String
title
;
@Column
(
name
=
"title"
,
length
=
150
)
public
java
.
lang
.
String
getTitle
(){
return
this
.
title
;
}
public
void
setTitle
(
java
.
lang
.
String
title
){
this
.
title
=
title
;
super
.
addValidField
(
"title"
);
}
/** question_type
*出题类型
*/
private
java
.
lang
.
String
questionType
;
@Column
(
name
=
"question_type"
,
length
=
2147483647
)
public
java
.
lang
.
String
getQuestionType
(){
return
this
.
questionType
;
}
public
void
setQuestionType
(
java
.
lang
.
String
questionType
){
this
.
questionType
=
questionType
;
super
.
addValidField
(
"questionType"
);
}
/** total_score
*总分数
*/
private
java
.
lang
.
Integer
totalScore
;
@Column
(
name
=
"total_score"
,
length
=
10
)
public
java
.
lang
.
Integer
getTotalScore
(){
return
this
.
totalScore
;
}
public
void
setTotalScore
(
java
.
lang
.
Integer
totalScore
){
this
.
totalScore
=
totalScore
;
super
.
addValidField
(
"totalScore"
);
}
/** n
*总题数
*/
private
java
.
lang
.
Integer
n
;
@Column
(
name
=
"n"
,
length
=
10
)
public
java
.
lang
.
Integer
getN
(){
return
this
.
n
;
}
public
void
setN
(
java
.
lang
.
Integer
n
){
this
.
n
=
n
;
super
.
addValidField
(
"n"
);
}
/** level
*难度级别
*/
private
java
.
lang
.
String
level
;
@Column
(
name
=
"level"
,
length
=
100
)
public
java
.
lang
.
String
getLevel
(){
return
this
.
level
;
}
public
void
setLevel
(
java
.
lang
.
String
level
){
this
.
level
=
level
;
super
.
addValidField
(
"level"
);
}
/** language
*出题语言
*/
private
java
.
lang
.
String
language
;
@Column
(
name
=
"language"
,
length
=
100
)
public
java
.
lang
.
String
getLanguage
(){
return
this
.
language
;
}
public
void
setLanguage
(
java
.
lang
.
String
language
){
this
.
language
=
language
;
super
.
addValidField
(
"language"
);
}
/** positions
*适用岗位
*/
private
java
.
lang
.
String
positions
;
@Column
(
name
=
"positions"
,
length
=
100
)
public
java
.
lang
.
String
getPositions
(){
return
this
.
positions
;
}
public
void
setPositions
(
java
.
lang
.
String
positions
){
this
.
positions
=
positions
;
super
.
addValidField
(
"positions"
);
}
/** examination_detail
*试卷内容
*/
private
java
.
lang
.
String
examinationDetail
;
@Column
(
name
=
"examination_detail"
,
length
=
1073741824
)
public
java
.
lang
.
String
getExaminationDetail
(){
return
this
.
examinationDetail
;
}
public
void
setExaminationDetail
(
java
.
lang
.
String
examinationDetail
){
this
.
examinationDetail
=
examinationDetail
;
super
.
addValidField
(
"examinationDetail"
);
}
/** is_deleted
*是否删除 Y 是 N 否
*/
private
java
.
lang
.
String
isDeleted
;
@Column
(
name
=
"is_deleted"
,
length
=
1
)
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
super
.
addValidField
(
"isDeleted"
);
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
@Column
(
name
=
"CREATOR"
,
length
=
50
)
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
super
.
addValidField
(
"creator"
);
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
@Column
(
name
=
"CREATED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
super
.
addValidField
(
"createdTime"
);
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
@Column
(
name
=
"MODIFIER"
,
length
=
50
)
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
super
.
addValidField
(
"modifier"
);
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
@Column
(
name
=
"MODIFIED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
super
.
addValidField
(
"modifiedTime"
);
}
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
@Column
(
name
=
"SYS_VERSION"
,
length
=
10
)
@Version
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
super
.
addValidField
(
"sysVersion"
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/writing/query/ExaminationQuery.sql
0 → 100644
View file @
eef4ab0b
select
id
,
examination_id
,
member_id
,
title
,
question_type
,
total_score
,
n
,
`level`
,
`language`
,
positions
,
examination_detail
,
is_deleted
,
CREATOR
,
CREATED_TIME
,
MODIFIER
,
MODIFIED_TIME
,
SYS_VERSION
from
biz_examination
where
is_deleted
=
'N'
<<
and
member_id
=
:
memberId
>>
<<
and
LOCATE
(:
query
,
title
)
>>
order
by
MODIFIED_TIME
desc
\ No newline at end of file
src/main/java/cn/com/poc/writing/query/ExaminationQueryCondition.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
query
;
import
java.io.Serializable
;
/**
* Query Condition class for ExaminationQuery
*/
public
class
ExaminationQueryCondition
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
java
.
lang
.
Long
memberId
;
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
}
private
java
.
lang
.
String
query
;
public
java
.
lang
.
String
getQuery
(){
return
this
.
query
;
}
public
void
setQuery
(
java
.
lang
.
String
query
){
this
.
query
=
query
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/writing/query/ExaminationQueryItem.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
query
;
import
java.io.Serializable
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
cn.com.yict.framemax.data.model.BaseItemClass
;
/**
* Query Item class for ExaminationQuery
*/
@Entity
public
class
ExaminationQueryItem
extends
BaseItemClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*id
*/
private
java
.
lang
.
Long
id
;
@Column
(
name
=
"id"
)
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** examination_id
*examination_id
*/
private
java
.
lang
.
String
examinationId
;
@Column
(
name
=
"examination_id"
)
public
java
.
lang
.
String
getExaminationId
(){
return
this
.
examinationId
;
}
public
void
setExaminationId
(
java
.
lang
.
String
examinationId
){
this
.
examinationId
=
examinationId
;
}
/** member_id
*member_id
*/
private
java
.
lang
.
Long
memberId
;
@Column
(
name
=
"member_id"
)
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
}
/** title
*title
*/
private
java
.
lang
.
String
title
;
@Column
(
name
=
"title"
)
public
java
.
lang
.
String
getTitle
(){
return
this
.
title
;
}
public
void
setTitle
(
java
.
lang
.
String
title
){
this
.
title
=
title
;
}
/** question_type
*question_type
*/
private
java
.
lang
.
String
questionType
;
@Column
(
name
=
"question_type"
)
public
java
.
lang
.
String
getQuestionType
(){
return
this
.
questionType
;
}
public
void
setQuestionType
(
java
.
lang
.
String
questionType
){
this
.
questionType
=
questionType
;
}
/** total_score
*total_score
*/
private
java
.
lang
.
Integer
totalScore
;
@Column
(
name
=
"total_score"
)
public
java
.
lang
.
Integer
getTotalScore
(){
return
this
.
totalScore
;
}
public
void
setTotalScore
(
java
.
lang
.
Integer
totalScore
){
this
.
totalScore
=
totalScore
;
}
/** n
*n
*/
private
java
.
lang
.
Integer
n
;
@Column
(
name
=
"n"
)
public
java
.
lang
.
Integer
getN
(){
return
this
.
n
;
}
public
void
setN
(
java
.
lang
.
Integer
n
){
this
.
n
=
n
;
}
/** level
*level
*/
private
java
.
lang
.
String
level
;
@Column
(
name
=
"level"
)
public
java
.
lang
.
String
getLevel
(){
return
this
.
level
;
}
public
void
setLevel
(
java
.
lang
.
String
level
){
this
.
level
=
level
;
}
/** language
*language
*/
private
java
.
lang
.
String
language
;
@Column
(
name
=
"language"
)
public
java
.
lang
.
String
getLanguage
(){
return
this
.
language
;
}
public
void
setLanguage
(
java
.
lang
.
String
language
){
this
.
language
=
language
;
}
/** positions
*positions
*/
private
java
.
lang
.
String
positions
;
@Column
(
name
=
"positions"
)
public
java
.
lang
.
String
getPositions
(){
return
this
.
positions
;
}
public
void
setPositions
(
java
.
lang
.
String
positions
){
this
.
positions
=
positions
;
}
/** examination_detail
*examination_detail
*/
private
java
.
lang
.
String
examinationDetail
;
@Column
(
name
=
"examination_detail"
)
public
java
.
lang
.
String
getExaminationDetail
(){
return
this
.
examinationDetail
;
}
public
void
setExaminationDetail
(
java
.
lang
.
String
examinationDetail
){
this
.
examinationDetail
=
examinationDetail
;
}
/** is_deleted
*is_deleted
*/
private
java
.
lang
.
String
isDeleted
;
@Column
(
name
=
"is_deleted"
)
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/** CREATOR
*CREATOR
*/
private
java
.
lang
.
String
creator
;
@Column
(
name
=
"CREATOR"
)
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/** CREATED_TIME
*CREATED_TIME
*/
private
java
.
util
.
Date
createdTime
;
@Column
(
name
=
"CREATED_TIME"
)
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/** MODIFIER
*MODIFIER
*/
private
java
.
lang
.
String
modifier
;
@Column
(
name
=
"MODIFIER"
)
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/** MODIFIED_TIME
*MODIFIED_TIME
*/
private
java
.
util
.
Date
modifiedTime
;
@Column
(
name
=
"MODIFIED_TIME"
)
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/** SYS_VERSION
*SYS_VERSION
*/
private
java
.
lang
.
Integer
sysVersion
;
@Column
(
name
=
"SYS_VERSION"
)
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/writing/repository/BizExaminationRepository.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
repository
;
import
cn.com.yict.framemax.data.repository.Repository
;
import
cn.com.poc.writing.model.BizExaminationModel
;
public
interface
BizExaminationRepository
extends
Repository
<
BizExaminationModel
,
java
.
lang
.
Long
>
{
}
\ No newline at end of file
src/main/java/cn/com/poc/writing/rest/ExaminationRest.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
rest
;
import
cn.com.poc.writing.dto.ExaminationConfigItemDto
;
import
cn.com.poc.writing.dto.ExaminationDetailDto
;
import
cn.com.poc.writing.dto.ExaminationDto
;
import
cn.com.poc.writing.dto.GenerateExaminationDto
;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.yict.framemax.web.permission.Access
;
import
cn.com.yict.framemax.web.permission.Permission
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
/**
* 智能出题接口
*
* @author 52747
* @date 2025/8/14
*/
@Permission
(
Access
.
Safety
)
public
interface
ExaminationRest
extends
BaseRest
{
/**
* 获取试卷生成配置项
* 出题类型
* 难度等级
* 出题语言
* 适用岗位
*/
ExaminationConfigItemDto
getConfigurationItem
();
/**
* 生成试卷
* sse 输出
*
* @param generateExaminationDto 出题配置
*/
void
generateExamination
(
@RequestBody
GenerateExaminationDto
generateExaminationDto
);
/**
* 获取试卷
*
* @param examinationId 试卷ID
*/
List
<
ExaminationDetailDto
>
getExaminations
(
@RequestParam
(
value
=
"examinationId"
)
String
examinationId
);
/**
* 获取历史记录
*
* @param query 查询
* @return
*/
List
<
ExaminationDto
>
getList
(
@RequestParam
(
value
=
"query"
,
required
=
false
)
String
query
);
}
src/main/java/cn/com/poc/writing/rest/impl/ExaminationRestImpl.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
rest
.
impl
;
import
cn.com.poc.common.utils.Assert
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.support.security.oauth.entity.UserBaseEntity
;
import
cn.com.poc.writing.aggregate.ExaminationService
;
import
cn.com.poc.writing.dto.ExaminationConfigItemDto
;
import
cn.com.poc.writing.dto.ExaminationDetailDto
;
import
cn.com.poc.writing.dto.ExaminationDto
;
import
cn.com.poc.writing.dto.GenerateExaminationDto
;
import
cn.com.poc.writing.entity.ExaminationConfigItemEntity
;
import
cn.com.poc.writing.entity.ExaminationDetailEntity
;
import
cn.com.poc.writing.entity.ExaminationEntity
;
import
cn.com.poc.writing.entity.GenerateExaminationEntity
;
import
cn.com.poc.writing.rest.ExaminationRest
;
import
cn.hutool.core.bean.BeanUtil
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author 52747
* @date 2025/8/14
*/
@Component
public
class
ExaminationRestImpl
implements
ExaminationRest
{
@Resource
private
ExaminationService
examinationService
;
@Override
public
ExaminationConfigItemDto
getConfigurationItem
()
{
ExaminationConfigItemEntity
examinationConfigItemEntity
=
examinationService
.
getConfigurationItem
();
ExaminationConfigItemDto
dto
=
new
ExaminationConfigItemDto
();
dto
.
setQuestionType
(
examinationConfigItemEntity
.
getQuestionType
());
dto
.
setLevels
(
examinationConfigItemEntity
.
getLevels
());
dto
.
setLanguages
(
examinationConfigItemEntity
.
getLanguages
());
dto
.
setPositions
(
examinationConfigItemEntity
.
getPositions
());
return
dto
;
}
@Override
public
void
generateExamination
(
GenerateExaminationDto
generateExaminationDto
)
{
Assert
.
notBlank
(
generateExaminationDto
.
getLanguage
());
Assert
.
notBlank
(
generateExaminationDto
.
getTitle
());
Assert
.
notBlank
(
generateExaminationDto
.
getLevel
());
Assert
.
notBlank
(
generateExaminationDto
.
getPositions
());
Assert
.
notEmpty
(
generateExaminationDto
.
getQuestionType
());
Assert
.
notNull
(
generateExaminationDto
.
getN
());
UserBaseEntity
currentUser
=
BlContext
.
getCurrentUser
();
GenerateExaminationEntity
generateExaminationEntity
=
new
GenerateExaminationEntity
();
BeanUtil
.
copyProperties
(
generateExaminationDto
,
generateExaminationEntity
);
examinationService
.
generateExamination
(
generateExaminationEntity
,
currentUser
.
getUserId
());
}
@Override
public
List
<
ExaminationDetailDto
>
getExaminations
(
String
examinationId
)
{
Assert
.
notBlank
(
examinationId
);
UserBaseEntity
currentUser
=
BlContext
.
getCurrentUser
();
Collection
<
ExaminationDetailEntity
>
detailEntities
=
examinationService
.
getExaminations
(
examinationId
,
currentUser
.
getUserId
());
List
<
ExaminationDetailDto
>
result
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
detailEntities
))
{
result
=
detailEntities
.
stream
().
map
(
entity
->
{
ExaminationDetailDto
dto
=
new
ExaminationDetailDto
();
dto
.
setQuestionType
(
entity
.
getQuestionType
());
dto
.
setScore
(
entity
.
getScore
());
dto
.
setQuestion
(
entity
.
getQuestion
());
dto
.
setChoice
(
entity
.
getChoice
());
dto
.
setRightAnswers
(
entity
.
getRightAnswers
());
dto
.
setRightAnswersAnalysis
(
entity
.
getRightAnswersAnalysis
());
return
dto
;
}).
collect
(
Collectors
.
toList
());
}
return
result
;
}
@Override
public
List
<
ExaminationDto
>
getList
(
String
query
)
{
List
<
ExaminationDto
>
result
=
new
ArrayList
<>();
UserBaseEntity
currentUser
=
BlContext
.
getCurrentUser
();
List
<
ExaminationEntity
>
entities
=
examinationService
.
getList
(
query
,
currentUser
.
getUserId
());
if
(
CollectionUtils
.
isNotEmpty
(
entities
))
{
result
=
entities
.
stream
().
map
(
entity
->
{
ExaminationDto
examinationDto
=
new
ExaminationDto
();
examinationDto
.
setExaminationId
(
entity
.
getExaminationId
());
examinationDto
.
setTitle
(
entity
.
getTitle
());
examinationDto
.
setN
(
entity
.
getN
());
examinationDto
.
setLevel
(
entity
.
getLevel
());
examinationDto
.
setDate
(
entity
.
getDate
());
return
examinationDto
;
}).
collect
(
Collectors
.
toList
());
}
return
result
;
}
}
src/main/java/cn/com/poc/writing/service/BizExaminationService.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
service
;
import
cn.com.poc.writing.query.ExaminationQueryCondition
;
import
cn.com.poc.writing.query.ExaminationQueryItem
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.writing.entity.BizExaminationEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.List
;
public
interface
BizExaminationService
extends
BaseService
{
BizExaminationEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
BizExaminationEntity
>
findByExample
(
BizExaminationEntity
example
,
PagingInfo
pagingInfo
);
BizExaminationEntity
save
(
BizExaminationEntity
entity
)
throws
Exception
;
BizExaminationEntity
update
(
BizExaminationEntity
entity
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
ExaminationQueryItem
>
examinationQuery
(
ExaminationQueryCondition
condition
,
PagingInfo
pagingInfo
);
}
\ No newline at end of file
src/main/java/cn/com/poc/writing/service/impl/BizExaminationServiceImpl.java
0 → 100644
View file @
eef4ab0b
package
cn
.
com
.
poc
.
writing
.
service
.
impl
;
import
cn.com.poc.writing.query.ExaminationQueryCondition
;
import
cn.com.poc.writing.query.ExaminationQueryItem
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.poc.writing.service.BizExaminationService
;
import
cn.com.poc.writing.model.BizExaminationModel
;
import
cn.com.poc.writing.entity.BizExaminationEntity
;
import
cn.com.poc.writing.convert.BizExaminationConvert
;
import
cn.com.poc.writing.repository.BizExaminationRepository
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.stereotype.Service
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.stream.Collectors
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.util.Assert
;
@Service
public
class
BizExaminationServiceImpl
extends
BaseServiceImpl
implements
BizExaminationService
{
@Resource
private
BizExaminationRepository
repository
;
public
BizExaminationEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizExaminationModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
)
{
return
null
;
}
if
(
"Y"
.
equals
(
model
.
getIsDeleted
()))
{
return
null
;
}
return
BizExaminationConvert
.
modelToEntity
(
model
);
}
public
List
<
BizExaminationEntity
>
findByExample
(
BizExaminationEntity
example
,
PagingInfo
pagingInfo
)
{
List
<
BizExaminationEntity
>
result
=
new
ArrayList
<
BizExaminationEntity
>();
BizExaminationModel
model
=
new
BizExaminationModel
();
if
(
example
!=
null
)
{
model
=
BizExaminationConvert
.
entityToModel
(
example
);
}
model
.
setIsDeleted
(
"N"
);
List
<
BizExaminationModel
>
models
=
this
.
repository
.
findByExample
(
model
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
result
=
models
.
stream
().
map
(
BizExaminationConvert:
:
modelToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
BizExaminationEntity
save
(
BizExaminationEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
entity
.
setIsDeleted
(
"N"
);
BizExaminationModel
model
=
BizExaminationConvert
.
entityToModel
(
entity
);
BizExaminationModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizExaminationConvert
.
modelToEntity
(
saveModel
);
}
public
BizExaminationEntity
update
(
BizExaminationEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizExaminationModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
if
(
entity
.
getExaminationId
()
!=
null
)
{
model
.
setExaminationId
(
entity
.
getExaminationId
());
}
if
(
entity
.
getMemberId
()
!=
null
)
{
model
.
setMemberId
(
entity
.
getMemberId
());
}
if
(
entity
.
getTitle
()
!=
null
)
{
model
.
setTitle
(
entity
.
getTitle
());
}
if
(
entity
.
getQuestionType
()
!=
null
)
{
model
.
setQuestionType
(
entity
.
getQuestionType
());
}
if
(
entity
.
getTotalScore
()
!=
null
)
{
model
.
setTotalScore
(
entity
.
getTotalScore
());
}
if
(
entity
.
getN
()
!=
null
)
{
model
.
setN
(
entity
.
getN
());
}
if
(
entity
.
getLevel
()
!=
null
)
{
model
.
setLevel
(
entity
.
getLevel
());
}
if
(
entity
.
getLanguage
()
!=
null
)
{
model
.
setLanguage
(
entity
.
getLanguage
());
}
if
(
entity
.
getPositions
()
!=
null
)
{
model
.
setPositions
(
entity
.
getPositions
());
}
if
(
entity
.
getExaminationDetail
()
!=
null
)
{
model
.
setExaminationDetail
(
entity
.
getExaminationDetail
());
}
if
(
entity
.
getIsDeleted
()
!=
null
)
{
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
}
if
(
entity
.
getCreator
()
!=
null
)
{
model
.
setCreator
(
entity
.
getCreator
());
}
if
(
entity
.
getCreatedTime
()
!=
null
)
{
model
.
setCreatedTime
(
entity
.
getCreatedTime
());
}
if
(
entity
.
getModifier
()
!=
null
)
{
model
.
setModifier
(
entity
.
getModifier
());
}
if
(
entity
.
getModifiedTime
()
!=
null
)
{
model
.
setModifiedTime
(
entity
.
getModifiedTime
());
}
if
(
entity
.
getSysVersion
()
!=
null
)
{
model
.
setSysVersion
(
entity
.
getSysVersion
());
}
BizExaminationModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizExaminationConvert
.
modelToEntity
(
saveModel
);
}
public
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizExaminationModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
!=
null
)
{
if
(
"N"
.
equals
(
model
.
getIsDeleted
()))
{
model
.
setIsDeleted
(
"Y"
);
this
.
repository
.
save
(
model
);
}
}
}
@Override
public
List
<
ExaminationQueryItem
>
examinationQuery
(
ExaminationQueryCondition
condition
,
PagingInfo
pagingInfo
)
{
return
this
.
sqlDao
.
query
(
condition
,
ExaminationQueryItem
.
class
,
pagingInfo
);
}
}
\ No newline at end of file
src/test/java/cn/com/poc/examination/ExaminationTest.java
0 → 100644
View file @
eef4ab0b
This diff is collapsed.
Click to expand it.
src/test/java/cn/com/poc/user/aggregation/MemberInfoServiceTest.java
View file @
eef4ab0b
...
...
@@ -39,5 +39,4 @@ public class MemberInfoServiceTest {
memberInfoEntity
.
setMemberId
(
217
);
memberInfoService
.
updateMemberInfo
(
memberInfoEntity
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment