# `viw_ai_elematerialsstock_inoutdetail`（视图）


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

## 字段

| # | 名称 | 类型 | 可空 |
|---|---|---|---|
| 1 | `sId` | `varchar(100)` | NO |
| 2 | `sSlaveId` | `varchar(100)` | NO |
| 3 | `sBrandsId` | `varchar(100)` | NO |
| 4 | `sSubsidiaryId` | `varchar(100)` | NO |
| 5 | `sMakePerson` | `varchar(255)` | NO |
| 6 | `tCreateDate` | `datetime` | NO |
| 7 | `tUpdateDate` | `datetime` | NO |
| 8 | `dAuxiliaryQty` | `decimal(18,6)` | NO |
| 9 | `dMaterialsQty` | `decimal(18,6)` | NO |
| 10 | `sMaterialsStyle` | `varchar(255)` | YES |
| 11 | `sDefineNo` | `varchar(100)` | NO |
| 12 | `sDefineNo2` | `varchar(100)` | NO |
| 13 | `sFormId` | `varchar(100)` | NO |
| 14 | `sBillNo` | `varchar(255)` | NO |
| 15 | `sBillType` | `varchar(6)` | NO |
| 16 | `sMaterialsNo` | `varchar(50)` | YES |
| 17 | `sMaterialsName` | `varchar(100)` | YES |
| 18 | `sMaterialsSortName` | `varchar(100)` | YES |
| 19 | `sMaterialsShort` | `varchar(50)` | YES |
| 20 | `sMaterialsUnit` | `varchar(50)` | YES |
| 21 | `sAuxiliaryUnit` | `varchar(6)` | YES |
| 22 | `dCoefficient` | `decimal(18,6)` | YES |
| 23 | `sConversionUnit` | `varchar(50)` | YES |
| 24 | `dGramWeight` | `decimal(18,6)` | YES |
| 25 | `bPurchase` | `bit(1)` | YES |
| 26 | `bReel` | `bit(1)` | YES |
| 27 | `bSales` | `bit(1)` | YES |
| 28 | `bCorrugate` | `bit(1)` | YES |
| 29 | `dPurchasePrice` | `decimal(18,6)` | YES |
| 30 | `dSalesPrice` | `decimal(18,6)` | YES |
| 31 | `dRecentPurchasePrice` | `decimal(18,6)` | YES |
| 32 | `dDesignateSalesPrice` | `decimal(18,6)` | YES |
| 33 | `dProcurementCycle` | `decimal(18,6)` | YES |
| 34 | `sSupplyId` | `varchar(50)` | YES |
| 35 | `bCheck` | `bit(1)` | YES |
| 36 | `bInvalid` | `bit(1)` | YES |
| 37 | `sMemo` | `text` | YES |
| 38 | `bComMaterials` | `bit(1)` | YES |
| 39 | `sLocationsName` | `varchar(255)` | YES |
| 40 | `sWarehouseName` | `varchar(255)` | YES |
| 41 | `sMtart` | `varchar(4)` | YES |

## 定义

