Sp_Ai_AddQuoQuoAfter.md 1.87 KB

Sp_Ai_AddQuoQuoAfter (procedure)

AI_调用下单 插入订单

  • Type: PROCEDURE
  • Deterministic: NO
  • SQL data access: CONTAINS SQL

Parameters

# Mode Name Type
1 IN sBrId varchar(100)
2 IN sSuId varchar(100)
3 IN sLoginId varchar(100)
4 IN sData longtext
5 OUT sReturn longtext
6 OUT sCode int

Body

Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURESpAi_AddQuoQuoAfter'._

Narrative

Business context: AI-assistant quotation-insertion handler — header says AI_调用下单 插入订单. Receives a free-form natural-language prompt parsed into a JSON sData payload describing one quotation (产品/数量/规格/材料/印后工艺/...), then materializes a row into the 报价单 / quoquotation* family on form sId 101251240115016076506222050.

What it does: Reads sUserName from sftlogininfo (defaults p_sMakePerson='ai' if not found). Wraps the inbound sData as a JSON array, extracts product/customer/process/材料/印后工艺 fields into local variables (with one hardcoded fallback sProductClassifyId='20240108210154670452968456436630'), looks up matching eleproduct / elecustomer / eleprocess ids using Fun_getProductMaxStyle (which itself is orphan-via-dead-chain) and other helper queries, and constructs the quotation master + slave INSERT skeleton. Targets seed-tenant '1111111111' only.

Invocation: Status: appears orphaned. No gdsconfigformslave binding, no gdsmodule hook, no other routine references it, and grep finds zero call sites anywhere in xly-src. Candidate for maintainer audit — AI-assistant scaffolding apparently never wired into a live control. Hardcodes seed-tenant + classification GUID + form GUID 101251240115016076506222050.