• 周六. 5月 4th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

导出excel类型转换

admin

11月 28, 2021
        Map headmap = new LinkedHashMap<String, String>();
        headmap.put("createtime", "日期");
        headmap.put("orderno", "案件号");
        headmap.put("vin", "vin码");
        headmap.put("nickname", "用户姓名");
        headmap.put("orderno", "案件号");
        headmap.put("province", "");
        headmap.put("city", "");
        headmap.put("user_address", "救援位置");
        headmap.put("service_name", "服务项目");
        headmap.put("distance", "救援里程");
        headmap.put("order_status", "订单状态");
        headmap.put("sign_time", "完成时间");
        List<SysDictData> dictList = dict.getType("order_status");
        Map statusMap = dictList.stream()
                .collect(Collectors.toMap(SysDictData::getDictValue, SysDictData::getDictLabel));
        List<Map> data = sqlMapper.getOrderReport(map);
        data.forEach(o -> {
            String s = o.get("order_status").toString();
            o.put("order_status", statusMap.get(s));
        });
        FileUtil.down(headmap, data);

有追求,才有动力!

向每一个软件工程师致敬!

by wujf

mail:[email protected]

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注