返回顶部
f

farmos-land-portfolio土地资产组合

Query land ownership, leases, landlord info, and land payments. Write operations for payment management and lease renewals.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
500
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

farmos-land-portfolio

FarmOS 土地投资组合

跟踪自有和租赁土地、租赁条款、房东关系、付款及年度土地成本。

关键:数据完整性规则

切勿使用部分或截断的数据。以下规则不可协商:

  1. 1. 切勿使用 /api/integration/dashboard — 该接口会将结果截断为5项。部分付款数据比没有数据更糟糕,因为它会造成数据完整的虚假印象。
  2. 始终使用下方列出的 /all 端点 以获取完整数据。
  3. 如果端点返回错误或空结果,向用户报告失败。 不要静默回退到其他端点或呈现部分数据。
  4. 始终说明返回记录的总数,以便用户知道数据是完整的。例如:发现3月份有11笔应付款项,总计175,058美元。
  5. 如果无法获取完整数据,请明确说明。 我无法检索到完整的付款数据 远比显示11笔中的5笔要好得多。

触发此技能的场景

  • - 我们的租约什么时候到期?
  • 史密斯地块的租金是多少?
  • 今年的土地总成本?
  • 显示逾期付款
  • 房东联系信息
  • 每英亩成本按地块划分
  • 列出所有租赁地块
  • 3月份有哪些应付款项?
  • 下个月的现金需求
  • 将付款[X]标记为已付
  • 将所有3月份付款标记为已付
  • 续签史密斯租约
  • 预览租约续签

访问控制

租赁条款、租金金额和房东信息属于敏感业务数据。仅限管理员或经理角色访问。

角色映射: 在 ~/.openclaw/farmos-users.json 中检查发送者的角色。如果用户不是管理员或经理,告知他们无权访问土地投资组合数据。

API 基础地址

http://100.102.77.110:8009

集成端点(无需认证)— 仅读取操作

重要提示:写入操作(标记已付、续签)使用认证端点。读取操作(列出付款、租约、房东)使用集成 /all 端点。

付款(完整 — 使用此端点,而非仪表盘)

GET /api/integration/payments/all
  • - 返回所有付款的完整详情 — 地块名称、房东姓名、逾期状态
  • 查询参数:
- status — 待处理、已付、逾期、已安排 - payment_type — 租金、抵押贷款、房产税、保险、改良、其他 - parcel_id — 按特定地块筛选 - duedatefrom — YYYY-MM-DD 范围起始 - duedateto — YYYY-MM-DD 范围结束 - crop_year — 按作物年度筛选
  • - 示例:
- 所有逾期:/api/integration/payments/all?status=overdue - 2026年3月付款:/api/integration/payments/all?duedatefrom=2026-03-01&duedateto=2026-03-31 - 所有租金付款:/api/integration/payments/all?payment_type=rent

即将到来的付款(未来N天)

GET /api/integration/payments/upcoming?days=30
  • - 返回未来N天内所有即将到来的付款(无截断)
  • 使用 days=60 或 days=90 进行更长时间的前瞻

租约(完整)

GET /api/integration/leases/all
  • - 返回所有租约,包含房东联系信息、租金条款、到期状态
  • 查询参数:
- status — 活跃、已过期 - landlord_id — 按房东筛选

即将到期的租约

GET /api/integration/leases/expiring?days=90
  • - 返回未来N天内所有即将到期的租约

房东(完整)

GET /api/integration/landlords/all
  • - 返回所有房东,包含联系信息、活跃租约数量、总英亩数、总租金

地块

GET /api/integration/parcels
  • - 返回所有地块,包含所有权类型、英亩数、县
  • 查询参数:ownership_type — 自有、租赁

汇总统计

GET /api/integration/summary
  • - 总英亩数、自有/租赁细分、地块/租约/房东数量、年度成本

年度土地成本(按月份和实体)

GET /api/integration/finance/costs?year=2026
  • - 按类别(租金、抵押贷款、税费、保险)的月度成本细分
  • 实体细分
  • 查询参数:year、entity_id

每块田地成本(用于损益表)

