mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-01-31 11:41:08 +08:00
feat:成绩管理、试卷、问题表、单选题选项、评分题行选项、排序题行选项
This commit is contained in:
parent
71254b020c
commit
4a0bb02708
60 changed files with 1699 additions and 24 deletions
|
@ -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);
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 获取试卷题目信息
|
||||
|
|
|
@ -235,7 +235,7 @@ public interface ExamDao {
|
|||
|
||||
int updateExamMationEndById(Map<String, Object> map);
|
||||
|
||||
Map<String, Object> queryGradeNowYearByGradeId(Map<String, Object> map);
|
||||
// Map<String, Object> queryGradeNowYearByGradeId(Map<String, Object> map);
|
||||
|
||||
int insertExamClassMation(List<Map<String, Object>> beans);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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<String, Object> map = inputObject.getParams();
|
||||
|
@ -129,7 +129,7 @@ public class ExamServiceImpl implements ExamService {
|
|||
outputObject.setreturnMessage("该年级还未曾分班。");
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
/**
|
||||
* 获取试卷题目信息
|
||||
*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
|
@ -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<ExamQuRadio> {
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<ExamQuRadio> {
|
||||
void deleteQuRadioById(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryQuRadioListByQuId(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
|
@ -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<ExamQuRadioDao, ExamQuRadio> implements ExamQuRadioService {
|
||||
|
||||
@Autowired
|
||||
private ExamQuRadioService examQuRadioService;
|
||||
|
||||
@Override
|
||||
public void deleteQuRadioById(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> 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<String, Object> map = inputObject.getParams();
|
||||
String quId = map.get("quId").toString();
|
||||
LambdaQueryWrapper<ExamQuRadio> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ExamQuRadio::getQuId, quId);
|
||||
List<ExamQuRadio> list = examQuRadioService.list(queryWrapper);
|
||||
List<ExamQuRadio> bean = list.stream()
|
||||
.filter(visibility -> visibility.getVisibility() == CommonNumConstants.NUM_ONE)
|
||||
.collect(Collectors.toList());
|
||||
outputObject.setBeans(bean);
|
||||
outputObject.settotal(bean.size());
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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<ExamQuScore> {
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<ExamQuScore> {
|
||||
void deleteQuScoreById(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryQuScoreListByQuId(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
|
@ -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<ExamQuScoreDao, ExamQuScore> implements ExamQuScoreService {
|
||||
|
||||
@Autowired
|
||||
private ExamQuScoreService examQuScoreService;
|
||||
|
||||
@Override
|
||||
public void deleteQuScoreById(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> 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<String, Object> map = inputObject.getParams();
|
||||
String quId = map.get("quId").toString();
|
||||
LambdaQueryWrapper<ExamQuScore> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ExamQuScore::getQuId, quId);
|
||||
List<ExamQuScore> list = examQuScoreService.list(queryWrapper);
|
||||
List<ExamQuScore> bean = list.stream()
|
||||
.filter(visibility -> visibility.getVisibility() == CommonNumConstants.NUM_ONE)
|
||||
.collect(Collectors.toList());
|
||||
outputObject.setBeans(bean);
|
||||
outputObject.settotal(bean.size());
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
|
@ -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<ExamQuestion> {
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<ExamQuestion> {
|
||||
void deleteQuestionById(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryQuestionsList(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
|
@ -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<ExamQuestionDao, ExamQuestion> implements ExamQuestionService {
|
||||
|
||||
@Autowired
|
||||
private ExamQuestionService examQuestionService;
|
||||
|
||||
@Override
|
||||
public void deleteQuestionById(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String,Object> map = inputObject.getParams();
|
||||
String questionId = map.get("id").toString();
|
||||
LambdaQueryWrapper<ExamQuestion> queryWrapper = new LambdaQueryWrapper<ExamQuestion>();
|
||||
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<ExamQuestion> examQuestionList = queryAllData();
|
||||
List<ExamQuestion> bean = examQuestionList.stream().filter(isDelete -> isDelete.getIsDelete() == CommonNumConstants.NUM_ONE).collect(Collectors.toList());
|
||||
outputObject.setBeans(bean);
|
||||
outputObject.settotal(bean.size());
|
||||
}
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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<ExamQuestionLogic> {
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<ExamQuestionLogic> {
|
||||
}
|
|
@ -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<ExamQuestionLogicDao, ExamQuestionLogic> implements ExamQuestionLogicService {
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -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<ExamSurveyAnswer> {
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<ExamSurveyAnswer> {
|
||||
void queryMySurveyAnswerList(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
|
@ -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<ExamSurveyAnswerDao, ExamSurveyAnswer> implements ExamSurveyAnswerService {
|
||||
@Override
|
||||
public void queryMySurveyAnswerList(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
String createId = (String) map.get("createId");
|
||||
QueryWrapper<ExamSurveyAnswer> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("create_id", createId);
|
||||
List<ExamSurveyAnswer> list = list(queryWrapper);
|
||||
outputObject.setBeans(list);
|
||||
outputObject.settotal(list.size());
|
||||
}
|
||||
}
|
|
@ -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 {
|
||||
|
||||
|
||||
}
|
|
@ -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<ExamSurveyClass> {
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<ExamSurveyClass> {
|
||||
|
||||
}
|
|
@ -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<ExamSurveyClassDao, ExamSurveyClass> implements ExamSurveyClassService {
|
||||
|
||||
|
||||
}
|
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
|
@ -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<ExamSurveyDirectory> {
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<ExamSurveyDirectory> {
|
||||
|
||||
void queryAllOrMyExamList(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void deleteDirectoryById(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
|
@ -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<ExamSurveyDirectoryDao, ExamSurveyDirectory> 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<String, Object> params = inputObject.getParams();
|
||||
String createId;
|
||||
Object createIdObj = params.get("createId");
|
||||
if(ObjectUtil.isNotNull(createIdObj)){
|
||||
// createId不为空
|
||||
createId = createIdObj.toString();
|
||||
} else {
|
||||
createId = null;
|
||||
}
|
||||
List<ExamSurveyDirectory> 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<ExamSurveyDirectory> 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<String, Object> params = inputObject.getParams();
|
||||
String id = params.get("id").toString();
|
||||
LambdaQueryWrapper<ExamSurveyDirectory> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ExamSurveyDirectory::getId, id);
|
||||
ExamSurveyDirectory examSurveyDirectory = getOne(queryWrapper);
|
||||
examSurveyDirectory.setWhetherDelete(CommonNumConstants.NUM_ZERO);
|
||||
updateById(examSurveyDirectory);
|
||||
// 删除试卷与班级的关联
|
||||
LambdaQueryWrapper<ExamSurveyClass> queryWrapper1 = new LambdaQueryWrapper<>();
|
||||
queryWrapper1.eq(ExamSurveyClass::getExamSurveyId, id);
|
||||
ExamSurveyClass examSurveyClass = examSurveyClassService.getOne(queryWrapper1);
|
||||
examSurveyClassService.removeById(examSurveyClass.getId());
|
||||
}
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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<ExamSurveyMarkExam> {
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<ExamSurveyMarkExam> {
|
||||
}
|
|
@ -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<ExamSurveyMarkExamDao, ExamSurveyMarkExam> implements ExamSurveyMarkExamService {
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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<ExamSurveyQuAnswer> {
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<ExamSurveyQuAnswer> {
|
||||
}
|
|
@ -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<ExamSurveyQuAnswerDao, ExamSurveyQuAnswer> implements ExamSurveyQuAnswerService {
|
||||
}
|
|
@ -104,19 +104,7 @@
|
|||
</if>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="queryGradeNowYearByGradeId" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.`year` sessionYear
|
||||
FROM
|
||||
school_class_mation a
|
||||
WHERE
|
||||
a.grade_id = #{gradeId}
|
||||
GROUP BY `year`
|
||||
ORDER BY a.`year` DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertExamMation" parameterType="java.util.Map">
|
||||
INSERT into exam_survey_directory
|
||||
(id, survey_name, sid, survey_model, survey_note, school_id, grade_id, view_answer, semester_id, session_year,
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -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<Score> {
|
||||
}
|
|
@ -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;
|
||||
|
||||
}
|
|
@ -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<Score> {
|
||||
void queryMyScoreListByNo(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
|
@ -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<ScoreDao, Score> implements ScoreService {
|
||||
|
||||
@Override
|
||||
public void queryMyScoreListByNo(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
String no = map.get("no").toString();
|
||||
QueryWrapper<Score> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("no", no);
|
||||
List<Score> list = list(queryWrapper);
|
||||
if(CollectionUtil.isEmpty(list)){
|
||||
throw new CustomException("暂无次学号学生的成绩");
|
||||
}
|
||||
outputObject.setBeans(list);
|
||||
outputObject.settotal(list.size());
|
||||
}
|
||||
}
|
|
@ -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
|
||||
# 命名空间 常用场景之一是不同环境的配置的区分隔离,例如开发测试环境和生产环境的资源(如配置、服务)隔离等
|
||||
|
|
Loading…
Reference in a new issue