# `viw_1elecustomer_supply_employee`（视图）


- **是否可更新：** NO
- **定义者：** `xlyprint@%`

## 字段

| # | 名称 | 类型 | 可空 |
|---|---|---|---|
| 1 | `sId` | `varchar(100)` | NO |
| 2 | `sCustomerName` | `varchar(255)` | NO |
| 3 | `sCustomerNo` | `varchar(255)` | NO |
| 4 | `sBrandsId` | `varchar(100)` | NO |
| 5 | `sSubsidiaryId` | `varchar(100)` | NO |
| 6 | `iIncrement` | `int` | NO |
| 7 | `sBillType` | `varchar(8)` | NO |
| 8 | `sBillType2` | `varchar(16)` | NO |
| 9 | `bInvalid` | `bit(1)` | NO |
| 10 | `sSalesManId` | `varchar(100)` | YES |
| 11 | `sSalesManName` | `varchar(255)` | YES |
| 12 | `sGetPayId` | `varchar(100)` | YES |
| 13 | `sBankAccount` | `varchar(255)` | NO |
| 14 | `sBillingBank` | `varchar(255)` | NO |
| 15 | `sGetPayName` | `varchar(255)` | NO |

## 定义

```sql
select `c`.`sId` AS `sId`,`c`.`sCustomerName` AS `sCustomerName`,`c`.`sCustomerNo` AS `sCustomerNo`,`c`.`sBrandsId` AS `sBrandsId`,`c`.`sSubsidiaryId` AS `sSubsidiaryId`,`c`.`iIncrement` AS `iIncrement`,'customer' AS `sBillType`,'[ar],[saleMoney]' AS `sBillType2`,`c`.`bInvalid` AS `bInvalid`,`c`.`sSalesManId` AS `sSalesManId`,`d`.`sName` AS `sSalesManName`,`c`.`sGetPayId` AS `sGetPayId`,`c`.`sBankAccount` AS `sBankAccount`,`c`.`sBillingBank` AS `sBillingBank`,`e`.`sName` AS `sGetPayName` from ((`xlyweberp_saas_ai`.`elecustomer` `c` left join `xlyweberp_saas_ai`.`sissalesman` `d` on((`c`.`sSalesManId` = `d`.`sId`))) join `xlyweberp_saas_ai`.`sispayment` `e` on((`c`.`sGetPayId` = `e`.`sId`))) union select `s`.`sId` AS `sId`,`s`.`sSupplyName` AS `sCustomerName`,`s`.`sSupplyNo` AS `sCustomerNo`,`s`.`sBrandsId` AS `sBrandsId`,`s`.`sSubsidiaryId` AS `sSubsidiaryId`,`s`.`iIncrement` AS `iIncrement`,'supply' AS `sBillType`,'[ap],[purMoney]' AS `sBillType2`,`s`.`bInvalid` AS `bInvalid`,`s`.`sPurchaseManId` AS `sSalesManId`,`e`.`sEmployeeName` AS `sSalesManName`,`s`.`sGetPayId` AS `sGetPayId`,`s`.`sBankAccount` AS `sBankAccount`,`s`.`sBillingBank` AS `sBillingBank`,`f`.`sName` AS `sGetPayName` from ((`xlyweberp_saas_ai`.`elesupply` `s` left join `xlyweberp_saas_ai`.`eleemployee` `e` on((`s`.`sPurchaseManId` = `e`.`sId`))) join `xlyweberp_saas_ai`.`sispayment` `f` on((`s`.`sGetPayId` = `f`.`sId`))) union select `m`.`sId` AS `sId`,`m`.`sEmployeeName` AS `sCustomerName`,`m`.`sEmployeeNo` AS `sCustomerNo`,`m`.`sBrandsId` AS `sBrandsId`,`m`.`sSubsidiaryId` AS `sSubsidiaryId`,`m`.`iIncrement` AS `iIncrement`,'employee' AS `sBillType`,'' AS `sBillType2`,`m`.`bInvalid` AS `bInvalid`,NULL AS `sSalesManId`,NULL AS `sSalesManName`,'' AS `sGetPayId`,'' AS `sBankAccount`,'' AS `sBillingBank`,'' AS `sGetPayName` from `xlyweberp_saas_ai`.`eleemployee` `m`
```

## 说明

_暂无人工说明。_