GET /api/integration/finance/cost-per-field?year=2026
  • - 分配到生产田地的土地成本
  • 查询参数:year、entity_id

逾期项目

GET /api/integration/tasks/overdue
  • - 所有逾期付款和提醒 — 高优先级项目

可操作项目

GET /api/integration/tasks/actionable?days_ahead=30
  • - 即将到来的付款、即将到期的租约、待处理提醒

认证端点 — 写入操作

这些需要JWT认证。请参阅下方的认证部分。

认证

此技能访问受保护的FarmOS端点,需要JWT令牌。

获取令牌: 使用相应角色运行认证助手:
bash
TOKEN=$(~/clawd/scripts/farmos-auth.sh admin)

使用令牌: 将其作为Bearer令牌包含:
bash
curl -H Authorization: Bearer $TOKEN http://100.102.77.110:8009/api/endpoint

令牌过期: 令牌有效期为15分钟。如果收到401响应,请请求新令牌。

将单笔付款标记为已付

POST /api/payments/{id}/mark-paid Authorization: Bearer {token} Content-Type: application/json

请求体:
json
{
paid_date: 2026-02-15,
notes: 支票 #1234
}

批量将多笔付款标记为已付

POST /api/payments/bulk/mark-paid Authorization: Bearer {token} Content-Type: application/json

请求体:
json
{
payment_ids: [12, 34, 56],
paid_date: 2026-02-15,
notes: 批量支票处理
}

按日期范围将付款标记为已付

POST /api/payments/bulk/mark-paid-by-date Authorization: Bearer {token} Content-Type: application/json

请求体:
json
{
duedatefrom: 2026-03-01,
duedateto: 2026-03-31,
paid_date: 2026-02-15,
payment_type: rent,
notes: 3月份租金付款
}

当用户说将所有3月份付款标记为已付或类似的批量基于日期的操作时使用此端点。

预览租约续签

POST /api/leases/renewal-preview Authorization: Bearer {token} Content-Type: application/json

请求体:
json
{
lease_ids: [5, 12],
newstartdate: 2027-03-01,
rentincreasepercent: 3.0
}

返回:续签后租约的预览,包括新的付款计划。在执行批量续签之前使用此端点,以便用户确认。

执行批量租约续签

POST /api/leases/bulk-renew Authorization: Bearer {token} Content-Type: application/json

请求体:
json
{
lease_ids: [5, 12],
newstartdate: 2027-03-01,
newenddate: 2028-02-28,
newrentamount: 52000.00,
rentincreasepercent: 3.0,
notes: 年度续签,涨幅3%
}

重要提示: 始终先预览,与用户确认,然后执行。

年末结转预览

POST /api/payments/year-end-rollover/preview Authorization: Bearer {token} Content-Type: application/json

请求体:
json
{
from_year: 2026,
to_year: 2027
}

返回:将为新作物年度创建的付款计划预览。

年末结转执行

POST /api/payments/year-end-rollover/execute Authorization: Bearer {token} Content-Type: application/json

请求体:
json
{
from_year: 2026,
to_year: 2027,
applyrentincrease: true,
rentincreasepercent: 2.5
}

重要提示

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 farmos-land-portfolio-1776420031 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 farmos-land-portfolio-1776420031 技能

通过命令行安装

skillhub install farmos-land-portfolio-1776420031

下载

⬇ 下载 farmos-land-portfolio v1.0.0(免费)

文件大小: 3.94 KB | 发布时间: 2026-4-17 18:22

v1.0.0 最新 2026-4-17 18:22
Initial release of farmos-land-portfolio — a skill to manage and report on farm land ownership, leases, landlords, and payment operations.

- Enables querying of land parcels, lease terms/expirations, landlord contact info, and land payment status.
- Strictly enforces use of complete (untruncated) data via `/all` endpoints; warns user if full data unavailable.
- Supports marking payments as paid and lease renewal workflows (with preview/confirmation), using authenticated endpoints.
- Comprehensive access control: only available to admin/manager roles; all other users receive clear access denied messages.
- Documentation highlights key usage, data integrity rules, endpoint purposes, and examples for common queries.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部