首页 文章 精选 留言 我的

精选列表

搜索[报表],共7667篇文章
优秀的个人博客,低调大师

我用 WorkBuddy 把经营周报做成了「全自动」:直连钉钉宜搭拉数据,一句话出报表

## 一、痛点 我是做油脂化工贸易的,每个月老板都要一份经营周报:采购了多少皂脚、得油率多少、销售回款多少……以前的做法是:登录金蝶 → 一个表单一个表单导出 Excel → 手工透视 → 手工做图,一套下来小半天没了,而且口径经常对不齐(比如得油率用单批领料量做分母,算出来超过 100%)。 后来我用 WorkBuddy 把整套流程做成了"技能"(Skill),现在只要说一句"生成 X 月的经营周报",十几分钟后一份带图表的 HTML 周报就躺在桌面上了。这篇文章把完整实现过程和踩过的坑分享出来。 ## 二、整体方案 ``` 金蝶同步──HTTP直连──> 数据JSON ──商业规则计算──> 指标JSON ──模板渲染──> HTML周报 采购/销售/生产/库存 (按月过滤) (供应商判定/ (自包含CSS, /领料/订单 得油率口径) 无CDN依赖) ``` 三个脚本,全部只用 Python 标准库,零第三方依赖: 1. `fetch_http.py` —— 拉数据 2. `analyze.py` —— 按商业规则算指标 3. `gen_report.py` —— 生成 HTML 周报 ## 三、第一步:直连宜搭 API 拉数据 WorkBuddy 的钉钉连接器自带 `dws` 命令行工具,但我这台机器上没装,索性直接用 `urllib` 调钉钉开放平台接口,反而更可控。 **踩坑记录(都是实测踩出来的):** - **坑 1:`searchFieldJson` 日期过滤不生效**。宜搭的 advances/query 接口传日期条件经常被忽略,所以改成"按时间倒序拉全量(最多 25 页 × 100 条)+ 本地按月过滤",稳。 - **坑 2:子表字段不在列表接口里**。采购入库的明细行(物料、实收数量、油点)在子表里,300 条单据就是 300 次请求,记得 sleep 0.1 秒限速,整月数据拉完约 8~10 分钟,放后台跑。 - **坑 3:单据状态要看"已审核"**。生产入库/领料里有草稿状态的脏数据,不过滤会把得油率算歪。 ## 四、第二步:商业规则进代码 数据拉回来只是原料,指标计算才是灵魂。几个关键口径: ```python # 供应商"自动发现":只要供过非辅料原料就算原料供应商,排除内部关联公司 # 得油率分母用"系统总投入量",不用单批领料量 ``` ## 五、总结 这套东西最大的价值不是省时间(虽然确实从半天变成 10 分钟),而是**口径固化**:供应商判定、得油率分母、辅料剔除这些规则一次写好,处处一致,不会再出现"两个人算出两个得油率"的罗生门。 WorkBuddy 的 Skill 机制本质上是"把 SOP 写给 AI 看",谁的业务里没有几条月月重复的 SOP 呢?值得都沉淀下来。 --- *文中数据已做脱敏处理。有问题欢迎评论区交流。*

优秀的个人博客,低调大师

Grafana:构建统一运维可视化视图,实时掌控服务器运行态势,相较传统表格报表具备质的飞跃。

