# `viw_accproductionmaterialsslave` (view)


- **Updatable:** YES

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `iIncrement` | `int` | NO |
| 2 | `sId` | `varchar(100)` | NO |
| 3 | `sBrandsId` | `varchar(100)` | NO |
| 4 | `sSubsidiaryId` | `varchar(100)` | NO |
| 5 | `iOrder` | `int` | NO |
| 6 | `sMakePerson` | `varchar(255)` | YES |
| 7 | `sParentId` | `varchar(100)` | NO |
| 8 | `sMaterialsId` | `varchar(100)` | NO |
| 9 | `sMaterialsStyle` | `varchar(255)` | NO |
| 10 | `dAuxiliaryQty` | `decimal(18,6)` | NO |
| 11 | `sAuxiliaryUnit` | `varchar(255)` | NO |
| 12 | `dMaterialsQty` | `decimal(18,6)` | NO |
| 13 | `dConversionQty` | `decimal(18,6)` | NO |
| 14 | `dMaterialsPrice` | `decimal(24,13)` | NO |
| 15 | `dMaterialsMoney` | `decimal(18,6)` | NO |
| 16 | `sSrcSlaveId` | `varchar(100)` | NO |
| 17 | `sSrcId` | `varchar(100)` | NO |
| 18 | `sSrcNo` | `varchar(255)` | NO |
| 19 | `dSrcQty` | `decimal(18,6)` | YES |
| 20 | `sSlaveMemo` | `text` | YES |
| 21 | `sTaxId` | `varchar(100)` | YES |
| 22 | `dMaterialsNoTaxPrice` | `decimal(24,13)` | NO |
| 23 | `dMaterialsNoTaxMoney` | `decimal(18,6)` | YES |
| 24 | `dMaterialsTaxMoney` | `decimal(18,6)` | YES |
| 25 | `dMaterialsTaxForeignMoney` | `decimal(18,6)` | YES |
| 26 | `dMaterialsForeignMoney` | `decimal(18,6)` | YES |
| 27 | `dRejectAuxiliaryQty` | `decimal(18,6)` | NO |
| 28 | `dRejectQty` | `decimal(18,6)` | NO |
| 29 | `tInStoreDate` | `datetime` | YES |
| 30 | `sBarcode` | `varchar(255)` | YES |
| 31 | `sOrderId` | `varchar(100)` | NO |
| 32 | `sOrderSlaveId` | `varchar(100)` | NO |
| 33 | `sOrderNo` | `varchar(255)` | NO |
| 34 | `sWorkOrderId` | `varchar(100)` | NO |
| 35 | `sWorkOrderNo` | `varchar(255)` | NO |
| 36 | `sWorkOrderSlaveId` | `varchar(100)` | NO |
| 37 | `sWorkOrderControlId` | `varchar(100)` | NO |
| 38 | `sWorkOrderMaterialsTbId` | `varchar(100)` | NO |
| 39 | `sWareHouseId` | `varchar(100)` | NO |
| 40 | `sLocationId` | `varchar(100)` | NO |
| 41 | `sWareHouseLocationId` | `varchar(100)` | NO |
| 42 | `sDefineNo` | `varchar(100)` | NO |
| 43 | `sDefineNo2` | `varchar(100)` | NO |
| 44 | `dReelAuxiliaryQty` | `decimal(18,6)` | NO |
| 45 | `sUnTaskFormId` | `varchar(100)` | NO |
| 46 | `tSrcDate` | `datetime` | YES |
| 47 | `sReelMaterialsStyle` | `varchar(255)` | NO |
| 48 | `sApplyId` | `varchar(255)` | NO |
| 49 | `sApplySlaveId` | `varchar(255)` | NO |
| 50 | `sCostPeriod` | `varchar(255)` | NO |
| 51 | `bConfirm` | `bit(1)` | NO |
| 52 | `tCreateDate` | `datetime` | NO |
| 53 | `sFormId` | `varchar(100)` | NO |
| 54 | `sBillNo` | `varchar(255)` | NO |
| 55 | `sBillId` | `varchar(255)` | NO |
| 56 | `sDepartId` | `varchar(255)` | NO |
| 57 | `sOrderFormId` | `varchar(100)` | YES |
| 58 | `sProductId` | `varchar(100)` | NO |
| 59 | `sProductNo` | `varchar(100)` | YES |
| 60 | `sProductName` | `varchar(100)` | YES |
| 61 | `sProductStyle` | `varchar(100)` | YES |
| 62 | `dProductQty` | `decimal(18,6)` | YES |
| 63 | `sProductUnit` | `varchar(100)` | YES |
| 64 | `sPartsName` | `varchar(100)` | YES |
| 65 | `sConfirmMonth` | `varchar(100)` | NO |
| 66 | `sAccId` | `varchar(100)` | NO |
| 67 | `sWorkCenterId` | `varchar(100)` | NO |
| 68 | `sCostFrameName` | `longtext` | YES |

