当前位置: 首页 > news >正文

若依 Excel导入与导出 配置下拉选项


    /**
     * 题目类型(字典配置)
     */
    @Excel(name = "题目类型(字典配置)", readConverterExp = "117=试卷类型1,118=试卷类型2,119=试卷类型3,120=试卷类型4", combo = "试卷类型1,试卷类型2,试卷类型3,试卷类型4")
    private String questionTypeId;

注意:下拉选项的字段必须是字符串类型


    /**
     * 成绩录入
     *
     * @param file
     * @return
     * @throws Exception
     */
    @ApiOperation("试题录入")
    @PostMapping("/common/scoreEntry")
    public AjaxResult scoreEntry(MultipartFile file) throws Exception {
        ExcelUtil<ExamQuestion> util = new ExcelUtil<>(ExamQuestion.class);
        List<ExamQuestion> userList = util.importExcel(file.getInputStream());

//        String message = bkRegistrationInfoService.importExcel(userList,updateSupport);
        return AjaxResult.success(JSONUtil.toJsonStr(userList));
    }


    /**
     * 导出试题模版
     */
    @PreAuthorize("@ss.hasPermi('system:info:export')")
    @Log(title = "导出试题模版", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response) {
        List<ExamQuestion> list = new ArrayList<>();
        ExcelUtil<ExamQuestion> util = new ExcelUtil<>(ExamQuestion.class);
        util.exportExcel(response, list, "报名信息数据");
    }

相关文章:

  • 通过蒸馏大模型训练建筑向智能助手模型的思路
  • 63. 根文件系统构建
  • STM32 模拟SPI 模式0
  • 大模型+知识图谱:赋能知识智能新升级
  • Harmony OS【获取本地json数据的方法】
  • 【el-upload】el-upload组件 - list-type=“picture“ 时,文件预览展示优化
  • dfs(二十)257. 二叉树的所有路径
  • /proc/[pid]/maps介绍和pmap介绍、RSS
  • 《深入理解 TypeScript:函数类型与泛型全解析》(万字长文)
  • 【MyDB】5-索引管理之 1-索引管理思路概览
  • Centos7配置本地yum源
  • 大白话读懂java对象创建的过程
  • 织梦DedeCMS数据库表说明大全
  • django入门教程之request和reponse【二】
  • Windows 图形显示驱动开发-WDDM 3.0功能- 硬件翻转队列(六)
  • 联想拯救者触摸板会每次开机都自动关闭、联想笔记本触摸板关闭、笔记本电脑触摸板自动关闭的解决方法
  • 演员马晓琳正式加入创星演员出道计划,开启演艺事业新篇章
  • 基于YOLOv8与ByteTrack的车辆行人多目标检测与追踪系统
  • @maptalks/gl-layers中的VectorTileLayer的setStyle属性的全部line配置
  • 群体智能优化算法-模拟退火优化算法(Simulated Annealing, SA,含Matlab源代码)