```sql
select `xlyweberp_saas_ai`.`mitmaterialsstore`.`sId` AS `sId`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`sId` AS `sSlaveId`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`sBrandsId` AS `sBrandsId`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`sSubsidiaryId` AS `sSubsidiaryId`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`sMakePerson` AS `sMakePerson`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`tCreateDate` AS `tCreateDate`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`tCreateDate` AS `tUpdateDate`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`dAuxiliaryQty` AS `dAuxiliaryQty`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`dMaterialsQty` AS `dMaterialsQty`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`sMaterialsStyle` AS `sMaterialsStyle`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`sDefineNo` AS `sDefineNo`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`sDefineNo2` AS `sDefineNo2`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`sFormId` AS `sFormId`,`xlyweberp_saas_ai`.`mitmaterialsstore`.`sBillNo` AS `sBillNo`,(case when (`xlyweberp_saas_ai`.`mitmaterialsstore`.`sFormId` = '192116810113315228246447250') then '成品入库' when (`xlyweberp_saas_ai`.`mitmaterialsstore`.`sFormId` = '192116810113315235917608210') then '外协入库' when (`xlyweberp_saas_ai`.`mitmaterialsstore`.`sFormId` = '11811781131121915179924491520') then '送货单' when (`xlyweberp_saas_ai`.`mitmaterialsstore`.`sFormId` = '11811781131121915179924871530') then '销售退货' when (`xlyweberp_saas_ai`.`mitmaterialsstore`.`sFormId` = '12710101117015197927220') then '成品其它入库' else '未知业务' end) AS `sBillType`,`xlyweberp_saas_ai`.`elematerials`.`sMaterialsNo` AS `sMaterialsNo`,`xlyweberp_saas_ai`.`elematerials`.`sMaterialsName` AS `sMaterialsName`,`xlyweberp_saas_ai`.`sismaterialsclassify`.`sName` AS `sMaterialsSortName`,`xlyweberp_saas_ai`.`elematerials`.`sMaterialsShort` AS `sMaterialsShort`,`xlyweberp_saas_ai`.`elematerials`.`sMaterialsUnit` AS `sMaterialsUnit`,`xlyweberp_saas_ai`.`elematerials`.`sAuxiliaryUnit` AS `sAuxiliaryUnit`,`xlyweberp_saas_ai`.`elematerials`.`dCoefficient` AS `dCoefficient`,`xlyweberp_saas_ai`.`elematerials`.`sConversionUnit` AS `sConversionUnit`,`xlyweberp_saas_ai`.`elematerials`.`dGramWeight` AS `dGramWeight`,`xlyweberp_saas_ai`.`elematerials`.`bPurchase` AS `bPurchase`,`xlyweberp_saas_ai`.`elematerials`.`bReel` AS `bReel`,`xlyweberp_saas_ai`.`elematerials`.`bSales` AS `bSales`,`xlyweberp_saas_ai`.`elematerials`.`bCorrugate` AS `bCorrugate`,`xlyweberp_saas_ai`.`elematerials`.`dPurchasePrice` AS `dPurchasePrice`,`xlyweberp_saas_ai`.`elematerials`.`dSalesPrice` AS `dSalesPrice`,`xlyweberp_saas_ai`.`elematerials`.`dRecentPurchasePrice` AS `dRecentPurchasePrice`,`xlyweberp_saas_ai`.`elematerials`.`dDesignateSalesPrice` AS `dDesignateSalesPrice`,`xlyweberp_saas_ai`.`elematerials`.`dProcurementCycle` AS `dProcurementCycle`,`xlyweberp_saas_ai`.`elematerials`.`sSupplyId` AS `sSupplyId`,`xlyweberp_saas_ai`.`elematerials`.`bCheck` AS `bCheck`,`xlyweberp_saas_ai`.`elematerials`.`bInvalid` AS `bInvalid`,`xlyweberp_saas_ai`.`elematerials`.`sMemo` AS `sMemo`,`xlyweberp_saas_ai`.`elematerials`.`bComMaterials` AS `bComMaterials`,`xlyweberp_saas_ai`.`sislocation`.`sName` AS `sLocationsName`,`xlyweberp_saas_ai`.`siswarehouse`.`sName` AS `sWarehouseName`,`xlyweberp_saas_ai`.`elematerials`.`sMtart` AS `sMtart` from ((((`xlyweberp_saas_ai`.`mitmaterialsstore` left join `xlyweberp_saas_ai`.`elematerials` on((`xlyweberp_saas_ai`.`mitmaterialsstore`.`sMaterialsId` = `xlyweberp_saas_ai`.`elematerials`.`sId`))) left join `xlyweberp_saas_ai`.`sismaterialsclassify` on((`xlyweberp_saas_ai`.`sismaterialsclassify`.`sId` = `xlyweberp_saas_ai`.`elematerials`.`sParentId`))) left join `xlyweberp_saas_ai`.`siswarehouse` on((`xlyweberp_saas_ai`.`siswarehouse`.`sId` = `xlyweberp_saas_ai`.`mitmaterialsstore`.`sWarehouseId`))) left join `xlyweberp_saas_ai`.`sislocation` on((`xlyweberp_saas_ai`.`sislocation`.`sId` = `xlyweberp_saas_ai`.`mitmaterialsstore`.`sLocationId`)))
```

## 说明

_暂无人工说明。_