## Definition

```sql
select `accproductionmaterialsslave`.`iIncrement` AS `iIncrement`,`accproductionmaterialsslave`.`sId` AS `sId`,`accproductionmaterialsslave`.`sBrandsId` AS `sBrandsId`,`accproductionmaterialsslave`.`sSubsidiaryId` AS `sSubsidiaryId`,`accproductionmaterialsslave`.`iOrder` AS `iOrder`,`accproductionmaterialsslave`.`sMakePerson` AS `sMakePerson`,`accproductionmaterialsslave`.`sParentId` AS `sParentId`,`accproductionmaterialsslave`.`sMaterialsId` AS `sMaterialsId`,`accproductionmaterialsslave`.`sMaterialsStyle` AS `sMaterialsStyle`,`accproductionmaterialsslave`.`dAuxiliaryQty` AS `dAuxiliaryQty`,`accproductionmaterialsslave`.`sAuxiliaryUnit` AS `sAuxiliaryUnit`,`accproductionmaterialsslave`.`dMaterialsQty` AS `dMaterialsQty`,`accproductionmaterialsslave`.`dConversionQty` AS `dConversionQty`,`accproductionmaterialsslave`.`dMaterialsPrice` AS `dMaterialsPrice`,`accproductionmaterialsslave`.`dMaterialsMoney` AS `dMaterialsMoney`,`accproductionmaterialsslave`.`sSrcSlaveId` AS `sSrcSlaveId`,`accproductionmaterialsslave`.`sSrcId` AS `sSrcId`,`accproductionmaterialsslave`.`sSrcNo` AS `sSrcNo`,`accproductionmaterialsslave`.`dSrcQty` AS `dSrcQty`,`accproductionmaterialsslave`.`sSlaveMemo` AS `sSlaveMemo`,`accproductionmaterialsslave`.`sTaxId` AS `sTaxId`,`accproductionmaterialsslave`.`dMaterialsNoTaxPrice` AS `dMaterialsNoTaxPrice`,`accproductionmaterialsslave`.`dMaterialsNoTaxMoney` AS `dMaterialsNoTaxMoney`,`accproductionmaterialsslave`.`dMaterialsTaxMoney` AS `dMaterialsTaxMoney`,`accproductionmaterialsslave`.`dMaterialsTaxForeignMoney` AS `dMaterialsTaxForeignMoney`,`accproductionmaterialsslave`.`dMaterialsForeignMoney` AS `dMaterialsForeignMoney`,`accproductionmaterialsslave`.`dRejectAuxiliaryQty` AS `dRejectAuxiliaryQty`,`accproductionmaterialsslave`.`dRejectQty` AS `dRejectQty`,`accproductionmaterialsslave`.`tInStoreDate` AS `tInStoreDate`,`accproductionmaterialsslave`.`sBarcode` AS `sBarcode`,`accproductionmaterialsslave`.`sOrderId` AS `sOrderId`,`accproductionmaterialsslave`.`sOrderSlaveId` AS `sOrderSlaveId`,`accproductionmaterialsslave`.`sOrderNo` AS `sOrderNo`,`accproductionmaterialsslave`.`sWorkOrderId` AS `sWorkOrderId`,`accproductionmaterialsslave`.`sWorkOrderNo` AS `sWorkOrderNo`,`accproductionmaterialsslave`.`sWorkOrderSlaveId` AS `sWorkOrderSlaveId`,`accproductionmaterialsslave`.`sWorkOrderControlId` AS `sWorkOrderControlId`,`accproductionmaterialsslave`.`sWorkOrderMaterialsTbId` AS `sWorkOrderMaterialsTbId`,`accproductionmaterialsslave`.`sWareHouseId` AS `sWareHouseId`,`accproductionmaterialsslave`.`sLocationId` AS `sLocationId`,`accproductionmaterialsslave`.`sWareHouseLocationId` AS `sWareHouseLocationId`,`accproductionmaterialsslave`.`sDefineNo` AS `sDefineNo`,`accproductionmaterialsslave`.`sDefineNo2` AS `sDefineNo2`,`accproductionmaterialsslave`.`dReelAuxiliaryQty` AS `dReelAuxiliaryQty`,`accproductionmaterialsslave`.`sUnTaskFormId` AS `sUnTaskFormId`,`accproductionmaterialsslave`.`tSrcDate` AS `tSrcDate`,`accproductionmaterialsslave`.`sReelMaterialsStyle` AS `sReelMaterialsStyle`,`accproductionmaterialsslave`.`sApplyId` AS `sApplyId`,`accproductionmaterialsslave`.`sApplySlaveId` AS `sApplySlaveId`,`accproductionmaterialsslave`.`sCostPeriod` AS `sCostPeriod`,`accproductionmaterialsslave`.`bConfirm` AS `bConfirm`,`accproductionmaterialsslave`.`tCreateDate` AS `tCreateDate`,`accproductionmaterialsslave`.`sFormId` AS `sFormId`,`accproductionmaterialsslave`.`sBillNo` AS `sBillNo`,`accproductionmaterialsslave`.`sBillId` AS `sBillId`,`accproductionmaterialsslave`.`sDepartId` AS `sDepartId`,`accproductionmaterialsslave`.`sOrderFormId` AS `sOrderFormId`,`accproductionmaterialsslave`.`sProductId` AS `sProductId`,`accproductionmaterialsslave`.`sProductNo` AS `sProductNo`,`accproductionmaterialsslave`.`sProductName` AS `sProductName`,`accproductionmaterialsslave`.`sProductStyle` AS `sProductStyle`,`accproductionmaterialsslave`.`dProductQty` AS `dProductQty`,`accproductionmaterialsslave`.`sProductUnit` AS `sProductUnit`,`accproductionmaterialsslave`.`sPartsName` AS `sPartsName`,`accproductionmaterialsslave`.`sConfirmMonth` AS `sConfirmMonth`,`accproductionmaterialsslave`.`sAccId` AS `sAccId`,`accproductionmaterialsslave`.`sWorkCenterId` AS `sWorkCenterId`,(select (case when (ifnull(`t`.`sCostFrameName`,'') = '') then replace(json_extract('{"paper":"纸张","label":"不干胶","finished":"成品","half_finished":"半成品","accessories":"生产辅料","corrugated":"瓦楞","sMach_accessories":"设备配件","baocai":"包装材料","LabourProducts":"劳保用品","cost":"费用支出","fixedassets":"固定资产","OfficeProducts":"行政办公"}',concat('$.',`s`.`sMaterialsType`)),'"','') else convert(`t`.`sCostFrameName` using utf8mb4) end) from (`elematerials` `s` left join `elecostframe` `t` on((`t`.`sId` = `s`.`sCostFrameId`))) where (`s`.`sId` = `accproductionmaterialsslave`.`sMaterialsId`)) AS `sCostFrameName` from `accproductionmaterialsslave`
```

## Narrative

_No human-written narrative yet._
