S
Labview与西门子PLC smart200及仪器串口通讯项目全解析
首页
速度
优化工具
☰
首页
速度
收录
工具
首页
/
速度优化
/
吐血推荐! AI论文工具 千笔写作工具 VS 灵感ai,自考写论文神器!
网站优化
哪些平台机票退改后税费能全额退还?同程旅行退改无忧实测有效
Flutter 三方库 rbush 的鸿蒙化适配指南 - 在鸿蒙系统上构建极致、极速、基于 R-Tree 算法的工业级 2D 空间索引与大规模点位碰撞检测引擎
2026-06-08 20:50:18
阅读时长:1分钟
562次阅读
核心内容摘要
手把手教你用嘎嘎降AI降低论文AIGC率:新手3分钟上手教程
查询方法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; } }
gv图解-gv图解应用
相关标签
混元翻译模型延迟高?0.18s低延迟部署优化实战
Qwen3-ForcedAligner-0.6B模型安全:对抗样本攻击与防御实践
当GitHub遇见AI助手:用快马智能生成代码、Commit与项目规划
leetcode 78.å�集
Qwen-Image-2512案例分享:如何生成高质量概念艺术
让安全更懂业务:针对垂直行业定制 Llama-Guard 3 守卫模型的微调实战全指南
手把手教你安装 2026 VSCode,VSCode安装教程
Python异步集成Seedance 2.0最佳实践(含生产环境熔断/重试/上下文追踪全配置)
计算机毕业设计springboot应科院线上评教系统 基于SpringBoot的教学质量评价与反馈平台设计与实现 SpringBoot框架下高校教师教学绩效考评系统构建
雯雯的后宫-造相Z-Image-瑜伽女孩:小白也能轻松上手的AI绘画工具
意义定义:企业、产业与城市的财富创造新范式
突破性3D渲染技术:高斯泼溅实战指南与商业价值分析
盲目用AI提效?当心陷入“工具奴”陷阱,效率不增反降
AnimateDiff进阶技巧:控制视频中的每一个动作细节
🔍
📑
文章目录
二、梦幻启程,心之所向:糖心vlog御梦子十八岁成人礼的闪耀瞬间
三、91网页
四、探秘“性巴克”:一场触及灵魂的成人世界对话
五、美国式忌讳之愈演愈烈:洋葱,一场文化冲突下的味蕾困境
🔥
热门优化文章
[特殊字符]ControlNet v1.1 Scribble版:手绘草图转图像的AI魔法
2026-05-16 23:19:13
DOL-CHS-MODS整合包使用指南
2026-05-16 23:19:13
🛠️
实用工具推荐
语音转文字神器:Qwen3-ASR-0.6B使用教程
Qwen3-ASR与Kubernetes集成:大规模语音识别服务部署
相关优化文章 推荐
78入13:数字里的生命密码,洞悉命运的奇妙轨迹
2026-06-08 20:50:18 2分钟阅读
GOGOGOGO高清视觉盛宴中的艺术风格解析与分享
2026-06-08 20:50:18 10分钟阅读
午夜奇遇:解锁“深夜福利18”的无限可能
2026-06-08 20:50:18 5分钟阅读
↑
百度百家号客服电话人工服务
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