# `viw_ai_productstock`（视图）


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

## 字段

| # | 名称 | 类型 | 可空 |
|---|---|---|---|
| 1 | `sCustomerNo` | `varchar(255)` | NO |
| 2 | `sCustomerName` | `varchar(255)` | NO |
| 3 | `sProductName` | `varchar(100)` | NO |
| 4 | `sProductNo` | `varchar(50)` | NO |
| 5 | `sProductStyle` | `varchar(50)` | NO |
| 6 | `sProductUnit` | `varchar(50)` | YES |
| 7 | `sCustomerProductNo` | `varchar(50)` | YES |
| 8 | `sWarehouseName` | `varchar(255)` | NO |
| 9 | `sLocationsName` | `varchar(255)` | YES |
| 10 | `sProductSortsName` | `varchar(100)` | YES |
| 11 | `sId` | `varchar(50)` | NO |
| 12 | `sSlaveId` | `varchar(50)` | NO |
| 13 | `sBrandsId` | `varchar(50)` | NO |
| 14 | `sSubsidiaryId` | `varchar(50)` | NO |
| 15 | `tUpdateDate` | `datetime` | NO |
| 16 | `sDefineNo` | `varchar(50)` | NO |
| 17 | `sDefineNo2` | `varchar(50)` | NO |
| 18 | `tmakedate` | `datetime` | NO |
| 19 | `dMaxStock` | `decimal(18,6)` | NO |
| 20 | `dMinStock` | `decimal(18,6)` | NO |
| 21 | `dProductQty` | `decimal(18,6)` | NO |
| 22 | `sDefineNo3` | `varchar(50)` | NO |
| 23 | `sWorkOrderNo` | `varchar(50)` | NO |
| 24 | `sOrderNo` | `varchar(50)` | NO |

## 定义

```sql
select `xlyweberp_saas_ai`.`elecustomer`.`sCustomerNo` AS `sCustomerNo`,`xlyweberp_saas_ai`.`elecustomer`.`sCustomerName` AS `sCustomerName`,`xlyweberp_saas_ai`.`eleproduct`.`sProductName` AS `sProductName`,`xlyweberp_saas_ai`.`eleproduct`.`sProductNo` AS `sProductNo`,`xlyweberp_saas_ai`.`eleproduct`.`sProductStyle` AS `sProductStyle`,`xlyweberp_saas_ai`.`eleproduct`.`sProductUnit` AS `sProductUnit`,`xlyweberp_saas_ai`.`eleproduct`.`sCustomerProductNo` AS `sCustomerProductNo`,`xlyweberp_saas_ai`.`siswarehouse`.`sName` AS `sWarehouseName`,`xlyweberp_saas_ai`.`sislocation`.`sName` AS `sLocationsName`,`xlyweberp_saas_ai`.`sisproductclassify`.`sName` AS `sProductSortsName`,`xlyweberp_saas_ai`.`eleproductstock`.`sId` AS `sId`,`xlyweberp_saas_ai`.`eleproductstock`.`sId` AS `sSlaveId`,`xlyweberp_saas_ai`.`eleproductstock`.`sBrandsId` AS `sBrandsId`,`xlyweberp_saas_ai`.`eleproductstock`.`sSubsidiaryId` AS `sSubsidiaryId`,`xlyweberp_saas_ai`.`eleproductstock`.`tCreateDate` AS `tUpdateDate`,`xlyweberp_saas_ai`.`eleproductstock`.`sDefineNo` AS `sDefineNo`,`xlyweberp_saas_ai`.`eleproductstock`.`sDefineNo2` AS `sDefineNo2`,`xlyweberp_saas_ai`.`eleproductstock`.`tMakeDate` AS `tmakedate`,`xlyweberp_saas_ai`.`eleproductstock`.`dMaxStock` AS `dMaxStock`,`xlyweberp_saas_ai`.`eleproductstock`.`dMinStock` AS `dMinStock`,`xlyweberp_saas_ai`.`eleproductstock`.`dProductQty` AS `dProductQty`,`xlyweberp_saas_ai`.`eleproductstock`.`sDefineNo3` AS `sDefineNo3`,`xlyweberp_saas_ai`.`eleproductstock`.`sWorkOrderNo` AS `sWorkOrderNo`,`xlyweberp_saas_ai`.`eleproductstock`.`sOrderNo` AS `sOrderNo` from (((((`xlyweberp_saas_ai`.`eleproductstock` join `xlyweberp_saas_ai`.`eleproduct` on((`xlyweberp_saas_ai`.`eleproductstock`.`sProductId` = `xlyweberp_saas_ai`.`eleproduct`.`sId`))) join `xlyweberp_saas_ai`.`elecustomer` on((`xlyweberp_saas_ai`.`eleproductstock`.`sCustomerId` = `xlyweberp_saas_ai`.`elecustomer`.`sId`))) join `xlyweberp_saas_ai`.`siswarehouse` on((`xlyweberp_saas_ai`.`eleproductstock`.`sWarehouseId` = `xlyweberp_saas_ai`.`siswarehouse`.`sId`))) left join `xlyweberp_saas_ai`.`sislocation` on((`xlyweberp_saas_ai`.`eleproductstock`.`sLocationId` = `xlyweberp_saas_ai`.`sislocation`.`sId`))) left join `xlyweberp_saas_ai`.`sisproductclassify` on((`xlyweberp_saas_ai`.`sisproductclassify`.`sId` = `xlyweberp_saas_ai`.`eleproduct`.`sParentId`)))
```

## 说明

_暂无人工说明。_
