# `Fun_box_type` (function)

> 获取盒型


- **Type:** FUNCTION
- **Returns:** `longtext`
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sProductTypeId` | `varchar(100)` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTION `Fun_box_type`'`._

## Narrative

**Business context:** Box-type (盒型) parameter list for the packaging-quotation form. For a chosen product type, returns the box-shape definitions registered on `sisboxtypeparam` so FROUNT can render a dropdown wired to dimension/offset/quantity defaults.

**What it does:** builds a JSON array via `GROUP_CONCAT(JSON_OBJECT(...))` from `sisboxtypeparam` rows where `sParentId = sProductTypeId`, projecting code/name plus the geometry fields (`iSLength`, `iSWidth`, `iSType`, `sSOffset`, `iSQuantity`, and the `iC*` counterparts), ordered by `iOrder`. Output shape mimics xly's standard dropdown JSON.

**Invocation:** Status: appears orphaned. No caller found in any channel (form-master sSqlStr, gdsmodule hooks, other routines, exhaustive xly-src grep, dynamic-dispatch search) — candidate for maintainer audit. Likely tied to a planned packaging-form widget that never went into production, or a customer-specific deployment whose SQL is not in this snapshot.
