fruit-veg-order-replacer
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "fruit-veg-order-replacer" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-5c812602ae04d38c2d548b7cc4f282b0ec6b42f02944390a71f7f5209b0bad5a. Verify the upstream source and version against https://skillhub.cn/skills/user_8451910d/fruit-veg-order-replacer before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
A tool to replace shipped quantities in produce purchase orders. It strictly matches “actual shipped quantity” from the data source file (produce order format) by (product name + store name + order number) and replaces it into the template file (exported produce purchase order import template). Use this skill when the user provides two XLSX files and needs to replace shipped quantity data. Triggers: produce purchase order, replace shipped quantity, actual shipped quantity, purchase order import.
Introduction source: third_party · user_8451910d · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: fruit-veg-order-replacer
description: 果蔬采购单发货数替换工具。将数据源文件(果蔬鲜订单格式)中的"商品实际发货数"按(商品名称+门店名称+订单号)严格匹配,替换到模板文件(导出果蔬采购单导入模板格式)中。当用户提供两个xlsx文件并需要替换发货数数据时使用此技能。触发词:果蔬采购单、发货数替换、替换发货数、商品实际发货数、采购单导入。
agent_created: true果蔬采购单发货数替换
Overview
将数据源文件中的"商品实际发货数"按三字段严格匹配,替换到模板文件的"商品实际发货数"列。这是果蔬生鲜业务每日/定期的常规数据处理操作。
When to Use
- 用户提供了两个xlsx文件:数据源(果蔬鲜订单格式)和模板(导出果蔬采购单导入模板格式)
- 用户要求将数据源的"商品实际发货数"替换/填入到模板中
- 触发词:果蔬采购单、发货数替换、商品实际发货数、采购单导入
匹配规则
按以下三个字段组成复合键,严格匹配(去除前后空格后比较):
- 商品名称
- 门店名称
- 订单号
三字段必须完全一致才匹配成功,缺任一字段则该行无法匹配。
列位对照
数据源文件(果蔬鲜订单格式)
| 字段 | 列位 |
|---|---|
| 商品名称 | 第 5 列 |
| 门店名称 | 第 7 列 |
| 商品实际发货数 | 第 12 列 |
| 订单号 | 第 27 列 |
模板文件(导出果蔬采购单导入模板格式)
| 字段 | 列位 |
|---|---|
| 商品名称 | 第 4 列 |
| 门店名称 | 第 6 列 |
| 商品实际发货数 | 第 10 列 |
| 订单号 | 第 11 列 |
注意:列位可能因文件版本不同而有变化。执行前应先读取两个文件的表头,验证列位是否与上述规则一致。如果不一致,根据实际表头动态调整列位。
输出命名
输出文件名格式:导出果蔬采购单导入模板_X月X日-导入.xlsx
日期部分取自数据源文件名中的日期。例如:
| 数据源文件名 | 输出文件名 |
|---|---|
| 果蔬鲜订单_石家庄_7月9日.xlsx | 导出果蔬采购单导入模板_7月9日-导入.xlsx |
| 果蔬鲜订单_石家庄_7月11日-补单.xlsx | 导出果蔬采购单导入模板_7月11日-补单-导入.xlsx |
处理流程
- 验证列位:读取两个文件的表头行,确认商品名称、门店名称、订单号、商品实际发货数所在的列位。如与规则不一致,根据实际表头动态调整。
- 构建查找字典:运行
scripts/replace_shipment_qty.py或用 Python openpyxl 读取数据源,以(商品名称, 门店名称, 订单号)为键、商品实际发货数为值构建字典。 - 替换模板数据:逐行读取模板文件,按同样三字段组合键查找匹配。匹配成功则将数据源的发货数写入模板;匹配失败则该行保持原值。
- 验证结果:抽查几行数据,对比原模板值与新替换值,确保数据正确。
- 保存输出:从数据源文件名提取日期部分,按命名规则输出文件。保存到工作目录。
Scripts
scripts/replace_shipment_qty.py
核心替换脚本,可直接执行:
python scripts/replace_shipment_qty.py <数据源文件路径> <模板文件路径> <输出目录>
脚本自动完成:构建查找字典 → 替换模板数据 → 生成输出文件名 → 保存。
也可在 Python 中 import 使用:
from replace_shipment_qty import build_source_lookup, replace_template_data, extract_date_suffixCurrent listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决果蔬生鲜业务中高频的 Excel 发货数替换痛点
- 匹配规则清晰(商品名称+门店名称+订单号三字段严格匹配)
- 输出命名规范,便于业务归档
Highlights
- 触发词覆盖完整(果蔬采购单、发货数替换、商品实际发货数等)
- 边界清晰,不易与其他数据处理 Skill 混淆
Highlights
- 结构完整,含处理流程、列位对照、输出命名等关键章节
- 提供文件名映射示例,便于用户理解输出格式
- frontmatter 完整,单文件长度适中
Areas to improve
-
异常处理覆盖不全 Reported severity: Minor
未明确说明文件不存在、格式错误、列缺失等常见异常的处理方式,也未提及不可逆操作确认机制。
Recommendation: 建议在处理流程中补充异常处理说明,如文件校验、列位不存在时的报错提示,以及对覆盖原文件的风险提示。
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.