S
泪眼模糊,红脸涨红,白眼翻飞,她为何紧咬铁球不放?
首页
速度
优化工具
☰
首页
速度
收录
工具
首页
/
速度优化
/
探索“铜铜铜铜铜铜铜铜好大好深色”的无限魅力
网站优化
纲手179902vs152379:一场跨越数字维度的传奇对决
黄品汇:品味生活,汇聚精彩,一场关于“黄”的极致探索
2026-06-12 05:52:49
阅读时长:8分钟
562次阅读
核心内容摘要
探索不朽的荧幕传奇:苍老师经典作品全集深度解析
查询方法Override public DishAppStallPersonnelPageBaseVo pageList(PageDishAppStallPersonnelPageVo page, DishAppStallPersonnelPageDto pageDto) { // 获取已绑定的收银门店集合 MapString, MutablePairString, StoreInfoListVO storeMap getStoreIds(); ListBaseAttributesJsonVo stallList this.infoService.getAttributesList(List.of(), DishInfoTypeEnum.DISH_INFO_STALL.getCode()); // 校验是否有新增门店 this.checkStallPersonnelStore(stallList, storeMap); // 获取门店id集合 ListString storeIds StrUtil.isNotBlank(pageDto.getKeyword()) ? storeMap.entrySet().stream().filter(entry - entry.getKey().contains(pageDto.getKeyword())).map(entry - entry.getValue().getLeft()).collect(Collectors.toList()) : new ArrayList(storeMap.values().stream().map(MutablePair::getLeft).collect(Collectors.toList())); PageDishAppStallPersonnelPageVo pageList baseMapper.getPageList(page, storeIds); if (CollUtil.isEmpty(pageList.getRecords())) { return DishAppStallPersonnelPageBaseVo.builder() .isStall(CollUtil.isEmpty(stallList) ? 0 :
.pageList(CultivatePage.coverPageList(page)) .build(); } // 设置档口人员列表 pageList.getRecords().forEach(pageListVo - { pageListVo.setStallPersonnelList(JSON.parseArray(pageListVo.getStallPersonnelJson(), BaseAttributesJsonVo.class)); }); //处理每条数据的长度不一样要处理成一样的并且保证顺序一致 processStallPointData(stallList, pageList.getRecords(), storeMap); return DishAppStallPersonnelPageBaseVo.builder() .isStall(CollUtil.isEmpty(stallList) ? 0 :
.pageList(CultivatePage.coverPageList(pageList)) .build(); } public void export(HttpServletResponse response, DishAppStallPersonnelPageDto pageDto) { // 获取已绑定的收银门店集合 MapString, MutablePairString, StoreInfoListVO storeMap getStoreIds(); // 获取获取系统最新档口数据集合(动态渲染列) ListBaseAttributesJsonVo stallList this.infoService.getAttributesList(List.of(), DishInfoTypeEnum.DISH_INFO_STALL.getCode()); // 校验是否有新增门店 this.checkStallPersonnelStore(stallList, storeMap); // 获取门店id集合 ListString storeIds StrUtil.isNotBlank(pageDto.getKeyword()) ? storeMap.entrySet().stream().filter(entry - entry.getKey().contains(pageDto.getKeyword())).map(entry - entry.getValue().getLeft()).collect(Collectors.toList()) : new ArrayList(storeMap.values().stream().map(MutablePair::getLeft).collect(Collectors.toList())); ListDishAppStallPersonnelPageVo summaryVoList this.baseMapper.getDataList(storeIds); if (CollUtil.isNotEmpty(summaryVoList)) { // 设置档口人员列表 summaryVoList.forEach(pageListVo - { pageListVo.setStallPersonnelList(JSON.parseArray(pageListVo.getStallPersonnelJson(), BaseAttributesJsonVo.class)); }); } //处理每条数据的长度不一样要处理成一样的并且保证顺序一致 processStallPointData(stallList, summaryVoList, storeMap); //获取动态表头 ListListString list new ArrayList(); list.add(Collections.singletonList(门店名称)); ListListString headers EasyExcelUtil.getHeaders(stallList, list); //获取动态数据 ListListObject dataList EasyExcelUtil.getDataList(summaryVoList); EasyExcelUtil.rankingExportData(dataList, headers, 档口人员数据, 档口人员数据表, response); }
处理动态列数据/** * 处理每条数据的长度不一样要处理成一样的并且保证顺序一致 * * param attributesJsonVos 档口集合 * param pageListVoList 待处理数据 * param storeMap 门店集合 */ private void processStallPointData(ListBaseAttributesJsonVo attributesJsonVos, ListDishAppStallPersonnelPageVo pageListVoList, MapString, MutablePairString, StoreInfoListVO storeMap) { //获取所有技能点,并且按照sort字段排序 ListBaseAttributesJsonVo sortedStallList attributesJsonVos.stream().sorted(Comparator.comparing(BaseAttributesJsonVo::getSort)).collect(Collectors.toList()); LinkedHashMapString, BaseAttributesJsonVo skillCountVoMap sortedStallList.stream().collect(Collectors.toMap(BaseAttributesJsonVo::getName, baseAttributesJsonVo - baseAttributesJsonVo, (k1, k
- k1, LinkedHashMap::new)); MapString, BaseAttributesJsonVo skillCountMap; MapString, StoreInfoListVO storeInfoMap storeMap.values().stream().collect(Collectors.toMap(MutablePair::getLeft, MutablePair::getRight)); for (DishAppStallPersonnelPageVo pageListVo : pageListVoList) { skillCountMap pageListVo.getStallPersonnelList().stream().collect(Collectors.toMap(BaseAttributesJsonVo::getName, attributesJsonVo - attributesJsonVo, (k1, k
- k
); MapString, BaseAttributesJsonVo baseAttributesJsonVoMap skillCountMap; ListBaseAttributesJsonVo attributesJsonVoList new LinkedList(); skillCountVoMap.forEach((name, skillCountVo) - { if (baseAttributesJsonVoMap.containsKey(name)) { attributesJsonVoList.add(baseAttributesJsonVoMap.get(name)); } else { attributesJsonVoList.add(BaseAttributesJsonVo.builder() .id(skillCountVo.getId()) .sort(skillCountVo.getSort()) .name(skillCountVo.getName()) .value(null).build()); } }); pageListVo.setStallPersonnelList(attributesJsonVoList); pageListVo.setStoreName(storeInfoMap.get(pageListVo.getStoreId()).getName()); } }
导出工具类package com.fantaibao.util; import cn.hutool.core.collection.CollUtil; import cn.hutool.http.Header; import cn.idev.excel.EasyExcel; import cn.idev.excel.util.ListUtils; import com.fantaibao.handler.CustomCellStyleHandler; import com.fantaibao.handler.CustomCellWriteHandler; import com.fantaibao.handler.CustomRowHeightHandler; import com.fantaibao.module.vo.appDish.BaseAttributesJsonVo; import com.fantaibao.module.vo.appDish.DishAppStallPersonnelPageVo; import org.apache.poi.ss.usermodel.*; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.io.InputStream; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.*; /** * easyExcel导入导出工具类 * author yier */ public class EasyExcelUtil { /** * 获取动态表头 * param stallList 数据集合 * param list 已存在的动态表头 * return 返回动态表头 */ public static ListListString getHeaders(ListBaseAttributesJsonVo stallList, ListListString list) { if (CollUtil.isNotEmpty(stallList) CollUtil.isNotEmpty(stallList)) { for (BaseAttributesJsonVo baseAttributesJsonVo : stallList) { ListString head new ArrayList(); head.add(baseAttributesJsonVo.getName()); list.add(head); } } return list; } /** * 获取表内容数据 * param dataList 数据集合 * return 表内容数据 */ public static ListListObject getDataList(ListDishAppStallPersonnelPageVo dataList) { ListListObject list ListUtils.newArrayList(); if (CollUtil.isNotEmpty(dataList)) { for (DishAppStallPersonnelPageVo rankingDTO : dataList) { ListObject data ListUtils.newArrayList(); data.add(rankingDTO.getStoreName()); if (CollUtil.isNotEmpty(rankingDTO.getStallPersonnelList())) { for (BaseAttributesJsonVo skillCountVo : rankingDTO.getStallPersonnelList()) { data.add(Objects.nonNull(skillCountVo.getValue()) ? skillCountVo.getValue() : ); } } list.add(data); } } return list; } /** * 导出排行榜数据 * * param list 导出数据 * param headers 表头 * param fileName 导出文件名称 * param sheetName sheet名称 * param response 响应对象 * throws Exception 抛出异常 */ public static void rankingExportData(ListListObject list, ListListString headers, String fileName, String sheetName, HttpServletResponse response) throws Exception { EasyExcelUtil.export(response, fileName .xlsx, sheetName, list, headers); } /** * Excel导出功能(根据自定义表头) * * param response 响应数据 * param fileName 文件名 * param sheetName sheet名 * param list 数据列表 * param headers 表头集合 */ public static void export(HttpServletResponse response, String fileName, String sheetName, ListListObject list, ListListString headers) throws Exception { ServletOutputStream outputStream response.getOutputStream(); response.setCharacterEncoding(utf-
; response.setHeader(Header.CONTENT_DISPOSITION.toString(), attachment; filename.concat(URLEncoder.encode(fileName, StandardCharsets.UTF_
)); response.setContentType(application/octet-stream); EasyExcel.write(outputStream) .head(headers) .sheet(sheetName) .registerWriteHandler(new CustomRowHeightHandler()) .registerWriteHandler(new CustomCellStyleHandler()) .registerWriteHandler(new CustomCellWriteHandler()) .doWrite(list); } /** * 导入Excel返回列表形式的数据 * * param inputStream Excel文件流 * return ListList String 二维列表第一行是表头后续行是数据 */ public static ListListString importExcel(InputStream inputStream) { ListListString data new ArrayList(); try { Workbook workbook WorkbookFactory.create(inputStream); Sheet sheet workbook.getSheetAt(
; IteratorRow rowIterator sheet.iterator(); while (rowIterator.hasNext()) { Row row rowIterator.next(); ListString rowData new ArrayList(); IteratorCell cellIterator row.cellIterator(); while (cellIterator.hasNext()) { Cell cell cellIterator.next(); rowData.add(getCellStringValue(cell)); } data.add(rowData); } workbook.close(); } catch (Exception e) { throw new RuntimeException(导入Excel失败: e.getMessage(), e); } return data; } /** * 获取单元格的字符串值 */ private static String getCellStringValue(Cell cell) { if (cell null) { return ; } switch (cell.getCellType()) { case STRING: return cell.getStringCellValue().trim(); case NUMERIC: double value cell.getNumericCellValue(); if (value (long) value) { return String.valueOf((long) value); } else { return String.valueOf(value); } case BOOLEAN: return String.valueOf(cell.getBooleanCellValue()); case FORMULA: try { return cell.getStringCellValue(); } catch (Exception e) { return String.valueOf(cell.getNumericCellValue()); } default: return ; } } /** * 将Excel数据转换为Map列表格式 */ public static ListMapString, String convertToMapList(ListListString excelData) { if (excelData null || excelData.isEmpty()) { return new ArrayList(); } ListMapString, String result new ArrayList(); // 第一行是表头 ListString headers excelData.get(
; for (int i 1; i excelData.size(); i) { ListString rowData excelData.get(i); MapString, String rowMap new HashMap(); for (int j 0; j headers.size(); j) { String header headers.get(j); String value j rowData.size() ? rowData.get(j) : ; rowMap.put(header, value); } result.add(rowMap); } return result; } }
天香天堂免费观看电视剧-天香天堂免费观看电视剧应用
相关标签
RMBG-2.0在工业质检中的应用:缺陷检测与背景分离
想让 LLM 回得更好,为什么你该多用英语提问
TDSQL岗位热潮来袭!高含金量认证+精准课程,助你抢占高薪先机
毕设程序javaJavaWeb的宠物店管理系统 基于Spring Boot的萌宠生活馆数字化运营平台 智慧宠物服务中心信息管理系统的设计与实现
聚沙成塔,三步成书:GitBook极简入门教程
99%计算机学生都选错了方向!4大主流赛道让你少走3年弯路
计算机毕业设计 | SpringBoot+vue药店管理系统 药品库存进存销管理(附源码+论文)
重构方舟游戏体验:TEKLauncher如何实现从技术门槛到零配置的效率革命
MySQL聚合函数避坑指南:为什么你的SUM()结果总是不对?
专知智库OPC研究院用“意义重合”回答:人的意义,在于让个人的热爱与产业的需要、自我的价值与社会的贡献,在那个点上重合。
保姆级教程:用VMware Converter把老旧Linux服务器搬进ESXi(附权限配置避坑指南)
Granite TimeSeries FlowState R1多步预测效果实测:电力负荷预测案例深度分析
突破苹果限制:3步让老Mac焕发新生的OpenCore Legacy Patcher实用指南
基于SpringBoot + Vue的校园社团信息管理系统
🔍
📑
文章目录
二、2026 SRC 漏洞挖掘全攻略|CTFshow SRC 重点解析,新手从入门到变现必看
三、青核桃脱皮机的设计与仿真
四、从零构建AI Agent实战:构建你的第一个智能助手
五、AI 大模型-知识体系
🔥
热门优化文章
微信小程序禁止页面滑动终极指南:5种方法解决iOS/安卓兼容性问题
2026-05-16 23:19:13
Halcon深度学习分类实战:从数据标注到C#客户端调用的完整流程
2026-05-16 23:19:13
🛠️
实用工具推荐
窥探幽光,沉醉画境:色漫世界的情感图谱与视觉盛宴
跨越时空的温柔:孙尚香如何用“独特”方式辅导刘禅写作业?
相关优化文章 推荐
突破设备限制:手机端免Root提取Android系统镜像的革新方案
2026-06-12 05:52:49 2分钟阅读
3大革新突破!ObjToSchematic如何高效重构3D模型转方块艺术工作流
2026-06-12 05:52:49 10分钟阅读
Win10蓝牙串口调试:从设备配对到数据通讯的实战指南
2026-06-12 05:52:49 1分钟阅读
↑
百度百家号客服电话人工服务
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3