S
当“樱樱女子”遇见灵魂的启迪者:一场跨越时空的对话
首页
速度
优化工具
☰
首页
速度
收录
工具
首页
/
速度优化
/
Gai双男MV在线播放免费:一场视听盛宴,心动与自由的共鸣
网站优化
《御手洗家墙壁破洞》:窥探欲望的秘密花园,一场关于人性与真相的迷局
伊甸园的低语:从麻园之象到人口变迁的生命之歌
2026-06-08 19:17:30
阅读时长:8分钟
562次阅读
核心内容摘要
cf孙尚香正能量图片
查询方法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; } }
17ccm是亚洲尺码的尺寸范围-17ccm是亚洲尺码的尺寸范围应用
相关标签
3种零成本跨设备游戏串流方案:从硬件适配到性能优化全解析
大坝、隧道深部位移监测 节段式位移计 系统组网核心要求是什么?
学长亲荐!继续教育必备8款一键生成论文工具测评
ARM64架构下RPM包依赖问题实战指南
Cogito-v1-preview-llama-3B实战教程:Python调用+API封装完整流程
FRM二级信用风险管理实战:从CDS定价到巴塞尔协议III的完整案例解析
人机协同开发:如何与快马AI对话迭代,智能生成复杂的点餐小程序业务逻辑
告别密码登录!用PyCharm+SSH密钥直连云服务器的5个实用技巧
AIVideo开发者指南:API接入方式、自定义模板开发与插件扩展路径
Cursor Pro功能突破与优化:从技术原理到安全实践
【计算机毕业设计案例】基于Java的自驾游攻略查询系统的设计与实现酒店信息查询、客房与门票预订、预定取消、个性化旅游线路规划(程序+文档+讲解+定制)
深入解析Linux内核电源管理:从CPUFreq到SoC挂起的全链路剖析
FUXA RRO 1.2.9专业版源码发布|2026年1月7日最新更新|全平台兼容·工程师友好型工业HMI系统
高通CamX开源框架实战:从零搭建相机HAL层的完整指南
🔍
📑
文章目录
二、.net加密-深思数盾是不是哪个开源软件或泄密的VMProtect 改版的?
三、Qwen3-8B本地部署教程:数据安全完整指南
四、LoRA 微调
五、SolidWorks设计文档智能生成:百川2-13B解析三维模型意图
🔥
热门优化文章
《千鹤酱开发日记》:不止是代码,更是对极致匠心的不懈追求
2026-05-16 23:19:13
久久久:一份关于时间、记忆与生命热爱的永恒情书
2026-05-16 23:19:13
🛠️
实用工具推荐
umamusume-localify技术优化指南:提升赛马娘DMM客户端体验
智能红包监控:iOS自动抢红包技术实现指南
相关优化文章 推荐
深网正在消亡,更可怕的东西正在取代它
2026-06-08 19:17:30 10分钟阅读
GD32 IAP升级实战:从Keil配置到代码跳转的完整避坑指南
2026-06-08 19:17:30 1分钟阅读
HG-ha/MTools一文详解:图片处理/音视频编辑/AI工具三大模块联动
2026-06-08 19:17:30 9分钟阅读
↑
百度百家号客服电话人工服务
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