# `Fun_GetReportId_byLogType` (function)

> 根据物流类型判断报表


- **Type:** FUNCTION
- **Returns:** `varchar(255)`
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `p_iLogType` | `int` |

## Body

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

## Narrative

**Business context:** Logistics-type report-id dispatch — maps a logistics document type flag (`1` = 送货单 / delivery note, anything else = 其它单 / generic logistics doc) onto one of two hard-coded `report.sId` GUIDs so the print step can pick the right template.

**What it does:** `IF p_iLogType='1' RETURN '17090989...'` (送货单 report) else `RETURN '17091030...'` (其它单 report).

**Invocation:** no form-master sSqlStr, gdsmodule hook, other routine, or xly-src reference uses this function. Status: appears orphaned. No caller found in any channel — candidate for maintainer audit. Tenant-specific report `sId`s.
