# `Sp_Bd_workefficiency` (procedure)

> 车间效率综合看板-根


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `iFlag` | `int` |
| 2 | IN | `iTmpCheck` | `int` |
| 3 | IN | `sFormGuid` | `varchar(100)` |
| 4 | IN | `sGuid` | `varchar(100)` |
| 5 | IN | `sLoginId` | `varchar(100)` |
| 6 | OUT | `sReturn` | `varchar(4000)` |
| 7 | IN | `sBrId` | `varchar(100)` |
| 8 | IN | `sSuId` | `varchar(100)` |
| 9 | OUT | `sCode` | `int` |

## Body

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

## Narrative

**Business context:** 看板管理 / 车间效率综合看板 — environment widget for the workshop-efficiency dashboard. Reports the current date-time plus the workshop's 1区 zone temperature and humidity.

**What it does:** Builds temp `p_Bd_workefficiency(sName,sValue)`. Inserts a `date` row with `date_format(SYSDATE(),'%Y-%m-%d %H:%i')`, then inserts `temperature` and `humidity` rows pulled from `viw_plc_machine` where `iSemens=2` and `sPlcsStatusName IN ('1区温度','1区湿度')`. Returns the temp table.

**Invocation:** Installed by `xly-src/script/标版/30100101/Sp_Bd_workefficiency.sql`. No form-master sSqlStr, no `gdsmodule` hook, no other-routine caller, no Java caller — reachable only via an external dashboard HTTP endpoint that invokes the proc by name. Sibling/root proc `Sp_Bd_workshop1` populates the rest of the dashboard's tiles.
