Files
LWLT-AIBOT/mappings/plan_add.mapping.json
2026-09-07 20:21:09 +08:00

70 lines
6.8 KiB
JSON

{
"$schema": "https://local.lwltapi/schemas/ltjt_form_mapping.schema.json",
"mapping_version": "2026-09-03.shared_plan_create.plan_add.v0.10",
"status": "adaptive_list_entry_readiness_release_gated_0.5.168",
"source": {
"schema": "schemas/standard_system_operation.schema.json",
"action": "shared_plan_create"
},
"target": {
"form_schema": "schemas/plan_add_form_schema.json",
"page": "/System/Business/plan_add.asp",
"entry": "散拼团计划表的 OPEN_adds() 新增计划弹窗",
"form_id": "InfoForm1",
"submit_endpoint": "/System/DAT/plan.asp",
"submit_action": "DoInfoSPs",
"payload_prefix": "Act=DoInfoSPs&",
"response_type": "script"
},
"entry_readiness": {
"page": "/System/Business/plan.asp",
"target": "#NewBuildB, [name=\"NewBuildB\"]",
"policy": "check immediately; while absent reacquire the current main-iframe document and poll every 100ms; click as soon as the button is connected and enabled",
"timeout_ms": 15000,
"fixed_delay": false,
"failure_policy": "block before click and before ERP write"
},
"ordered_steps": [
{ "step": 1, "operation": "set_date_range", "source": "data.recurrence.start_date/end_date", "targets": ["Riqi1", "Riqi2"] },
{ "step": 2, "operation": "resolve_and_select_product", "source": "data.product.keyword || data.product.name", "search_target": "S_chanpinming", "radio_target": "cp_id", "side_effect": "set_th fills tuanxuhao1/tuanxuhao2", "unique_required": true, "fallback": "match loaded candidates first; if unresolved, issue the native non-empty product-name query and match the returned name/duration fields locally; strip only a trailing numeric duration before the native query; retain one empty-query compatibility reload; never choose the first row" },
{ "step": 3, "operation": "conditionally_apply_explicit_order_suffix", "source": "data.order_number.suffix", "target": "tuanxuhao2", "rule": "ordinary Agent output leaves this absent; when a host/business system explicitly supplies it, apply only after product set_th and require exact persistence before payload approval" },
{ "step": 4, "operation": "set_planned_capacity", "source": "data.planned_capacity", "target": "jihuashu" },
{ "step": 5, "operation": "set_room_counts", "source": "data.room_counts", "targets": ["frenshu0", "frenshu1", "frenshu2", "frenshu3", "frenshu4", "frenshu5", "frenshu6"], "side_effect": "sum_fang()" },
{ "step": 6, "operation": "select_cycle_dates", "source": "data.departure_dates || data.recurrence", "explicit_target": "zhidingzhouqi", "shortcut_target": "zhouqi", "side_effect": "ShowFoucsBox() then select one checkbox per date" },
{ "step": 7, "operation": "conditionally_fill_optional_split_booking_fields", "source": "data.split_order.customer and/or data.split_order.passenger_counts", "targets": ["zutuanshe", "zutuansheid", "lianxiren", "zutuanshegzr", "bizhong", "darenshu", "xiaorenshu", "ertrenshu", "yingrenshu", "quanrenshu"], "write_policy": "when a supported optional field is supplied, validate and write it; when absent, leave the ERP control untouched; call GetVisitorsHtml() only when passenger_counts is supplied" },
{ "step": 8, "operation": "record_source_region_context", "source": "the final uniquely resolved ERP product candidate and, when supplied, the final uniquely resolved customer candidate plus optional source_region context", "rule": "source-region context is report-only; product and customer candidates are resolved independently and a mismatch never blocks DoInfoSPs" },
{ "step": 9, "operation": "preflight_and_submit", "function": "SubmitInfoForm()", "network_action": "POST /System/DAT/plan.asp with Act=DoInfoSPs", "receipt": "ERP response/popup parent group number" },
{ "step": 10, "operation": "requery_receipt", "function": "散拼团计划表查询", "write_boundary": "after business-system confirmation and preflight", "success_rule": "clear unrelated list filters and re-query every returned parent group number with bounded read-only delays; if any returned group remains unverified, reconcile every requested date to exactly one parent group without resubmitting; a multi-date shared_batch_split_order_probe additionally requires parent tid, a complete native child-link scan, and explicit customer/passenger visibility facts per date" }
],
"lookup_rules": {
"product": {
"category_scope": "散拼团 only",
"search_field": "S_chanpinming",
"radio_name": "cp_id",
"match_order": ["unique_contiguous", "unique_name_duration_tokens", "unique_ordered_tokens"],
"label_scope": "product-name-and-duration cell, not full remarks",
"native_query_policy": "S_chanpinming supports contiguous product-name LIKE only; submit the complete product name unchanged, or strip a trailing numeric duration shorthand before querying; await native Ajax and match returned candidates locally; use one empty query only as the final compatibility reload",
"ambiguous_or_empty": "block"
},
"customer": {
"source": "data.split_order.customer.keyword || data.split_order.customer.name",
"input_target": "zutuanshe",
"setval_targets": ["zutuansheid", "zutuanshe", "lianxiren", "zutuanshegzr", "bizhong"],
"unique_required": true,
"optional": true,
"write_policy": "resolve only when supplied; absent customer leaves the control untouched",
"source_region_rule": "when supplied, retain source-region context for diagnostics only; never compare product and customer source-region tokens as a write gate"
}
},
"field_ownership": {
"user_facts": ["Riqi1", "Riqi2", "jihuashu", "room_counts", "departure_dates", "optional split_order.customer", "optional split_order.passenger_counts"],
"host_or_business_system_facts": ["optional data.order_number.suffix"],
"erp_derived": ["tuanxuhao1", "tuanxuhao2 when no explicit suffix is supplied", "login-default staff", "group_number"]
},
"safety": {
"preflight": "required field, unique product lookup, room total, conditional validation of supplied optional customer/passenger fields, one date checkbox per requested date, product-generated group settings, and exact persistence of an explicitly supplied order suffix",
"live_write": "only after business-system confirmation, unique execution_id, and guarded browser execution",
"post_write": "parse every returned parent group number, clear unrelated list filters, and re-query the scatter-plan list with bounded read-only delays; if any returned group is missing, the response count differs, or the response is abnormal, reconcile all requested dates without resubmitting. A multi-date split-order probe additionally freezes each parent tid, all concrete child ddid refs, and customer/passenger list visibility. Missing or ambiguous facts remain uncertain and writes are never retried"
}
}