# `viw_salsalesordermaterials`（视图）


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

## 字段

| # | 名称 | 类型 | 可空 |
|---|---|---|---|
| 1 | `iIncrement` | `int` | NO |
| 2 | `sId` | `varchar(100)` | NO |
| 3 | `sBrandsId` | `varchar(100)` | NO |
| 4 | `sSubsidiaryId` | `varchar(100)` | NO |
| 5 | `tCreateDate` | `datetime` | NO |
| 6 | `sMakePerson` | `varchar(255)` | NO |
| 7 | `sCheckPerson` | `varchar(255)` | YES |
| 8 | `tCheckDate` | `datetime` | YES |
| 9 | `bCheck` | `bit(1)` | NO |
| 10 | `sStatus` | `varchar(255)` | YES |
| 11 | `iOrder` | `int` | NO |
| 12 | `sFormId` | `varchar(100)` | NO |
| 13 | `sBillNo` | `varchar(255)` | NO |
| 14 | `sCustomerId` | `varchar(100)` | YES |
| 15 | `bInvalid` | `bit(1)` | NO |
| 16 | `sSlaveId` | `varchar(100)` | NO |
| 17 | `iSlaveOrder` | `int` | NO |
| 18 | `sParentId` | `varchar(100)` | NO |
| 19 | `dProductQty` | `decimal(18,6)` | NO |
| 20 | `sProductId` | `varchar(100)` | NO |
| 21 | `iSucceed` | `int` | YES |
| 22 | `sMaterialsId` | `varchar(255)` | YES |
| 23 | `sSucceed` | `varchar(1)` | NO |
| 24 | `iDateDay` | `int` | YES |
| 25 | `sMemo` | `text` | YES |

## 定义

```sql
select `xlyweberp_saas_ai`.`salsalesordermaster`.`iIncrement` AS `iIncrement`,`xlyweberp_saas_ai`.`salsalesordermaster`.`sId` AS `sId`,`xlyweberp_saas_ai`.`salsalesordermaster`.`sBrandsId` AS `sBrandsId`,`xlyweberp_saas_ai`.`salsalesordermaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`xlyweberp_saas_ai`.`salsalesordermaster`.`tCreateDate` AS `tCreateDate`,`xlyweberp_saas_ai`.`salsalesordermaster`.`sMakePerson` AS `sMakePerson`,`xlyweberp_saas_ai`.`salsalesordermaster`.`sCheckPerson` AS `sCheckPerson`,`xlyweberp_saas_ai`.`salsalesordermaster`.`tCheckDate` AS `tCheckDate`,`xlyweberp_saas_ai`.`salsalesordermaster`.`bCheck` AS `bCheck`,`xlyweberp_saas_ai`.`salsalesordermaster`.`sStatus` AS `sStatus`,`xlyweberp_saas_ai`.`salsalesordermaster`.`iOrder` AS `iOrder`,`xlyweberp_saas_ai`.`salsalesordermaster`.`sFormId` AS `sFormId`,`xlyweberp_saas_ai`.`salsalesordermaster`.`sBillNo` AS `sBillNo`,`xlyweberp_saas_ai`.`salsalesordermaster`.`sCustomerId` AS `sCustomerId`,`xlyweberp_saas_ai`.`salsalesordermaster`.`bInvalid` AS `bInvalid`,`xlyweberp_saas_ai`.`salsalesorderslave`.`sId` AS `sSlaveId`,`xlyweberp_saas_ai`.`salsalesorderslave`.`iOrder` AS `iSlaveOrder`,`xlyweberp_saas_ai`.`salsalesorderslave`.`sParentId` AS `sParentId`,`xlyweberp_saas_ai`.`salsalesorderslave`.`dProductQty` AS `dProductQty`,`xlyweberp_saas_ai`.`salsalesorderslave`.`sProductId` AS `sProductId`,`xlyweberp_saas_ai`.`salsalesorderslave`.`iSucceed` AS `iSucceed`,`xlyweberp_saas_ai`.`salsalesorderslave`.`sMaterialsId` AS `sMaterialsId`,(case `xlyweberp_saas_ai`.`salsalesorderslave`.`iSucceed` when 0 then '' when 1 then '是' else '否' end) AS `sSucceed`,((case when (`xlyweberp_saas_ai`.`mftmaterialstest`.`tFeedBack3Date` is null) then to_days(now()) else to_days(`xlyweberp_saas_ai`.`mftmaterialstest`.`tFeedBack3Date`) end) - to_days(`xlyweberp_saas_ai`.`salsalesordermaster`.`tCreateDate`)) AS `iDateDay`,`xlyweberp_saas_ai`.`salsalesordermaster`.`sMemo` AS `sMemo` from ((`xlyweberp_saas_ai`.`salsalesordermaster` join `xlyweberp_saas_ai`.`salsalesorderslave` on((`xlyweberp_saas_ai`.`salsalesorderslave`.`sParentId` = `xlyweberp_saas_ai`.`salsalesordermaster`.`sId`))) join `xlyweberp_saas_ai`.`mftmaterialstest` on((`xlyweberp_saas_ai`.`salsalesorderslave`.`sId` = `xlyweberp_saas_ai`.`mftmaterialstest`.`sMOrderSlaveId`))) where (`xlyweberp_saas_ai`.`salsalesordermaster`.`sOrderType` = 5)
```

## 说明

_暂无人工说明。_
