# `Fun_GetLookProcess` (function)

> 获取工序查看权限


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sLoginId` | `varchar(255)` |
| 2 | IN | `sBrId` | `varchar(255)` |
| 3 | IN | `sSuId` | `varchar(255)` |

## Body

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

## Narrative

**Business context:** Process (工序) data-scope filter — when system setting `CkxProcessFilter = 1` and the caller is not `sysadmin`, returns the comma-separated `sProcessClassifyId` list this login may see (joined through `sftlogininfoprocessgroup`); otherwise returns `''`.

**What it does:** Reads `SysSystemSettings.CkxProcessFilter`, looks up `SftLoginInfo.sType`, then `GROUP_CONCAT`s the process-classification IDs bound to the login's permission group.

**Invocation:** Embedded in manufacturing / quality-inspection report SQL — called by `Sp_Manufacture_PlanReport`, `Sp_Manufacture_ProcessReport`, `Sp_Manufacture_ProductionPlanInfo_WorkCenter`, `Sp_Manufacture_ProductionReport`, `Sp_Manufacture_Report`, `Sp_OEE_PlanByProcess`, `Sp_OEE_ProductionReport`, `Sp_Mobile_PatrolInspection`, `Sp_PC_FirstInspection`, `Sp_PC_PatrolInspection`, `Sp_Productionplan_Pie_Char*`. Sibling of `Fun_GetLookCustomer`.