服务器多了,监控成了噩梦?打开 Prometheus 看一堆数字,打开日志翻半天找不到问题…… 如果有一个面板,所有指标一目了然,还能自定义告警,该多好? 今天推荐的这款神器——**Grafana**,就是干这个的。 --- ## 什么是 Grafana? Grafana 是全球最流行的开源数据可视化和监控平台。它能连接 Prometheus、MySQL、Elasticsearch、InfluxDB 等数十种数据源,把枯燥的数字变成精美的图表和仪表盘。 简单来说:**它让数据说话,让你一眼看懂服务器的健康状况。** --- ## 为什么你需要 Grafana? ### 没有 Grafana 的日子 - 打开终端输入 `docker ps`,盯着滚动日志找问题 - 在 Prometheus 的 Web UI 里手写 PromQL 查询 - 用 Excel 手动统计服务器性能数据 - 服务器宕机了,用户投诉了才知道 ### 有了 Grafana 之后 - 一个面板看到所有服务器的 CPU、内存、磁盘、网络 - 自定义仪表盘,按需展示关心的指标 - 告警自动推送到微信/钉钉/邮件 - 团队协作,分享仪表盘给同事 **差距不止一点点。** --- ## 核心特性 ### 📊 强大的可视化引擎 支持折线图、柱状图、饼图、热力图、表格等 30+ 种面板类型。每个面板都可以自由定制样式、颜色、阈值。 ### 🔌 丰富的数据源支持 除了 Prometheus,还支持: - InfluxDB、MySQL、PostgreSQL - Elasticsearch、Loki - CloudWatch、Azure Monitor - 以及 150+ 其他数据源 ### 🚨 智能告警系统 可以设置告警规则,当指标超过阈值时自动通知: - 支持邮件、Slack、Webhook - 可以集成到微信机器人 - 告警静默和升级机制 ### 🎯 动态仪表盘 使用变量和模板,一个仪表盘可以切换不同服务器、不同时间段的数据。 ### 👥 团队协作 内置权限管理,可以创建团队、角色,共享仪表盘。 --- ## Docker 一键部署 ### 基础版 ```bash docker run -d \ --name=grafana \ -p 3000:3000 \ grafana/grafana ``` ### 持久化版(推荐) ```bash # 创建数据目录 mkdir -p /opt/grafana/data # 启动容器 docker run -d \ --name=grafana \ -p 3000:3000 \ -v /opt/grafana/data:/var/lib/grafana \ grafana/grafana ``` ### Docker Compose 版 ```yaml version: '3.8' services: grafana: image: grafana/grafana:latest container_name: grafana ports: - "3000:3000" volumes: - grafana-data:/var/lib/grafana restart: unless-stopped volumes: grafana-data: ``` --- ## 首次使用 1. 浏览器访问 `http://你的服务器IP:3000` 2. 默认账号密码:`admin/admin`(首次登录会要求修改) 3. 添加数据源(推荐先加 Prometheus) 4. 导入现成仪表盘模板(Grafana 官方库有数千个) 5. 开始享受数据可视化的快乐 --- ## 效果对比 | 功能 | 传统方式 | Grafana | | --- | --- | --- | | 查看 CPU 使用率 | `top` 命令 | 实时折线图 | | 查看磁盘空间 | `df -h` | 进度条可视化 | | 查看网络流量 | `iftop` | 动态流量面板 | | 历史趋势分析 | 手动记录 Excel | 自动保存,随时回溯 | | 告警通知 | 人工巡检 | 自动推送 | | 多服务器对比 | 逐个 SSH | 一个面板汇总 | --- ## 常见问题 ### Q: Grafana 和 Prometheus 有什么区别? Prometheus 负责**采集和存储**数据,Grafana 负责**展示和分析**数据。两者通常搭配使用,各司其职。 ### Q: 需要多少资源? Grafana 本身很轻量,默认占用约 100-200MB 内存。主要资源消耗取决于数据量和面板数量。 ### Q: 支持中文界面吗? 支持!在 Settings → Language 中选择简体中文即可。 ### Q: 免费版够用吗? 完全够用!开源版包含所有核心功能。企业版提供高级权限管理和审计日志。 --- ## 总结 Grafana 是运维人员的必备神器。它让枯燥的服务器数据变得直观易懂,让监控从"被动救火"变成"主动预防"。 **部署简单、功能强大、社区活跃**,无论是个人小站还是企业级集群,都能找到适合自己的用法。 --- 📌 **行动建议:** 如果你的服务器还没有可视化监控,赶紧装上 Grafana。配合 Prometheus 使用,效果更佳! https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20110701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20110701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20110701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20110701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20110701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20120701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20120701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20120701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20120701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20120701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20130701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20130701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20130701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20130701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20130701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20140701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20140701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20140701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20140701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20140701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20150701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20150701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20150701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20150701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20150701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20160701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20160701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20160701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20160701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20160701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20170701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20170701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20170701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20170701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20170701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20180701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20180701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20180701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20180701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20180701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20190701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20190701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20190701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20190701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20190701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20200701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20200701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20200701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20200701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20200701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20210701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20210701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20210701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20210701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20210701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20220701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20220701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20220701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20220701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20220701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20230701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20230701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20230701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20230701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20230701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20240701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20240701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20240701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20240701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20240701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20250701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20250701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20250701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20250701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20250701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260701_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260701_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260701_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260701_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260701_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260702_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260702_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260702_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260702_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260702_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260703_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260703_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260703_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260703_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260703_005.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260704_001.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260704_002.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260704_003.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260704_004.md https:\/\/github.com/steps2951-png/7ttq/blob/main/history_20260704_005.md 💬 **互动时间:** 你平时用什么工具做服务器监控?欢迎在评论区分享你的方案~

优秀的个人博客,低调大师

从智能报表到对话问数的五款产品横评与可信度评估框架

企业数据分析正在经历一次能力形态的跃迁。Straits Research 数据显示,全球商业智能市场规模 2025 年为 346.1 亿美元,预计 2026 年增至 397.9 亿美元,复合年增长率约 14.98%。IDC 的跟踪报告则显示,2025 年中国 BI 软件市场规模达 13.2 亿美元,连续多年保持两位数增长,贡献亚太地区 65% 以上的增量。比规模变化更关键的,是能力结构:Gartner 预计生成式 AI 在 BI 工具中的渗透率到 2026 年底达到 75%,IDC 预测到 2028 年 60% 的中国 500 强企业将部署企业级 Data Agent。

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册
修改密码
忘记密码