Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hxkf
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
hxkf
Commits
372cf9e7
提交
372cf9e7
authored
10月 29, 2020
作者:
jiashixiong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
前台课后练习 模拟练习
上级
c8061e2b
全部展开
显示空白字符变更
内嵌
并排
正在显示
41 个修改的文件
包含
978 行增加
和
59 行删除
+978
-59
pom.xml
app/resource/pom.xml
+0
-0
ExamPaperLibraryController.java
...ontroller/questionlibrary/ExamPaperLibraryController.java
+56
-10
QuestionLibraryController.java
...controller/questionlibrary/QuestionLibraryController.java
+0
-0
StatisticsAnalyseController.java
...bg/controller/statistics/StatisticsAnalyseController.java
+14
-11
ExamPaperInfoManage.java
...source/bg/manage/questionlibrary/ExamPaperInfoManage.java
+8
-0
ExamPaperInfoManageImpl.java
...ce/bg/manage/questionlibrary/ExamPaperInfoManageImpl.java
+7
-0
ResourcLibraryExampaperDiyTypeManage.java
...questionlibrary/ResourcLibraryExampaperDiyTypeManage.java
+14
-0
ResourcLibraryExampaperDiyTypeManageImpl.java
...tionlibrary/ResourcLibraryExampaperDiyTypeManageImpl.java
+26
-0
ExamPaperInfoMapper.java
...source/bg/mapper/questionlibrary/ExamPaperInfoMapper.java
+13
-0
ExamPaperLibraryMapper.java
...rce/bg/mapper/questionlibrary/ExamPaperLibraryMapper.java
+1
-9
ResourcLibraryExampaperDiyTypeMapper.java
...questionlibrary/ResourcLibraryExampaperDiyTypeMapper.java
+14
-0
ExamPaperLibraryService.java
...e/bg/service/questionlibrary/ExamPaperLibraryService.java
+30
-17
ExamPaperLibraryServiceImpl.java
.../service/questionlibrary/ExamPaperLibraryServiceImpl.java
+66
-8
StatisticsAnalyseServiceImpl.java
...e/bg/service/statistics/StatisticsAnalyseServiceImpl.java
+4
-0
SaveUpdateExamPaperForm.java
...mons/form/bg/questionlibrary/SaveUpdateExamPaperForm.java
+5
-0
FgSelectExamPaperForm.java
...ommons/form/fg/questionlibrary/FgSelectExamPaperForm.java
+28
-0
FgSelectExamRecordForm.java
...mmons/form/fg/questionlibrary/FgSelectExamRecordForm.java
+22
-0
FgSubmitExamRecordForm.java
...mmons/form/fg/questionlibrary/FgSubmitExamRecordForm.java
+22
-0
FgUpdateStudyRecordForm.java
...mons/form/fg/questionlibrary/FgUpdateStudyRecordForm.java
+18
-0
ExamRecord.java
...qx/resource/commons/model/questionlibrary/ExamRecord.java
+7
-0
ResourcLibraryExampaerDiyType.java
.../model/questionlibrary/ResourcLibraryExampaerDiyType.java
+4
-0
FgMyLearningListVo.java
...ource/commons/vo/fg/courselibrary/FgMyLearningListVo.java
+0
-0
FgExamPaperInfoVo.java
...urce/commons/vo/fg/questionlibrary/FgExamPaperInfoVo.java
+20
-0
FgSelectExamPaperVo.java
...ce/commons/vo/fg/questionlibrary/FgSelectExamPaperVo.java
+30
-0
FgMemberCollectionController.java
...roller/membercollection/FgMemberCollectionController.java
+1
-1
FgExamPaperLibraryController.java
...troller/questionlibrary/FgExamPaperLibraryController.java
+147
-0
FgExamPaperInfoManage.java
...urce/fg/manage/questionlibrary/FgExamPaperInfoManage.java
+23
-0
FgExamPaperInfoManageImpl.java
.../fg/manage/questionlibrary/FgExamPaperInfoManageImpl.java
+33
-0
FgQuestionLibraryManage.java
...ce/fg/manage/questionlibrary/FgQuestionLibraryManage.java
+14
-0
FgQuestionLibraryManageImpl.java
...g/manage/questionlibrary/FgQuestionLibraryManageImpl.java
+26
-0
FgEbookDiyTypeMapper.java
...m/zrqx/resource/fg/mapper/ebook/FgEbookDiyTypeMapper.java
+1
-1
FgExamPaperInfoMapper.java
...urce/fg/mapper/questionlibrary/FgExamPaperInfoMapper.java
+27
-0
FgExamPaperLibraryMapper.java
...e/fg/mapper/questionlibrary/FgExamPaperLibraryMapper.java
+44
-0
FgExamRecordInfoMapper.java
...rce/fg/mapper/questionlibrary/FgExamRecordInfoMapper.java
+14
-0
FgExamRecordMapper.java
...esource/fg/mapper/questionlibrary/FgExamRecordMapper.java
+55
-0
FgQuestionLibraryMapper.java
...ce/fg/mapper/questionlibrary/FgQuestionLibraryMapper.java
+28
-0
FgResourcLibraryExampaperDiyTypeMapper.java
...estionlibrary/FgResourcLibraryExampaperDiyTypeMapper.java
+30
-0
FgVideoLibraryDiyTypeMapper.java
...e/fg/mapper/videolibrary/FgVideoLibraryDiyTypeMapper.java
+12
-0
FgExamPaperLibraryService.java
.../fg/service/questionlibray/FgExamPaperLibraryService.java
+110
-0
FgExamPaperLibraryServiceImpl.java
...service/questionlibray/FgExamPaperLibraryServiceImpl.java
+0
-0
ExamRecordInfo.java
...ommons/model/resource/questionlibrary/ExamRecordInfo.java
+4
-2
没有找到文件。
app/resource/pom.xml
浏览文件 @
372cf9e7
app/resource/src/main/java/com/zrqx/resource/bg/controller/questionlibrary/ExamPaperLibraryController.java
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
bg
.
controller
.
questionlibrary
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.*
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperLibrary
;
import
com.zrqx.resource.commons.model.questionlibrary.QuestionLibrary
;
import
com.zrqx.resource.commons.vo.bg.questionlibrary.QuestionNumVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.resource.bg.service.questionlibrary.ExamPaperLibraryService
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.BatchDeleteForm
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.SaveExamPaperInfoForm
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.SaveUpdateExamPaperForm
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.UpdateWordsQuestionRelationForm
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
javax.security.auth.callback.Callback
;
import
java.util.List
;
/**
* 试卷库
* @author JSX
...
...
@@ -28,10 +30,16 @@ public class ExamPaperLibraryController {
@Autowired
private
ExamPaperLibraryService
service
;
/**
* @param form name 试卷名称, DiyType 业务类型
* @return
* @author Jsx
* @date 2020/10/16 16:45
*/
@ApiOperation
(
value
=
"新增"
)
@PostMapping
(
"/save"
)
public
CallBack
<
Integer
>
save
(
@RequestBody
SaveUpdateExamPaperForm
form
,
SaveExamPaperInfoForm
form1
){
return
CallBack
.
success
(
service
.
save
(
form
,
form1
));
public
CallBack
<
Integer
>
save
(
@RequestBody
SaveUpdateExamPaperForm
form
){
return
CallBack
.
success
(
service
.
save
(
form
));
}
@ApiOperation
(
"修改"
)
...
...
@@ -57,4 +65,42 @@ public class ExamPaperLibraryController {
public
CallBack
<
Integer
>
connectQuestion
(
@RequestBody
SaveExamPaperInfoForm
form
){
return
CallBack
.
success
(
service
.
saveConnectQuestion
(
form
));
}
/**
* @param exampaperId 试卷id
* @return [questionType 试题类型, num 试题数量]
* @author Jsx
* @date 2020/10/16 9:38
*/
@ApiOperation
(
"获取试卷详情各个试题的数量"
)
@GetMapping
(
"/get-exampaper-info-sum"
)
public
CallBack
<
List
<
QuestionNumVo
>>
getExamPaperInfoSum
(
Integer
exampaperId
){
return
CallBack
.
success
(
service
.
getExamPaperInfoSum
(
exampaperId
));
}
/**
* @param pageParam
* @return
* @author Jsx
* @date 2020/10/16 15:21
*/
@ApiOperation
(
"查询试卷分页数据"
)
@GetMapping
(
"/page"
)
public
CallBack
<
PageInfo
<
ExamPaperLibrary
>>
getPage
(
PageParam
pageParam
){
return
CallBack
.
success
(
service
.
queryByPage
(
pageParam
));
}
/**
*
* @param ,试卷id,资源类型IDresourcId 资源类型名称resourcName 资源类型resourceType
* @return
* @author Jsx
* @date 2020/10/20 8:49
*/
@ApiOperation
(
"设置习题"
)
@PostMapping
(
"/problem"
)
public
CallBack
<
Integer
>
setProblem
(
@RequestBody
SaveUpdateExamPaperForm
form
){
return
CallBack
.
success
(
service
.
saveProblem
(
form
));
}
}
app/resource/src/main/java/com/zrqx/resource/bg/controller/questionlibrary/QuestionLibraryController.java
浏览文件 @
372cf9e7
app/resource/src/main/java/com/zrqx/resource/bg/controller/statistics/StatisticsAnalyseController.java
浏览文件 @
372cf9e7
...
...
@@ -19,21 +19,24 @@ import io.swagger.annotations.ApiOperation;
* @author JSX
* @date 2020年9月30日上午10:29:45
*/
@RestController
@RequestMapping
(
"/bg/statistics-analyse"
)
@Api
(
description
=
"统计分析"
)
public
class
StatisticsAnalyseController
{
// @Autowired
// private StatisticsAnalyseService statisticsAnalyseService;
//
// @ApiOperation("获取课程分类统计信息")
// @GetMapping("/course-classify")
// public CallBack<Integer> getCourseClassify(){
//
//
// return null;
//
// }
@Autowired
//private StatisticsAnalyseService statisticsAnalyseService;
@ApiOperation
(
"获取课程分类统计信息"
)
@GetMapping
(
"/course-classify"
)
public
CallBack
<
Integer
>
getCourseClassify
(){
return
null
;
}
}
app/resource/src/main/java/com/zrqx/resource/bg/manage/questionlibrary/ExamPaperInfoManage.java
浏览文件 @
372cf9e7
...
...
@@ -25,4 +25,12 @@ public interface ExamPaperInfoManage extends BaseService<ExamPaperInfo, Integer>
*/
boolean
delete
(
Integer
id
,
String
type
);
/**
* 根据试卷id查询试题个数
* @param id 试卷id
* @return 试题个数
* @author Jsx
* @date 2020/10/16 15:33
*/
Integer
getCount
(
Integer
id
);
}
app/resource/src/main/java/com/zrqx/resource/bg/manage/questionlibrary/ExamPaperInfoManageImpl.java
浏览文件 @
372cf9e7
...
...
@@ -36,4 +36,11 @@ public class ExamPaperInfoManageImpl extends BaseServiceImpl<ExamPaperInfo,Integ
return
mapper
.
delete
(
examPaperInfo
)
>
0
;
}
@Override
public
Integer
getCount
(
Integer
id
)
{
ExamPaperInfo
record
=
new
ExamPaperInfo
();
record
.
setExampaperid
(
id
);
return
mapper
.
select
(
record
).
size
();
}
}
app/resource/src/main/java/com/zrqx/resource/bg/manage/questionlibrary/ResourcLibraryExampaperDiyTypeManage.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
bg
.
manage
.
questionlibrary
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.resource.commons.model.questionlibrary.ResourcLibraryExampaerDiyType
;
/**
* 资源与试卷关联
*
* @author Jsx
* @version 1.0
* @date 2020/10/20 10:29
*/
public
interface
ResourcLibraryExampaperDiyTypeManage
extends
BaseService
<
ResourcLibraryExampaerDiyType
,
Integer
>
{
}
app/resource/src/main/java/com/zrqx/resource/bg/manage/questionlibrary/ResourcLibraryExampaperDiyTypeManageImpl.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
bg
.
manage
.
questionlibrary
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.resource.bg.mapper.questionlibrary.ResourcLibraryExampaperDiyTypeMapper
;
import
com.zrqx.resource.commons.model.questionlibrary.ResourcLibraryExampaerDiyType
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* 资源与试卷关联
*
* @author Jsx
* @version 1.0
* @date 2020/10/20 10:32
*/
@Service
public
class
ResourcLibraryExampaperDiyTypeManageImpl
extends
BaseServiceImpl
<
ResourcLibraryExampaerDiyType
,
Integer
>
implements
ResourcLibraryExampaperDiyTypeManage
{
@Autowired
public
ResourcLibraryExampaperDiyTypeMapper
mapper
;
@Override
public
BaseMapper
<
ResourcLibraryExampaerDiyType
>
getMapper
()
{
return
mapper
;
}
}
app/resource/src/main/java/com/zrqx/resource/bg/mapper/questionlibrary/ExamPaperInfoMapper.java
浏览文件 @
372cf9e7
...
...
@@ -2,10 +2,23 @@ package com.zrqx.resource.bg.mapper.questionlibrary;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperInfo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
/**
* 试卷详细
*/
public
interface
ExamPaperInfoMapper
extends
BaseMapper
<
ExamPaperInfo
>
{
@Select
(
"<script>"
+
" select questionid from res_exampaperinfo e "
+
" where 1=1 "
+
" <if test = 'examPaperId != null'> "
+
" and e.exampaperid = #{examPaperId} "
+
" </if> "
+
"</script>"
)
List
<
Integer
>
getIds
(
@Param
(
"examPaperId"
)
Integer
examPaperId
);
}
app/resource/src/main/java/com/zrqx/resource/bg/mapper/questionlibrary/ExamPaperLibraryMapper.java
浏览文件 @
372cf9e7
...
...
@@ -21,17 +21,9 @@ public interface ExamPaperLibraryMapper extends BaseMapper<ExamPaperLibrary>{
+
" batchcode, begintime, endtime, restrictedhours , assemblytype, intype, introduction,effective, "
+
" creater, status , publishtime, sumscore, createTime, subcount, organizationid , questionnum, institutionid, years "
+
" from res_exampaper_library where 1=1 "
+
" <if test = '"
+
NOTBLANK
+
"(form.name)'> "
+
" AND name like concat(#{form.name},'%') "
+
" </if> "
+
" eq(examStatus,form.status) "
+
" eq(reserve2,form.reserve2) "
+
" order by createtime desc "
+
" </script>"
)
List
<
ExamPaperLibrary
>
queryByPage
(
@Param
(
"form"
)
QueryPageForm
form
);
List
<
ExamPaperLibrary
>
queryByPage
();
@Select
(
"<script>"
+
"select questionType,count(id) num from res_exampaperinfo where exampaperid=#{exampaperId} group by questiontype"
...
...
app/resource/src/main/java/com/zrqx/resource/bg/mapper/questionlibrary/ResourcLibraryExampaperDiyTypeMapper.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
bg
.
mapper
.
questionlibrary
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.resource.commons.model.questionlibrary.ResourcLibraryExampaerDiyType
;
/**
* 资源与试卷关联
*
* @author Jsx
* @version 1.0
* @date 2020/10/20 11:15
*/
public
interface
ResourcLibraryExampaperDiyTypeMapper
extends
BaseMapper
<
ResourcLibraryExampaerDiyType
>
{
}
app/resource/src/main/java/com/zrqx/resource/bg/service/questionlibrary/ExamPaperLibraryService.java
浏览文件 @
372cf9e7
...
...
@@ -3,12 +3,12 @@ package com.zrqx.resource.bg.service.questionlibrary;
import
java.util.List
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.*
;
import
com.zrqx.resource.commons.vo.bg.questionlibrary.QuestionNumVo
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.BatchDeleteForm
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.SaveExamPaperInfoForm
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.SaveUpdateExamPaperForm
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.UpdateWordsQuestionRelationForm
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperLibrary
;
import
com.zrqx.core.service.BaseService
;
...
...
@@ -24,7 +24,7 @@ public interface ExamPaperLibraryService extends BaseService<ExamPaperLibrary, I
* @author JSX
* @date: 2020年9月28日 下午2:01:50
*/
Integer
save
(
SaveUpdateExamPaperForm
form
,
SaveExamPaperInfoForm
form1
);
Integer
save
(
SaveUpdateExamPaperForm
form
);
/**
* 修改试卷
...
...
@@ -53,12 +53,30 @@ public interface ExamPaperLibraryService extends BaseService<ExamPaperLibrary, I
*/
Integer
saveConnectQuestion
(
SaveExamPaperInfoForm
form
);
// /**
// * 分页获取数据
// * @param pageParam
// * @return
// */
// PageInfo<ExamPaperLibrary> queryByPage(PageParam pageParam,QueryPageForm form);
/**
* 获取试卷关联的试题数量
* @param exampaperId 试卷id
* @return [questionType 试题类型, num 试题数量]
* @author JSX
* @date: 2020年9月28日 下午3:42:36
*/
List
<
QuestionNumVo
>
getExamPaperInfoSum
(
Integer
exampaperId
);
/**
* 分页获取数据
* @param pageParam
* @return
*/
PageInfo
<
ExamPaperLibrary
>
queryByPage
(
PageParam
pageParam
);
/**
* 设置课后习题
* @param ,试卷id,资源类型IDresourcId 资源类型名称resourcName 资源类型resourceType
* @return
* @author Jsx
* @date 2020/10/20 8:57
*/
Integer
saveProblem
(
SaveUpdateExamPaperForm
form
);
//
// /**
// * 获取试卷关联的试题
...
...
@@ -67,12 +85,7 @@ public interface ExamPaperLibraryService extends BaseService<ExamPaperLibrary, I
// */
// List<ExamPaperInfoVo> getExamPaperInfo(Integer id,String type);
//
// /**
// * 获取试卷关联的试题数量
// * @param exampaperId
// * @return
// */
// List<QuestionNumVo> getExamPaperInfoSum(Integer exampaperId);
//
// /**
// * 试卷关联页的试题弹窗列表
...
...
app/resource/src/main/java/com/zrqx/resource/bg/service/questionlibrary/ExamPaperLibraryServiceImpl.java
浏览文件 @
372cf9e7
...
...
@@ -10,7 +10,11 @@ import java.util.List;
import
java.util.stream.Collectors
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.resource.bg.manage.questionlibrary.*
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.*
;
import
com.zrqx.resource.commons.vo.bg.questionlibrary.QuestionNumVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -18,7 +22,6 @@ import org.springframework.stereotype.Service;
import
com.zrqx.resource.commons.model.diytype.DiyType
;
import
com.zrqx.core.enums.third.ExamStatusEnum
;
import
com.zrqx.core.exception.BusinessValidateException
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.ExamPaperInfoForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.resource.commons.model.questionlibrary.QuestionLibrary
;
import
com.zrqx.resource.commons.model.questionlibrary.ResourcLibraryExampaerDiyType
;
...
...
@@ -27,10 +30,6 @@ import com.zrqx.core.service.BaseServiceImpl;
import
com.zrqx.resource.bg.mapper.questionlibrary.ExamPaperInfoMapper
;
import
com.zrqx.resource.bg.mapper.questionlibrary.ExamPaperLibraryMapper
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.BatchDeleteForm
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.SaveExamPaperInfoForm
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.SaveUpdateExamPaperForm
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.UpdateWordsQuestionRelationForm
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperInfo
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperLibrary
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperLibraryDiyType
;
...
...
@@ -45,9 +44,13 @@ public class ExamPaperLibraryServiceImpl extends BaseServiceImpl<ExamPaperLibrar
@Autowired
private
ExamPaperLibraryDiyTypeManage
manage
;
@Autowired
private
ResourcLibraryExampaperDiyTypeManage
diyTypeManage
;
@Autowired
private
ExamPaperInfoManage
infoManage
;
@Autowired
private
QuestionLibraryManage
questionManage
;
@Autowired
private
ExamPaperInfoMapper
examPaperInfoMapper
;
@Override
public
BaseMapper
<
ExamPaperLibrary
>
getMapper
()
{
...
...
@@ -55,7 +58,7 @@ public class ExamPaperLibraryServiceImpl extends BaseServiceImpl<ExamPaperLibrar
}
@Override
public
Integer
save
(
SaveUpdateExamPaperForm
form
,
SaveExamPaperInfoForm
form1
)
{
public
Integer
save
(
SaveUpdateExamPaperForm
form
)
{
ExamPaperLibrary
ep
=
new
ExamPaperLibrary
();
ep
.
setName
(
form
.
getName
());
//试卷名称
ep
.
setCreatename
(
form
.
getCreater
());
//出卷人
...
...
@@ -71,8 +74,11 @@ public class ExamPaperLibraryServiceImpl extends BaseServiceImpl<ExamPaperLibrar
ep
.
setReserve2
(
form
.
getReserve2
());
//属性 工作分类
int
i
=
mapper
.
insertUseGeneratedKeys
(
ep
);
//如果保存成功,这进行组卷操作
if
(
i
==
1
&&
form1
!=
null
)
{
form1
.
setId
(
ep
.
getId
());
//获取保存成功的试卷id
if
(
i
==
1
&&
form
.
getList
()
!=
null
)
{
form
.
setId
(
ep
.
getId
());
//获取保存成功的试卷id
SaveExamPaperInfoForm
form1
=
new
SaveExamPaperInfoForm
();
form1
.
setId
(
ep
.
getId
());
form1
.
setList
(
form
.
getList
());
saveConnectQuestion
(
form1
);
//组卷
//循环遍历添加试卷与自定义分类表关系
if
(
form
.
getDiyType
()
!=
null
)
{
...
...
@@ -90,6 +96,7 @@ public class ExamPaperLibraryServiceImpl extends BaseServiceImpl<ExamPaperLibrar
t
.
setName
(
form
.
getResourcName
());
t
.
setResourceType
(
form
.
getResourceType
());
t
.
setExampaperId
(
form
.
getId
());
t
.
setCreateTime
(
new
Date
());
manage
.
insertSelective
(
t
);
}
...
...
@@ -164,6 +171,7 @@ public class ExamPaperLibraryServiceImpl extends BaseServiceImpl<ExamPaperLibrar
throw
new
BusinessValidateException
(
"未找到试卷"
);
}
List
<
ExamPaperInfoForm
>
list
=
form
.
getList
();
int
sumscore
=
0
;
if
(
list
!=
null
)
{
for
(
ExamPaperInfoForm
info
:
list
)
{
//获取最大排序号
...
...
@@ -183,6 +191,9 @@ public class ExamPaperLibraryServiceImpl extends BaseServiceImpl<ExamPaperLibrar
}
else
{
epInfo
.
setScore
(
0
);
}
if
(
info
.
getScore
()
!=
null
){
sumscore
=
sumscore
+
info
.
getScore
();
}
epInfo
.
setQuestionid
(
info
.
getQuestionId
());
epInfo
.
setExampaperid
(
ep
.
getId
());
epInfo
.
setComplexity
(
ql
.
getComplexity
());
...
...
@@ -190,6 +201,53 @@ public class ExamPaperLibraryServiceImpl extends BaseServiceImpl<ExamPaperLibrar
infoManage
.
insert
(
epInfo
);
}
}
ExamPaperLibrary
paperLibrary
=
new
ExamPaperLibrary
();
paperLibrary
.
setSumscore
(
sumscore
);
paperLibrary
.
setQuestionnum
(
list
.
size
());
paperLibrary
.
setNum
(
list
.
size
());
mapper
.
updateByPrimaryKeySelective
(
paperLibrary
);
return
1
;
}
@Override
public
List
<
QuestionNumVo
>
getExamPaperInfoSum
(
Integer
exampaperId
)
{
List
<
QuestionNumVo
>
list
=
mapper
.
getExamPaperInfoSum
(
exampaperId
);
return
list
;
}
@Override
public
PageInfo
<
ExamPaperLibrary
>
queryByPage
(
PageParam
pageParam
)
{
startPage
(
pageParam
);
List
<
ExamPaperLibrary
>
list
=
mapper
.
queryByPage
();
list
.
forEach
(
this
::
fmtExamPaperLibrary
);
return
new
PageInfo
<
ExamPaperLibrary
>(
list
);
}
@Override
public
Integer
saveProblem
(
SaveUpdateExamPaperForm
form
)
{
//添加课程与试卷表关系
if
(
form
.
getResourcId
()
!=
null
)
{
ResourcLibraryExampaerDiyType
t
=
new
ResourcLibraryExampaerDiyType
();
t
.
setResourcId
(
form
.
getResourcId
());
t
.
setName
(
form
.
getResourcName
());
t
.
setResourceType
(
form
.
getResourceType
());
t
.
setExampaperId
(
form
.
getId
());
t
.
setCreateTime
(
new
Date
());
diyTypeManage
.
insertSelective
(
t
);
}
return
1
;
}
public
void
fmtExamPaperLibrary
(
ExamPaperLibrary
examPaperLibrary
){
//查询试卷中的试题个数
examPaperLibrary
.
setNum
(
infoManage
.
getCount
(
examPaperLibrary
.
getId
()));
ExamPaperInfo
epInfo
=
new
ExamPaperInfo
();
epInfo
.
setExampaperid
(
examPaperLibrary
.
getId
());
List
<
ExamPaperInfo
>
voList
=
examPaperInfoMapper
.
select
(
epInfo
);
for
(
ExamPaperInfo
v
:
voList
)
{
QuestionLibrary
questionLibrary
=
questionManage
.
selectByPrimaryKey
(
v
.
getQuestionid
());
}
Integer
scoreSum
=
voList
.
stream
().
collect
(
Collectors
.
summingInt
(
ExamPaperInfo:
:
getScore
));
examPaperLibrary
.
setSumscore
(
scoreSum
);
}
}
app/resource/src/main/java/com/zrqx/resource/bg/service/statistics/StatisticsAnalyseServiceImpl.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
bg
.
service
.
statistics
;
public
class
StatisticsAnalyseServiceImpl
{
}
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/questionlibrary/SaveUpdateExamPaperForm.java
浏览文件 @
372cf9e7
...
...
@@ -6,6 +6,8 @@ import com.zrqx.resource.commons.model.videolibrary.VideoLibrary;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* 添加修改试卷表单
* @author ydm
...
...
@@ -58,4 +60,7 @@ public class SaveUpdateExamPaperForm {
@ApiModelProperty
(
"资源类型"
)
private
Integer
resourceType
;
@ApiModelProperty
(
"试卷详情(试题列表)"
)
private
List
<
ExamPaperInfoForm
>
list
;
}
app/resource/src/main/java/com/zrqx/resource/commons/form/fg/questionlibrary/FgSelectExamPaperForm.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
commons
.
form
.
fg
.
questionlibrary
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 模拟练习
*
* @author Jsx
* @version 1.0
* @date 2020/10/26 15:36
*/
@Data
public
class
FgSelectExamPaperForm
{
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"资源类型"
)
private
Integer
resourceType
;
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
memberId
;
@ApiModelProperty
(
value
=
"分类ID"
)
private
Integer
typeId
;
@ApiModelProperty
(
value
=
"分类名称"
)
private
String
typeName
;
@ApiModelProperty
(
value
=
"分类code"
)
private
String
typeCode
;
}
app/resource/src/main/java/com/zrqx/resource/commons/form/fg/questionlibrary/FgSelectExamRecordForm.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
commons
.
form
.
fg
.
questionlibrary
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author Jsx
* @version 1.0
* @date 2020/10/21 17:08
*/
@Data
public
class
FgSelectExamRecordForm
{
@ApiModelProperty
(
"试卷id"
)
private
Integer
exampaperid
;
@ApiModelProperty
(
"资源类型id"
)
private
String
resourcId
;
@ApiModelProperty
(
"用户id"
)
private
String
stuId
;
@ApiModelProperty
(
"自主练习 0否 1是"
)
private
Integer
auto
;
}
app/resource/src/main/java/com/zrqx/resource/commons/form/fg/questionlibrary/FgSubmitExamRecordForm.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
commons
.
form
.
fg
.
questionlibrary
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* 习题-提交结果
*
* @author Jsx
* @version 1.0
* @date 2020/10/21 9:59
*/
@Data
public
class
FgSubmitExamRecordForm
{
@ApiModelProperty
(
"答题结果"
)
private
List
<
FgUpdateStudyRecordForm
>
list
;
@ApiModelProperty
(
"测试id"
)
private
Integer
recordId
;
}
app/resource/src/main/java/com/zrqx/resource/commons/form/fg/questionlibrary/FgUpdateStudyRecordForm.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
commons
.
form
.
fg
.
questionlibrary
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author Jsx
* @version 1.0
* @date 2020/10/21 10:01
*/
@Data
public
class
FgUpdateStudyRecordForm
{
@ApiModelProperty
(
"考试记录详细id"
)
private
Integer
id
;
@ApiModelProperty
(
"排序后答案,统一大写字母,多个答案用英文逗号分隔"
)
private
String
answer
;
}
app/resource/src/main/java/com/zrqx/resource/commons/model/questionlibrary/ExamRecord.java
浏览文件 @
372cf9e7
...
...
@@ -64,5 +64,11 @@ public class ExamRecord implements java.io.Serializable {
private
String
area
;
@ApiModelProperty
(
"县"
)
private
String
town
;
@ApiModelProperty
(
"资源类型id"
)
private
String
resourcid
;
@ApiModelProperty
(
"错误题数"
)
private
Integer
errornum
;
@ApiModelProperty
(
"自主练习 0否 1是"
)
private
Integer
auto
;
}
\ No newline at end of file
app/resource/src/main/java/com/zrqx/resource/commons/model/questionlibrary/ResourcLibraryExampaerDiyType.java
浏览文件 @
372cf9e7
...
...
@@ -8,6 +8,8 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"ResourcLibraryExampaerDiyType"
,
description
=
"资源类型与试卷关系表"
)
@Table
(
name
=
"res_resourc_library_exampaper_diy_type"
)
...
...
@@ -30,4 +32,6 @@ public class ResourcLibraryExampaerDiyType {
@ApiModelProperty
(
"试卷id"
)
private
Integer
exampaperId
;
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
}
app/resource/src/main/java/com/zrqx/resource/commons/vo/fg/courselibrary/FgMyLearningListVo.java
浏览文件 @
372cf9e7
app/resource/src/main/java/com/zrqx/resource/commons/vo/fg/questionlibrary/FgExamPaperInfoVo.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
commons
.
vo
.
fg
.
questionlibrary
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperInfo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
public
class
FgExamPaperInfoVo
extends
ExamPaperInfo
{
//@ApiModelProperty("小题列表")
//public List<WordsQuestionRelation> children;
@ApiModelProperty
(
"考生答案"
)
private
String
stuanswer
;
@ApiModelProperty
(
"是否答对0 错误1正确"
)
private
Integer
isRight
;
}
app/resource/src/main/java/com/zrqx/resource/commons/vo/fg/questionlibrary/FgSelectExamPaperVo.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
commons
.
vo
.
fg
.
questionlibrary
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 模拟练习
*
* @author Jsx
* @version 1.0
* @date 2020/10/26 15:50
*/
@Data
@ApiModel
(
value
=
"FgSelectExamPaperVo"
,
description
=
"查询模拟练习试卷"
)
public
class
FgSelectExamPaperVo
{
@ApiModelProperty
(
value
=
"试卷id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"试卷名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"练习时间"
)
private
String
time
;
@ApiModelProperty
(
value
=
"得分"
)
private
Integer
realscore
;
@ApiModelProperty
(
value
=
"总分"
)
private
Integer
sumscore
;
}
app/resource/src/main/java/com/zrqx/resource/fg/controller/membercollection/FgMemberCollectionController.java
浏览文件 @
372cf9e7
...
...
@@ -77,7 +77,7 @@ public class FgMemberCollectionController {
return
CallBack
.
success
(
service
.
deleteMemberCollection
(
form
));
}
@ApiOperation
(
value
=
"是否
收藏"
,
notes
=
"1有收藏0没有收藏
"
)
@ApiOperation
(
value
=
"是否
关注"
,
notes
=
"1有关注0没有关注
"
)
@GetMapping
(
value
=
"/check-is-collect"
)
public
CallBack
<
Integer
>
checkIsCollect
(
GoodsForm
form
){
return
CallBack
.
success
(
service
.
checkIsCollect
(
form
));
...
...
app/resource/src/main/java/com/zrqx/resource/fg/controller/questionlibrary/FgExamPaperLibraryController.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
controller
.
questionlibrary
;
import
com.zrqx.core.commons.model.resource.questionlibrary.ExamRecordInfo
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.resource.commons.form.bg.questionlibrary.QueryPageForm
;
import
com.zrqx.resource.commons.form.fg.questionlibrary.FgSelectExamPaperForm
;
import
com.zrqx.resource.commons.form.fg.questionlibrary.FgSelectExamRecordForm
;
import
com.zrqx.resource.commons.form.fg.questionlibrary.FgSubmitExamRecordForm
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperLibrary
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamRecord
;
import
com.zrqx.resource.commons.vo.fg.questionlibrary.FgExamPaperInfoVo
;
import
com.zrqx.resource.commons.vo.fg.questionlibrary.FgSelectExamPaperVo
;
import
com.zrqx.resource.fg.service.questionlibray.FgExamPaperLibraryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.security.auth.callback.Callback
;
import
java.util.List
;
/**
* 前台习题
*
* @author Jsx
* @version 1.0
* @date 2020/10/19 16:24
*/
@RestController
@RequestMapping
(
"/fg//question-library"
)
@Api
(
description
=
"前台-习题"
)
public
class
FgExamPaperLibraryController
{
@Autowired
private
FgExamPaperLibraryService
service
;
/**
* @param pageParam
* @param form 课程或者系列课id
* @return 课程或者系列课相关试卷列表
* @author Jsx
* @date 2020/10/19 16:30
*/
@ApiOperation
(
"分页查询课程相关试卷列表"
)
@GetMapping
(
"/page"
)
public
CallBack
<
PageInfo
<
ExamPaperLibrary
>>
getPage
(
PageParam
pageParam
,
@RequestBody
FgSelectExamRecordForm
form
){
return
CallBack
.
success
(
service
.
queryByPage
(
pageParam
,
form
));
}
/**
* 1.依据该用户新增或者更新用户下的测试记录与测试记录详情
* 2.获取用户下该课程的试卷的试题列表
* @param , 试卷exampaperid 资源resourcId
* @return 试卷相关试题列表
* @author Jsx
* @date 2020/10/20 15:03
*/
@ApiOperation
(
"获取试卷关联的试题"
)
@GetMapping
(
"/get-exampaper-info"
)
public
CallBack
<
List
<
ExamRecordInfo
>>
getExamPaperInfo
(
FgSelectExamRecordForm
examRecordForm
){
return
CallBack
.
success
(
service
.
saveOrUpdateExamRecord
(
examRecordForm
));
}
/**
* 获取该登录用户下res_examrecord表的答题测试记录
* @param recordid 考试记录id
* @return 答题记录
* @author Jsx
* @date 2020/10/23 9:22
*/
@ApiOperation
(
"获取用户答题记录"
)
@GetMapping
(
"/get"
)
public
CallBack
<
List
<
ExamRecord
>>
getExamRecord
(
Integer
recordid
)
{
return
CallBack
.
success
(
service
.
getExamRecord
(
recordid
));
}
/**
* 获取该用户答题后res_examrecordinfo表的练习提的记录详情
* @param recordid 考试记录id
* @return 返回试卷中各试题的详情
* @author Jsx
* @date 2020/10/25 17:04
*/
@ApiOperation
(
"获取用户答题后的试题详情"
)
@GetMapping
(
"/get-examrecorinfo"
)
public
CallBack
<
List
<
ExamRecordInfo
>>
getExamRecordInfo
(
Integer
recordid
)
{
return
CallBack
.
success
(
service
.
getExamRecordInfo
(
recordid
));
}
/**
* 1.保存练习提答案并更新试题库统计信息
* 2.根据保存的试题答案信息计算试题总分、正确题数等信息
* @param form [测试id 答案list]
* @return
* @author Jsx
* @date 2020/10/21 10:29
*/
@ApiOperation
(
"提交结果"
)
@PostMapping
(
"/submit-exampaper"
)
public
CallBack
<
ExamRecord
>
submitExamPaper
(
@RequestBody
FgSubmitExamRecordForm
form
){
service
.
updateExamRecordInfo
(
form
);
ExamRecord
examRecord
=
service
.
updateCheckExamRecord
(
form
.
getRecordId
());
return
CallBack
.
success
(
examRecord
);
}
/**
* 根据条件查询模拟练习试卷库列表
* @param pageParam 分页查询条件 form 查询条件
* @return 模拟练习试卷库列表
* @author Jsx
* @date 2020/10/26 15:56
*/
@ApiOperation
(
"获取模拟试卷列表"
)
@PostMapping
(
"/get-exampaper"
)
public
CallBack
<
List
<
FgSelectExamPaperVo
>>
getExamPaper
(
PageParam
pageParam
,
@RequestBody
FgSelectExamPaperForm
form
){
return
CallBack
.
success
(
service
.
getExamPaper
(
pageParam
,
form
));
}
/**
* 根据试卷id去判断用户是否有权限做题
* @param form 试卷id exampaperid
* @return 如果没有提示“暂无权限”,如果有返回试卷试题详情
* @author Jsx
* @date 2020/10/27 8:33
*/
@ApiOperation
(
"获取模拟开始练习"
)
@PostMapping
(
"/simulatePractice"
)
public
CallBack
<
List
<
ExamRecordInfo
>>
simulatePractice
(
@RequestBody
FgSelectExamRecordForm
form
){
return
CallBack
.
success
(
service
.
simulatePractice
(
form
));
}
/**
* 1.根据入参值分类code查询,用户的习题权限,如若没有提示“暂无权限” 如果有则则去组装相关试卷返回
* 2.选择全部会自动查询用户相关分类权限,选择单一分类则按单一分类试题组装试卷。
* @param form 分类code typeCode
* @return 如果没有提示“暂无权限”,如果有返回试卷试题详情
* @author Jsx
* @date 2020/10/27 13:57
*/
@ApiOperation
(
"获取自主组题练习"
)
@PostMapping
(
"/autoConnectQuestion"
)
public
CallBack
<
List
<
ExamRecordInfo
>>
autoConnectQuestion
(
@RequestBody
FgSelectExamPaperForm
form
){
return
CallBack
.
success
(
service
.
autoConnectQuestion
(
form
));
}
}
app/resource/src/main/java/com/zrqx/resource/fg/manage/questionlibrary/FgExamPaperInfoManage.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
manage
.
questionlibrary
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperInfo
;
/**
* 试卷详情
*
* @author Jsx
* @version 1.0
* @date 2020/10/20 15:59
*/
public
interface
FgExamPaperInfoManage
extends
BaseService
<
ExamPaperInfo
,
Integer
>
{
/**
* 根据试卷id查询试题个数
* @param . 试卷id
* @return 试题个数
* @author Jsx
* @date 2020/10/20 17:09
*/
Integer
getCount
(
Integer
id
);
}
app/resource/src/main/java/com/zrqx/resource/fg/manage/questionlibrary/FgExamPaperInfoManageImpl.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
manage
.
questionlibrary
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperInfo
;
import
com.zrqx.resource.fg.mapper.questionlibrary.FgExamPaperInfoMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* 试卷详情
*
* @author Jsx
* @version 1.0
* @date 2020/10/20 16:01
*/
@Service
public
class
FgExamPaperInfoManageImpl
extends
BaseServiceImpl
<
ExamPaperInfo
,
Integer
>
implements
FgExamPaperInfoManage
{
@Autowired
private
FgExamPaperInfoMapper
mapper
;
@Override
public
BaseMapper
<
ExamPaperInfo
>
getMapper
()
{
return
mapper
;
}
@Override
public
Integer
getCount
(
Integer
id
)
{
ExamPaperInfo
record
=
new
ExamPaperInfo
();
record
.
setExampaperid
(
id
);
return
mapper
.
select
(
record
).
size
();
}
}
app/resource/src/main/java/com/zrqx/resource/fg/manage/questionlibrary/FgQuestionLibraryManage.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
manage
.
questionlibrary
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.resource.commons.model.questionlibrary.QuestionLibrary
;
/**
* 试题库
*
* @author Jsx
* @version 1.0
* @date 2020/10/20 16:24
*/
public
interface
FgQuestionLibraryManage
extends
BaseService
<
QuestionLibrary
,
Integer
>
{
}
app/resource/src/main/java/com/zrqx/resource/fg/manage/questionlibrary/FgQuestionLibraryManageImpl.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
manage
.
questionlibrary
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.resource.commons.model.questionlibrary.QuestionLibrary
;
import
com.zrqx.resource.fg.mapper.questionlibrary.FgQuestionLibraryMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* 试题库
*
* @author Jsx
* @version 1.0
* @date 2020/10/20 16:25
*/
@Service
public
class
FgQuestionLibraryManageImpl
extends
BaseServiceImpl
<
QuestionLibrary
,
Integer
>
implements
FgQuestionLibraryManage
{
@Autowired
private
FgQuestionLibraryMapper
mapper
;
@Override
public
BaseMapper
<
QuestionLibrary
>
getMapper
()
{
return
mapper
;
}
}
app/resource/src/main/java/com/zrqx/resource/fg/mapper/ebook/FgEbookDiyTypeMapper.java
浏览文件 @
372cf9e7
...
...
@@ -40,7 +40,7 @@ public interface FgEbookDiyTypeMapper extends BaseMapper<EbookDiyType> {
@Select
(
"<script>"
+
"select rdt.id, rdt.parentId, rdt.sort, rdt.showName, rdt.code "
+
"FROM res_Diy_Type rdt "
+
"left join res_ebook_diy_type redt on rdt.id = redt.d
iyTypeI
d "
+
"left join res_ebook_diy_type redt on rdt.id = redt.d
ti
d "
+
"where redt.ebookId = #{oid}"
+
"</script>"
)
List
<
DiyType
>
selectDiyTypeList
(
String
oid
);
...
...
app/resource/src/main/java/com/zrqx/resource/fg/mapper/questionlibrary/FgExamPaperInfoMapper.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
mapper
.
questionlibrary
;
import
com.zrqx.core.commons.model.resource.questionlibrary.ExamRecordInfo
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperInfo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
/**
* 试卷详情
*
* @author Jsx
* @version 1.0
* @date 2020/10/20 16:06
*/
public
interface
FgExamPaperInfoMapper
extends
BaseMapper
<
ExamPaperInfo
>
{
@Select
(
"<script>"
+
" select * "
+
" from res_exampaperinfo"
+
" where 1=1 "
+
" eq(exampaperid,exampaperid)"
+
"</script>"
)
List
<
ExamRecordInfo
>
getExamPaperInfo
(
@Param
(
"exampaperid"
)
String
exampaperid
);
}
app/resource/src/main/java/com/zrqx/resource/fg/mapper/questionlibrary/FgExamPaperLibraryMapper.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
mapper
.
questionlibrary
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.resource.commons.form.fg.questionlibrary.FgSelectExamPaperForm
;
import
com.zrqx.resource.commons.form.fg.questionlibrary.FgSelectExamRecordForm
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperLibrary
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
/**
* 试卷
*
* @author Jsx
* @version 1.0
* @date 2020/10/19 16:49
*/
public
interface
FgExamPaperLibraryMapper
extends
BaseMapper
<
ExamPaperLibrary
>
{
@Select
(
"<script>"
+
" select rel.id,rel.name"
+
" FROM res_resourc_library_exampaper_diy_type rdiy "
+
" LEFT JOIN res_exampaper_library rel ON rel.id = rdiy.exampaperId"
+
" WHERE 1 = 1 "
+
" <if test = '"
+
NOTBLANK
+
"(form.resourcId)'> "
+
" AND rdiy.resourcId = #{form.resourcId}"
+
" </if> "
+
" <if test = '"
+
NOTBLANK
+
"(form.exampaperid)'> "
+
" AND rdiy.exampaperid = #{form.exampaperid}"
+
" </if> "
+
" ORDER BY rdiy.createTime DESC "
+
" </script>"
)
List
<
ExamPaperLibrary
>
queryByPage
(
@Param
(
"form"
)
FgSelectExamRecordForm
form
);
@Select
(
"<script>"
+
" SELECT rel.id,rel.name,rel.questionnum,rel.sumscore"
+
" FROM res_exampaper_library_diy_type diy"
+
" LEFT JOIN res_exampaper_library rel ON diy.epid = rel.id"
+
" where 1=1"
+
" eq(diy.code,form.typeCode)"
+
" like(rel.name,fom.name)"
+
" </script>"
)
List
<
ExamPaperLibrary
>
selectExamPaper
(
@Param
(
"form"
)
FgSelectExamPaperForm
form
);
}
app/resource/src/main/java/com/zrqx/resource/fg/mapper/questionlibrary/FgExamRecordInfoMapper.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
mapper
.
questionlibrary
;
import
com.zrqx.core.commons.model.resource.questionlibrary.ExamRecordInfo
;
import
com.zrqx.core.mapper.BaseMapper
;
/**
* 考试记录详情
*
* @author Jsx
* @version 1.0
* @date 2020/10/21 11:45
*/
public
interface
FgExamRecordInfoMapper
extends
BaseMapper
<
ExamRecordInfo
>
{
}
app/resource/src/main/java/com/zrqx/resource/fg/mapper/questionlibrary/FgExamRecordMapper.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
mapper
.
questionlibrary
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.resource.commons.form.fg.questionlibrary.FgSelectExamRecordForm
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamRecord
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
/**
* 考试记录
*
* @author Jsx
* @version 1.0
* @date 2020/10/21 13:38
*/
public
interface
FgExamRecordMapper
extends
BaseMapper
<
ExamRecord
>
{
@Select
(
"<script>"
+
" select id, exampaperid, name, begintime, endtime, readtime, sumscore, realscore, questionnum, rightnum, "
+
" precisionpercent, stuId, batchCode, examcategory, createTime, province, city, area, town, resourcid"
+
" from res_examrecord res "
+
" where 1=1 "
+
"<if test = '"
+
NOTBLANK
+
"(form.stuId)' >"
+
" and res.stuId = #{form.stuId} "
+
"</if>"
+
"<if test = '"
+
NOTBLANK
+
"(form.resourcid)' >"
+
" and res.resourcid = #{form.resourcid} "
+
"</if>"
+
"<if test = '"
+
NOTBLANK
+
"(form.exampaperid)' >"
+
" and res.exampaperid = #{form.exampaperid} "
+
"</if>"
+
" eq(res.auto,form.auto)"
+
" order by createTime desc "
+
" </script>"
)
ExamRecord
getUserPracticeRecord
(
@Param
(
"form"
)
ExamRecord
form
);
@Select
(
"<script>"
+
" select * "
+
" from res_examrecord "
+
" where 1=1 "
+
" eq(stuId,form.stuId)"
+
" eq(resourcid,form.resourcid)"
+
" eq(exampaperid,form.exampaperid)"
+
" order by createTime desc "
+
" </script>"
)
List
<
ExamRecord
>
getUserRecord
(
@Param
(
"form"
)
FgSelectExamRecordForm
form
);
@Select
(
"<script>"
+
" select *"
+
" from (select * from res_examrecord where stuId = #{stuId} ORDER BY createTime DESC) des GROUP BY exampaperid"
+
" </script>"
)
List
<
ExamRecord
>
getSelectExamRecord
(
String
stuId
);
}
app/resource/src/main/java/com/zrqx/resource/fg/mapper/questionlibrary/FgQuestionLibraryMapper.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
mapper
.
questionlibrary
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.resource.commons.model.questionlibrary.QuestionLibrary
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
/**
* 试题库
*
* @author Jsx
* @version 1.0
* @date 2020/10/20 16:27
*/
public
interface
FgQuestionLibraryMapper
extends
BaseMapper
<
QuestionLibrary
>
{
@Select
(
"<script>"
+
" SELECT a.*"
+
" From res_question_library_diy_type diy"
+
" LEFT JOIN res_question_library a ON a.id = diy.qlid"
+
" WHERE 1=1"
+
" IN(diy.code,list)"
+
" order by createTime desc "
+
"</script>"
)
List
<
QuestionLibrary
>
getSelectQuestion
(
@Param
(
"list"
)
List
<
String
>
list
);
}
app/resource/src/main/java/com/zrqx/resource/fg/mapper/questionlibrary/FgResourcLibraryExampaperDiyTypeMapper.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
mapper
.
questionlibrary
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.resource.commons.form.fg.questionlibrary.FgSelectExamRecordForm
;
import
com.zrqx.resource.commons.model.questionlibrary.ResourcLibraryExampaerDiyType
;
import
com.zrqx.resource.commons.vo.fg.courselibrary.FgMyLearningListVo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
/**
* 资源与试卷关联
*
* @author Jsx
* @version 1.0
* @date 2020/10/27 10:16
*/
public
interface
FgResourcLibraryExampaperDiyTypeMapper
extends
BaseMapper
<
ResourcLibraryExampaerDiyType
>
{
@Select
(
"<script>"
+
" select * "
+
" from (SELECT * from res_resourc_library_exampaper_diy_type where 1=1 IN(resourcId,list1)) DE"
+
" where 1=1 "
+
" eq(exampaperId,form.exampaperid)"
+
" ORDER BY createTime DESC "
+
"</script>"
)
List
<
ResourcLibraryExampaerDiyType
>
getResourcLibrary
(
@Param
(
"list1"
)
List
<
String
>
list1
,
@Param
(
"form"
)
FgSelectExamRecordForm
form
);
}
app/resource/src/main/java/com/zrqx/resource/fg/mapper/videolibrary/FgVideoLibraryDiyTypeMapper.java
浏览文件 @
372cf9e7
...
...
@@ -2,6 +2,8 @@ package com.zrqx.resource.fg.mapper.videolibrary;
import
java.util.List
;
import
com.zrqx.resource.commons.form.fg.questionlibrary.FgSelectExamPaperForm
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
com.zrqx.core.mapper.BaseMapper
;
...
...
@@ -19,4 +21,14 @@ public interface FgVideoLibraryDiyTypeMapper extends BaseMapper<VideoLibraryDiyT
@Select
(
"select code from res_video_library_diy_type where vlid = #{oid}"
)
List
<
String
>
selectDiyCodesById
(
String
oid
);
@Select
(
"<script>"
+
" SELECT code"
+
" FROM (SELECT a.* FROM (SELECT * FROM res_video_library_diy_type"
+
" UNION SELECT * FROM res_course_library_diy_type) a "
+
" LEFT JOIN res_diy_type diy ON a.dtid = diy.id"
+
" WHERE 1=1 IN(a.vlid,list) GROUP BY a. CODE) e"
+
" WHERE 1=1 eq(CODE,form.typeCode)"
+
" </script>"
)
List
<
String
>
getDiyType
(
@Param
(
"list"
)
List
<
String
>
list
,
@Param
(
"form"
)
FgSelectExamPaperForm
form
);
}
app/resource/src/main/java/com/zrqx/resource/fg/service/questionlibray/FgExamPaperLibraryService.java
0 → 100644
浏览文件 @
372cf9e7
package
com
.
zrqx
.
resource
.
fg
.
service
.
questionlibray
;
import
com.zrqx.core.commons.model.resource.questionlibrary.ExamRecordInfo
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.resource.commons.form.fg.questionlibrary.FgSelectExamPaperForm
;
import
com.zrqx.resource.commons.form.fg.questionlibrary.FgSelectExamRecordForm
;
import
com.zrqx.resource.commons.form.fg.questionlibrary.FgSubmitExamRecordForm
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamPaperLibrary
;
import
com.zrqx.resource.commons.model.questionlibrary.ExamRecord
;
import
com.zrqx.resource.commons.vo.fg.questionlibrary.FgExamPaperInfoVo
;
import
com.zrqx.resource.commons.vo.fg.questionlibrary.FgSelectExamPaperVo
;
import
java.util.List
;
/**
* 习题
*
* @author Jsx
* @version 1.0
* @date 2020/10/19 16:36
*/
public
interface
FgExamPaperLibraryService
extends
BaseService
<
ExamPaperLibrary
,
Integer
>
{
/**
* 分页查询课程相关试卷列表
* @param pageParam
* @param form 课程或者系列课id
* @return 课程或者系列课相关试卷列表
* @author Jsx
* @date 2020/10/19 16:30
*/
PageInfo
<
ExamPaperLibrary
>
queryByPage
(
PageParam
pageParam
,
FgSelectExamRecordForm
form
);
/**
* 获取试卷关联的试题
* @param examRecordForm 试卷id
* @return 试卷相关试题列表
* @author Jsx
* @date 2020/10/20 15:01
*/
List
<
ExamRecordInfo
>
saveOrUpdateExamRecord
(
FgSelectExamRecordForm
examRecordForm
);
/**
* 获取该登录用户下res_examrecord表的答题测试记录
* @param
* @return
* @author Jsx
* @date 2020/10/23 9:31
*/
List
<
ExamRecord
>
getExamRecord
(
Integer
recordid
);
/**
* 获取该用户答题后的练习提的记录详情
* @param recordid 考试记录id
* @return 返回试卷中各试题的详情
* @author Jsx
* @date 2020/10/25 17:04
*/
List
<
ExamRecordInfo
>
getExamRecordInfo
(
Integer
recordid
);
/**
* 提交考试结果
* @param form [测试id 答案list]
* @return
* @author Jsx
* @date 2020/10/21 10:03
*/
Integer
updateExamRecordInfo
(
FgSubmitExamRecordForm
form
);
/**
* 计算练习结果
* @param recordId 测试记录id
* @return
* @author Jsx
* @date 2020/10/23 16:34
*/
ExamRecord
updateCheckExamRecord
(
Integer
recordId
);
/**
* 根据条件查询模拟练习试卷库列表
* @param pageParam 分页查询条件 form 查询条件
* @return 模拟练习试卷库列表
* @author Jsx
* @date 2020/10/26 15:56
*/
List
<
FgSelectExamPaperVo
>
getExamPaper
(
PageParam
pageParam
,
FgSelectExamPaperForm
form
);
/**
* 根据试卷id去判断用户是否有权限做题
* @param form 试卷id exampaperid
* @return 如果没有提示“暂无权限”,如果有返回试卷试题详情
* @author Jsx
* @date 2020/10/27 8:33
*/
List
<
ExamRecordInfo
>
simulatePractice
(
FgSelectExamRecordForm
form
);
/**
* 1.根据入参值分类code查询,用户的习题权限,如若没有提示“暂无权限” 如果有则则去组装相关试卷返回
* 2.选择全部会自动查询用户相关分类权限,选择单一分类则按单一分类试题组装试卷。
* @param form 分类code typeCode
* @return 如果没有提示“暂无权限”,如果有返回试卷试题详情
* @author Jsx
* @date 2020/10/27 13:57
*/
List
<
ExamRecordInfo
>
autoConnectQuestion
(
FgSelectExamPaperForm
form
);
}
app/resource/src/main/java/com/zrqx/resource/fg/service/questionlibray/FgExamPaperLibraryServiceImpl.java
0 → 100644
浏览文件 @
372cf9e7
差异被折叠。
点击展开。
core/src/main/java/com/zrqx/core/commons/model/resource/questionlibrary/ExamRecordInfo.java
浏览文件 @
372cf9e7
...
...
@@ -10,9 +10,11 @@ import javax.persistence.Table;
import
java.util.Date
;
/**
* 考试记录详细 ExamRecordInfo entity. @author MyEclipse Persistence Tools
* 考试记录详情
* @author Jsx
* @date 2020/10/21 11:05
* @version 1.0
*/
@Data
@ApiModel
(
value
=
"ExamRecordInfo"
,
description
=
"考试记录详细"
)
@Table
(
name
=
"res_examrecordinfo"
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论