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/examQuRadio
This commit is contained in:
parent
b2c622dcd7
commit
73dd36047b
5 changed files with 0 additions and 247 deletions
|
@ -1,43 +0,0 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* @ClassName: ExamQuRadioController
|
||||
* @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 ExamQuRadioController {
|
||||
|
||||
@Autowired
|
||||
private ExamQuRadioService examQuRadioService;
|
||||
|
||||
// /**
|
||||
// * 新增或编辑单选题选项
|
||||
// *
|
||||
// * @param inputObject 入参以及用户信息等获取对象
|
||||
// * @param outputObject 出参以及提示信息的返回值对象
|
||||
// */
|
||||
// @ApiOperation(id = "writeOrUpdateQuRadio", value = "新增或编辑单选题选项", method = "POST", allUse = "2")
|
||||
// @ApiImplicitParams(classBean = ExamQuRadio.class)
|
||||
// @RequestMapping("/post/ExamQuRadioController/writeOrUpdateQuRadio")
|
||||
// public void writeOrUpdateQuRadio(InputObject inputObject, OutputObject outputObject) {
|
||||
// examQuRadioService.saveOrUpdateEntity(inputObject, outputObject);
|
||||
// }
|
||||
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.skyeye.exam.examQuRadio.dao;
|
||||
|
||||
import com.skyeye.eve.dao.SkyeyeBaseMapper;
|
||||
import com.skyeye.exam.examQuRadio.entity.ExamQuRadio;
|
||||
|
||||
/**
|
||||
* @ClassName: ExamQuRadioDao
|
||||
* @Description: 单选题选项表管理数据接口层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/7/16 11:01
|
||||
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface ExamQuRadioDao extends SkyeyeBaseMapper<ExamQuRadio> {
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
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.common.entity.features.OperatorUserInfo;
|
||||
import com.skyeye.eve.question.entity.Question;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: ExamQuRadio
|
||||
* @Description: 单选题选项表实体类
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/7/16 11:01
|
||||
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "exam_qu_radio")
|
||||
@ApiModel("单选题选项表实体类")
|
||||
public class ExamQuRadio extends OperatorUserInfo {
|
||||
|
||||
@TableId("id")
|
||||
@ApiModelProperty(value = "主键id。为空时新增,不为空时编辑")
|
||||
private String id;
|
||||
|
||||
@TableField("qu_id")
|
||||
@ApiModelProperty(value = "所属题")
|
||||
private String quId;
|
||||
|
||||
@TableField("option_name")
|
||||
@ApiModelProperty(value = "选项内容", required = "required")
|
||||
private String optionName;
|
||||
|
||||
@TableField("option_id")
|
||||
@ApiModelProperty(value = "选项id")
|
||||
private String optionId;
|
||||
|
||||
@TableField("option_title")
|
||||
@ApiModelProperty(value = "选项标题",required = "required")
|
||||
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;
|
||||
|
||||
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: ExamQuRadioService
|
||||
* @Description: 单选题选项表管理服务接口层
|
||||
* @author: skyeye云系列--lqy
|
||||
* @date: 2024/7/19 11:01
|
||||
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface ExamQuRadioService extends SkyeyeBusinessService<ExamQuRadio> {
|
||||
void saveList(List<ExamQuRadio> list,String quId, String userId);
|
||||
}
|
|
@ -1,97 +0,0 @@
|
|||
package com.skyeye.exam.examQuRadio.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.util.DateUtil;
|
||||
import com.skyeye.common.util.ToolUtil;
|
||||
import com.skyeye.common.util.mybatisplus.MybatisPlusUtil;
|
||||
import com.skyeye.eve.question.service.QuestionService;
|
||||
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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: ExamQuRadioServiceImpl
|
||||
* @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 ExamQuRadioServiceImpl extends SkyeyeBusinessServiceImpl<ExamQuRadioDao, ExamQuRadio> implements ExamQuRadioService {
|
||||
|
||||
@Autowired
|
||||
private QuestionService questionService;
|
||||
|
||||
// @Override
|
||||
// public void createPrepose(ExamQuRadio entity) {
|
||||
// String userId = InputObject.getLogParamsStatic().get("id").toString();
|
||||
// entity.setQuType(QuType.RADIO.getIndex());
|
||||
// Question question = JSONUtil.toBean(JSONUtil.toJsonPrettyStr(entity), Question.class);
|
||||
// String quId = questionService.saveQuestion(question, StrUtil.EMPTY, userId);
|
||||
// entity.setQuId(quId);
|
||||
// List<ExamQuRadio> list = entity.getRadioTd();
|
||||
// if (list.isEmpty()){
|
||||
// saveList(list, quId, userId);
|
||||
// }
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public void updatePrepose(ExamQuRadio 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<ExamQuRadio> list = entity.getRadioTd();
|
||||
// if (list.isEmpty()) {
|
||||
// saveList(list, quId, userId);
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void saveList(List<ExamQuRadio> list, String quId, String userId) {
|
||||
List<ExamQuRadio> quRadio = new ArrayList<>();
|
||||
List<ExamQuRadio> editquRadio = new ArrayList<>();
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
ExamQuRadio object = list.get(i);
|
||||
ExamQuRadio bean = new ExamQuRadio();
|
||||
bean.setOrderById(object.getOrderById());
|
||||
bean.setOptionName(object.getOptionName());
|
||||
bean.setIsNote(object.getIsNote());
|
||||
bean.setOptionTitle(object.getOptionTitle());
|
||||
bean.setIsDefaultAnswer(object.getIsDefaultAnswer());
|
||||
if (!ToolUtil.isBlank(object.getCheckType().toString())) {
|
||||
bean.setCheckType(object.getCheckType());
|
||||
} else {
|
||||
bean.setCheckType(object.getCheckType());
|
||||
}
|
||||
bean.setIsRequiredFill(object.getIsRequiredFill());
|
||||
if (ToolUtil.isBlank(object.getOptionId())) {
|
||||
bean.setQuId(object.getQuId());
|
||||
bean.setVisibility(1);
|
||||
bean.setId(ToolUtil.getSurFaceId());
|
||||
bean.setCreateId(userId);
|
||||
bean.setCreateTime(DateUtil.getTimeAndToString());
|
||||
quRadio.add(bean);
|
||||
} else {
|
||||
bean.setId(object.getOptionId());
|
||||
editquRadio.add(bean);
|
||||
}
|
||||
}
|
||||
if (!quRadio.isEmpty()) {
|
||||
createEntity(quRadio, userId);
|
||||
}
|
||||
if (!editquRadio.isEmpty()) {
|
||||
updateEntity(editquRadio, userId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in a new issue