mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-03-06 12:23:44 +08:00
删除文件 skyeye-school/school-exam/src/main/java/com/skyeye/exam/examQuScore
This commit is contained in:
parent
73dd36047b
commit
5e0a464220
5 changed files with 0 additions and 234 deletions
|
@ -1,44 +0,0 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* @ClassName: ExamQuScoreController
|
||||
* @Description: 评分题行选项管理控制层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/7/16 11:01
|
||||
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.skyeye.exam.examQuScore.dao;
|
||||
|
||||
import com.skyeye.eve.dao.SkyeyeBaseMapper;
|
||||
import com.skyeye.exam.examQuScore.entity.ExamQuScore;
|
||||
|
||||
/**
|
||||
* @ClassName: ExamQuScoreDao
|
||||
* @Description: 评分题行选项管理数据接口层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/7/16 11:01
|
||||
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface ExamQuScoreDao extends SkyeyeBaseMapper<ExamQuScore> {
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: ExamQuScore
|
||||
* @Description: 评分题行选项实体类
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/7/16 11:01
|
||||
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@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 = "所属题")
|
||||
private String quId;
|
||||
|
||||
@TableField("qu_type")
|
||||
@ApiModelProperty(value = "题目类型", required = "required")
|
||||
private Integer quType;
|
||||
|
||||
@TableField("option_name")
|
||||
@ApiModelProperty(value = "选项内容", required = "required")
|
||||
private String optionName;
|
||||
|
||||
@TableField("option_id")
|
||||
@ApiModelProperty(value = "选项id")
|
||||
private String optionId;
|
||||
|
||||
@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;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "评分题选项信息", required = "json")
|
||||
private List<ExamQuScore> scoreTd;
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: ExamQuScoreService
|
||||
* @Description: 评分题行选项管理服务接口层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/7/19 11:01
|
||||
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface ExamQuScoreService extends SkyeyeBusinessService<ExamQuScore> {
|
||||
void saveList(List<ExamQuScore> list, String quId, String userId);
|
||||
}
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
package com.skyeye.exam.examQuScore.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.skyeye.annotation.service.SkyeyeService;
|
||||
import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.util.DateUtil;
|
||||
import com.skyeye.common.util.ToolUtil;
|
||||
import com.skyeye.common.util.question.CheckType;
|
||||
import com.skyeye.common.util.question.QuType;
|
||||
import com.skyeye.eve.question.entity.Question;
|
||||
import com.skyeye.eve.question.service.QuestionService;
|
||||
import com.skyeye.exam.examQuRadio.entity.ExamQuRadio;
|
||||
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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: ExamQuScoreServiceImpl
|
||||
* @Description: 公评分题行选项管理服务层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/7/19 11:01
|
||||
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Service
|
||||
@SkyeyeService(name = "评分题行选项管理", groupName = "评分题行选项管理")
|
||||
public class ExamQuScoreServiceImpl extends SkyeyeBusinessServiceImpl<ExamQuScoreDao, ExamQuScore> implements ExamQuScoreService {
|
||||
|
||||
@Autowired
|
||||
private QuestionService questionService;
|
||||
|
||||
// @Override
|
||||
// protected void createPrepose(ExamQuScore entity) {
|
||||
// String userId = InputObject.getLogParamsStatic().get("id").toString();
|
||||
// entity.setQuType(QuType.SCORE.getIndex());
|
||||
// Question question = JSONUtil.toBean(JSONUtil.toJsonPrettyStr(entity), Question.class);
|
||||
// String quId = questionService.saveQuestion(question, StrUtil.EMPTY, userId);
|
||||
// System.out.println(quId);
|
||||
// entity.setQuId(quId);
|
||||
// List<ExamQuScore> score = entity.getScoreTd();
|
||||
// saveList(score, quId, userId);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected void updatePrepose(ExamQuScore entity) {
|
||||
// String userId = InputObject.getLogParamsStatic().get("id").toString();
|
||||
// Question question = JSONUtil.toBean(JSONUtil.toJsonPrettyStr(entity), Question.class);
|
||||
// String quId = questionService.saveQuestion(question, entity.getQuId(), userId);
|
||||
// List<ExamQuScore> score = entity.getScoreTd();
|
||||
// saveList(score, quId, userId);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void saveList(List<ExamQuScore> score, String quId, String userId) {
|
||||
List<ExamQuScore> quScore = new ArrayList<>();
|
||||
List<ExamQuScore> editquScore = new ArrayList<>();
|
||||
for (int i = 0; i < score.size(); i++) {
|
||||
ExamQuScore object = score.get(i);
|
||||
ExamQuScore bean = new ExamQuScore();
|
||||
bean.setOrderById(object.getOrderById());
|
||||
bean.setOptionName(object.getOptionName());
|
||||
if (ToolUtil.isBlank(object.getOptionId())) {
|
||||
bean.setQuId(quId);
|
||||
bean.setVisibility(1);
|
||||
bean.setId(ToolUtil.getSurFaceId());
|
||||
bean.setCreateId(userId);
|
||||
bean.setCreateTime(DateUtil.getTimeAndToString());
|
||||
quScore.add(bean);
|
||||
} else {
|
||||
bean.setId(object.getOptionId());
|
||||
editquScore.add(bean);
|
||||
}
|
||||
}
|
||||
if (!quScore.isEmpty()) {
|
||||
createEntity(quScore, userId);
|
||||
}
|
||||
if (!editquScore.isEmpty()) {
|
||||
updateEntity(editquScore, userId);
|
||||
}
|
||||
quScore.addAll(editquScore);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue