# `Fun_getDhouM` (function) - **Type:** FUNCTION - **Returns:** `varchar(2222)` - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `sJson` | `longtext` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTION `Fun_getDhouM`'`._ ## Narrative **Business context:** Hard-coded "post-print/finishing machine → default die count" lookup. Body comments enumerate the virtual-machine sIds with their fixed `iReturn` values: 模切机 (die-cutting, 4), 烫金机 (hot-stamping, 6), 折页机 (folding, 7), 锁线机 (book-thread sewing, 6), 冲孔机 (punching, 3), 裁切机 (trimming, 4), 吸塑机 (vacuum-forming, 3), 圆角机 (corner-rounding, 3); 深圳手工 = 1. **What it does:** walks the JSON filter array `sJson`; finds the entry whose `bFilterName = 'sMachineId'`; switches on `bFilterValue` (machine sId hard-coded constants) and sets `p_iReturn` to the corresponding default count. Returns 1 if no match. **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. The hard-coded tenant-specific machine sIds (e.g. `16500802910009018024524290446000`) suggest this was a one-tenant patch that was never wired into the standard flow.