问卷题目及答案
This commit is contained in:
parent
9a090e27d7
commit
74e8d80854
@ -0,0 +1,91 @@
|
|||||||
|
package com.xinelu.manage.controller.questionsubject;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.Log;
|
||||||
|
import com.xinelu.common.core.controller.BaseController;
|
||||||
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
|
import com.xinelu.common.enums.BusinessType;
|
||||||
|
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||||
|
import com.xinelu.manage.domain.questionsubject.QuestionSubject;
|
||||||
|
import com.xinelu.manage.service.questionsubject.IQuestionSubjectService;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目信息Controller
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-02-29
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/questionSubject")
|
||||||
|
public class QuestionSubjectController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private IQuestionSubjectService questionSubjectService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问卷题目信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubject:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(QuestionSubject questionSubject) {
|
||||||
|
startPage();
|
||||||
|
List<QuestionSubject> list = questionSubjectService.selectQuestionSubjectList(questionSubject);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出问卷题目信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubject:export')")
|
||||||
|
@Log(title = "问卷题目信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, QuestionSubject questionSubject) {
|
||||||
|
List<QuestionSubject> list = questionSubjectService.selectQuestionSubjectList(questionSubject);
|
||||||
|
ExcelUtil<QuestionSubject> util = new ExcelUtil<QuestionSubject>(QuestionSubject.class);
|
||||||
|
util.exportExcel(response, list, "问卷题目信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取问卷题目信息详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubject:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return AjaxResult.success(questionSubjectService.selectQuestionSubjectById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增问卷题目信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubject:add')")
|
||||||
|
@Log(title = "问卷题目信息", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody QuestionSubject questionSubject) {
|
||||||
|
return toAjax(questionSubjectService.insertQuestionSubject(questionSubject));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改问卷题目信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubject:edit')")
|
||||||
|
@Log(title = "问卷题目信息", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody QuestionSubject questionSubject) {
|
||||||
|
return toAjax(questionSubjectService.updateQuestionSubject(questionSubject));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除问卷题目信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubject:remove')")
|
||||||
|
@Log(title = "问卷题目信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(questionSubjectService.deleteQuestionSubjectByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package com.xinelu.manage.controller.questionsubjectoption;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.Log;
|
||||||
|
import com.xinelu.common.core.controller.BaseController;
|
||||||
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
|
import com.xinelu.common.enums.BusinessType;
|
||||||
|
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||||
|
import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption;
|
||||||
|
import com.xinelu.manage.service.questionsubjectoption.IQuestionSubjectOptionService;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目选项答案Controller
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-02-29
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/questionSubjectOption")
|
||||||
|
public class QuestionSubjectOptionController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private IQuestionSubjectOptionService questionSubjectOptionService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问卷题目选项答案列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubjectOption:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(QuestionSubjectOption questionSubjectOption) {
|
||||||
|
startPage();
|
||||||
|
List<QuestionSubjectOption> list = questionSubjectOptionService.selectQuestionSubjectOptionList(questionSubjectOption);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出问卷题目选项答案列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubjectOption:export')")
|
||||||
|
@Log(title = "问卷题目选项答案", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, QuestionSubjectOption questionSubjectOption) {
|
||||||
|
List<QuestionSubjectOption> list = questionSubjectOptionService.selectQuestionSubjectOptionList(questionSubjectOption);
|
||||||
|
ExcelUtil<QuestionSubjectOption> util = new ExcelUtil<QuestionSubjectOption>(QuestionSubjectOption.class);
|
||||||
|
util.exportExcel(response, list, "问卷题目选项答案数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取问卷题目选项答案详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubjectOption:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return AjaxResult.success(questionSubjectOptionService.selectQuestionSubjectOptionById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增问卷题目选项答案
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubjectOption:add')")
|
||||||
|
@Log(title = "问卷题目选项答案", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody QuestionSubjectOption questionSubjectOption) {
|
||||||
|
return toAjax(questionSubjectOptionService.insertQuestionSubjectOption(questionSubjectOption));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改问卷题目选项答案
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubjectOption:edit')")
|
||||||
|
@Log(title = "问卷题目选项答案", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody QuestionSubjectOption questionSubjectOption) {
|
||||||
|
return toAjax(questionSubjectOptionService.updateQuestionSubjectOption(questionSubjectOption));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除问卷题目选项答案
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:questionSubjectOption:remove')")
|
||||||
|
@Log(title = "问卷题目选项答案", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(questionSubjectOptionService.deleteQuestionSubjectOptionByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,184 @@
|
|||||||
|
package com.xinelu.manage.domain.questionsubject;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.Excel;
|
||||||
|
import com.xinelu.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目信息对象 question_subject
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-02-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "问卷题目信息对象", description = "question_subject")
|
||||||
|
public class QuestionSubject extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷表id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问卷表id")
|
||||||
|
@Excel(name = "问卷表id")
|
||||||
|
private Long questionInfoId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 题目序号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "题目序号")
|
||||||
|
@Excel(name = "题目序号")
|
||||||
|
private Integer questionNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 题目类型,单选题:MULTIPLE_CHOICE,多选题:MULTIPLE_CHOICE_QUESTIONS,填空题:FILL_IN_THE_BLANKS,打分题:SCORING_QUESTIONS,
|
||||||
|
* 组合单选题:COMBINATION_RADIO_SUBJECT,组合多选题:COMBINATION_MULTIPLE_SUBJECT,组合填空题:COMBINATION_BLANKS_SUBJECT,
|
||||||
|
* 组合打分题:COMBINATION_SCORING_SUBJECT,日期填空题:DATE_BLANKS_SUBJECT,时间填空题:TIME_BLANKS_SUBJECT
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "题目类型,单选题:MULTIPLE_CHOICE,多选题:MULTIPLE_CHOICE_QUESTIONS,填空题:FILL_IN_THE_BLANKS,打分题:SCORING_QUESTIONS,组合单选题:COMBINATION_RADIO_SUBJECT,组合多选题:COMBINATION_MULTIPLE_SUBJECT,组合填空题:COMBINATION_BLANKS_SUBJECT, 组合打分题:COMBINATION_SCORING_SUBJECT,日期填空题:DATE_BLANKS_SUBJECT,时间填空题:TIME_BLANKS_SUBJECT")
|
||||||
|
@Excel(name = "题目类型,单选题:MULTIPLE_CHOICE,多选题:MULTIPLE_CHOICE_QUESTIONS,填空题:FILL_IN_THE_BLANKS,打分题:SCORING_QUESTIONS, 组合单选题:COMBINATION_RADIO_SUBJECT,组合多选题:COMBINATION_MULTIPLE_SUBJECT,组合填空题:COMBINATION_BLANKS_SUBJECT, 组合打分题:COMBINATION_SCORING_SUBJECT,日期填空题:DATE_BLANKS_SUBJECT,时间填空题:TIME_BLANKS_SUBJECT")
|
||||||
|
private String questionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 题目名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "题目名称")
|
||||||
|
@Excel(name = "题目名称")
|
||||||
|
private String questionName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 题目说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "题目说明")
|
||||||
|
@Excel(name = "题目说明")
|
||||||
|
private String questionDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填写说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "填写说明")
|
||||||
|
@Excel(name = "填写说明")
|
||||||
|
private String writeDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回答(填空题)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "回答")
|
||||||
|
@Excel(name = "回答", readConverterExp = "填=空题")
|
||||||
|
private String fillBlanksAnswer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选项个数(打分题)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "选项个数")
|
||||||
|
@Excel(name = "选项个数", readConverterExp = "打=分题")
|
||||||
|
private Integer optionCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否计分,0:否,1:是
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否计分,0:否,1:是")
|
||||||
|
@Excel(name = "是否计分,0:否,1:是")
|
||||||
|
private Integer whetherScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计分方式,每个选项都有对应分值:NOT_UNIQUE_ANSWER,全部答对才得分:UNIQUE_ANSWER
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计分方式,每个选项都有对应分值:NOT_UNIQUE_ANSWER,全部答对才得分:UNIQUE_ANSWER")
|
||||||
|
@Excel(name = "计分方式,每个选项都有对应分值:NOT_UNIQUE_ANSWER,全部答对才得分:UNIQUE_ANSWER")
|
||||||
|
private String scoringMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计分说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计分说明")
|
||||||
|
@Excel(name = "计分说明")
|
||||||
|
private String scoringDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 题目分值
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "题目分值")
|
||||||
|
@Excel(name = "题目分值")
|
||||||
|
private BigDecimal questionScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义触发条件
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "自定义触发条件")
|
||||||
|
@Excel(name = "自定义触发条件")
|
||||||
|
private String customTriggerCondition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属宣教表id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所属宣教表id")
|
||||||
|
@Excel(name = "所属宣教表id")
|
||||||
|
private Long propagandaInfoId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宣教标题(宣教名称)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "宣教标题")
|
||||||
|
@Excel(name = "宣教标题", readConverterExp = "宣=教名称")
|
||||||
|
private String propagandaTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 题目排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "题目排序")
|
||||||
|
@Excel(name = "题目排序")
|
||||||
|
private Integer questionSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 题目备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "题目备注")
|
||||||
|
@Excel(name = "题目备注")
|
||||||
|
private String questionRemark;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("questionInfoId", getQuestionInfoId())
|
||||||
|
.append("questionNumber", getQuestionNumber())
|
||||||
|
.append("questionType", getQuestionType())
|
||||||
|
.append("questionName", getQuestionName())
|
||||||
|
.append("questionDescription", getQuestionDescription())
|
||||||
|
.append("writeDescription", getWriteDescription())
|
||||||
|
.append("fillBlanksAnswer", getFillBlanksAnswer())
|
||||||
|
.append("optionCount", getOptionCount())
|
||||||
|
.append("whetherScore", getWhetherScore())
|
||||||
|
.append("scoringMethod", getScoringMethod())
|
||||||
|
.append("scoringDescription", getScoringDescription())
|
||||||
|
.append("questionScore", getQuestionScore())
|
||||||
|
.append("customTriggerCondition", getCustomTriggerCondition())
|
||||||
|
.append("propagandaInfoId", getPropagandaInfoId())
|
||||||
|
.append("propagandaTitle", getPropagandaTitle())
|
||||||
|
.append("questionSort", getQuestionSort())
|
||||||
|
.append("questionRemark", getQuestionRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,102 @@
|
|||||||
|
package com.xinelu.manage.domain.questionsubjectoption;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.Excel;
|
||||||
|
import com.xinelu.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目选项答案对象 question_subject_option
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-02-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "问卷题目选项答案对象", description = "question_subject_option")
|
||||||
|
public class QuestionSubjectOption extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目表id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问卷题目表id")
|
||||||
|
@Excel(name = "问卷题目表id")
|
||||||
|
private Long questionnaireSubjectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 题目名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "题目名称")
|
||||||
|
@Excel(name = "题目名称")
|
||||||
|
private String questionName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选项名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "选项名称")
|
||||||
|
@Excel(name = "选项名称")
|
||||||
|
private String optionName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选项答案
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "选项答案")
|
||||||
|
@Excel(name = "选项答案")
|
||||||
|
private String optionAnswer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选项分值
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "选项分值")
|
||||||
|
@Excel(name = "选项分值")
|
||||||
|
private BigDecimal optionScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选项排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "选项排序")
|
||||||
|
@Excel(name = "选项排序")
|
||||||
|
private Integer optionSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选项备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "选项备注")
|
||||||
|
@Excel(name = "选项备注")
|
||||||
|
private String optionRemark;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("questionnaireSubjectId", getQuestionnaireSubjectId())
|
||||||
|
.append("questionName", getQuestionName())
|
||||||
|
.append("optionName", getOptionName())
|
||||||
|
.append("optionAnswer", getOptionAnswer())
|
||||||
|
.append("optionScore", getOptionScore())
|
||||||
|
.append("optionSort", getOptionSort())
|
||||||
|
.append("optionRemark", getOptionRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.xinelu.manage.mapper.questionsubject;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.questionsubject.QuestionSubject;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-02-29
|
||||||
|
*/
|
||||||
|
public interface QuestionSubjectMapper {
|
||||||
|
/**
|
||||||
|
* 查询问卷题目信息
|
||||||
|
*
|
||||||
|
* @param id 问卷题目信息主键
|
||||||
|
* @return 问卷题目信息
|
||||||
|
*/
|
||||||
|
QuestionSubject selectQuestionSubjectById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问卷题目信息列表
|
||||||
|
*
|
||||||
|
* @param questionSubject 问卷题目信息
|
||||||
|
* @return 问卷题目信息集合
|
||||||
|
*/
|
||||||
|
List<QuestionSubject> selectQuestionSubjectList(QuestionSubject questionSubject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增问卷题目信息
|
||||||
|
*
|
||||||
|
* @param questionSubject 问卷题目信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertQuestionSubject(QuestionSubject questionSubject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改问卷题目信息
|
||||||
|
*
|
||||||
|
* @param questionSubject 问卷题目信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateQuestionSubject(QuestionSubject questionSubject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除问卷题目信息
|
||||||
|
*
|
||||||
|
* @param id 问卷题目信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteQuestionSubjectById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除问卷题目信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteQuestionSubjectByIds(Long[] ids);
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.xinelu.manage.mapper.questionsubjectoption;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目选项答案Mapper接口
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-02-29
|
||||||
|
*/
|
||||||
|
public interface QuestionSubjectOptionMapper {
|
||||||
|
/**
|
||||||
|
* 查询问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param id 问卷题目选项答案主键
|
||||||
|
* @return 问卷题目选项答案
|
||||||
|
*/
|
||||||
|
QuestionSubjectOption selectQuestionSubjectOptionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问卷题目选项答案列表
|
||||||
|
*
|
||||||
|
* @param questionSubjectOption 问卷题目选项答案
|
||||||
|
* @return 问卷题目选项答案集合
|
||||||
|
*/
|
||||||
|
List<QuestionSubjectOption> selectQuestionSubjectOptionList(QuestionSubjectOption questionSubjectOption);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param questionSubjectOption 问卷题目选项答案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertQuestionSubjectOption(QuestionSubjectOption questionSubjectOption);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param questionSubjectOption 问卷题目选项答案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateQuestionSubjectOption(QuestionSubjectOption questionSubjectOption);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param id 问卷题目选项答案主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteQuestionSubjectOptionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteQuestionSubjectOptionByIds(Long[] ids);
|
||||||
|
}
|
||||||
@ -69,7 +69,11 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertDepartment(Department department) {
|
public int insertDepartment(Department department) {
|
||||||
|
if (Objects.isNull(department.getParentDepartmentId())){
|
||||||
|
department.setParentDepartmentId(0L);
|
||||||
|
}
|
||||||
department.setCreateTime(DateUtils.getNowDate());
|
department.setCreateTime(DateUtils.getNowDate());
|
||||||
|
department.setCreateBy(SecurityUtils.getUsername());
|
||||||
return departmentMapper.insertDepartment(department);
|
return departmentMapper.insertDepartment(department);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.xinelu.manage.service.questionsubject;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.questionsubject.QuestionSubject;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目信息Service接口
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-02-29
|
||||||
|
*/
|
||||||
|
public interface IQuestionSubjectService {
|
||||||
|
/**
|
||||||
|
* 查询问卷题目信息
|
||||||
|
*
|
||||||
|
* @param id 问卷题目信息主键
|
||||||
|
* @return 问卷题目信息
|
||||||
|
*/
|
||||||
|
QuestionSubject selectQuestionSubjectById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问卷题目信息列表
|
||||||
|
*
|
||||||
|
* @param questionSubject 问卷题目信息
|
||||||
|
* @return 问卷题目信息集合
|
||||||
|
*/
|
||||||
|
List<QuestionSubject> selectQuestionSubjectList(QuestionSubject questionSubject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增问卷题目信息
|
||||||
|
*
|
||||||
|
* @param questionSubject 问卷题目信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertQuestionSubject(QuestionSubject questionSubject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改问卷题目信息
|
||||||
|
*
|
||||||
|
* @param questionSubject 问卷题目信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateQuestionSubject(QuestionSubject questionSubject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除问卷题目信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的问卷题目信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteQuestionSubjectByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除问卷题目信息信息
|
||||||
|
*
|
||||||
|
* @param id 问卷题目信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteQuestionSubjectById(Long id);
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package com.xinelu.manage.service.questionsubject.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.utils.DateUtils;
|
||||||
|
import com.xinelu.manage.domain.questionsubject.QuestionSubject;
|
||||||
|
import com.xinelu.manage.mapper.questionsubject.QuestionSubjectMapper;
|
||||||
|
import com.xinelu.manage.service.questionsubject.IQuestionSubjectService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-02-29
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class QuestionSubjectServiceImpl implements IQuestionSubjectService {
|
||||||
|
@Resource
|
||||||
|
private QuestionSubjectMapper questionSubjectMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问卷题目信息
|
||||||
|
*
|
||||||
|
* @param id 问卷题目信息主键
|
||||||
|
* @return 问卷题目信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public QuestionSubject selectQuestionSubjectById(Long id) {
|
||||||
|
return questionSubjectMapper.selectQuestionSubjectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问卷题目信息列表
|
||||||
|
*
|
||||||
|
* @param questionSubject 问卷题目信息
|
||||||
|
* @return 问卷题目信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuestionSubject> selectQuestionSubjectList(QuestionSubject questionSubject) {
|
||||||
|
return questionSubjectMapper.selectQuestionSubjectList(questionSubject);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增问卷题目信息
|
||||||
|
*
|
||||||
|
* @param questionSubject 问卷题目信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertQuestionSubject(QuestionSubject questionSubject) {
|
||||||
|
questionSubject.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return questionSubjectMapper.insertQuestionSubject(questionSubject);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改问卷题目信息
|
||||||
|
*
|
||||||
|
* @param questionSubject 问卷题目信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateQuestionSubject(QuestionSubject questionSubject) {
|
||||||
|
questionSubject.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return questionSubjectMapper.updateQuestionSubject(questionSubject);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除问卷题目信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的问卷题目信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteQuestionSubjectByIds(Long[] ids) {
|
||||||
|
return questionSubjectMapper.deleteQuestionSubjectByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除问卷题目信息信息
|
||||||
|
*
|
||||||
|
* @param id 问卷题目信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteQuestionSubjectById(Long id) {
|
||||||
|
return questionSubjectMapper.deleteQuestionSubjectById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.xinelu.manage.service.questionsubjectoption;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目选项答案Service接口
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-02-29
|
||||||
|
*/
|
||||||
|
public interface IQuestionSubjectOptionService {
|
||||||
|
/**
|
||||||
|
* 查询问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param id 问卷题目选项答案主键
|
||||||
|
* @return 问卷题目选项答案
|
||||||
|
*/
|
||||||
|
QuestionSubjectOption selectQuestionSubjectOptionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问卷题目选项答案列表
|
||||||
|
*
|
||||||
|
* @param questionSubjectOption 问卷题目选项答案
|
||||||
|
* @return 问卷题目选项答案集合
|
||||||
|
*/
|
||||||
|
List<QuestionSubjectOption> selectQuestionSubjectOptionList(QuestionSubjectOption questionSubjectOption);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param questionSubjectOption 问卷题目选项答案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertQuestionSubjectOption(QuestionSubjectOption questionSubjectOption);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param questionSubjectOption 问卷题目选项答案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateQuestionSubjectOption(QuestionSubjectOption questionSubjectOption);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的问卷题目选项答案主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteQuestionSubjectOptionByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除问卷题目选项答案信息
|
||||||
|
*
|
||||||
|
* @param id 问卷题目选项答案主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteQuestionSubjectOptionById(Long id);
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package com.xinelu.manage.service.questionsubjectoption.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.utils.DateUtils;
|
||||||
|
import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption;
|
||||||
|
import com.xinelu.manage.mapper.questionsubjectoption.QuestionSubjectOptionMapper;
|
||||||
|
import com.xinelu.manage.service.questionsubjectoption.IQuestionSubjectOptionService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目选项答案Service业务层处理
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-02-29
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class QuestionSubjectOptionServiceImpl implements IQuestionSubjectOptionService {
|
||||||
|
@Resource
|
||||||
|
private QuestionSubjectOptionMapper questionSubjectOptionMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param id 问卷题目选项答案主键
|
||||||
|
* @return 问卷题目选项答案
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public QuestionSubjectOption selectQuestionSubjectOptionById(Long id) {
|
||||||
|
return questionSubjectOptionMapper.selectQuestionSubjectOptionById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询问卷题目选项答案列表
|
||||||
|
*
|
||||||
|
* @param questionSubjectOption 问卷题目选项答案
|
||||||
|
* @return 问卷题目选项答案
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuestionSubjectOption> selectQuestionSubjectOptionList(QuestionSubjectOption questionSubjectOption) {
|
||||||
|
return questionSubjectOptionMapper.selectQuestionSubjectOptionList(questionSubjectOption);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param questionSubjectOption 问卷题目选项答案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertQuestionSubjectOption(QuestionSubjectOption questionSubjectOption) {
|
||||||
|
questionSubjectOption.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return questionSubjectOptionMapper.insertQuestionSubjectOption(questionSubjectOption);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param questionSubjectOption 问卷题目选项答案
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateQuestionSubjectOption(QuestionSubjectOption questionSubjectOption) {
|
||||||
|
questionSubjectOption.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return questionSubjectOptionMapper.updateQuestionSubjectOption(questionSubjectOption);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除问卷题目选项答案
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的问卷题目选项答案主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteQuestionSubjectOptionByIds(Long[] ids) {
|
||||||
|
return questionSubjectOptionMapper.deleteQuestionSubjectOptionByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除问卷题目选项答案信息
|
||||||
|
*
|
||||||
|
* @param id 问卷题目选项答案主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteQuestionSubjectOptionById(Long id) {
|
||||||
|
return questionSubjectOptionMapper.deleteQuestionSubjectOptionById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,150 @@
|
|||||||
|
package com.xinelu.manage.vo.questioninfo;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.Excel;
|
||||||
|
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷基本信息对象 question_info
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-02-28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "问卷基本信息对象", description = "question_info")
|
||||||
|
public class QuestionVO extends QuestionInfo {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属科室id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所属科室id")
|
||||||
|
@Excel(name = "所属科室id")
|
||||||
|
private Long departmentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属科室名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所属科室名称")
|
||||||
|
@Excel(name = "所属科室名称")
|
||||||
|
private String departmentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 病种id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "病种id")
|
||||||
|
@Excel(name = "病种id")
|
||||||
|
private Long diseaseTypeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 病种名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "病种名称")
|
||||||
|
@Excel(name = "病种名称")
|
||||||
|
private String diseaseTypeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷标题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问卷标题")
|
||||||
|
@Excel(name = "问卷标题")
|
||||||
|
private String questionnaireName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问卷说明")
|
||||||
|
@Excel(name = "问卷说明")
|
||||||
|
private String questionnaireDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作答方式,一页一题:ONE_PAGE_ONE_QUESTION,非一页一题:NOT_ONE_PAGE_ONE_QUESTION
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "作答方式,一页一题:ONE_PAGE_ONE_QUESTION,非一页一题:NOT_ONE_PAGE_ONE_QUESTION")
|
||||||
|
@Excel(name = "作答方式,一页一题:ONE_PAGE_ONE_QUESTION,非一页一题:NOT_ONE_PAGE_ONE_QUESTION")
|
||||||
|
private String answeringMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问卷ID")
|
||||||
|
@Excel(name = "问卷ID")
|
||||||
|
private String questionnaireId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题个数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问题个数")
|
||||||
|
@Excel(name = "问题个数")
|
||||||
|
private Integer questionCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷总分值,小数点后两位
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问卷总分值,小数点后两位")
|
||||||
|
@Excel(name = "问卷总分值,小数点后两位")
|
||||||
|
private BigDecimal questionnaireTotalScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷状态,已发布:PUBLISHED,未发布:UNPUBLISHED
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问卷状态,已发布:PUBLISHED,未发布:UNPUBLISHED")
|
||||||
|
@Excel(name = "问卷状态,已发布:PUBLISHED,未发布:UNPUBLISHED")
|
||||||
|
private String questionnaireStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问卷排序")
|
||||||
|
@Excel(name = "问卷排序")
|
||||||
|
private Integer questionnaireSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷备注信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问卷备注信息")
|
||||||
|
@Excel(name = "问卷备注信息")
|
||||||
|
private String questionnaireRemark;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("departmentId", getDepartmentId())
|
||||||
|
.append("departmentName", getDepartmentName())
|
||||||
|
.append("diseaseTypeId", getDiseaseTypeId())
|
||||||
|
.append("diseaseTypeName", getDiseaseTypeName())
|
||||||
|
.append("questionnaireName", getQuestionnaireName())
|
||||||
|
.append("questionnaireDescription", getQuestionnaireDescription())
|
||||||
|
.append("answeringMethod", getAnsweringMethod())
|
||||||
|
.append("questionnaireId", getQuestionnaireId())
|
||||||
|
.append("questionCount", getQuestionCount())
|
||||||
|
.append("questionnaireTotalScore", getQuestionnaireTotalScore())
|
||||||
|
.append("questionnaireStatus", getQuestionnaireStatus())
|
||||||
|
.append("questionnaireSort", getQuestionnaireSort())
|
||||||
|
.append("questionnaireRemark", getQuestionnaireRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,272 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.xinelu.manage.mapper.questionsubject.QuestionSubjectMapper">
|
||||||
|
|
||||||
|
<resultMap type="QuestionSubject" id="QuestionSubjectResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="questionInfoId" column="question_info_id"/>
|
||||||
|
<result property="questionNumber" column="question_number"/>
|
||||||
|
<result property="questionType" column="question_type"/>
|
||||||
|
<result property="questionName" column="question_name"/>
|
||||||
|
<result property="questionDescription" column="question_description"/>
|
||||||
|
<result property="writeDescription" column="write_description"/>
|
||||||
|
<result property="fillBlanksAnswer" column="fill_blanks_answer"/>
|
||||||
|
<result property="optionCount" column="option_count"/>
|
||||||
|
<result property="whetherScore" column="whether_score"/>
|
||||||
|
<result property="scoringMethod" column="scoring_method"/>
|
||||||
|
<result property="scoringDescription" column="scoring_description"/>
|
||||||
|
<result property="questionScore" column="question_score"/>
|
||||||
|
<result property="customTriggerCondition" column="custom_trigger_condition"/>
|
||||||
|
<result property="propagandaInfoId" column="propaganda_info_id"/>
|
||||||
|
<result property="propagandaTitle" column="propaganda_title"/>
|
||||||
|
<result property="questionSort" column="question_sort"/>
|
||||||
|
<result property="questionRemark" column="question_remark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectQuestionSubjectVo">
|
||||||
|
select id, question_info_id, question_number, question_type, question_name, question_description, write_description, fill_blanks_answer, option_count, whether_score, scoring_method, scoring_description, question_score, custom_trigger_condition, propaganda_info_id, propaganda_title, question_sort, question_remark, create_by, create_time, update_by, update_time from question_subject
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectQuestionSubjectList" parameterType="QuestionSubject" resultMap="QuestionSubjectResult">
|
||||||
|
<include refid="selectQuestionSubjectVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="questionInfoId != null ">
|
||||||
|
and question_info_id = #{questionInfoId}
|
||||||
|
</if>
|
||||||
|
<if test="questionNumber != null ">
|
||||||
|
and question_number = #{questionNumber}
|
||||||
|
</if>
|
||||||
|
<if test="questionType != null and questionType != ''">
|
||||||
|
and question_type = #{questionType}
|
||||||
|
</if>
|
||||||
|
<if test="questionName != null and questionName != ''">
|
||||||
|
and question_name like concat('%', #{questionName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="questionDescription != null and questionDescription != ''">
|
||||||
|
and question_description = #{questionDescription}
|
||||||
|
</if>
|
||||||
|
<if test="writeDescription != null and writeDescription != ''">
|
||||||
|
and write_description = #{writeDescription}
|
||||||
|
</if>
|
||||||
|
<if test="fillBlanksAnswer != null and fillBlanksAnswer != ''">
|
||||||
|
and fill_blanks_answer = #{fillBlanksAnswer}
|
||||||
|
</if>
|
||||||
|
<if test="optionCount != null ">
|
||||||
|
and option_count = #{optionCount}
|
||||||
|
</if>
|
||||||
|
<if test="whetherScore != null ">
|
||||||
|
and whether_score = #{whetherScore}
|
||||||
|
</if>
|
||||||
|
<if test="scoringMethod != null and scoringMethod != ''">
|
||||||
|
and scoring_method = #{scoringMethod}
|
||||||
|
</if>
|
||||||
|
<if test="scoringDescription != null and scoringDescription != ''">
|
||||||
|
and scoring_description = #{scoringDescription}
|
||||||
|
</if>
|
||||||
|
<if test="questionScore != null ">
|
||||||
|
and question_score = #{questionScore}
|
||||||
|
</if>
|
||||||
|
<if test="customTriggerCondition != null and customTriggerCondition != ''">
|
||||||
|
and custom_trigger_condition = #{customTriggerCondition}
|
||||||
|
</if>
|
||||||
|
<if test="propagandaInfoId != null ">
|
||||||
|
and propaganda_info_id = #{propagandaInfoId}
|
||||||
|
</if>
|
||||||
|
<if test="propagandaTitle != null and propagandaTitle != ''">
|
||||||
|
and propaganda_title = #{propagandaTitle}
|
||||||
|
</if>
|
||||||
|
<if test="questionSort != null ">
|
||||||
|
and question_sort = #{questionSort}
|
||||||
|
</if>
|
||||||
|
<if test="questionRemark != null and questionRemark != ''">
|
||||||
|
and question_remark = #{questionRemark}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectQuestionSubjectById" parameterType="Long"
|
||||||
|
resultMap="QuestionSubjectResult">
|
||||||
|
<include refid="selectQuestionSubjectVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertQuestionSubject" parameterType="QuestionSubject" useGeneratedKeys="true"
|
||||||
|
keyProperty="id">
|
||||||
|
insert into question_subject
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="questionInfoId != null">question_info_id,
|
||||||
|
</if>
|
||||||
|
<if test="questionNumber != null">question_number,
|
||||||
|
</if>
|
||||||
|
<if test="questionType != null">question_type,
|
||||||
|
</if>
|
||||||
|
<if test="questionName != null">question_name,
|
||||||
|
</if>
|
||||||
|
<if test="questionDescription != null">question_description,
|
||||||
|
</if>
|
||||||
|
<if test="writeDescription != null">write_description,
|
||||||
|
</if>
|
||||||
|
<if test="fillBlanksAnswer != null">fill_blanks_answer,
|
||||||
|
</if>
|
||||||
|
<if test="optionCount != null">option_count,
|
||||||
|
</if>
|
||||||
|
<if test="whetherScore != null">whether_score,
|
||||||
|
</if>
|
||||||
|
<if test="scoringMethod != null">scoring_method,
|
||||||
|
</if>
|
||||||
|
<if test="scoringDescription != null">scoring_description,
|
||||||
|
</if>
|
||||||
|
<if test="questionScore != null">question_score,
|
||||||
|
</if>
|
||||||
|
<if test="customTriggerCondition != null">custom_trigger_condition,
|
||||||
|
</if>
|
||||||
|
<if test="propagandaInfoId != null">propaganda_info_id,
|
||||||
|
</if>
|
||||||
|
<if test="propagandaTitle != null">propaganda_title,
|
||||||
|
</if>
|
||||||
|
<if test="questionSort != null">question_sort,
|
||||||
|
</if>
|
||||||
|
<if test="questionRemark != null">question_remark,
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">create_by,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">update_by,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">update_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="questionInfoId != null">#{questionInfoId},
|
||||||
|
</if>
|
||||||
|
<if test="questionNumber != null">#{questionNumber},
|
||||||
|
</if>
|
||||||
|
<if test="questionType != null">#{questionType},
|
||||||
|
</if>
|
||||||
|
<if test="questionName != null">#{questionName},
|
||||||
|
</if>
|
||||||
|
<if test="questionDescription != null">#{questionDescription},
|
||||||
|
</if>
|
||||||
|
<if test="writeDescription != null">#{writeDescription},
|
||||||
|
</if>
|
||||||
|
<if test="fillBlanksAnswer != null">#{fillBlanksAnswer},
|
||||||
|
</if>
|
||||||
|
<if test="optionCount != null">#{optionCount},
|
||||||
|
</if>
|
||||||
|
<if test="whetherScore != null">#{whetherScore},
|
||||||
|
</if>
|
||||||
|
<if test="scoringMethod != null">#{scoringMethod},
|
||||||
|
</if>
|
||||||
|
<if test="scoringDescription != null">#{scoringDescription},
|
||||||
|
</if>
|
||||||
|
<if test="questionScore != null">#{questionScore},
|
||||||
|
</if>
|
||||||
|
<if test="customTriggerCondition != null">#{customTriggerCondition},
|
||||||
|
</if>
|
||||||
|
<if test="propagandaInfoId != null">#{propagandaInfoId},
|
||||||
|
</if>
|
||||||
|
<if test="propagandaTitle != null">#{propagandaTitle},
|
||||||
|
</if>
|
||||||
|
<if test="questionSort != null">#{questionSort},
|
||||||
|
</if>
|
||||||
|
<if test="questionRemark != null">#{questionRemark},
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">#{createBy},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateQuestionSubject" parameterType="QuestionSubject">
|
||||||
|
update question_subject
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="questionInfoId != null">question_info_id =
|
||||||
|
#{questionInfoId},
|
||||||
|
</if>
|
||||||
|
<if test="questionNumber != null">question_number =
|
||||||
|
#{questionNumber},
|
||||||
|
</if>
|
||||||
|
<if test="questionType != null">question_type =
|
||||||
|
#{questionType},
|
||||||
|
</if>
|
||||||
|
<if test="questionName != null">question_name =
|
||||||
|
#{questionName},
|
||||||
|
</if>
|
||||||
|
<if test="questionDescription != null">question_description =
|
||||||
|
#{questionDescription},
|
||||||
|
</if>
|
||||||
|
<if test="writeDescription != null">write_description =
|
||||||
|
#{writeDescription},
|
||||||
|
</if>
|
||||||
|
<if test="fillBlanksAnswer != null">fill_blanks_answer =
|
||||||
|
#{fillBlanksAnswer},
|
||||||
|
</if>
|
||||||
|
<if test="optionCount != null">option_count =
|
||||||
|
#{optionCount},
|
||||||
|
</if>
|
||||||
|
<if test="whetherScore != null">whether_score =
|
||||||
|
#{whetherScore},
|
||||||
|
</if>
|
||||||
|
<if test="scoringMethod != null">scoring_method =
|
||||||
|
#{scoringMethod},
|
||||||
|
</if>
|
||||||
|
<if test="scoringDescription != null">scoring_description =
|
||||||
|
#{scoringDescription},
|
||||||
|
</if>
|
||||||
|
<if test="questionScore != null">question_score =
|
||||||
|
#{questionScore},
|
||||||
|
</if>
|
||||||
|
<if test="customTriggerCondition != null">custom_trigger_condition =
|
||||||
|
#{customTriggerCondition},
|
||||||
|
</if>
|
||||||
|
<if test="propagandaInfoId != null">propaganda_info_id =
|
||||||
|
#{propagandaInfoId},
|
||||||
|
</if>
|
||||||
|
<if test="propagandaTitle != null">propaganda_title =
|
||||||
|
#{propagandaTitle},
|
||||||
|
</if>
|
||||||
|
<if test="questionSort != null">question_sort =
|
||||||
|
#{questionSort},
|
||||||
|
</if>
|
||||||
|
<if test="questionRemark != null">question_remark =
|
||||||
|
#{questionRemark},
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">create_by =
|
||||||
|
#{createBy},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">create_time =
|
||||||
|
#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">update_by =
|
||||||
|
#{updateBy},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">update_time =
|
||||||
|
#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteQuestionSubjectById" parameterType="Long">
|
||||||
|
delete from question_subject where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteQuestionSubjectByIds" parameterType="String">
|
||||||
|
delete from question_subject where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,177 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.xinelu.manage.mapper.questionsubjectoption.QuestionSubjectOptionMapper">
|
||||||
|
|
||||||
|
<resultMap type="QuestionSubjectOption" id="QuestionSubjectOptionResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="questionnaireSubjectId" column="questionnaire_subject_id"/>
|
||||||
|
<result property="questionName" column="question_name"/>
|
||||||
|
<result property="optionName" column="option_name"/>
|
||||||
|
<result property="optionAnswer" column="option_answer"/>
|
||||||
|
<result property="optionScore" column="option_score"/>
|
||||||
|
<result property="optionSort" column="option_sort"/>
|
||||||
|
<result property="optionRemark" column="option_remark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectQuestionSubjectOptionVo">
|
||||||
|
select id,
|
||||||
|
questionnaire_subject_id,
|
||||||
|
question_name,
|
||||||
|
option_name,
|
||||||
|
option_answer,
|
||||||
|
option_score,
|
||||||
|
option_sort,
|
||||||
|
option_remark,
|
||||||
|
create_by,
|
||||||
|
create_time,
|
||||||
|
update_by,
|
||||||
|
update_time
|
||||||
|
from question_subject_option
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectQuestionSubjectOptionList" parameterType="QuestionSubjectOption"
|
||||||
|
resultMap="QuestionSubjectOptionResult">
|
||||||
|
<include refid="selectQuestionSubjectOptionVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="questionnaireSubjectId != null ">
|
||||||
|
and questionnaire_subject_id = #{questionnaireSubjectId}
|
||||||
|
</if>
|
||||||
|
<if test="questionName != null and questionName != ''">
|
||||||
|
and question_name like concat('%', #{questionName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="optionName != null and optionName != ''">
|
||||||
|
and option_name like concat('%', #{optionName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="optionAnswer != null and optionAnswer != ''">
|
||||||
|
and option_answer = #{optionAnswer}
|
||||||
|
</if>
|
||||||
|
<if test="optionScore != null ">
|
||||||
|
and option_score = #{optionScore}
|
||||||
|
</if>
|
||||||
|
<if test="optionSort != null ">
|
||||||
|
and option_sort = #{optionSort}
|
||||||
|
</if>
|
||||||
|
<if test="optionRemark != null and optionRemark != ''">
|
||||||
|
and option_remark = #{optionRemark}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectQuestionSubjectOptionById" parameterType="Long"
|
||||||
|
resultMap="QuestionSubjectOptionResult">
|
||||||
|
<include refid="selectQuestionSubjectOptionVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertQuestionSubjectOption" parameterType="QuestionSubjectOption" useGeneratedKeys="true"
|
||||||
|
keyProperty="id">
|
||||||
|
insert into question_subject_option
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="questionnaireSubjectId != null">questionnaire_subject_id,
|
||||||
|
</if>
|
||||||
|
<if test="questionName != null">question_name,
|
||||||
|
</if>
|
||||||
|
<if test="optionName != null">option_name,
|
||||||
|
</if>
|
||||||
|
<if test="optionAnswer != null">option_answer,
|
||||||
|
</if>
|
||||||
|
<if test="optionScore != null">option_score,
|
||||||
|
</if>
|
||||||
|
<if test="optionSort != null">option_sort,
|
||||||
|
</if>
|
||||||
|
<if test="optionRemark != null">option_remark,
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">create_by,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">update_by,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">update_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="questionnaireSubjectId != null">#{questionnaireSubjectId},
|
||||||
|
</if>
|
||||||
|
<if test="questionName != null">#{questionName},
|
||||||
|
</if>
|
||||||
|
<if test="optionName != null">#{optionName},
|
||||||
|
</if>
|
||||||
|
<if test="optionAnswer != null">#{optionAnswer},
|
||||||
|
</if>
|
||||||
|
<if test="optionScore != null">#{optionScore},
|
||||||
|
</if>
|
||||||
|
<if test="optionSort != null">#{optionSort},
|
||||||
|
</if>
|
||||||
|
<if test="optionRemark != null">#{optionRemark},
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">#{createBy},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateQuestionSubjectOption" parameterType="QuestionSubjectOption">
|
||||||
|
update question_subject_option
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="questionnaireSubjectId != null">questionnaire_subject_id =
|
||||||
|
#{questionnaireSubjectId},
|
||||||
|
</if>
|
||||||
|
<if test="questionName != null">question_name =
|
||||||
|
#{questionName},
|
||||||
|
</if>
|
||||||
|
<if test="optionName != null">option_name =
|
||||||
|
#{optionName},
|
||||||
|
</if>
|
||||||
|
<if test="optionAnswer != null">option_answer =
|
||||||
|
#{optionAnswer},
|
||||||
|
</if>
|
||||||
|
<if test="optionScore != null">option_score =
|
||||||
|
#{optionScore},
|
||||||
|
</if>
|
||||||
|
<if test="optionSort != null">option_sort =
|
||||||
|
#{optionSort},
|
||||||
|
</if>
|
||||||
|
<if test="optionRemark != null">option_remark =
|
||||||
|
#{optionRemark},
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">create_by =
|
||||||
|
#{createBy},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">create_time =
|
||||||
|
#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">update_by =
|
||||||
|
#{updateBy},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">update_time =
|
||||||
|
#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteQuestionSubjectOptionById" parameterType="Long">
|
||||||
|
delete
|
||||||
|
from question_subject_option
|
||||||
|
where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteQuestionSubjectOptionByIds" parameterType="String">
|
||||||
|
delete from question_subject_option where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user