From 4a0bb02708937007e1361c72c05e70f52e81cde2 Mon Sep 17 00:00:00 2001 From: lqy <3431632001@qq,com> Date: Fri, 4 Oct 2024 10:40:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=88=90=E7=BB=A9=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E3=80=81=E8=AF=95=E5=8D=B7=E3=80=81=E9=97=AE=E9=A2=98=E8=A1=A8?= =?UTF-8?q?=E3=80=81=E5=8D=95=E9=80=89=E9=A2=98=E9=80=89=E9=A1=B9=E3=80=81?= =?UTF-8?q?=E8=AF=84=E5=88=86=E9=A2=98=E8=A1=8C=E9=80=89=E9=A1=B9=E3=80=81?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E9=A2=98=E8=A1=8C=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../skyeye/eve/controller/ExamController.java | 8 +- .../main/java/com/skyeye/eve/dao/ExamDao.java | 2 +- .../com/skyeye/eve/service/ExamService.java | 2 +- .../eve/service/impl/ExamServiceImpl.java | 6 +- .../controller/ExamQuRadioController.java | 80 +++++++++++ .../exam/examQuRadio/dao/ExamQuRadioDao.java | 7 + .../exam/examQuRadio/entity/ExamQuRadio.java | 57 ++++++++ .../service/ExamQuRadioService.java | 12 ++ .../service/impl/ExamQuRadioServiceImpl.java | 49 +++++++ .../controller/ExamQuScoreController.java | 79 +++++++++++ .../exam/examQuScore/dao/ExamQuScoreDao.java | 7 + .../exam/examQuScore/entity/ExamQuScore.java | 43 ++++++ .../service/ExamQuScoreService.java | 12 ++ .../service/impl/ExamQuScoreServiceImpl.java | 49 +++++++ .../controller/ExamQuestionController.java | 77 ++++++++++ .../examQuestion/dao/ExamQuestionDao.java | 7 + .../examQuestion/entity/ExamQuestion.java | 131 ++++++++++++++++++ .../service/ExamQuestionService.java | 12 ++ .../service/impl/ExamQuestionServiceImpl.java | 46 ++++++ .../ExamQuestionLogicController.java | 9 ++ .../dao/ExamQuestionLogicDao.java | 7 + .../entity/ExamQuestionLogic.java | 62 +++++++++ .../service/ExamQuestionLogicService.java | 7 + .../impl/ExamQuestionLogicServiceImpl.java | 13 ++ .../ExamSurveyAnswerController.java | 79 +++++++++++ .../dao/ExamSurveyAnswerDao.java | 7 + .../entity/ExamSurveyAnswer.java | 102 ++++++++++++++ .../service/ExamSurveyAnswerService.java | 10 ++ .../impl/ExamSurveyAnswerServiceImpl.java | 29 ++++ .../controller/ExamSurveyClassController.java | 11 ++ .../dao/ExamSurveyClassDao.java | 7 + .../entity/ExamSurveyClass.java | 30 ++++ .../service/ExamSurveyClassService.java | 10 ++ .../impl/ExamSurveyClassServiceImpl.java | 20 +++ .../ExamSurveyDirectoryController.java | 93 +++++++++++++ .../dao/ExamSurveyDirectoryDao.java | 7 + .../entity/ExamSurveyDirectory.java | 95 +++++++++++++ .../service/ExamSurveyDirectoryService.java | 13 ++ .../impl/ExamSurveyDirectoryServiceImpl.java | 100 +++++++++++++ .../ExamSurveyMarkExamController.java | 9 ++ .../dao/ExamSurveyMarkExamDao.java | 7 + .../entity/ExamSurveyMarkExam.java | 24 ++++ .../service/ExamSurveyMarkExamService.java | 7 + .../impl/ExamSurveyMarkExamServiceImpl.java | 13 ++ .../ExamSurveyQuAnswerController.java | 9 ++ .../dao/ExamSurveyQuAnswerDao.java | 7 + .../entity/ExamSurveyQuAnswer.java | 28 ++++ .../service/ExamSurveyQuAnswerService.java | 7 + .../impl/ExamSurveyQuAnswerServiceImpl.java | 13 ++ ...eMapper.xml => ExamSurveyClassService.xml} | 0 ...mMapper.xml => ExamSurveyClassService.xml} | 14 +- ...mMapper.xml => ExamSurveyClassService.xml} | 0 .../score/contorller/ScoreController.java | 78 +++++++++++ .../com/skyeye/school/score/dao/ScoreDao.java | 8 ++ .../com/skyeye/school/score/entity/Score.java | 52 +++++++ .../school/score/service/ScoreService.java | 10 ++ .../score/service/impl/ScoreServiceImpl.java | 36 +++++ ...tMapper.xml => ExamSurveyClassService.xml} | 0 ...rMapper.xml => ExamSurveyClassService.xml} | 0 .../src/main/resources/bootstrap.yml | 4 +- 60 files changed, 1699 insertions(+), 24 deletions(-) create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/controller/ExamQuRadioController.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/dao/ExamQuRadioDao.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/entity/ExamQuRadio.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/service/ExamQuRadioService.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/service/impl/ExamQuRadioServiceImpl.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/controller/ExamQuScoreController.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/dao/ExamQuScoreDao.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/entity/ExamQuScore.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/service/ExamQuScoreService.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/service/impl/ExamQuScoreServiceImpl.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/controller/ExamQuestionController.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/dao/ExamQuestionDao.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/entity/ExamQuestion.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/service/ExamQuestionService.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/service/impl/ExamQuestionServiceImpl.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/controller/ExamQuestionLogicController.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/dao/ExamQuestionLogicDao.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/entity/ExamQuestionLogic.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/service/ExamQuestionLogicService.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/service/impl/ExamQuestionLogicServiceImpl.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/controller/ExamSurveyAnswerController.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/dao/ExamSurveyAnswerDao.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/entity/ExamSurveyAnswer.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/service/ExamSurveyAnswerService.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/service/impl/ExamSurveyAnswerServiceImpl.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/controller/ExamSurveyClassController.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/dao/ExamSurveyClassDao.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/entity/ExamSurveyClass.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/service/ExamSurveyClassService.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/service/impl/ExamSurveyClassServiceImpl.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/controller/ExamSurveyDirectoryController.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/dao/ExamSurveyDirectoryDao.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/entity/ExamSurveyDirectory.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/service/ExamSurveyDirectoryService.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/service/impl/ExamSurveyDirectoryServiceImpl.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/controller/ExamSurveyMarkExamController.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/dao/ExamSurveyMarkExamDao.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/entity/ExamSurveyMarkExam.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/service/ExamSurveyMarkExamService.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/service/impl/ExamSurveyMarkExamServiceImpl.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/controller/ExamSurveyQuAnswerController.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/dao/ExamSurveyQuAnswerDao.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/entity/ExamSurveyQuAnswer.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/service/ExamSurveyQuAnswerService.java create mode 100644 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/service/impl/ExamSurveyQuAnswerServiceImpl.java rename skyeye-school/school-exam/src/main/resources/mapper/{MatrixMultipleChoiceMapper.xml => ExamSurveyClassService.xml} (100%) rename skyeye-school/school-exam/src/main/resources/mapper/exam/{ExamMapper.xml => ExamSurveyClassService.xml} (99%) rename skyeye-school/school-phone/src/main/resources/mapper/schoolphone/{SchoolStuExamMapper.xml => ExamSurveyClassService.xml} (100%) create mode 100644 skyeye-school/school-pro/src/main/java/com/skyeye/school/score/contorller/ScoreController.java create mode 100644 skyeye-school/school-pro/src/main/java/com/skyeye/school/score/dao/ScoreDao.java create mode 100644 skyeye-school/school-pro/src/main/java/com/skyeye/school/score/entity/Score.java create mode 100644 skyeye-school/school-pro/src/main/java/com/skyeye/school/score/service/ScoreService.java create mode 100644 skyeye-school/school-pro/src/main/java/com/skyeye/school/score/service/impl/ScoreServiceImpl.java rename skyeye-school/school-pro/src/main/resources/mapper/announcement/{AnnouncementMapper.xml => ExamSurveyClassService.xml} (100%) rename skyeye-school/school-pro/src/main/resources/mapper/schoolauth/{SchoolTeacherMapper.xml => ExamSurveyClassService.xml} (100%) diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/eve/controller/ExamController.java b/skyeye-school/school-exam/src/main/java/com/skyeye/eve/controller/ExamController.java index 3b88722d..6f1580c2 100644 --- a/skyeye-school/school-exam/src/main/java/com/skyeye/eve/controller/ExamController.java +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/eve/controller/ExamController.java @@ -41,14 +41,14 @@ public class ExamController { /** * 新增试卷 - * - * @param inputObject 入参以及用户信息等获取对象 + * todo 获取当前年级所属的年份 + * @param inputObject 入参以及用户信息等获取对象. * @param outputObject 出参以及提示信息的返回值对象 */ - @RequestMapping("/post/ExamController/insertExamMation") + /* @RequestMapping("/post/ExamController/insertExamMation") public void insertExamMation(InputObject inputObject, OutputObject outputObject) { examService.insertExamMation(inputObject, outputObject); - } + }*/ /** * 获取试卷题目信息 diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/eve/dao/ExamDao.java b/skyeye-school/school-exam/src/main/java/com/skyeye/eve/dao/ExamDao.java index 67d71bfc..baf08a80 100644 --- a/skyeye-school/school-exam/src/main/java/com/skyeye/eve/dao/ExamDao.java +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/eve/dao/ExamDao.java @@ -235,7 +235,7 @@ public interface ExamDao { int updateExamMationEndById(Map map); - Map queryGradeNowYearByGradeId(Map map); +// Map queryGradeNowYearByGradeId(Map map); int insertExamClassMation(List> beans); diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/eve/service/ExamService.java b/skyeye-school/school-exam/src/main/java/com/skyeye/eve/service/ExamService.java index 49a652da..994217c5 100644 --- a/skyeye-school/school-exam/src/main/java/com/skyeye/eve/service/ExamService.java +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/eve/service/ExamService.java @@ -11,7 +11,7 @@ public interface ExamService { void queryExamList(InputObject inputObject, OutputObject outputObject); - void insertExamMation(InputObject inputObject, OutputObject outputObject); +// void insertExamMation(InputObject inputObject, OutputObject outputObject); void queryExamMationById(InputObject inputObject, OutputObject outputObject); diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/eve/service/impl/ExamServiceImpl.java b/skyeye-school/school-exam/src/main/java/com/skyeye/eve/service/impl/ExamServiceImpl.java index 9817dff8..0f009c1c 100644 --- a/skyeye-school/school-exam/src/main/java/com/skyeye/eve/service/impl/ExamServiceImpl.java +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/eve/service/impl/ExamServiceImpl.java @@ -80,11 +80,11 @@ public class ExamServiceImpl implements ExamService { /** * 新增试卷 - * + * todo 获取当前年级所属的年份 * @param inputObject 入参以及用户信息等获取对象 * @param outputObject 出参以及提示信息的返回值对象 */ - @Override + /* @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) public void insertExamMation(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); @@ -129,7 +129,7 @@ public class ExamServiceImpl implements ExamService { outputObject.setreturnMessage("该年级还未曾分班。"); } } - +*/ /** * 获取试卷题目信息 * diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/controller/ExamQuRadioController.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/controller/ExamQuRadioController.java new file mode 100644 index 00000000..1d36476c --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/controller/ExamQuRadioController.java @@ -0,0 +1,80 @@ +package com.skyeye.exam.examQuRadio.controller; + +import com.skyeye.annotation.api.Api; +import com.skyeye.annotation.api.ApiImplicitParam; +import com.skyeye.annotation.api.ApiImplicitParams; +import com.skyeye.annotation.api.ApiOperation; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examQuRadio.entity.ExamQuRadio; +import com.skyeye.exam.examQuRadio.service.ExamQuRadioService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Api(value = "单选题选项表管理", tags = "单选题选项表管理", modelName = "单选题选项表管理") +public class ExamQuRadioController { + + @Autowired + private ExamQuRadioService examQuRadioService; + + /** + * 新增或编辑单选题选项 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "exam010", value = "新增或编辑单选题选项", method = "POST", allUse = "2") + @ApiImplicitParams(classBean = ExamQuRadio.class) + @RequestMapping("/post/ExamQuRadioController/writeOrUpdateQuRadio") + public void writeOrUpdateQuRadio(InputObject inputObject, OutputObject outputObject) { + examQuRadioService.saveOrUpdateEntity(inputObject, outputObject); + } + + /** + * 根据id查询单项选择题选项信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "queryQuRadioById", value = "根据id查询单项选择题选项信息", method = "GET", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id", value = "单项选择题选项id", required = "required") + }) + @RequestMapping("/post/ExamQuRadioController/queryQuRadioById") + public void queryQuRadioById(InputObject inputObject, OutputObject outputObject) { + examQuRadioService.selectById(inputObject, outputObject); + } + + /** + * 根据id删除单项选择题选项信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "deleteQuRadioById", value = "根据id删除单项选择题选项信息", method = "POST", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id", value = "单项选择题选项id", required = "required") + }) + @RequestMapping("/post/ExamQuRadioController/deleteQuRadioById") + public void deleteQuRadioById(InputObject inputObject, OutputObject outputObject) { + examQuRadioService.deleteQuRadioById(inputObject, outputObject); + } + + /** + * 根据quId获取单项选择题选项列表信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "queryQuRadioListByQuId", value = "根据quId获取单项选择题选项列表信息", method = "POST", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "quId", name = "quId", value = "问题id", required = "required") + }) + @RequestMapping("/post/ExamQuRadioController/queryQuRadioListByQuId") + public void queryQuRadioListByQuId(InputObject inputObject, OutputObject outputObject) { + examQuRadioService.queryQuRadioListByQuId(inputObject, outputObject); + } + +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/dao/ExamQuRadioDao.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/dao/ExamQuRadioDao.java new file mode 100644 index 00000000..5107482f --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/dao/ExamQuRadioDao.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examQuRadio.dao; + +import com.skyeye.eve.dao.SkyeyeBaseMapper; +import com.skyeye.exam.examQuRadio.entity.ExamQuRadio; + +public interface ExamQuRadioDao extends SkyeyeBaseMapper { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/entity/ExamQuRadio.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/entity/ExamQuRadio.java new file mode 100644 index 00000000..425734cf --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/entity/ExamQuRadio.java @@ -0,0 +1,57 @@ +package com.skyeye.exam.examQuRadio.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.annotation.cache.RedisCacheField; +import com.skyeye.common.entity.features.OperatorUserInfo; +import lombok.Data; + +@Data +@RedisCacheField(name = "exam:radio") +@TableName(value = "exam_qu_radio") +@ApiModel("单选题选项表实体类") +public class ExamQuRadio extends OperatorUserInfo { + + @TableId("id") + @ApiModelProperty(value = "主键id。为空时新增,不为空时编辑") + private String id; + + @TableField("qu_id") + @ApiModelProperty(value = "所属题", required = "required") + private String quId; + + @TableField("option_name") + @ApiModelProperty(value = "选项内容", required = "required") + private String optionName; + + @TableField("option_title") + @ApiModelProperty(value = "选项标题") + private String optionTitle; + + @TableField("check_type") + @ApiModelProperty(value = "说明的验证方式") + private Integer checkType; + + @TableField("is_note") + @ApiModelProperty(value = "是否带说明 0否 1是") + private Integer isNote; + + @TableField("is_required_fill") + @ApiModelProperty(value = "说明内容是否必填 0非必填 1必填", required = "required") + private Integer isRequiredFill; + + @TableField("order_by_id") + @ApiModelProperty(value = "排序ID", required = "required") + private Integer orderById; + + @TableField("visibility") + @ApiModelProperty(value = "是否显示 0不显示 1显示", required = "required") + private Integer visibility; + + @TableField("is_default_answer") + @ApiModelProperty(value = "是否是默认答案 1.是 2.否") + private Integer isDefaultAnswer; +} \ No newline at end of file diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/service/ExamQuRadioService.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/service/ExamQuRadioService.java new file mode 100644 index 00000000..2e31985f --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/service/ExamQuRadioService.java @@ -0,0 +1,12 @@ +package com.skyeye.exam.examQuRadio.service; + +import com.skyeye.base.business.service.SkyeyeBusinessService; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examQuRadio.entity.ExamQuRadio; + +public interface ExamQuRadioService extends SkyeyeBusinessService { + void deleteQuRadioById(InputObject inputObject, OutputObject outputObject); + + void queryQuRadioListByQuId(InputObject inputObject, OutputObject outputObject); +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/service/impl/ExamQuRadioServiceImpl.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/service/impl/ExamQuRadioServiceImpl.java new file mode 100644 index 00000000..e828e0cb --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuRadio/service/impl/ExamQuRadioServiceImpl.java @@ -0,0 +1,49 @@ +package com.skyeye.exam.examQuRadio.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.skyeye.annotation.service.SkyeyeService; +import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.common.constans.CommonNumConstants; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examQuRadio.dao.ExamQuRadioDao; +import com.skyeye.exam.examQuRadio.entity.ExamQuRadio; +import com.skyeye.exam.examQuRadio.service.ExamQuRadioService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +@SkyeyeService(name = "单选题选项表管理", groupName = "单选题选项表管理") +public class ExamQuRadioServiceImpl extends SkyeyeBusinessServiceImpl implements ExamQuRadioService { + + @Autowired + private ExamQuRadioService examQuRadioService; + + @Override + public void deleteQuRadioById(InputObject inputObject, OutputObject outputObject) { + Map map = inputObject.getParams(); + String id = map.get("id").toString(); + ExamQuRadio examQuRadio = selectById(id); + examQuRadio.setVisibility(CommonNumConstants.NUM_ZERO); + updateById(examQuRadio); + refreshCache(id); + } + + @Override + public void queryQuRadioListByQuId(InputObject inputObject, OutputObject outputObject) { + Map map = inputObject.getParams(); + String quId = map.get("quId").toString(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ExamQuRadio::getQuId, quId); + List list = examQuRadioService.list(queryWrapper); + List bean = list.stream() + .filter(visibility -> visibility.getVisibility() == CommonNumConstants.NUM_ONE) + .collect(Collectors.toList()); + outputObject.setBeans(bean); + outputObject.settotal(bean.size()); + } +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/controller/ExamQuScoreController.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/controller/ExamQuScoreController.java new file mode 100644 index 00000000..46694487 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/controller/ExamQuScoreController.java @@ -0,0 +1,79 @@ +package com.skyeye.exam.examQuScore.controller; + +import com.skyeye.annotation.api.Api; +import com.skyeye.annotation.api.ApiImplicitParam; +import com.skyeye.annotation.api.ApiImplicitParams; +import com.skyeye.annotation.api.ApiOperation; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examQuScore.entity.ExamQuScore; +import com.skyeye.exam.examQuScore.service.ExamQuScoreService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Api(value = "评分题行选项管理", tags = "评分题行选项管理", modelName = "评分题行选项管理") +public class ExamQuScoreController { + + @Autowired + private ExamQuScoreService examQuScoreService; + + /** + * 新增或编辑评分题行选项 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "writeOrUpdateQuScore", value = "新增或编辑评分题行选项", method = "POST", allUse = "2") + @ApiImplicitParams(classBean = ExamQuScore.class) + @RequestMapping("/post/ExamQuScoreController/writeOrUpdateQuScore") + public void writeOrUpdateQuScore(InputObject inputObject, OutputObject outputObject) { + examQuScoreService.saveOrUpdateEntity(inputObject, outputObject); + } + + /** + * 根据id查询评分题行选项信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "queryQuScoreById", value = "根据id查询评分题行选项信息", method = "GET", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id", value = "评分题行选项id", required = "required") + }) + @RequestMapping("/post/ExamQuScoreController/queryQuScoreById") + public void queryQuScoreById(InputObject inputObject, OutputObject outputObject) { + examQuScoreService.selectById(inputObject, outputObject); + } + + /** + * 根据id删除评分题行选项信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "deleteQuRadioById", value = "根据id删除评分题行选项信息", method = "POST", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id", value = "评分题行选项id", required = "required") + }) + @RequestMapping("/post/ExamQuScoreController/deleteQuScoreById") + public void deleteQuScoreById(InputObject inputObject, OutputObject outputObject) { + examQuScoreService.deleteQuScoreById(inputObject, outputObject); + } + + /** + * 根据quId获取评分题行选项列表信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "queryQuScoreListByQuId", value = "根据quId获取评分题行选项列表信息", method = "POST", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "quId", name = "quId", value = "问题id", required = "required") + }) + @RequestMapping("/post/ExamQuScoreController/queryQuScoreListByQuId") + public void queryQuScoreListByQuId(InputObject inputObject, OutputObject outputObject) { + examQuScoreService.queryQuScoreListByQuId(inputObject, outputObject); + } +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/dao/ExamQuScoreDao.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/dao/ExamQuScoreDao.java new file mode 100644 index 00000000..2b32197c --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/dao/ExamQuScoreDao.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examQuScore.dao; + +import com.skyeye.eve.dao.SkyeyeBaseMapper; +import com.skyeye.exam.examQuScore.entity.ExamQuScore; + +public interface ExamQuScoreDao extends SkyeyeBaseMapper { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/entity/ExamQuScore.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/entity/ExamQuScore.java new file mode 100644 index 00000000..aaac8869 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/entity/ExamQuScore.java @@ -0,0 +1,43 @@ +package com.skyeye.exam.examQuScore.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.annotation.cache.RedisCacheField; +import com.skyeye.common.entity.CommonInfo; +import com.skyeye.common.entity.features.BaseGeneralInfo; +import com.skyeye.common.entity.features.OperatorUserInfo; +import lombok.Data; + +@Data +@RedisCacheField(name = "exam:score") +@TableName(value = "exam_qu_score") +@ApiModel("评分题行选项实体类") +public class ExamQuScore extends OperatorUserInfo { + + @TableId("id") + @ApiModelProperty(value = "主键id。为空时新增,不为空时编辑") + private String id; + + @TableField("qu_id") + @ApiModelProperty(value = "所属题", required = "required") + private String quId; + + @TableField("option_name") + @ApiModelProperty(value = "选项内容", required = "required") + private String optionName; + + @TableField("option_title") + @ApiModelProperty(value = "标识") + private String optionTitle; + + @TableField("order_by_id") + @ApiModelProperty(value = "排序号", required = "required") + private Integer orderById; + + @TableField("visibility") + @ApiModelProperty(value = "是否显示 0不显示 1显示", required = "required") + private Integer visibility; +} \ No newline at end of file diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/service/ExamQuScoreService.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/service/ExamQuScoreService.java new file mode 100644 index 00000000..dfd4d0a9 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/service/ExamQuScoreService.java @@ -0,0 +1,12 @@ +package com.skyeye.exam.examQuScore.service; + +import com.skyeye.base.business.service.SkyeyeBusinessService; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examQuScore.entity.ExamQuScore; + +public interface ExamQuScoreService extends SkyeyeBusinessService { + void deleteQuScoreById(InputObject inputObject, OutputObject outputObject); + + void queryQuScoreListByQuId(InputObject inputObject, OutputObject outputObject); +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/service/impl/ExamQuScoreServiceImpl.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/service/impl/ExamQuScoreServiceImpl.java new file mode 100644 index 00000000..c547704b --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore/service/impl/ExamQuScoreServiceImpl.java @@ -0,0 +1,49 @@ +package com.skyeye.exam.examQuScore.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.skyeye.annotation.service.SkyeyeService; +import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.common.constans.CommonNumConstants; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examQuScore.dao.ExamQuScoreDao; +import com.skyeye.exam.examQuScore.entity.ExamQuScore; +import com.skyeye.exam.examQuScore.service.ExamQuScoreService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +@SkyeyeService(name = "评分题行选项管理", groupName = "评分题行选项管理") +public class ExamQuScoreServiceImpl extends SkyeyeBusinessServiceImpl implements ExamQuScoreService { + + @Autowired + private ExamQuScoreService examQuScoreService; + + @Override + public void deleteQuScoreById(InputObject inputObject, OutputObject outputObject) { + Map map = inputObject.getParams(); + String id = map.get("id").toString(); + ExamQuScore examQuScore = selectById(id); + examQuScore.setVisibility(CommonNumConstants.NUM_ZERO); + updateById(examQuScore); + refreshCache(id); + } + + @Override + public void queryQuScoreListByQuId(InputObject inputObject, OutputObject outputObject) { + Map map = inputObject.getParams(); + String quId = map.get("quId").toString(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ExamQuScore::getQuId, quId); + List list = examQuScoreService.list(queryWrapper); + List bean = list.stream() + .filter(visibility -> visibility.getVisibility() == CommonNumConstants.NUM_ONE) + .collect(Collectors.toList()); + outputObject.setBeans(bean); + outputObject.settotal(bean.size()); + } +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/controller/ExamQuestionController.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/controller/ExamQuestionController.java new file mode 100644 index 00000000..6a2f5e2b --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/controller/ExamQuestionController.java @@ -0,0 +1,77 @@ +package com.skyeye.exam.examQuestion.controller; + +import com.skyeye.annotation.api.Api; +import com.skyeye.annotation.api.ApiImplicitParam; +import com.skyeye.annotation.api.ApiImplicitParams; +import com.skyeye.annotation.api.ApiOperation; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examQuestion.entity.ExamQuestion; +import com.skyeye.exam.examQuestion.service.ExamQuestionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Api(value = "问题表管理", tags = "问题表管理", modelName = "问题表管理") +public class ExamQuestionController { + + @Autowired + private ExamQuestionService examQuestionService; + + /** + * 新增或编辑问题 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "writeOrUpdateQuestions", value = "新增或编辑问题", method = "POST", allUse = "2") + @ApiImplicitParams(classBean = ExamQuestion.class) + @RequestMapping("/post/ExamQuestionController/writeOrUpdateQuestions") + public void writeOrUpdateQuestions(InputObject inputObject, OutputObject outputObject) { + examQuestionService.saveOrUpdateEntity(inputObject, outputObject); + } + + /** + * 根据id获取问题信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "queryQuestionById", value = "新增问题", method = "POST", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id",value = "问题id",required = "required") + }) + @RequestMapping("/post/ExamQuestionController/queryQuestionById") + public void queryQuestionById(InputObject inputObject, OutputObject outputObject) { + examQuestionService.selectById(inputObject, outputObject); + } + + /** + * 获取所有问题信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "queryQuestionsList", value = "获取所有问题信息", method = "POST", allUse = "2") + @RequestMapping("/post/ExamQuestionController/queryQuestionsPageList") + public void queryQuestionsList(InputObject inputObject, OutputObject outputObject) { + examQuestionService.queryQuestionsList(inputObject, outputObject); + } + + /** + * 根据id删除问题信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "exam015", value = "新增问题", method = "POST", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id",value = "问题id",required = "required") + }) + @RequestMapping("/post/ExamQuestionController/deleteQuestionById") + public void deleteQuestionById(InputObject inputObject, OutputObject outputObject) { + examQuestionService.deleteQuestionById(inputObject, outputObject); + } + +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/dao/ExamQuestionDao.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/dao/ExamQuestionDao.java new file mode 100644 index 00000000..83a0ce53 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/dao/ExamQuestionDao.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examQuestion.dao; + +import com.skyeye.eve.dao.SkyeyeBaseMapper; +import com.skyeye.exam.examQuestion.entity.ExamQuestion; + +public interface ExamQuestionDao extends SkyeyeBaseMapper { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/entity/ExamQuestion.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/entity/ExamQuestion.java new file mode 100644 index 00000000..99ed4b61 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/entity/ExamQuestion.java @@ -0,0 +1,131 @@ +package com.skyeye.exam.examQuestion.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.annotation.cache.RedisCacheField; +import com.skyeye.common.entity.features.OperatorUserInfo; +import lombok.Data; + +import javax.xml.soap.Text; + +@Data +@RedisCacheField(name = "exam:question") +@TableName(value = "exam_question") +@ApiModel("问题表实体类") +public class ExamQuestion extends OperatorUserInfo { + + @TableId("id") + @ApiModelProperty(value = "主键id。为空时新增,不为空时编辑") + private String id; + + @TableField("qu_title") + @ApiModelProperty(value = "题目名称", required = "required") + private String quTitle; + + @TableField("qu_tag") + @ApiModelProperty(value = "是否是大小题 1默认题 2大题 3大题下面的小题", required = "required") + private Integer quTag; + + @TableField("qu_type") + @ApiModelProperty(value = "题目类型", required = "required") + private Integer quType; + + @TableField("answer_input_row") + @ApiModelProperty(value = "填空的input行") + private Integer answerInputRow; + + @TableField("answer_input_width") + @ApiModelProperty(value = "填空的input宽度") + private Integer answerInputWidth; + + @TableField("belong_id") + @ApiModelProperty(value = "所属问卷或题库", required = "required") + private String belongId; + + @TableField("cell_count") + @ApiModelProperty(value = "按列显示时,列数", required = "required") + private Integer cellCount; + + @TableField("check_type") + @ApiModelProperty(value = "说明的验证方式") + private Integer checkType; + + @TableField("contacts_attr") + @ApiModelProperty(value = "1关联到联系人属性 0不关联到联系人属性") + private Integer contactsAttr; + + @TableField("contacts_field") + @ApiModelProperty(value = "关联的联系人字段") + private String contactsField; + + @TableField("copy_from_id") + @ApiModelProperty(value = "如果是复制的题,则有复制于那一题") + private String copyFromId; + + @TableField("hv") + @ApiModelProperty(value = "1水平显示 2垂直显示", required = "required") + private Integer hv; + + @TableField("order_by_id") + @ApiModelProperty(value = "排序ID") + private Integer orderById; + + @TableField("param_int01") + @ApiModelProperty(value = "枚举题 枚举项数目 ,评分题起始分值") + private Integer paramInt01; + + @TableField("param_int02") + @ApiModelProperty(value = "评分题,最大分值") + private Integer paramInt02; + + @TableField("parent_qu_id") + @ApiModelProperty(value = "所属大题 只有小题才有此属性 即quTag=3的题") + private String parentQuId; + + @TableField("rand_order") + @ApiModelProperty(value = "选项随机排列 1随机排列 0不随机排列", required = "required") + private Integer randOrder; + + @TableField("tag") + @ApiModelProperty(value = "标记 1题库中的题 2试卷中的题") + private Integer tag; + + @TableField("visibility") + @ApiModelProperty(value = "是否显示 0不显示 1显示 ", required = "required") + private Integer visibility; + + @TableField("yesno_option") + @ApiModelProperty(value = "是非题的选项") + private Integer yesnoOption; + + @TableField("fraction") + @ApiModelProperty(value = "每道题的分数,不能小于1") + private Integer fraction; + + @TableField("knowledge_ids") + @ApiModelProperty(value = "知识点id字符串,逗号隔开") + private String knowledgeIds; + + @TableField("file_url") + @ApiModelProperty(value = "该题目包含的视频,音频,图片等的文件所在路径") + private String fileUrl; + + @TableField("file_type") + @ApiModelProperty(value = "试题类型,0.默认没有,1.视频,2.音频,3.图片", required = "required") + private Integer fileType; + + @TableField("whether_upload") + @ApiModelProperty(value = "是否允许拍照/上传图片选中,1.是,2.否", required = "required") + private Integer whetherUpload; + + @TableField("is_default_answer") + @ApiModelProperty(value = "填空题默认答案") + private String isDefaultAnswer; + + @TableField("is_delete") + @ApiModelProperty(value = "0表示问题已经删除,1.表示未删除,默认为1") + private Integer isDelete; +} \ No newline at end of file diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/service/ExamQuestionService.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/service/ExamQuestionService.java new file mode 100644 index 00000000..6d6d7bee --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/service/ExamQuestionService.java @@ -0,0 +1,12 @@ +package com.skyeye.exam.examQuestion.service; + +import com.skyeye.base.business.service.SkyeyeBusinessService; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examQuestion.entity.ExamQuestion; + +public interface ExamQuestionService extends SkyeyeBusinessService { + void deleteQuestionById(InputObject inputObject, OutputObject outputObject); + + void queryQuestionsList(InputObject inputObject, OutputObject outputObject); +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/service/impl/ExamQuestionServiceImpl.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/service/impl/ExamQuestionServiceImpl.java new file mode 100644 index 00000000..995289ef --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestion/service/impl/ExamQuestionServiceImpl.java @@ -0,0 +1,46 @@ +package com.skyeye.exam.examQuestion.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.skyeye.annotation.service.SkyeyeService; +import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.common.constans.CommonNumConstants; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examQuestion.dao.ExamQuestionDao; +import com.skyeye.exam.examQuestion.entity.ExamQuestion; +import com.skyeye.exam.examQuestion.service.ExamQuestionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +@SkyeyeService(name = "问题表管理", groupName = "问题表管理") +public class ExamQuestionServiceImpl extends SkyeyeBusinessServiceImpl implements ExamQuestionService { + + @Autowired + private ExamQuestionService examQuestionService; + + @Override + public void deleteQuestionById(InputObject inputObject, OutputObject outputObject) { + Map map = inputObject.getParams(); + String questionId = map.get("id").toString(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper(); + queryWrapper.eq(ExamQuestion::getId,questionId); + ExamQuestion examQuestion = examQuestionService.getOne(queryWrapper); + // 设置问题isDelete = 0 表示已经删除 + examQuestion.setIsDelete(CommonNumConstants.NUM_ZERO); + examQuestionService.updateById(examQuestion); + refreshCache(questionId); + } + + @Override + public void queryQuestionsList(InputObject inputObject, OutputObject outputObject) { + List examQuestionList = queryAllData(); + List bean = examQuestionList.stream().filter(isDelete -> isDelete.getIsDelete() == CommonNumConstants.NUM_ONE).collect(Collectors.toList()); + outputObject.setBeans(bean); + outputObject.settotal(bean.size()); + } +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/controller/ExamQuestionLogicController.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/controller/ExamQuestionLogicController.java new file mode 100644 index 00000000..2b00645c --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/controller/ExamQuestionLogicController.java @@ -0,0 +1,9 @@ +package com.skyeye.exam.examQuestionLogic.controller; + +import com.skyeye.annotation.api.Api; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Api(value = "题目逻辑设置管理", tags = "题目逻辑设置管理", modelName = "题目逻辑设置管理") +public class ExamQuestionLogicController { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/dao/ExamQuestionLogicDao.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/dao/ExamQuestionLogicDao.java new file mode 100644 index 00000000..b819d6c9 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/dao/ExamQuestionLogicDao.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examQuestionLogic.dao; + +import com.skyeye.eve.dao.SkyeyeBaseMapper; +import com.skyeye.exam.examQuestionLogic.entity.ExamQuestionLogic; + +public interface ExamQuestionLogicDao extends SkyeyeBaseMapper { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/entity/ExamQuestionLogic.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/entity/ExamQuestionLogic.java new file mode 100644 index 00000000..be83dfe4 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/entity/ExamQuestionLogic.java @@ -0,0 +1,62 @@ +package com.skyeye.exam.examQuestionLogic.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.annotation.cache.RedisCacheField; +import com.skyeye.common.entity.CommonInfo; +import com.skyeye.common.entity.features.BaseGeneralInfo; +import lombok.Data; + +@Data +@RedisCacheField(name = "exam:questionlogic") +@TableName(value = "exam_question_logic") +@ApiModel("题目逻辑设置实体类") +public class ExamQuestionLogic extends CommonInfo { + + @TableId("id") + @ApiModelProperty(value = "主键id。为空时新增,不为空时编辑") + private String id; + + @TableField("title") + @ApiModelProperty(value = "标题") + private String title; + + @TableField("cg_qu_item_id") + @ApiModelProperty(value = "回答选择题的选项ID (0任意选项)", required = "required") + private Long cgQuItemId; + + @TableField("ck_qu_id") + @ApiModelProperty(value = "回答选择的题ID", required = "required") + private String ckQuId; + + @TableField("ge_le") + @ApiModelProperty(value = "评分题 ge大于,le小于") + private String geLe; + + @TableField("logic_type") + @ApiModelProperty(value = "逻辑类型 (1=跳转,2显示)", required = "required") + private Integer logicType; + + @TableField("score_num") + @ApiModelProperty(value = "分数") + private Integer scoreNum; + + @TableField("sk_qu_id") + @ApiModelProperty(value = "要跳转的题 (end1提前结束-计入结果 end2提前结束-不计结果)", required = "required") + private String skQuId; + + @TableField("visibility") + @ApiModelProperty(value = "是否显示 1显示 0不显示", required = "required") + private Integer visibility; + + @TableField("create_id") + @ApiModelProperty(value = "创建人", required = "required") + private String createId; + + @TableField("create_time") + @ApiModelProperty(value = "创建时间", required = "required") + private Data createTime; +} \ No newline at end of file diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/service/ExamQuestionLogicService.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/service/ExamQuestionLogicService.java new file mode 100644 index 00000000..ba4cd418 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/service/ExamQuestionLogicService.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examQuestionLogic.service; + +import com.skyeye.base.business.service.SkyeyeBusinessService; +import com.skyeye.exam.examQuestionLogic.entity.ExamQuestionLogic; + +public interface ExamQuestionLogicService extends SkyeyeBusinessService { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/service/impl/ExamQuestionLogicServiceImpl.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/service/impl/ExamQuestionLogicServiceImpl.java new file mode 100644 index 00000000..5a2257a9 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuestionLogic/service/impl/ExamQuestionLogicServiceImpl.java @@ -0,0 +1,13 @@ +package com.skyeye.exam.examQuestionLogic.service.impl; + +import com.skyeye.annotation.service.SkyeyeService; +import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.exam.examQuestionLogic.dao.ExamQuestionLogicDao; +import com.skyeye.exam.examQuestionLogic.entity.ExamQuestionLogic; +import com.skyeye.exam.examQuestionLogic.service.ExamQuestionLogicService; +import org.springframework.stereotype.Service; + +@Service +@SkyeyeService(name = "题目逻辑设置管理", groupName = "题目逻辑设置管理") +public class ExamQuestionLogicServiceImpl extends SkyeyeBusinessServiceImpl implements ExamQuestionLogicService { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/controller/ExamSurveyAnswerController.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/controller/ExamSurveyAnswerController.java new file mode 100644 index 00000000..04009ee1 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/controller/ExamSurveyAnswerController.java @@ -0,0 +1,79 @@ +package com.skyeye.exam.examSurveyAnswer.controller; + +import com.skyeye.annotation.api.Api; +import com.skyeye.annotation.api.ApiImplicitParam; +import com.skyeye.annotation.api.ApiImplicitParams; +import com.skyeye.annotation.api.ApiOperation; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examSurveyAnswer.entity.ExamSurveyAnswer; +import com.skyeye.exam.examSurveyAnswer.service.ExamSurveyAnswerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Api(value = "试卷回答信息表管理", tags = "试卷回答信息表管理", modelName = "试卷回答信息表管理") +public class ExamSurveyAnswerController { + + @Autowired + private ExamSurveyAnswerService examSurveyAnswerService; + + /** + * 新增试卷回答信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "writeExamSurveyAnswer", value = "新增试卷回答信息", method = "POST", allUse = "2") + @ApiImplicitParams(classBean = ExamSurveyAnswer.class) + @RequestMapping("/post/ExamSurveyAnswerController/writeExamSurveyAnswer") + public void writeExamSurveyAnswer(InputObject inputObject, OutputObject outputObject) { + examSurveyAnswerService.createEntity(inputObject, outputObject); + } + + + /** + * 根据ID删除试卷回答信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "deleteSurveyAnswerById", value = "根据ID删除试卷回答信息", method = "DELETE", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")}) + @RequestMapping("/post/ExamSurveyAnswerController/deleteSurveyAnswerById") + public void deleteSurveyAnswerById(InputObject inputObject, OutputObject outputObject) { + examSurveyAnswerService.deleteById(inputObject, outputObject); + } + + /** + * 根据ID获取试卷回答信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "querySurveyAnswerById", value = "根据ID获取试卷回答信息", method = "GET", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")}) + @RequestMapping("/post/ExamSurveyAnswerController/querySurveyAnswerById") + public void querySurveyAnswerById(InputObject inputObject, OutputObject outputObject) { + examSurveyAnswerService.selectById(inputObject, outputObject); + } + + /** + * 根据createId获取my试卷回答信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "queryMySurveyAnswerList", value = "根据createId获取my试卷回答信息", method = "POST", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "createId", name = "createId", value = "回答人的id", required = "required")}) + @RequestMapping("/post/ExamSurveyAnswerController/queryMySurveyAnswerList") + public void queryMySurveyAnswerList(InputObject inputObject, OutputObject outputObject) { + examSurveyAnswerService.queryMySurveyAnswerList(inputObject, outputObject); + } + + +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/dao/ExamSurveyAnswerDao.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/dao/ExamSurveyAnswerDao.java new file mode 100644 index 00000000..69e4952a --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/dao/ExamSurveyAnswerDao.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examSurveyAnswer.dao; + +import com.skyeye.eve.dao.SkyeyeBaseMapper; +import com.skyeye.exam.examSurveyAnswer.entity.ExamSurveyAnswer; + +public interface ExamSurveyAnswerDao extends SkyeyeBaseMapper { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/entity/ExamSurveyAnswer.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/entity/ExamSurveyAnswer.java new file mode 100644 index 00000000..81fb178e --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/entity/ExamSurveyAnswer.java @@ -0,0 +1,102 @@ +package com.skyeye.exam.examSurveyAnswer.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.annotation.cache.RedisCacheField; +import com.skyeye.common.entity.CommonInfo; +import com.skyeye.common.entity.features.BaseGeneralInfo; +import lombok.Data; + +@Data +@RedisCacheField(name = "exam:answer") +@TableName(value = "exam_survey_answer") +@ApiModel("试卷回答信息表实体类") +public class ExamSurveyAnswer extends CommonInfo { + + @TableId("id") + @ApiModelProperty(value = "主键id。为空时新增,不为空时编辑") + private String id; + + @TableField("survey_id") + @ApiModelProperty(value = "问卷ID", required = "required") + private String surveyId; + + @TableField("bg_an_date") + @ApiModelProperty(value = "回答开始时间", required = "required") + private Data bg_an_date; + + @TableField("end_an_date") + @ApiModelProperty(value = "回答结束时间", required = "required") + private Data end_an_date; + + @TableField("complete_num") + @ApiModelProperty(value = "回答的题数") + private Integer complete_num; + + @TableField("complete_item_num") + @ApiModelProperty(value = "回答的题项目数 ---- 表示有些题下面会有多重回答") + private Integer complete_item_num; + + @TableField("data_source") + @ApiModelProperty(value = "数据来源 0网调 1录入数据 2移动数据 3导入数据", required = "required") + private Integer data_source; + + @TableField("handle_state") + @ApiModelProperty(value = "审核状态 0未处理 1通过 2不通过", required = "required") + private Integer handle_state; + + @TableField("ip_addr") + @ApiModelProperty(value = "回答者IP") + private String ip_addr; + + @TableField("addr") + @ApiModelProperty(value = "回答者是详细地址") + private String addr; + + @TableField("city") + @ApiModelProperty(value = "回答者城市 ") + private String city; + + @TableField("is_complete") + @ApiModelProperty(value = "是否完成 1完成 0未完成", required = "required") + private Integer is_complete; + + @TableField("is_effective") + @ApiModelProperty(value = "是否是有效数据 1有效 0无效", required = "required") + private Integer is_effective; + + @TableField("qu_num") + @ApiModelProperty(value = "回答的题数", required = "required") + private Integer qu_num; + + @TableField("total_time") + @ApiModelProperty(value = "用时", required = "required") + private Float total_time; + + @TableField("create_id") + @ApiModelProperty(value = "学生ID", required = "required") + private String create_id; + + @TableField("state") + @ApiModelProperty(value = "教师是否阅卷 1.否 2.是", required = "required") + private Integer state; + + @TableField("mark_fraction") + @ApiModelProperty(value = "最后得分") + private Integer mark_fraction; + + @TableField("mark_people") + @ApiModelProperty(value = "阅卷人") + private String mark_people; + + @TableField("mark_start_time") + @ApiModelProperty(value = "开始阅卷时间") + private Data mark_start_time; + + @TableField("mark_end_time") + @ApiModelProperty(value = "结束阅卷时间") + private Data mark_end_time; +} \ No newline at end of file diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/service/ExamSurveyAnswerService.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/service/ExamSurveyAnswerService.java new file mode 100644 index 00000000..137b0023 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/service/ExamSurveyAnswerService.java @@ -0,0 +1,10 @@ +package com.skyeye.exam.examSurveyAnswer.service; + +import com.skyeye.base.business.service.SkyeyeBusinessService; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examSurveyAnswer.entity.ExamSurveyAnswer; + +public interface ExamSurveyAnswerService extends SkyeyeBusinessService { + void queryMySurveyAnswerList(InputObject inputObject, OutputObject outputObject); +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/service/impl/ExamSurveyAnswerServiceImpl.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/service/impl/ExamSurveyAnswerServiceImpl.java new file mode 100644 index 00000000..8ebbfeb5 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyAnswer/service/impl/ExamSurveyAnswerServiceImpl.java @@ -0,0 +1,29 @@ +package com.skyeye.exam.examSurveyAnswer.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.skyeye.annotation.service.SkyeyeService; +import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examSurveyAnswer.dao.ExamSurveyAnswerDao; +import com.skyeye.exam.examSurveyAnswer.entity.ExamSurveyAnswer; +import com.skyeye.exam.examSurveyAnswer.service.ExamSurveyAnswerService; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +@Service +@SkyeyeService(name = "试卷回答信息表管理", groupName = "试卷回答信息表管理") +public class ExamSurveyAnswerServiceImpl extends SkyeyeBusinessServiceImpl implements ExamSurveyAnswerService { + @Override + public void queryMySurveyAnswerList(InputObject inputObject, OutputObject outputObject) { + Map map = inputObject.getParams(); + String createId = (String) map.get("createId"); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("create_id", createId); + List list = list(queryWrapper); + outputObject.setBeans(list); + outputObject.settotal(list.size()); + } +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/controller/ExamSurveyClassController.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/controller/ExamSurveyClassController.java new file mode 100644 index 00000000..01c90cb7 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/controller/ExamSurveyClassController.java @@ -0,0 +1,11 @@ +package com.skyeye.exam.examSurveyClass.controller; + +import com.skyeye.annotation.api.Api; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Api(value = "试卷与班级关系表管理", tags = "试卷与班级关系表管理", modelName = "试卷与班级关系表管理") +public class ExamSurveyClassController { + + +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/dao/ExamSurveyClassDao.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/dao/ExamSurveyClassDao.java new file mode 100644 index 00000000..426c9f89 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/dao/ExamSurveyClassDao.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examSurveyClass.dao; + +import com.skyeye.eve.dao.SkyeyeBaseMapper; +import com.skyeye.exam.examSurveyClass.entity.ExamSurveyClass; + +public interface ExamSurveyClassDao extends SkyeyeBaseMapper { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/entity/ExamSurveyClass.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/entity/ExamSurveyClass.java new file mode 100644 index 00000000..3b043fa6 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/entity/ExamSurveyClass.java @@ -0,0 +1,30 @@ +package com.skyeye.exam.examSurveyClass.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.annotation.cache.RedisCacheField; +import com.skyeye.common.entity.CommonInfo; +import com.skyeye.common.entity.features.BaseGeneralInfo; +import lombok.Data; + +@Data +@RedisCacheField(name = "exam:class") +@TableName(value = "exam_survey_class") +@ApiModel("试卷与班级关系表实体类") +public class ExamSurveyClass extends CommonInfo { + + @TableId("id") + @ApiModelProperty(value = "主键id。为空时新增,不为空时编辑") + private String id; + + @TableField("class_id") + @ApiModelProperty(value = "班级id", required = "required") + private String classId; + + @TableField("exam_survey_id") + @ApiModelProperty(value = "试卷id", required = "required") + private String examSurveyId; +} \ No newline at end of file diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/service/ExamSurveyClassService.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/service/ExamSurveyClassService.java new file mode 100644 index 00000000..58e59fac --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/service/ExamSurveyClassService.java @@ -0,0 +1,10 @@ +package com.skyeye.exam.examSurveyClass.service; + +import com.skyeye.base.business.service.SkyeyeBusinessService; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examSurveyClass.entity.ExamSurveyClass; + +public interface ExamSurveyClassService extends SkyeyeBusinessService { + +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/service/impl/ExamSurveyClassServiceImpl.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/service/impl/ExamSurveyClassServiceImpl.java new file mode 100644 index 00000000..19b73d9f --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyClass/service/impl/ExamSurveyClassServiceImpl.java @@ -0,0 +1,20 @@ +package com.skyeye.exam.examSurveyClass.service.impl; + +import com.skyeye.annotation.service.SkyeyeService; +import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examSurveyAnswer.dao.ExamSurveyAnswerDao; +import com.skyeye.exam.examSurveyAnswer.entity.ExamSurveyAnswer; +import com.skyeye.exam.examSurveyAnswer.service.ExamSurveyAnswerService; +import com.skyeye.exam.examSurveyClass.dao.ExamSurveyClassDao; +import com.skyeye.exam.examSurveyClass.entity.ExamSurveyClass; +import com.skyeye.exam.examSurveyClass.service.ExamSurveyClassService; +import org.springframework.stereotype.Service; + +@Service +@SkyeyeService(name = "试卷与班级关系表管理", groupName = "试卷与班级关系表管理") +public class ExamSurveyClassServiceImpl extends SkyeyeBusinessServiceImpl implements ExamSurveyClassService { + + +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/controller/ExamSurveyDirectoryController.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/controller/ExamSurveyDirectoryController.java new file mode 100644 index 00000000..9db5e784 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/controller/ExamSurveyDirectoryController.java @@ -0,0 +1,93 @@ +package com.skyeye.exam.examSurveyDirectory.controller; + +import com.skyeye.annotation.api.Api; +import com.skyeye.annotation.api.ApiImplicitParam; +import com.skyeye.annotation.api.ApiImplicitParams; +import com.skyeye.annotation.api.ApiOperation; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examSurveyDirectory.entity.ExamSurveyDirectory; +import com.skyeye.exam.examSurveyDirectory.service.ExamSurveyDirectoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Api(value = "试卷管理", tags = "试卷管理", modelName = "试卷管理") +public class ExamSurveyDirectoryController { + + @Autowired + private ExamSurveyDirectoryService examSurveyDirectoryService; + + /** + * 获取所有试卷列表 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "exam001", value = "获取所有试卷列表", method = "POST", allUse = "1") + @RequestMapping("/post/ExamSurveyDirectoryController/queryAllExamList") + public void queryAllExamList(InputObject inputObject, OutputObject outputObject) { + examSurveyDirectoryService.queryAllOrMyExamList(inputObject, outputObject); + } + + + /** + * 获取我的试卷列表 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "exam001-my", value = "分页获取我的试卷列表", method = "POST", allUse = "1") + @ApiImplicitParams({ + @ApiImplicitParam(id = "createId", name = "createId", value = "创建人Id",required = "required") + }) + @RequestMapping("/post/ExamSurveyDirectoryController/queryPageMyExamList") + public void queryPageMyExamList(InputObject inputObject, OutputObject outputObject) { + examSurveyDirectoryService.queryAllOrMyExamList(inputObject, outputObject); + } + + /** + * 新增试卷 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "exam002", value = "新增试卷", method = "POST", allUse = "1") + @ApiImplicitParams(classBean = ExamSurveyDirectory.class) + @RequestMapping("/post/ExamSurveyDirectoryController/writeExamDirectory") + public void writeExamDirectory(InputObject inputObject, OutputObject outputObject) { + examSurveyDirectoryService.createEntity(inputObject, outputObject); + } + + /** + * 根据id获取试卷信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "exam003", value = "根据id获取试卷信息", method = "POST", allUse = "1") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id", value = "试卷id",required = "required") + }) + @RequestMapping("/post/ExamSurveyDirectoryController/queryDirectoryById") + public void queryDirectoryById(InputObject inputObject, OutputObject outputObject) { + examSurveyDirectoryService.selectById(inputObject, outputObject); + } + + /** + * 根据id删除试卷信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "exam025", value = "根据id获取试卷信息", method = "POST", allUse = "1") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id", value = "试卷id",required = "required") + }) + @RequestMapping("/post/ExamSurveyDirectoryController/deleteDirectoryById") + public void deleteDirectoryById(InputObject inputObject, OutputObject outputObject) { + examSurveyDirectoryService.deleteDirectoryById(inputObject, outputObject); + + } +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/dao/ExamSurveyDirectoryDao.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/dao/ExamSurveyDirectoryDao.java new file mode 100644 index 00000000..85dc061a --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/dao/ExamSurveyDirectoryDao.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examSurveyDirectory.dao; + +import com.skyeye.eve.dao.SkyeyeBaseMapper; +import com.skyeye.exam.examSurveyDirectory.entity.ExamSurveyDirectory; + +public interface ExamSurveyDirectoryDao extends SkyeyeBaseMapper { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/entity/ExamSurveyDirectory.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/entity/ExamSurveyDirectory.java new file mode 100644 index 00000000..b8de3c51 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/entity/ExamSurveyDirectory.java @@ -0,0 +1,95 @@ +package com.skyeye.exam.examSurveyDirectory.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.annotation.cache.RedisCacheField; +import com.skyeye.common.entity.features.OperatorUserInfo; +import lombok.Data; + +import java.time.LocalDateTime; + +@Data +@RedisCacheField(name = "exam:directory") +@TableName(value = "exam_survey_directory") +@ApiModel("试卷实体类") +public class ExamSurveyDirectory extends OperatorUserInfo { + + @TableId("id") + @ApiModelProperty(value = "主键id。为空时新增,不为空时编辑") + private String id; + + @TableField("survey_name") + @ApiModelProperty(value = "试卷名称", required = "required") + private String surveyName; + + @TableField("survey_note") + @ApiModelProperty(value = "试卷说明") + private String surveyNote; + + @TableField("survey_qu_num") + @ApiModelProperty(value = "试卷下面有多少题目数 ", required = "required") + private Integer surveyQuNum; + + @TableField("survey_state") + @ApiModelProperty(value = "试卷状态 0默认设计状态 1执行中 2结束 ", required = "required") + private Integer surveyState; + + @TableField("real_start_time") + @ApiModelProperty(value = "实际开始时间") + private LocalDateTime realStartTime; + + @TableField("real_end_time") + @ApiModelProperty(value = "实际结束时间") + private LocalDateTime realEndTime; + + @TableField("survey_model") + @ApiModelProperty(value = "试卷所属的问卷模块 1.试卷模块 2.作业模块", required = "required") + private Integer surveyModel; + + @TableField("sid") + @ApiModelProperty(value = "用于短链接的ID") + private String sid; + + @TableField("end_type") + @ApiModelProperty(value = "结束方式 1手动结束,2依据结束时间") + private Integer endType; + + @TableField("view_answer") + @ApiModelProperty(value = "是否公开结果 0不 1公开", required = "required") + private Integer viewAnswer; + + @TableField("school_id") + @ApiModelProperty(value = "所属学校", required = "required") + private String schoolId; + + @TableField("grade_id") + @ApiModelProperty(value = "所属年级") + private String gradeId; + + @TableField("class_id") + @ApiModelProperty(value = "所属班级", required = "required") + private String classId; + + @TableField("semester_id") + @ApiModelProperty(value = "学期", required = "required") + private String semesterId; + + @TableField("subject_id") + @ApiModelProperty(value = "考试科目", required = "required") + private String subjectId; + + @TableField("session_year") + @ApiModelProperty(value = "哪一届的学生,比如:2013") + private String sessionYear; + + @TableField("fraction") + @ApiModelProperty(value = "总分数") + private Integer fraction; + + @TableField("whether_delete") + @ApiModelProperty(value = "是否删除 1.未删除 2.删除", required = "required") + private Integer whetherDelete; +} \ No newline at end of file diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/service/ExamSurveyDirectoryService.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/service/ExamSurveyDirectoryService.java new file mode 100644 index 00000000..7d345813 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/service/ExamSurveyDirectoryService.java @@ -0,0 +1,13 @@ +package com.skyeye.exam.examSurveyDirectory.service; + +import com.skyeye.base.business.service.SkyeyeBusinessService; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examSurveyDirectory.entity.ExamSurveyDirectory; + +public interface ExamSurveyDirectoryService extends SkyeyeBusinessService { + + void queryAllOrMyExamList(InputObject inputObject, OutputObject outputObject); + + void deleteDirectoryById(InputObject inputObject, OutputObject outputObject); +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/service/impl/ExamSurveyDirectoryServiceImpl.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/service/impl/ExamSurveyDirectoryServiceImpl.java new file mode 100644 index 00000000..ab1abb74 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyDirectory/service/impl/ExamSurveyDirectoryServiceImpl.java @@ -0,0 +1,100 @@ +package com.skyeye.exam.examSurveyDirectory.service.impl; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.skyeye.annotation.service.SkyeyeService; +import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.common.constans.CommonNumConstants; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exam.examSurveyClass.entity.ExamSurveyClass; +import com.skyeye.exam.examSurveyClass.service.ExamSurveyClassService; +import com.skyeye.exam.examSurveyDirectory.dao.ExamSurveyDirectoryDao; +import com.skyeye.exam.examSurveyDirectory.entity.ExamSurveyDirectory; +import com.skyeye.exam.examSurveyDirectory.service.ExamSurveyDirectoryService; +import com.skyeye.exception.CustomException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +@SkyeyeService(name = "试卷管理", groupName = "试卷管理") +public class ExamSurveyDirectoryServiceImpl extends SkyeyeBusinessServiceImpl implements ExamSurveyDirectoryService { + + @Autowired + private ExamSurveyClassService examSurveyClassService; + + + @Override + public void validatorEntity(ExamSurveyDirectory examSurveyDirectory) { + LocalDateTime realStartTime= examSurveyDirectory.getRealStartTime(); + LocalDateTime realEndTime= examSurveyDirectory.getRealEndTime(); + if(realStartTime != null && realEndTime != null){ + if(realStartTime.isAfter(realEndTime)){ + throw new CustomException("实际开始时间不能晚于实际结束时间"); + } + } + } + + @Override + public void createPostpose(ExamSurveyDirectory examSurveyDirectory,String userId){ + ExamSurveyClass examSurveyClass = new ExamSurveyClass(); + String classId = examSurveyDirectory.getClassId(); + String examSurveyId = examSurveyDirectory.getId(); + examSurveyClass.setClassId(classId); + examSurveyClass.setExamSurveyId(examSurveyId); + examSurveyClassService.createEntity(examSurveyClass,userId); + } + + /** + * 分页获取所有试卷或者我的试卷 + * */ + @Override + public void queryAllOrMyExamList(InputObject inputObject, OutputObject outputObject) { + Map params = inputObject.getParams(); + String createId; + Object createIdObj = params.get("createId"); + if(ObjectUtil.isNotNull(createIdObj)){ + // createId不为空 + createId = createIdObj.toString(); + } else { + createId = null; + } + List bean = queryAllData() + .stream().filter(s -> s.getWhetherDelete() == 1) + .collect(Collectors.toList()); + if(StrUtil.isEmpty(createId)){ + outputObject.setBeans(bean); + outputObject.settotal(bean.size()); + } + // 获取我的试卷,根据createId查询 + else { + List beans = bean.stream().filter(s -> createId.equals(s.getCreateId())).collect(Collectors.toList()); + outputObject.setBeans(beans); + outputObject.settotal(beans.size()); + } + } + + @Override + @Transactional + public void deleteDirectoryById(InputObject inputObject, OutputObject outputObject) { + Map params = inputObject.getParams(); + String id = params.get("id").toString(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ExamSurveyDirectory::getId, id); + ExamSurveyDirectory examSurveyDirectory = getOne(queryWrapper); + examSurveyDirectory.setWhetherDelete(CommonNumConstants.NUM_ZERO); + updateById(examSurveyDirectory); + // 删除试卷与班级的关联 + LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); + queryWrapper1.eq(ExamSurveyClass::getExamSurveyId, id); + ExamSurveyClass examSurveyClass = examSurveyClassService.getOne(queryWrapper1); + examSurveyClassService.removeById(examSurveyClass.getId()); + } +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/controller/ExamSurveyMarkExamController.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/controller/ExamSurveyMarkExamController.java new file mode 100644 index 00000000..6d902c8a --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/controller/ExamSurveyMarkExamController.java @@ -0,0 +1,9 @@ +package com.skyeye.exam.examSurveyMarkExam.controller; + +import com.skyeye.annotation.api.Api; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Api(value = "试卷与阅卷人关系表管理", tags = "试卷与阅卷人关系表管理", modelName = "试卷与阅卷人关系表管理") +public class ExamSurveyMarkExamController { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/dao/ExamSurveyMarkExamDao.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/dao/ExamSurveyMarkExamDao.java new file mode 100644 index 00000000..af5ce518 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/dao/ExamSurveyMarkExamDao.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examSurveyMarkExam.dao; + +import com.skyeye.eve.dao.SkyeyeBaseMapper; +import com.skyeye.exam.examSurveyMarkExam.entity.ExamSurveyMarkExam; + +public interface ExamSurveyMarkExamDao extends SkyeyeBaseMapper { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/entity/ExamSurveyMarkExam.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/entity/ExamSurveyMarkExam.java new file mode 100644 index 00000000..bee3a5ae --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/entity/ExamSurveyMarkExam.java @@ -0,0 +1,24 @@ +package com.skyeye.exam.examSurveyMarkExam.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.annotation.cache.RedisCacheField; +import com.skyeye.common.entity.CommonInfo; +import lombok.Data; + +@Data +@RedisCacheField(name = "exam:markexam") +@TableName(value = "exam_survey_mark_exam") +@ApiModel("试卷与阅卷人关系表实体类") +public class ExamSurveyMarkExam extends CommonInfo { + + @TableField("survey_id") + @ApiModelProperty(value = "试卷id", required = "required") + private String surveyId; + + @TableField("user_id") + @ApiModelProperty(value = "阅卷人id(用户id)", required = "required") + private String userId; +} \ No newline at end of file diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/service/ExamSurveyMarkExamService.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/service/ExamSurveyMarkExamService.java new file mode 100644 index 00000000..69b705d4 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/service/ExamSurveyMarkExamService.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examSurveyMarkExam.service; + +import com.skyeye.base.business.service.SkyeyeBusinessService; +import com.skyeye.exam.examSurveyMarkExam.entity.ExamSurveyMarkExam; + +public interface ExamSurveyMarkExamService extends SkyeyeBusinessService { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/service/impl/ExamSurveyMarkExamServiceImpl.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/service/impl/ExamSurveyMarkExamServiceImpl.java new file mode 100644 index 00000000..6864187b --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyMarkExam/service/impl/ExamSurveyMarkExamServiceImpl.java @@ -0,0 +1,13 @@ +package com.skyeye.exam.examSurveyMarkExam.service.impl; + +import com.skyeye.annotation.service.SkyeyeService; +import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.exam.examSurveyMarkExam.dao.ExamSurveyMarkExamDao; +import com.skyeye.exam.examSurveyMarkExam.entity.ExamSurveyMarkExam; +import com.skyeye.exam.examSurveyMarkExam.service.ExamSurveyMarkExamService; +import org.springframework.stereotype.Service; + +@Service +@SkyeyeService(name = "试卷与阅卷人关系表管理", groupName = "试卷与阅卷人关系表管理") +public class ExamSurveyMarkExamServiceImpl extends SkyeyeBusinessServiceImpl implements ExamSurveyMarkExamService { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/controller/ExamSurveyQuAnswerController.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/controller/ExamSurveyQuAnswerController.java new file mode 100644 index 00000000..89ff6011 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/controller/ExamSurveyQuAnswerController.java @@ -0,0 +1,9 @@ +package com.skyeye.exam.examSurveyQuAnswer.controller; + +import com.skyeye.annotation.api.Api; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Api(value = "答卷 题目和所得分数的关联表管理", tags = "答卷 题目和所得分数的关联表管理", modelName = "答卷 题目和所得分数的关联表管理") +public class ExamSurveyQuAnswerController { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/dao/ExamSurveyQuAnswerDao.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/dao/ExamSurveyQuAnswerDao.java new file mode 100644 index 00000000..ca2a8863 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/dao/ExamSurveyQuAnswerDao.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examSurveyQuAnswer.dao; + +import com.skyeye.eve.dao.SkyeyeBaseMapper; +import com.skyeye.exam.examSurveyQuAnswer.entity.ExamSurveyQuAnswer; + +public interface ExamSurveyQuAnswerDao extends SkyeyeBaseMapper { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/entity/ExamSurveyQuAnswer.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/entity/ExamSurveyQuAnswer.java new file mode 100644 index 00000000..9bb226f6 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/entity/ExamSurveyQuAnswer.java @@ -0,0 +1,28 @@ +package com.skyeye.exam.examSurveyQuAnswer.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.annotation.cache.RedisCacheField; +import com.skyeye.common.entity.CommonInfo; +import lombok.Data; + +@Data +@RedisCacheField(name = "exam:quanswer") +@TableName(value = "exam_survey_qu_answer") +@ApiModel("答卷 题目和所得分数的关联表实体类") +public class ExamSurveyQuAnswer extends CommonInfo { + + @TableField("qu_id") + @ApiModelProperty(value = "问题id", required = "required") + private String quId; + + @TableField("answer_id") + @ApiModelProperty(value = "答案id", required = "required") + private String answerId; + + @TableField("fraction") + @ApiModelProperty(value = "所得分数", required = "required") + private Integer fraction; +} \ No newline at end of file diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/service/ExamSurveyQuAnswerService.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/service/ExamSurveyQuAnswerService.java new file mode 100644 index 00000000..8fe61810 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/service/ExamSurveyQuAnswerService.java @@ -0,0 +1,7 @@ +package com.skyeye.exam.examSurveyQuAnswer.service; + +import com.skyeye.base.business.service.SkyeyeBusinessService; +import com.skyeye.exam.examSurveyQuAnswer.entity.ExamSurveyQuAnswer; + +public interface ExamSurveyQuAnswerService extends SkyeyeBusinessService { +} diff --git a/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/service/impl/ExamSurveyQuAnswerServiceImpl.java b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/service/impl/ExamSurveyQuAnswerServiceImpl.java new file mode 100644 index 00000000..c9f93d42 --- /dev/null +++ b/skyeye-school/school-exam/src/main/java/com/skyeye/exam/examSurveyQuAnswer/service/impl/ExamSurveyQuAnswerServiceImpl.java @@ -0,0 +1,13 @@ +package com.skyeye.exam.examSurveyQuAnswer.service.impl; + +import com.skyeye.annotation.service.SkyeyeService; +import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.exam.examSurveyQuAnswer.dao.ExamSurveyQuAnswerDao; +import com.skyeye.exam.examSurveyQuAnswer.entity.ExamSurveyQuAnswer; +import com.skyeye.exam.examSurveyQuAnswer.service.ExamSurveyQuAnswerService; +import org.springframework.stereotype.Service; + +@Service +@SkyeyeService(name = "答卷 题目和所得分数的关联表管理", groupName = "答卷 题目和所得分数的关联表管理") +public class ExamSurveyQuAnswerServiceImpl extends SkyeyeBusinessServiceImpl implements ExamSurveyQuAnswerService { +} diff --git a/skyeye-school/school-exam/src/main/resources/mapper/MatrixMultipleChoiceMapper.xml b/skyeye-school/school-exam/src/main/resources/mapper/ExamSurveyClassService.xml similarity index 100% rename from skyeye-school/school-exam/src/main/resources/mapper/MatrixMultipleChoiceMapper.xml rename to skyeye-school/school-exam/src/main/resources/mapper/ExamSurveyClassService.xml diff --git a/skyeye-school/school-exam/src/main/resources/mapper/exam/ExamMapper.xml b/skyeye-school/school-exam/src/main/resources/mapper/exam/ExamSurveyClassService.xml similarity index 99% rename from skyeye-school/school-exam/src/main/resources/mapper/exam/ExamMapper.xml rename to skyeye-school/school-exam/src/main/resources/mapper/exam/ExamSurveyClassService.xml index e19c6539..4e8a62f0 100644 --- a/skyeye-school/school-exam/src/main/resources/mapper/exam/ExamMapper.xml +++ b/skyeye-school/school-exam/src/main/resources/mapper/exam/ExamSurveyClassService.xml @@ -104,19 +104,7 @@ ORDER BY a.create_time DESC - - - + INSERT into exam_survey_directory (id, survey_name, sid, survey_model, survey_note, school_id, grade_id, view_answer, semester_id, session_year, diff --git a/skyeye-school/school-phone/src/main/resources/mapper/schoolphone/SchoolStuExamMapper.xml b/skyeye-school/school-phone/src/main/resources/mapper/schoolphone/ExamSurveyClassService.xml similarity index 100% rename from skyeye-school/school-phone/src/main/resources/mapper/schoolphone/SchoolStuExamMapper.xml rename to skyeye-school/school-phone/src/main/resources/mapper/schoolphone/ExamSurveyClassService.xml diff --git a/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/contorller/ScoreController.java b/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/contorller/ScoreController.java new file mode 100644 index 00000000..ff7f9588 --- /dev/null +++ b/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/contorller/ScoreController.java @@ -0,0 +1,78 @@ +package com.skyeye.school.score.contorller; + +import com.skyeye.annotation.api.Api; +import com.skyeye.annotation.api.ApiImplicitParam; +import com.skyeye.annotation.api.ApiImplicitParams; +import com.skyeye.annotation.api.ApiOperation; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.school.score.entity.Score; +import com.skyeye.school.score.service.ScoreService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Api(value = "成绩管理", tags = "成绩管理", modelName = "成绩管理") +public class ScoreController { + + @Autowired + private ScoreService scoreService; + + /** + * 添加或修改成绩信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "writeScore", value = "添加或修改成绩信息", method = "POST", allUse = "2") + @ApiImplicitParams(classBean = Score.class) + @RequestMapping("/post/ScoreController/writeScore") + public void writeScore(InputObject inputObject, OutputObject outputObject) { + scoreService.saveOrUpdateEntity(inputObject, outputObject); + } + + /** + * 根据id获取成绩信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "queryScoreById", value = "根据id获取成绩信息", method = "GET", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")}) + @RequestMapping("/post/ScoreController/queryScoreById") + public void queryScoreById(InputObject inputObject, OutputObject outputObject) { + scoreService.selectById(inputObject, outputObject); + } + + /** + * 根据id删除成绩信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "deleteScoreById", value = "根据id删除成绩信息", method = "DELETE", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")}) + @RequestMapping("/post/ScoreController/deleteScoreById") + public void deleteScoreById(InputObject inputObject, OutputObject outputObject) { + scoreService.deleteById(inputObject, outputObject); + } + + /** + * 根据no学号获取我的成绩信息 + * + * @param inputObject 入参以及用户信息等获取对象 + * @param outputObject 出参以及提示信息的返回值对象 + */ + @ApiOperation(id = "queryMyScoreListByNo", value = "根据no学号获取我的成绩信息", method = "POST", allUse = "2") + @ApiImplicitParams({ + @ApiImplicitParam(id = "no", name = "no", value = "学号", required = "required")}) + @RequestMapping("/post/ScoreController/queryMyScoreListByNo") + public void queryMyScoreListByNo(InputObject inputObject, OutputObject outputObject) { + scoreService.queryMyScoreListByNo(inputObject, outputObject); + } + + +} diff --git a/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/dao/ScoreDao.java b/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/dao/ScoreDao.java new file mode 100644 index 00000000..499fbb50 --- /dev/null +++ b/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/dao/ScoreDao.java @@ -0,0 +1,8 @@ +package com.skyeye.school.score.dao; + + +import com.skyeye.eve.dao.SkyeyeBaseMapper; +import com.skyeye.school.score.entity.Score; + +public interface ScoreDao extends SkyeyeBaseMapper { +} diff --git a/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/entity/Score.java b/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/entity/Score.java new file mode 100644 index 00000000..dab7a94b --- /dev/null +++ b/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/entity/Score.java @@ -0,0 +1,52 @@ +package com.skyeye.school.score.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.annotation.api.Property; +import com.skyeye.annotation.cache.RedisCacheField; +import com.skyeye.annotation.unique.UniqueField; +import com.skyeye.common.entity.features.OperatorUserInfo; +import lombok.Data; + +@Data +@RedisCacheField(name = "school:score") +@TableName(value = "school_score") +@ApiModel(value = "成绩实体类") +public class Score extends OperatorUserInfo { + + @TableId("id") + @ApiModelProperty(value = "主键id。为空时新增,不为空时编辑") + private String id; + + @TableField("no") + @ApiModelProperty(value = "学号", required = "required") + private String no; + + @TableField("class_id") + @ApiModelProperty(value = "所属班级", required = "required") + private String classId; + + @TableField("object_id") + @ApiModelProperty(value = "科目id", required = "required") + private String objectId; + + @TableField("semester_id") + @ApiModelProperty(value = "学期id", required = "required") + private String semesterId; + + @TableField("year") + @ApiModelProperty(value = "学期id", required = "required") + private Integer year; + + @TableField("grade") + @ApiModelProperty(value = "成绩", required = "required") + private Integer grade; + + @TableField("faculty_id") + @ApiModelProperty(value = "院校id", required = "required") + private String facultyId; + +} diff --git a/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/service/ScoreService.java b/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/service/ScoreService.java new file mode 100644 index 00000000..9f830b2e --- /dev/null +++ b/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/service/ScoreService.java @@ -0,0 +1,10 @@ +package com.skyeye.school.score.service; + +import com.skyeye.base.business.service.SkyeyeBusinessService; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.school.score.entity.Score; + +public interface ScoreService extends SkyeyeBusinessService { + void queryMyScoreListByNo(InputObject inputObject, OutputObject outputObject); +} diff --git a/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/service/impl/ScoreServiceImpl.java b/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/service/impl/ScoreServiceImpl.java new file mode 100644 index 00000000..960fe2d9 --- /dev/null +++ b/skyeye-school/school-pro/src/main/java/com/skyeye/school/score/service/impl/ScoreServiceImpl.java @@ -0,0 +1,36 @@ +package com.skyeye.school.score.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.skyeye.annotation.service.SkyeyeService; +import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.exception.CustomException; +import com.skyeye.school.score.dao.ScoreDao; +import com.skyeye.school.score.entity.Score; +import com.skyeye.school.score.service.ScoreService; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + + +@Service +@SkyeyeService(name = "成绩管理", groupName = "成绩管理") +public class ScoreServiceImpl extends SkyeyeBusinessServiceImpl implements ScoreService { + + @Override + public void queryMyScoreListByNo(InputObject inputObject, OutputObject outputObject) { + Map map = inputObject.getParams(); + String no = map.get("no").toString(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("no", no); + List list = list(queryWrapper); + if(CollectionUtil.isEmpty(list)){ + throw new CustomException("暂无次学号学生的成绩"); + } + outputObject.setBeans(list); + outputObject.settotal(list.size()); + } +} diff --git a/skyeye-school/school-pro/src/main/resources/mapper/announcement/AnnouncementMapper.xml b/skyeye-school/school-pro/src/main/resources/mapper/announcement/ExamSurveyClassService.xml similarity index 100% rename from skyeye-school/school-pro/src/main/resources/mapper/announcement/AnnouncementMapper.xml rename to skyeye-school/school-pro/src/main/resources/mapper/announcement/ExamSurveyClassService.xml diff --git a/skyeye-school/school-pro/src/main/resources/mapper/schoolauth/SchoolTeacherMapper.xml b/skyeye-school/school-pro/src/main/resources/mapper/schoolauth/ExamSurveyClassService.xml similarity index 100% rename from skyeye-school/school-pro/src/main/resources/mapper/schoolauth/SchoolTeacherMapper.xml rename to skyeye-school/school-pro/src/main/resources/mapper/schoolauth/ExamSurveyClassService.xml diff --git a/skyeye-school/school-web/src/main/resources/bootstrap.yml b/skyeye-school/school-web/src/main/resources/bootstrap.yml index aecde0e7..9f9532b3 100644 --- a/skyeye-school/school-web/src/main/resources/bootstrap.yml +++ b/skyeye-school/school-web/src/main/resources/bootstrap.yml @@ -16,11 +16,11 @@ spring: cloud: nacos: discovery: - server-addr: 172.18.92.40:9000 # 配置服务注册nacos地址 + server-addr: 172.18.92.40:8848 # 配置服务注册nacos地址 namespace: ${spring.profiles.active} # 配置命名空间 config: # 指定nacos server的地址 - server-addr: 172.18.92.40:9000 + server-addr: 172.18.92.40:8848 # 配置文件后缀 file-extension: yml # 命名空间 常用场景之一是不同环境的配置的区分隔离,例如开发测试环境和生产环境的资源(如配置、服务)隔离等