# `viw_outstroredepart`（视图）


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

## 字段

| # | 名称 | 类型 | 可空 |
|---|---|---|---|
| 1 | `sId` | `varchar(63)` | YES |
| 2 | `sSlaveId` | `varchar(63)` | YES |
| 3 | `sDepartId` | `varchar(100)` | YES |
| 4 | `sMaterialsId` | `varchar(100)` | YES |
| 5 | `sBillNo` | `varchar(255)` | YES |
| 6 | `dMaterials1Money` | `decimal(40,2)` | YES |
| 7 | `sConfirmMonth` | `varchar(100)` | YES |
| 8 | `sBrandsId` | `varchar(100)` | YES |
| 9 | `sSubsidiaryId` | `varchar(100)` | YES |

## 定义

```sql
select concat(date_format(now(),'%Y%m%d%H%i%s'),ceiling(((rand() * 9000000) + 1000000)),ceiling(((rand() * 9000000000) + 1000000000))) AS `sId`,concat(date_format(now(),'%Y%m%d%H%i%s'),ceiling(((rand() * 9000000) + 1000000)),ceiling(((rand() * 9000000000) + 1000000000))) AS `sSlaveId`,`xlyweberp_saas_ai`.`accmaterialsstore`.`sDepartId` AS `sDepartId`,`xlyweberp_saas_ai`.`accmaterialsstore`.`sMaterialsId` AS `sMaterialsId`,`xlyweberp_saas_ai`.`accmaterialsstore`.`sBillNo` AS `sBillNo`,(case when ((`xlyweberp_saas_ai`.`accmaterialsstore`.`sFormId` = '192116810113315226492535760') or (`xlyweberp_saas_ai`.`accmaterialsstore`.`sFormId` = '101251240115015959856790260') or (`xlyweberp_saas_ai`.`accmaterialsstore`.`sFormId` = '192116810113315226622476570') or (`xlyweberp_saas_ai`.`accmaterialsstore`.`sFormId` = '101251240115016109404703250')) then sum(`xlyweberp_saas_ai`.`accmaterialsstore`.`dMaterialsMoney`) else 0 end) AS `dMaterials1Money`,`xlyweberp_saas_ai`.`accmaterialsstore`.`sConfirmMonth` AS `sConfirmMonth`,`xlyweberp_saas_ai`.`accmaterialsstore`.`sBrandsId` AS `sBrandsId`,`xlyweberp_saas_ai`.`accmaterialsstore`.`sSubsidiaryId` AS `sSubsidiaryId` from `xlyweberp_saas_ai`.`accmaterialsstore` where (`xlyweberp_saas_ai`.`accmaterialsstore`.`sFormId` in ('192116810113315226492535760','101251240115015959856790260','192116810113315226622476570','101251240115016109404703250')) group by `xlyweberp_saas_ai`.`accmaterialsstore`.`sDepartId`,`xlyweberp_saas_ai`.`accmaterialsstore`.`sMaterialsId`,`xlyweberp_saas_ai`.`accmaterialsstore`.`sConfirmMonth`,`xlyweberp_saas_ai`.`accmaterialsstore`.`sBrandsId`,`xlyweberp_saas_ai`.`accmaterialsstore`.`sSubsidiaryId`
```

## 说明

_暂无人工说明。_
